-
+
V4L2 API
|
Should be used for new projects
diff --git a/trunk/Documentation/video4linux/CARDLIST.bttv b/trunk/Documentation/video4linux/CARDLIST.bttv
index 2404099996ac..ec785f9f15a3 100644
--- a/trunk/Documentation/video4linux/CARDLIST.bttv
+++ b/trunk/Documentation/video4linux/CARDLIST.bttv
@@ -1,142 +1,137 @@
- 0 -> *** UNKNOWN/GENERIC ***
- 1 -> MIRO PCTV
- 2 -> Hauppauge (bt848)
- 3 -> STB, Gateway P/N 6000699 (bt848)
- 4 -> Intel Create and Share PCI/ Smart Video Recorder III
- 5 -> Diamond DTV2000
- 6 -> AVerMedia TVPhone
- 7 -> MATRIX-Vision MV-Delta
- 8 -> Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26
- 9 -> IMS/IXmicro TurboTV
- 10 -> Hauppauge (bt878) [0070:13eb,0070:3900,2636:10b4]
- 11 -> MIRO PCTV pro
- 12 -> ADS Technologies Channel Surfer TV (bt848)
- 13 -> AVerMedia TVCapture 98 [1461:0002,1461:0004,1461:0300]
- 14 -> Aimslab Video Highway Xtreme (VHX)
- 15 -> Zoltrix TV-Max [a1a0:a0fc]
- 16 -> Prolink Pixelview PlayTV (bt878)
- 17 -> Leadtek WinView 601
- 18 -> AVEC Intercapture
- 19 -> Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)
- 20 -> CEI Raffles Card
- 21 -> Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50
- 22 -> Askey CPH050/ Phoebe Tv Master + FM [14ff:3002]
- 23 -> Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878 [14c7:0101]
- 24 -> Askey CPH05X/06X (bt878) [many vendors] [144f:3002,144f:3005,144f:5000,14ff:3000]
- 25 -> Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar
- 26 -> Hauppauge WinCam newer (bt878)
- 27 -> Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50
- 28 -> Terratec TerraTV+ Version 1.1 (bt878) [153b:1127,1852:1852]
- 29 -> Imagenation PXC200 [1295:200a]
- 30 -> Lifeview FlyVideo 98 LR50 [1f7f:1850]
- 31 -> Formac iProTV, Formac ProTV I (bt848)
- 32 -> Intel Create and Share PCI/ Smart Video Recorder III
- 33 -> Terratec TerraTValue Version Bt878 [153b:1117,153b:1118,153b:1119,153b:111a,153b:1134,153b:5018]
- 34 -> Leadtek WinFast 2000/ WinFast 2000 XP [107d:6606,107d:6609,6606:217d,f6ff:fff6]
- 35 -> Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II [1851:1850,1851:a050]
- 36 -> Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner [1852:1852]
- 37 -> Prolink PixelView PlayTV pro
- 38 -> Askey CPH06X TView99 [144f:3000,144f:a005,a04f:a0fc]
- 39 -> Pinnacle PCTV Studio/Rave [11bd:0012,bd11:1200,bd11:ff00,11bd:ff12]
- 40 -> STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100 [10b4:2636,10b4:2645,121a:3060]
- 41 -> AVerMedia TVPhone 98 [1461:0001,1461:0003]
- 42 -> ProVideo PV951 [aa0c:146c]
- 43 -> Little OnAir TV
- 44 -> Sigma TVII-FM
- 45 -> MATRIX-Vision MV-Delta 2
- 46 -> Zoltrix Genie TV/FM [15b0:4000,15b0:400a,15b0:400d,15b0:4010,15b0:4016]
- 47 -> Terratec TV/Radio+ [153b:1123]
- 48 -> Askey CPH03x/ Dynalink Magic TView
- 49 -> IODATA GV-BCTV3/PCI [10fc:4020]
- 50 -> Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP
- 51 -> Eagle Wireless Capricorn2 (bt878A)
- 52 -> Pinnacle PCTV Studio Pro
- 53 -> Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS
- 54 -> Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]
- 55 -> Askey CPH031/ BESTBUY Easy TV
- 56 -> Lifeview FlyVideo 98FM LR50 [a051:41a0]
- 57 -> GrandTec 'Grand Video Capture' (Bt848) [4344:4142]
- 58 -> Askey CPH060/ Phoebe TV Master Only (No FM)
- 59 -> Askey CPH03x TV Capturer
- 60 -> Modular Technology MM100PCTV
- 61 -> AG Electronics GMV1 [15cb:0101]
- 62 -> Askey CPH061/ BESTBUY Easy TV (bt878)
- 63 -> ATI TV-Wonder [1002:0001]
- 64 -> ATI TV-Wonder VE [1002:0003]
- 65 -> Lifeview FlyVideo 2000S LR90
- 66 -> Terratec TValueRadio [153b:1135,153b:ff3b]
- 67 -> IODATA GV-BCTV4/PCI [10fc:4050]
- 68 -> 3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA) [121a:3000,10b4:2637]
- 69 -> Active Imaging AIMMS
- 70 -> Prolink Pixelview PV-BT878P+ (Rev.4C,8E)
- 71 -> Lifeview FlyVideo 98EZ (capture only) LR51 [1851:1851]
- 72 -> Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM) [1554:4011]
- 73 -> Sensoray 311 [6000:0311]
- 74 -> RemoteVision MX (RV605)
- 75 -> Powercolor MTV878/ MTV878R/ MTV878F
- 76 -> Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP) [0e11:0079]
- 77 -> GrandTec Multi Capture Card (Bt878)
- 78 -> Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF [0a01:17de]
- 79 -> DSP Design TCVIDEO
- 80 -> Hauppauge WinTV PVR [0070:4500]
- 81 -> IODATA GV-BCTV5/PCI [10fc:4070,10fc:d018]
- 82 -> Osprey 100/150 (878) [0070:ff00]
- 83 -> Osprey 100/150 (848)
- 84 -> Osprey 101 (848)
- 85 -> Osprey 101/151
- 86 -> Osprey 101/151 w/ svid
- 87 -> Osprey 200/201/250/251
- 88 -> Osprey 200/250 [0070:ff01]
- 89 -> Osprey 210/220
- 90 -> Osprey 500 [0070:ff02]
- 91 -> Osprey 540 [0070:ff04]
- 92 -> Osprey 2000 [0070:ff03]
- 93 -> IDS Eagle
- 94 -> Pinnacle PCTV Sat [11bd:001c]
- 95 -> Formac ProTV II (bt878)
- 96 -> MachTV
- 97 -> Euresys Picolo
- 98 -> ProVideo PV150 [aa00:1460,aa01:1461,aa02:1462,aa03:1463,aa04:1464,aa05:1465,aa06:1466,aa07:1467]
- 99 -> AD-TVK503
-100 -> Hercules Smart TV Stereo
-101 -> Pace TV & Radio Card
-102 -> IVC-200 [0000:a155,0001:a155,0002:a155,0003:a155,0100:a155,0101:a155,0102:a155,0103:a155]
-103 -> Grand X-Guard / Trust 814PCI [0304:0102]
-104 -> Nebula Electronics DigiTV [0071:0101]
-105 -> ProVideo PV143 [aa00:1430,aa00:1431,aa00:1432,aa00:1433,aa03:1433]
-106 -> PHYTEC VD-009-X1 MiniDIN (bt878)
-107 -> PHYTEC VD-009-X1 Combi (bt878)
-108 -> PHYTEC VD-009 MiniDIN (bt878)
-109 -> PHYTEC VD-009 Combi (bt878)
-110 -> IVC-100 [ff00:a132]
-111 -> IVC-120G [ff00:a182,ff01:a182,ff02:a182,ff03:a182,ff04:a182,ff05:a182,ff06:a182,ff07:a182,ff08:a182,ff09:a182,ff0a:a182,ff0b:a182,ff0c:a182,ff0d:a182,ff0e:a182,ff0f:a182]
-112 -> pcHDTV HD-2000 TV [7063:2000]
-113 -> Twinhan DST + clones [11bd:0026,1822:0001,270f:fc00]
-114 -> Winfast VC100 [107d:6607]
-115 -> Teppro TEV-560/InterVision IV-560
-116 -> SIMUS GVC1100 [aa6a:82b2]
-117 -> NGS NGSTV+
-118 -> LMLBT4
-119 -> Tekram M205 PRO
-120 -> Conceptronic CONTVFMi
-121 -> Euresys Picolo Tetra [1805:0105,1805:0106,1805:0107,1805:0108]
-122 -> Spirit TV Tuner
-123 -> AVerMedia AVerTV DVB-T 771 [1461:0771]
-124 -> AverMedia AverTV DVB-T 761 [1461:0761]
-125 -> MATRIX Vision Sigma-SQ
-126 -> MATRIX Vision Sigma-SLC
-127 -> APAC Viewcomp 878(AMAX)
-128 -> DViCO FusionHDTV DVB-T Lite [18ac:db10]
-129 -> V-Gear MyVCD
-130 -> Super TV Tuner
-131 -> Tibet Systems 'Progress DVR' CS16
-132 -> Kodicom 4400R (master)
-133 -> Kodicom 4400R (slave)
-134 -> Adlink RTV24
-135 -> DViCO FusionHDTV 5 Lite [18ac:d500]
-136 -> Acorp Y878F [9511:1540]
-137 -> Conceptronic CTVFMi v2
-138 -> Prolink Pixelview PV-BT878P+ (Rev.2E)
-139 -> Prolink PixelView PlayTV MPEG2 PV-M4900
-140 -> Osprey 440 [0070:ff07]
-141 -> Asound Skyeye PCTV
+card=0 - *** UNKNOWN/GENERIC ***
+card=1 - MIRO PCTV
+card=2 - Hauppauge (bt848)
+card=3 - STB, Gateway P/N 6000699 (bt848)
+card=4 - Intel Create and Share PCI/ Smart Video Recorder III
+card=5 - Diamond DTV2000
+card=6 - AVerMedia TVPhone
+card=7 - MATRIX-Vision MV-Delta
+card=8 - Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26
+card=9 - IMS/IXmicro TurboTV
+card=10 - Hauppauge (bt878)
+card=11 - MIRO PCTV pro
+card=12 - ADS Technologies Channel Surfer TV (bt848)
+card=13 - AVerMedia TVCapture 98
+card=14 - Aimslab Video Highway Xtreme (VHX)
+card=15 - Zoltrix TV-Max
+card=16 - Prolink Pixelview PlayTV (bt878)
+card=17 - Leadtek WinView 601
+card=18 - AVEC Intercapture
+card=19 - Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)
+card=20 - CEI Raffles Card
+card=21 - Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50
+card=22 - Askey CPH050/ Phoebe Tv Master + FM
+card=23 - Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878
+card=24 - Askey CPH05X/06X (bt878) [many vendors]
+card=25 - Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar
+card=26 - Hauppauge WinCam newer (bt878)
+card=27 - Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50
+card=28 - Terratec TerraTV+ Version 1.1 (bt878)
+card=29 - Imagenation PXC200
+card=30 - Lifeview FlyVideo 98 LR50
+card=31 - Formac iProTV, Formac ProTV I (bt848)
+card=32 - Intel Create and Share PCI/ Smart Video Recorder III
+card=33 - Terratec TerraTValue Version Bt878
+card=34 - Leadtek WinFast 2000/ WinFast 2000 XP
+card=35 - Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II
+card=36 - Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner
+card=37 - Prolink PixelView PlayTV pro
+card=38 - Askey CPH06X TView99
+card=39 - Pinnacle PCTV Studio/Rave
+card=40 - STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100
+card=41 - AVerMedia TVPhone 98
+card=42 - ProVideo PV951
+card=43 - Little OnAir TV
+card=44 - Sigma TVII-FM
+card=45 - MATRIX-Vision MV-Delta 2
+card=46 - Zoltrix Genie TV/FM
+card=47 - Terratec TV/Radio+
+card=48 - Askey CPH03x/ Dynalink Magic TView
+card=49 - IODATA GV-BCTV3/PCI
+card=50 - Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP
+card=51 - Eagle Wireless Capricorn2 (bt878A)
+card=52 - Pinnacle PCTV Studio Pro
+card=53 - Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS
+card=54 - Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]
+card=55 - Askey CPH031/ BESTBUY Easy TV
+card=56 - Lifeview FlyVideo 98FM LR50
+card=57 - GrandTec 'Grand Video Capture' (Bt848)
+card=58 - Askey CPH060/ Phoebe TV Master Only (No FM)
+card=59 - Askey CPH03x TV Capturer
+card=60 - Modular Technology MM100PCTV
+card=61 - AG Electronics GMV1
+card=62 - Askey CPH061/ BESTBUY Easy TV (bt878)
+card=63 - ATI TV-Wonder
+card=64 - ATI TV-Wonder VE
+card=65 - Lifeview FlyVideo 2000S LR90
+card=66 - Terratec TValueRadio
+card=67 - IODATA GV-BCTV4/PCI
+card=68 - 3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA)
+card=69 - Active Imaging AIMMS
+card=70 - Prolink Pixelview PV-BT878P+ (Rev.4C,8E)
+card=71 - Lifeview FlyVideo 98EZ (capture only) LR51
+card=72 - Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)
+card=73 - Sensoray 311
+card=74 - RemoteVision MX (RV605)
+card=75 - Powercolor MTV878/ MTV878R/ MTV878F
+card=76 - Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)
+card=77 - GrandTec Multi Capture Card (Bt878)
+card=78 - Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF
+card=79 - DSP Design TCVIDEO
+card=80 - Hauppauge WinTV PVR
+card=81 - IODATA GV-BCTV5/PCI
+card=82 - Osprey 100/150 (878)
+card=83 - Osprey 100/150 (848)
+card=84 - Osprey 101 (848)
+card=85 - Osprey 101/151
+card=86 - Osprey 101/151 w/ svid
+card=87 - Osprey 200/201/250/251
+card=88 - Osprey 200/250
+card=89 - Osprey 210/220
+card=90 - Osprey 500
+card=91 - Osprey 540
+card=92 - Osprey 2000
+card=93 - IDS Eagle
+card=94 - Pinnacle PCTV Sat
+card=95 - Formac ProTV II (bt878)
+card=96 - MachTV
+card=97 - Euresys Picolo
+card=98 - ProVideo PV150
+card=99 - AD-TVK503
+card=100 - Hercules Smart TV Stereo
+card=101 - Pace TV & Radio Card
+card=102 - IVC-200
+card=103 - Grand X-Guard / Trust 814PCI
+card=104 - Nebula Electronics DigiTV
+card=105 - ProVideo PV143
+card=106 - PHYTEC VD-009-X1 MiniDIN (bt878)
+card=107 - PHYTEC VD-009-X1 Combi (bt878)
+card=108 - PHYTEC VD-009 MiniDIN (bt878)
+card=109 - PHYTEC VD-009 Combi (bt878)
+card=110 - IVC-100
+card=111 - IVC-120G
+card=112 - pcHDTV HD-2000 TV
+card=113 - Twinhan DST + clones
+card=114 - Winfast VC100
+card=115 - Teppro TEV-560/InterVision IV-560
+card=116 - SIMUS GVC1100
+card=117 - NGS NGSTV+
+card=118 - LMLBT4
+card=119 - Tekram M205 PRO
+card=120 - Conceptronic CONTVFMi
+card=121 - Euresys Picolo Tetra
+card=122 - Spirit TV Tuner
+card=123 - AVerMedia AVerTV DVB-T 771
+card=124 - AverMedia AverTV DVB-T 761
+card=125 - MATRIX Vision Sigma-SQ
+card=126 - MATRIX Vision Sigma-SLC
+card=127 - APAC Viewcomp 878(AMAX)
+card=128 - DViCO FusionHDTV DVB-T Lite
+card=129 - V-Gear MyVCD
+card=130 - Super TV Tuner
+card=131 - Tibet Systems 'Progress DVR' CS16
+card=132 - Kodicom 4400R (master)
+card=133 - Kodicom 4400R (slave)
+card=134 - Adlink RTV24
+card=135 - DViCO FusionHDTV 5 Lite
+card=136 - Acorp Y878F
diff --git a/trunk/Documentation/video4linux/CARDLIST.cx88 b/trunk/Documentation/video4linux/CARDLIST.cx88
index a1017d1a85d4..03deb0726aa4 100644
--- a/trunk/Documentation/video4linux/CARDLIST.cx88
+++ b/trunk/Documentation/video4linux/CARDLIST.cx88
@@ -1,37 +1,32 @@
- 0 -> UNKNOWN/GENERIC
- 1 -> Hauppauge WinTV 34xxx models [0070:3400,0070:3401]
- 2 -> GDI Black Gold [14c7:0106,14c7:0107]
- 3 -> PixelView [1554:4811]
- 4 -> ATI TV Wonder Pro [1002:00f8]
- 5 -> Leadtek Winfast 2000XP Expert [107d:6611,107d:6613]
- 6 -> AverTV Studio 303 (M126) [1461:000b]
- 7 -> MSI TV-@nywhere Master [1462:8606]
- 8 -> Leadtek Winfast DV2000 [107d:6620]
- 9 -> Leadtek PVR 2000 [107d:663b,107d:663C]
- 10 -> IODATA GV-VCP3/PCI [10fc:d003]
- 11 -> Prolink PlayTV PVR
- 12 -> ASUS PVR-416 [1043:4823]
- 13 -> MSI TV-@nywhere
- 14 -> KWorld/VStream XPert DVB-T [17de:08a6]
- 15 -> DViCO FusionHDTV DVB-T1 [18ac:db00]
- 16 -> KWorld LTV883RF
- 17 -> DViCO FusionHDTV 3 Gold-Q [18ac:d810]
- 18 -> Hauppauge Nova-T DVB-T [0070:9002]
- 19 -> Conexant DVB-T reference design [14f1:0187]
- 20 -> Provideo PV259 [1540:2580]
- 21 -> DViCO FusionHDTV DVB-T Plus [18ac:db10]
- 22 -> pcHDTV HD3000 HDTV [7063:3000]
- 23 -> digitalnow DNTV Live! DVB-T [17de:a8a6]
- 24 -> Hauppauge WinTV 28xxx (Roslyn) models [0070:2801]
- 25 -> Digital-Logic MICROSPACE Entertainment Center (MEC) [14f1:0342]
- 26 -> IODATA GV/BCTV7E [10fc:d035]
- 27 -> PixelView PlayTV Ultra Pro (Stereo)
- 28 -> DViCO FusionHDTV 3 Gold-T [18ac:d820]
- 29 -> ADS Tech Instant TV DVB-T PCI [1421:0334]
- 30 -> TerraTec Cinergy 1400 DVB-T [153b:1166]
- 31 -> DViCO FusionHDTV 5 Gold [18ac:d500]
- 32 -> AverMedia UltraTV Media Center PCI 550 [1461:8011]
- 33 -> Kworld V-Stream Xpert DVD
- 34 -> ATI HDTV Wonder [1002:a101]
- 35 -> WinFast DTV1000-T [107d:665f]
- 36 -> AVerTV 303 (M126) [1461:000a]
+card=0 - UNKNOWN/GENERIC
+card=1 - Hauppauge WinTV 34xxx models
+card=2 - GDI Black Gold
+card=3 - PixelView
+card=4 - ATI TV Wonder Pro
+card=5 - Leadtek Winfast 2000XP Expert
+card=6 - AverTV Studio 303 (M126)
+card=7 - MSI TV-@nywhere Master
+card=8 - Leadtek Winfast DV2000
+card=9 - Leadtek PVR 2000
+card=10 - IODATA GV-VCP3/PCI
+card=11 - Prolink PlayTV PVR
+card=12 - ASUS PVR-416
+card=13 - MSI TV-@nywhere
+card=14 - KWorld/VStream XPert DVB-T
+card=15 - DViCO FusionHDTV DVB-T1
+card=16 - KWorld LTV883RF
+card=17 - DViCO FusionHDTV 3 Gold-Q
+card=18 - Hauppauge Nova-T DVB-T
+card=19 - Conexant DVB-T reference design
+card=20 - Provideo PV259
+card=21 - DViCO FusionHDTV DVB-T Plus
+card=22 - digitalnow DNTV Live! DVB-T
+card=23 - pcHDTV HD3000 HDTV
+card=24 - Hauppauge WinTV 28xxx (Roslyn) models
+card=25 - Digital-Logic MICROSPACE Entertainment Center (MEC)
+card=26 - IODATA GV/BCTV7E
+card=27 - PixelView PlayTV Ultra Pro (Stereo)
+card=28 - DViCO FusionHDTV 3 Gold-T
+card=29 - ADS Tech Instant TV DVB-T PCI
+card=30 - TerraTec Cinergy 1400 DVB-T
+card=31 - DViCO FusionHDTV 5 Gold
diff --git a/trunk/Documentation/video4linux/CARDLIST.em28xx b/trunk/Documentation/video4linux/CARDLIST.em28xx
deleted file mode 100644
index a0c7cad20971..000000000000
--- a/trunk/Documentation/video4linux/CARDLIST.em28xx
+++ /dev/null
@@ -1,10 +0,0 @@
- 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800]
- 1 -> Unknown EM2820/2840 video grabber (em2820/em2840)
- 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036]
- 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208]
- 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200]
- 5 -> MSI VOX USB 2.0 (em2820/em2840) [eb1a:2820]
- 6 -> Terratec Cinergy 200 USB (em2800)
- 7 -> Leadtek Winfast USB II (em2800)
- 8 -> Kworld USB2800 (em2800)
- 9 -> Pinnacle Dazzle DVC 90 (em2820/em2840) [2304:0207]
diff --git a/trunk/Documentation/video4linux/CARDLIST.saa7134 b/trunk/Documentation/video4linux/CARDLIST.saa7134
index 57c9d631db56..dc57225f39be 100644
--- a/trunk/Documentation/video4linux/CARDLIST.saa7134
+++ b/trunk/Documentation/video4linux/CARDLIST.saa7134
@@ -6,10 +6,10 @@
5 -> SKNet Monster TV [1131:4e85]
6 -> Tevion MD 9717
7 -> KNC One TV-Station RDS / Typhoon TV Tuner RDS [1131:fe01,1894:fe01]
- 8 -> Terratec Cinergy 400 TV [153b:1142]
+ 8 -> Terratec Cinergy 400 TV [153B:1142]
9 -> Medion 5044
10 -> Kworld/KuroutoShikou SAA7130-TVPCI
- 11 -> Terratec Cinergy 600 TV [153b:1143]
+ 11 -> Terratec Cinergy 600 TV [153B:1143]
12 -> Medion 7134 [16be:0003]
13 -> Typhoon TV+Radio 90031
14 -> ELSA EX-VISION 300TV [1048:226b]
@@ -36,8 +36,8 @@
35 -> AverMedia AverTV Studio 305 [1461:2115]
36 -> UPMOST PURPLE TV [12ab:0800]
37 -> Items MuchTV Plus / IT-005
- 38 -> Terratec Cinergy 200 TV [153b:1152]
- 39 -> LifeView FlyTV Platinum Mini [5168:0212,4e42:0212]
+ 38 -> Terratec Cinergy 200 TV [153B:1152]
+ 39 -> LifeView FlyTV Platinum Mini [5168:0212]
40 -> Compro VideoMate TV PVR/FM [185b:c100]
41 -> Compro VideoMate TV Gold+ [185b:c100]
42 -> Sabrent SBT-TVFM (saa7130)
@@ -46,7 +46,7 @@
45 -> Avermedia AVerTV Studio 307 [1461:9715]
46 -> AVerMedia Cardbus TV/Radio (E500) [1461:d6ee]
47 -> Terratec Cinergy 400 mobile [153b:1162]
- 48 -> Terratec Cinergy 600 TV MK3 [153b:1158]
+ 48 -> Terratec Cinergy 600 TV MK3 [153B:1158]
49 -> Compro VideoMate Gold+ Pal [185b:c200]
50 -> Pinnacle PCTV 300i DVB-T + PAL [11bd:002d]
51 -> ProVideo PV952 [1540:9524]
@@ -56,27 +56,12 @@
55 -> LifeView FlyDVB-T DUO [5168:0502,5168:0306]
56 -> Avermedia AVerTV 307 [1461:a70a]
57 -> Avermedia AVerTV GO 007 FM [1461:f31f]
- 58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0370,1421:1370]
+ 58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0370]
59 -> Kworld/Tevion V-Stream Xpert TV PVR7134
60 -> Typhoon DVB-T Duo Digital/Analog Cardbus [4e42:0502]
61 -> Philips TOUGH DVB-T reference design [1131:2004]
62 -> Compro VideoMate TV Gold+II
63 -> Kworld Xpert TV PVR7134
- 64 -> FlyTV mini Asus Digimatrix [1043:0210]
+ 64 -> FlyTV mini Asus Digimatrix [1043:0210,1043:0210]
65 -> V-Stream Studio TV Terminator
66 -> Yuan TUN-900 (saa7135)
- 67 -> Beholder BeholdTV 409 FM [0000:4091]
- 68 -> GoTView 7135 PCI [5456:7135]
- 69 -> Philips EUROPA V3 reference design [1131:2004]
- 70 -> Compro Videomate DVB-T300 [185b:c900]
- 71 -> Compro Videomate DVB-T200 [185b:c901]
- 72 -> RTD Embedded Technologies VFG7350 [1435:7350]
- 73 -> RTD Embedded Technologies VFG7330 [1435:7330]
- 74 -> LifeView FlyTV Platinum Mini2 [14c0:1212]
- 75 -> AVerMedia AVerTVHD MCE A180 [1461:1044]
- 76 -> SKNet MonsterTV Mobile [1131:4ee9]
- 77 -> Pinnacle PCTV 110i (saa7133) [11bd:002e]
- 78 -> ASUSTeK P7131 Dual [1043:4862]
- 79 -> Sedna/MuchTV PC TV Cardbus TV/Radio (ITO25 Rev:2B)
- 80 -> ASUS Digimatrix TV [1043:0210]
- 81 -> Philips Tiger reference design [1131:2018]
diff --git a/trunk/Documentation/video4linux/CARDLIST.tuner b/trunk/Documentation/video4linux/CARDLIST.tuner
index ec840ca6f455..f5876be658a6 100644
--- a/trunk/Documentation/video4linux/CARDLIST.tuner
+++ b/trunk/Documentation/video4linux/CARDLIST.tuner
@@ -53,7 +53,7 @@ tuner=51 - Philips PAL/SECAM_D (FM 1256 I-H3)
tuner=52 - Thomson DDT 7610 (ATSC/NTSC)
tuner=53 - Philips FQ1286
tuner=54 - tda8290+75
-tuner=55 - TCL 2002MB
+tuner=55 - LG PAL (TAPE series)
tuner=56 - Philips PAL/SECAM multi (FQ1216AME MK4)
tuner=57 - Philips FQ1236A MK4
tuner=58 - Ymec TVision TVF-8531MF/8831MF/8731MF
@@ -65,5 +65,3 @@ tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner
tuner=64 - LG TDVS-H062F/TUA6034
tuner=65 - Ymec TVF66T5-B/DFF
tuner=66 - LG NTSC (TALN mini series)
-tuner=67 - Philips TD1316 Hybrid Tuner
-tuner=68 - Philips TUV1236D ATSC/NTSC dual in
diff --git a/trunk/Documentation/video4linux/README.cx88 b/trunk/Documentation/video4linux/README.cx88
index 06a33a4f52fd..897ab834839a 100644
--- a/trunk/Documentation/video4linux/README.cx88
+++ b/trunk/Documentation/video4linux/README.cx88
@@ -17,9 +17,9 @@ audio
- The chip specs for the on-chip TV sound decoder are next
to useless :-/
- Neverless the builtin TV sound decoder starts working now,
- at least for PAL-BG. Other TV norms need other code ...
- FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE
- USING.
+ at least for PAL-BG. Other TV norms need other code ...
+ FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE
+ USING.
- Most tuner chips do provide mono sound, which may or may not
be useable depending on the board design. With the Hauppauge
cards it works, so there is mono sound available as fallback.
@@ -65,5 +65,5 @@ Have fun,
Gerd
---
+--
Gerd Knorr [SuSE Labs]
diff --git a/trunk/Documentation/video4linux/README.saa7134 b/trunk/Documentation/video4linux/README.saa7134
index b911f0871874..1f788e498eff 100644
--- a/trunk/Documentation/video4linux/README.saa7134
+++ b/trunk/Documentation/video4linux/README.saa7134
@@ -78,5 +78,5 @@ Have fun,
Gerd
---
+--
Gerd Knorr [SuSE Labs]
diff --git a/trunk/Documentation/video4linux/bttv/Cards b/trunk/Documentation/video4linux/bttv/Cards
index d3389655ad96..8f1941ede4da 100644
--- a/trunk/Documentation/video4linux/bttv/Cards
+++ b/trunk/Documentation/video4linux/bttv/Cards
@@ -149,11 +149,11 @@ Lifeview Flyvideo Series:
2) There is a print on the PCB:
LR25 = Flyvideo (Zoran ZR36120, SAA7110A)
LR26 Rev.N = Flyvideo II (Bt848)
- Rev.O = Flyvideo II (Bt878)
+ Rev.O = Flyvideo II (Bt878)
LR37 Rev.C = Flyvideo EZ (Capture only, ZR36120 + SAA7110)
LR38 Rev.A1= Flyvideo II EZ (Bt848 capture only)
LR50 Rev.Q = Flyvideo 98 (w/eeprom and PCI subsystem ID)
- Rev.W = Flyvideo 98 (no eeprom)
+ Rev.W = Flyvideo 98 (no eeprom)
LR51 Rev.E = Flyvideo 98 EZ (capture only)
LR90 = Flyvideo 2000 (Bt878)
Flyvideo 2000S (Bt878) w/Stereo TV (Package incl. LR91 daughterboard)
@@ -163,7 +163,7 @@ Lifeview Flyvideo Series:
LR136 = Flyvideo 2100/3100 (Low profile, SAA7130/SAA7134)
LR137 = Flyvideo DV2000/DV3000 (SAA7130/SAA7134 + IEEE1394)
LR138 Rev.C= Flyvideo 2000 (SAA7130)
- or Flyvideo 3000 (SAA7134) w/Stereo TV
+ or Flyvideo 3000 (SAA7134) w/Stereo TV
These exist in variations w/FM and w/Remote sometimes denoted
by suffixes "FM" and "R".
3) You have a laptop (miniPCI card):
@@ -197,7 +197,7 @@ Typhoon TV card series:
50680 "TV Tuner Pal BG" (blue package)= Pixelview PV-BT878P+ (Rev 9B)
50681 "TV Tuner PCI Pal I" (variant of 50680)
50682 "TView TV/FM Tuner Pal BG" = Flyvideo 98FM (LR50 Rev.Q)
- Note: The package has a picture of CPH05x (which would be a real TView)
+ Note: The package has a picture of CPH05x (which would be a real TView)
50683 "TV Tuner PCI SECAM" (variant of 50680)
50684 "TV Tuner Pal BG" = Pixelview 878TV(Rev.3D)
50686 "TV Tuner" = KNC1 TV Station
@@ -418,9 +418,9 @@ Lifetec/Medion/Tevion/Aldi
--------------------------
LT9306/MD9306 = CPH061
LT9415/MD9415 = LR90 Rev.F or Rev.G
- MD9592 = Avermedia TVphone98 (PCI_ID=1461:0003), PCB-Rev=M168II-B (w/TDA9873H)
- MD9717 = KNC One (Rev D4, saa7134, FM1216 MK2 tuner)
- MD5044 = KNC One (Rev D4, saa7134, FM1216ME MK3 tuner)
+ MD9592 = Avermedia TVphone98 (PCI_ID=1461:0003), PCB-Rev=M168II-B (w/TDA9873H)
+ MD9717 = KNC One (Rev D4, saa7134, FM1216 MK2 tuner)
+ MD5044 = KNC One (Rev D4, saa7134, FM1216ME MK3 tuner)
Modular Technologies (www.modulartech.com) UK
---------------------------------------------
@@ -453,10 +453,10 @@ Technisat
Discos ADR PC-Karte ISA (no TV!)
Discos ADR PC-Karte PCI (probably no TV?)
Techni-PC-Sat (Sat. analog)
- Rev 1.2 (zr36120, vpx3220, stv0030, saa5246, BSJE3-494A)
+ Rev 1.2 (zr36120, vpx3220, stv0030, saa5246, BSJE3-494A)
Mediafocus I (zr36120/zr36125, drp3510, Sat. analog + ADR Radio)
Mediafocus II (saa7146, Sat. analog)
- SatADR Rev 2.1 (saa7146a, saa7113h, stv0056a, msp3400c, drp3510a, BSKE3-307A)
+ SatADR Rev 2.1 (saa7146a, saa7113h, stv0056a, msp3400c, drp3510a, BSKE3-307A)
SkyStar 1 DVB (AV7110) = Technotrend Premium
SkyStar 2 DVB (B2C2) (=Sky2PC)
diff --git a/trunk/Documentation/video4linux/bttv/README b/trunk/Documentation/video4linux/bttv/README
index 7ca2154c2bf5..a72f4c94fb0b 100644
--- a/trunk/Documentation/video4linux/bttv/README
+++ b/trunk/Documentation/video4linux/bttv/README
@@ -42,9 +42,9 @@ bttv uses the PCI Subsystem ID to autodetect the card type. lspci lists
the Subsystem ID in the second line, looks like this:
00:0a.0 Multimedia video controller: Brooktree Corporation Bt878 (rev 02)
- Subsystem: Hauppauge computer works Inc. WinTV/GO
- Flags: bus master, medium devsel, latency 32, IRQ 5
- Memory at e2000000 (32-bit, prefetchable) [size=4K]
+ Subsystem: Hauppauge computer works Inc. WinTV/GO
+ Flags: bus master, medium devsel, latency 32, IRQ 5
+ Memory at e2000000 (32-bit, prefetchable) [size=4K]
only bt878-based cards can have a subsystem ID (which does not mean
that every card really has one). bt848 cards can't have a Subsystem
diff --git a/trunk/Documentation/video4linux/bttv/README.freeze b/trunk/Documentation/video4linux/bttv/README.freeze
index 4259dccc8287..51f8d4379a94 100644
--- a/trunk/Documentation/video4linux/bttv/README.freeze
+++ b/trunk/Documentation/video4linux/bttv/README.freeze
@@ -27,9 +27,9 @@ information out of a register+stack dump printed by the kernel on
protection faults (so-called "kernel oops").
If you run into some kind of deadlock, you can try to dump a call trace
-for each process using sysrq-t (see Documentation/sysrq.txt).
-This way it is possible to figure where *exactly* some process in "D"
-state is stuck.
+for each process using sysrq-t (see Documentation/sysrq.txt). ksymoops
+will translate these dumps into kernel symbols too. This way it is
+possible to figure where *exactly* some process in "D" state is stuck.
I've seen reports that bttv 0.7.x crashes whereas 0.8.x works rock solid
for some people. Thus probably a small buglet left somewhere in bttv
diff --git a/trunk/Documentation/video4linux/bttv/Sound-FAQ b/trunk/Documentation/video4linux/bttv/Sound-FAQ
index 1e6328f91083..b8c9c2605ce2 100644
--- a/trunk/Documentation/video4linux/bttv/Sound-FAQ
+++ b/trunk/Documentation/video4linux/bttv/Sound-FAQ
@@ -61,8 +61,8 @@ line for your board. The important fields are these two:
struct tvcard
{
[ ... ]
- u32 gpiomask;
- u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
+ u32 gpiomask;
+ u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
};
gpiomask specifies which pins are used to control the audio mux chip.
@@ -126,11 +126,11 @@ muxsel - video mux, input->registervalue mapping
pll - same as pll= insmod option
tuner_type - same as tuner= insmod option
*_modulename - hint whenever some card needs this or that audio
- module loaded to work properly.
+ module loaded to work properly.
has_radio - whenever this TV card has a radio tuner.
no_msp34xx - "1" disables loading of msp3400.o module
-no_tda9875 - "1" disables loading of tda9875.o module
-needs_tvaudio - set to "1" to load tvaudio.o module
+no_tda9875 - "1" disables loading of tda9875.o module
+needs_tvaudio - set to "1" to load tvaudio.o module
If some config item is specified both from the tvcards array and as
insmod option, the insmod option takes precedence.
@@ -144,5 +144,5 @@ Good luck,
PS: If you have a new working entry, mail it to me.
---
+--
Gerd Knorr
diff --git a/trunk/Documentation/video4linux/bttv/Tuners b/trunk/Documentation/video4linux/bttv/Tuners
index 0a371d349542..d18fbc70c0e0 100644
--- a/trunk/Documentation/video4linux/bttv/Tuners
+++ b/trunk/Documentation/video4linux/bttv/Tuners
@@ -21,7 +21,7 @@ SAMSUNG Tuner identification: (e.g. TCPM9091PD27)
J= NTSC-Japan
L= Secam LL
M= BG+I+DK
- N= NTSC
+ N= NTSC
Q= BG+I+DK+LL
[89]: ?
[125]:
@@ -96,7 +96,7 @@ LG Innotek Tuner:
TADC-H002F: NTSC (L,175/410?; 2-B, C-W+11, W+12-69)
TADC-M201D: PAL D/K+B/G+I (L,143/425) (sound control at I2C address 0xc8)
TADC-T003F: NTSC Taiwan (L,175/410?; 2-B, C-W+11, W+12-69)
- Suffix:
+ Suffix:
P= Standard phono female socket
D= IEC female socket
F= F-connector
diff --git a/trunk/Documentation/video4linux/lifeview.txt b/trunk/Documentation/video4linux/lifeview.txt
index 05f9eb57aac9..b07ea79c2b7e 100644
--- a/trunk/Documentation/video4linux/lifeview.txt
+++ b/trunk/Documentation/video4linux/lifeview.txt
@@ -10,33 +10,33 @@ bt878:
------------------------------------------------------------------------------
saa7134:
- /* LifeView FlyTV Platinum FM (LR214WF) */
- /* "Peter Missel */
- .name = "LifeView FlyTV Platinum FM",
- /* GP27 MDT2005 PB4 pin 10 */
- /* GP26 MDT2005 PB3 pin 9 */
- /* GP25 MDT2005 PB2 pin 8 */
- /* GP23 MDT2005 PB1 pin 7 */
- /* GP22 MDT2005 PB0 pin 6 */
- /* GP21 MDT2005 PB5 pin 11 */
- /* GP20 MDT2005 PB6 pin 12 */
- /* GP19 MDT2005 PB7 pin 13 */
- /* nc MDT2005 PA3 pin 2 */
- /* Remote MDT2005 PA2 pin 1 */
- /* GP18 MDT2005 PA1 pin 18 */
- /* nc MDT2005 PA0 pin 17 strap low */
+ /* LifeView FlyTV Platinum FM (LR214WF) */
+ /* "Peter Missel */
+ .name = "LifeView FlyTV Platinum FM",
+ /* GP27 MDT2005 PB4 pin 10 */
+ /* GP26 MDT2005 PB3 pin 9 */
+ /* GP25 MDT2005 PB2 pin 8 */
+ /* GP23 MDT2005 PB1 pin 7 */
+ /* GP22 MDT2005 PB0 pin 6 */
+ /* GP21 MDT2005 PB5 pin 11 */
+ /* GP20 MDT2005 PB6 pin 12 */
+ /* GP19 MDT2005 PB7 pin 13 */
+ /* nc MDT2005 PA3 pin 2 */
+ /* Remote MDT2005 PA2 pin 1 */
+ /* GP18 MDT2005 PA1 pin 18 */
+ /* nc MDT2005 PA0 pin 17 strap low */
- /* GP17 Strap "GP7"=High */
- /* GP16 Strap "GP6"=High
- 0=Radio 1=TV
- Drives SA630D ENCH1 and HEF4052 A1 pins
- to do FM radio through SIF input */
- /* GP15 nc */
- /* GP14 nc */
- /* GP13 nc */
- /* GP12 Strap "GP5" = High */
- /* GP11 Strap "GP4" = High */
- /* GP10 Strap "GP3" = High */
- /* GP09 Strap "GP2" = Low */
- /* GP08 Strap "GP1" = Low */
- /* GP07.00 nc */
+ /* GP17 Strap "GP7"=High */
+ /* GP16 Strap "GP6"=High
+ 0=Radio 1=TV
+ Drives SA630D ENCH1 and HEF4052 A1 pins
+ to do FM radio through SIF input */
+ /* GP15 nc */
+ /* GP14 nc */
+ /* GP13 nc */
+ /* GP12 Strap "GP5" = High */
+ /* GP11 Strap "GP4" = High */
+ /* GP10 Strap "GP3" = High */
+ /* GP09 Strap "GP2" = Low */
+ /* GP08 Strap "GP1" = Low */
+ /* GP07.00 nc */
diff --git a/trunk/Documentation/vm/hugetlbpage.txt b/trunk/Documentation/vm/hugetlbpage.txt
index 1ad9af1ca4d0..1b9bcd1fe98b 100644
--- a/trunk/Documentation/vm/hugetlbpage.txt
+++ b/trunk/Documentation/vm/hugetlbpage.txt
@@ -13,13 +13,12 @@ This optimization is more critical now as bigger and bigger physical memories
Users can use the huge page support in Linux kernel by either using the mmap
system call or standard SYSv shared memory system calls (shmget, shmat).
-First the Linux kernel needs to be built with the CONFIG_HUGETLBFS
-(present under "File systems") and CONFIG_HUGETLB_PAGE (selected
-automatically when CONFIG_HUGETLBFS is selected) configuration
-options.
+First the Linux kernel needs to be built with CONFIG_HUGETLB_PAGE (present
+under Processor types and feature) and CONFIG_HUGETLBFS (present under file
+system option on config menu) config options.
The kernel built with hugepage support should show the number of configured
-hugepages in the system by running the "cat /proc/meminfo" command.
+hugepages in the system by running the "cat /proc/meminfo" command.
/proc/meminfo also provides information about the total number of hugetlb
pages configured in the kernel. It also displays information about the
@@ -39,19 +38,19 @@ in the kernel.
/proc/sys/vm/nr_hugepages indicates the current number of configured hugetlb
pages in the kernel. Super user can dynamically request more (or free some
-pre-configured) hugepages.
-The allocation (or deallocation) of hugetlb pages is possible only if there are
+pre-configured) hugepages.
+The allocation( or deallocation) of hugetlb pages is posible only if there are
enough physically contiguous free pages in system (freeing of hugepages is
-possible only if there are enough hugetlb pages free that can be transfered
+possible only if there are enough hugetlb pages free that can be transfered
back to regular memory pool).
Pages that are used as hugetlb pages are reserved inside the kernel and can
-not be used for other purposes.
+not be used for other purposes.
Once the kernel with Hugetlb page support is built and running, a user can
use either the mmap system call or shared memory system calls to start using
the huge pages. It is required that the system administrator preallocate
-enough memory for huge page purposes.
+enough memory for huge page purposes.
Use the following command to dynamically allocate/deallocate hugepages:
@@ -81,9 +80,9 @@ memory (huge pages) allowed for that filesystem (/mnt/huge). The size is
rounded down to HPAGE_SIZE. The option nr_inode sets the maximum number of
inodes that /mnt/huge can use. If the size or nr_inode options are not
provided on command line then no limits are set. For size and nr_inodes
-options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For
-example, size=2K has the same meaning as size=2048. An example is given at
-the end of this document.
+options, you can use [G|g]/[M|m]/[K|k] to represent giga/mega/kilo. For
+example, size=2K has the same meaning as size=2048. An example is given at
+the end of this document.
read and write system calls are not supported on files that reside on hugetlb
file systems.
diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS
index 995bfd8e6e7f..d57c491212b1 100644
--- a/trunk/MAINTAINERS
+++ b/trunk/MAINTAINERS
@@ -1077,26 +1077,6 @@ P: Jaroslav Kysela
M: perex@suse.cz
S: Maintained
-HPET: High Precision Event Timers driver (hpet.c)
-P: Clemens Ladisch
-M: clemens@ladisch.de
-S: Maintained
-
-HPET: i386
-P: Venkatesh Pallipadi (Venki)
-M: venkatesh.pallipadi@intel.com
-S: Maintained
-
-HPET: x86_64
-P: Andi Kleen and Vojtech Pavlik
-M: ak@muc.de and vojtech@suse.cz
-S: Maintained
-
-HPET: ACPI hpet.c
-P: Bob Picco
-M: bob.picco@hp.com
-S: Maintained
-
HPFS FILESYSTEM
P: Mikulas Patocka
M: mikulas@artax.karlin.mff.cuni.cz
@@ -2071,12 +2051,6 @@ P: Matt Mackall
M: mpm@selenic.com
S: Maintained
-RAPIDIO SUBSYSTEM
-P: Matt Porter
-M: mporter@kernel.crashing.org
-L: linux-kernel@vger.kernel.org
-S: Maintained
-
REAL TIME CLOCK DRIVER
P: Paul Gortmaker
M: p_gortmaker@yahoo.com
@@ -2481,10 +2455,10 @@ L: linux-kernel@vger.kernel.org
S: Maintained
TRIVIAL PATCHES
-P: Adrian Bunk
-M: trivial@kernel.org
+P: Rusty Russell
+M: trivial@rustcorp.com.au
L: linux-kernel@vger.kernel.org
-W: http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/
+W: http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
S: Maintained
TMS380 TOKEN-RING NETWORK DRIVER
diff --git a/trunk/Makefile b/trunk/Makefile
index ea96da1572d5..2dac8010c142 100644
--- a/trunk/Makefile
+++ b/trunk/Makefile
@@ -583,7 +583,7 @@ export MODLIB
ifeq ($(KBUILD_EXTMOD),)
-core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
+core-y += kernel/ mm/ fs/ ipc/ security/ crypto/
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
diff --git a/trunk/arch/alpha/kernel/process.c b/trunk/arch/alpha/kernel/process.c
index a8682612abc0..eb20c3afff58 100644
--- a/trunk/arch/alpha/kernel/process.c
+++ b/trunk/arch/alpha/kernel/process.c
@@ -43,17 +43,21 @@
#include "proto.h"
#include "pci_impl.h"
+void default_idle(void)
+{
+ barrier();
+}
+
void
cpu_idle(void)
{
- set_thread_flag(TIF_POLLING_NRFLAG);
-
while (1) {
+ void (*idle)(void) = default_idle;
/* FIXME -- EV6 and LCA45 know how to power down
the CPU. */
while (!need_resched())
- cpu_relax();
+ idle();
schedule();
}
}
diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig
index 3bfef0934c9d..296bc03d1cf1 100644
--- a/trunk/arch/arm/Kconfig
+++ b/trunk/arch/arm/Kconfig
@@ -324,7 +324,7 @@ menu "Kernel Features"
config SMP
bool "Symmetric Multi-Processing (EXPERIMENTAL)"
- depends on EXPERIMENTAL && REALVIEW_MPCORE
+ depends on EXPERIMENTAL && BROKEN #&& n
help
This enables support for systems with more than one CPU. If you have
a system with only one CPU, like most personal computers, say N. If
@@ -356,16 +356,6 @@ config HOTPLUG_CPU
Say Y here to experiment with turning CPUs off and on. CPUs
can be controlled through /sys/devices/system/cpu.
-config LOCAL_TIMERS
- bool "Use local timer interrupts"
- depends on SMP && n
- default y
- help
- Enable support for local timers on SMP platforms, rather then the
- legacy IPI broadcast method. Local timers allows the system
- accounting to be spread across the timer interval, preventing a
- "thundering herd" at every timer tick.
-
config PREEMPT
bool "Preemptible Kernel (EXPERIMENTAL)"
depends on EXPERIMENTAL
@@ -595,7 +585,7 @@ config FPE_NWFPE
config FPE_NWFPE_XP
bool "Support extended precision"
- depends on FPE_NWFPE
+ depends on FPE_NWFPE && !CPU_BIG_ENDIAN
help
Say Y to include 80-bit support in the kernel floating-point
emulator. Otherwise, only 32 and 64-bit support is compiled in.
diff --git a/trunk/arch/arm/boot/compressed/misc.c b/trunk/arch/arm/boot/compressed/misc.c
index 5ab94584baee..50f13eec6cd7 100644
--- a/trunk/arch/arm/boot/compressed/misc.c
+++ b/trunk/arch/arm/boot/compressed/misc.c
@@ -283,14 +283,8 @@ void flush_window(void)
putstr(".");
}
-#ifndef arch_error
-#define arch_error(x)
-#endif
-
static void error(char *x)
{
- arch_error(x);
-
putstr("\n\n");
putstr(x);
putstr("\n\n -- System halted");
diff --git a/trunk/arch/arm/common/scoop.c b/trunk/arch/arm/common/scoop.c
index c7fdf390cef9..bb4eff614413 100644
--- a/trunk/arch/arm/common/scoop.c
+++ b/trunk/arch/arm/common/scoop.c
@@ -19,6 +19,12 @@
#define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr)))
+/* PCMCIA to Scoop linkage structures for pxa2xx_sharpsl.c
+ There is no easy way to link multiple scoop devices into one
+ single entity for the pxa2xx_pcmcia device */
+int scoop_num;
+struct scoop_pcmcia_dev *scoop_devs;
+
struct scoop_dev {
void *base;
spinlock_t scoop_lock;
diff --git a/trunk/arch/arm/kernel/armksyms.c b/trunk/arch/arm/kernel/armksyms.c
index 7a3261f0bf79..7b17a87a3311 100644
--- a/trunk/arch/arm/kernel/armksyms.c
+++ b/trunk/arch/arm/kernel/armksyms.c
@@ -9,7 +9,6 @@
*/
#include
#include
-#include
#include
#include
#include
@@ -127,9 +126,6 @@ EXPORT_SYMBOL(__put_user_2);
EXPORT_SYMBOL(__put_user_4);
EXPORT_SYMBOL(__put_user_8);
- /* crypto hash */
-EXPORT_SYMBOL(sha_transform);
-
/* gcc lib functions */
EXPORT_SYMBOL(__ashldi3);
EXPORT_SYMBOL(__ashrdi3);
diff --git a/trunk/arch/arm/kernel/entry-armv.S b/trunk/arch/arm/kernel/entry-armv.S
index d9fb819bf7cc..a511ec5b11a3 100644
--- a/trunk/arch/arm/kernel/entry-armv.S
+++ b/trunk/arch/arm/kernel/entry-armv.S
@@ -47,13 +47,6 @@
movne r0, sp
adrne lr, 1b
bne do_IPI
-
-#ifdef CONFIG_LOCAL_TIMERS
- test_for_ltirq r0, r6, r5, lr
- movne r0, sp
- adrne lr, 1b
- bne do_local_timer
-#endif
#endif
.endm
diff --git a/trunk/arch/arm/kernel/irq.c b/trunk/arch/arm/kernel/irq.c
index d7099dbbb879..9def4404e1f2 100644
--- a/trunk/arch/arm/kernel/irq.c
+++ b/trunk/arch/arm/kernel/irq.c
@@ -264,7 +264,6 @@ int show_interrupts(struct seq_file *p, void *v)
#endif
#ifdef CONFIG_SMP
show_ipi_list(p);
- show_local_irqs(p);
#endif
seq_printf(p, "Err: %10lu\n", irq_err_count);
}
@@ -996,7 +995,7 @@ void __init init_irq_proc(void)
struct proc_dir_entry *dir;
int irq;
- dir = proc_mkdir("irq", NULL);
+ dir = proc_mkdir("irq", 0);
if (!dir)
return;
diff --git a/trunk/arch/arm/kernel/process.c b/trunk/arch/arm/kernel/process.c
index c0f6a119de3b..ba298277becd 100644
--- a/trunk/arch/arm/kernel/process.c
+++ b/trunk/arch/arm/kernel/process.c
@@ -86,16 +86,12 @@ EXPORT_SYMBOL(pm_power_off);
*/
void default_idle(void)
{
- if (hlt_counter)
- cpu_relax();
- else {
- local_irq_disable();
- if (!need_resched()) {
- timer_dyn_reprogram();
- arch_idle();
- }
- local_irq_enable();
+ local_irq_disable();
+ if (!need_resched() && !hlt_counter) {
+ timer_dyn_reprogram();
+ arch_idle();
}
+ local_irq_enable();
}
/*
@@ -120,13 +116,13 @@ void cpu_idle(void)
if (!idle)
idle = default_idle;
+ preempt_disable();
leds_event(led_idle_start);
while (!need_resched())
idle();
leds_event(led_idle_end);
- preempt_enable_no_resched();
+ preempt_enable();
schedule();
- preempt_disable();
}
}
diff --git a/trunk/arch/arm/kernel/ptrace.c b/trunk/arch/arm/kernel/ptrace.c
index 9a340e790da5..9bd8609a2926 100644
--- a/trunk/arch/arm/kernel/ptrace.c
+++ b/trunk/arch/arm/kernel/ptrace.c
@@ -648,7 +648,7 @@ static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp)
#endif
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+static int do_ptrace(int request, struct task_struct *child, long addr, long data)
{
unsigned long tmp;
int ret;
@@ -782,6 +782,53 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
return ret;
}
+asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
+{
+ struct task_struct *child;
+ int ret;
+
+ lock_kernel();
+ ret = -EPERM;
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+ ret = security_ptrace(current->parent, current);
+ if (ret)
+ goto out;
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+ if (child)
+ get_task_struct(child);
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret == 0)
+ ret = do_ptrace(request, child, addr, data);
+
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
+ return ret;
+}
+
asmlinkage void syscall_trace(int why, struct pt_regs *regs)
{
unsigned long ip;
diff --git a/trunk/arch/arm/kernel/smp.c b/trunk/arch/arm/kernel/smp.c
index e55ea952f7aa..edb5a406922f 100644
--- a/trunk/arch/arm/kernel/smp.c
+++ b/trunk/arch/arm/kernel/smp.c
@@ -142,7 +142,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
ret = -EIO;
}
- secondary_data.stack = NULL;
+ secondary_data.stack = 0;
secondary_data.pgdir = 0;
*pmd_offset(pgd, PHYS_OFFSET) = __pmd(0);
@@ -184,11 +184,6 @@ int __cpuexit __cpu_disable(void)
*/
migrate_irqs();
- /*
- * Stop the local timer for this CPU.
- */
- local_timer_stop(cpu);
-
/*
* Flush user cache and TLB mappings, and then remove this CPU
* from the vm mask set of all processes.
@@ -256,9 +251,7 @@ void __cpuexit cpu_die(void)
asmlinkage void __cpuinit secondary_start_kernel(void)
{
struct mm_struct *mm = &init_mm;
- unsigned int cpu;
-
- cpu = smp_processor_id();
+ unsigned int cpu = smp_processor_id();
printk("CPU%u: Booted secondary processor\n", cpu);
@@ -275,7 +268,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
local_flush_tlb_all();
cpu_init();
- preempt_disable();
/*
* Give the platform a chance to do its own initialisation.
@@ -297,11 +289,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
*/
cpu_set(cpu, cpu_online_map);
- /*
- * Setup local timer for this CPU.
- */
- local_timer_setup(cpu);
-
/*
* OK, it's off to the idle thread for us
*/
@@ -372,8 +359,8 @@ static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
* You must not call this function with disabled interrupts, from a
* hardware interrupt handler, nor from a bottom half handler.
*/
-static int smp_call_function_on_cpu(void (*func)(void *info), void *info,
- int retry, int wait, cpumask_t callmap)
+int smp_call_function_on_cpu(void (*func)(void *info), void *info, int retry,
+ int wait, cpumask_t callmap)
{
struct smp_call_struct data;
unsigned long timeout;
@@ -467,18 +454,6 @@ void show_ipi_list(struct seq_file *p)
seq_putc(p, '\n');
}
-void show_local_irqs(struct seq_file *p)
-{
- unsigned int cpu;
-
- seq_printf(p, "LOC: ");
-
- for_each_present_cpu(cpu)
- seq_printf(p, "%10u ", irq_stat[cpu].local_timer_irqs);
-
- seq_putc(p, '\n');
-}
-
static void ipi_timer(struct pt_regs *regs)
{
int user = user_mode(regs);
@@ -489,18 +464,6 @@ static void ipi_timer(struct pt_regs *regs)
irq_exit();
}
-#ifdef CONFIG_LOCAL_TIMERS
-asmlinkage void do_local_timer(struct pt_regs *regs)
-{
- int cpu = smp_processor_id();
-
- if (local_timer_ack()) {
- irq_stat[cpu].local_timer_irqs++;
- ipi_timer(regs);
- }
-}
-#endif
-
/*
* ipi_call_function - handle IPI from smp_call_function()
*
@@ -552,7 +515,7 @@ static void ipi_cpu_stop(unsigned int cpu)
*
* Bit 0 - Inter-processor function call
*/
-asmlinkage void do_IPI(struct pt_regs *regs)
+void do_IPI(struct pt_regs *regs)
{
unsigned int cpu = smp_processor_id();
struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
diff --git a/trunk/arch/arm/mach-aaec2000/clock.c b/trunk/arch/arm/mach-aaec2000/clock.c
index 0340ddc4824e..99e019169dda 100644
--- a/trunk/arch/arm/mach-aaec2000/clock.c
+++ b/trunk/arch/arm/mach-aaec2000/clock.c
@@ -14,7 +14,6 @@
#include
#include
#include
-#include
#include
#include
diff --git a/trunk/arch/arm/mach-epxa10db/mm.c b/trunk/arch/arm/mach-epxa10db/mm.c
index cfd0d2182d44..e8832d0910ee 100644
--- a/trunk/arch/arm/mach-epxa10db/mm.c
+++ b/trunk/arch/arm/mach-epxa10db/mm.c
@@ -25,7 +25,6 @@
#include
#include
#include
-#include
#include
diff --git a/trunk/arch/arm/mach-integrator/impd1.c b/trunk/arch/arm/mach-integrator/impd1.c
index a4bafee77a06..a1b153d1626c 100644
--- a/trunk/arch/arm/mach-integrator/impd1.c
+++ b/trunk/arch/arm/mach-integrator/impd1.c
@@ -420,7 +420,8 @@ static int impd1_probe(struct lm_device *dev)
free_impd1:
if (impd1 && impd1->base)
iounmap(impd1->base);
- kfree(impd1);
+ if (impd1)
+ kfree(impd1);
release_lm:
release_mem_region(dev->resource.start, SZ_4K);
return ret;
diff --git a/trunk/arch/arm/mach-ixp2000/core.c b/trunk/arch/arm/mach-ixp2000/core.c
index 6851abaf5524..df140962bb0f 100644
--- a/trunk/arch/arm/mach-ixp2000/core.c
+++ b/trunk/arch/arm/mach-ixp2000/core.c
@@ -84,54 +84,63 @@ static struct map_desc ixp2000_io_desc[] __initdata = {
.virtual = IXP2000_CAP_VIRT_BASE,
.pfn = __phys_to_pfn(IXP2000_CAP_PHYS_BASE),
.length = IXP2000_CAP_SIZE,
- .type = MT_IXP2000_DEVICE,
+ .type = MT_DEVICE
}, {
.virtual = IXP2000_INTCTL_VIRT_BASE,
.pfn = __phys_to_pfn(IXP2000_INTCTL_PHYS_BASE),
.length = IXP2000_INTCTL_SIZE,
- .type = MT_IXP2000_DEVICE,
+ .type = MT_DEVICE
}, {
.virtual = IXP2000_PCI_CREG_VIRT_BASE,
.pfn = __phys_to_pfn(IXP2000_PCI_CREG_PHYS_BASE),
.length = IXP2000_PCI_CREG_SIZE,
- .type = MT_IXP2000_DEVICE,
+ .type = MT_DEVICE
}, {
.virtual = IXP2000_PCI_CSR_VIRT_BASE,
.pfn = __phys_to_pfn(IXP2000_PCI_CSR_PHYS_BASE),
.length = IXP2000_PCI_CSR_SIZE,
- .type = MT_IXP2000_DEVICE,
+ .type = MT_DEVICE
}, {
.virtual = IXP2000_MSF_VIRT_BASE,
.pfn = __phys_to_pfn(IXP2000_MSF_PHYS_BASE),
.length = IXP2000_MSF_SIZE,
- .type = MT_IXP2000_DEVICE,
+ .type = MT_DEVICE
}, {
.virtual = IXP2000_PCI_IO_VIRT_BASE,
.pfn = __phys_to_pfn(IXP2000_PCI_IO_PHYS_BASE),
.length = IXP2000_PCI_IO_SIZE,
- .type = MT_IXP2000_DEVICE,
+ .type = MT_DEVICE
}, {
.virtual = IXP2000_PCI_CFG0_VIRT_BASE,
.pfn = __phys_to_pfn(IXP2000_PCI_CFG0_PHYS_BASE),
.length = IXP2000_PCI_CFG0_SIZE,
- .type = MT_IXP2000_DEVICE,
+ .type = MT_DEVICE
}, {
.virtual = IXP2000_PCI_CFG1_VIRT_BASE,
.pfn = __phys_to_pfn(IXP2000_PCI_CFG1_PHYS_BASE),
.length = IXP2000_PCI_CFG1_SIZE,
- .type = MT_IXP2000_DEVICE,
+ .type = MT_DEVICE
}
};
void __init ixp2000_map_io(void)
{
+ extern unsigned int processor_id;
+
/*
- * On IXP2400 CPUs we need to use MT_IXP2000_DEVICE so that
- * XCB=101 (to avoid triggering erratum #66), and given that
- * this mode speeds up I/O accesses and we have write buffer
- * flushes in the right places anyway, it doesn't hurt to use
- * XCB=101 for all IXP2000s.
+ * On IXP2400 CPUs we need to use MT_IXP2000_DEVICE for
+ * tweaking the PMDs so XCB=101. On IXP2800s we use the normal
+ * PMD flags.
*/
+ if ((processor_id & 0xfffffff0) == 0x69054190) {
+ int i;
+
+ printk(KERN_INFO "Enabling IXP2400 erratum #66 workaround\n");
+
+ for(i=0;i
#include
#include
+#include
#include
#include
diff --git a/trunk/arch/arm/mach-pxa/corgi.c b/trunk/arch/arm/mach-pxa/corgi.c
index 100fb31b5156..eb5f6d744a4a 100644
--- a/trunk/arch/arm/mach-pxa/corgi.c
+++ b/trunk/arch/arm/mach-pxa/corgi.c
@@ -62,37 +62,6 @@ static struct scoop_config corgi_scoop_setup = {
.io_out = CORGI_SCOOP_IO_OUT,
};
-struct platform_device corgiscoop_device = {
- .name = "sharp-scoop",
- .id = -1,
- .dev = {
- .platform_data = &corgi_scoop_setup,
- },
- .num_resources = ARRAY_SIZE(corgi_scoop_resources),
- .resource = corgi_scoop_resources,
-};
-
-static void corgi_pcmcia_init(void)
-{
- /* Setup default state of GPIO outputs
- before we enable them as outputs. */
- GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
- GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
- GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) |
- GPIO_bit(GPIO53_nPCE_2);
-
- pxa_gpio_mode(GPIO48_nPOE_MD);
- pxa_gpio_mode(GPIO49_nPWE_MD);
- pxa_gpio_mode(GPIO50_nPIOR_MD);
- pxa_gpio_mode(GPIO51_nPIOW_MD);
- pxa_gpio_mode(GPIO55_nPREG_MD);
- pxa_gpio_mode(GPIO56_nPWAIT_MD);
- pxa_gpio_mode(GPIO57_nIOIS16_MD);
- pxa_gpio_mode(GPIO52_nPCE_1_MD);
- pxa_gpio_mode(GPIO53_nPCE_2_MD);
- pxa_gpio_mode(GPIO54_pSKTSEL_MD);
-}
-
static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = {
{
.dev = &corgiscoop_device.dev,
@@ -102,14 +71,16 @@ static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = {
},
};
-static struct scoop_pcmcia_config corgi_pcmcia_config = {
- .devs = &corgi_pcmcia_scoop[0],
- .num_devs = 1,
- .pcmcia_init = corgi_pcmcia_init,
+struct platform_device corgiscoop_device = {
+ .name = "sharp-scoop",
+ .id = -1,
+ .dev = {
+ .platform_data = &corgi_scoop_setup,
+ },
+ .num_resources = ARRAY_SIZE(corgi_scoop_resources),
+ .resource = corgi_scoop_resources,
};
-EXPORT_SYMBOL(corgiscoop_device);
-
/*
* Corgi SSP Device
@@ -323,7 +294,8 @@ static void __init corgi_init(void)
pxa_set_mci_info(&corgi_mci_platform_data);
pxa_set_ficp_info(&corgi_ficp_platform_data);
- platform_scoop_config = &corgi_pcmcia_config;
+ scoop_num = 1;
+ scoop_devs = &corgi_pcmcia_scoop[0];
platform_add_devices(devices, ARRAY_SIZE(devices));
}
diff --git a/trunk/arch/arm/mach-pxa/corgi_lcd.c b/trunk/arch/arm/mach-pxa/corgi_lcd.c
index 698eb06545c4..54162ba95414 100644
--- a/trunk/arch/arm/mach-pxa/corgi_lcd.c
+++ b/trunk/arch/arm/mach-pxa/corgi_lcd.c
@@ -19,7 +19,6 @@
#include
#include
#include
-#include
#include
#include
#include
diff --git a/trunk/arch/arm/mach-pxa/poodle.c b/trunk/arch/arm/mach-pxa/poodle.c
index eef3de26ad37..ad6a13f95a62 100644
--- a/trunk/arch/arm/mach-pxa/poodle.c
+++ b/trunk/arch/arm/mach-pxa/poodle.c
@@ -65,27 +65,6 @@ struct platform_device poodle_scoop_device = {
.resource = poodle_scoop_resources,
};
-static void poodle_pcmcia_init(void)
-{
- /* Setup default state of GPIO outputs
- before we enable them as outputs. */
- GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
- GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
- GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) |
- GPIO_bit(GPIO53_nPCE_2);
-
- pxa_gpio_mode(GPIO48_nPOE_MD);
- pxa_gpio_mode(GPIO49_nPWE_MD);
- pxa_gpio_mode(GPIO50_nPIOR_MD);
- pxa_gpio_mode(GPIO51_nPIOW_MD);
- pxa_gpio_mode(GPIO55_nPREG_MD);
- pxa_gpio_mode(GPIO56_nPWAIT_MD);
- pxa_gpio_mode(GPIO57_nIOIS16_MD);
- pxa_gpio_mode(GPIO52_nPCE_1_MD);
- pxa_gpio_mode(GPIO53_nPCE_2_MD);
- pxa_gpio_mode(GPIO54_pSKTSEL_MD);
-}
-
static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = {
{
.dev = &poodle_scoop_device.dev,
@@ -95,14 +74,6 @@ static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = {
},
};
-static struct scoop_pcmcia_config poodle_pcmcia_config = {
- .devs = &poodle_pcmcia_scoop[0],
- .num_devs = 1,
- .pcmcia_init = poodle_pcmcia_init,
-};
-
-EXPORT_SYMBOL(poodle_scoop_device);
-
/* LoCoMo device */
static struct resource locomo_resources[] = {
@@ -297,7 +268,8 @@ static void __init poodle_init(void)
pxa_set_mci_info(&poodle_mci_platform_data);
pxa_set_ficp_info(&poodle_ficp_platform_data);
- platform_scoop_config = &poodle_pcmcia_config;
+ scoop_num = 1;
+ scoop_devs = &poodle_pcmcia_scoop[0];
ret = platform_add_devices(devices, ARRAY_SIZE(devices));
if (ret) {
diff --git a/trunk/arch/arm/mach-pxa/spitz.c b/trunk/arch/arm/mach-pxa/spitz.c
index 4e9a699ee428..6c6878cd2207 100644
--- a/trunk/arch/arm/mach-pxa/spitz.c
+++ b/trunk/arch/arm/mach-pxa/spitz.c
@@ -104,66 +104,6 @@ struct platform_device spitzscoop2_device = {
.resource = spitz_scoop2_resources,
};
-#define SPITZ_PWR_SD 0x01
-#define SPITZ_PWR_CF 0x02
-
-/* Power control is shared with between one of the CF slots and SD */
-static void spitz_card_pwr_ctrl(int device, unsigned short new_cpr)
-{
- unsigned short cpr = read_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR);
-
- if (new_cpr & 0x0007) {
- set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER);
- if (!(cpr & 0x0002) && !(cpr & 0x0004))
- mdelay(5);
- if (device == SPITZ_PWR_CF)
- cpr |= 0x0002;
- if (device == SPITZ_PWR_SD)
- cpr |= 0x0004;
- write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr);
- } else {
- if (device == SPITZ_PWR_CF)
- cpr &= ~0x0002;
- if (device == SPITZ_PWR_SD)
- cpr &= ~0x0004;
- write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr);
- if (!(cpr & 0x0002) && !(cpr & 0x0004)) {
- mdelay(1);
- reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER);
- }
- }
-}
-
-static void spitz_pcmcia_init(void)
-{
- /* Setup default state of GPIO outputs
- before we enable them as outputs. */
- GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
- GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
- GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO54_nPCE_2);
- GPSR(GPIO85_nPCE_1) = GPIO_bit(GPIO85_nPCE_1);
-
- pxa_gpio_mode(GPIO48_nPOE_MD);
- pxa_gpio_mode(GPIO49_nPWE_MD);
- pxa_gpio_mode(GPIO50_nPIOR_MD);
- pxa_gpio_mode(GPIO51_nPIOW_MD);
- pxa_gpio_mode(GPIO55_nPREG_MD);
- pxa_gpio_mode(GPIO56_nPWAIT_MD);
- pxa_gpio_mode(GPIO57_nIOIS16_MD);
- pxa_gpio_mode(GPIO85_nPCE_1_MD);
- pxa_gpio_mode(GPIO54_nPCE_2_MD);
- pxa_gpio_mode(GPIO104_pSKTSEL_MD);
-}
-
-static void spitz_pcmcia_pwr(struct device *scoop, unsigned short cpr, int nr)
-{
- /* Only need to override behaviour for slot 0 */
- if (nr == 0)
- spitz_card_pwr_ctrl(SPITZ_PWR_CF, cpr);
- else
- write_scoop_reg(scoop, SCOOP_CPR, cpr);
-}
-
static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = {
{
.dev = &spitzscoop_device.dev,
@@ -177,16 +117,6 @@ static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = {
},
};
-static struct scoop_pcmcia_config spitz_pcmcia_config = {
- .devs = &spitz_pcmcia_scoop[0],
- .num_devs = 2,
- .pcmcia_init = spitz_pcmcia_init,
- .power_ctrl = spitz_pcmcia_pwr,
-};
-
-EXPORT_SYMBOL(spitzscoop_device);
-EXPORT_SYMBOL(spitzscoop2_device);
-
/*
* Spitz SSP Device
@@ -305,14 +235,27 @@ static int spitz_mci_init(struct device *dev, irqreturn_t (*spitz_detect_int)(in
return 0;
}
+/* Power control is shared with one of the CF slots so we have a mess */
static void spitz_mci_setpower(struct device *dev, unsigned int vdd)
{
struct pxamci_platform_data* p_d = dev->platform_data;
- if (( 1 << vdd) & p_d->ocr_mask)
- spitz_card_pwr_ctrl(SPITZ_PWR_SD, 0x0004);
- else
- spitz_card_pwr_ctrl(SPITZ_PWR_SD, 0x0000);
+ unsigned short cpr = read_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR);
+
+ if (( 1 << vdd) & p_d->ocr_mask) {
+ /* printk(KERN_DEBUG "%s: on\n", __FUNCTION__); */
+ set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER);
+ mdelay(2);
+ write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | 0x04);
+ } else {
+ /* printk(KERN_DEBUG "%s: off\n", __FUNCTION__); */
+ write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr & ~0x04);
+
+ if (!(cpr | 0x02)) {
+ mdelay(1);
+ reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER);
+ }
+ }
}
static int spitz_mci_get_ro(struct device *dev)
@@ -408,8 +351,8 @@ static void __init common_init(void)
static void __init spitz_init(void)
{
- platform_scoop_config = &spitz_pcmcia_config;
-
+ scoop_num = 2;
+ scoop_devs = &spitz_pcmcia_scoop[0];
spitz_bl_machinfo.set_bl_intensity = spitz_bl_set_intensity;
common_init();
diff --git a/trunk/arch/arm/mach-pxa/time.c b/trunk/arch/arm/mach-pxa/time.c
index b9b2057349eb..7dad3f1465e0 100644
--- a/trunk/arch/arm/mach-pxa/time.c
+++ b/trunk/arch/arm/mach-pxa/time.c
@@ -132,13 +132,11 @@ static void __init pxa_timer_init(void)
tv.tv_sec = pxa_get_rtc_time();
do_settimeofday(&tv);
- OIER = 0; /* disable any timer interrupts */
- OSCR = LATCH*2; /* push OSCR out of the way */
- OSMR0 = LATCH; /* set initial match */
+ OSMR0 = 0; /* set initial match at 0 */
OSSR = 0xf; /* clear status on all timers */
setup_irq(IRQ_OST0, &pxa_timer_irq);
- OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */
- OSCR = 0; /* initialize free-running timer */
+ OIER |= OIER_E0; /* enable match on timer 0 to cause interrupts */
+ OSCR = 0; /* initialize free-running timer, force first match */
}
#ifdef CONFIG_NO_IDLE_HZ
diff --git a/trunk/arch/arm/mach-pxa/tosa.c b/trunk/arch/arm/mach-pxa/tosa.c
index c312054dfb88..400609f8b6a8 100644
--- a/trunk/arch/arm/mach-pxa/tosa.c
+++ b/trunk/arch/arm/mach-pxa/tosa.c
@@ -98,9 +98,6 @@ struct platform_device tosascoop_jc_device = {
.resource = tosa_scoop_jc_resources,
};
-/*
- * PCMCIA
- */
static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = {
{
.dev = &tosascoop_device.dev,
@@ -114,155 +111,16 @@ static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = {
},
};
-static void tosa_pcmcia_init(void)
-{
- /* Setup default state of GPIO outputs
- before we enable them as outputs. */
- GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
- GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
- GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) |
- GPIO_bit(GPIO53_nPCE_2);
-
- pxa_gpio_mode(GPIO48_nPOE_MD);
- pxa_gpio_mode(GPIO49_nPWE_MD);
- pxa_gpio_mode(GPIO50_nPIOR_MD);
- pxa_gpio_mode(GPIO51_nPIOW_MD);
- pxa_gpio_mode(GPIO55_nPREG_MD);
- pxa_gpio_mode(GPIO56_nPWAIT_MD);
- pxa_gpio_mode(GPIO57_nIOIS16_MD);
- pxa_gpio_mode(GPIO52_nPCE_1_MD);
- pxa_gpio_mode(GPIO53_nPCE_2_MD);
- pxa_gpio_mode(GPIO54_pSKTSEL_MD);
-}
-
-static struct scoop_pcmcia_config tosa_pcmcia_config = {
- .devs = &tosa_pcmcia_scoop[0],
- .num_devs = 2,
- .pcmcia_init = tosa_pcmcia_init,
-};
-
-/*
- * USB Device Controller
- */
-static void tosa_udc_command(int cmd)
-{
- switch(cmd) {
- case PXA2XX_UDC_CMD_CONNECT:
- set_scoop_gpio(&tosascoop_jc_device.dev,TOSA_SCOOP_JC_USB_PULLUP);
- break;
- case PXA2XX_UDC_CMD_DISCONNECT:
- reset_scoop_gpio(&tosascoop_jc_device.dev,TOSA_SCOOP_JC_USB_PULLUP);
- break;
- }
-}
-
-static int tosa_udc_is_connected(void)
-{
- return ((GPLR(TOSA_GPIO_USB_IN) & GPIO_bit(TOSA_GPIO_USB_IN)) == 0);
-}
-
-
-static struct pxa2xx_udc_mach_info udc_info __initdata = {
- .udc_command = tosa_udc_command,
- .udc_is_connected = tosa_udc_is_connected,
-};
-
-/*
- * MMC/SD Device
- */
-static struct pxamci_platform_data tosa_mci_platform_data;
-
-static int tosa_mci_init(struct device *dev, irqreturn_t (*tosa_detect_int)(int, void *, struct pt_regs *), void *data)
-{
- int err;
-
- /* setup GPIO for PXA25x MMC controller */
- pxa_gpio_mode(GPIO6_MMCCLK_MD);
- pxa_gpio_mode(GPIO8_MMCCS0_MD);
- pxa_gpio_mode(TOSA_GPIO_nSD_DETECT | GPIO_IN);
-
- tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250);
-
- err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, SA_INTERRUPT,
- "MMC/SD card detect", data);
- if (err) {
- printk(KERN_ERR "tosa_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
- return -1;
- }
-
- set_irq_type(TOSA_IRQ_GPIO_nSD_DETECT, IRQT_BOTHEDGE);
-
- return 0;
-}
-
-static void tosa_mci_setpower(struct device *dev, unsigned int vdd)
-{
- struct pxamci_platform_data* p_d = dev->platform_data;
-
- if (( 1 << vdd) & p_d->ocr_mask) {
- set_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_PWR_ON);
- } else {
- reset_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_PWR_ON);
- }
-}
-
-static int tosa_mci_get_ro(struct device *dev)
-{
- return (read_scoop_reg(&tosascoop_device.dev, SCOOP_GPWR)&TOSA_SCOOP_SD_WP);
-}
-
-static void tosa_mci_exit(struct device *dev, void *data)
-{
- free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data);
-}
-
-static struct pxamci_platform_data tosa_mci_platform_data = {
- .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
- .init = tosa_mci_init,
- .get_ro = tosa_mci_get_ro,
- .setpower = tosa_mci_setpower,
- .exit = tosa_mci_exit,
-};
-
-/*
- * Irda
- */
-static void tosa_irda_transceiver_mode(struct device *dev, int mode)
-{
- if (mode & IR_OFF) {
- reset_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_IR_POWERDWN);
- pxa_gpio_mode(GPIO47_STTXD|GPIO_DFLT_LOW);
- pxa_gpio_mode(GPIO47_STTXD|GPIO_OUT);
- } else {
- pxa_gpio_mode(GPIO47_STTXD_MD);
- set_scoop_gpio(&tosascoop_device.dev,TOSA_SCOOP_IR_POWERDWN);
- }
-}
-
-static struct pxaficp_platform_data tosa_ficp_platform_data = {
- .transceiver_cap = IR_SIRMODE | IR_OFF,
- .transceiver_mode = tosa_irda_transceiver_mode,
-};
-
-/*
- * Tosa Keyboard
- */
-static struct platform_device tosakbd_device = {
- .name = "tosa-keyboard",
- .id = -1,
-};
static struct platform_device *devices[] __initdata = {
&tosascoop_device,
&tosascoop_jc_device,
- &tosakbd_device,
};
static void __init tosa_init(void)
{
pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN);
pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN);
- pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN);
/* setup sleep mode values */
PWER = 0x00000002;
@@ -273,15 +131,13 @@ static void __init tosa_init(void)
PGSR2 = 0x00014000;
PCFR |= PCFR_OPDE;
- /* enable batt_fault */
+ // enable batt_fault
PMCR = 0x01;
- pxa_set_mci_info(&tosa_mci_platform_data);
- pxa_set_udc_info(&udc_info);
- pxa_set_ficp_info(&tosa_ficp_platform_data);
- platform_scoop_config = &tosa_pcmcia_config;
-
platform_add_devices(devices, ARRAY_SIZE(devices));
+
+ scoop_num = 2;
+ scoop_devs = &tosa_pcmcia_scoop[0];
}
static void __init fixup_tosa(struct machine_desc *desc,
diff --git a/trunk/arch/arm/mach-realview/Kconfig b/trunk/arch/arm/mach-realview/Kconfig
index 129976866d47..4b63dc9eabfe 100644
--- a/trunk/arch/arm/mach-realview/Kconfig
+++ b/trunk/arch/arm/mach-realview/Kconfig
@@ -8,13 +8,4 @@ config MACH_REALVIEW_EB
help
Include support for the ARM(R) RealView Emulation Baseboard platform.
-config REALVIEW_MPCORE
- bool "Support MPcore tile"
- depends on MACH_REALVIEW_EB
- help
- Enable support for the MPCore tile on the Realview platform.
- Since there are device address and interrupt differences, a
- kernel built with this option enabled is not compatible with
- other tiles.
-
endmenu
diff --git a/trunk/arch/arm/mach-realview/Makefile b/trunk/arch/arm/mach-realview/Makefile
index 011a85c10627..8d37ea1605fd 100644
--- a/trunk/arch/arm/mach-realview/Makefile
+++ b/trunk/arch/arm/mach-realview/Makefile
@@ -4,4 +4,3 @@
obj-y := core.o clock.o
obj-$(CONFIG_MACH_REALVIEW_EB) += realview_eb.o
-obj-$(CONFIG_SMP) += platsmp.o headsmp.o
diff --git a/trunk/arch/arm/mach-realview/core.c b/trunk/arch/arm/mach-realview/core.c
index 4ea60d8b6e36..482eb512ebe8 100644
--- a/trunk/arch/arm/mach-realview/core.c
+++ b/trunk/arch/arm/mach-realview/core.c
@@ -550,11 +550,6 @@ static irqreturn_t realview_timer_interrupt(int irq, void *dev_id, struct pt_reg
timer_tick(regs);
-#ifdef CONFIG_SMP
- smp_send_timer();
- update_process_times(user_mode(regs));
-#endif
-
write_sequnlock(&xtime_lock);
return IRQ_HANDLED;
diff --git a/trunk/arch/arm/mach-realview/core.h b/trunk/arch/arm/mach-realview/core.h
index d83e8bad2038..575599db74db 100644
--- a/trunk/arch/arm/mach-realview/core.h
+++ b/trunk/arch/arm/mach-realview/core.h
@@ -23,7 +23,6 @@
#define __ASM_ARCH_REALVIEW_H
#include
-#include
#include
#define __io_address(n) __io(IO_ADDRESS(n))
diff --git a/trunk/arch/arm/mach-realview/headsmp.S b/trunk/arch/arm/mach-realview/headsmp.S
deleted file mode 100644
index 4075473cf68a..000000000000
--- a/trunk/arch/arm/mach-realview/headsmp.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * linux/arch/arm/mach-realview/headsmp.S
- *
- * Copyright (c) 2003 ARM Limited
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include
-#include
-
- __INIT
-
-/*
- * Realview specific entry point for secondary CPUs. This provides
- * a "holding pen" into which all secondary cores are held until we're
- * ready for them to initialise.
- */
-ENTRY(realview_secondary_startup)
- mrc p15, 0, r0, c0, c0, 5
- and r0, r0, #15
- adr r4, 1f
- ldmia r4, {r5, r6}
- sub r4, r4, r5
- add r6, r6, r4
-pen: ldr r7, [r6]
- cmp r7, r0
- bne pen
-
- /*
- * we've been released from the holding pen: secondary_stack
- * should now contain the SVC stack for this core
- */
- b secondary_startup
-
-1: .long .
- .long pen_release
diff --git a/trunk/arch/arm/mach-realview/platsmp.c b/trunk/arch/arm/mach-realview/platsmp.c
deleted file mode 100644
index 09b35f62247a..000000000000
--- a/trunk/arch/arm/mach-realview/platsmp.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * linux/arch/arm/mach-realview/platsmp.c
- *
- * Copyright (C) 2002 ARM Ltd.
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-
-#include "core.h"
-
-extern void realview_secondary_startup(void);
-
-/*
- * control for which core is the next to come out of the secondary
- * boot "holding pen"
- */
-volatile int __cpuinitdata pen_release = -1;
-
-static unsigned int __init get_core_count(void)
-{
- unsigned int ncores;
-
- ncores = __raw_readl(__io_address(REALVIEW_MPCORE_SCU_BASE) + SCU_CONFIG);
-
- return (ncores & 0x03) + 1;
-}
-
-static DEFINE_SPINLOCK(boot_lock);
-
-void __cpuinit platform_secondary_init(unsigned int cpu)
-{
- /*
- * the primary core may have used a "cross call" soft interrupt
- * to get this processor out of WFI in the BootMonitor - make
- * sure that we are no longer being sent this soft interrupt
- */
- smp_cross_call_done(cpumask_of_cpu(cpu));
-
- /*
- * if any interrupts are already enabled for the primary
- * core (e.g. timer irq), then they will not have been enabled
- * for us: do so
- */
- gic_cpu_init(__io_address(REALVIEW_GIC_CPU_BASE));
-
- /*
- * let the primary processor know we're out of the
- * pen, then head off into the C entry point
- */
- pen_release = -1;
-
- /*
- * Synchronise with the boot thread.
- */
- spin_lock(&boot_lock);
- spin_unlock(&boot_lock);
-}
-
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
-{
- unsigned long timeout;
-
- /*
- * set synchronisation state between this boot processor
- * and the secondary one
- */
- spin_lock(&boot_lock);
-
- /*
- * The secondary processor is waiting to be released from
- * the holding pen - release it, then wait for it to flag
- * that it has been released by resetting pen_release.
- *
- * Note that "pen_release" is the hardware CPU ID, whereas
- * "cpu" is Linux's internal ID.
- */
- pen_release = cpu;
- flush_cache_all();
-
- /*
- * XXX
- *
- * This is a later addition to the booting protocol: the
- * bootMonitor now puts secondary cores into WFI, so
- * poke_milo() no longer gets the cores moving; we need
- * to send a soft interrupt to wake the secondary core.
- * Use smp_cross_call() for this, since there's little
- * point duplicating the code here
- */
- smp_cross_call(cpumask_of_cpu(cpu));
-
- timeout = jiffies + (1 * HZ);
- while (time_before(jiffies, timeout)) {
- if (pen_release == -1)
- break;
-
- udelay(10);
- }
-
- /*
- * now the secondary core is starting up let it run its
- * calibrations, then wait for it to finish
- */
- spin_unlock(&boot_lock);
-
- return pen_release != -1 ? -ENOSYS : 0;
-}
-
-static void __init poke_milo(void)
-{
- extern void secondary_startup(void);
-
- /* nobody is to be released from the pen yet */
- pen_release = -1;
-
- /*
- * write the address of secondary startup into the system-wide
- * flags register, then clear the bottom two bits, which is what
- * BootMonitor is waiting for
- */
-#if 1
-#define REALVIEW_SYS_FLAGSS_OFFSET 0x30
- __raw_writel(virt_to_phys(realview_secondary_startup),
- __io_address(REALVIEW_SYS_BASE) +
- REALVIEW_SYS_FLAGSS_OFFSET);
-#define REALVIEW_SYS_FLAGSC_OFFSET 0x34
- __raw_writel(3,
- __io_address(REALVIEW_SYS_BASE) +
- REALVIEW_SYS_FLAGSC_OFFSET);
-#endif
-
- mb();
-}
-
-void __init smp_prepare_cpus(unsigned int max_cpus)
-{
- unsigned int ncores = get_core_count();
- unsigned int cpu = smp_processor_id();
- int i;
-
- /* sanity check */
- if (ncores == 0) {
- printk(KERN_ERR
- "Realview: strange CM count of 0? Default to 1\n");
-
- ncores = 1;
- }
-
- if (ncores > NR_CPUS) {
- printk(KERN_WARNING
- "Realview: no. of cores (%d) greater than configured "
- "maximum of %d - clipping\n",
- ncores, NR_CPUS);
- ncores = NR_CPUS;
- }
-
- smp_store_cpu_info(cpu);
-
- /*
- * are we trying to boot more cores than exist?
- */
- if (max_cpus > ncores)
- max_cpus = ncores;
-
- /*
- * Initialise the possible/present maps.
- * cpu_possible_map describes the set of CPUs which may be present
- * cpu_present_map describes the set of CPUs populated
- */
- for (i = 0; i < max_cpus; i++) {
- cpu_set(i, cpu_possible_map);
- cpu_set(i, cpu_present_map);
- }
-
- /*
- * Do we need any more CPUs? If so, then let them know where
- * to start. Note that, on modern versions of MILO, the "poke"
- * doesn't actually do anything until each individual core is
- * sent a soft interrupt to get it out of WFI
- */
- if (max_cpus > 1)
- poke_milo();
-}
diff --git a/trunk/arch/arm/mach-realview/realview_eb.c b/trunk/arch/arm/mach-realview/realview_eb.c
index 7dc32503fdf2..267bb07e39b7 100644
--- a/trunk/arch/arm/mach-realview/realview_eb.c
+++ b/trunk/arch/arm/mach-realview/realview_eb.c
@@ -136,11 +136,6 @@ static struct amba_device *amba_devs[] __initdata = {
static void __init gic_init_irq(void)
{
-#ifdef CONFIG_REALVIEW_MPCORE
- writel(0x0000a05f, __io_address(REALVIEW_SYS_LOCK));
- writel(0x008003c0, __io_address(REALVIEW_SYS_BASE) + 0xd8);
- writel(0x00000000, __io_address(REALVIEW_SYS_LOCK));
-#endif
gic_dist_init(__io_address(REALVIEW_GIC_DIST_BASE));
gic_cpu_init(__io_address(REALVIEW_GIC_CPU_BASE));
}
diff --git a/trunk/arch/arm/mach-s3c2410/Kconfig b/trunk/arch/arm/mach-s3c2410/Kconfig
index 0b9d7ca49ec1..c796bcdd6158 100644
--- a/trunk/arch/arm/mach-s3c2410/Kconfig
+++ b/trunk/arch/arm/mach-s3c2410/Kconfig
@@ -121,14 +121,6 @@ config S3C2410_BOOT_WATCHDOG
system resets depends on the value of PCLK. The timeout on an
200MHz s3c2410 should be about 30 seconds.
-config S3C2410_BOOT_ERROR_RESET
- bool "S3C2410 Reboot on decompression error"
- depends on ARCH_S3C2410
- help
- Say y here to use the watchdog to reset the system if the
- kernel decompressor detects an error during decompression.
-
-
comment "S3C2410 Setup"
config S3C2410_DMA
diff --git a/trunk/arch/arm/mach-s3c2410/mach-bast.c b/trunk/arch/arm/mach-s3c2410/mach-bast.c
index 1be2567a7486..0b71c896bbd1 100644
--- a/trunk/arch/arm/mach-s3c2410/mach-bast.c
+++ b/trunk/arch/arm/mach-s3c2410/mach-bast.c
@@ -89,63 +89,32 @@
/* macros to modify the physical addresses for io space */
-#define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2))
-#define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3))
-#define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4))
-#define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5))
+#define PA_CS2(item) ((item) + S3C2410_CS2)
+#define PA_CS3(item) ((item) + S3C2410_CS3)
+#define PA_CS4(item) ((item) + S3C2410_CS4)
+#define PA_CS5(item) ((item) + S3C2410_CS5)
static struct map_desc bast_iodesc[] __initdata = {
/* ISA IO areas */
- {
- .virtual = (u32)S3C24XX_VA_ISA_BYTE,
- .pfn = PA_CS2(BAST_PA_ISAIO),
- .length = SZ_16M,
- .type = MT_DEVICE,
- }, {
- .virtual = (u32)S3C24XX_VA_ISA_WORD,
- .pfn = PA_CS3(BAST_PA_ISAIO),
- .length = SZ_16M,
- .type = MT_DEVICE,
- },
+
+ { (u32)S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
+ { (u32)S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
+
+ /* we could possibly compress the next set down into a set of smaller tables
+ * pagetables, but that would mean using an L2 section, and it still means
+ * we cannot actually feed the same register to an LDR due to 16K spacing
+ */
+
/* bast CPLD control registers, and external interrupt controls */
- {
- .virtual = (u32)BAST_VA_CTRL1,
- .pfn = __phys_to_pfn(BAST_PA_CTRL1),
- .length = SZ_1M,
- .type = MT_DEVICE,
- }, {
- .virtual = (u32)BAST_VA_CTRL2,
- .pfn = __phys_to_pfn(BAST_PA_CTRL2),
- .length = SZ_1M,
- .type = MT_DEVICE,
- }, {
- .virtual = (u32)BAST_VA_CTRL3,
- .pfn = __phys_to_pfn(BAST_PA_CTRL3),
- .length = SZ_1M,
- .type = MT_DEVICE,
- }, {
- .virtual = (u32)BAST_VA_CTRL4,
- .pfn = __phys_to_pfn(BAST_PA_CTRL4),
- .length = SZ_1M,
- .type = MT_DEVICE,
- },
+ { (u32)BAST_VA_CTRL1, BAST_PA_CTRL1, SZ_1M, MT_DEVICE },
+ { (u32)BAST_VA_CTRL2, BAST_PA_CTRL2, SZ_1M, MT_DEVICE },
+ { (u32)BAST_VA_CTRL3, BAST_PA_CTRL3, SZ_1M, MT_DEVICE },
+ { (u32)BAST_VA_CTRL4, BAST_PA_CTRL4, SZ_1M, MT_DEVICE },
+
/* PC104 IRQ mux */
- {
- .virtual = (u32)BAST_VA_PC104_IRQREQ,
- .pfn = __phys_to_pfn(BAST_PA_PC104_IRQREQ),
- .length = SZ_1M,
- .type = MT_DEVICE,
- }, {
- .virtual = (u32)BAST_VA_PC104_IRQRAW,
- .pfn = __phys_to_pfn(BAST_PA_PC104_IRQRAW),
- .length = SZ_1M,
- .type = MT_DEVICE,
- }, {
- .virtual = (u32)BAST_VA_PC104_IRQMASK,
- .pfn = __phys_to_pfn(BAST_PA_PC104_IRQMASK),
- .length = SZ_1M,
- .type = MT_DEVICE,
- },
+ { (u32)BAST_VA_PC104_IRQREQ, BAST_PA_PC104_IRQREQ, SZ_1M, MT_DEVICE },
+ { (u32)BAST_VA_PC104_IRQRAW, BAST_PA_PC104_IRQRAW, SZ_1M, MT_DEVICE },
+ { (u32)BAST_VA_PC104_IRQMASK, BAST_PA_PC104_IRQMASK, SZ_1M, MT_DEVICE },
/* peripheral space... one for each of fast/slow/byte/16bit */
/* note, ide is only decoded in word space, even though some registers
diff --git a/trunk/arch/arm/mach-s3c2410/mach-vr1000.c b/trunk/arch/arm/mach-s3c2410/mach-vr1000.c
index ae7e099bf6c8..46b259673c18 100644
--- a/trunk/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/trunk/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -74,47 +74,27 @@
/* macros to modify the physical addresses for io space */
-#define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2))
-#define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3))
-#define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4))
-#define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5))
+#define PA_CS2(item) ((item) + S3C2410_CS2)
+#define PA_CS3(item) ((item) + S3C2410_CS3)
+#define PA_CS4(item) ((item) + S3C2410_CS4)
+#define PA_CS5(item) ((item) + S3C2410_CS5)
static struct map_desc vr1000_iodesc[] __initdata = {
/* ISA IO areas */
- {
- .virtual = (u32)S3C24XX_VA_ISA_BYTE,
- .pfn = PA_CS2(BAST_PA_ISAIO),
- .length = SZ_16M,
- .type = MT_DEVICE,
- }, {
- .virtual = (u32)S3C24XX_VA_ISA_WORD,
- .pfn = PA_CS3(BAST_PA_ISAIO),
- .length = SZ_16M,
- .type = MT_DEVICE,
- },
-
- /* CPLD control registers, and external interrupt controls */
- {
- .virtual = (u32)VR1000_VA_CTRL1,
- .pfn = __phys_to_pfn(VR1000_PA_CTRL1),
- .length = SZ_1M,
- .type = MT_DEVICE,
- }, {
- .virtual = (u32)VR1000_VA_CTRL2,
- .pfn = __phys_to_pfn(VR1000_PA_CTRL2),
- .length = SZ_1M,
- .type = MT_DEVICE,
- }, {
- .virtual = (u32)VR1000_VA_CTRL3,
- .pfn = __phys_to_pfn(VR1000_PA_CTRL3),
- .length = SZ_1M,
- .type = MT_DEVICE,
- }, {
- .virtual = (u32)VR1000_VA_CTRL4,
- .pfn = __phys_to_pfn(VR1000_PA_CTRL4),
- .length = SZ_1M,
- .type = MT_DEVICE,
- },
+
+ { (u32)S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
+ { (u32)S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
+
+ /* we could possibly compress the next set down into a set of smaller tables
+ * pagetables, but that would mean using an L2 section, and it still means
+ * we cannot actually feed the same register to an LDR due to 16K spacing
+ */
+
+ /* bast CPLD control registers, and external interrupt controls */
+ { (u32)VR1000_VA_CTRL1, VR1000_PA_CTRL1, SZ_1M, MT_DEVICE },
+ { (u32)VR1000_VA_CTRL2, VR1000_PA_CTRL2, SZ_1M, MT_DEVICE },
+ { (u32)VR1000_VA_CTRL3, VR1000_PA_CTRL3, SZ_1M, MT_DEVICE },
+ { (u32)VR1000_VA_CTRL4, VR1000_PA_CTRL4, SZ_1M, MT_DEVICE },
/* peripheral space... one for each of fast/slow/byte/16bit */
/* note, ide is only decoded in word space, even though some registers
diff --git a/trunk/arch/arm/mach-sa1100/time.c b/trunk/arch/arm/mach-sa1100/time.c
index e4b435e634e4..47e0420623fc 100644
--- a/trunk/arch/arm/mach-sa1100/time.c
+++ b/trunk/arch/arm/mach-sa1100/time.c
@@ -124,13 +124,11 @@ static void __init sa1100_timer_init(void)
tv.tv_sec = sa1100_get_rtc_time();
do_settimeofday(&tv);
- OIER = 0; /* disable any timer interrupts */
- OSCR = LATCH*2; /* push OSCR out of the way */
- OSMR0 = LATCH; /* set initial match */
+ OSMR0 = 0; /* set initial match at 0 */
OSSR = 0xf; /* clear status on all timers */
setup_irq(IRQ_OST0, &sa1100_timer_irq);
- OIER = OIER_E0; /* enable match on timer 0 to cause interrupts */
- OSCR = 0; /* initialize free-running timer */
+ OIER |= OIER_E0; /* enable match on timer 0 to cause interrupts */
+ OSCR = 0; /* initialize free-running timer, force first match */
}
#ifdef CONFIG_NO_IDLE_HZ
diff --git a/trunk/arch/arm/mm/mm-armv.c b/trunk/arch/arm/mm/mm-armv.c
index 9e50127be635..fb5b40289de2 100644
--- a/trunk/arch/arm/mm/mm-armv.c
+++ b/trunk/arch/arm/mm/mm-armv.c
@@ -354,7 +354,7 @@ void __init build_mem_type_table(void)
{
struct cachepolicy *cp;
unsigned int cr = get_cr();
- unsigned int user_pgprot, kern_pgprot;
+ unsigned int user_pgprot;
int cpu_arch = cpu_architecture();
int i;
@@ -381,7 +381,7 @@ void __init build_mem_type_table(void)
}
cp = &cache_policies[cachepolicy];
- kern_pgprot = user_pgprot = cp->pte;
+ user_pgprot = cp->pte;
/*
* ARMv6 and above have extended page tables.
@@ -393,7 +393,6 @@ void __init build_mem_type_table(void)
*/
mem_types[MT_MEMORY].prot_sect &= ~PMD_BIT4;
mem_types[MT_ROM].prot_sect &= ~PMD_BIT4;
-
/*
* Mark cache clean areas and XIP ROM read only
* from SVC mode and no access from userspace.
@@ -413,47 +412,32 @@ void __init build_mem_type_table(void)
* (iow, non-global)
*/
user_pgprot |= L_PTE_ASID;
-
-#ifdef CONFIG_SMP
- /*
- * Mark memory with the "shared" attribute for SMP systems
- */
- user_pgprot |= L_PTE_SHARED;
- kern_pgprot |= L_PTE_SHARED;
- mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S;
-#endif
}
- for (i = 0; i < 16; i++) {
- unsigned long v = pgprot_val(protection_map[i]);
- v = (v & ~(L_PTE_BUFFERABLE|L_PTE_CACHEABLE)) | user_pgprot;
- protection_map[i] = __pgprot(v);
- }
-
- mem_types[MT_LOW_VECTORS].prot_pte |= kern_pgprot;
- mem_types[MT_HIGH_VECTORS].prot_pte |= kern_pgprot;
-
if (cpu_arch >= CPU_ARCH_ARMv5) {
-#ifndef CONFIG_SMP
- /*
- * Only use write-through for non-SMP systems
- */
- mem_types[MT_LOW_VECTORS].prot_pte &= ~L_PTE_BUFFERABLE;
- mem_types[MT_HIGH_VECTORS].prot_pte &= ~L_PTE_BUFFERABLE;
-#endif
+ mem_types[MT_LOW_VECTORS].prot_pte |= cp->pte & PTE_CACHEABLE;
+ mem_types[MT_HIGH_VECTORS].prot_pte |= cp->pte & PTE_CACHEABLE;
} else {
+ mem_types[MT_LOW_VECTORS].prot_pte |= cp->pte;
+ mem_types[MT_HIGH_VECTORS].prot_pte |= cp->pte;
mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1);
}
- pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG |
- L_PTE_DIRTY | L_PTE_WRITE |
- L_PTE_EXEC | kern_pgprot);
-
mem_types[MT_LOW_VECTORS].prot_l1 |= ecc_mask;
mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask;
mem_types[MT_MEMORY].prot_sect |= ecc_mask | cp->pmd;
mem_types[MT_ROM].prot_sect |= cp->pmd;
+ for (i = 0; i < 16; i++) {
+ unsigned long v = pgprot_val(protection_map[i]);
+ v = (v & ~(PTE_BUFFERABLE|PTE_CACHEABLE)) | user_pgprot;
+ protection_map[i] = __pgprot(v);
+ }
+
+ pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG |
+ L_PTE_DIRTY | L_PTE_WRITE |
+ L_PTE_EXEC | cp->pte);
+
switch (cp->pmd) {
case PMD_SECT_WT:
mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WT;
diff --git a/trunk/arch/arm/mm/proc-v6.S b/trunk/arch/arm/mm/proc-v6.S
index 92f3ca31b7b9..9bb5fff406fb 100644
--- a/trunk/arch/arm/mm/proc-v6.S
+++ b/trunk/arch/arm/mm/proc-v6.S
@@ -12,7 +12,6 @@
#include
#include
#include
-#include
#include
#include
@@ -113,9 +112,6 @@ ENTRY(cpu_v6_dcache_clean_area)
ENTRY(cpu_v6_switch_mm)
mov r2, #0
ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id
-#ifdef CONFIG_SMP
- orr r0, r0, #2 @ set shared pgtable
-#endif
mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB
mcr p15, 0, r2, c7, c10, 4 @ drain write buffer
mcr p15, 0, r0, c2, c0, 0 @ set TTB 0
@@ -144,7 +140,7 @@ ENTRY(cpu_v6_switch_mm)
ENTRY(cpu_v6_set_pte)
str r1, [r0], #-2048 @ linux version
- bic r2, r1, #0x000003f0
+ bic r2, r1, #0x000007f0
bic r2, r2, #0x00000003
orr r2, r2, #PTE_EXT_AP0 | 2
@@ -195,23 +191,6 @@ cpu_v6_name:
* - cache type register is implemented
*/
__v6_setup:
-#ifdef CONFIG_SMP
- /* Set up the SCU on core 0 only */
- mrc p15, 0, r0, c0, c0, 5 @ CPU core number
- ands r0, r0, #15
- moveq r0, #0x10000000 @ SCU_BASE
- orreq r0, r0, #0x00100000
- ldreq r5, [r0, #SCU_CTRL]
- orreq r5, r5, #1
- streq r5, [r0, #SCU_CTRL]
-
-#ifndef CONFIG_CPU_DCACHE_DISABLE
- mrc p15, 0, r0, c1, c0, 1 @ Enable SMP/nAMP mode
- orr r0, r0, #0x20
- mcr p15, 0, r0, c1, c0, 1
-#endif
-#endif
-
mov r0, #0
mcr p15, 0, r0, c7, c14, 0 @ clean+invalidate D cache
mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
@@ -219,9 +198,6 @@ __v6_setup:
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs
mcr p15, 0, r0, c2, c0, 2 @ TTB control register
-#ifdef CONFIG_SMP
- orr r4, r4, #2 @ set shared pgtable
-#endif
mcr p15, 0, r4, c2, c0, 1 @ load TTB1
#ifdef CONFIG_VFP
mrc p15, 0, r0, c1, c0, 2
diff --git a/trunk/arch/arm/nwfpe/fpa11.h b/trunk/arch/arm/nwfpe/fpa11.h
index da4c616b6c49..9677ae8448e8 100644
--- a/trunk/arch/arm/nwfpe/fpa11.h
+++ b/trunk/arch/arm/nwfpe/fpa11.h
@@ -60,7 +60,7 @@ typedef union tagFPREG {
#ifdef CONFIG_FPE_NWFPE_XP
floatx80 fExtended;
#else
- u32 padding[3];
+ int padding[3];
#endif
} FPREG;
diff --git a/trunk/arch/arm/nwfpe/fpa11_cpdt.c b/trunk/arch/arm/nwfpe/fpa11_cpdt.c
index 32859fa8dcfc..b0db5cbcc3b1 100644
--- a/trunk/arch/arm/nwfpe/fpa11_cpdt.c
+++ b/trunk/arch/arm/nwfpe/fpa11_cpdt.c
@@ -59,13 +59,8 @@ static inline void loadExtended(const unsigned int Fn, const unsigned int __user
p = (unsigned int *) &fpa11->fpreg[Fn].fExtended;
fpa11->fType[Fn] = typeExtended;
get_user(p[0], &pMem[0]); /* sign & exponent */
-#ifdef __ARMEB__
- get_user(p[1], &pMem[1]); /* ms bits */
- get_user(p[2], &pMem[2]); /* ls bits */
-#else
get_user(p[1], &pMem[2]); /* ls bits */
get_user(p[2], &pMem[1]); /* ms bits */
-#endif
}
#endif
@@ -182,13 +177,8 @@ static inline void storeExtended(const unsigned int Fn, unsigned int __user *pMe
}
put_user(val.i[0], &pMem[0]); /* sign & exp */
-#ifdef __ARMEB__
- put_user(val.i[1], &pMem[1]); /* msw */
- put_user(val.i[2], &pMem[2]);
-#else
put_user(val.i[1], &pMem[2]);
put_user(val.i[2], &pMem[1]); /* msw */
-#endif
}
#endif
diff --git a/trunk/arch/arm/nwfpe/fpopcode.c b/trunk/arch/arm/nwfpe/fpopcode.c
index 67ff2ab08ea0..4c9f5703148c 100644
--- a/trunk/arch/arm/nwfpe/fpopcode.c
+++ b/trunk/arch/arm/nwfpe/fpopcode.c
@@ -29,14 +29,14 @@
#ifdef CONFIG_FPE_NWFPE_XP
const floatx80 floatx80Constant[] = {
- { .high = 0x0000, .low = 0x0000000000000000ULL},/* extended 0.0 */
- { .high = 0x3fff, .low = 0x8000000000000000ULL},/* extended 1.0 */
- { .high = 0x4000, .low = 0x8000000000000000ULL},/* extended 2.0 */
- { .high = 0x4000, .low = 0xc000000000000000ULL},/* extended 3.0 */
- { .high = 0x4001, .low = 0x8000000000000000ULL},/* extended 4.0 */
- { .high = 0x4001, .low = 0xa000000000000000ULL},/* extended 5.0 */
- { .high = 0x3ffe, .low = 0x8000000000000000ULL},/* extended 0.5 */
- { .high = 0x4002, .low = 0xa000000000000000ULL},/* extended 10.0 */
+ {0x0000, 0x0000000000000000ULL}, /* extended 0.0 */
+ {0x3fff, 0x8000000000000000ULL}, /* extended 1.0 */
+ {0x4000, 0x8000000000000000ULL}, /* extended 2.0 */
+ {0x4000, 0xc000000000000000ULL}, /* extended 3.0 */
+ {0x4001, 0x8000000000000000ULL}, /* extended 4.0 */
+ {0x4001, 0xa000000000000000ULL}, /* extended 5.0 */
+ {0x3ffe, 0x8000000000000000ULL}, /* extended 0.5 */
+ {0x4002, 0xa000000000000000ULL} /* extended 10.0 */
};
#endif
diff --git a/trunk/arch/arm/nwfpe/softfloat-specialize b/trunk/arch/arm/nwfpe/softfloat-specialize
index d4a4c8e06635..acf409144763 100644
--- a/trunk/arch/arm/nwfpe/softfloat-specialize
+++ b/trunk/arch/arm/nwfpe/softfloat-specialize
@@ -332,7 +332,6 @@ static floatx80 commonNaNToFloatx80( commonNaNT a )
z.low = LIT64( 0xC000000000000000 ) | ( a.high>>1 );
z.high = ( ( (bits16) a.sign )<<15 ) | 0x7FFF;
- z.__padding = 0;
return z;
}
diff --git a/trunk/arch/arm/nwfpe/softfloat.c b/trunk/arch/arm/nwfpe/softfloat.c
index 0f9656e482ba..f9f049132a17 100644
--- a/trunk/arch/arm/nwfpe/softfloat.c
+++ b/trunk/arch/arm/nwfpe/softfloat.c
@@ -531,7 +531,6 @@ INLINE floatx80 packFloatx80( flag zSign, int32 zExp, bits64 zSig )
z.low = zSig;
z.high = ( ( (bits16) zSign )<<15 ) + zExp;
- z.__padding = 0;
return z;
}
@@ -2832,7 +2831,6 @@ static floatx80 subFloatx80Sigs( struct roundingData *roundData, floatx80 a, flo
roundData->exception |= float_flag_invalid;
z.low = floatx80_default_nan_low;
z.high = floatx80_default_nan_high;
- z.__padding = 0;
return z;
}
if ( aExp == 0 ) {
@@ -2952,7 +2950,6 @@ floatx80 floatx80_mul( struct roundingData *roundData, floatx80 a, floatx80 b )
roundData->exception |= float_flag_invalid;
z.low = floatx80_default_nan_low;
z.high = floatx80_default_nan_high;
- z.__padding = 0;
return z;
}
return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
@@ -3018,7 +3015,6 @@ floatx80 floatx80_div( struct roundingData *roundData, floatx80 a, floatx80 b )
roundData->exception |= float_flag_invalid;
z.low = floatx80_default_nan_low;
z.high = floatx80_default_nan_high;
- z.__padding = 0;
return z;
}
roundData->exception |= float_flag_divbyzero;
@@ -3097,7 +3093,6 @@ floatx80 floatx80_rem( struct roundingData *roundData, floatx80 a, floatx80 b )
roundData->exception |= float_flag_invalid;
z.low = floatx80_default_nan_low;
z.high = floatx80_default_nan_high;
- z.__padding = 0;
return z;
}
normalizeFloatx80Subnormal( bSig, &bExp, &bSig );
@@ -3189,7 +3184,6 @@ floatx80 floatx80_sqrt( struct roundingData *roundData, floatx80 a )
roundData->exception |= float_flag_invalid;
z.low = floatx80_default_nan_low;
z.high = floatx80_default_nan_high;
- z.__padding = 0;
return z;
}
if ( aExp == 0 ) {
diff --git a/trunk/arch/arm/nwfpe/softfloat.h b/trunk/arch/arm/nwfpe/softfloat.h
index 978c699673c6..14151700b6b2 100644
--- a/trunk/arch/arm/nwfpe/softfloat.h
+++ b/trunk/arch/arm/nwfpe/softfloat.h
@@ -51,17 +51,11 @@ input or output the `floatx80' type will be defined.
Software IEC/IEEE floating-point types.
-------------------------------------------------------------------------------
*/
-typedef u32 float32;
-typedef u64 float64;
+typedef unsigned long int float32;
+typedef unsigned long long float64;
typedef struct {
-#ifdef __ARMEB__
- u16 __padding;
- u16 high;
-#else
- u16 high;
- u16 __padding;
-#endif
- u64 low;
+ unsigned short high;
+ unsigned long long low;
} floatx80;
/*
diff --git a/trunk/arch/arm/plat-omap/ocpi.c b/trunk/arch/arm/plat-omap/ocpi.c
index 2ede2ee8cae4..1fb16f9edfd5 100644
--- a/trunk/arch/arm/plat-omap/ocpi.c
+++ b/trunk/arch/arm/plat-omap/ocpi.c
@@ -25,6 +25,7 @@
#include
#include
+#include
#include
#include
#include
diff --git a/trunk/arch/arm26/kernel/process.c b/trunk/arch/arm26/kernel/process.c
index 15833a0057dd..9eb9964d32a7 100644
--- a/trunk/arch/arm26/kernel/process.c
+++ b/trunk/arch/arm26/kernel/process.c
@@ -74,13 +74,15 @@ __setup("hlt", hlt_setup);
void cpu_idle(void)
{
/* endless idle loop with no priority at all */
+ preempt_disable();
while (1) {
- while (!need_resched())
- cpu_relax();
- preempt_enable_no_resched();
- schedule();
- preempt_disable();
+ while (!need_resched()) {
+ local_irq_disable();
+ if (!need_resched() && !hlt_counter)
+ local_irq_enable();
+ }
}
+ schedule();
}
static char reboot_mode = 'h';
diff --git a/trunk/arch/arm26/kernel/ptrace.c b/trunk/arch/arm26/kernel/ptrace.c
index 4e6b7356a722..cf7e977d18c8 100644
--- a/trunk/arch/arm26/kernel/ptrace.c
+++ b/trunk/arch/arm26/kernel/ptrace.c
@@ -546,7 +546,7 @@ static int ptrace_setfpregs(struct task_struct *tsk, void *ufp)
sizeof(struct user_fp)) ? -EFAULT : 0;
}
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+static int do_ptrace(int request, struct task_struct *child, long addr, long data)
{
unsigned long tmp;
int ret;
@@ -665,6 +665,53 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
return ret;
}
+asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
+{
+ struct task_struct *child;
+ int ret;
+
+ lock_kernel();
+ ret = -EPERM;
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+ ret = security_ptrace(current->parent, current);
+ if (ret)
+ goto out;
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+ if (child)
+ get_task_struct(child);
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret == 0)
+ ret = do_ptrace(request, child, addr, data);
+
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
+ return ret;
+}
+
asmlinkage void syscall_trace(int why, struct pt_regs *regs)
{
unsigned long ip;
diff --git a/trunk/arch/cris/arch-v10/README.mm b/trunk/arch/cris/arch-v10/README.mm
index 517d1f027fe8..6f08903f3139 100644
--- a/trunk/arch/cris/arch-v10/README.mm
+++ b/trunk/arch/cris/arch-v10/README.mm
@@ -177,7 +177,7 @@ a fault before we have had time to jump into the real kernel segment (0xc0). Thi
Given the top-level Page Directory, the offset in that directory is calculated
using the upper 8 bits:
-static inline pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address)
+extern inline pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address)
{
return mm->pgd + (address >> PGDIR_SHIFT);
}
@@ -190,14 +190,14 @@ a fault before we have had time to jump into the real kernel segment (0xc0). Thi
Since the Middle Directory does not exist, it is a unity mapping:
-static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
+extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
{
return (pmd_t *) dir;
}
The Page Table provides the final lookup by using bits 13 to 23 as index:
-static inline pte_t * pte_offset(pmd_t * dir, unsigned long address)
+extern inline pte_t * pte_offset(pmd_t * dir, unsigned long address)
{
return (pte_t *) pmd_page(*dir) + ((address >> PAGE_SHIFT) &
(PTRS_PER_PTE - 1));
diff --git a/trunk/arch/cris/arch-v10/drivers/pcf8563.c b/trunk/arch/cris/arch-v10/drivers/pcf8563.c
index f2c55742e90c..201f4c90d961 100644
--- a/trunk/arch/cris/arch-v10/drivers/pcf8563.c
+++ b/trunk/arch/cris/arch-v10/drivers/pcf8563.c
@@ -19,6 +19,7 @@
*/
#include
+#include
#include
#include
#include
diff --git a/trunk/arch/cris/arch-v10/kernel/fasttimer.c b/trunk/arch/cris/arch-v10/kernel/fasttimer.c
index cac05a5e514c..094ff45ae85b 100644
--- a/trunk/arch/cris/arch-v10/kernel/fasttimer.c
+++ b/trunk/arch/cris/arch-v10/kernel/fasttimer.c
@@ -112,6 +112,7 @@
#include
#include
+#include
#include
#include
diff --git a/trunk/arch/cris/arch-v10/kernel/ptrace.c b/trunk/arch/cris/arch-v10/kernel/ptrace.c
index 6cbd34a27b90..130dd214e41d 100644
--- a/trunk/arch/cris/arch-v10/kernel/ptrace.c
+++ b/trunk/arch/cris/arch-v10/kernel/ptrace.c
@@ -76,11 +76,55 @@ ptrace_disable(struct task_struct *child)
* (in user space) where the result of the ptrace call is written (instead of
* being returned).
*/
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+asmlinkage int
+sys_ptrace(long request, long pid, long addr, long data)
{
+ struct task_struct *child;
int ret;
unsigned long __user *datap = (unsigned long __user *)data;
+ lock_kernel();
+ ret = -EPERM;
+
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+ ret = security_ptrace(current->parent, current);
+ if (ret)
+ goto out;
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+
+ if (child)
+ get_task_struct(child);
+
+ read_unlock(&tasklist_lock);
+
+ if (!child)
+ goto out;
+
+ ret = -EPERM;
+
+ if (pid == 1) /* Leave the init process alone! */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
+ goto out_tsk;
+
switch (request) {
/* Read word at location address. */
case PTRACE_PEEKTEXT:
@@ -245,7 +289,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
ret = ptrace_request(child, request, addr, data);
break;
}
-
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
return ret;
}
diff --git a/trunk/arch/cris/arch-v10/kernel/signal.c b/trunk/arch/cris/arch-v10/kernel/signal.c
index 19bcad05716f..693771961f85 100644
--- a/trunk/arch/cris/arch-v10/kernel/signal.c
+++ b/trunk/arch/cris/arch-v10/kernel/signal.c
@@ -476,7 +476,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
* OK, we're invoking a handler
*/
-static inline void
+extern inline void
handle_signal(int canrestart, unsigned long sig,
siginfo_t *info, struct k_sigaction *ka,
sigset_t *oldset, struct pt_regs * regs)
diff --git a/trunk/arch/cris/arch-v32/drivers/cryptocop.c b/trunk/arch/cris/arch-v32/drivers/cryptocop.c
index 501fa52d8d3a..ca72076c630a 100644
--- a/trunk/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/trunk/arch/cris/arch-v32/drivers/cryptocop.c
@@ -277,7 +277,7 @@ struct file_operations cryptocop_fops = {
static void free_cdesc(struct cryptocop_dma_desc *cdesc)
{
DEBUG(printk("free_cdesc: cdesc 0x%p, from_pool=%d\n", cdesc, cdesc->from_pool));
- kfree(cdesc->free_buf);
+ if (cdesc->free_buf) kfree(cdesc->free_buf);
if (cdesc->from_pool) {
unsigned long int flags;
@@ -2950,15 +2950,15 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
put_page(outpages[i]);
}
- kfree(digest_result);
- kfree(inpages);
- kfree(outpages);
+ if (digest_result) kfree(digest_result);
+ if (inpages) kfree(inpages);
+ if (outpages) kfree(outpages);
if (cop){
- kfree(cop->tfrm_op.indata);
- kfree(cop->tfrm_op.outdata);
+ if (cop->tfrm_op.indata) kfree(cop->tfrm_op.indata);
+ if (cop->tfrm_op.outdata) kfree(cop->tfrm_op.outdata);
kfree(cop);
}
- kfree(jc);
+ if (jc) kfree(jc);
DEBUG(print_lock_status());
diff --git a/trunk/arch/cris/arch-v32/drivers/nandflash.c b/trunk/arch/cris/arch-v32/drivers/nandflash.c
index 93ddea4d9564..fc2a619b035d 100644
--- a/trunk/arch/cris/arch-v32/drivers/nandflash.c
+++ b/trunk/arch/cris/arch-v32/drivers/nandflash.c
@@ -14,6 +14,7 @@
*
*/
+#include
#include
#include
#include
diff --git a/trunk/arch/cris/arch-v32/drivers/pcf8563.c b/trunk/arch/cris/arch-v32/drivers/pcf8563.c
index d788bda3578c..f894580b648b 100644
--- a/trunk/arch/cris/arch-v32/drivers/pcf8563.c
+++ b/trunk/arch/cris/arch-v32/drivers/pcf8563.c
@@ -18,6 +18,7 @@
*/
#include
+#include
#include
#include
#include
diff --git a/trunk/arch/cris/arch-v32/kernel/ptrace.c b/trunk/arch/cris/arch-v32/kernel/ptrace.c
index 5528b83a622b..208489da2a87 100644
--- a/trunk/arch/cris/arch-v32/kernel/ptrace.c
+++ b/trunk/arch/cris/arch-v32/kernel/ptrace.c
@@ -99,11 +99,55 @@ ptrace_disable(struct task_struct *child)
}
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+asmlinkage int
+sys_ptrace(long request, long pid, long addr, long data)
{
+ struct task_struct *child;
int ret;
unsigned long __user *datap = (unsigned long __user *)data;
+ lock_kernel();
+ ret = -EPERM;
+
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+ ret = security_ptrace(current->parent, current);
+ if (ret)
+ goto out;
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+
+ if (child)
+ get_task_struct(child);
+
+ read_unlock(&tasklist_lock);
+
+ if (!child)
+ goto out;
+
+ ret = -EPERM;
+
+ if (pid == 1) /* Leave the init process alone! */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
+ goto out_tsk;
+
switch (request) {
/* Read word at location address. */
case PTRACE_PEEKTEXT:
@@ -303,7 +347,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
ret = ptrace_request(child, request, addr, data);
break;
}
-
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
return ret;
}
diff --git a/trunk/arch/cris/arch-v32/kernel/signal.c b/trunk/arch/cris/arch-v32/kernel/signal.c
index 99e59b3eacf8..0a3614dab887 100644
--- a/trunk/arch/cris/arch-v32/kernel/signal.c
+++ b/trunk/arch/cris/arch-v32/kernel/signal.c
@@ -513,7 +513,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
}
/* Invoke a singal handler to, well, handle the signal. */
-static inline void
+extern inline void
handle_signal(int canrestart, unsigned long sig,
siginfo_t *info, struct k_sigaction *ka,
sigset_t *oldset, struct pt_regs * regs)
diff --git a/trunk/arch/cris/arch-v32/kernel/smp.c b/trunk/arch/cris/arch-v32/kernel/smp.c
index 13867f4fad16..957f551ba5ce 100644
--- a/trunk/arch/cris/arch-v32/kernel/smp.c
+++ b/trunk/arch/cris/arch-v32/kernel/smp.c
@@ -161,7 +161,6 @@ void __init smp_callin(void)
REG_WR(intr_vect, irq_regs[cpu], rw_mask, vect_mask);
unmask_irq(IPI_INTR_VECT);
unmask_irq(TIMER_INTR_VECT);
- preempt_disable();
local_irq_enable();
cpu_set(cpu, cpu_online_map);
diff --git a/trunk/arch/cris/kernel/process.c b/trunk/arch/cris/kernel/process.c
index 7c80afb10460..949a0e40e03c 100644
--- a/trunk/arch/cris/kernel/process.c
+++ b/trunk/arch/cris/kernel/process.c
@@ -218,9 +218,7 @@ void cpu_idle (void)
idle = default_idle;
idle();
}
- preempt_enable_no_resched();
schedule();
- preempt_disable();
}
}
diff --git a/trunk/arch/cris/mm/ioremap.c b/trunk/arch/cris/mm/ioremap.c
index 1780df3ed9e5..a92ac9877582 100644
--- a/trunk/arch/cris/mm/ioremap.c
+++ b/trunk/arch/cris/mm/ioremap.c
@@ -16,7 +16,7 @@
#include
#include
-static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
+extern inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
unsigned long phys_addr, pgprot_t prot)
{
unsigned long end;
diff --git a/trunk/arch/frv/kernel/process.c b/trunk/arch/frv/kernel/process.c
index 54a452136f00..3001b82b1514 100644
--- a/trunk/arch/frv/kernel/process.c
+++ b/trunk/arch/frv/kernel/process.c
@@ -77,20 +77,16 @@ void (*idle)(void) = core_sleep_idle;
*/
void cpu_idle(void)
{
- int cpu = smp_processor_id();
-
/* endless idle loop with no priority at all */
while (1) {
while (!need_resched()) {
- irq_stat[cpu].idle_timestamp = jiffies;
+ irq_stat[smp_processor_id()].idle_timestamp = jiffies;
if (!frv_dma_inprogress && idle)
idle();
}
- preempt_enable_no_resched();
schedule();
- preempt_disable();
}
}
diff --git a/trunk/arch/frv/kernel/ptrace.c b/trunk/arch/frv/kernel/ptrace.c
index f953484e7d59..cb335a14a315 100644
--- a/trunk/arch/frv/kernel/ptrace.c
+++ b/trunk/arch/frv/kernel/ptrace.c
@@ -106,11 +106,48 @@ void ptrace_enable(struct task_struct *child)
child->thread.frame0->__status |= REG__STATUS_STEP;
}
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
+ struct task_struct *child;
unsigned long tmp;
int ret;
+ lock_kernel();
+ ret = -EPERM;
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+ ret = security_ptrace(current->parent, current);
+ if (ret)
+ goto out;
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+ if (child)
+ get_task_struct(child);
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
+ goto out_tsk;
+
switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
@@ -314,6 +351,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
ret = -EIO;
break;
}
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
return ret;
}
diff --git a/trunk/arch/h8300/kernel/process.c b/trunk/arch/h8300/kernel/process.c
index fe21adf3e75e..27f1fce64ce4 100644
--- a/trunk/arch/h8300/kernel/process.c
+++ b/trunk/arch/h8300/kernel/process.c
@@ -53,18 +53,22 @@ asmlinkage void ret_from_fork(void);
#if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM)
void default_idle(void)
{
- local_irq_disable();
- if (!need_resched()) {
- local_irq_enable();
- /* XXX: race here! What if need_resched() gets set now? */
- __asm__("sleep");
- } else
- local_irq_enable();
+ while(1) {
+ if (!need_resched()) {
+ local_irq_enable();
+ __asm__("sleep");
+ local_irq_disable();
+ }
+ schedule();
+ }
}
#else
void default_idle(void)
{
- cpu_relax();
+ while(1) {
+ if (need_resched())
+ schedule();
+ }
}
#endif
void (*idle)(void) = default_idle;
@@ -77,13 +81,7 @@ void (*idle)(void) = default_idle;
*/
void cpu_idle(void)
{
- while (1) {
- while (!need_resched())
- idle();
- preempt_enable_no_resched();
- schedule();
- preempt_disable();
- }
+ idle();
}
void machine_restart(char * __unused)
diff --git a/trunk/arch/h8300/kernel/ptrace.c b/trunk/arch/h8300/kernel/ptrace.c
index 0ff6f79b0fed..a569fe4aa284 100644
--- a/trunk/arch/h8300/kernel/ptrace.c
+++ b/trunk/arch/h8300/kernel/ptrace.c
@@ -57,10 +57,43 @@ void ptrace_disable(struct task_struct *child)
h8300_disable_trace(child);
}
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
+ struct task_struct *child;
int ret;
+ lock_kernel();
+ ret = -EPERM;
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+ if (child)
+ get_task_struct(child);
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
+ goto out_tsk;
+
switch (request) {
case PTRACE_PEEKTEXT: /* read word at location addr. */
case PTRACE_PEEKDATA: {
@@ -218,6 +251,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
ret = -EIO;
break;
}
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
return ret;
}
diff --git a/trunk/arch/i386/Kconfig b/trunk/arch/i386/Kconfig
index dbf90ad6eac3..bac0da731ee3 100644
--- a/trunk/arch/i386/Kconfig
+++ b/trunk/arch/i386/Kconfig
@@ -997,21 +997,8 @@ source "drivers/Kconfig"
source "fs/Kconfig"
-menu "Instrumentation Support"
- depends on EXPERIMENTAL
-
source "arch/i386/oprofile/Kconfig"
-config KPROBES
- bool "Kprobes (EXPERIMENTAL)"
- help
- Kprobes allows you to trap at almost any kernel address and
- execute a callback function. register_kprobe() establishes
- a probepoint and specifies the callback. Kprobes is useful
- for kernel debugging, non-intrusive instrumentation and testing.
- If in doubt, say "N".
-endmenu
-
source "arch/i386/Kconfig.debug"
source "security/Kconfig"
diff --git a/trunk/arch/i386/Kconfig.debug b/trunk/arch/i386/Kconfig.debug
index c48b424dd640..5228c40a6fb2 100644
--- a/trunk/arch/i386/Kconfig.debug
+++ b/trunk/arch/i386/Kconfig.debug
@@ -22,6 +22,16 @@ config DEBUG_STACKOVERFLOW
This option will cause messages to be printed if free stack space
drops below a certain limit.
+config KPROBES
+ bool "Kprobes"
+ depends on DEBUG_KERNEL
+ help
+ Kprobes allows you to trap at almost any kernel address and
+ execute a callback function. register_kprobe() establishes
+ a probepoint and specifies the callback. Kprobes is useful
+ for kernel debugging, non-intrusive instrumentation and testing.
+ If in doubt, say "N".
+
config DEBUG_STACK_USAGE
bool "Stack utilization instrumentation"
depends on DEBUG_KERNEL
diff --git a/trunk/arch/i386/kernel/apic.c b/trunk/arch/i386/kernel/apic.c
index 496a2c9909fe..7c724ffa08bb 100644
--- a/trunk/arch/i386/kernel/apic.c
+++ b/trunk/arch/i386/kernel/apic.c
@@ -559,20 +559,14 @@ void __devinit setup_local_APIC(void)
* If Linux enabled the LAPIC against the BIOS default
* disable it down before re-entering the BIOS on shutdown.
* Otherwise the BIOS may get confused and not power-off.
- * Additionally clear all LVT entries before disable_local_APIC
- * for the case where Linux didn't enable the LAPIC.
*/
void lapic_shutdown(void)
{
- if (!cpu_has_apic)
+ if (!cpu_has_apic || !enabled_via_apicbase)
return;
local_irq_disable();
- clear_local_APIC();
-
- if (enabled_via_apicbase)
- disable_local_APIC();
-
+ disable_local_APIC();
local_irq_enable();
}
diff --git a/trunk/arch/i386/kernel/apm.c b/trunk/arch/i386/kernel/apm.c
index 003548b8735f..d2ef0c2aa93e 100644
--- a/trunk/arch/i386/kernel/apm.c
+++ b/trunk/arch/i386/kernel/apm.c
@@ -447,7 +447,8 @@ static char * apm_event_name[] = {
"system standby resume",
"capabilities change"
};
-#define NR_APM_EVENT_NAME ARRAY_SIZE(apm_event_name)
+#define NR_APM_EVENT_NAME \
+ (sizeof(apm_event_name) / sizeof(apm_event_name[0]))
typedef struct lookup_t {
int key;
@@ -478,7 +479,7 @@ static const lookup_t error_table[] = {
{ APM_NO_ERROR, "BIOS did not set a return code" },
{ APM_NOT_PRESENT, "No APM present" }
};
-#define ERROR_COUNT ARRAY_SIZE(error_table)
+#define ERROR_COUNT (sizeof(error_table)/sizeof(lookup_t))
/**
* apm_error - display an APM error
@@ -769,26 +770,8 @@ static int set_system_power_state(u_short state)
static int apm_do_idle(void)
{
u32 eax;
- u8 ret = 0;
- int idled = 0;
- int polling;
-
- polling = test_thread_flag(TIF_POLLING_NRFLAG);
- if (polling) {
- clear_thread_flag(TIF_POLLING_NRFLAG);
- smp_mb__after_clear_bit();
- }
- if (!need_resched()) {
- idled = 1;
- ret = apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &eax);
- }
- if (polling)
- set_thread_flag(TIF_POLLING_NRFLAG);
-
- if (!idled)
- return 0;
- if (ret) {
+ if (apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &eax)) {
static unsigned long t;
/* This always fails on some SMP boards running UP kernels.
diff --git a/trunk/arch/i386/kernel/cpu/common.c b/trunk/arch/i386/kernel/cpu/common.c
index c145fb30002e..74145a33cb0f 100644
--- a/trunk/arch/i386/kernel/cpu/common.c
+++ b/trunk/arch/i386/kernel/cpu/common.c
@@ -30,6 +30,8 @@ static int disable_x86_serial_nr __devinitdata = 1;
struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
+extern void mcheck_init(struct cpuinfo_x86 *c);
+
extern int disable_pse;
static void default_init(struct cpuinfo_x86 * c)
@@ -427,8 +429,9 @@ void __devinit identify_cpu(struct cpuinfo_x86 *c)
}
/* Init Machine Check Exception if available. */
+#ifdef CONFIG_X86_MCE
mcheck_init(c);
-
+#endif
if (c == &boot_cpu_data)
sysenter_setup();
enable_sep_cpu();
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/trunk/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 871366b83b3f..caa9f7711343 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -377,9 +377,10 @@ acpi_cpufreq_cpu_init (
arg0.buffer.length = 12;
arg0.buffer.pointer = (u8 *) arg0_buf;
- data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL);
+ data = kmalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL);
if (!data)
return (-ENOMEM);
+ memset(data, 0, sizeof(struct cpufreq_acpi_io));
acpi_io_data[cpu] = data;
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
index edcd626001da..73a5dc5b26b8 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
@@ -171,9 +171,10 @@ static int get_ranges (unsigned char *pst)
unsigned int speed;
u8 fid, vid;
- powernow_table = kzalloc((sizeof(struct cpufreq_frequency_table) * (number_scales + 1)), GFP_KERNEL);
+ powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) * (number_scales + 1)), GFP_KERNEL);
if (!powernow_table)
return -ENOMEM;
+ memset(powernow_table, 0, (sizeof(struct cpufreq_frequency_table) * (number_scales + 1)));
for (j=0 ; j < number_scales; j++) {
fid = *pst++;
@@ -304,13 +305,16 @@ static int powernow_acpi_init(void)
goto err0;
}
- acpi_processor_perf = kzalloc(sizeof(struct acpi_processor_performance),
+ acpi_processor_perf = kmalloc(sizeof(struct acpi_processor_performance),
GFP_KERNEL);
+
if (!acpi_processor_perf) {
retval = -ENOMEM;
goto err0;
}
+ memset(acpi_processor_perf, 0, sizeof(struct acpi_processor_performance));
+
if (acpi_processor_register_performance(acpi_processor_perf, 0)) {
retval = -EIO;
goto err1;
@@ -333,12 +337,14 @@ static int powernow_acpi_init(void)
goto err2;
}
- powernow_table = kzalloc((number_scales + 1) * (sizeof(struct cpufreq_frequency_table)), GFP_KERNEL);
+ powernow_table = kmalloc((number_scales + 1) * (sizeof(struct cpufreq_frequency_table)), GFP_KERNEL);
if (!powernow_table) {
retval = -ENOMEM;
goto err2;
}
+ memset(powernow_table, 0, ((number_scales + 1) * sizeof(struct cpufreq_frequency_table)));
+
pc.val = (unsigned long) acpi_processor_perf->states[0].control;
for (i = 0; i < number_scales; i++) {
u8 fid, vid;
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 68a1fc87f4ca..2d5c9adba0cd 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -462,6 +462,7 @@ static int check_supported_cpu(unsigned int cpu)
oldmask = current->cpus_allowed;
set_cpus_allowed(current, cpumask_of_cpu(cpu));
+ schedule();
if (smp_processor_id() != cpu) {
printk(KERN_ERR "limiting to cpu %u failed\n", cpu);
@@ -496,7 +497,9 @@ static int check_supported_cpu(unsigned int cpu)
out:
set_cpus_allowed(current, oldmask);
+ schedule();
return rc;
+
}
static int check_pst_table(struct powernow_k8_data *data, struct pst_s *pst, u8 maxvid)
@@ -910,6 +913,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
/* only run on specific CPU from here on */
oldmask = current->cpus_allowed;
set_cpus_allowed(current, cpumask_of_cpu(pol->cpu));
+ schedule();
if (smp_processor_id() != pol->cpu) {
printk(KERN_ERR "limiting to cpu %u failed\n", pol->cpu);
@@ -964,6 +968,8 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
err_out:
set_cpus_allowed(current, oldmask);
+ schedule();
+
return ret;
}
@@ -985,11 +991,12 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
if (!check_supported_cpu(pol->cpu))
return -ENODEV;
- data = kzalloc(sizeof(struct powernow_k8_data), GFP_KERNEL);
+ data = kmalloc(sizeof(struct powernow_k8_data), GFP_KERNEL);
if (!data) {
printk(KERN_ERR PFX "unable to alloc powernow_k8_data");
return -ENOMEM;
}
+ memset(data,0,sizeof(struct powernow_k8_data));
data->cpu = pol->cpu;
@@ -1019,6 +1026,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
/* only run on specific CPU from here on */
oldmask = current->cpus_allowed;
set_cpus_allowed(current, cpumask_of_cpu(pol->cpu));
+ schedule();
if (smp_processor_id() != pol->cpu) {
printk(KERN_ERR "limiting to cpu %u failed\n", pol->cpu);
@@ -1037,6 +1045,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
/* run on any CPU again */
set_cpus_allowed(current, oldmask);
+ schedule();
pol->governor = CPUFREQ_DEFAULT_GOVERNOR;
pol->cpus = cpu_core_map[pol->cpu];
@@ -1071,6 +1080,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
err_out:
set_cpus_allowed(current, oldmask);
+ schedule();
powernow_k8_cpu_exit_acpi(data);
kfree(data);
@@ -1106,14 +1116,17 @@ static unsigned int powernowk8_get (unsigned int cpu)
set_cpus_allowed(current, oldmask);
return 0;
}
-
+ preempt_disable();
+
if (query_current_values_with_pending_wait(data))
goto out;
khz = find_khz_freq_from_fid(data->currfid);
-out:
+ out:
+ preempt_enable_no_resched();
set_cpus_allowed(current, oldmask);
+
return khz;
}
diff --git a/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
index edb9873e27e3..1465974256c9 100644
--- a/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/trunk/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -67,7 +67,7 @@ static const struct cpu_id cpu_ids[] = {
[CPU_MP4HT_D0] = {15, 3, 4 },
[CPU_MP4HT_E0] = {15, 4, 1 },
};
-#define N_IDS ARRAY_SIZE(cpu_ids)
+#define N_IDS (sizeof(cpu_ids)/sizeof(cpu_ids[0]))
struct cpu_model
{
@@ -423,11 +423,12 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
}
}
- centrino_model[cpu] = kzalloc(sizeof(struct cpu_model), GFP_KERNEL);
+ centrino_model[cpu] = kmalloc(sizeof(struct cpu_model), GFP_KERNEL);
if (!centrino_model[cpu]) {
result = -ENOMEM;
goto err_unreg;
}
+ memset(centrino_model[cpu], 0, sizeof(struct cpu_model));
centrino_model[cpu]->model_name=NULL;
centrino_model[cpu]->max_freq = p.states[0].core_frequency * 1000;
diff --git a/trunk/arch/i386/kernel/cpu/mcheck/k7.c b/trunk/arch/i386/kernel/cpu/mcheck/k7.c
index fc5d5215e23d..7c6b9c73522f 100644
--- a/trunk/arch/i386/kernel/cpu/mcheck/k7.c
+++ b/trunk/arch/i386/kernel/cpu/mcheck/k7.c
@@ -68,7 +68,7 @@ static fastcall void k7_machine_check(struct pt_regs * regs, long error_code)
/* AMD K7 machine check is Intel like */
-void amd_mcheck_init(struct cpuinfo_x86 *c)
+void __devinit amd_mcheck_init(struct cpuinfo_x86 *c)
{
u32 l, h;
int i;
diff --git a/trunk/arch/i386/kernel/cpu/mcheck/mce.c b/trunk/arch/i386/kernel/cpu/mcheck/mce.c
index 6170af3c271a..2cf25d2ba0f1 100644
--- a/trunk/arch/i386/kernel/cpu/mcheck/mce.c
+++ b/trunk/arch/i386/kernel/cpu/mcheck/mce.c
@@ -16,7 +16,7 @@
#include "mce.h"
-int mce_disabled = 0;
+int mce_disabled __devinitdata = 0;
int nr_mce_banks;
EXPORT_SYMBOL_GPL(nr_mce_banks); /* non-fatal.o */
@@ -31,7 +31,7 @@ static fastcall void unexpected_machine_check(struct pt_regs * regs, long error_
void fastcall (*machine_check_vector)(struct pt_regs *, long error_code) = unexpected_machine_check;
/* This has to be run for each processor */
-void mcheck_init(struct cpuinfo_x86 *c)
+void __devinit mcheck_init(struct cpuinfo_x86 *c)
{
if (mce_disabled==1)
return;
diff --git a/trunk/arch/i386/kernel/cpu/mcheck/p4.c b/trunk/arch/i386/kernel/cpu/mcheck/p4.c
index fd2c459a31ef..1d1e885f500a 100644
--- a/trunk/arch/i386/kernel/cpu/mcheck/p4.c
+++ b/trunk/arch/i386/kernel/cpu/mcheck/p4.c
@@ -77,7 +77,7 @@ fastcall void smp_thermal_interrupt(struct pt_regs *regs)
}
/* P4/Xeon Thermal regulation detect and init */
-static void intel_init_thermal(struct cpuinfo_x86 *c)
+static void __devinit intel_init_thermal(struct cpuinfo_x86 *c)
{
u32 l, h;
unsigned int cpu = smp_processor_id();
@@ -231,7 +231,7 @@ static fastcall void intel_machine_check(struct pt_regs * regs, long error_code)
}
-void intel_p4_mcheck_init(struct cpuinfo_x86 *c)
+void __devinit intel_p4_mcheck_init(struct cpuinfo_x86 *c)
{
u32 l, h;
int i;
diff --git a/trunk/arch/i386/kernel/cpu/mcheck/p5.c b/trunk/arch/i386/kernel/cpu/mcheck/p5.c
index 94bc43d950cf..3a2e24baddc7 100644
--- a/trunk/arch/i386/kernel/cpu/mcheck/p5.c
+++ b/trunk/arch/i386/kernel/cpu/mcheck/p5.c
@@ -28,7 +28,7 @@ static fastcall void pentium_machine_check(struct pt_regs * regs, long error_cod
}
/* Set up machine check reporting for processors with Intel style MCE */
-void intel_p5_mcheck_init(struct cpuinfo_x86 *c)
+void __devinit intel_p5_mcheck_init(struct cpuinfo_x86 *c)
{
u32 l, h;
diff --git a/trunk/arch/i386/kernel/cpu/mcheck/p6.c b/trunk/arch/i386/kernel/cpu/mcheck/p6.c
index deeae42ce199..979b18bc95c1 100644
--- a/trunk/arch/i386/kernel/cpu/mcheck/p6.c
+++ b/trunk/arch/i386/kernel/cpu/mcheck/p6.c
@@ -79,7 +79,7 @@ static fastcall void intel_machine_check(struct pt_regs * regs, long error_code)
}
/* Set up machine check reporting for processors with Intel style MCE */
-void intel_p6_mcheck_init(struct cpuinfo_x86 *c)
+void __devinit intel_p6_mcheck_init(struct cpuinfo_x86 *c)
{
u32 l, h;
int i;
diff --git a/trunk/arch/i386/kernel/cpu/mcheck/winchip.c b/trunk/arch/i386/kernel/cpu/mcheck/winchip.c
index 9e424b6c293d..5b9d2dd411d3 100644
--- a/trunk/arch/i386/kernel/cpu/mcheck/winchip.c
+++ b/trunk/arch/i386/kernel/cpu/mcheck/winchip.c
@@ -22,7 +22,7 @@ static fastcall void winchip_machine_check(struct pt_regs * regs, long error_cod
}
/* Set up machine check reporting on the Winchip C6 series */
-void winchip_mcheck_init(struct cpuinfo_x86 *c)
+void __devinit winchip_mcheck_init(struct cpuinfo_x86 *c)
{
u32 lo, hi;
machine_check_vector = winchip_machine_check;
diff --git a/trunk/arch/i386/kernel/kprobes.c b/trunk/arch/i386/kernel/kprobes.c
index 32b0c24ab9a6..6345b430b105 100644
--- a/trunk/arch/i386/kernel/kprobes.c
+++ b/trunk/arch/i386/kernel/kprobes.c
@@ -31,16 +31,22 @@
#include
#include
#include
+#include
#include
#include
#include
#include
+static struct kprobe *current_kprobe;
+static unsigned long kprobe_status, kprobe_old_eflags, kprobe_saved_eflags;
+static struct kprobe *kprobe_prev;
+static unsigned long kprobe_status_prev, kprobe_old_eflags_prev, kprobe_saved_eflags_prev;
+static struct pt_regs jprobe_saved_regs;
+static long *jprobe_saved_esp;
+/* copy of the kernel stack at the probe fire time */
+static kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE];
void jprobe_return_end(void);
-DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
-DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
-
/*
* returns non-zero if opcode modifies the interrupt flag.
*/
@@ -85,30 +91,29 @@ void __kprobes arch_remove_kprobe(struct kprobe *p)
{
}
-static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb)
+static inline void save_previous_kprobe(void)
{
- kcb->prev_kprobe.kp = kprobe_running();
- kcb->prev_kprobe.status = kcb->kprobe_status;
- kcb->prev_kprobe.old_eflags = kcb->kprobe_old_eflags;
- kcb->prev_kprobe.saved_eflags = kcb->kprobe_saved_eflags;
+ kprobe_prev = current_kprobe;
+ kprobe_status_prev = kprobe_status;
+ kprobe_old_eflags_prev = kprobe_old_eflags;
+ kprobe_saved_eflags_prev = kprobe_saved_eflags;
}
-static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb)
+static inline void restore_previous_kprobe(void)
{
- __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp;
- kcb->kprobe_status = kcb->prev_kprobe.status;
- kcb->kprobe_old_eflags = kcb->prev_kprobe.old_eflags;
- kcb->kprobe_saved_eflags = kcb->prev_kprobe.saved_eflags;
+ current_kprobe = kprobe_prev;
+ kprobe_status = kprobe_status_prev;
+ kprobe_old_eflags = kprobe_old_eflags_prev;
+ kprobe_saved_eflags = kprobe_saved_eflags_prev;
}
-static inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
- struct kprobe_ctlblk *kcb)
+static inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs)
{
- __get_cpu_var(current_kprobe) = p;
- kcb->kprobe_saved_eflags = kcb->kprobe_old_eflags
+ current_kprobe = p;
+ kprobe_saved_eflags = kprobe_old_eflags
= (regs->eflags & (TF_MASK | IF_MASK));
if (is_IF_modifier(p->opcode))
- kcb->kprobe_saved_eflags &= ~IF_MASK;
+ kprobe_saved_eflags &= ~IF_MASK;
}
static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
@@ -122,7 +127,6 @@ static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
regs->eip = (unsigned long)&p->ainsn.insn;
}
-/* Called with kretprobe_lock held */
void __kprobes arch_prepare_kretprobe(struct kretprobe *rp,
struct pt_regs *regs)
{
@@ -153,15 +157,9 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
int ret = 0;
kprobe_opcode_t *addr = NULL;
unsigned long *lp;
- struct kprobe_ctlblk *kcb;
- /*
- * We don't want to be preempted for the entire
- * duration of kprobe processing
- */
+ /* We're in an interrupt, but this is clear and BUG()-safe. */
preempt_disable();
- kcb = get_kprobe_ctlblk();
-
/* Check if the application is using LDT entry for its code segment and
* calculate the address by reading the base address from the LDT entry.
*/
@@ -175,12 +173,15 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
}
/* Check we're not actually recursing */
if (kprobe_running()) {
+ /* We *are* holding lock here, so this is safe.
+ Disarm the probe we just hit, and ignore it. */
p = get_kprobe(addr);
if (p) {
- if (kcb->kprobe_status == KPROBE_HIT_SS &&
+ if (kprobe_status == KPROBE_HIT_SS &&
*p->ainsn.insn == BREAKPOINT_INSTRUCTION) {
regs->eflags &= ~TF_MASK;
- regs->eflags |= kcb->kprobe_saved_eflags;
+ regs->eflags |= kprobe_saved_eflags;
+ unlock_kprobes();
goto no_kprobe;
}
/* We have reentered the kprobe_handler(), since
@@ -189,23 +190,26 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
* just single step on the instruction of the new probe
* without calling any user handlers.
*/
- save_previous_kprobe(kcb);
- set_current_kprobe(p, regs, kcb);
+ save_previous_kprobe();
+ set_current_kprobe(p, regs);
p->nmissed++;
prepare_singlestep(p, regs);
- kcb->kprobe_status = KPROBE_REENTER;
+ kprobe_status = KPROBE_REENTER;
return 1;
} else {
- p = __get_cpu_var(current_kprobe);
+ p = current_kprobe;
if (p->break_handler && p->break_handler(p, regs)) {
goto ss_probe;
}
}
+ /* If it's not ours, can't be delete race, (we hold lock). */
goto no_kprobe;
}
+ lock_kprobes();
p = get_kprobe(addr);
if (!p) {
+ unlock_kprobes();
if (regs->eflags & VM_MASK) {
/* We are in virtual-8086 mode. Return 0 */
goto no_kprobe;
@@ -228,8 +232,8 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
goto no_kprobe;
}
- set_current_kprobe(p, regs, kcb);
- kcb->kprobe_status = KPROBE_HIT_ACTIVE;
+ kprobe_status = KPROBE_HIT_ACTIVE;
+ set_current_kprobe(p, regs);
if (p->pre_handler && p->pre_handler(p, regs))
/* handler has already set things up, so skip ss setup */
@@ -237,7 +241,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
ss_probe:
prepare_singlestep(p, regs);
- kcb->kprobe_status = KPROBE_HIT_SS;
+ kprobe_status = KPROBE_HIT_SS;
return 1;
no_kprobe:
@@ -265,10 +269,9 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
struct kretprobe_instance *ri = NULL;
struct hlist_head *head;
struct hlist_node *node, *tmp;
- unsigned long flags, orig_ret_address = 0;
+ unsigned long orig_ret_address = 0;
unsigned long trampoline_address =(unsigned long)&kretprobe_trampoline;
- spin_lock_irqsave(&kretprobe_lock, flags);
head = kretprobe_inst_table_head(current);
/*
@@ -307,15 +310,14 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address));
regs->eip = orig_ret_address;
- reset_current_kprobe();
- spin_unlock_irqrestore(&kretprobe_lock, flags);
+ unlock_kprobes();
preempt_enable_no_resched();
- /*
- * By returning a non-zero value, we are telling
- * kprobe_handler() that we don't want the post_handler
- * to run (and have re-enabled preemption)
- */
+ /*
+ * By returning a non-zero value, we are telling
+ * kprobe_handler() that we have handled unlocking
+ * and re-enabling preemption.
+ */
return 1;
}
@@ -341,8 +343,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
* that is atop the stack is the address following the copied instruction.
* We need to make it the address following the original instruction.
*/
-static void __kprobes resume_execution(struct kprobe *p,
- struct pt_regs *regs, struct kprobe_ctlblk *kcb)
+static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs)
{
unsigned long *tos = (unsigned long *)®s->esp;
unsigned long next_eip = 0;
@@ -352,7 +353,7 @@ static void __kprobes resume_execution(struct kprobe *p,
switch (p->ainsn.insn[0]) {
case 0x9c: /* pushfl */
*tos &= ~(TF_MASK | IF_MASK);
- *tos |= kcb->kprobe_old_eflags;
+ *tos |= kprobe_old_eflags;
break;
case 0xc3: /* ret/lret */
case 0xcb:
@@ -393,30 +394,27 @@ static void __kprobes resume_execution(struct kprobe *p,
/*
* Interrupts are disabled on entry as trap1 is an interrupt gate and they
- * remain disabled thoroughout this function.
+ * remain disabled thoroughout this function. And we hold kprobe lock.
*/
static inline int post_kprobe_handler(struct pt_regs *regs)
{
- struct kprobe *cur = kprobe_running();
- struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
-
- if (!cur)
+ if (!kprobe_running())
return 0;
- if ((kcb->kprobe_status != KPROBE_REENTER) && cur->post_handler) {
- kcb->kprobe_status = KPROBE_HIT_SSDONE;
- cur->post_handler(cur, regs, 0);
+ if ((kprobe_status != KPROBE_REENTER) && current_kprobe->post_handler) {
+ kprobe_status = KPROBE_HIT_SSDONE;
+ current_kprobe->post_handler(current_kprobe, regs, 0);
}
- resume_execution(cur, regs, kcb);
- regs->eflags |= kcb->kprobe_saved_eflags;
+ resume_execution(current_kprobe, regs);
+ regs->eflags |= kprobe_saved_eflags;
/*Restore back the original saved kprobes variables and continue. */
- if (kcb->kprobe_status == KPROBE_REENTER) {
- restore_previous_kprobe(kcb);
+ if (kprobe_status == KPROBE_REENTER) {
+ restore_previous_kprobe();
goto out;
}
- reset_current_kprobe();
+ unlock_kprobes();
out:
preempt_enable_no_resched();
@@ -431,19 +429,18 @@ static inline int post_kprobe_handler(struct pt_regs *regs)
return 1;
}
+/* Interrupts disabled, kprobe_lock held. */
static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
{
- struct kprobe *cur = kprobe_running();
- struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
-
- if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr))
+ if (current_kprobe->fault_handler
+ && current_kprobe->fault_handler(current_kprobe, regs, trapnr))
return 1;
- if (kcb->kprobe_status & KPROBE_HIT_SS) {
- resume_execution(cur, regs, kcb);
- regs->eflags |= kcb->kprobe_old_eflags;
+ if (kprobe_status & KPROBE_HIT_SS) {
+ resume_execution(current_kprobe, regs);
+ regs->eflags |= kprobe_old_eflags;
- reset_current_kprobe();
+ unlock_kprobes();
preempt_enable_no_resched();
}
return 0;
@@ -456,41 +453,39 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data)
{
struct die_args *args = (struct die_args *)data;
- int ret = NOTIFY_DONE;
-
switch (val) {
case DIE_INT3:
if (kprobe_handler(args->regs))
- ret = NOTIFY_STOP;
+ return NOTIFY_STOP;
break;
case DIE_DEBUG:
if (post_kprobe_handler(args->regs))
- ret = NOTIFY_STOP;
+ return NOTIFY_STOP;
break;
case DIE_GPF:
+ if (kprobe_running() &&
+ kprobe_fault_handler(args->regs, args->trapnr))
+ return NOTIFY_STOP;
+ break;
case DIE_PAGE_FAULT:
- /* kprobe_running() needs smp_processor_id() */
- preempt_disable();
if (kprobe_running() &&
kprobe_fault_handler(args->regs, args->trapnr))
- ret = NOTIFY_STOP;
- preempt_enable();
+ return NOTIFY_STOP;
break;
default:
break;
}
- return ret;
+ return NOTIFY_DONE;
}
int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
{
struct jprobe *jp = container_of(p, struct jprobe, kp);
unsigned long addr;
- struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
- kcb->jprobe_saved_regs = *regs;
- kcb->jprobe_saved_esp = ®s->esp;
- addr = (unsigned long)(kcb->jprobe_saved_esp);
+ jprobe_saved_regs = *regs;
+ jprobe_saved_esp = ®s->esp;
+ addr = (unsigned long)jprobe_saved_esp;
/*
* TBD: As Linus pointed out, gcc assumes that the callee
@@ -499,8 +494,7 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
* we also save and restore enough stack bytes to cover
* the argument area.
*/
- memcpy(kcb->jprobes_stack, (kprobe_opcode_t *)addr,
- MIN_STACK_SIZE(addr));
+ memcpy(jprobes_stack, (kprobe_opcode_t *) addr, MIN_STACK_SIZE(addr));
regs->eflags &= ~IF_MASK;
regs->eip = (unsigned long)(jp->entry);
return 1;
@@ -508,40 +502,36 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
void __kprobes jprobe_return(void)
{
- struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
-
+ preempt_enable_no_resched();
asm volatile (" xchgl %%ebx,%%esp \n"
" int3 \n"
" .globl jprobe_return_end \n"
" jprobe_return_end: \n"
" nop \n"::"b"
- (kcb->jprobe_saved_esp):"memory");
+ (jprobe_saved_esp):"memory");
}
int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
{
- struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
u8 *addr = (u8 *) (regs->eip - 1);
- unsigned long stack_addr = (unsigned long)(kcb->jprobe_saved_esp);
+ unsigned long stack_addr = (unsigned long)jprobe_saved_esp;
struct jprobe *jp = container_of(p, struct jprobe, kp);
if ((addr > (u8 *) jprobe_return) && (addr < (u8 *) jprobe_return_end)) {
- if (®s->esp != kcb->jprobe_saved_esp) {
+ if (®s->esp != jprobe_saved_esp) {
struct pt_regs *saved_regs =
- container_of(kcb->jprobe_saved_esp,
- struct pt_regs, esp);
+ container_of(jprobe_saved_esp, struct pt_regs, esp);
printk("current esp %p does not match saved esp %p\n",
- ®s->esp, kcb->jprobe_saved_esp);
+ ®s->esp, jprobe_saved_esp);
printk("Saved registers for jprobe %p\n", jp);
show_registers(saved_regs);
printk("Current registers\n");
show_registers(regs);
BUG();
}
- *regs = kcb->jprobe_saved_regs;
- memcpy((kprobe_opcode_t *) stack_addr, kcb->jprobes_stack,
+ *regs = jprobe_saved_regs;
+ memcpy((kprobe_opcode_t *) stack_addr, jprobes_stack,
MIN_STACK_SIZE(stack_addr));
- preempt_enable_no_resched();
return 1;
}
return 0;
diff --git a/trunk/arch/i386/kernel/ldt.c b/trunk/arch/i386/kernel/ldt.c
index 983f95707e11..fe1ffa55587d 100644
--- a/trunk/arch/i386/kernel/ldt.c
+++ b/trunk/arch/i386/kernel/ldt.c
@@ -18,7 +18,6 @@
#include
#include
#include
-#include
#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
static void flush_ldt(void *null)
diff --git a/trunk/arch/i386/kernel/mca.c b/trunk/arch/i386/kernel/mca.c
index 558bb207720f..8600faeea29d 100644
--- a/trunk/arch/i386/kernel/mca.c
+++ b/trunk/arch/i386/kernel/mca.c
@@ -132,7 +132,7 @@ static struct resource mca_standard_resources[] = {
{ .start = 0x100, .end = 0x107, .name = "POS (MCA)" }
};
-#define MCA_STANDARD_RESOURCES ARRAY_SIZE(mca_standard_resources)
+#define MCA_STANDARD_RESOURCES (sizeof(mca_standard_resources)/sizeof(struct resource))
/**
* mca_read_and_store_pos - read the POS registers into a memory buffer
diff --git a/trunk/arch/i386/kernel/process.c b/trunk/arch/i386/kernel/process.c
index 1cb261f225d5..7a14fdfd3af9 100644
--- a/trunk/arch/i386/kernel/process.c
+++ b/trunk/arch/i386/kernel/process.c
@@ -99,22 +99,14 @@ EXPORT_SYMBOL(enable_hlt);
*/
void default_idle(void)
{
- local_irq_enable();
-
if (!hlt_counter && boot_cpu_data.hlt_works_ok) {
- clear_thread_flag(TIF_POLLING_NRFLAG);
- smp_mb__after_clear_bit();
- while (!need_resched()) {
- local_irq_disable();
- if (!need_resched())
- safe_halt();
- else
- local_irq_enable();
- }
- set_thread_flag(TIF_POLLING_NRFLAG);
+ local_irq_disable();
+ if (!need_resched())
+ safe_halt();
+ else
+ local_irq_enable();
} else {
- while (!need_resched())
- cpu_relax();
+ cpu_relax();
}
}
#ifdef CONFIG_APM_MODULE
@@ -128,14 +120,29 @@ EXPORT_SYMBOL(default_idle);
*/
static void poll_idle (void)
{
+ int oldval;
+
local_irq_enable();
- asm volatile(
- "2:"
- "testl %0, %1;"
- "rep; nop;"
- "je 2b;"
- : : "i"(_TIF_NEED_RESCHED), "m" (current_thread_info()->flags));
+ /*
+ * Deal with another CPU just having chosen a thread to
+ * run here:
+ */
+ oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED);
+
+ if (!oldval) {
+ set_thread_flag(TIF_POLLING_NRFLAG);
+ asm volatile(
+ "2:"
+ "testl %0, %1;"
+ "rep; nop;"
+ "je 2b;"
+ : : "i"(_TIF_NEED_RESCHED), "m" (current_thread_info()->flags));
+
+ clear_thread_flag(TIF_POLLING_NRFLAG);
+ } else {
+ set_need_resched();
+ }
}
#ifdef CONFIG_HOTPLUG_CPU
@@ -172,9 +179,7 @@ static inline void play_dead(void)
*/
void cpu_idle(void)
{
- int cpu = smp_processor_id();
-
- set_thread_flag(TIF_POLLING_NRFLAG);
+ int cpu = raw_smp_processor_id();
/* endless idle loop with no priority at all */
while (1) {
@@ -196,9 +201,7 @@ void cpu_idle(void)
__get_cpu_var(irq_stat).idle_timestamp = jiffies;
idle();
}
- preempt_enable_no_resched();
schedule();
- preempt_disable();
}
}
@@ -241,12 +244,15 @@ static void mwait_idle(void)
{
local_irq_enable();
- while (!need_resched()) {
- __monitor((void *)¤t_thread_info()->flags, 0, 0);
- smp_mb();
- if (need_resched())
- break;
- __mwait(0, 0);
+ if (!need_resched()) {
+ set_thread_flag(TIF_POLLING_NRFLAG);
+ do {
+ __monitor((void *)¤t_thread_info()->flags, 0, 0);
+ if (need_resched())
+ break;
+ __mwait(0, 0);
+ } while (!need_resched());
+ clear_thread_flag(TIF_POLLING_NRFLAG);
}
}
diff --git a/trunk/arch/i386/kernel/ptrace.c b/trunk/arch/i386/kernel/ptrace.c
index 5ffbb4b7ad05..efd11f09c996 100644
--- a/trunk/arch/i386/kernel/ptrace.c
+++ b/trunk/arch/i386/kernel/ptrace.c
@@ -354,12 +354,49 @@ ptrace_set_thread_area(struct task_struct *child,
return 0;
}
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
+ struct task_struct *child;
struct user * dummy = NULL;
int i, ret;
unsigned long __user *datap = (unsigned long __user *)data;
+ lock_kernel();
+ ret = -EPERM;
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+ ret = security_ptrace(current->parent, current);
+ if (ret)
+ goto out;
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+ if (child)
+ get_task_struct(child);
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
+ goto out_tsk;
+
switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
@@ -626,7 +663,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
ret = ptrace_request(child, request, addr, data);
break;
}
- out_tsk:
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
return ret;
}
diff --git a/trunk/arch/i386/kernel/reboot_fixups.c b/trunk/arch/i386/kernel/reboot_fixups.c
index 10e21a4773dd..c9b87330aeea 100644
--- a/trunk/arch/i386/kernel/reboot_fixups.c
+++ b/trunk/arch/i386/kernel/reboot_fixups.c
@@ -10,7 +10,6 @@
#include
#include
-#include
static void cs5530a_warm_reset(struct pci_dev *dev)
{
@@ -43,7 +42,7 @@ void mach_reboot_fixups(void)
struct pci_dev *dev;
int i;
- for (i=0; i < ARRAY_SIZE(fixups_table); i++) {
+ for (i=0; i < (sizeof(fixups_table)/sizeof(fixups_table[0])); i++) {
cur = &(fixups_table[i]);
dev = pci_get_device(cur->vendor, cur->device, NULL);
if (!dev)
diff --git a/trunk/arch/i386/kernel/scx200.c b/trunk/arch/i386/kernel/scx200.c
index 9c968ae67c43..69e203a0d330 100644
--- a/trunk/arch/i386/kernel/scx200.c
+++ b/trunk/arch/i386/kernel/scx200.c
@@ -12,7 +12,6 @@
#include
#include
-#include
/* Verify that the configuration block really is there */
#define scx200_cb_probe(base) (inw((base) + SCx200_CBA) == (base))
diff --git a/trunk/arch/i386/kernel/setup.c b/trunk/arch/i386/kernel/setup.c
index fdfcb0cba9b4..b48ac635f3c1 100644
--- a/trunk/arch/i386/kernel/setup.c
+++ b/trunk/arch/i386/kernel/setup.c
@@ -129,7 +129,9 @@ struct drive_info_struct { char dummy[32]; } drive_info;
EXPORT_SYMBOL(drive_info);
#endif
struct screen_info screen_info;
+#ifdef CONFIG_VT
EXPORT_SYMBOL(screen_info);
+#endif
struct apm_info apm_info;
EXPORT_SYMBOL(apm_info);
struct sys_desc_table_struct {
diff --git a/trunk/arch/i386/kernel/smpboot.c b/trunk/arch/i386/kernel/smpboot.c
index bc5a9d97466b..01b618e73ecd 100644
--- a/trunk/arch/i386/kernel/smpboot.c
+++ b/trunk/arch/i386/kernel/smpboot.c
@@ -68,9 +68,11 @@ EXPORT_SYMBOL(smp_num_siblings);
/* Package ID of each logical CPU */
int phys_proc_id[NR_CPUS] __read_mostly = {[0 ... NR_CPUS-1] = BAD_APICID};
+EXPORT_SYMBOL(phys_proc_id);
/* Core ID of each logical CPU */
int cpu_core_id[NR_CPUS] __read_mostly = {[0 ... NR_CPUS-1] = BAD_APICID};
+EXPORT_SYMBOL(cpu_core_id);
cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly;
EXPORT_SYMBOL(cpu_sibling_map);
@@ -485,7 +487,6 @@ static void __devinit start_secondary(void *unused)
* things done here to the most necessary things.
*/
cpu_init();
- preempt_disable();
smp_callin();
while (!cpu_isset(smp_processor_id(), smp_commenced_mask))
rep_nop();
@@ -611,7 +612,7 @@ static inline void __inquire_remote_apic(int apicid)
printk("Inquiring remote APIC #%d...\n", apicid);
- for (i = 0; i < ARRAY_SIZE(regs); i++) {
+ for (i = 0; i < sizeof(regs) / sizeof(*regs); i++) {
printk("... APIC #%d %s: ", apicid, names[i]);
/*
diff --git a/trunk/arch/i386/oprofile/Kconfig b/trunk/arch/i386/oprofile/Kconfig
index d8a84088471a..5ade19801b97 100644
--- a/trunk/arch/i386/oprofile/Kconfig
+++ b/trunk/arch/i386/oprofile/Kconfig
@@ -1,3 +1,7 @@
+
+menu "Profiling support"
+ depends on EXPERIMENTAL
+
config PROFILING
bool "Profiling support (EXPERIMENTAL)"
help
@@ -15,3 +19,5 @@ config OPROFILE
If unsure, say N.
+endmenu
+
diff --git a/trunk/arch/i386/power/cpu.c b/trunk/arch/i386/power/cpu.c
index 50a0bef8c85f..1f1572692e0b 100644
--- a/trunk/arch/i386/power/cpu.c
+++ b/trunk/arch/i386/power/cpu.c
@@ -118,7 +118,6 @@ void __restore_processor_state(struct saved_context *ctxt)
fix_processor_context();
do_fpu_end();
mtrr_ap_init();
- mcheck_init(&boot_cpu_data);
}
void restore_processor_state(void)
diff --git a/trunk/arch/ia64/Kconfig b/trunk/arch/ia64/Kconfig
index d4de8a4814be..3b4248cff9a7 100644
--- a/trunk/arch/ia64/Kconfig
+++ b/trunk/arch/ia64/Kconfig
@@ -191,7 +191,6 @@ config IOSAPIC
config IA64_SGI_SN_XP
tristate "Support communication between SGI SSIs"
- depends on IA64_GENERIC || IA64_SGI_SN2
select IA64_UNCACHED_ALLOCATOR
help
An SGI machine can be divided into multiple Single System
@@ -427,21 +426,8 @@ config GENERIC_PENDING_IRQ
source "arch/ia64/hp/sim/Kconfig"
-menu "Instrumentation Support"
- depends on EXPERIMENTAL
-
source "arch/ia64/oprofile/Kconfig"
-config KPROBES
- bool "Kprobes (EXPERIMENTAL)"
- help
- Kprobes allows you to trap at almost any kernel address and
- execute a callback function. register_kprobe() establishes
- a probepoint and specifies the callback. Kprobes is useful
- for kernel debugging, non-intrusive instrumentation and testing.
- If in doubt, say "N".
-endmenu
-
source "arch/ia64/Kconfig.debug"
source "security/Kconfig"
diff --git a/trunk/arch/ia64/Kconfig.debug b/trunk/arch/ia64/Kconfig.debug
index de9d507ba0fd..fda67ac993d7 100644
--- a/trunk/arch/ia64/Kconfig.debug
+++ b/trunk/arch/ia64/Kconfig.debug
@@ -2,6 +2,17 @@ menu "Kernel hacking"
source "lib/Kconfig.debug"
+config KPROBES
+ bool "Kprobes"
+ depends on DEBUG_KERNEL
+ help
+ Kprobes allows you to trap at almost any kernel address and
+ execute a callback function. register_kprobe() establishes
+ a probepoint and specifies the callback. Kprobes is useful
+ for kernel debugging, non-intrusive instrumentation and testing.
+ If in doubt, say "N".
+
+
choice
prompt "Physical memory granularity"
default IA64_GRANULE_64MB
diff --git a/trunk/arch/ia64/hp/sim/simserial.c b/trunk/arch/ia64/hp/sim/simserial.c
index 19ee635eeb70..b42ec37be51c 100644
--- a/trunk/arch/ia64/hp/sim/simserial.c
+++ b/trunk/arch/ia64/hp/sim/simserial.c
@@ -642,8 +642,10 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
info->event = 0;
info->tty = 0;
if (info->blocked_open) {
- if (info->close_delay)
- schedule_timeout_interruptible(info->close_delay);
+ if (info->close_delay) {
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout(info->close_delay);
+ }
wake_up_interruptible(&info->open_wait);
}
info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
diff --git a/trunk/arch/ia64/ia32/ia32_ioctl.c b/trunk/arch/ia64/ia32/ia32_ioctl.c
index 88739394f6df..164b211f4174 100644
--- a/trunk/arch/ia64/ia32/ia32_ioctl.c
+++ b/trunk/arch/ia64/ia32/ia32_ioctl.c
@@ -29,8 +29,10 @@
#define CODE
#include "compat_ioctl.c"
+typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *);
+
#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl)
-#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL },
+#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL },
#define IOCTL_TABLE_START \
struct ioctl_trans ioctl_start[] = {
#define IOCTL_TABLE_END \
diff --git a/trunk/arch/ia64/kernel/kprobes.c b/trunk/arch/ia64/kernel/kprobes.c
index 96736a119c91..471086b808a4 100644
--- a/trunk/arch/ia64/kernel/kprobes.c
+++ b/trunk/arch/ia64/kernel/kprobes.c
@@ -26,6 +26,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -37,8 +38,13 @@
extern void jprobe_inst_return(void);
-DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
-DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
+/* kprobe_status settings */
+#define KPROBE_HIT_ACTIVE 0x00000001
+#define KPROBE_HIT_SS 0x00000002
+
+static struct kprobe *current_kprobe, *kprobe_prev;
+static unsigned long kprobe_status, kprobe_status_prev;
+static struct pt_regs jprobe_saved_regs;
enum instruction_type {A, I, M, F, B, L, X, u};
static enum instruction_type bundle_encoding[32][3] = {
@@ -307,22 +313,21 @@ static int __kprobes valid_kprobe_addr(int template, int slot,
return 0;
}
-static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb)
+static inline void save_previous_kprobe(void)
{
- kcb->prev_kprobe.kp = kprobe_running();
- kcb->prev_kprobe.status = kcb->kprobe_status;
+ kprobe_prev = current_kprobe;
+ kprobe_status_prev = kprobe_status;
}
-static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb)
+static inline void restore_previous_kprobe(void)
{
- __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp;
- kcb->kprobe_status = kcb->prev_kprobe.status;
+ current_kprobe = kprobe_prev;
+ kprobe_status = kprobe_status_prev;
}
-static inline void set_current_kprobe(struct kprobe *p,
- struct kprobe_ctlblk *kcb)
+static inline void set_current_kprobe(struct kprobe *p)
{
- __get_cpu_var(current_kprobe) = p;
+ current_kprobe = p;
}
static void kretprobe_trampoline(void)
@@ -342,11 +347,10 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
struct kretprobe_instance *ri = NULL;
struct hlist_head *head;
struct hlist_node *node, *tmp;
- unsigned long flags, orig_ret_address = 0;
+ unsigned long orig_ret_address = 0;
unsigned long trampoline_address =
((struct fnptr *)kretprobe_trampoline)->ip;
- spin_lock_irqsave(&kretprobe_lock, flags);
head = kretprobe_inst_table_head(current);
/*
@@ -385,19 +389,17 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address));
regs->cr_iip = orig_ret_address;
- reset_current_kprobe();
- spin_unlock_irqrestore(&kretprobe_lock, flags);
+ unlock_kprobes();
preempt_enable_no_resched();
- /*
- * By returning a non-zero value, we are telling
- * kprobe_handler() that we don't want the post_handler
- * to run (and have re-enabled preemption)
- */
+ /*
+ * By returning a non-zero value, we are telling
+ * kprobe_handler() that we have handled unlocking
+ * and re-enabling preemption.
+ */
return 1;
}
-/* Called with kretprobe_lock held */
void __kprobes arch_prepare_kretprobe(struct kretprobe *rp,
struct pt_regs *regs)
{
@@ -604,22 +606,17 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
int ret = 0;
struct pt_regs *regs = args->regs;
kprobe_opcode_t *addr = (kprobe_opcode_t *)instruction_pointer(regs);
- struct kprobe_ctlblk *kcb;
- /*
- * We don't want to be preempted for the entire
- * duration of kprobe processing
- */
preempt_disable();
- kcb = get_kprobe_ctlblk();
/* Handle recursion cases */
if (kprobe_running()) {
p = get_kprobe(addr);
if (p) {
- if ((kcb->kprobe_status == KPROBE_HIT_SS) &&
+ if ( (kprobe_status == KPROBE_HIT_SS) &&
(p->ainsn.inst_flag == INST_FLAG_BREAK_INST)) {
ia64_psr(regs)->ss = 0;
+ unlock_kprobes();
goto no_kprobe;
}
/* We have reentered the pre_kprobe_handler(), since
@@ -628,17 +625,17 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
* just single step on the instruction of the new probe
* without calling any user handlers.
*/
- save_previous_kprobe(kcb);
- set_current_kprobe(p, kcb);
+ save_previous_kprobe();
+ set_current_kprobe(p);
p->nmissed++;
prepare_ss(p, regs);
- kcb->kprobe_status = KPROBE_REENTER;
+ kprobe_status = KPROBE_REENTER;
return 1;
} else if (args->err == __IA64_BREAK_JPROBE) {
/*
* jprobe instrumented function just completed
*/
- p = __get_cpu_var(current_kprobe);
+ p = current_kprobe;
if (p->break_handler && p->break_handler(p, regs)) {
goto ss_probe;
}
@@ -648,8 +645,10 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
}
}
+ lock_kprobes();
p = get_kprobe(addr);
if (!p) {
+ unlock_kprobes();
if (!is_ia64_break_inst(regs)) {
/*
* The breakpoint instruction was removed right
@@ -666,8 +665,8 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
goto no_kprobe;
}
- set_current_kprobe(p, kcb);
- kcb->kprobe_status = KPROBE_HIT_ACTIVE;
+ kprobe_status = KPROBE_HIT_ACTIVE;
+ set_current_kprobe(p);
if (p->pre_handler && p->pre_handler(p, regs))
/*
@@ -679,7 +678,7 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
ss_probe:
prepare_ss(p, regs);
- kcb->kprobe_status = KPROBE_HIT_SS;
+ kprobe_status = KPROBE_HIT_SS;
return 1;
no_kprobe:
@@ -689,25 +688,23 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
static int __kprobes post_kprobes_handler(struct pt_regs *regs)
{
- struct kprobe *cur = kprobe_running();
- struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
-
- if (!cur)
+ if (!kprobe_running())
return 0;
- if ((kcb->kprobe_status != KPROBE_REENTER) && cur->post_handler) {
- kcb->kprobe_status = KPROBE_HIT_SSDONE;
- cur->post_handler(cur, regs, 0);
+ if ((kprobe_status != KPROBE_REENTER) && current_kprobe->post_handler) {
+ kprobe_status = KPROBE_HIT_SSDONE;
+ current_kprobe->post_handler(current_kprobe, regs, 0);
}
- resume_execution(cur, regs);
+ resume_execution(current_kprobe, regs);
/*Restore back the original saved kprobes variables and continue. */
- if (kcb->kprobe_status == KPROBE_REENTER) {
- restore_previous_kprobe(kcb);
+ if (kprobe_status == KPROBE_REENTER) {
+ restore_previous_kprobe();
goto out;
}
- reset_current_kprobe();
+
+ unlock_kprobes();
out:
preempt_enable_no_resched();
@@ -716,15 +713,16 @@ static int __kprobes post_kprobes_handler(struct pt_regs *regs)
static int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr)
{
- struct kprobe *cur = kprobe_running();
- struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
+ if (!kprobe_running())
+ return 0;
- if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr))
+ if (current_kprobe->fault_handler &&
+ current_kprobe->fault_handler(current_kprobe, regs, trapnr))
return 1;
- if (kcb->kprobe_status & KPROBE_HIT_SS) {
- resume_execution(cur, regs);
- reset_current_kprobe();
+ if (kprobe_status & KPROBE_HIT_SS) {
+ resume_execution(current_kprobe, regs);
+ unlock_kprobes();
preempt_enable_no_resched();
}
@@ -735,38 +733,31 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data)
{
struct die_args *args = (struct die_args *)data;
- int ret = NOTIFY_DONE;
-
switch(val) {
case DIE_BREAK:
if (pre_kprobes_handler(args))
- ret = NOTIFY_STOP;
+ return NOTIFY_STOP;
break;
case DIE_SS:
if (post_kprobes_handler(args->regs))
- ret = NOTIFY_STOP;
+ return NOTIFY_STOP;
break;
case DIE_PAGE_FAULT:
- /* kprobe_running() needs smp_processor_id() */
- preempt_disable();
- if (kprobe_running() &&
- kprobes_fault_handler(args->regs, args->trapnr))
- ret = NOTIFY_STOP;
- preempt_enable();
+ if (kprobes_fault_handler(args->regs, args->trapnr))
+ return NOTIFY_STOP;
default:
break;
}
- return ret;
+ return NOTIFY_DONE;
}
int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
{
struct jprobe *jp = container_of(p, struct jprobe, kp);
unsigned long addr = ((struct fnptr *)(jp->entry))->ip;
- struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
/* save architectural state */
- kcb->jprobe_saved_regs = *regs;
+ jprobe_saved_regs = *regs;
/* after rfi, execute the jprobe instrumented function */
regs->cr_iip = addr & ~0xFULL;
@@ -784,10 +775,7 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
{
- struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
-
- *regs = kcb->jprobe_saved_regs;
- preempt_enable_no_resched();
+ *regs = jprobe_saved_regs;
return 1;
}
diff --git a/trunk/arch/ia64/kernel/mca_drv.c b/trunk/arch/ia64/kernel/mca_drv.c
index eb39bc9c133b..f081c60ab206 100644
--- a/trunk/arch/ia64/kernel/mca_drv.c
+++ b/trunk/arch/ia64/kernel/mca_drv.c
@@ -88,7 +88,7 @@ mca_page_isolate(unsigned long paddr)
if (!ia64_phys_addr_valid(paddr))
return ISOLATE_NONE;
- if (!pfn_valid(paddr >> PAGE_SHIFT))
+ if (!pfn_valid(paddr))
return ISOLATE_NONE;
/* convert physical address to physical page number */
@@ -108,7 +108,6 @@ mca_page_isolate(unsigned long paddr)
return ISOLATE_NG;
/* add attribute 'Reserved' and register the page */
- get_page(p);
SetPageReserved(p);
page_isolate[num_page_isolate++] = p;
diff --git a/trunk/arch/ia64/kernel/perfmon.c b/trunk/arch/ia64/kernel/perfmon.c
index 410d4804fa6e..f7dfc107cb7b 100644
--- a/trunk/arch/ia64/kernel/perfmon.c
+++ b/trunk/arch/ia64/kernel/perfmon.c
@@ -4940,7 +4940,7 @@ sys_perfmonctl (int fd, int cmd, void __user *arg, int count)
if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT;
error_args:
- kfree(args_k);
+ if (args_k) kfree(args_k);
DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret));
diff --git a/trunk/arch/ia64/kernel/process.c b/trunk/arch/ia64/kernel/process.c
index 640d6908f8ec..051e050359e4 100644
--- a/trunk/arch/ia64/kernel/process.c
+++ b/trunk/arch/ia64/kernel/process.c
@@ -197,15 +197,11 @@ void
default_idle (void)
{
local_irq_enable();
- while (!need_resched()) {
- if (can_do_pal_halt) {
- local_irq_disable();
- if (!need_resched())
- safe_halt();
- local_irq_enable();
- } else
+ while (!need_resched())
+ if (can_do_pal_halt)
+ safe_halt();
+ else
cpu_relax();
- }
}
#ifdef CONFIG_HOTPLUG_CPU
@@ -267,16 +263,16 @@ void __attribute__((noreturn))
cpu_idle (void)
{
void (*mark_idle)(int) = ia64_mark_idle;
- int cpu = smp_processor_id();
- set_thread_flag(TIF_POLLING_NRFLAG);
/* endless idle loop with no priority at all */
while (1) {
- if (!need_resched()) {
- void (*idle)(void);
#ifdef CONFIG_SMP
+ if (!need_resched())
min_xtp();
#endif
+ while (!need_resched()) {
+ void (*idle)(void);
+
if (__get_cpu_var(cpu_idle_state))
__get_cpu_var(cpu_idle_state) = 0;
@@ -288,17 +284,17 @@ cpu_idle (void)
if (!idle)
idle = default_idle;
(*idle)();
- if (mark_idle)
- (*mark_idle)(0);
+ }
+
+ if (mark_idle)
+ (*mark_idle)(0);
+
#ifdef CONFIG_SMP
- normal_xtp();
+ normal_xtp();
#endif
- }
- preempt_enable_no_resched();
schedule();
- preempt_disable();
check_pgt_cache();
- if (cpu_is_offline(cpu))
+ if (cpu_is_offline(smp_processor_id()))
play_dead();
}
}
diff --git a/trunk/arch/ia64/kernel/setup.c b/trunk/arch/ia64/kernel/setup.c
index 3af6de36a482..fc56ca2da358 100644
--- a/trunk/arch/ia64/kernel/setup.c
+++ b/trunk/arch/ia64/kernel/setup.c
@@ -92,13 +92,6 @@ extern void efi_initialize_iomem_resources(struct resource *,
extern char _text[], _end[], _etext[];
unsigned long ia64_max_cacheline_size;
-
-int dma_get_cache_alignment(void)
-{
- return ia64_max_cacheline_size;
-}
-EXPORT_SYMBOL(dma_get_cache_alignment);
-
unsigned long ia64_iobase; /* virtual address for I/O accesses */
EXPORT_SYMBOL(ia64_iobase);
struct io_space io_space[MAX_IO_SPACES];
diff --git a/trunk/arch/ia64/kernel/smpboot.c b/trunk/arch/ia64/kernel/smpboot.c
index 8f44e7d2df66..400a48987124 100644
--- a/trunk/arch/ia64/kernel/smpboot.c
+++ b/trunk/arch/ia64/kernel/smpboot.c
@@ -399,7 +399,6 @@ start_secondary (void *unused)
Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id());
efi_map_pal_code();
cpu_init();
- preempt_disable();
smp_callin();
cpu_idle();
diff --git a/trunk/arch/ia64/oprofile/Kconfig b/trunk/arch/ia64/oprofile/Kconfig
index 97271ab484dc..56e6f614b04a 100644
--- a/trunk/arch/ia64/oprofile/Kconfig
+++ b/trunk/arch/ia64/oprofile/Kconfig
@@ -1,3 +1,7 @@
+
+menu "Profiling support"
+ depends on EXPERIMENTAL
+
config PROFILING
bool "Profiling support (EXPERIMENTAL)"
help
@@ -18,3 +22,5 @@ config OPROFILE
If unsure, say N.
+endmenu
+
diff --git a/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 1f500c81002c..7b03b8084ffc 100644
--- a/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/trunk/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -212,13 +212,13 @@ void pcibr_target_interrupt(struct sn_irq_info *sn_irq_info)
pdi_pcibus_info;
/* Disable the device's IRQ */
- pcireg_intr_enable_bit_clr(pcibus_info, (1 << bit));
+ pcireg_intr_enable_bit_clr(pcibus_info, bit);
/* Change the device's IRQ */
pcireg_intr_addr_addr_set(pcibus_info, bit, xtalk_addr);
/* Re-enable the device's IRQ */
- pcireg_intr_enable_bit_set(pcibus_info, (1 << bit));
+ pcireg_intr_enable_bit_set(pcibus_info, bit);
pcibr_force_interrupt(sn_irq_info);
}
diff --git a/trunk/arch/ia64/sn/pci/pcibr/pcibr_reg.c b/trunk/arch/ia64/sn/pci/pcibr/pcibr_reg.c
index 5d534091262c..4f718c3e93d3 100644
--- a/trunk/arch/ia64/sn/pci/pcibr/pcibr_reg.c
+++ b/trunk/arch/ia64/sn/pci/pcibr/pcibr_reg.c
@@ -131,7 +131,7 @@ void pcireg_intr_enable_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits)
__sn_clrq_relaxed(&ptr->tio.cp_int_enable, bits);
break;
case PCIBR_BRIDGETYPE_PIC:
- __sn_clrq_relaxed(&ptr->pic.p_int_enable, bits);
+ __sn_clrq_relaxed(&ptr->pic.p_int_enable, ~bits);
break;
default:
panic
diff --git a/trunk/arch/m32r/kernel/process.c b/trunk/arch/m32r/kernel/process.c
index cc4b571e5db7..ea13a8f4d8b0 100644
--- a/trunk/arch/m32r/kernel/process.c
+++ b/trunk/arch/m32r/kernel/process.c
@@ -104,9 +104,7 @@ void cpu_idle (void)
idle();
}
- preempt_enable_no_resched();
schedule();
- preempt_disable();
}
}
diff --git a/trunk/arch/m32r/kernel/smpboot.c b/trunk/arch/m32r/kernel/smpboot.c
index b90c54169fa5..640d592ea072 100644
--- a/trunk/arch/m32r/kernel/smpboot.c
+++ b/trunk/arch/m32r/kernel/smpboot.c
@@ -426,7 +426,6 @@ void __init smp_cpus_done(unsigned int max_cpus)
int __init start_secondary(void *unused)
{
cpu_init();
- preempt_disable();
smp_callin();
while (!cpu_isset(smp_processor_id(), smp_commenced_mask))
cpu_relax();
diff --git a/trunk/arch/m68k/atari/time.c b/trunk/arch/m68k/atari/time.c
index e79bbc94216d..6df7fb60dfea 100644
--- a/trunk/arch/m68k/atari/time.c
+++ b/trunk/arch/m68k/atari/time.c
@@ -212,8 +212,10 @@ int atari_tt_hwclk( int op, struct rtc_time *t )
* additionally the RTC_SET bit is set to prevent an update cycle.
*/
- while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP )
- schedule_timeout_interruptible(HWCLK_POLL_INTERVAL);
+ while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP ) {
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout(HWCLK_POLL_INTERVAL);
+ }
local_irq_save(flags);
RTC_WRITE( RTC_CONTROL, ctrl | RTC_SET );
diff --git a/trunk/arch/m68k/kernel/process.c b/trunk/arch/m68k/kernel/process.c
index 13d109328a42..11b1b90ba6ba 100644
--- a/trunk/arch/m68k/kernel/process.c
+++ b/trunk/arch/m68k/kernel/process.c
@@ -102,9 +102,7 @@ void cpu_idle(void)
while (1) {
while (!need_resched())
idle();
- preempt_enable_no_resched();
schedule();
- preempt_disable();
}
}
diff --git a/trunk/arch/m68k/kernel/ptrace.c b/trunk/arch/m68k/kernel/ptrace.c
index 7e54422685cf..f7f1d2e5b90b 100644
--- a/trunk/arch/m68k/kernel/ptrace.c
+++ b/trunk/arch/m68k/kernel/ptrace.c
@@ -121,11 +121,48 @@ void ptrace_disable(struct task_struct *child)
child->thread.work.syscall_trace = 0;
}
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
+ struct task_struct *child;
unsigned long tmp;
int i, ret = 0;
+ lock_kernel();
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED) {
+ ret = -EPERM;
+ goto out;
+ }
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ goto out;
+ }
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+ if (child)
+ get_task_struct(child);
+ read_unlock(&tasklist_lock);
+ if (unlikely(!child)) {
+ ret = -ESRCH;
+ goto out;
+ }
+
+ /* you may not mess with init */
+ if (unlikely(pid == 1)) {
+ ret = -EPERM;
+ goto out_tsk;
+ }
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret)
+ goto out_tsk;
+
switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
@@ -280,10 +317,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
ret = ptrace_request(child, request, addr, data);
break;
}
-
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
return ret;
out_eio:
- return -EIO;
+ ret = -EIO;
+ goto out_tsk;
}
asmlinkage void syscall_trace(void)
diff --git a/trunk/arch/m68knommu/Kconfig b/trunk/arch/m68knommu/Kconfig
index b96498120fe9..8520df9cee6d 100644
--- a/trunk/arch/m68knommu/Kconfig
+++ b/trunk/arch/m68knommu/Kconfig
@@ -71,11 +71,6 @@ config M5206e
help
Motorola ColdFire 5206e processor support.
-config M520x
- bool "MCF520x"
- help
- Freescale Coldfire 5207/5208 processor support.
-
config M523x
bool "MCF523x"
help
@@ -125,7 +120,7 @@ config M527x
config COLDFIRE
bool
- depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M5407)
+ depends on (M5206 || M5206e || M523x || M5249 || M527x || M5272 || M528x || M5307 || M5407)
default y
choice
@@ -327,12 +322,6 @@ config ELITE
help
Support for the Motorola M5206eLITE board.
-config M5208EVB
- bool "Freescale M5208EVB board support"
- depends on M520x
- help
- Support for the Freescale Coldfire M5208EVB.
-
config M5235EVB
bool "Freescale M5235EVB support"
depends on M523x
@@ -476,10 +465,10 @@ config ARNEWSH
default y
depends on (ARN5206 || ARN5307)
-config FREESCALE
+config MOTOROLA
bool
default y
- depends on (M5206eC3 || M5208EVB || M5235EVB || M5249C3 || M5271EVB || M5272C3 || M5275EVB || M5282EVB || M5307C3 || M5407C3)
+ depends on (M5206eC3 || M5235EVB || M5249C3 || M5271EVB || M5272C3 || M5275EVB || M5282EVB || M5307C3 || M5407C3)
config HW_FEITH
bool
diff --git a/trunk/arch/m68knommu/Makefile b/trunk/arch/m68knommu/Makefile
index b6b5c14e55fd..b8fdf191b8f6 100644
--- a/trunk/arch/m68knommu/Makefile
+++ b/trunk/arch/m68knommu/Makefile
@@ -14,7 +14,6 @@ platform-$(CONFIG_M68VZ328) := 68VZ328
platform-$(CONFIG_M68360) := 68360
platform-$(CONFIG_M5206) := 5206
platform-$(CONFIG_M5206e) := 5206e
-platform-$(CONFIG_M520x) := 520x
platform-$(CONFIG_M523x) := 523x
platform-$(CONFIG_M5249) := 5249
platform-$(CONFIG_M527x) := 527x
@@ -30,7 +29,7 @@ board-$(CONFIG_UCDIMM) := ucdimm
board-$(CONFIG_UCQUICC) := uCquicc
board-$(CONFIG_DRAGEN2) := de2
board-$(CONFIG_ARNEWSH) := ARNEWSH
-board-$(CONFIG_FREESCALE) := FREESCALE
+board-$(CONFIG_MOTOROLA) := MOTOROLA
board-$(CONFIG_M5235EVB) := M5235EVB
board-$(CONFIG_M5271EVB) := M5271EVB
board-$(CONFIG_M5275EVB) := M5275EVB
@@ -42,7 +41,6 @@ board-$(CONFIG_SECUREEDGEMP3) := MP3
board-$(CONFIG_CLEOPATRA) := CLEOPATRA
board-$(CONFIG_senTec) := senTec
board-$(CONFIG_SNEHA) := SNEHA
-board-$(CONFIG_M5208EVB) := M5208EVB
board-$(CONFIG_MOD5272) := MOD5272
BOARD := $(board-y)
@@ -58,7 +56,6 @@ MODEL := $(model-y)
#
cpuclass-$(CONFIG_M5206) := 5307
cpuclass-$(CONFIG_M5206e) := 5307
-cpuclass-$(CONFIG_M520x) := 5307
cpuclass-$(CONFIG_M523x) := 5307
cpuclass-$(CONFIG_M5249) := 5307
cpuclass-$(CONFIG_M527x) := 5307
@@ -83,7 +80,6 @@ export PLATFORM BOARD MODEL CPUCLASS
#
cflags-$(CONFIG_M5206) := -m5200 -Wa,-S -Wa,-m5200
cflags-$(CONFIG_M5206e) := -m5200 -Wa,-S -Wa,-m5200
-cflags-$(CONFIG_M520x) := -m5307 -Wa,-S -Wa,-m5307
cflags-$(CONFIG_M523x) := -m5307 -Wa,-S -Wa,-m5307
cflags-$(CONFIG_M5249) := -m5200 -Wa,-S -Wa,-m5200
cflags-$(CONFIG_M527x) := -m5307 -Wa,-S -Wa,-m5307
@@ -99,6 +95,7 @@ cflags-$(CONFIG_M68360) := -m68332
AFLAGS += $(cflags-y)
CFLAGS += $(cflags-y)
+CFLAGS += -fno-builtin
CFLAGS += -O1 -g
CFLAGS += -D__linux__
CFLAGS += -DUTS_SYSNAME=\"uClinux\"
diff --git a/trunk/arch/m68knommu/kernel/asm-offsets.c b/trunk/arch/m68knommu/kernel/asm-offsets.c
index b988c7bdc6e4..cd3ffe12653e 100644
--- a/trunk/arch/m68knommu/kernel/asm-offsets.c
+++ b/trunk/arch/m68knommu/kernel/asm-offsets.c
@@ -15,7 +15,6 @@
#include
#include
#include
-#include
#include
#define DEFINE(sym, val) \
diff --git a/trunk/arch/m68knommu/kernel/ptrace.c b/trunk/arch/m68knommu/kernel/ptrace.c
index 262ab8c72e5f..621d7b91ccfe 100644
--- a/trunk/arch/m68knommu/kernel/ptrace.c
+++ b/trunk/arch/m68knommu/kernel/ptrace.c
@@ -101,10 +101,43 @@ void ptrace_disable(struct task_struct *child)
put_reg(child, PT_SR, tmp);
}
-long arch_ptrace(truct task_struct *child, long request, long addr, long data)
+asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
+ struct task_struct *child;
int ret;
+ lock_kernel();
+ ret = -EPERM;
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+ if (child)
+ get_task_struct(child);
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
+ goto out_tsk;
+
switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
@@ -324,6 +357,10 @@ long arch_ptrace(truct task_struct *child, long request, long addr, long data)
ret = -EIO;
break;
}
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
return ret;
}
diff --git a/trunk/arch/m68knommu/kernel/setup.c b/trunk/arch/m68knommu/kernel/setup.c
index abb80fa2b940..a220345e9746 100644
--- a/trunk/arch/m68knommu/kernel/setup.c
+++ b/trunk/arch/m68knommu/kernel/setup.c
@@ -107,9 +107,6 @@ void (*mach_power_off)( void ) = NULL;
#if defined(CONFIG_M5206e)
#define CPU "COLDFIRE(m5206e)"
#endif
-#if defined(CONFIG_M520x)
- #define CPU "COLDFIRE(m520x)"
-#endif
#if defined(CONFIG_M523x)
#define CPU "COLDFIRE(m523x)"
#endif
@@ -135,7 +132,7 @@ void (*mach_power_off)( void ) = NULL;
#define CPU "COLDFIRE(m5407)"
#endif
#ifndef CPU
- #define CPU "UNKNOWN"
+ #define CPU "UNKOWN"
#endif
/* (es) */
diff --git a/trunk/arch/m68knommu/kernel/vmlinux.lds.S b/trunk/arch/m68knommu/kernel/vmlinux.lds.S
index 0eab92ca4b97..47f06787190d 100644
--- a/trunk/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/trunk/arch/m68knommu/kernel/vmlinux.lds.S
@@ -124,14 +124,6 @@
#define RAM_LENGTH 0x3e0000
#endif
-/*
- * The Freescale 5208EVB board has 32MB of RAM.
- */
-#if defined(CONFIG_M5208EVB)
-#define RAM_START 0x40020000
-#define RAM_LENGTH 0x01e00000
-#endif
-
/*
* The senTec COBRA5272 board has nearly the same memory layout as
* the M5272C3. We assume 16MiB ram.
@@ -283,7 +275,6 @@ SECTIONS {
*(__ksymtab_strings)
/* Built-in module parameters */
- . = ALIGN(4) ;
__start___param = .;
*(__param)
__stop___param = .;
diff --git a/trunk/arch/m68knommu/platform/520x/Makefile b/trunk/arch/m68knommu/platform/520x/Makefile
deleted file mode 100644
index e861b05106bc..000000000000
--- a/trunk/arch/m68knommu/platform/520x/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Makefile for the M5208 specific file.
-#
-
-#
-# If you want to play with the HW breakpoints then you will
-# need to add define this, which will give you a stack backtrace
-# on the console port whenever a DBG interrupt occurs. You have to
-# set up you HW breakpoints to trigger a DBG interrupt:
-#
-# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT
-# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT
-#
-
-ifdef CONFIG_FULLDEBUG
-AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
-endif
-
-obj-y := config.o
diff --git a/trunk/arch/m68knommu/platform/520x/config.c b/trunk/arch/m68knommu/platform/520x/config.c
deleted file mode 100644
index 71dea2e0f452..000000000000
--- a/trunk/arch/m68knommu/platform/520x/config.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/***************************************************************************/
-
-/*
- * linux/arch/m68knommu/platform/520x/config.c
- *
- * Copyright (C) 2005, Freescale (www.freescale.com)
- * Copyright (C) 2005, Intec Automation (mike@steroidmicros.com)
- * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com)
- * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com)
- */
-
-/***************************************************************************/
-
-#include
-#include
-#include
-#include
-#include
-
-/***************************************************************************/
-
-/*
- * DMA channel base address table.
- */
-unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS];
-unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
-
-/***************************************************************************/
-
-void coldfire_pit_tick(void);
-void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
-unsigned long coldfire_pit_offset(void);
-void coldfire_trap_init(void);
-void coldfire_reset(void);
-
-/***************************************************************************/
-
-/*
- * Program the vector to be an auto-vectored.
- */
-
-void mcf_autovector(unsigned int vec)
-{
- /* Everything is auto-vectored on the 520x devices */
-}
-
-/***************************************************************************/
-
-void config_BSP(char *commandp, int size)
-{
-#ifdef CONFIG_BOOTPARAM
- strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
- commandp[size-1] = 0;
-#else
- memset(commandp, 0, size);
-#endif
-
- mach_sched_init = coldfire_pit_init;
- mach_tick = coldfire_pit_tick;
- mach_gettimeoffset = coldfire_pit_offset;
- mach_trap_init = coldfire_trap_init;
- mach_reset = coldfire_reset;
-}
-
-/***************************************************************************/
diff --git a/trunk/arch/m68knommu/platform/5307/Makefile b/trunk/arch/m68knommu/platform/5307/Makefile
index 8d1619dc1ea6..6fe5a2b8fb08 100644
--- a/trunk/arch/m68knommu/platform/5307/Makefile
+++ b/trunk/arch/m68knommu/platform/5307/Makefile
@@ -19,7 +19,6 @@ endif
obj-$(CONFIG_COLDFIRE) += entry.o vectors.o ints.o
obj-$(CONFIG_M5206) += timers.o
obj-$(CONFIG_M5206e) += timers.o
-obj-$(CONFIG_M520x) += pit.o
obj-$(CONFIG_M523x) += pit.o
obj-$(CONFIG_M5249) += timers.o
obj-$(CONFIG_M527x) += pit.o
diff --git a/trunk/arch/m68knommu/platform/5307/head.S b/trunk/arch/m68knommu/platform/5307/head.S
index c30c462b99b1..7f4ba837901f 100644
--- a/trunk/arch/m68knommu/platform/5307/head.S
+++ b/trunk/arch/m68knommu/platform/5307/head.S
@@ -113,9 +113,6 @@
#define MEM_BASE 0x02000000
#define VBR_BASE 0x20000000 /* vectors in SRAM */
#endif
-#if defined(CONFIG_M5208EVB)
-#define MEM_BASE 0x40000000
-#endif
#ifndef MEM_BASE
#define MEM_BASE 0x00000000 /* memory base at address 0 */
diff --git a/trunk/arch/m68knommu/platform/5307/ints.c b/trunk/arch/m68knommu/platform/5307/ints.c
index a134fb2f0566..0117754d44f3 100644
--- a/trunk/arch/m68knommu/platform/5307/ints.c
+++ b/trunk/arch/m68knommu/platform/5307/ints.c
@@ -26,7 +26,6 @@
#include
#include
-#include
#include
#include
#include
diff --git a/trunk/arch/m68knommu/platform/5307/pit.c b/trunk/arch/m68knommu/platform/5307/pit.c
index 323f2677e49d..a9b2c2e7e280 100644
--- a/trunk/arch/m68knommu/platform/5307/pit.c
+++ b/trunk/arch/m68knommu/platform/5307/pit.c
@@ -3,7 +3,7 @@
/*
* pit.c -- Motorola ColdFire PIT timer. Currently this type of
* hardware timer only exists in the Motorola ColdFire
- * 5270/5271, 5282 and other CPUs.
+ * 5270/5271 and 5282 CPUs.
*
* Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com)
* Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com)
@@ -47,10 +47,10 @@ void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *))
icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 +
MCFINTC_ICR0 + MCFINT_PIT1);
- *icrp = ICR_INTRCONF;
+ *icrp = 0x2b; /* PIT1 with level 5, priority 3 */
- imrp = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFPIT_IMR);
- *imrp &= ~MCFPIT_IMR_IBIT;
+ imrp = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
+ *imrp &= ~(1 << (MCFINT_PIT1 - 32));
/* Set up PIT timer 1 as poll clock */
tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1);
@@ -70,7 +70,7 @@ unsigned long coldfire_pit_offset(void)
unsigned long pmr, pcntr, offset;
tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1);
- ipr = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFPIT_IMR);
+ ipr = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IPRH);
pmr = *(&tp->pmr);
pcntr = *(&tp->pcntr);
@@ -80,7 +80,7 @@ unsigned long coldfire_pit_offset(void)
* timer interupt is pending, then add on a ticks worth of time.
*/
offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr;
- if ((offset < (1000000 / HZ / 2)) && (*ipr & MCFPIT_IMR_IBIT))
+ if ((offset < (1000000 / HZ / 2)) && (*ipr & (1 << (MCFINT_PIT1 - 32))))
offset += 1000000 / HZ;
return offset;
}
diff --git a/trunk/arch/mips/Kconfig b/trunk/arch/mips/Kconfig
index e380a8322a94..0097a0d53b3b 100644
--- a/trunk/arch/mips/Kconfig
+++ b/trunk/arch/mips/Kconfig
@@ -958,7 +958,7 @@ config SOC_PNX8550
bool
select DMA_NONCOHERENT
select HW_HAS_PCI
- select SYS_HAS_CPU_MIPS32_R1
+ select SYS_HAS_CPU_R4X00
select SYS_SUPPORTS_32BIT_KERNEL
config SWAP_IO_SPACE
diff --git a/trunk/arch/mips/au1000/common/setup.c b/trunk/arch/mips/au1000/common/setup.c
index 4f21f42d096b..1ef15d5ef943 100644
--- a/trunk/arch/mips/au1000/common/setup.c
+++ b/trunk/arch/mips/au1000/common/setup.c
@@ -111,6 +111,17 @@ void __init plat_setup(void)
}
#endif
+#ifdef CONFIG_FB_E1356
+ if ((argptr = strstr(argptr, "video=")) == NULL) {
+ argptr = prom_getcmdline();
+#ifdef CONFIG_MIPS_PB1000
+ strcat(argptr, " video=e1356fb:system:pb1000,mmunalign:1");
+#else
+ strcat(argptr, " video=e1356fb:system:pb1500");
+#endif
+ }
+#endif
+
#ifdef CONFIG_FB_XPERT98
if ((argptr = strstr(argptr, "video=")) == NULL) {
argptr = prom_getcmdline();
diff --git a/trunk/arch/mips/boot/.gitignore b/trunk/arch/mips/boot/.gitignore
deleted file mode 100644
index ba63401c6e10..000000000000
--- a/trunk/arch/mips/boot/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-mkboot
-elf2ecoff
-zImage
-zImage.tmp
diff --git a/trunk/arch/mips/configs/ddb5476_defconfig b/trunk/arch/mips/configs/ddb5476_defconfig
index 326f3aa63741..b260e51eb517 100644
--- a/trunk/arch/mips/configs/ddb5476_defconfig
+++ b/trunk/arch/mips/configs/ddb5476_defconfig
@@ -658,6 +658,7 @@ CONFIG_FB=y
# CONFIG_FB_SMIVGX is not set
# CONFIG_FB_CYBLA is not set
# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_E1356 is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_VIRTUAL is not set
diff --git a/trunk/arch/mips/configs/jmr3927_defconfig b/trunk/arch/mips/configs/jmr3927_defconfig
index 6390a753e80b..9a728c2d8fd5 100644
--- a/trunk/arch/mips/configs/jmr3927_defconfig
+++ b/trunk/arch/mips/configs/jmr3927_defconfig
@@ -628,6 +628,7 @@ CONFIG_FB=y
# CONFIG_FB_SMIVGX is not set
# CONFIG_FB_CYBLA is not set
# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_E1356 is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_VIRTUAL is not set
diff --git a/trunk/arch/mips/configs/ocelot_3_defconfig b/trunk/arch/mips/configs/ocelot_3_defconfig
index f18d05c2ca77..ffb23fcab862 100644
--- a/trunk/arch/mips/configs/ocelot_3_defconfig
+++ b/trunk/arch/mips/configs/ocelot_3_defconfig
@@ -758,6 +758,7 @@ CONFIG_FB_MODE_HELPERS=y
# CONFIG_FB_SMIVGX is not set
# CONFIG_FB_CYBLA is not set
# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_E1356 is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_VIRTUAL is not set
diff --git a/trunk/arch/mips/configs/pnx8550-jbs_defconfig b/trunk/arch/mips/configs/pnx8550-jbs_defconfig
index 555837e4c06f..95f84d711912 100644
--- a/trunk/arch/mips/configs/pnx8550-jbs_defconfig
+++ b/trunk/arch/mips/configs/pnx8550-jbs_defconfig
@@ -129,7 +129,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
#
# CPU selection
#
-CONFIG_CPU_MIPS32_R1=y
+# CONFIG_CPU_MIPS32_R1 is not set
# CONFIG_CPU_MIPS32_R2 is not set
# CONFIG_CPU_MIPS64_R1 is not set
# CONFIG_CPU_MIPS64_R2 is not set
@@ -137,7 +137,7 @@ CONFIG_CPU_MIPS32_R1=y
# CONFIG_CPU_TX39XX is not set
# CONFIG_CPU_VR41XX is not set
# CONFIG_CPU_R4300 is not set
-# CONFIG_CPU_R4X00 is not set
+CONFIG_CPU_R4X00=y
# CONFIG_CPU_TX49XX is not set
# CONFIG_CPU_R5000 is not set
# CONFIG_CPU_R5432 is not set
@@ -148,11 +148,10 @@ CONFIG_CPU_MIPS32_R1=y
# CONFIG_CPU_RM7000 is not set
# CONFIG_CPU_RM9000 is not set
# CONFIG_CPU_SB1 is not set
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_MIPSR1=y
+CONFIG_SYS_HAS_CPU_R4X00=y
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
#
# Kernel type
@@ -163,11 +162,11 @@ CONFIG_PAGE_SIZE_4KB=y
# CONFIG_PAGE_SIZE_8KB is not set
# CONFIG_PAGE_SIZE_16KB is not set
# CONFIG_PAGE_SIZE_64KB is not set
-CONFIG_CPU_HAS_PREFETCH=y
# CONFIG_MIPS_MT is not set
# CONFIG_64BIT_PHYS_ADDR is not set
# CONFIG_CPU_ADVANCED is not set
CONFIG_CPU_HAS_LLSC=y
+CONFIG_CPU_HAS_LLDSCD=y
CONFIG_CPU_HAS_SYNC=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
diff --git a/trunk/arch/mips/configs/pnx8550-v2pci_defconfig b/trunk/arch/mips/configs/pnx8550-v2pci_defconfig
index 37bd8d5c865d..deb24c29ac0a 100644
--- a/trunk/arch/mips/configs/pnx8550-v2pci_defconfig
+++ b/trunk/arch/mips/configs/pnx8550-v2pci_defconfig
@@ -128,7 +128,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
#
# CPU selection
#
-CONFIG_CPU_MIPS32_R1=y
+# CONFIG_CPU_MIPS32_R1 is not set
# CONFIG_CPU_MIPS32_R2 is not set
# CONFIG_CPU_MIPS64_R1 is not set
# CONFIG_CPU_MIPS64_R2 is not set
@@ -136,7 +136,7 @@ CONFIG_CPU_MIPS32_R1=y
# CONFIG_CPU_TX39XX is not set
# CONFIG_CPU_VR41XX is not set
# CONFIG_CPU_R4300 is not set
-# CONFIG_CPU_R4X00 is not set
+CONFIG_CPU_R4X00=y
# CONFIG_CPU_TX49XX is not set
# CONFIG_CPU_R5000 is not set
# CONFIG_CPU_R5432 is not set
@@ -147,11 +147,10 @@ CONFIG_CPU_MIPS32_R1=y
# CONFIG_CPU_RM7000 is not set
# CONFIG_CPU_RM9000 is not set
# CONFIG_CPU_SB1 is not set
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_MIPSR1=y
+CONFIG_SYS_HAS_CPU_R4X00=y
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
#
# Kernel type
@@ -162,7 +161,6 @@ CONFIG_PAGE_SIZE_4KB=y
# CONFIG_PAGE_SIZE_8KB is not set
# CONFIG_PAGE_SIZE_16KB is not set
# CONFIG_PAGE_SIZE_64KB is not set
-CONFIG_CPU_HAS_PREFETCH=y
# CONFIG_MIPS_MT is not set
# CONFIG_64BIT_PHYS_ADDR is not set
CONFIG_CPU_ADVANCED=y
@@ -897,6 +895,7 @@ CONFIG_FB=y
# CONFIG_FB_SMIVGX is not set
# CONFIG_FB_CYBLA is not set
# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_E1356 is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_VIRTUAL is not set
diff --git a/trunk/arch/mips/configs/rbhma4500_defconfig b/trunk/arch/mips/configs/rbhma4500_defconfig
index 897420d39053..2bc61ca4ba08 100644
--- a/trunk/arch/mips/configs/rbhma4500_defconfig
+++ b/trunk/arch/mips/configs/rbhma4500_defconfig
@@ -876,6 +876,7 @@ CONFIG_FB_ATY_CT=y
# CONFIG_FB_SMIVGX is not set
# CONFIG_FB_CYBLA is not set
# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_E1356 is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_VIRTUAL is not set
diff --git a/trunk/arch/mips/ddb5xxx/common/rtc_ds1386.c b/trunk/arch/mips/ddb5xxx/common/rtc_ds1386.c
index 995896ac0e39..f5b11508ff2f 100644
--- a/trunk/arch/mips/ddb5xxx/common/rtc_ds1386.c
+++ b/trunk/arch/mips/ddb5xxx/common/rtc_ds1386.c
@@ -41,9 +41,7 @@ rtc_ds1386_get_time(void)
u8 byte;
u8 temp;
unsigned int year, month, day, hour, minute, second;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
/* let us freeze external registers */
byte = READ_RTC(0xB);
byte &= 0x3f;
@@ -62,7 +60,6 @@ rtc_ds1386_get_time(void)
/* enable time transfer */
byte |= 0x80;
WRITE_RTC(0xB, byte);
- spin_unlock_irqrestore(&rtc_lock, flags);
/* calc hour */
if (temp & 0x40) {
@@ -84,9 +81,7 @@ rtc_ds1386_set_time(unsigned long t)
u8 byte;
u8 temp;
u8 year, month, day, hour, minute, second;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
/* let us freeze external registers */
byte = READ_RTC(0xB);
byte &= 0x3f;
@@ -138,7 +133,6 @@ rtc_ds1386_set_time(unsigned long t)
if (second != READ_RTC(0x1)) {
WRITE_RTC(0x1, second);
}
- spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
diff --git a/trunk/arch/mips/dec/time.c b/trunk/arch/mips/dec/time.c
index 174822344131..dc7091caa7aa 100644
--- a/trunk/arch/mips/dec/time.c
+++ b/trunk/arch/mips/dec/time.c
@@ -37,25 +37,10 @@
#include
-/*
- * Returns true if a clock update is in progress
- */
-static inline unsigned char dec_rtc_is_updating(void)
-{
- unsigned char uip;
- unsigned long flags;
-
- spin_lock_irqsave(&rtc_lock, flags);
- uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP);
- spin_unlock_irqrestore(&rtc_lock, flags);
- return uip;
-}
-
static unsigned long dec_rtc_get_time(void)
{
unsigned int year, mon, day, hour, min, sec, real_year;
int i;
- unsigned long flags;
/* The Linux interpretation of the DS1287 clock register contents:
* When the Update-In-Progress (UIP) flag goes from 1 to 0, the
@@ -64,12 +49,11 @@ static unsigned long dec_rtc_get_time(void)
*/
/* read RTC exactly on falling edge of update flag */
for (i = 0; i < 1000000; i++) /* may take up to 1 second... */
- if (dec_rtc_is_updating())
+ if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)
break;
for (i = 0; i < 1000000; i++) /* must try at least 2.228 ms */
- if (!dec_rtc_is_updating())
+ if (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP))
break;
- spin_lock_irqsave(&rtc_lock, flags);
/* Isn't this overkill? UIP above should guarantee consistency */
do {
sec = CMOS_READ(RTC_SECONDS);
@@ -93,7 +77,6 @@ static unsigned long dec_rtc_get_time(void)
* of unused BBU RAM locations.
*/
real_year = CMOS_READ(RTC_DEC_YEAR);
- spin_unlock_irqrestore(&rtc_lock, flags);
year += real_year - 72 + 2000;
return mktime(year, mon, day, hour, min, sec);
@@ -112,8 +95,6 @@ static int dec_rtc_set_mmss(unsigned long nowtime)
int real_seconds, real_minutes, cmos_minutes;
unsigned char save_control, save_freq_select;
- /* irq are locally disabled here */
- spin_lock(&rtc_lock);
/* tell the clock it's being set */
save_control = CMOS_READ(RTC_CONTROL);
CMOS_WRITE((save_control | RTC_SET), RTC_CONTROL);
@@ -160,7 +141,6 @@ static int dec_rtc_set_mmss(unsigned long nowtime)
*/
CMOS_WRITE(save_control, RTC_CONTROL);
CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
- spin_unlock(&rtc_lock);
return retval;
}
diff --git a/trunk/arch/mips/jmr3927/common/rtc_ds1742.c b/trunk/arch/mips/jmr3927/common/rtc_ds1742.c
index 8b407d7dc460..1ae4318e1358 100644
--- a/trunk/arch/mips/jmr3927/common/rtc_ds1742.c
+++ b/trunk/arch/mips/jmr3927/common/rtc_ds1742.c
@@ -57,9 +57,7 @@ rtc_ds1742_get_time(void)
{
unsigned int year, month, day, hour, minute, second;
unsigned int century;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
CMOS_WRITE(RTC_READ, RTC_CONTROL);
second = BCD2BIN(CMOS_READ(RTC_SECONDS) & RTC_SECONDS_MASK);
minute = BCD2BIN(CMOS_READ(RTC_MINUTES));
@@ -69,7 +67,6 @@ rtc_ds1742_get_time(void)
year = BCD2BIN(CMOS_READ(RTC_YEAR));
century = BCD2BIN(CMOS_READ(RTC_CENTURY) & RTC_CENTURY_MASK);
CMOS_WRITE(0, RTC_CONTROL);
- spin_unlock_irqrestore(&rtc_lock, flags);
year += century * 100;
@@ -84,9 +81,7 @@ rtc_ds1742_set_time(unsigned long t)
u8 year, month, day, hour, minute, second;
u8 cmos_year, cmos_month, cmos_day, cmos_hour, cmos_minute, cmos_second;
int cmos_century;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
CMOS_WRITE(RTC_READ, RTC_CONTROL);
cmos_second = (u8)(CMOS_READ(RTC_SECONDS) & RTC_SECONDS_MASK);
cmos_minute = (u8)CMOS_READ(RTC_MINUTES);
@@ -144,7 +139,6 @@ rtc_ds1742_set_time(unsigned long t)
/* RTC_CENTURY and RTC_CONTROL share same address... */
CMOS_WRITE(cmos_century, RTC_CONTROL);
- spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
diff --git a/trunk/arch/mips/kernel/ioctl32.c b/trunk/arch/mips/kernel/ioctl32.c
index 9ea1fc748864..ed9b2da510be 100644
--- a/trunk/arch/mips/kernel/ioctl32.c
+++ b/trunk/arch/mips/kernel/ioctl32.c
@@ -26,8 +26,10 @@ long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
#define CODE
#include "compat_ioctl.c"
+typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *);
+
#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl)
-#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL },
+#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL },
#define IOCTL_TABLE_START \
struct ioctl_trans ioctl_start[] = {
#define IOCTL_TABLE_END \
diff --git a/trunk/arch/mips/kernel/irixsig.c b/trunk/arch/mips/kernel/irixsig.c
index dd118c60bcd0..908e63684208 100644
--- a/trunk/arch/mips/kernel/irixsig.c
+++ b/trunk/arch/mips/kernel/irixsig.c
@@ -502,7 +502,8 @@ asmlinkage int irix_sigpoll_sys(unsigned long __user *set,
while(1) {
long tmp = 0;
- expire = schedule_timeout_interruptible(expire);
+ current->state = TASK_INTERRUPTIBLE;
+ expire = schedule_timeout(expire);
for (i=0; i<=4; i++)
tmp |= (current->pending.signal.sig[i] & kset.sig[i]);
diff --git a/trunk/arch/mips/kernel/process.c b/trunk/arch/mips/kernel/process.c
index dd725779d91f..4fe3d5715c41 100644
--- a/trunk/arch/mips/kernel/process.c
+++ b/trunk/arch/mips/kernel/process.c
@@ -52,9 +52,7 @@ ATTRIB_NORET void cpu_idle(void)
while (!need_resched())
if (cpu_wait)
(*cpu_wait)();
- preempt_enable_no_resched();
schedule();
- preempt_disable();
}
}
diff --git a/trunk/arch/mips/kernel/ptrace.c b/trunk/arch/mips/kernel/ptrace.c
index 510da5fda567..f1b0f3e1f95b 100644
--- a/trunk/arch/mips/kernel/ptrace.c
+++ b/trunk/arch/mips/kernel/ptrace.c
@@ -174,10 +174,51 @@ int ptrace_setfpregs (struct task_struct *child, __u32 __user *data)
return 0;
}
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
+ struct task_struct *child;
int ret;
+#if 0
+ printk("ptrace(r=%d,pid=%d,addr=%08lx,data=%08lx)\n",
+ (int) request, (int) pid, (unsigned long) addr,
+ (unsigned long) data);
+#endif
+ lock_kernel();
+ ret = -EPERM;
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+ if ((ret = security_ptrace(current->parent, current)))
+ goto out;
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+ if (child)
+ get_task_struct(child);
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
+ goto out_tsk;
+
switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
@@ -278,7 +319,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
if (!cpu_has_dsp) {
tmp = 0;
ret = -EIO;
- goto out;
+ goto out_tsk;
}
if (child->thread.dsp.used_dsp) {
dregs = __get_dsp_regs(child);
@@ -292,14 +333,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
if (!cpu_has_dsp) {
tmp = 0;
ret = -EIO;
- goto out;
+ goto out_tsk;
}
tmp = child->thread.dsp.dspcontrol;
break;
default:
tmp = 0;
ret = -EIO;
- goto out;
+ goto out_tsk;
}
ret = put_user(tmp, (unsigned long __user *) data);
break;
@@ -454,7 +495,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
ret = ptrace_request(child, request, addr, data);
break;
}
- out:
+
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
return ret;
}
diff --git a/trunk/arch/mips/kernel/rtlx.c b/trunk/arch/mips/kernel/rtlx.c
index 1d855112bac2..8c81f3cb4e2d 100644
--- a/trunk/arch/mips/kernel/rtlx.c
+++ b/trunk/arch/mips/kernel/rtlx.c
@@ -20,42 +20,42 @@
#include
#include
#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
#include
#include
#include
-#include
+#include
+#include
#include
#include
+#include
#include
-#include
+#define RTLX_MAJOR 64
#define RTLX_TARG_VPE 1
-static struct rtlx_info *rtlx;
+struct rtlx_info *rtlx;
static int major;
static char module_name[] = "rtlx";
-static struct irqaction irq;
-static int irq_num;
-
-static inline int spacefree(int read, int write, int size)
-{
- if (read == write) {
- /*
- * never fill the buffer completely, so indexes are always
- * equal if empty and only empty, or !equal if data available
- */
- return size - 1;
- }
-
- return ((read + size - write) % size) - 1;
-}
+static inline int spacefree(int read, int write, int size);
static struct chan_waitqueues {
wait_queue_head_t rt_queue;
wait_queue_head_t lx_queue;
} channel_wqs[RTLX_CHANNELS];
+static struct irqaction irq;
+static int irq_num;
+
extern void *vpe_get_shared(int index);
static void rtlx_dispatch(struct pt_regs *regs)
@@ -63,8 +63,9 @@ static void rtlx_dispatch(struct pt_regs *regs)
do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_RTLX_IRQ, regs);
}
-static irqreturn_t rtlx_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t rtlx_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
+ irqreturn_t r = IRQ_HANDLED;
int i;
for (i = 0; i < RTLX_CHANNELS; i++) {
@@ -74,7 +75,30 @@ static irqreturn_t rtlx_interrupt(int irq, void *dev_id, struct pt_regs *regs)
wake_up_interruptible(&channel_wqs[i].lx_queue);
}
- return IRQ_HANDLED;
+ return r;
+}
+
+void dump_rtlx(void)
+{
+ int i;
+
+ printk("id 0x%lx state %d\n", rtlx->id, rtlx->state);
+
+ for (i = 0; i < RTLX_CHANNELS; i++) {
+ struct rtlx_channel *chan = &rtlx->channel[i];
+
+ printk(" rt_state %d lx_state %d buffer_size %d\n",
+ chan->rt_state, chan->lx_state, chan->buffer_size);
+
+ printk(" rt_read %d rt_write %d\n",
+ chan->rt_read, chan->rt_write);
+
+ printk(" lx_read %d lx_write %d\n",
+ chan->lx_read, chan->lx_write);
+
+ printk(" rt_buffer <%s>\n", chan->rt_buffer);
+ printk(" lx_buffer <%s>\n", chan->lx_buffer);
+ }
}
/* call when we have the address of the shared structure from the SP side. */
@@ -84,7 +108,7 @@ static int rtlx_init(struct rtlx_info *rtlxi)
if (rtlxi->id != RTLX_ID) {
printk(KERN_WARNING "no valid RTLX id at 0x%p\n", rtlxi);
- return -ENOEXEC;
+ return (-ENOEXEC);
}
/* initialise the wait queues */
@@ -96,8 +120,9 @@ static int rtlx_init(struct rtlx_info *rtlxi)
/* set up for interrupt handling */
memset(&irq, 0, sizeof(struct irqaction));
- if (cpu_has_vint)
+ if (cpu_has_vint) {
set_vi_handler(MIPS_CPU_RTLX_IRQ, rtlx_dispatch);
+ }
irq_num = MIPSCPU_INT_BASE + MIPS_CPU_RTLX_IRQ;
irq.handler = rtlx_interrupt;
@@ -107,8 +132,7 @@ static int rtlx_init(struct rtlx_info *rtlxi)
setup_irq(irq_num, &irq);
rtlx = rtlxi;
-
- return 0;
+ return (0);
}
/* only allow one open process at a time to open each channel */
@@ -123,36 +147,36 @@ static int rtlx_open(struct inode *inode, struct file *filp)
if (rtlx == NULL) {
struct rtlx_info **p;
if( (p = vpe_get_shared(RTLX_TARG_VPE)) == NULL) {
- printk(KERN_ERR "vpe_get_shared is NULL. "
- "Has an SP program been loaded?\n");
- return -EFAULT;
+ printk(" vpe_get_shared is NULL. Has an SP program been loaded?\n");
+ return (-EFAULT);
}
if (*p == NULL) {
- printk(KERN_ERR "vpe_shared %p %p\n", p, *p);
- return -EFAULT;
+ printk(" vpe_shared %p %p\n", p, *p);
+ return (-EFAULT);
}
if ((ret = rtlx_init(*p)) < 0)
- return ret;
+ return (ret);
}
chan = &rtlx->channel[minor];
- if (test_and_set_bit(RTLX_STATE_OPENED, &chan->lx_state))
- return -EBUSY;
+ /* already open? */
+ if (chan->lx_state == RTLX_STATE_OPENED)
+ return (-EBUSY);
- return 0;
+ chan->lx_state = RTLX_STATE_OPENED;
+ return (0);
}
static int rtlx_release(struct inode *inode, struct file *filp)
{
- int minor = MINOR(inode->i_rdev);
-
- clear_bit(RTLX_STATE_OPENED, &rtlx->channel[minor].lx_state);
- smp_mb__after_clear_bit();
+ int minor;
- return 0;
+ minor = MINOR(inode->i_rdev);
+ rtlx->channel[minor].lx_state = RTLX_STATE_UNUSED;
+ return (0);
}
static unsigned int rtlx_poll(struct file *file, poll_table * wait)
@@ -175,13 +199,12 @@ static unsigned int rtlx_poll(struct file *file, poll_table * wait)
if (spacefree(chan->rt_read, chan->rt_write, chan->buffer_size))
mask |= POLLOUT | POLLWRNORM;
- return mask;
+ return (mask);
}
static ssize_t rtlx_read(struct file *file, char __user * buffer, size_t count,
loff_t * ppos)
{
- unsigned long failed;
size_t fl = 0L;
int minor;
struct rtlx_channel *lx;
@@ -193,7 +216,7 @@ static ssize_t rtlx_read(struct file *file, char __user * buffer, size_t count,
/* data available? */
if (lx->lx_write == lx->lx_read) {
if (file->f_flags & O_NONBLOCK)
- return 0; /* -EAGAIN makes cat whinge */
+ return (0); // -EAGAIN makes cat whinge
/* go to sleep */
add_wait_queue(&channel_wqs[minor].lx_queue, &wait);
@@ -209,39 +232,39 @@ static ssize_t rtlx_read(struct file *file, char __user * buffer, size_t count,
}
/* find out how much in total */
- count = min(count,
- (size_t)(lx->lx_write + lx->buffer_size - lx->lx_read) % lx->buffer_size);
+ count = min( count,
+ (size_t)(lx->lx_write + lx->buffer_size - lx->lx_read) % lx->buffer_size);
/* then how much from the read pointer onwards */
- fl = min(count, (size_t)lx->buffer_size - lx->lx_read);
+ fl = min( count, (size_t)lx->buffer_size - lx->lx_read);
- failed = copy_to_user (buffer, &lx->lx_buffer[lx->lx_read], fl);
- if (failed) {
- count = fl - failed;
- goto out;
- }
+ copy_to_user (buffer, &lx->lx_buffer[lx->lx_read], fl);
/* and if there is anything left at the beginning of the buffer */
- if (count - fl) {
- failed = copy_to_user (buffer + fl, lx->lx_buffer, count - fl);
- if (failed) {
- count -= failed;
- goto out;
- }
- }
+ if ( count - fl )
+ copy_to_user (buffer + fl, lx->lx_buffer, count - fl);
-out:
/* update the index */
lx->lx_read += count;
lx->lx_read %= lx->buffer_size;
- return count;
+ return (count);
+}
+
+static inline int spacefree(int read, int write, int size)
+{
+ if (read == write) {
+ /* never fill the buffer completely, so indexes are always equal if empty
+ and only empty, or !equal if data available */
+ return (size - 1);
+ }
+
+ return ((read + size - write) % size) - 1;
}
static ssize_t rtlx_write(struct file *file, const char __user * buffer,
size_t count, loff_t * ppos)
{
- unsigned long failed;
int minor;
struct rtlx_channel *rt;
size_t fl;
@@ -254,7 +277,7 @@ static ssize_t rtlx_write(struct file *file, const char __user * buffer,
if (!spacefree(rt->rt_read, rt->rt_write, rt->buffer_size)) {
if (file->f_flags & O_NONBLOCK)
- return -EAGAIN;
+ return (-EAGAIN);
add_wait_queue(&channel_wqs[minor].rt_queue, &wait);
set_current_state(TASK_INTERRUPTIBLE);
@@ -267,64 +290,52 @@ static ssize_t rtlx_write(struct file *file, const char __user * buffer,
}
/* total number of bytes to copy */
- count = min(count, (size_t)spacefree(rt->rt_read, rt->rt_write, rt->buffer_size) );
+ count = min( count, (size_t)spacefree(rt->rt_read, rt->rt_write, rt->buffer_size) );
/* first bit from write pointer to the end of the buffer, or count */
fl = min(count, (size_t) rt->buffer_size - rt->rt_write);
- failed = copy_from_user(&rt->rt_buffer[rt->rt_write], buffer, fl);
- if (failed) {
- count = fl - failed;
- goto out;
- }
+ copy_from_user(&rt->rt_buffer[rt->rt_write], buffer, fl);
/* if there's any left copy to the beginning of the buffer */
- if (count - fl) {
- failed = copy_from_user(rt->rt_buffer, buffer + fl, count - fl);
- if (failed) {
- count -= failed;
- goto out;
- }
- }
+ if( count - fl )
+ copy_from_user(rt->rt_buffer, buffer + fl, count - fl);
-out:
rt->rt_write += count;
rt->rt_write %= rt->buffer_size;
- return count;
+ return(count);
}
static struct file_operations rtlx_fops = {
- .owner = THIS_MODULE,
- .open = rtlx_open,
- .release = rtlx_release,
- .write = rtlx_write,
- .read = rtlx_read,
- .poll = rtlx_poll
+ .owner = THIS_MODULE,
+ .open = rtlx_open,
+ .release = rtlx_release,
+ .write = rtlx_write,
+ .read = rtlx_read,
+ .poll = rtlx_poll
};
-static char register_chrdev_failed[] __initdata =
- KERN_ERR "rtlx_module_init: unable to register device\n";
-
-static int __init rtlx_module_init(void)
+static int rtlx_module_init(void)
{
- major = register_chrdev(0, module_name, &rtlx_fops);
- if (major < 0) {
- printk(register_chrdev_failed);
- return major;
+ if ((major = register_chrdev(RTLX_MAJOR, module_name, &rtlx_fops)) < 0) {
+ printk("rtlx_module_init: unable to register device\n");
+ return (-EBUSY);
}
- return 0;
+ if (major == 0)
+ major = RTLX_MAJOR;
+
+ return (0);
}
-static void __exit rtlx_module_exit(void)
+static void rtlx_module_exit(void)
{
unregister_chrdev(major, module_name);
}
module_init(rtlx_module_init);
module_exit(rtlx_module_exit);
-
MODULE_DESCRIPTION("MIPS RTLX");
-MODULE_AUTHOR("Elizabeth Clarke, MIPS Technologies, Inc.");
+MODULE_AUTHOR("Elizabeth Clarke, MIPS Technologies, Inc");
MODULE_LICENSE("GPL");
diff --git a/trunk/arch/mips/kernel/signal.c b/trunk/arch/mips/kernel/signal.c
index 05e09eedabff..9202a17db8f7 100644
--- a/trunk/arch/mips/kernel/signal.c
+++ b/trunk/arch/mips/kernel/signal.c
@@ -384,6 +384,9 @@ int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
return 0;
}
+extern void setup_rt_frame_n32(struct k_sigaction * ka,
+ struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info);
+
static inline int handle_signal(unsigned long sig, siginfo_t *info,
struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
{
diff --git a/trunk/arch/mips/kernel/signal32.c b/trunk/arch/mips/kernel/signal32.c
index e315d3f6aa6e..dbe821303125 100644
--- a/trunk/arch/mips/kernel/signal32.c
+++ b/trunk/arch/mips/kernel/signal32.c
@@ -647,8 +647,8 @@ static inline void *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
return (void *)((sp - frame_size) & ALMASK);
}
-int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
- int signr, sigset_t *set)
+void setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
+ int signr, sigset_t *set)
{
struct sigframe *frame;
int err = 0;
@@ -694,15 +694,13 @@ int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
current->comm, current->pid,
frame, regs->cp0_epc, frame->sf_code);
#endif
- return 1;
+ return;
give_sigsegv:
force_sigsegv(signr, current);
- return 0;
}
-int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
- int signr, sigset_t *set, siginfo_t *info)
+void setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info)
{
struct rt_sigframe32 *frame;
int err = 0;
@@ -765,11 +763,10 @@ int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs,
current->comm, current->pid,
frame, regs->cp0_epc, frame->rs_code);
#endif
- return 1;
+ return;
give_sigsegv:
force_sigsegv(signr, current);
- return 0;
}
static inline int handle_signal(unsigned long sig, siginfo_t *info,
diff --git a/trunk/arch/mips/kernel/smp.c b/trunk/arch/mips/kernel/smp.c
index 25472fcaf715..fcacf1aae98a 100644
--- a/trunk/arch/mips/kernel/smp.c
+++ b/trunk/arch/mips/kernel/smp.c
@@ -82,7 +82,7 @@ extern ATTRIB_NORET void cpu_idle(void);
*/
asmlinkage void start_secondary(void)
{
- unsigned int cpu;
+ unsigned int cpu = smp_processor_id();
cpu_probe();
cpu_report();
@@ -95,8 +95,6 @@ asmlinkage void start_secondary(void)
*/
calibrate_delay();
- preempt_disable();
- cpu = smp_processor_id();
cpu_data[cpu].udelay_val = loops_per_jiffy;
prom_smp_finish();
diff --git a/trunk/arch/mips/kernel/vpe.c b/trunk/arch/mips/kernel/vpe.c
index 06be405be399..97fefcc9dbe7 100644
--- a/trunk/arch/mips/kernel/vpe.c
+++ b/trunk/arch/mips/kernel/vpe.c
@@ -58,6 +58,10 @@
typedef void *vpe_handle;
+// defined here because the kernel module loader doesn't have
+// anything to do with it.
+#define SHN_MIPS_SCOMMON 0xff03
+
#ifndef ARCH_SHF_SMALL
#define ARCH_SHF_SMALL 0
#endif
@@ -65,8 +69,11 @@ typedef void *vpe_handle;
/* If this is set, the section belongs in the init part of the module */
#define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
+// temp number,
+#define VPE_MAJOR 63
+
static char module_name[] = "vpe";
-static int major;
+static int major = 0;
/* grab the likely amount of memory we will need. */
#ifdef CONFIG_MIPS_VPE_LOADER_TOM
@@ -91,7 +98,22 @@ enum tc_state {
TC_STATE_DYNAMIC
};
-struct vpe {
+struct vpe;
+typedef struct tc {
+ enum tc_state state;
+ int index;
+
+ /* parent VPE */
+ struct vpe *pvpe;
+
+ /* The list of TC's with this VPE */
+ struct list_head tc;
+
+ /* The global list of tc's */
+ struct list_head list;
+} tc_t;
+
+typedef struct vpe {
enum vpe_state state;
/* (device) minor associated with this vpe */
@@ -113,21 +135,7 @@ struct vpe {
/* shared symbol address */
void *shared_ptr;
-};
-
-struct tc {
- enum tc_state state;
- int index;
-
- /* parent VPE */
- struct vpe *pvpe;
-
- /* The list of TC's with this VPE */
- struct list_head tc;
-
- /* The global list of tc's */
- struct list_head list;
-};
+} vpe_t;
struct vpecontrol_ {
/* Virtual processing elements */
@@ -138,7 +146,7 @@ struct vpecontrol_ {
} vpecontrol;
static void release_progmem(void *ptr);
-static void dump_vpe(struct vpe * v);
+static void dump_vpe(vpe_t * v);
extern void save_gp_address(unsigned int secbase, unsigned int rel);
/* get the vpe associated with this minor */
@@ -189,11 +197,13 @@ struct vpe *alloc_vpe(int minor)
{
struct vpe *v;
- if ((v = kzalloc(sizeof(struct vpe), GFP_KERNEL)) == NULL) {
+ if ((v = kmalloc(sizeof(struct vpe), GFP_KERNEL)) == NULL) {
printk(KERN_WARNING "VPE: alloc_vpe no mem\n");
return NULL;
}
+ memset(v, 0, sizeof(struct vpe));
+
INIT_LIST_HEAD(&v->tc);
list_add_tail(&v->list, &vpecontrol.vpe_list);
@@ -206,11 +216,13 @@ struct tc *alloc_tc(int index)
{
struct tc *t;
- if ((t = kzalloc(sizeof(struct tc), GFP_KERNEL)) == NULL) {
+ if ((t = kmalloc(sizeof(struct tc), GFP_KERNEL)) == NULL) {
printk(KERN_WARNING "VPE: alloc_tc no mem\n");
return NULL;
}
+ memset(t, 0, sizeof(struct tc));
+
INIT_LIST_HEAD(&t->tc);
list_add_tail(&t->list, &vpecontrol.tc_list);
@@ -400,17 +412,16 @@ static int apply_r_mips_26(struct module *me, uint32_t *location,
return -ENOEXEC;
}
-/*
- * Not desperately convinced this is a good check of an overflow condition
- * anyway. But it gets in the way of handling undefined weak symbols which
- * we want to set to zero.
- * if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) {
- * printk(KERN_ERR
- * "module %s: relocation overflow\n",
- * me->name);
- * return -ENOEXEC;
- * }
- */
+/* Not desperately convinced this is a good check of an overflow condition
+ anyway. But it gets in the way of handling undefined weak symbols which
+ we want to set to zero.
+ if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) {
+ printk(KERN_ERR
+ "module %s: relocation overflow\n",
+ me->name);
+ return -ENOEXEC;
+ }
+*/
*location = (*location & ~0x03ffffff) |
((*location + (v >> 2)) & 0x03ffffff);
@@ -670,7 +681,7 @@ static void dump_tclist(void)
}
/* We are prepared so configure and start the VPE... */
-int vpe_run(struct vpe * v)
+int vpe_run(vpe_t * v)
{
unsigned long val;
struct tc *t;
@@ -761,7 +772,7 @@ int vpe_run(struct vpe * v)
return 0;
}
-static unsigned long find_vpe_symbols(struct vpe * v, Elf_Shdr * sechdrs,
+static unsigned long find_vpe_symbols(vpe_t * v, Elf_Shdr * sechdrs,
unsigned int symindex, const char *strtab,
struct module *mod)
{
@@ -781,12 +792,10 @@ static unsigned long find_vpe_symbols(struct vpe * v, Elf_Shdr * sechdrs,
return 0;
}
-/*
- * Allocates a VPE with some program code space(the load address), copies
- * the contents of the program (p)buffer performing relocatations/etc,
- * free's it when finished.
+/* Allocates a VPE with some program code space(the load address), copies the contents
+ of the program (p)buffer performing relocatations/etc, free's it when finished.
*/
-int vpe_elfload(struct vpe * v)
+int vpe_elfload(vpe_t * v)
{
Elf_Ehdr *hdr;
Elf_Shdr *sechdrs;
@@ -922,7 +931,7 @@ int vpe_elfload(struct vpe * v)
return err;
}
-static void dump_vpe(struct vpe * v)
+static void dump_vpe(vpe_t * v)
{
struct tc *t;
@@ -938,7 +947,7 @@ static void dump_vpe(struct vpe * v)
static int vpe_open(struct inode *inode, struct file *filp)
{
int minor;
- struct vpe *v;
+ vpe_t *v;
/* assume only 1 device at the mo. */
if ((minor = MINOR(inode->i_rdev)) != 1) {
@@ -992,7 +1001,7 @@ static int vpe_open(struct inode *inode, struct file *filp)
static int vpe_release(struct inode *inode, struct file *filp)
{
int minor, ret = 0;
- struct vpe *v;
+ vpe_t *v;
Elf_Ehdr *hdr;
minor = MINOR(inode->i_rdev);
@@ -1026,7 +1035,7 @@ static ssize_t vpe_write(struct file *file, const char __user * buffer,
{
int minor;
size_t ret = count;
- struct vpe *v;
+ vpe_t *v;
minor = MINOR(file->f_dentry->d_inode->i_rdev);
if ((v = get_vpe(minor)) == NULL)
@@ -1171,11 +1180,14 @@ static int __init vpe_module_init(void)
return -ENODEV;
}
- if ((major = register_chrdev(0, module_name, &vpe_fops) < 0)) {
+ if ((major = register_chrdev(VPE_MAJOR, module_name, &vpe_fops) < 0)) {
printk("VPE loader: unable to register character device\n");
- return major;
+ return -EBUSY;
}
+ if (major == 0)
+ major = VPE_MAJOR;
+
dmt();
dvpe();
diff --git a/trunk/arch/mips/lasat/ds1603.c b/trunk/arch/mips/lasat/ds1603.c
index 7dced67c55eb..9d7812e03dcd 100644
--- a/trunk/arch/mips/lasat/ds1603.c
+++ b/trunk/arch/mips/lasat/ds1603.c
@@ -8,7 +8,6 @@
#include
#include
#include
-#include
#include "ds1603.h"
@@ -139,27 +138,19 @@ static void rtc_end_op(void)
unsigned long ds1603_read(void)
{
unsigned long word;
- unsigned long flags;
-
- spin_lock_irqsave(&rtc_lock, flags);
rtc_init_op();
rtc_write_byte(READ_TIME_CMD);
word = rtc_read_word();
rtc_end_op();
- spin_unlock_irqrestore(&rtc_lock, flags);
return word;
}
int ds1603_set(unsigned long time)
{
- unsigned long flags;
-
- spin_lock_irqsave(&rtc_lock, flags);
rtc_init_op();
rtc_write_byte(SET_TIME_CMD);
rtc_write_word(time);
rtc_end_op();
- spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
diff --git a/trunk/arch/mips/momentum/jaguar_atx/setup.c b/trunk/arch/mips/momentum/jaguar_atx/setup.c
index bab192ddc185..768bf4406452 100644
--- a/trunk/arch/mips/momentum/jaguar_atx/setup.c
+++ b/trunk/arch/mips/momentum/jaguar_atx/setup.c
@@ -149,9 +149,7 @@ arch_initcall(per_cpu_mappings);
unsigned long m48t37y_get_time(void)
{
unsigned int year, month, day, hour, min, sec;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
/* stop the update */
rtc_base[0x7ff8] = 0x40;
@@ -168,7 +166,6 @@ unsigned long m48t37y_get_time(void)
/* start the update */
rtc_base[0x7ff8] = 0x00;
- spin_unlock_irqrestore(&rtc_lock, flags);
return mktime(year, month, day, hour, min, sec);
}
@@ -176,13 +173,11 @@ unsigned long m48t37y_get_time(void)
int m48t37y_set_time(unsigned long sec)
{
struct rtc_time tm;
- unsigned long flags;
/* convert to a more useful format -- note months count from 0 */
to_tm(sec, &tm);
tm.tm_mon += 1;
- spin_lock_irqsave(&rtc_lock, flags);
/* enable writing */
rtc_base[0x7ff8] = 0x80;
@@ -206,7 +201,6 @@ int m48t37y_set_time(unsigned long sec)
/* disable writing */
rtc_base[0x7ff8] = 0x00;
- spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
diff --git a/trunk/arch/mips/momentum/ocelot_3/setup.c b/trunk/arch/mips/momentum/ocelot_3/setup.c
index c9b7ff8148ec..a7803e08f9db 100644
--- a/trunk/arch/mips/momentum/ocelot_3/setup.c
+++ b/trunk/arch/mips/momentum/ocelot_3/setup.c
@@ -135,9 +135,7 @@ void setup_wired_tlb_entries(void)
unsigned long m48t37y_get_time(void)
{
unsigned int year, month, day, hour, min, sec;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
/* stop the update */
rtc_base[0x7ff8] = 0x40;
@@ -154,7 +152,6 @@ unsigned long m48t37y_get_time(void)
/* start the update */
rtc_base[0x7ff8] = 0x00;
- spin_unlock_irqrestore(&rtc_lock, flags);
return mktime(year, month, day, hour, min, sec);
}
@@ -162,13 +159,11 @@ unsigned long m48t37y_get_time(void)
int m48t37y_set_time(unsigned long sec)
{
struct rtc_time tm;
- unsigned long flags;
/* convert to a more useful format -- note months count from 0 */
to_tm(sec, &tm);
tm.tm_mon += 1;
- spin_lock_irqsave(&rtc_lock, flags);
/* enable writing */
rtc_base[0x7ff8] = 0x80;
@@ -192,7 +187,6 @@ int m48t37y_set_time(unsigned long sec)
/* disable writing */
rtc_base[0x7ff8] = 0x00;
- spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
diff --git a/trunk/arch/mips/momentum/ocelot_c/setup.c b/trunk/arch/mips/momentum/ocelot_c/setup.c
index 2755c1547473..ce70fc96f160 100644
--- a/trunk/arch/mips/momentum/ocelot_c/setup.c
+++ b/trunk/arch/mips/momentum/ocelot_c/setup.c
@@ -140,9 +140,7 @@ unsigned long m48t37y_get_time(void)
unsigned char* rtc_base = (unsigned char*)0xfc800000;
#endif
unsigned int year, month, day, hour, min, sec;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
/* stop the update */
rtc_base[0x7ff8] = 0x40;
@@ -159,7 +157,6 @@ unsigned long m48t37y_get_time(void)
/* start the update */
rtc_base[0x7ff8] = 0x00;
- spin_unlock_irqrestore(&rtc_lock, flags);
return mktime(year, month, day, hour, min, sec);
}
@@ -172,13 +169,11 @@ int m48t37y_set_time(unsigned long sec)
unsigned char* rtc_base = (unsigned char*)0xfc800000;
#endif
struct rtc_time tm;
- unsigned long flags;
/* convert to a more useful format -- note months count from 0 */
to_tm(sec, &tm);
tm.tm_mon += 1;
- spin_lock_irqsave(&rtc_lock, flags);
/* enable writing */
rtc_base[0x7ff8] = 0x80;
@@ -202,7 +197,6 @@ int m48t37y_set_time(unsigned long sec)
/* disable writing */
rtc_base[0x7ff8] = 0x00;
- spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
diff --git a/trunk/arch/mips/pmc-sierra/yosemite/setup.c b/trunk/arch/mips/pmc-sierra/yosemite/setup.c
index 059755b5ed57..bdc2ab55bed6 100644
--- a/trunk/arch/mips/pmc-sierra/yosemite/setup.c
+++ b/trunk/arch/mips/pmc-sierra/yosemite/setup.c
@@ -73,9 +73,7 @@ void __init bus_error_init(void)
unsigned long m48t37y_get_time(void)
{
unsigned int year, month, day, hour, min, sec;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
/* Stop the update to the time */
m48t37_base->control = 0x40;
@@ -90,7 +88,6 @@ unsigned long m48t37y_get_time(void)
/* Start the update to the time again */
m48t37_base->control = 0x00;
- spin_unlock_irqrestore(&rtc_lock, flags);
return mktime(year, month, day, hour, min, sec);
}
@@ -98,13 +95,11 @@ unsigned long m48t37y_get_time(void)
int m48t37y_set_time(unsigned long sec)
{
struct rtc_time tm;
- unsigned long flags;
/* convert to a more useful format -- note months count from 0 */
to_tm(sec, &tm);
tm.tm_mon += 1;
- spin_lock_irqsave(&rtc_lock, flags);
/* enable writing */
m48t37_base->control = 0x80;
@@ -128,7 +123,6 @@ int m48t37y_set_time(unsigned long sec)
/* disable writing */
m48t37_base->control = 0x00;
- spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
diff --git a/trunk/arch/mips/sgi-ip22/ip22-time.c b/trunk/arch/mips/sgi-ip22/ip22-time.c
index b7300cc5c5ad..df9b5694328a 100644
--- a/trunk/arch/mips/sgi-ip22/ip22-time.c
+++ b/trunk/arch/mips/sgi-ip22/ip22-time.c
@@ -35,9 +35,7 @@ static unsigned long indy_rtc_get_time(void)
{
unsigned int yrs, mon, day, hrs, min, sec;
unsigned int save_control;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
save_control = hpc3c0->rtcregs[RTC_CMD] & 0xff;
hpc3c0->rtcregs[RTC_CMD] = save_control | RTC_TE;
@@ -49,7 +47,6 @@ static unsigned long indy_rtc_get_time(void)
yrs = BCD2BIN(hpc3c0->rtcregs[RTC_YEAR] & 0xff);
hpc3c0->rtcregs[RTC_CMD] = save_control;
- spin_unlock_irqrestore(&rtc_lock, flags);
if (yrs < 45)
yrs += 30;
@@ -63,7 +60,6 @@ static int indy_rtc_set_time(unsigned long tim)
{
struct rtc_time tm;
unsigned int save_control;
- unsigned long flags;
to_tm(tim, &tm);
@@ -72,7 +68,6 @@ static int indy_rtc_set_time(unsigned long tim)
if (tm.tm_year >= 100)
tm.tm_year -= 100;
- spin_lock_irqsave(&rtc_lock, flags);
save_control = hpc3c0->rtcregs[RTC_CMD] & 0xff;
hpc3c0->rtcregs[RTC_CMD] = save_control | RTC_TE;
@@ -85,7 +80,6 @@ static int indy_rtc_set_time(unsigned long tim)
hpc3c0->rtcregs[RTC_HUNDREDTH_SECOND] = 0;
hpc3c0->rtcregs[RTC_CMD] = save_control;
- spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
diff --git a/trunk/arch/mips/sibyte/swarm/rtc_m41t81.c b/trunk/arch/mips/sibyte/swarm/rtc_m41t81.c
index c13914bdda59..5b4fc26c1b36 100644
--- a/trunk/arch/mips/sibyte/swarm/rtc_m41t81.c
+++ b/trunk/arch/mips/sibyte/swarm/rtc_m41t81.c
@@ -144,7 +144,6 @@ static int m41t81_write(uint8_t addr, int b)
int m41t81_set_time(unsigned long t)
{
struct rtc_time tm;
- unsigned long flags;
to_tm(t, &tm);
@@ -154,7 +153,6 @@ int m41t81_set_time(unsigned long t)
* believe we should finish writing min within a second.
*/
- spin_lock_irqsave(&rtc_lock, flags);
tm.tm_sec = BIN2BCD(tm.tm_sec);
m41t81_write(M41T81REG_SC, tm.tm_sec);
@@ -182,7 +180,6 @@ int m41t81_set_time(unsigned long t)
tm.tm_year %= 100;
tm.tm_year = BIN2BCD(tm.tm_year);
m41t81_write(M41T81REG_YR, tm.tm_year);
- spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
@@ -190,23 +187,19 @@ int m41t81_set_time(unsigned long t)
unsigned long m41t81_get_time(void)
{
unsigned int year, mon, day, hour, min, sec;
- unsigned long flags;
/*
* min is valid if two reads of sec are the same.
*/
for (;;) {
- spin_lock_irqsave(&rtc_lock, flags);
sec = m41t81_read(M41T81REG_SC);
min = m41t81_read(M41T81REG_MN);
if (sec == m41t81_read(M41T81REG_SC)) break;
- spin_unlock_irqrestore(&rtc_lock, flags);
}
hour = m41t81_read(M41T81REG_HR) & 0x3f;
day = m41t81_read(M41T81REG_DT);
mon = m41t81_read(M41T81REG_MO);
year = m41t81_read(M41T81REG_YR);
- spin_unlock_irqrestore(&rtc_lock, flags);
sec = BCD2BIN(sec);
min = BCD2BIN(min);
diff --git a/trunk/arch/mips/sibyte/swarm/rtc_xicor1241.c b/trunk/arch/mips/sibyte/swarm/rtc_xicor1241.c
index f4a178836415..d9ff9323f24e 100644
--- a/trunk/arch/mips/sibyte/swarm/rtc_xicor1241.c
+++ b/trunk/arch/mips/sibyte/swarm/rtc_xicor1241.c
@@ -113,11 +113,9 @@ int xicor_set_time(unsigned long t)
{
struct rtc_time tm;
int tmp;
- unsigned long flags;
to_tm(t, &tm);
- spin_lock_irqsave(&rtc_lock, flags);
/* unlock writes to the CCR */
xicor_write(X1241REG_SR, X1241REG_SR_WEL);
xicor_write(X1241REG_SR, X1241REG_SR_WEL | X1241REG_SR_RWEL);
@@ -162,7 +160,6 @@ int xicor_set_time(unsigned long t)
xicor_write(X1241REG_HR, tmp);
xicor_write(X1241REG_SR, 0);
- spin_unlock_irqrestore(&rtc_lock, flags);
return 0;
}
@@ -170,9 +167,7 @@ int xicor_set_time(unsigned long t)
unsigned long xicor_get_time(void)
{
unsigned int year, mon, day, hour, min, sec, y2k;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
sec = xicor_read(X1241REG_SC);
min = xicor_read(X1241REG_MN);
hour = xicor_read(X1241REG_HR);
@@ -188,7 +183,6 @@ unsigned long xicor_get_time(void)
mon = xicor_read(X1241REG_MO);
year = xicor_read(X1241REG_YR);
y2k = xicor_read(X1241REG_Y2K);
- spin_unlock_irqrestore(&rtc_lock, flags);
sec = BCD2BIN(sec);
min = BCD2BIN(min);
diff --git a/trunk/arch/mips/tx4938/toshiba_rbtx4938/irq.c b/trunk/arch/mips/tx4938/toshiba_rbtx4938/irq.c
index 9cd9c0fe2265..230f5a93c2e6 100644
--- a/trunk/arch/mips/tx4938/toshiba_rbtx4938/irq.c
+++ b/trunk/arch/mips/tx4938/toshiba_rbtx4938/irq.c
@@ -84,6 +84,7 @@ IRQ Device
#include
#include
#include
+#include
#include
#include
diff --git a/trunk/arch/parisc/kernel/asm-offsets.c b/trunk/arch/parisc/kernel/asm-offsets.c
index e23c4e1e3a25..1ad44f92d6e4 100644
--- a/trunk/arch/parisc/kernel/asm-offsets.c
+++ b/trunk/arch/parisc/kernel/asm-offsets.c
@@ -30,6 +30,7 @@
#include
#include
#include
+#include
#include
#include
diff --git a/trunk/arch/parisc/kernel/process.c b/trunk/arch/parisc/kernel/process.c
index fee4f1f09adc..7fdca87ef647 100644
--- a/trunk/arch/parisc/kernel/process.c
+++ b/trunk/arch/parisc/kernel/process.c
@@ -88,15 +88,11 @@ void default_idle(void)
*/
void cpu_idle(void)
{
- set_thread_flag(TIF_POLLING_NRFLAG);
-
/* endless idle loop with no priority at all */
while (1) {
while (!need_resched())
barrier();
- preempt_enable_no_resched();
schedule();
- preempt_disable();
check_pgt_cache();
}
}
diff --git a/trunk/arch/parisc/kernel/ptrace.c b/trunk/arch/parisc/kernel/ptrace.c
index b6fe202a620d..18130c3748f3 100644
--- a/trunk/arch/parisc/kernel/ptrace.c
+++ b/trunk/arch/parisc/kernel/ptrace.c
@@ -78,13 +78,52 @@ void ptrace_disable(struct task_struct *child)
pa_psw(child)->l = 0;
}
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+long sys_ptrace(long request, long pid, long addr, long data)
{
+ struct task_struct *child;
long ret;
#ifdef DEBUG_PTRACE
long oaddr=addr, odata=data;
#endif
+ lock_kernel();
+ ret = -EPERM;
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+
+ ret = security_ptrace(current->parent, current);
+ if (ret)
+ goto out;
+
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+ if (child)
+ get_task_struct(child);
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
+ ret = -EPERM;
+ if (pid == 1) /* no messing around with init! */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
+ goto out_tsk;
+
switch (request) {
case PTRACE_PEEKTEXT: /* read word at location addr. */
case PTRACE_PEEKDATA: {
@@ -344,11 +383,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
case PTRACE_GETEVENTMSG:
ret = put_user(child->ptrace_message, (unsigned int __user *) data);
- goto out;
+ goto out_tsk;
default:
ret = ptrace_request(child, request, addr, data);
- goto out;
+ goto out_tsk;
}
out_wake_notrap:
@@ -357,7 +396,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
wake_up_process(child);
ret = 0;
out_tsk:
- DBG("arch_ptrace(%ld, %d, %lx, %lx) returning %ld\n",
+ put_task_struct(child);
+out:
+ unlock_kernel();
+ DBG("sys_ptrace(%ld, %d, %lx, %lx) returning %ld\n",
request, pid, oaddr, odata, ret);
return ret;
}
diff --git a/trunk/arch/parisc/kernel/smp.c b/trunk/arch/parisc/kernel/smp.c
index a9ecf6465784..5db3be4e2704 100644
--- a/trunk/arch/parisc/kernel/smp.c
+++ b/trunk/arch/parisc/kernel/smp.c
@@ -463,7 +463,6 @@ void __init smp_callin(void)
#endif
smp_cpu_init(slave_id);
- preempt_disable();
#if 0 /* NOT WORKING YET - see entry.S */
istack = (void *)__get_free_pages(GFP_KERNEL,ISTACK_ORDER);
diff --git a/trunk/arch/powerpc/Kconfig b/trunk/arch/powerpc/Kconfig
index 1493c7896fe3..ca7acb0c79f0 100644
--- a/trunk/arch/powerpc/Kconfig
+++ b/trunk/arch/powerpc/Kconfig
@@ -404,14 +404,6 @@ config CPU_FREQ_PMAC
this currently includes some models of iBook & Titanium
PowerBook.
-config CPU_FREQ_PMAC64
- bool "Support for some Apple G5s"
- depends on CPU_FREQ && PMAC_SMU && PPC64
- select CPU_FREQ_TABLE
- help
- This adds support for frequency switching on Apple iMac G5,
- and some of the more recent desktop G5 machines as well.
-
config PPC601_SYNC_FIX
bool "Workarounds for PPC601 bugs"
depends on 6xx && (PPC_PREP || PPC_PMAC)
@@ -492,7 +484,6 @@ source "fs/Kconfig.binfmt"
config FORCE_MAX_ZONEORDER
int
depends on PPC64
- default "9" if PPC_64K_PAGES
default "13"
config MATH_EMULATION
@@ -614,7 +605,6 @@ config NODES_SPAN_OTHER_NODES
config PPC_64K_PAGES
bool "64k page size"
- depends on PPC64
help
This option changes the kernel logical page size to 64k. On machines
without processor support for 64k pages, the kernel will simulate
@@ -926,21 +916,8 @@ source "arch/powerpc/platforms/iseries/Kconfig"
source "lib/Kconfig"
-menu "Instrumentation Support"
- depends on EXPERIMENTAL
-
source "arch/powerpc/oprofile/Kconfig"
-config KPROBES
- bool "Kprobes (EXPERIMENTAL)"
- help
- Kprobes allows you to trap at almost any kernel address and
- execute a callback function. register_kprobe() establishes
- a probepoint and specifies the callback. Kprobes is useful
- for kernel debugging, non-intrusive instrumentation and testing.
- If in doubt, say "N".
-endmenu
-
source "arch/powerpc/Kconfig.debug"
source "security/Kconfig"
diff --git a/trunk/arch/powerpc/Kconfig.debug b/trunk/arch/powerpc/Kconfig.debug
index 30a30bf559ea..0baf64ec80d0 100644
--- a/trunk/arch/powerpc/Kconfig.debug
+++ b/trunk/arch/powerpc/Kconfig.debug
@@ -9,6 +9,16 @@ config DEBUG_STACKOVERFLOW
This option will cause messages to be printed if free stack space
drops below a certain limit.
+config KPROBES
+ bool "Kprobes"
+ depends on DEBUG_KERNEL && PPC64
+ help
+ Kprobes allows you to trap at almost any kernel address and
+ execute a callback function. register_kprobe() establishes
+ a probepoint and specifies the callback. Kprobes is useful
+ for kernel debugging, non-intrusive instrumentation and testing.
+ If in doubt, say "N".
+
config DEBUG_STACK_USAGE
bool "Stack utilization instrumentation"
depends on DEBUG_KERNEL && PPC64
diff --git a/trunk/arch/powerpc/configs/g5_defconfig b/trunk/arch/powerpc/configs/g5_defconfig
index e76854f8c121..6323065fbf2c 100644
--- a/trunk/arch/powerpc/configs/g5_defconfig
+++ b/trunk/arch/powerpc/configs/g5_defconfig
@@ -1,32 +1,18 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.14
-# Mon Nov 7 13:37:59 2005
+# Linux kernel version: 2.6.14-rc4
+# Thu Oct 20 08:30:23 2005
#
-CONFIG_PPC64=y
CONFIG_64BIT=y
-CONFIG_PPC_MERGE=y
CONFIG_MMU=y
-CONFIG_GENERIC_HARDIRQS=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_PPC=y
+CONFIG_GENERIC_ISA_DMA=y
CONFIG_EARLY_PRINTK=y
CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-
-#
-# Processor support
-#
-CONFIG_POWER4_ONLY=y
-CONFIG_POWER4=y
-CONFIG_PPC_FPU=y
-CONFIG_ALTIVEC=y
-CONFIG_PPC_STD_MMU=y
-CONFIG_SMP=y
-CONFIG_NR_CPUS=2
+CONFIG_FORCE_MAX_ZONEORDER=13
#
# Code maturity level options
@@ -81,60 +67,30 @@ CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y
+CONFIG_SYSVIPC_COMPAT=y
#
# Platform support
#
-CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_PPC_ISERIES is not set
-# CONFIG_EMBEDDED6xx is not set
-# CONFIG_APUS is not set
+CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_PPC_PSERIES is not set
+# CONFIG_PPC_BPA is not set
CONFIG_PPC_PMAC=y
-CONFIG_PPC_PMAC64=y
# CONFIG_PPC_MAPLE is not set
-# CONFIG_PPC_CELL is not set
+CONFIG_PPC=y
+CONFIG_PPC64=y
CONFIG_PPC_OF=y
-CONFIG_U3_DART=y
CONFIG_MPIC=y
-# CONFIG_PPC_RTAS is not set
-# CONFIG_MMIO_NVRAM is not set
-# CONFIG_PPC_MPC106 is not set
-CONFIG_GENERIC_TBSYNC=y
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-# CONFIG_CPU_FREQ_DEBUG is not set
-CONFIG_CPU_FREQ_STAT=y
-# CONFIG_CPU_FREQ_STAT_DETAILS is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
-# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
-CONFIG_CPU_FREQ_PMAC64=y
-# CONFIG_WANT_EARLY_SERIAL is not set
-
-#
-# Kernel options
-#
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-# CONFIG_PREEMPT_BKL is not set
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_MISC is not set
-CONFIG_FORCE_MAX_ZONEORDER=13
-CONFIG_IOMMU_VMERGE=y
-# CONFIG_HOTPLUG_CPU is not set
+CONFIG_ALTIVEC=y
CONFIG_KEXEC=y
-CONFIG_IRQ_ALL_CPUS=y
-# CONFIG_NUMA is not set
+CONFIG_U3_DART=y
+CONFIG_PPC_PMAC64=y
+CONFIG_BOOTX_TEXT=y
+CONFIG_POWER4_ONLY=y
+CONFIG_IOMMU_VMERGE=y
+CONFIG_SMP=y
+CONFIG_NR_CPUS=2
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_SELECT_MEMORY_MODEL=y
@@ -144,21 +100,28 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_PPC_64K_PAGES is not set
+# CONFIG_NUMA is not set
# CONFIG_SCHED_SMT is not set
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_PREEMPT_BKL is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_SECCOMP=y
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_HOTPLUG_CPU is not set
CONFIG_PROC_DEVICETREE=y
# CONFIG_CMDLINE_BOOL is not set
-# CONFIG_PM is not set
-CONFIG_SECCOMP=y
CONFIG_ISA_DMA_API=y
#
-# Bus options
+# Bus Options
#
-CONFIG_GENERIC_ISA_DMA=y
-# CONFIG_PPC_I8259 is not set
-# CONFIG_PPC_INDIRECT_PCI is not set
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_LEGACY_PROC=y
@@ -173,7 +136,6 @@ CONFIG_PCI_LEGACY_PROC=y
# PCI Hotplug Support
#
# CONFIG_HOTPLUG_PCI is not set
-CONFIG_KERNEL_START=0xc000000000000000
#
# Networking
@@ -314,10 +276,6 @@ CONFIG_LLC=y
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
# CONFIG_NET_SCHED is not set
CONFIG_NET_CLS_ROUTE=y
@@ -390,11 +348,6 @@ CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_ATA_OVER_ETH is not set
#
@@ -496,7 +449,6 @@ CONFIG_SCSI_SPI_ATTRS=y
#
# SCSI low-level drivers
#
-# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set
@@ -513,12 +465,10 @@ CONFIG_SCSI_SATA_SVW=y
# CONFIG_SCSI_ATA_PIIX is not set
# CONFIG_SCSI_SATA_MV is not set
# CONFIG_SCSI_SATA_NV is not set
-# CONFIG_SCSI_PDC_ADMA is not set
-# CONFIG_SCSI_SATA_QSTOR is not set
# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_QSTOR is not set
# CONFIG_SCSI_SATA_SX4 is not set
# CONFIG_SCSI_SATA_SIL is not set
-# CONFIG_SCSI_SATA_SIL24 is not set
# CONFIG_SCSI_SATA_SIS is not set
# CONFIG_SCSI_SATA_ULI is not set
# CONFIG_SCSI_SATA_VIA is not set
@@ -617,9 +567,6 @@ CONFIG_IEEE1394_RAWIO=y
CONFIG_ADB_PMU=y
CONFIG_PMAC_SMU=y
CONFIG_THERM_PM72=y
-CONFIG_WINDFARM=y
-CONFIG_WINDFARM_PM81=y
-CONFIG_WINDFARM_PM91=y
#
# Network device support
@@ -656,7 +603,6 @@ CONFIG_SUNGEM=y
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
# CONFIG_NET_PCI is not set
-# CONFIG_FEC_8XX is not set
#
# Ethernet (1000 Mbit)
@@ -822,7 +768,6 @@ CONFIG_MAX_RAW_DEVS=256
# TPM devices
#
# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
#
# I2C support
@@ -875,7 +820,6 @@ CONFIG_I2C_PMAC_SMU=y
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_RTC8564 is not set
# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
@@ -932,9 +876,10 @@ CONFIG_FB_OF=y
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
-CONFIG_FB_NVIDIA=y
-CONFIG_FB_NVIDIA_I2C=y
-# CONFIG_FB_RIVA is not set
+# CONFIG_FB_NVIDIA is not set
+CONFIG_FB_RIVA=y
+# CONFIG_FB_RIVA_I2C is not set
+# CONFIG_FB_RIVA_DEBUG is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON_OLD is not set
CONFIG_FB_RADEON=y
@@ -979,96 +924,7 @@ CONFIG_LCD_DEVICE=y
#
# Sound
#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-# CONFIG_SND_SEQ_DUMMY is not set
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-CONFIG_SND_GENERIC_DRIVER=y
-
-#
-# Generic devices
-#
-# CONFIG_SND_DUMMY is not set
-# CONFIG_SND_VIRMIDI is not set
-# CONFIG_SND_MTPAV is not set
-# CONFIG_SND_SERIAL_U16550 is not set
-# CONFIG_SND_MPU401 is not set
-
-#
-# PCI devices
-#
-# CONFIG_SND_ALI5451 is not set
-# CONFIG_SND_ATIIXP is not set
-# CONFIG_SND_ATIIXP_MODEM is not set
-# CONFIG_SND_AU8810 is not set
-# CONFIG_SND_AU8820 is not set
-# CONFIG_SND_AU8830 is not set
-# CONFIG_SND_AZT3328 is not set
-# CONFIG_SND_BT87X is not set
-# CONFIG_SND_CS46XX is not set
-# CONFIG_SND_CS4281 is not set
-# CONFIG_SND_EMU10K1 is not set
-# CONFIG_SND_EMU10K1X is not set
-# CONFIG_SND_CA0106 is not set
-# CONFIG_SND_KORG1212 is not set
-# CONFIG_SND_MIXART is not set
-# CONFIG_SND_NM256 is not set
-# CONFIG_SND_RME32 is not set
-# CONFIG_SND_RME96 is not set
-# CONFIG_SND_RME9652 is not set
-# CONFIG_SND_HDSP is not set
-# CONFIG_SND_HDSPM is not set
-# CONFIG_SND_TRIDENT is not set
-# CONFIG_SND_YMFPCI is not set
-# CONFIG_SND_AD1889 is not set
-# CONFIG_SND_ALS4000 is not set
-# CONFIG_SND_CMIPCI is not set
-# CONFIG_SND_ENS1370 is not set
-# CONFIG_SND_ENS1371 is not set
-# CONFIG_SND_ES1938 is not set
-# CONFIG_SND_ES1968 is not set
-# CONFIG_SND_MAESTRO3 is not set
-# CONFIG_SND_FM801 is not set
-# CONFIG_SND_ICE1712 is not set
-# CONFIG_SND_ICE1724 is not set
-# CONFIG_SND_INTEL8X0 is not set
-# CONFIG_SND_INTEL8X0M is not set
-# CONFIG_SND_SONICVIBES is not set
-# CONFIG_SND_VIA82XX is not set
-# CONFIG_SND_VIA82XX_MODEM is not set
-# CONFIG_SND_VX222 is not set
-# CONFIG_SND_HDA_INTEL is not set
-
-#
-# ALSA PowerMac devices
-#
-CONFIG_SND_POWERMAC=m
-CONFIG_SND_POWERMAC_AUTO_DRC=y
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-# CONFIG_SND_USB_USX2Y is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
+# CONFIG_SOUND is not set
#
# USB support
@@ -1102,16 +958,12 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
#
# USB Device Class drivers
#
-# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
+# CONFIG_USB_BLUETOOTH_TTY is not set
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=y
#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
#
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
@@ -1222,7 +1074,6 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
CONFIG_USB_SERIAL_KLSI=m
CONFIG_USB_SERIAL_KOBIL_SCT=m
CONFIG_USB_SERIAL_MCT_U232=m
-# CONFIG_USB_SERIAL_NOKIA_DKU2 is not set
CONFIG_USB_SERIAL_PL2303=m
# CONFIG_USB_SERIAL_HP4X is not set
CONFIG_USB_SERIAL_SAFE=m
@@ -1459,20 +1310,6 @@ CONFIG_NLS_ISO8859_15=y
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=y
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-# CONFIG_CRC16 is not set
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-
#
# Profiling support
#
@@ -1494,14 +1331,12 @@ CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_INFO is not set
CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_KPROBES is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUGGER is not set
+# CONFIG_PPCDBG is not set
CONFIG_IRQSTACKS=y
-CONFIG_BOOTX_TEXT=y
#
# Security options
@@ -1541,3 +1376,17 @@ CONFIG_CRYPTO_TEST=m
#
# Hardware crypto devices
#
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
diff --git a/trunk/arch/powerpc/kernel/cputable.c b/trunk/arch/powerpc/kernel/cputable.c
index cc4e9eb1c13f..33c63bcf69f8 100644
--- a/trunk/arch/powerpc/kernel/cputable.c
+++ b/trunk/arch/powerpc/kernel/cputable.c
@@ -929,16 +929,6 @@ struct cpu_spec cpu_specs[] = {
.icache_bsize = 32,
.dcache_bsize = 32,
},
- { /* 440SPe Rev. A */
- .pvr_mask = 0xff000fff,
- .pvr_value = 0x53000890,
- .cpu_name = "440SPe Rev. A",
- .cpu_features = CPU_FTR_SPLIT_ID_CACHE |
- CPU_FTR_USE_TB,
- .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
- .icache_bsize = 32,
- .dcache_bsize = 32,
- },
#endif /* CONFIG_44x */
#ifdef CONFIG_FSL_BOOKE
{ /* e200z5 */
diff --git a/trunk/arch/powerpc/kernel/misc_64.S b/trunk/arch/powerpc/kernel/misc_64.S
index ae1433da09b2..b3e95ff0dba0 100644
--- a/trunk/arch/powerpc/kernel/misc_64.S
+++ b/trunk/arch/powerpc/kernel/misc_64.S
@@ -603,76 +603,6 @@ _GLOBAL(real_writeb)
blr
#endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */
-/*
- * SCOM access functions for 970 (FX only for now)
- *
- * unsigned long scom970_read(unsigned int address);
- * void scom970_write(unsigned int address, unsigned long value);
- *
- * The address passed in is the 24 bits register address. This code
- * is 970 specific and will not check the status bits, so you should
- * know what you are doing.
- */
-_GLOBAL(scom970_read)
- /* interrupts off */
- mfmsr r4
- ori r0,r4,MSR_EE
- xori r0,r0,MSR_EE
- mtmsrd r0,1
-
- /* rotate 24 bits SCOM address 8 bits left and mask out it's low 8 bits
- * (including parity). On current CPUs they must be 0'd,
- * and finally or in RW bit
- */
- rlwinm r3,r3,8,0,15
- ori r3,r3,0x8000
-
- /* do the actual scom read */
- sync
- mtspr SPRN_SCOMC,r3
- isync
- mfspr r3,SPRN_SCOMD
- isync
- mfspr r0,SPRN_SCOMC
- isync
-
- /* XXX: fixup result on some buggy 970's (ouch ! we lost a bit, bah
- * that's the best we can do). Not implemented yet as we don't use
- * the scom on any of the bogus CPUs yet, but may have to be done
- * ultimately
- */
-
- /* restore interrupts */
- mtmsrd r4,1
- blr
-
-
-_GLOBAL(scom970_write)
- /* interrupts off */
- mfmsr r5
- ori r0,r5,MSR_EE
- xori r0,r0,MSR_EE
- mtmsrd r0,1
-
- /* rotate 24 bits SCOM address 8 bits left and mask out it's low 8 bits
- * (including parity). On current CPUs they must be 0'd.
- */
-
- rlwinm r3,r3,8,0,15
-
- sync
- mtspr SPRN_SCOMD,r4 /* write data */
- isync
- mtspr SPRN_SCOMC,r3 /* write command */
- isync
- mfspr 3,SPRN_SCOMC
- isync
-
- /* restore interrupts */
- mtmsrd r5,1
- blr
-
-
/*
* Create a kernel thread
* kernel_thread(fn, arg, flags)
diff --git a/trunk/arch/powerpc/kernel/process.c b/trunk/arch/powerpc/kernel/process.c
index de69fb37c731..7f64f0464d44 100644
--- a/trunk/arch/powerpc/kernel/process.c
+++ b/trunk/arch/powerpc/kernel/process.c
@@ -46,10 +46,10 @@
#include
#include
#include
-#include
#ifdef CONFIG_PPC64
#include
#include
+#include
#endif
extern unsigned long _get_SP(void);
@@ -203,8 +203,10 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs)
int set_dabr(unsigned long dabr)
{
+#ifdef CONFIG_PPC64
if (ppc_md.set_dabr)
return ppc_md.set_dabr(dabr);
+#endif
mtspr(SPRN_DABR, dabr);
return 0;
diff --git a/trunk/arch/powerpc/kernel/prom.c b/trunk/arch/powerpc/kernel/prom.c
index f645adb57534..3675ef4bac90 100644
--- a/trunk/arch/powerpc/kernel/prom.c
+++ b/trunk/arch/powerpc/kernel/prom.c
@@ -1974,29 +1974,14 @@ EXPORT_SYMBOL(get_property);
/*
* Add a property to a node
*/
-int prom_add_property(struct device_node* np, struct property* prop)
+void prom_add_property(struct device_node* np, struct property* prop)
{
- struct property **next;
+ struct property **next = &np->properties;
prop->next = NULL;
- write_lock(&devtree_lock);
- next = &np->properties;
- while (*next) {
- if (strcmp(prop->name, (*next)->name) == 0) {
- /* duplicate ! don't insert it */
- write_unlock(&devtree_lock);
- return -1;
- }
+ while (*next)
next = &(*next)->next;
- }
*next = prop;
- write_unlock(&devtree_lock);
-
- /* try to add to proc as well if it was initialized */
- if (np->pde)
- proc_device_tree_add_prop(np->pde, prop);
-
- return 0;
}
/* I quickly hacked that one, check against spec ! */
diff --git a/trunk/arch/powerpc/kernel/prom_init.c b/trunk/arch/powerpc/kernel/prom_init.c
index 6dc33d19fc2a..c758b6624d7b 100644
--- a/trunk/arch/powerpc/kernel/prom_init.c
+++ b/trunk/arch/powerpc/kernel/prom_init.c
@@ -403,19 +403,19 @@ static int __init prom_next_node(phandle *nodep)
}
}
-static int inline prom_getprop(phandle node, const char *pname,
+static int __init prom_getprop(phandle node, const char *pname,
void *value, size_t valuelen)
{
return call_prom("getprop", 4, 1, node, ADDR(pname),
(u32)(unsigned long) value, (u32) valuelen);
}
-static int inline prom_getproplen(phandle node, const char *pname)
+static int __init prom_getproplen(phandle node, const char *pname)
{
return call_prom("getproplen", 2, 1, node, ADDR(pname));
}
-static int inline prom_setprop(phandle node, const char *pname,
+static int __init prom_setprop(phandle node, const char *pname,
void *value, size_t valuelen)
{
return call_prom("setprop", 4, 1, node, ADDR(pname),
@@ -1408,9 +1408,8 @@ static int __init prom_find_machine_type(void)
struct prom_t *_prom = &RELOC(prom);
char compat[256];
int len, i = 0;
-#ifdef CONFIG_PPC64
phandle rtas;
-#endif
+
len = prom_getprop(_prom->root, "compatible",
compat, sizeof(compat)-1);
if (len > 0) {
@@ -1873,7 +1872,7 @@ static void __init fixup_device_tree(void)
if (prom_getprop(u3, "device-rev", &u3_rev, sizeof(u3_rev))
== PROM_ERROR)
return;
- if (u3_rev < 0x35 || u3_rev > 0x39)
+ if (u3_rev != 0x35 && u3_rev != 0x37)
return;
/* does it need fixup ? */
if (prom_getproplen(i2c, "interrupts") > 0)
diff --git a/trunk/arch/powerpc/kernel/ptrace.c b/trunk/arch/powerpc/kernel/ptrace.c
index 3d2abd95c7ae..568ea335d616 100644
--- a/trunk/arch/powerpc/kernel/ptrace.c
+++ b/trunk/arch/powerpc/kernel/ptrace.c
@@ -248,10 +248,46 @@ void ptrace_disable(struct task_struct *child)
clear_single_step(child);
}
-long arch_ptrace(struct task_struct *child, long request, long addr, long data)
+long sys_ptrace(long request, long pid, long addr, long data)
{
+ struct task_struct *child;
int ret = -EPERM;
+ lock_kernel();
+ if (request == PTRACE_TRACEME) {
+ /* are we already being traced? */
+ if (current->ptrace & PT_PTRACED)
+ goto out;
+ ret = security_ptrace(current->parent, current);
+ if (ret)
+ goto out;
+ /* set the ptrace bit in the process flags. */
+ current->ptrace |= PT_PTRACED;
+ ret = 0;
+ goto out;
+ }
+ ret = -ESRCH;
+ read_lock(&tasklist_lock);
+ child = find_task_by_pid(pid);
+ if (child)
+ get_task_struct(child);
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+ goto out_tsk;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+ goto out_tsk;
+ }
+
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
+ goto out_tsk;
+
switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
@@ -504,7 +540,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
ret = ptrace_request(child, request, addr, data);
break;
}
-
+out_tsk:
+ put_task_struct(child);
+out:
+ unlock_kernel();
return ret;
}
diff --git a/trunk/arch/powerpc/kernel/rtas.c b/trunk/arch/powerpc/kernel/rtas.c
index 9d4e07f6f1ec..b7fc2d884950 100644
--- a/trunk/arch/powerpc/kernel/rtas.c
+++ b/trunk/arch/powerpc/kernel/rtas.c
@@ -17,7 +17,6 @@
#include
#include
#include
-#include
#include
#include
@@ -84,7 +83,7 @@ void call_rtas_display_status_delay(unsigned char c)
while (width-- > 0)
call_rtas_display_status(' ');
width = 16;
- mdelay(500);
+ udelay(500000);
pending_newline = 1;
} else {
if (pending_newline) {
@@ -609,6 +608,7 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
return 0;
}
+#ifdef CONFIG_SMP
/* This version can't take the spinlock, because it never returns */
struct rtas_args rtas_stop_self_args = {
@@ -633,6 +633,7 @@ void rtas_stop_self(void)
panic("Alas, I survived.\n");
}
+#endif
/*
* Call early during boot, before mem init or bootmem, to retreive the RTAS
diff --git a/trunk/arch/powerpc/kernel/setup-common.c b/trunk/arch/powerpc/kernel/setup-common.c
index e22856ecb5a0..d43fa8c0e5ac 100644
--- a/trunk/arch/powerpc/kernel/setup-common.c
+++ b/trunk/arch/powerpc/kernel/setup-common.c
@@ -405,46 +405,6 @@ static int __init set_preferred_console(void)
console_initcall(set_preferred_console);
#endif /* CONFIG_PPC_MULTIPLATFORM */
-void __init check_for_initrd(void)
-{
-#ifdef CONFIG_BLK_DEV_INITRD
- unsigned long *prop;
-
- DBG(" -> check_for_initrd()\n");
-
- if (of_chosen) {
- prop = (unsigned long *)get_property(of_chosen,
- "linux,initrd-start", NULL);
- if (prop != NULL) {
- initrd_start = (unsigned long)__va(*prop);
- prop = (unsigned long *)get_property(of_chosen,
- "linux,initrd-end", NULL);
- if (prop != NULL) {
- initrd_end = (unsigned long)__va(*prop);
- initrd_below_start_ok = 1;
- } else
- initrd_start = 0;
- }
- }
-
- /* If we were passed an initrd, set the ROOT_DEV properly if the values
- * look sensible. If not, clear initrd reference.
- */
- if (initrd_start >= KERNELBASE && initrd_end >= KERNELBASE &&
- initrd_end > initrd_start)
- ROOT_DEV = Root_RAM0;
- else {
- printk("Bogus initrd %08lx %08lx\n", initrd_start, initrd_end);
- initrd_start = initrd_end = 0;
- }
-
- if (initrd_start)
- printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end);
-
- DBG(" <- check_for_initrd()\n");
-#endif /* CONFIG_BLK_DEV_INITRD */
-}
-
#ifdef CONFIG_SMP
/**
diff --git a/trunk/arch/powerpc/kernel/setup_32.c b/trunk/arch/powerpc/kernel/setup_32.c
index 3af2631e3fab..b45eedbb4b3a 100644
--- a/trunk/arch/powerpc/kernel/setup_32.c
+++ b/trunk/arch/powerpc/kernel/setup_32.c
@@ -286,7 +286,6 @@ void __init setup_arch(char **cmdline_p)
loops_per_jiffy = 500000000 / HZ;
unflatten_device_tree();
- check_for_initrd();
finish_device_tree();
smp_setup_cpu_maps();
diff --git a/trunk/arch/powerpc/kernel/setup_64.c b/trunk/arch/powerpc/kernel/setup_64.c
index 0471e843b6c5..b0994050024f 100644
--- a/trunk/arch/powerpc/kernel/setup_64.c
+++ b/trunk/arch/powerpc/kernel/setup_64.c
@@ -41,6 +41,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -59,7 +60,6 @@
#include
#include
#include
-#include
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
@@ -243,6 +243,12 @@ void __init early_setup(unsigned long dt_ptr)
DBG(" -> early_setup()\n");
+ /*
+ * Fill the default DBG level (do we want to keep
+ * that old mecanism around forever ?)
+ */
+ ppcdbg_initialize();
+
/*
* Do early initializations using the flattened device
* tree, like retreiving the physical memory map or
@@ -395,6 +401,43 @@ static void __init initialize_cache_info(void)
DBG(" <- initialize_cache_info()\n");
}
+static void __init check_for_initrd(void)
+{
+#ifdef CONFIG_BLK_DEV_INITRD
+ u64 *prop;
+
+ DBG(" -> check_for_initrd()\n");
+
+ if (of_chosen) {
+ prop = (u64 *)get_property(of_chosen,
+ "linux,initrd-start", NULL);
+ if (prop != NULL) {
+ initrd_start = (unsigned long)__va(*prop);
+ prop = (u64 *)get_property(of_chosen,
+ "linux,initrd-end", NULL);
+ if (prop != NULL) {
+ initrd_end = (unsigned long)__va(*prop);
+ initrd_below_start_ok = 1;
+ } else
+ initrd_start = 0;
+ }
+ }
+
+ /* If we were passed an initrd, set the ROOT_DEV properly if the values
+ * look sensible. If not, clear initrd reference.
+ */
+ if (initrd_start >= KERNELBASE && initrd_end >= KERNELBASE &&
+ initrd_end > initrd_start)
+ ROOT_DEV = Root_RAM0;
+ else
+ initrd_start = initrd_end = 0;
+
+ if (initrd_start)
+ printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end);
+
+ DBG(" <- check_for_initrd()\n");
+#endif /* CONFIG_BLK_DEV_INITRD */
+}
/*
* Do some initial setup of the system. The parameters are those which
@@ -478,6 +521,7 @@ void __init setup_system(void)
printk("-----------------------------------------------------\n");
printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size);
+ printk("ppc64_debug_switch = 0x%lx\n", ppc64_debug_switch);
printk("ppc64_interrupt_controller = 0x%ld\n", ppc64_interrupt_controller);
printk("systemcfg = 0x%p\n", systemcfg);
printk("systemcfg->platform = 0x%x\n", systemcfg->platform);
diff --git a/trunk/arch/powerpc/kernel/signal_32.c b/trunk/arch/powerpc/kernel/signal_32.c
index 081d931eae48..876c57c11365 100644
--- a/trunk/arch/powerpc/kernel/signal_32.c
+++ b/trunk/arch/powerpc/kernel/signal_32.c
@@ -44,6 +44,7 @@
#include
#ifdef CONFIG_PPC64
#include "ppc32.h"
+#include
#include
#include
#else
diff --git a/trunk/arch/powerpc/kernel/signal_64.c b/trunk/arch/powerpc/kernel/signal_64.c
index 58194e150711..ec9d0984b6a0 100644
--- a/trunk/arch/powerpc/kernel/signal_64.c
+++ b/trunk/arch/powerpc/kernel/signal_64.c
@@ -33,6 +33,7 @@
#include
#include
#include
+#include
#include
#include
#include
diff --git a/trunk/arch/powerpc/kernel/smp.c b/trunk/arch/powerpc/kernel/smp.c
index 5c330c3366e4..1794a694a928 100644
--- a/trunk/arch/powerpc/kernel/smp.c
+++ b/trunk/arch/powerpc/kernel/smp.c
@@ -40,6 +40,7 @@
#include
#include
#include
+#include
#include
#include
#include
diff --git a/trunk/arch/powerpc/kernel/time.c b/trunk/arch/powerpc/kernel/time.c
index a6282b625b44..6996a593dcb3 100644
--- a/trunk/arch/powerpc/kernel/time.c
+++ b/trunk/arch/powerpc/kernel/time.c
@@ -61,7 +61,6 @@
#include
#include
#include
-#include
#ifdef CONFIG_PPC64
#include
#include
@@ -70,7 +69,6 @@
#include
#include
#endif
-#include
/* keep track of when we need to update the rtc */
time_t last_rtc_update;
@@ -120,6 +118,10 @@ static unsigned adjusting_time = 0;
unsigned long ppc_proc_freq;
unsigned long ppc_tb_freq;
+#ifdef CONFIG_PPC32 /* XXX for now */
+#define boot_cpuid 0
+#endif
+
u64 tb_last_jiffy __cacheline_aligned_in_smp;
unsigned long tb_last_stamp;
diff --git a/trunk/arch/powerpc/kernel/traps.c b/trunk/arch/powerpc/kernel/traps.c
index 0578f8387603..07e5ee40b870 100644
--- a/trunk/arch/powerpc/kernel/traps.c
+++ b/trunk/arch/powerpc/kernel/traps.c
@@ -39,6 +39,7 @@
#include
#include
#include
+#include
#include
#ifdef CONFIG_PPC32
#include
@@ -747,12 +748,22 @@ static int check_bug_trap(struct pt_regs *regs)
return 0;
if (bug->line & BUG_WARNING_TRAP) {
/* this is a WARN_ON rather than BUG/BUG_ON */
+#ifdef CONFIG_XMON
+ xmon_printf(KERN_ERR "Badness in %s at %s:%ld\n",
+ bug->function, bug->file,
+ bug->line & ~BUG_WARNING_TRAP);
+#endif /* CONFIG_XMON */
printk(KERN_ERR "Badness in %s at %s:%ld\n",
bug->function, bug->file,
bug->line & ~BUG_WARNING_TRAP);
dump_stack();
return 1;
}
+#ifdef CONFIG_XMON
+ xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%ld!\n",
+ bug->function, bug->file, bug->line);
+ xmon(regs);
+#endif /* CONFIG_XMON */
printk(KERN_CRIT "kernel BUG in %s at %s:%ld!\n",
bug->function, bug->file, bug->line);
@@ -887,6 +898,10 @@ void altivec_unavailable_exception(struct pt_regs *regs)
die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT);
}
+#ifdef CONFIG_PPC64
+extern perf_irq_t perf_irq;
+#endif
+
#if defined(CONFIG_PPC64) || defined(CONFIG_E500)
void performance_monitor_exception(struct pt_regs *regs)
{
diff --git a/trunk/arch/powerpc/kernel/vio.c b/trunk/arch/powerpc/kernel/vio.c
index 71a6addf9f7f..97082a4203ad 100644
--- a/trunk/arch/powerpc/kernel/vio.c
+++ b/trunk/arch/powerpc/kernel/vio.c
@@ -21,7 +21,6 @@
#include
#include
#include
-#include
static const struct vio_device_id *vio_match_device(
const struct vio_device_id *, const struct vio_dev *);
@@ -266,33 +265,7 @@ static int vio_bus_match(struct device *dev, struct device_driver *drv)
return (ids != NULL) && (vio_match_device(ids, vio_dev) != NULL);
}
-static int vio_hotplug(struct device *dev, char **envp, int num_envp,
- char *buffer, int buffer_size)
-{
- const struct vio_dev *vio_dev = to_vio_dev(dev);
- char *cp;
- int length;
-
- if (!num_envp)
- return -ENOMEM;
-
- if (!vio_dev->dev.platform_data)
- return -ENODEV;
- cp = (char *)get_property(vio_dev->dev.platform_data, "compatible", &length);
- if (!cp)
- return -ENODEV;
-
- envp[0] = buffer;
- length = scnprintf(buffer, buffer_size, "MODALIAS=vio:T%sS%s",
- vio_dev->type, cp);
- if (buffer_size - length <= 0)
- return -ENOMEM;
- envp[1] = NULL;
- return 0;
-}
-
struct bus_type vio_bus_type = {
.name = "vio",
- .hotplug = vio_hotplug,
.match = vio_bus_match,
};
diff --git a/trunk/arch/powerpc/lib/locks.c b/trunk/arch/powerpc/lib/locks.c
index 35bd03c41dd1..2a912f411eb4 100644
--- a/trunk/arch/powerpc/lib/locks.c
+++ b/trunk/arch/powerpc/lib/locks.c
@@ -23,7 +23,6 @@
#if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES)
#include
#include
-#include
void __spin_yield(raw_spinlock_t *lock)
{
diff --git a/trunk/arch/powerpc/mm/fault.c b/trunk/arch/powerpc/mm/fault.c
index 93d4fbfdb724..841d8b6323a8 100644
--- a/trunk/arch/powerpc/mm/fault.c
+++ b/trunk/arch/powerpc/mm/fault.c
@@ -389,22 +389,5 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
}
/* kernel has accessed a bad area */
-
- printk(KERN_ALERT "Unable to handle kernel paging request for ");
- switch (regs->trap) {
- case 0x300:
- case 0x380:
- printk("data at address 0x%08lx\n", regs->dar);
- break;
- case 0x400:
- case 0x480:
- printk("instruction fetch\n");
- break;
- default:
- printk("unknown fault\n");
- }
- printk(KERN_ALERT "Faulting instruction address: 0x%08lx\n",
- regs->nip);
-
die("Kernel access of bad area", regs, sig);
}
diff --git a/trunk/arch/powerpc/mm/hash_utils_64.c b/trunk/arch/powerpc/mm/hash_utils_64.c
index 22e474876133..b2f3dbca6952 100644
--- a/trunk/arch/powerpc/mm/hash_utils_64.c
+++ b/trunk/arch/powerpc/mm/hash_utils_64.c
@@ -33,6 +33,7 @@
#include
#include
+#include
#include
#include
#include
@@ -328,14 +329,12 @@ static void __init htab_init_page_sizes(void)
*/
if (mmu_psize_defs[MMU_PAGE_16M].shift)
mmu_huge_psize = MMU_PAGE_16M;
- /* With 4k/4level pagetables, we can't (for now) cope with a
- * huge page size < PMD_SIZE */
else if (mmu_psize_defs[MMU_PAGE_1M].shift)
mmu_huge_psize = MMU_PAGE_1M;
/* Calculate HPAGE_SHIFT and sanity check it */
- if (mmu_psize_defs[mmu_huge_psize].shift > MIN_HUGEPTE_SHIFT &&
- mmu_psize_defs[mmu_huge_psize].shift < SID_SHIFT)
+ if (mmu_psize_defs[mmu_huge_psize].shift > 16 &&
+ mmu_psize_defs[mmu_huge_psize].shift < 28)
HPAGE_SHIFT = mmu_psize_defs[mmu_huge_psize].shift;
else
HPAGE_SHIFT = 0; /* No huge pages dude ! */
@@ -408,6 +407,12 @@ void __init htab_initialize(void)
htab_size_bytes = htab_get_table_size();
pteg_count = htab_size_bytes >> 7;
+ /* For debug, make the HTAB 1/8 as big as it normally would be. */
+ ifppcdebug(PPCDBG_HTABSIZE) {
+ pteg_count >>= 3;
+ htab_size_bytes = pteg_count << 7;
+ }
+
htab_hash_mask = pteg_count - 1;
if (systemcfg->platform & PLATFORM_LPAR) {
@@ -507,9 +512,6 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap)
{
struct page *page;
- if (!pfn_valid(pte_pfn(pte)))
- return pp;
-
page = pte_page(pte);
/* page is dirty */
diff --git a/trunk/arch/powerpc/mm/hugetlbpage.c b/trunk/arch/powerpc/mm/hugetlbpage.c
index 426c269e552e..0073a04047e4 100644
--- a/trunk/arch/powerpc/mm/hugetlbpage.c
+++ b/trunk/arch/powerpc/mm/hugetlbpage.c
@@ -212,12 +212,6 @@ static int prepare_high_area_for_htlb(struct mm_struct *mm, unsigned long area)
BUG_ON(area >= NUM_HIGH_AREAS);
- /* Hack, so that each addresses is controlled by exactly one
- * of the high or low area bitmaps, the first high area starts
- * at 4GB, not 0 */
- if (start == 0)
- start = 0x100000000UL;
-
/* Check no VMAs are in the region */
vma = find_vma(mm, start);
if (vma && (vma->vm_start < end))
diff --git a/trunk/arch/powerpc/mm/init_64.c b/trunk/arch/powerpc/mm/init_64.c
index ce974c83d88a..dfe7fa37b41a 100644
--- a/trunk/arch/powerpc/mm/init_64.c
+++ b/trunk/arch/powerpc/mm/init_64.c
@@ -57,6 +57,7 @@
#include
#include
#include
+#include
#include
#include
#include
diff --git a/trunk/arch/powerpc/mm/mem.c b/trunk/arch/powerpc/mm/mem.c
index 6f55efd9be95..7faa46b71f21 100644
--- a/trunk/arch/powerpc/mm/mem.c
+++ b/trunk/arch/powerpc/mm/mem.c
@@ -358,7 +358,7 @@ void __init mem_init(void)
}
codesize = (unsigned long)&_sdata - (unsigned long)&_stext;
- datasize = (unsigned long)&_edata - (unsigned long)&_sdata;
+ datasize = (unsigned long)&__init_begin - (unsigned long)&_sdata;
initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin;
bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start;
diff --git a/trunk/arch/powerpc/mm/numa.c b/trunk/arch/powerpc/mm/numa.c
index da09ba03c424..4035cad8d7f1 100644
--- a/trunk/arch/powerpc/mm/numa.c
+++ b/trunk/arch/powerpc/mm/numa.c
@@ -21,7 +21,6 @@
#include
#include
#include
-#include
static int numa_enabled = 1;
diff --git a/trunk/arch/powerpc/mm/pgtable_64.c b/trunk/arch/powerpc/mm/pgtable_64.c
index 900842451bd3..51b786940971 100644
--- a/trunk/arch/powerpc/mm/pgtable_64.c
+++ b/trunk/arch/powerpc/mm/pgtable_64.c
@@ -59,6 +59,7 @@
#include
#include
#include
+#include
#include
#include
#include |