1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954
|
diff -uNr linux-v2.4.4/CREDITS rtlinux_kernel_2_4/CREDITS
--- linux-v2.4.4/CREDITS Thu Jun 21 17:28:23 2001
+++ rtlinux_kernel_2_4/CREDITS Thu Jun 21 17:23:40 2001
@@ -1126,13 +1126,11 @@
S: USA
N: Benjamin Herrenschmidt
-E: bh40@calva.net
+E: benh@kernel.crashing.org
E: benh@mipsys.com
-D: PowerMac booter (BootX)
-D: Additional PowerBook support
-D: Apple "Core99" machines support (ibook,g4,...)
-S: 22, rue des Marguettes
-S: 75012 Paris
+D: Various parts of PPC & PowerMac
+S: 122, boulevard Baille
+S: 13005 Marseille
S: France
N: Sebastian Hetze
@@ -1731,6 +1729,8 @@
N: Paul Mackerras
E: paulus@samba.org
+D: PPP driver
+D: Linux for PowerPC
D: Linux port for PCI Power Macintosh
N: Pat Mackinlay
diff -uNr linux-v2.4.4/Documentation/Configure.help rtlinux_kernel_2_4/Documentation/Configure.help
--- linux-v2.4.4/Documentation/Configure.help Thu Jun 21 17:31:47 2001
+++ rtlinux_kernel_2_4/Documentation/Configure.help Thu Jun 21 17:27:07 2001
@@ -11489,6 +11489,16 @@
(the one containing the directory /) cannot be a module, so saying M
could be dangerous. If unsure, say N.
+PReP residual data support
+CONFIG_PREP_RESIDUAL
+ Some PReP systems have residual data passed to the kernel by the
+ firmware. This allows detection of memory size, devices present and
+ other useful pieces of information. Sometimes this information is not
+ present or incorrect.
+
+ Unless you expect to boot on a PReP system, there is not need to select
+ yes.
+
/proc file system support
CONFIG_PROC_FS
This is a virtual file system providing information about the status
@@ -13204,6 +13214,14 @@
say M here and read Documentation/modules.txt. The module will be
called msbusmouse.o.
+Apple Desktop Bus support
+CONFIG_ADB
+ Apple Desktop Bus (ADB) support is for support of devices which
+ are connected to the to an ADB port. ADB devices tend to have
+ 4 pins. If you have an Apple Macintosh prior to the iMac, or a
+ "Blue and White G3", you probably want to say Y here. Otherwise
+ say N.
+
Apple Desktop Bus mouse support
CONFIG_ADBMOUSE
Say Y here if you have this type of bus mouse (4 pin connector) as
@@ -16249,22 +16267,45 @@
Processor Type
CONFIG_6xx
There are four types of PowerPC chips supported. The more common
- types (601, 603, 604, 740, 750), the Motorola embedded versions
- (821, 823, 850, 855, 860), the IBM embedded versions (403 and
+ types (601, 603, 604, 740, 750, 7400), the Motorola embedded versions
+ (821, 823, 850, 855, 860, 8260), the IBM embedded versions (403 and
405) and the high end 64 bit Power processors (Power 3, Power 4).
- Unless you are building a kernel for one of the embedded
- processor systems, or a 64 bit IBM RS/6000, choose 6xx. Note that
- the kernel runs in 32-bit mode even on 64-bit chips.
+ Unless you are building a kernel for one of the embedded processor
+ systems, or a 64 bit IBM RS/6000, choose 6xx. Note that the kernel
+ runs in 32-bit mode even on 64-bit chips. Also note that because
+ the 82xx family has a 603e core, specific support for that chipset
+ is asked later on.
+
+Motorola MPC8260 CPM support
+CONFIG_8260
+ The MPC8260 CPM (Communications Processor Module) is a typically
+ embedded CPU made by Motorola. Selecting this option means that
+ you wish to build a kernel for a machine with specifically an 8260
+ for a CPU.
+
+ If in doubt, say N.
+
+Workarounds for PPC601 bugs
+CONFIG_PPC601_SYNC_FIX
+ Some versions of the PPC601 (the first PowerPC chip) have bugs which
+ mean that extra synchronization instructions are required near certain
+ instructions, typically those that make major changes to the CPU state.
+ These extra instructions reduce performance slightly. If you say N
+ here, these extra instructions will not be included, resulting in a
+ kernel which will run faster but may not run at all on some systems
+ with the PPC601 chip.
+
+ If in doubt, say Y here.
Machine Type
-CONFIG_PMAC
+CONFIG_ALL_PPC
Linux currently supports several different kinds of PowerPC-based
machines: Apple Power Macintoshes and clones (such as the Motorola
Starmax series), PReP (PowerPC Reference Platform) machines such as
- the Motorola PowerStack, Amiga Power-Up systems (APUS), CHRP and the
- embedded MBX boards from Motorola. Currently, a single kernel binary
- only supports one type or the other. However, there is very early
- work on support for CHRP, PReP and PowerMac's from a single binary.
+ the Motorola PowerStack, CHRP (Common Hardware Reference Platform),
+ the embedded MBX boards from Motorola and many others. Currently,
+ the default option is to build a kernel which works on the first
+ three. Support for other machines is currently incomplete.
Power management support for PowerBooks
CONFIG_PMAC_PBOOK
@@ -16323,6 +16364,37 @@
This option adds a device-tree directory under /proc which contains
an image of the device tree that the kernel copies from Open
Firmware. If unsure, say Y here.
+
+RTAS proc interface
+CONFIG_PPC_RTAS
+ When you use this option, you will be able to use RTAS from
+ userspace.
+
+ RTAS stands for RunTime Abstraction Services and should
+ provide a portable way to access and set system information. This is
+ commonly used on RS/6000 (pSeries) computers.
+
+ You can access RTAS via the special proc filesystem entry rtas.
+ Don't confuse this rtas entry with the one in /proc/device-tree/rtas
+ which is readonly.
+
+ If you don't know if you can use RTAS look into
+ /proc/device-tree/rtas. If there are some entries, it is very likely
+ that you will be able to use RTAS.
+
+ You can do cool things with rtas. To print out information about
+ various sensors in the system, just do a
+
+ $ cat /proc/rtas/sensors
+
+ or if you power off your machine at night but want it running when
+ you enter your office at 7:45 am, do a
+
+ # date -d 'tomorrow 7:30' +%s > /proc/rtas/poweron
+
+ and shutdown.
+
+ If unsure, say Y
MESH (Power Mac internal SCSI) support
CONFIG_SCSI_MESH
diff -uNr linux-v2.4.4/Documentation/sysrq.txt rtlinux_kernel_2_4/Documentation/sysrq.txt
--- linux-v2.4.4/Documentation/sysrq.txt Thu Jun 21 17:30:35 2001
+++ rtlinux_kernel_2_4/Documentation/sysrq.txt Thu Jun 21 17:25:42 2001
@@ -29,7 +29,8 @@
You send a BREAK, then within 5 seconds a command key. Sending
BREAK twice is interpreted as a normal BREAK.
-On Mac - Press 'Keypad+-F13-<command key>'
+On PowerPC - Press 'ALT - Print Screen (or F13) - <command key>,
+ Print Screen (or F13) - <command key> may suffice.
On other - If you know of the key combos for other architectures, please
let me know so I can add them to this section.
diff -uNr linux-v2.4.4/MAINTAINERS rtlinux_kernel_2_4/MAINTAINERS
--- linux-v2.4.4/MAINTAINERS Thu Jun 21 17:31:09 2001
+++ rtlinux_kernel_2_4/MAINTAINERS Thu Jun 21 17:26:13 2001
@@ -608,6 +608,11 @@
W: http://www.uni-mainz.de/~langm000/linux.html
S: Maintained
+IBM RS/6000 LINUX
+P: Paul Mackerras
+M: paulus@samba.org
+S: Supported
+
IBM ServeRAID RAID DRIVER
P: Keith Mitchell
M: ipslinux@us.ibm.com
@@ -783,12 +788,14 @@
LINUX FOR POWERPC
P: Cort Dougan
M: cort@fsmlabs.com
+P: Paul Mackerras
+M: paulus@samba.org
W: http://www.fsmlabs.com/linuxppcbk.html
-S: Maintained
+S: Supported
LINUX FOR POWER MACINTOSH
-P: Paul Mackerras
-M: paulus@samba.org
+P: Benjamin Herrenschmidt
+M: benh@kernel.crashing.org
W: http://www.linuxppc.org/
L: linuxppc-dev@lists.linuxppc.org
S: Maintained
@@ -1048,7 +1055,7 @@
P: Paul Mackerras
M: paulus@samba.org
L: linux-ppp@vger.kernel.org
-S: Maintained
+S: Supported
PPP OVER ETHERNET
P: Michal Ostrowski
diff -uNr linux-v2.4.4/Makefile rtlinux_kernel_2_4/Makefile
--- linux-v2.4.4/Makefile Thu Jun 21 17:31:55 2001
+++ rtlinux_kernel_2_4/Makefile Thu Jun 21 17:27:27 2001
@@ -1,11 +1,21 @@
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 4
-EXTRAVERSION =
+EXTRAVERSION = -rtl
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
+#
+# Set the PATH so we're sure to get the right build tools.
+# Also, only set ARCH and CROSS_COMPILE if they aren't set
+# already so we can set them when invoking make.
+# -- Cort <cort@fsmlabs.com
+#
+PATH := /opt/rtldk-1.0/bin:${PATH}
+ifeq (,$(ARCH))
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+CROSS_COMPILE =
+endif
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
@@ -17,8 +27,6 @@
HOSTCC = gcc
HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-
-CROSS_COMPILE =
#
# Include the make variables (CC, etc...)
diff -uNr linux-v2.4.4/arch/alpha/config.in rtlinux_kernel_2_4/arch/alpha/config.in
--- linux-v2.4.4/arch/alpha/config.in Thu Jun 21 17:30:06 2001
+++ rtlinux_kernel_2_4/arch/alpha/config.in Thu Jun 21 17:25:17 2001
@@ -57,6 +57,11 @@
Takara CONFIG_ALPHA_TAKARA \
Titan CONFIG_ALPHA_TITAN \
Wildfire CONFIG_ALPHA_WILDFIRE" Generic
+bool 'RTLinux (Real-Time) Support' CONFIG_RTLINUX
+
+if [ "$CONFIG_RTLINUX" = "y" ]; then
+ define_bool CONFIG_RTL y
+fi
# clear all implied options (don't want default values for those):
unset CONFIG_ALPHA_EV4 CONFIG_ALPHA_EV5 CONFIG_ALPHA_EV6 CONFIG_ALPHA_EV67
diff -uNr linux-v2.4.4/arch/alpha/kernel/alpha_ksyms.c rtlinux_kernel_2_4/arch/alpha/kernel/alpha_ksyms.c
--- linux-v2.4.4/arch/alpha/kernel/alpha_ksyms.c Thu Jun 21 17:29:15 2001
+++ rtlinux_kernel_2_4/arch/alpha/kernel/alpha_ksyms.c Thu Jun 21 17:24:29 2001
@@ -16,6 +16,7 @@
#include <linux/pci.h>
#include <linux/tty.h>
#include <linux/mm.h>
+#include <linux/irq.h>
#include <asm/io.h>
#include <asm/hwrpb.h>
@@ -29,15 +30,22 @@
#include <asm/machvec.h>
#include <asm/pgalloc.h>
#include <asm/semaphore.h>
+#include "irq_impl.h"
#define __KERNEL_SYSCALLS__
#include <asm/unistd.h>
+#include "proto.h"
+
extern struct hwrpb_struct *hwrpb;
extern void dump_thread(struct pt_regs *, struct user *);
extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
extern spinlock_t kernel_flag;
extern spinlock_t rtc_lock;
+irq_desc_t irq_desc[NR_IRQS];
+extern void ret_from_sys_call(void);
+extern void restore_all(void);
+extern void restore_all_rtl(void);
/* these are C runtime functions with special calling conventions: */
extern void __divl (void);
@@ -56,6 +64,7 @@
EXPORT_SYMBOL(probe_irq_mask);
EXPORT_SYMBOL(screen_info);
EXPORT_SYMBOL(perf_irq);
+EXPORT_SYMBOL(irq_desc);
/* platform dependent support */
EXPORT_SYMBOL(_inb);
@@ -232,3 +241,59 @@
EXPORT_SYMBOL(get_wchan);
EXPORT_SYMBOL(flush_tlb_page);
+
+#ifdef CONFIG_RTLINUX
+EXPORT_SYMBOL(linux_soft_sti);
+EXPORT_SYMBOL(__swpipl);
+EXPORT_SYMBOL(__rdps);
+EXPORT_SYMBOL(handle_irq);
+EXPORT_SYMBOL(restore_all);
+EXPORT_SYMBOL(restore_all_rtl);
+EXPORT_SYMBOL(ret_from_sys_call);
+extern struct console *console_drivers;
+EXPORT_SYMBOL(console_drivers);
+extern spinlock_t console_lock;
+EXPORT_SYMBOL(console_lock);
+EXPORT_SYMBOL(do_softirq);
+extern unsigned long rtlinux_do_entArith, rtlinux_do_entIF,
+ rtlinux_do_page_fault, rtlinux_do_entDbg, rtlinux_do_entUna,
+ rtlinux_sys_call_table;
+EXPORT_SYMBOL(rtlinux_do_entIF);
+EXPORT_SYMBOL(rtlinux_do_entArith);
+EXPORT_SYMBOL(rtlinux_do_page_fault);
+EXPORT_SYMBOL(rtlinux_do_entDbg);
+EXPORT_SYMBOL(rtlinux_do_entUna);
+EXPORT_SYMBOL(rtlinux_sys_call_table);
+extern void do_entArith(unsigned long summary, unsigned long write_mask,
+ unsigned long a2, unsigned long a3, unsigned long a4,
+ unsigned long a5, struct pt_regs regs);
+EXPORT_SYMBOL(do_entArith);
+extern void do_entIF(unsigned long type, unsigned long a1,
+ unsigned long a2, unsigned long a3, unsigned long a4,
+ unsigned long a5, struct pt_regs regs);
+EXPORT_SYMBOL(do_entIF);
+extern void do_page_fault(unsigned long address, unsigned long mmcsr,
+ long cause, struct pt_regs *regs);
+EXPORT_SYMBOL(do_page_fault);
+extern void do_entDbg(unsigned long type, unsigned long a1,
+ unsigned long a2, unsigned long a3, unsigned long a4,
+ unsigned long a5, struct pt_regs regs);
+EXPORT_SYMBOL(do_entDbg);
+struct allregs {
+ unsigned long regs[32];
+ unsigned long ps, pc, gp, a0, a1, a2;
+};
+extern void do_entUna(void * va, unsigned long opcode, unsigned long reg,
+ unsigned long a3, unsigned long a4, unsigned long a5,
+ struct allregs regs);
+EXPORT_SYMBOL(do_entUna);
+extern unsigned search_exception_table(unsigned long, unsigned long);
+EXPORT_SYMBOL(search_exception_table);
+#ifdef CONFIG_SMP
+EXPORT_SYMBOL(__cpu_logical_map);
+EXPORT_SYMBOL(smp_call_function);
+extern void (*smp_percpu_timer_interrupt)(struct pt_regs *);
+EXPORT_SYMBOL(smp_percpu_timer_interrupt);
+EXPORT_SYMBOL(handle_ipi);
+#endif /* CONFIG_SMP */
+#endif /* CONFIG_RTLINUX */
diff -uNr linux-v2.4.4/arch/alpha/kernel/entry.S rtlinux_kernel_2_4/arch/alpha/kernel/entry.S
--- linux-v2.4.4/arch/alpha/kernel/entry.S Thu Jun 21 17:29:04 2001
+++ rtlinux_kernel_2_4/arch/alpha/kernel/entry.S Thu Jun 21 17:24:22 2001
@@ -154,7 +154,43 @@
/* handle the fault */
lda $8,0x3fff
bic $30,$8,$8
+#ifdef CONFIG_RTLINUX
+ /* check if the RTLinux debugger is loaded */
+ lda $1,rtlinux_do_page_fault
+ ldq $3,0($1)
+ beq $3,1f
+
+ mov $3,$27
+ /* save arg regs */
+ subq $30,56,$30
+ stq $16,0($30)
+ stq $17,8($30)
+ stq $18,16($30)
+ stq $19,24($30)
+ stq $20,32($30)
+ stq $21,40($30)
+ stq $22,48($30)
+ /* call the RTLinux debugger */
+ jsr $26,($27),0
+ ldgp $29,0($26)
+ /* restore arg regs */
+ ldq $16,0($30)
+ ldq $17,8($30)
+ ldq $18,16($30)
+ ldq $19,24($30)
+ ldq $20,32($30)
+ ldq $21,40($30)
+ ldq $22,48($30)
+ addq $30,56,$30
+ /* check the return value of RTLinux debugger */
+ beq $0,1f
+ br 2f
+1:
+#endif /* CONFIG_RTLINUX */
jsr $26,do_page_fault
+#ifdef CONFIG_RTLINUX
+2:
+#endif /* CONFIG_RTLINUX */
/* reload the registers after the exception code played. */
ldq $9,0($30)
ldq $10,8($30)
@@ -174,8 +210,41 @@
entArith:
SAVE_ALL
lda $8,0x3fff
- lda $26,ret_from_sys_call
bic $30,$8,$8
+#ifdef CONFIG_RTLINUX
+ /* check if the RTLinux debugger wants this trap */
+ lda $1,rtlinux_do_entArith
+ ldq $3,0($1)
+ beq $3,1f
+
+ mov $3,$27
+ /* save arg regs */
+ subq $30,56,$30
+ stq $16,0($30)
+ stq $17,8($30)
+ stq $18,16($30)
+ stq $19,24($30)
+ stq $20,32($30)
+ stq $21,40($30)
+ stq $22,48($30)
+ /* call the RTLinux debugger */
+ jsr $26,($27),0
+ ldgp $29,0($26)
+ /* restore arg regs */
+ ldq $16,0($30)
+ ldq $17,8($30)
+ ldq $18,16($30)
+ ldq $19,24($30)
+ ldq $20,32($30)
+ ldq $21,40($30)
+ ldq $22,48($30)
+ addq $30,56,$30
+ /* check the return value of RTLinux debugger */
+ beq $0,1f
+ br ret_from_sys_call
+1:
+#endif /* CONFIG_RTLINUX */
+ lda $26,ret_from_sys_call
jsr $31,do_entArith
.end entArith
@@ -185,8 +254,41 @@
entIF:
SAVE_ALL
lda $8,0x3fff
- lda $26,ret_from_sys_call
bic $30,$8,$8
+#ifdef CONFIG_RTLINUX
+ /* check if the RTLinux debugger wants this trap */
+ lda $1,rtlinux_do_entIF
+ ldq $3,0($1)
+ beq $3,1f
+
+ mov $3,$27
+ /* save arg regs */
+ subq $30,56,$30
+ stq $16,0($30)
+ stq $17,8($30)
+ stq $18,16($30)
+ stq $19,24($30)
+ stq $20,32($30)
+ stq $21,40($30)
+ stq $22,48($30)
+ /* call the RTLinux debugger */
+ jsr $26,($27),0
+ ldgp $29,0($26)
+ /* restore arg regs */
+ ldq $16,0($30)
+ ldq $17,8($30)
+ ldq $18,16($30)
+ ldq $19,24($30)
+ ldq $20,32($30)
+ ldq $21,40($30)
+ ldq $22,48($30)
+ addq $30,56,$30
+ /* check the return value of RTLinux debugger */
+ beq $0,1f
+ br ret_from_sys_call
+1:
+#endif /* CONFIG_RTLINUX */
+ lda $26,ret_from_sys_call
jsr $31,do_entIF
.end entIF
@@ -196,8 +298,41 @@
entDbg:
SAVE_ALL
lda $8,0x3fff
- lda $26,ret_from_sys_call
bic $30,$8,$8
+#ifdef CONFIG_RTLINUX
+ /* check if the RTLinux debugger is loaded */
+ lda $1,rtlinux_do_entDbg
+ ldq $3,0($1)
+ beq $3,1f
+
+ mov $3,$27
+ /* save arg regs */
+ subq $30,56,$30
+ stq $16,0($30)
+ stq $17,8($30)
+ stq $18,16($30)
+ stq $19,24($30)
+ stq $20,32($30)
+ stq $21,40($30)
+ stq $22,48($30)
+ /* call the RTLinux debugger */
+ jsr $26,($27),0
+ ldgp $29,0($26)
+ /* restore arg regs */
+ ldq $16,0($30)
+ ldq $17,8($30)
+ ldq $18,16($30)
+ ldq $19,24($30)
+ ldq $20,32($30)
+ ldq $21,40($30)
+ ldq $22,48($30)
+ addq $30,56,$30
+ /* check the return value of RTLinux debugger */
+ beq $0,1f
+ br $26,ret_from_sys_call
+1:
+#endif /* CONFIG_RTLINUX */
+ lda $26,ret_from_sys_call
jsr $31,do_entDbg
.end entDbg
@@ -425,6 +560,68 @@
lda $8,0x3fff
stq $31,248($30)
bic $30,$8,$8
+#ifdef CONFIG_RTLINUX
+ /* check if the RTLinux debugger wants this trap */
+ lda $1,rtlinux_do_entUna
+ ldq $3,0($1)
+ beq $3,1f
+
+ mov $3,$27
+ /* save arg regs */
+ subq $30,56,$30
+ stq $16,0($30)
+ stq $17,8($30)
+ stq $18,16($30)
+ stq $19,24($30)
+ stq $20,32($30)
+ stq $21,40($30)
+ stq $22,48($30)
+ /* call the RTLinux debugger */
+ jsr $26,($27),0
+ ldgp $29,0($26)
+ /* restore arg regs */
+ ldq $16,0($30)
+ ldq $17,8($30)
+ ldq $18,16($30)
+ ldq $19,24($30)
+ ldq $20,32($30)
+ ldq $21,40($30)
+ ldq $22,48($30)
+ addq $30,56,$30
+ ldq $0,0($30)
+ ldq $1,8($30)
+ ldq $2,16($30)
+ ldq $3,24($30)
+ ldq $4,32($30)
+ ldq $5,40($30)
+ ldq $6,48($30)
+ ldq $7,56($30)
+ ldq $8,64($30)
+ ldq $9,72($30)
+ ldq $10,80($30)
+ ldq $11,88($30)
+ ldq $12,96($30)
+ ldq $13,104($30)
+ ldq $14,112($30)
+ ldq $15,120($30)
+ /* 16-18 PAL-saved */
+ ldq $19,152($30)
+ ldq $20,160($30)
+ ldq $21,168($30)
+ ldq $22,176($30)
+ ldq $23,184($30)
+ ldq $24,192($30)
+ ldq $25,200($30)
+ ldq $26,208($30)
+ ldq $27,216($30)
+ ldq $28,224($30)
+ ldq $29,232($30)
+ lda $30,256($30)
+ /* check the return value of RTLinux debugger */
+ beq $0,1f
+ br ret_from_sys_call
+1:
+#endif /* CONFIG_RTLINUX */
jsr $26,do_entUna
ldq $0,0($30)
ldq $1,8($30)
@@ -567,6 +764,21 @@
bne $3,strace
beq $4,1f
ldq $27,0($5)
+#ifdef CONFIG_RTLINUX
+ /* check if the RTLinux debugger wants this trap */
+ lda $1, rtlinux_sys_call_table
+ ldq $3, 0($1)
+ beq $3, 1f
+
+ /* call the RTLinux debugger */
+ mov $3, $27
+ jsr $26, ($27), 0
+ ldgp $29, 0($26)
+ blt $0,syscall_error /* the call failed */
+ stq $0,0($30)
+ stq $31,72($30) /* a3=0 => no error */
+ br ret_from_sys_call
+#endif /* CONFIG_RTLINUX */
1: jsr $26,($27),alpha_ni_syscall
ldgp $29,0($26)
blt $0,syscall_error /* the call failed */
@@ -585,6 +797,16 @@
and $4,$3,$4
bne $4,handle_softirq
ret_from_softirq:
+#ifdef CONFIG_RTLINUX
+ lda $1,linux_soft_sti
+ ldq $3,0($1)
+ beq $3,1f
+
+ mov $3,$27
+ jsr $26,($27),0
+ ldgp $29,0($26)
+1:
+#endif /* CONFIG_RTLINUX */
ldq $0,SP_OFF($30)
and $0,8,$0
beq $0,restore_all
@@ -596,7 +818,20 @@
ldl $5,TASK_SIGPENDING($8)
beq $4,restore_all
bne $5,signal_return
+ .globl restore_all
restore_all:
+#ifdef CONFIG_RTLINUX
+ lda $1,linux_soft_sti
+ ldq $3,0($1)
+ beq $3,1f
+
+ mov $3,$27
+ jsr $26,($27),0
+ ldgp $29,0($26)
+1:
+#endif /* CONFIG_RTLINUX */
+ .globl restore_all_rtl
+restore_all_rtl:
RESTORE_ALL
call_pal PAL_rti
diff -uNr linux-v2.4.4/arch/alpha/kernel/irq.c rtlinux_kernel_2_4/arch/alpha/kernel/irq.c
--- linux-v2.4.4/arch/alpha/kernel/irq.c Thu Jun 21 17:33:18 2001
+++ rtlinux_kernel_2_4/arch/alpha/kernel/irq.c Thu Jun 21 17:30:22 2001
@@ -29,6 +29,9 @@
#include <asm/bitops.h>
#include <asm/uaccess.h>
+#include "proto.h"
+#include "irq_impl.h"
+
/*
* Controller mappings for all interrupt sources:
*/
@@ -83,9 +86,9 @@
status = 1; /* Force the "do bottom halves" bit */
do {
- if (!(action->flags & SA_INTERRUPT))
+ if (!(action->flags & SA_INTERRUPT))
__sti();
- else
+ else
__cli();
status |= action->flags;
@@ -567,6 +570,11 @@
return p - buf;
}
+#ifdef CONFIG_RTLINUX
+unsigned long linux_soft_sti;
+unsigned long (*__rdps)(void) = rdps;
+unsigned long (*__swpipl)(unsigned long) = swpipl;
+#endif /* CONFIG_RTLINUX */
/*
* do_IRQ handles all normal device IRQ's (the special
@@ -574,7 +582,11 @@
* handlers).
*/
void
+#ifdef CONFIG_RTLINUX
+hard_handle_irq(int irq, struct pt_regs * regs)
+#else
handle_irq(int irq, struct pt_regs * regs)
+#endif /* CONFIG_RTLINUX */
{
/*
* We ack quickly, we don't want the irq controller
@@ -599,6 +611,21 @@
}
irq_attempt(cpu, irq)++;
+#ifdef CONFIG_RTLINUX
+ /*
+ * Special case check (hack) for RTLinux SMP on alpha.
+ * We want control to end up in the rtlinux intercept routine
+ * which doesn't happen for RTC interrupts on non-primary cpus
+ * so add this check to make sure it does.
+ * -- Cort
+ */
+ if ((cpu != 0) && (irq == RTC_IRQ))
+ {
+ desc->handler->end(irq);
+ return;
+ }
+#endif /* CONFIG_RTLINUX */
+
spin_lock_irq(&desc->lock); /* mask also the higher prio events */
desc->handler->ack(irq);
/*
@@ -657,6 +684,10 @@
desc->handler->end(irq);
spin_unlock(&desc->lock);
}
+
+#ifdef CONFIG_RTLINUX
+void (*handle_irq)(int irq, struct pt_regs * regs) = hard_handle_irq;
+#endif /* CONFIG_RTLINUX */
/*
* IRQ autodetection code..
diff -uNr linux-v2.4.4/arch/alpha/kernel/irq_alpha.c rtlinux_kernel_2_4/arch/alpha/kernel/irq_alpha.c
--- linux-v2.4.4/arch/alpha/kernel/irq_alpha.c Thu Jun 21 17:33:31 2001
+++ rtlinux_kernel_2_4/arch/alpha/kernel/irq_alpha.c Thu Jun 21 17:30:52 2001
@@ -62,12 +62,16 @@
long cpu;
smp_percpu_timer_interrupt(®s);
cpu = smp_processor_id();
+#if !(defined(CONFIG_RTLINUX) && defined(CONFIG_SMP))
if (cpu != boot_cpuid) {
irq_attempt(cpu, RTC_IRQ)++;
kstat.irqs[cpu][RTC_IRQ]++;
} else {
+#endif
handle_irq(RTC_IRQ, ®s);
+#if !(defined(CONFIG_RTLINUX) && defined(CONFIG_SMP))
}
+#endif
}
#else
handle_irq(RTC_IRQ, ®s);
diff -uNr linux-v2.4.4/arch/alpha/kernel/irq_impl.h rtlinux_kernel_2_4/arch/alpha/kernel/irq_impl.h
--- linux-v2.4.4/arch/alpha/kernel/irq_impl.h Thu Jun 21 17:29:39 2001
+++ rtlinux_kernel_2_4/arch/alpha/kernel/irq_impl.h Thu Jun 21 17:24:49 2001
@@ -8,10 +8,10 @@
* with the IRQ handling routines in irq.c.
*/
+#include <linux/config.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
-
#define RTC_IRQ 8
extern void isa_device_interrupt(unsigned long, struct pt_regs *);
@@ -38,7 +38,13 @@
extern struct hw_interrupt_type i8259a_irq_type;
extern void init_i8259a_irqs(void);
+#ifdef CONFIG_RTLINUX
+extern unsigned long linux_soft_sti, rtl_last_cli;
+extern void (*handle_irq)(int irq, struct pt_regs * regs);
+extern void hard_handle_irq(int irq, struct pt_regs * regs);
+#else
extern void handle_irq(int irq, struct pt_regs * regs);
+#endif /* CONFIG_RTLINUX */
extern unsigned long prof_cpu_mask;
diff -uNr linux-v2.4.4/arch/alpha/kernel/irq_smp.c rtlinux_kernel_2_4/arch/alpha/kernel/irq_smp.c
--- linux-v2.4.4/arch/alpha/kernel/irq_smp.c Thu Jun 21 17:33:41 2001
+++ rtlinux_kernel_2_4/arch/alpha/kernel/irq_smp.c Thu Jun 21 17:31:14 2001
@@ -142,7 +142,7 @@
* Maximize ipl. If ipl was previously 0 and if this thread
* is not in an irq, then take global_irq_lock.
*/
- if (swpipl(IPL_MAX) == IPL_MIN && !local_irq_count(cpu))
+ if (__swpipl(IPL_MAX) == IPL_MIN && !local_irq_count(cpu))
get_irqlock(cpu, where);
}
diff -uNr linux-v2.4.4/arch/alpha/kernel/proto.h rtlinux_kernel_2_4/arch/alpha/kernel/proto.h
--- linux-v2.4.4/arch/alpha/kernel/proto.h Thu Jun 21 17:30:29 2001
+++ rtlinux_kernel_2_4/arch/alpha/kernel/proto.h Thu Jun 21 17:25:35 2001
@@ -92,8 +92,13 @@
/* smp.c */
extern void setup_smp(void);
extern int smp_info(char *buffer);
+#ifdef CONFIG_RTLINUX
+extern void (*handle_ipi)(struct pt_regs *);
+extern void (*smp_percpu_timer_interrupt)(struct pt_regs *);
+#else
extern void handle_ipi(struct pt_regs *);
extern void smp_percpu_timer_interrupt(struct pt_regs *);
+#endif
/* bios32.c */
/* extern void reset_for_srm(void); */
diff -uNr linux-v2.4.4/arch/alpha/kernel/smp.c rtlinux_kernel_2_4/arch/alpha/kernel/smp.c
--- linux-v2.4.4/arch/alpha/kernel/smp.c Thu Jun 21 17:32:08 2001
+++ rtlinux_kernel_2_4/arch/alpha/kernel/smp.c Thu Jun 21 17:27:47 2001
@@ -624,7 +624,11 @@
void
+#ifdef CONFIG_RTLINUX
+hard_smp_percpu_timer_interrupt(struct pt_regs *regs)
+#else
smp_percpu_timer_interrupt(struct pt_regs *regs)
+#endif /* CONFIG_RTLINUX */
{
int cpu = smp_processor_id();
unsigned long user = user_mode(regs);
@@ -647,6 +651,11 @@
}
}
+#ifdef CONFIG_RTLINUX
+void (*smp_percpu_timer_interrupt)(struct pt_regs *) =
+ hard_smp_percpu_timer_interrupt;
+#endif /* CONFIG_RTLINUX */
+
int __init
setup_profiling_timer(unsigned int multiplier)
{
@@ -723,7 +732,11 @@
}
void
+#ifdef CONFIG_RTLINUX
+hard_handle_ipi(struct pt_regs *regs)
+#else
handle_ipi(struct pt_regs *regs)
+#endif CONFIG_RTLINUX
{
int this_cpu = smp_processor_id();
unsigned long *pending_ipis = &ipi_data[this_cpu].bits;
@@ -789,6 +802,10 @@
if (hwrpb->txrdy)
recv_secondary_console_msg();
}
+
+#ifdef CONFIG_RTLINUX
+void (*handle_ipi)(struct pt_regs *) = hard_handle_ipi;
+#endif /* CONFIG_RTLINUX */
void
smp_send_reschedule(int cpu)
diff -uNr linux-v2.4.4/arch/alpha/kernel/traps.c rtlinux_kernel_2_4/arch/alpha/kernel/traps.c
--- linux-v2.4.4/arch/alpha/kernel/traps.c Thu Jun 21 17:33:34 2001
+++ rtlinux_kernel_2_4/arch/alpha/kernel/traps.c Thu Jun 21 17:31:00 2001
@@ -20,6 +20,15 @@
#include <asm/unaligned.h>
#include <asm/sysinfo.h>
+#ifdef CONFIG_RTLINUX
+unsigned long rtlinux_do_entArith = 0;
+unsigned long rtlinux_do_entIF = 0;
+unsigned long rtlinux_do_page_fault = 0;
+unsigned long rtlinux_do_entDbg = 0;
+unsigned long rtlinux_do_entUna = 0;
+unsigned long rtlinux_sys_call_table = 0;
+#endif /* CONFIG_RTLINUX */
+
#include "proto.h"
void
@@ -309,8 +318,9 @@
#endif
printk("%s(%d): %s %ld\n", current->comm, current->pid, str, err);
dik_show_regs(regs, r9_15);
- dik_show_code((unsigned int *)regs->pc);
- dik_show_trace((unsigned long *)(regs+1));
+while(1);
+ /*dik_show_code((unsigned int *)regs->pc);
+ dik_show_trace((unsigned long *)(regs+1));*/
if (current->thread.flags & (1UL << 63)) {
printk("die_if_kernel recursion detected.\n");
diff -uNr linux-v2.4.4/arch/i386/config.in rtlinux_kernel_2_4/arch/i386/config.in
--- linux-v2.4.4/arch/i386/config.in Thu Jun 21 17:31:53 2001
+++ rtlinux_kernel_2_4/arch/i386/config.in Thu Jun 21 17:27:19 2001
@@ -2,11 +2,16 @@
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/config-language.txt.
#
-mainmenu_name "Linux Kernel Configuration"
+mainmenu_name "RTLinux Kernel Configuration"
define_bool CONFIG_X86 y
define_bool CONFIG_ISA y
define_bool CONFIG_SBUS n
+define_bool CONFIG_RTLINUX y
+
+if [ "$CONFIG_RTLINUX" = "y" ]; then
+ define_bool CONFIG_RTL y
+fi
define_bool CONFIG_UID16 y
diff -uNr linux-v2.4.4/arch/i386/kernel/Makefile rtlinux_kernel_2_4/arch/i386/kernel/Makefile
--- linux-v2.4.4/arch/i386/kernel/Makefile Thu Jun 21 17:31:38 2001
+++ rtlinux_kernel_2_4/arch/i386/kernel/Makefile Thu Jun 21 17:26:48 2001
@@ -20,7 +20,6 @@
ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
pci-dma.o i386_ksyms.o i387.o bluesmoke.o dmi_scan.o
-
ifdef CONFIG_PCI
obj-y += pci-i386.o
ifdef CONFIG_VISWS
@@ -30,6 +29,7 @@
endif
endif
+obj-$(CONFIG_RTLINUX) += rtlinux.o
obj-$(CONFIG_MCA) += mca.o
obj-$(CONFIG_MTRR) += mtrr.o
obj-$(CONFIG_X86_MSR) += msr.o
diff -uNr linux-v2.4.4/arch/i386/kernel/entry.S rtlinux_kernel_2_4/arch/i386/kernel/entry.S
--- linux-v2.4.4/arch/i386/kernel/entry.S Thu Jun 21 17:33:24 2001
+++ rtlinux_kernel_2_4/arch/i386/kernel/entry.S Thu Jun 21 17:30:31 2001
@@ -190,11 +190,34 @@
* but we want the default path for a system call return to
* go as quickly as possible which is why some of this is
* less clear than it otherwise should be.
+ *
+ * (c) Victor Yodaiken 1999
+ * RTLINUX_IRET emulates the turn on interrupts effect of
+ * iret since, under RTLinux we may have pended interrupts
+ * that will not be automatically enabled on an iret.
*/
+#ifdef CONFIG_RTLINUX
+#define RTLINUX_IRET \
+ movl rtl_emulate_iret,%eax; \
+ testl %eax, %eax; \
+ je 1f; \
+ call *%eax; \
+ 1:
+#else
+#define RTLINUX_IRET
+#endif
ENTRY(system_call)
pushl %eax # save orig_eax
SAVE_ALL
+#ifdef CONFIG_RTLINUX
+ movl rtl_syscall_intercept,%ebx
+ testl %ebx, %ebx
+ je 991f
+ call *%ebx
+ movl ORIG_EAX(%esp), %eax
+991:
+#endif
GET_CURRENT(%ebx)
cmpl $(NR_syscalls),%eax
jae badsys
@@ -220,11 +243,13 @@
cmpl $0,sigpending(%ebx)
jne signal_return
restore_all:
+ RTLINUX_IRET
RESTORE_ALL
ALIGN
signal_return:
sti # we can get here from an interrupt handler
+ RTLINUX_IRET
testl $(VM_MASK),EFLAGS(%esp)
movl %esp,%eax
jne v86_signal_return
@@ -288,6 +313,12 @@
call SYMBOL_NAME(schedule) # test
jmp ret_from_sys_call
+#define RTL_PUSH_VECTOR(vector,routine) \
+1: cmpl $routine, %edi; \
+ jne 1f; \
+ pushl $vector; \
+ jmp 7f;
+
ENTRY(divide_error)
pushl $0 # no error code
pushl $ SYMBOL_NAME(do_divide_error)
@@ -315,6 +346,39 @@
movl $(__KERNEL_DS),%edx
movl %edx,%ds
movl %edx,%es
+#ifdef CONFIG_RTLINUX
+ movl rtl_exception_intercept,%eax
+ testl %eax, %eax
+ je 8f
+ RTL_PUSH_VECTOR(0,do_divide_error)
+ RTL_PUSH_VECTOR(1,do_debug)
+ RTL_PUSH_VECTOR(3,do_int3)
+ RTL_PUSH_VECTOR(4,do_overflow)
+ RTL_PUSH_VECTOR(5,do_bounds)
+ RTL_PUSH_VECTOR(6,do_invalid_op)
+ RTL_PUSH_VECTOR(8,do_double_fault)
+ RTL_PUSH_VECTOR(9,do_coprocessor_segment_overrun)
+ RTL_PUSH_VECTOR(10,do_invalid_TSS)
+ RTL_PUSH_VECTOR(11,do_segment_not_present)
+ RTL_PUSH_VECTOR(12,do_stack_segment)
+ RTL_PUSH_VECTOR(13,do_general_protection)
+ RTL_PUSH_VECTOR(14,do_page_fault)
+ RTL_PUSH_VECTOR(15,do_spurious_interrupt_bug)
+ RTL_PUSH_VECTOR(16,do_coprocessor_error)
+ RTL_PUSH_VECTOR(17,do_alignment_check)
+ RTL_PUSH_VECTOR(18,do_machine_check)
+ RTL_PUSH_VECTOR(19,do_simd_coprocessor_error)
+1: push $-1
+7: mov %ecx, %ebx # ebx will not be corrupted by a C routine
+ call *%eax
+ popl %ecx
+ mov %ebx, %ecx
+ testl %eax, %eax
+ je 8f
+ addl $8,%esp
+ RESTORE_ALL
+8:
+#endif
GET_CURRENT(%ebx)
call *%edi
addl $8,%esp
@@ -333,6 +397,21 @@
ENTRY(device_not_available)
pushl $-1 # mark this as an int
SAVE_ALL
+#ifdef CONFIG_RTLINUX
+ movl rtl_exception_intercept,%eax
+ testl %eax, %eax
+ je 8f
+ movl %esp,%edx
+ pushl $0 # no error code
+ pushl %edx
+ pushl $7 # vector
+ call *%eax
+ addl $12,%esp
+ testl %eax, %eax
+ je 8f
+ RESTORE_ALL
+8:
+#endif
GET_CURRENT(%ebx)
pushl $ret_from_exception
movl %cr0,%eax
diff -uNr linux-v2.4.4/arch/i386/kernel/i386_ksyms.c rtlinux_kernel_2_4/arch/i386/kernel/i386_ksyms.c
--- linux-v2.4.4/arch/i386/kernel/i386_ksyms.c Thu Jun 21 17:31:52 2001
+++ rtlinux_kernel_2_4/arch/i386/kernel/i386_ksyms.c Thu Jun 21 17:27:17 2001
@@ -163,3 +163,51 @@
#ifdef CONFIG_X86_PAE
EXPORT_SYMBOL(empty_zero_page);
#endif
+
+#ifdef CONFIG_RTLINUX
+#include <asm/mpspec.h>
+#ifdef CONFIG_X86_IO_APIC
+EXPORT_SYMBOL(smp_found_config);
+#endif
+#include <linux/vt_kern.h>
+EXPORT_SYMBOL(kd_mksound);
+extern void *__start_rtlinux_funcs,*__stop_rtlinux_funcs;
+EXPORT_SYMBOL(__start_rtlinux_funcs);
+EXPORT_SYMBOL(__stop_rtlinux_funcs);
+EXPORT_SYMBOL(irq_control);
+extern unsigned long (*do_gettimeoffset)(void);
+extern unsigned int use_tsc;
+EXPORT_SYMBOL(do_gettimeoffset);
+EXPORT_SYMBOL(use_tsc);
+EXPORT_SYMBOL(tick);
+extern unsigned long wall_jiffies;
+extern rwlock_t xtime_lock;
+EXPORT_SYMBOL(wall_jiffies);
+EXPORT_SYMBOL(xtime_lock);
+extern unsigned char *rtl_cached21;
+EXPORT_SYMBOL(rtl_cached21);
+extern void (*rtl_do_exit_handler)(long code);
+extern void (*rtl_syscall_intercept)(struct pt_regs regs);
+EXPORT_SYMBOL(init_tss);
+EXPORT_SYMBOL(rtl_syscall_intercept);
+EXPORT_SYMBOL(rtl_do_exit_handler);
+#ifdef CONFIG_SMP
+EXPORT_SYMBOL(flush_tlb_all);
+extern int rtl_reserved_cpumask;
+EXPORT_SYMBOL(rtl_reserved_cpumask);
+extern unsigned long irq_affinity [NR_IRQS];
+EXPORT_SYMBOL(irq_affinity);
+EXPORT_SYMBOL(x86_apicid_to_cpu);
+extern unsigned long flush_cpumask;
+EXPORT_SYMBOL(flush_cpumask);
+EXPORT_SYMBOL(cpu_tlbstate);
+#endif /* CONFIG_SMP */
+extern struct console *console_drivers;
+EXPORT_SYMBOL(console_drivers);
+extern spinlock_t console_lock;
+EXPORT_SYMBOL(console_lock);
+EXPORT_SYMBOL(do_softirq);
+EXPORT_SYMBOL(set_ldt_desc);
+EXPORT_SYMBOL(default_ldt);
+
+#endif /* CONFIG_RTLINUX */
diff -uNr linux-v2.4.4/arch/i386/kernel/i8259.c rtlinux_kernel_2_4/arch/i386/kernel/i8259.c
--- linux-v2.4.4/arch/i386/kernel/i8259.c Thu Jun 21 17:32:27 2001
+++ rtlinux_kernel_2_4/arch/i386/kernel/i8259.c Thu Jun 21 17:28:25 2001
@@ -129,6 +129,14 @@
spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED;
+#ifdef CONFIG_RTLINUX
+#undef spin_lock_irqsave
+#define spin_lock_irqsave(lock, flags) do { rtl_hard_local_irq_save_kernel(flags); spin_lock(lock); } while (0)
+
+#undef spin_unlock_irqrestore
+#define spin_unlock_irqrestore(lock, flags) do { spin_unlock(lock); rtl_hard_local_irq_restore_kernel(flags); } while (0)
+#endif
+
static void end_8259A_irq (unsigned int irq)
{
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
@@ -168,6 +176,7 @@
#define __byte(x,y) (((unsigned char *)&(y))[x])
#define cached_21 (__byte(0,cached_irq_mask))
#define cached_A1 (__byte(1,cached_irq_mask))
+unsigned char *rtl_cached21 = &cached_21;
/*
* Not all IRQs can be routed through the IO-APIC, eg. on certain (older)
diff -uNr linux-v2.4.4/arch/i386/kernel/io_apic.c rtlinux_kernel_2_4/arch/i386/kernel/io_apic.c
--- linux-v2.4.4/arch/i386/kernel/io_apic.c Thu Jun 21 17:33:38 2001
+++ rtlinux_kernel_2_4/arch/i386/kernel/io_apic.c Thu Jun 21 17:31:06 2001
@@ -35,6 +35,14 @@
static spinlock_t ioapic_lock = SPIN_LOCK_UNLOCKED;
+#ifdef CONFIG_RTLINUX
+#undef spin_lock_irqsave
+#define spin_lock_irqsave(lock, flags) do { rtl_hard_local_irq_save_kernel(flags); spin_lock(lock); } while (0)
+
+#undef spin_unlock_irqrestore
+#define spin_unlock_irqrestore(lock, flags) do { spin_unlock(lock); rtl_hard_local_irq_restore_kernel(flags); } while (0)
+#endif
+
/*
* # of IO-APICs and # of IRQ routing registers
*/
diff -uNr linux-v2.4.4/arch/i386/kernel/irq.c rtlinux_kernel_2_4/arch/i386/kernel/irq.c
--- linux-v2.4.4/arch/i386/kernel/irq.c Thu Jun 21 17:28:26 2001
+++ rtlinux_kernel_2_4/arch/i386/kernel/irq.c Thu Jun 21 17:23:50 2001
@@ -160,7 +160,7 @@
p += sprintf(p, "%10u ",
nmi_count(cpu_logical_map(j)));
p += sprintf(p, "\n");
-#if CONFIG_SMP
+#if CONFIG_X86_LOCAL_APIC
p += sprintf(p, "LOC: ");
for (j = 0; j < smp_num_cpus; j++)
p += sprintf(p, "%10u ",
@@ -1018,7 +1018,7 @@
static struct proc_dir_entry * irq_dir [NR_IRQS];
static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
-static unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
+unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
#define HEX_DIGITS 8
diff -uNr linux-v2.4.4/arch/i386/kernel/rtlinux.c rtlinux_kernel_2_4/arch/i386/kernel/rtlinux.c
--- linux-v2.4.4/arch/i386/kernel/rtlinux.c Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/arch/i386/kernel/rtlinux.c Thu Jun 21 17:31:09 2001
@@ -0,0 +1,80 @@
+#include <linux/config.h>
+#include <linux/ptrace.h>
+#include <linux/errno.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/ioport.h>
+#include <linux/interrupt.h>
+#include <linux/timex.h>
+#include <linux/malloc.h>
+#include <linux/random.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#include <linux/kernel_stat.h>
+
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/bitops.h>
+#include <asm/pgtable.h>
+#include <asm/delay.h>
+#include <asm/desc.h>
+
+#include <linux/irq.h>
+
+static void rtl_hard_save_flags_f(unsigned long *z){
+ unsigned long y;
+ rtl_hard_save_flags_kernel(y);
+ *z=y;
+}
+static void rtl_hard_restore_flags_f(unsigned long x) { rtl_hard_restore_flags_kernel(x); }
+static void rtl_hard_cli_f(void) { rtl_hard_cli_kernel(); }
+static void rtl_hard_sti_f(void) { rtl_hard_sti_kernel(); }
+static void rtl_hard_local_irq_save_f(unsigned long *x)
+{ unsigned long y;rtl_hard_local_irq_save_kernel(y);*x=y; }
+static void rtl_hard_local_irq_restore_f(unsigned long x){
+ rtl_hard_local_irq_restore_kernel(x);
+}
+struct irq_control_s irq_control = {
+ rtl_hard_save_flags_f,
+ rtl_hard_restore_flags_f,
+ rtl_hard_cli_f,
+ rtl_hard_sti_f,
+ rtl_hard_local_irq_save_f,
+ rtl_hard_local_irq_restore_f
+ };
+void *rtl_emulate_iret = 0;
+void *rtl_exception_intercept = 0;
+void *rtl_syscall_intercept = 0;
+
+extern void *__start_rtlinux_patch,*__stop_rtlinux_patch;
+extern asmlinkage void do_IRQ(struct pt_regs );
+extern void ret_from_intr(void);
+RTLINUX_EXPORT(__start_rtlinux_patch);
+RTLINUX_EXPORT(__stop_rtlinux_patch);
+RTLINUX_EXPORT(rtl_emulate_iret);
+RTLINUX_EXPORT(irq_desc);
+RTLINUX_EXPORT(do_IRQ);
+RTLINUX_EXPORT(ret_from_intr);
+RTLINUX_EXPORT(rtl_exception_intercept);
+
+#ifdef CONFIG_X86_LOCAL_APIC
+extern asmlinkage void smp_spurious_interrupt(void);
+extern asmlinkage void smp_error_interrupt(void);
+extern void smp_apic_timer_interrupt(struct pt_regs *);
+
+RTLINUX_EXPORT(smp_spurious_interrupt);
+RTLINUX_EXPORT(smp_error_interrupt);
+RTLINUX_EXPORT(smp_apic_timer_interrupt);
+#endif
+
+#ifdef CONFIG_SMP
+extern void rtl_reschedule(int cpu);
+extern asmlinkage void smp_reschedule_interrupt(void);
+extern asmlinkage void smp_invalidate_interrupt(void);
+extern asmlinkage void smp_call_function_interrupt(void);
+RTLINUX_EXPORT(smp_reschedule_interrupt);
+RTLINUX_EXPORT(smp_invalidate_interrupt);
+RTLINUX_EXPORT(smp_call_function_interrupt);
+RTLINUX_EXPORT(rtl_reschedule);
+#endif
diff -uNr linux-v2.4.4/arch/i386/kernel/smp.c rtlinux_kernel_2_4/arch/i386/kernel/smp.c
--- linux-v2.4.4/arch/i386/kernel/smp.c Thu Jun 21 17:30:33 2001
+++ rtlinux_kernel_2_4/arch/i386/kernel/smp.c Thu Jun 21 17:25:41 2001
@@ -166,7 +166,14 @@
void send_IPI_self(int vector)
{
+#ifdef CONFIG_RTLINUX
+ unsigned long flags;
+ rtl_hard_local_irq_save_kernel(flags);
+#endif
__send_IPI_shortcut(APIC_DEST_SELF, vector);
+#ifdef CONFIG_RTLINUX
+ rtl_hard_local_irq_restore_kernel(flags);
+#endif
}
static inline void send_IPI_mask(int mask, int vector)
@@ -174,8 +181,12 @@
unsigned long cfg;
unsigned long flags;
- __save_flags(flags);
- __cli();
+#ifdef CONFIG_RTLINUX
+ rtl_hard_local_irq_save_kernel(flags);
+#else
+ __save_flags(flags);
+ __cli();
+#endif
/*
* Wait for idle.
@@ -197,7 +208,9 @@
* Send the IPI. The write to APIC_ICR fires this off.
*/
apic_write_around(APIC_ICR, cfg);
- __restore_flags(flags);
+#ifdef CONFIG_RTLINUX
+ rtl_hard_local_irq_restore_kernel(flags);
+#endif
}
/*
@@ -210,7 +223,7 @@
* Optimizations Manfred Spraul <manfred@colorfullife.com>
*/
-static volatile unsigned long flush_cpumask;
+volatile unsigned long flush_cpumask;
static struct mm_struct * flush_mm;
static unsigned long flush_va;
static spinlock_t tlbstate_lock = SPIN_LOCK_UNLOCKED;
@@ -301,6 +314,10 @@
clear_bit(cpu, &flush_cpumask);
}
+#ifdef CONFIG_RTLINUX
+extern int rtl_reserved_cpumask;
+#endif
+
static void flush_tlb_others (unsigned long cpumask, struct mm_struct *mm,
unsigned long va)
{
@@ -331,6 +348,9 @@
flush_mm = mm;
flush_va = va;
atomic_set_mask(cpumask, &flush_cpumask);
+#ifdef CONFIG_RTLINUX
+ atomic_clear_mask(rtl_reserved_cpumask, &flush_cpumask);
+#endif
/*
* We have to send the IPI only to
* CPUs affected.
@@ -394,7 +414,7 @@
leave_mm(cpu);
}
-static void flush_tlb_all_ipi(void* info)
+void flush_tlb_all_ipi(void* info)
{
do_flush_tlb_all_local();
}
@@ -417,6 +437,14 @@
send_IPI_mask(1 << cpu, RESCHEDULE_VECTOR);
}
+#ifdef CONFIG_RTLINUX
+#define RTL_RESCHEDULE_VECTOR 0xEE
+void rtl_reschedule(int cpu)
+{
+ send_IPI_mask(1 << cpu, RTL_RESCHEDULE_VECTOR);
+}
+#endif
+
/*
* Structure and data for smp_call_function(). This is designed to minimise
* static memory requirements. It also looks cleaner.
@@ -539,4 +567,5 @@
if (wait)
atomic_inc(&call_data->finished);
}
+
diff -uNr linux-v2.4.4/arch/i386/kernel/time.c rtlinux_kernel_2_4/arch/i386/kernel/time.c
--- linux-v2.4.4/arch/i386/kernel/time.c Thu Jun 21 17:33:31 2001
+++ rtlinux_kernel_2_4/arch/i386/kernel/time.c Thu Jun 21 17:30:50 2001
@@ -118,7 +118,7 @@
extern spinlock_t i8259A_lock;
-#ifndef CONFIG_X86_TSC
+#if defined (CONFIG_RTLINUX) || ! defined (CONFIG_X86_TSC)
/* This function must be called with interrupts disabled
* It was inspired by Steve McCanne's microtime-i386 for BSD. -- jrs
@@ -199,6 +199,10 @@
int i;
+#ifdef CONFIG_RTLINUX
+ unsigned long flags;
+ rtl_hard_local_irq_save_kernel(flags);
+#endif
spin_lock(&i8259A_lock);
/*
* This is tricky when I/O APICs are used;
@@ -206,6 +210,9 @@
*/
i = inb(0x20);
spin_unlock(&i8259A_lock);
+#ifdef CONFIG_RTLINUX
+ rtl_hard_local_irq_restore_kernel(flags);
+#endif
/* assumption about timer being IRQ0 */
if (i & 0x01) {
@@ -242,7 +249,7 @@
return count;
}
-static unsigned long (*do_gettimeoffset)(void) = do_slow_gettimeoffset;
+unsigned long (*do_gettimeoffset)(void) = do_slow_gettimeoffset;
#else
@@ -391,11 +398,18 @@
* This will also deassert NMI lines for the watchdog if run
* on an 82489DX-based system.
*/
- spin_lock(&i8259A_lock);
+#ifdef CONFIG_RTLINUX
+ unsigned long flags;
+ rtl_hard_local_irq_save_kernel(flags);
+#endif
+ spin_lock(&i8259A_lock);
outb(0x0c, 0x20);
/* Ack the IRQ; AEOI will end it automatically. */
inb(0x20);
spin_unlock(&i8259A_lock);
+#ifdef CONFIG_RTLINUX
+ rtl_hard_local_irq_restore_kernel(flags);
+#endif
}
#endif
@@ -449,7 +463,7 @@
#endif
}
-static int use_tsc;
+int use_tsc;
/*
* This is the same as the above, except we _also_ save the current
diff -uNr linux-v2.4.4/arch/i386/kernel/traps.c rtlinux_kernel_2_4/arch/i386/kernel/traps.c
--- linux-v2.4.4/arch/i386/kernel/traps.c Thu Jun 21 17:30:29 2001
+++ rtlinux_kernel_2_4/arch/i386/kernel/traps.c Thu Jun 21 17:25:35 2001
@@ -49,6 +49,7 @@
#include <linux/irq.h>
+
asmlinkage int system_call(void);
asmlinkage void lcall7(void);
asmlinkage void lcall27(void);
@@ -387,8 +388,7 @@
}
#if CONFIG_X86_IO_APIC
-
-int nmi_watchdog = 0;
+int nmi_watchdog = 1;
static int __init setup_nmi_watchdog(char *str)
{
@@ -400,6 +400,10 @@
static spinlock_t nmi_print_lock = SPIN_LOCK_UNLOCKED;
+#ifdef CONFIG_RTLINUX
+int rtl_reserved_cpumask = 0;
+#endif
+
inline void nmi_watchdog_tick(struct pt_regs * regs)
{
/*
@@ -424,7 +428,16 @@
* Since current-> is always on the stack, and we always switch
* the stack NMI-atomically, it's safe to use smp_processor_id().
*/
- int sum, cpu = smp_processor_id();
+#ifndef CONFIG_RTLINUX
+ int sum, cpu = smp_processor_id();
+#else
+ /* For RTLinux this is not always the case, hence hard_smp_processor_id */
+ int sum, cpu = hw_smp_processor_id();
+
+ if (test_bit(cpu, &rtl_reserved_cpumask)) {
+ return;
+ }
+#endif
sum = apic_timer_irqs[cpu];
@@ -460,7 +473,11 @@
unsigned char reason = inb(0x61);
- ++nmi_count(smp_processor_id());
+#ifndef CONFIG_RTLINUX
+ ++nmi_count(smp_processor_id());
+#else
+ ++nmi_count(hw_smp_processor_id());
+#endif
if (!(reason & 0xc0)) {
#if CONFIG_X86_IO_APIC
/*
diff -uNr linux-v2.4.4/arch/i386/mm/ioremap.c rtlinux_kernel_2_4/arch/i386/mm/ioremap.c
--- linux-v2.4.4/arch/i386/mm/ioremap.c Thu Jun 21 17:30:02 2001
+++ rtlinux_kernel_2_4/arch/i386/mm/ioremap.c Thu Jun 21 17:25:12 2001
@@ -82,6 +82,7 @@
phys_addr + address, flags))
break;
error = 0;
+ set_pgdir(address, *dir);
address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++;
} while (address && (address < end));
diff -uNr linux-v2.4.4/arch/ppc/8xx_io/Config.in rtlinux_kernel_2_4/arch/ppc/8xx_io/Config.in
--- linux-v2.4.4/arch/ppc/8xx_io/Config.in Thu Jun 21 17:33:24 2001
+++ rtlinux_kernel_2_4/arch/ppc/8xx_io/Config.in Thu Jun 21 17:30:31 2001
@@ -18,12 +18,12 @@
fi
bool 'Use Big CPM Ethernet Buffers' CONFIG_ENET_BIG_BUFFERS
fi
-bool 'Use SMC2 for UART' CONFIG_8xxSMC2
-if [ "$CONFIG_8xxSMC2" = "y" ]; then
- bool 'Use Alternate SMC2 I/O (823/850)' CONFIG_8xx_ALTSMC2
- bool 'Use SMC2 for Console' CONFIG_8xx_CONS_SMC2
+bool 'Use SMC2 for UART' CONFIG_SMC2_UART
+if [ "$CONFIG_SMC2_UART" = "y" ]; then
+ bool 'Use Alternate SMC2 I/O (823/850)' CONFIG_ALTSMC2
+ bool 'Use SMC2 for Console' CONFIG_CONS_SMC2
fi
-bool 'Enable SCC2 and SCC3 for UART' CONFIG_8xxSCC
+bool 'Enable SCC2 and SCC3 for UART' CONFIG_USE_SCC_IO
# This doesn't really belong here, but it is convenient to ask
# 8xx specific questions.
diff -uNr linux-v2.4.4/arch/ppc/8xx_io/uart.c rtlinux_kernel_2_4/arch/ppc/8xx_io/uart.c
--- linux-v2.4.4/arch/ppc/8xx_io/uart.c Thu Jun 21 17:30:03 2001
+++ rtlinux_kernel_2_4/arch/ppc/8xx_io/uart.c Thu Jun 21 17:25:10 2001
@@ -55,17 +55,17 @@
*/
# ifndef CONFIG_SERIAL_CONSOLE_PORT
# ifdef CONFIG_SCC3_ENET
-# ifdef CONFIG_8xx_CONS_SMC2
+# ifdef CONFIG_CONS_SMC2
# define CONFIG_SERIAL_CONSOLE_PORT 0 /* Console on SMC2 is 1st port */
# else
# error "Can't use SMC1 for console with Ethernet on SCC3"
# endif
# else /* ! CONFIG_SCC3_ENET */
-# ifdef CONFIG_8xx_CONS_SMC2 /* Console on SMC2 */
+# ifdef CONFIG_CONS_SMC2 /* Console on SMC2 */
# define CONFIG_SERIAL_CONSOLE_PORT 1
# else /* Console on SMC1 */
# define CONFIG_SERIAL_CONSOLE_PORT 0
-# endif /* CONFIG_8xx_CONS_SMC2 */
+# endif /* CONFIG_CONS_SMC2 */
# endif /* CONFIG_SCC3_ENET */
# endif /* CONFIG_SERIAL_CONSOLE_PORT */
#endif /* CONFIG_SERIAL_CONSOLE */
@@ -134,15 +134,15 @@
{ 0, 0, PROFF_SMC1, CPMVEC_SMC1, 0, 0 }, /* SMC1 ttyS0 */
#endif
#if !defined(CONFIG_USB_MPC8xx) && !defined(CONFIG_USB_CLIENT_MPC8xx)
-# ifdef CONFIG_8xxSMC2
+# ifdef CONFIG_SMC2_UART
{ 0, 0, PROFF_SMC2, CPMVEC_SMC2, 0, 1 }, /* SMC2 ttyS1 */
# endif
-# ifdef CONFIG_8xxSCC
+# ifdef CONFIG_USE_SCC_IO
{ 0, 0, PROFF_SCC2, CPMVEC_SCC2, 0, (NUM_IS_SCC | 1) }, /* SCC2 ttyS2 */
{ 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, (NUM_IS_SCC | 2) }, /* SCC3 ttyS3 */
# endif
#else /* CONFIG_USB_xxx */
-# ifdef CONFIG_8xxSCC
+# ifdef CONFIG_USE_SCC_IO
{ 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, (NUM_IS_SCC | 2) }, /* SCC3 ttyS3 */
# endif
#endif /* CONFIG_USB_xxx */
@@ -2533,7 +2533,7 @@
/* Configure SCC2, SCC3, and SCC4 instead of port A parallel I/O.
*/
-#ifdef CONFIG_8xxSCC
+#ifdef CONFIG_USE_SCC_IO
#ifndef CONFIG_MBX
/* The "standard" configuration through the 860.
*/
@@ -2747,7 +2747,7 @@
* parallel I/O. On 823/850 these are on
* port A for SMC2.
*/
-#ifndef CONFIG_8xx_ALTSMC2
+#ifndef CONFIG_ALTSMC2
iobits = 0xc0 << (idx * 4);
cp->cp_pbpar |= iobits;
cp->cp_pbdir &= ~iobits;
diff -uNr linux-v2.4.4/arch/ppc/Makefile rtlinux_kernel_2_4/arch/ppc/Makefile
--- linux-v2.4.4/arch/ppc/Makefile Thu Jun 21 17:33:27 2001
+++ rtlinux_kernel_2_4/arch/ppc/Makefile Thu Jun 21 17:30:44 2001
@@ -31,7 +31,7 @@
endif
ifdef CONFIG_8xx
-CFLAGS := $(CFLAGS) -mcpu=860 -I../8xx_io
+CFLAGS := $(CFLAGS) -mcpu=860
endif
ifdef CONFIG_PPC64BRIDGE
@@ -144,6 +144,9 @@
.PHONY: clean_config
clean_config:
rm -f .config arch/ppc/defconfig
+
+gemini_config: clean_config
+ cp -f arch/ppc/configs/gemini_defconfig arch/ppc/defconfig
pmac_config: clean_config
cp -f arch/ppc/configs/pmac_defconfig arch/ppc/defconfig
diff -uNr linux-v2.4.4/arch/ppc/boot/Makefile rtlinux_kernel_2_4/arch/ppc/boot/Makefile
--- linux-v2.4.4/arch/ppc/boot/Makefile Thu Jun 21 17:33:40 2001
+++ rtlinux_kernel_2_4/arch/ppc/boot/Makefile Thu Jun 21 17:31:14 2001
@@ -31,6 +31,12 @@
TFTPIMAGE=/tftpboot/zImage.prep$(MSIZE)
endif
+ifeq ($(CONFIG_SMP),y)
+TFTPSIMAGE=/tftpboot/sImage.smp
+else
+TFTPSIMAGE=/tftpboot/sImage
+endif
+
ifeq ($(CONFIG_PPC64BRIDGE),y)
MSIZE=.64
else
@@ -70,8 +76,24 @@
--add-section=image=../coffboot/vmlinux.gz \
zvmlinux.initrd.tmp $@
rm zvmlinux.initrd.tmp
+ifdef CONFIG_GEMINI
+ $(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS)
+ $(OBJCOPY) -I elf32-powerpc -O binary zvmlinux.initrd.tmp svmlinux.initrd.tmp
+ ./mksimage svmlinux.initrd.tmp ../coffboot/vmlinux.gz ramdisk.image.gz \
+ -o svmlinux.initrd > sImage.map
+ $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh sioffset initrd` \
+ -DINITRD_SIZE=`sh sisize initrd` \
+ -DZIMAGE_OFFSET=`sh sioffset zimage` \
+ -DZIMAGE_SIZE=`sh sisize zimage` \
+ -c -o misc.o misc.c
+ $(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS)
+ $(OBJCOPY) -I elf32-powerpc -O binary zvmlinux.initrd.tmp svmlinux.initrd.tmp
+ ./mksimage svmlinux.initrd.tmp ../coffboot/vmlinux.gz ramdisk.image.gz \
+ -o svmlinux.initrd > /dev/null
+ rm svmlinux.initrd.tmp zvmlinux.initrd.tmp sImage.map
+endif
-zImage: zvmlinux mkprep
+zImage: zvmlinux mkprep sImage mksimage
ifdef CONFIG_ALL_PPC
./mkprep -pbp zvmlinux zImage
endif
@@ -80,12 +102,17 @@
gzip $(GZIP_FLAGS) vmapus
endif
+sImage: ../../../vmlinux
+ifdef CONFIG_GEMINI
+ $(OBJCOPY) -I elf32-powerpc -O binary ../../../vmlinux sImage
+endif
+
zImage.initrd: zvmlinux.initrd mkprep
ifdef CONFIG_ALL_PPC
./mkprep -pbp zvmlinux.initrd zImage.initrd
endif
-zvmlinux: $(OBJECTS) ../coffboot/vmlinux.gz
+zvmlinux: $(OBJECTS) ../coffboot/vmlinux.gz mksimage
#
# build the boot loader image and then compute the offset into it
# for the kernel image
@@ -105,6 +132,19 @@
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment --add-section=image=../coffboot/vmlinux.gz \
zvmlinux.tmp $@
rm zvmlinux.tmp
+ifdef CONFIG_GEMINI
+ $(LD) $(ZLINKFLAGS) -o zvmlinux.tmp $(OBJECTS)
+ $(OBJCOPY) -I elf32-powerpc -O binary zvmlinux.tmp svmlinux.tmp
+ ./mksimage svmlinux.tmp ../coffboot/vmlinux.gz -o svmlinux > sImage.map
+ $(CC) $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 \
+ -DZIMAGE_OFFSET=`sh sioffset zimage` \
+ -DZIMAGE_SIZE=`sh sisize zimage` \
+ -c -o misc.o misc.c
+ $(LD) $(ZLINKFLAGS) -o zvmlinux.tmp $(OBJECTS)
+ $(OBJCOPY) -I elf32-powerpc -O binary zvmlinux.tmp svmlinux.tmp
+ ./mksimage svmlinux.tmp ../coffboot/vmlinux.gz -o svmlinux > /dev/null
+ rm svmlinux.tmp sImage.map zvmlinux.tmp
+endif
floppy: $(TOPDIR)/vmlinux zImage
dd if=zImage of=/dev/fd0H1440 bs=64b
@@ -112,16 +152,22 @@
mkprep : mkprep.c
$(HOSTCC) -o mkprep mkprep.c
+mksimage: mksimage.c
+ $(HOSTCC) -o mksimage mksimage.c
+
znetboot : zImage
ifdef CONFIG_ALL_PPC
cp zImage $(TFTPIMAGE)
endif
+ifdef CONFIG_GEMINI
+ cp sImage $(TFTPSIMAGE)
+endif
znetboot.initrd : zImage.initrd
cp zImage.initrd $(TFTPIMAGE)
clean:
- rm -f vmlinux* zvmlinux* mkprep zImage*
+ rm -f vmlinux* zvmlinux* mkprep zImage* sImage* mksimage
fastdep:
$(TOPDIR)/scripts/mkdep *.[Sch] > .depend
diff -uNr linux-v2.4.4/arch/ppc/boot/mksimage.c rtlinux_kernel_2_4/arch/ppc/boot/mksimage.c
--- linux-v2.4.4/arch/ppc/boot/mksimage.c Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/arch/ppc/boot/mksimage.c Thu Jun 21 17:28:54 2001
@@ -0,0 +1,124 @@
+/*
+ *
+ *
+ *
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+
+#define SIZE 1024
+#define BLOCK_ALIGN(x) (((x)+SIZE-1)&(~(SIZE-1)))
+
+static void
+die(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ fputc('\n', stderr);
+ exit(1);
+}
+
+static void
+usage(void)
+{
+ printf("Usage: mkbinimg <bootstrap> <kernel> <ramdisk> -o <binary>\n");
+ exit(1);
+}
+
+static int
+copy_blocks(int ifd, int ofd, unsigned long *offset, unsigned long *size)
+{
+ off_t cur;
+ int amt;
+ unsigned long len = 0;
+ char buffer[SIZE];
+
+ cur = lseek(ofd, 0, SEEK_CUR);
+
+ if (cur % SIZE) {
+ cur = BLOCK_ALIGN(cur);
+ cur = lseek(ofd, cur, SEEK_SET);
+ }
+
+ *offset = (unsigned long) cur;
+ while((amt = read(ifd, buffer, SIZE)) > 0) {
+ write(ofd, buffer, amt);
+ len += amt;
+ }
+ *size = len;
+ return 0;
+}
+
+
+int
+main(int argc, char *argv[])
+{
+ char *kernel, *loader, *rdimage = NULL;
+ unsigned long ld_off, kern_off, rd_off;
+ unsigned long ld_size, kern_size, rd_size;
+ int fd, ofd, len;
+ char buffer[500];
+
+ if (argc < 5 && !strcmp(argv[argc-2], "-o"))
+ usage();
+
+ if (argc > 5)
+ rdimage = argv[3];
+
+ kernel = argv[2];
+ loader = argv[1];
+
+ ofd = open(argv[argc-1], (O_RDWR|O_CREAT), 0755);
+ if (ofd < 0) {
+ die("can't open %s: %s", argv[5], strerror(errno));
+ }
+
+ ld_off = kern_off = rd_off = 0;
+ ld_size = kern_size = rd_size = 0;
+ memset(buffer, 0, 500);
+ len = 0;
+
+ fd = open(loader, O_RDONLY);
+ if (fd < 0)
+ die("can't open loader: %s", strerror(errno));
+
+ copy_blocks(fd, ofd, &ld_off, &ld_size);
+ len = sprintf(buffer, "bootloader: %x %x\n", ld_off, ld_size);
+ close(fd);
+
+ fd = open(kernel, O_RDONLY);
+ if (fd < 0)
+ die("can't open kernel: %s", strerror(errno));
+
+ copy_blocks(fd, ofd, &kern_off, &kern_size);
+ len += sprintf(buffer+len, "zimage: %x %x\n", kern_off, kern_size);
+ close(fd);
+
+ if (rdimage) {
+ fd = open(rdimage, O_RDONLY);
+ if (fd < 0)
+ die("can't get ramdisk: %s", strerror(errno));
+
+ copy_blocks(fd, ofd, &rd_off, &rd_size);
+ close(fd);
+ }
+
+ len += sprintf(buffer+len, "initrd: %x %x", rd_off, rd_size);
+
+ close(ofd);
+
+ printf("%s\n", buffer);
+
+ return 0;
+}
+
diff -uNr linux-v2.4.4/arch/ppc/boot/sioffset rtlinux_kernel_2_4/arch/ppc/boot/sioffset
--- linux-v2.4.4/arch/ppc/boot/sioffset Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/arch/ppc/boot/sioffset Thu Jun 21 17:23:40 2001
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+OFFSET=`grep $1 sImage.map | awk '{print $2}'`
+echo "0x"$OFFSET
diff -uNr linux-v2.4.4/arch/ppc/boot/sisize rtlinux_kernel_2_4/arch/ppc/boot/sisize
--- linux-v2.4.4/arch/ppc/boot/sisize Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/arch/ppc/boot/sisize Thu Jun 21 17:25:53 2001
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+OFFSET=`grep $1 sImage.map | awk '{print $3}'`
+echo "0x"$OFFSET
diff -uNr linux-v2.4.4/arch/ppc/coffboot/chrpmain.c rtlinux_kernel_2_4/arch/ppc/coffboot/chrpmain.c
--- linux-v2.4.4/arch/ppc/coffboot/chrpmain.c Thu Jun 21 17:32:31 2001
+++ rtlinux_kernel_2_4/arch/ppc/coffboot/chrpmain.c Thu Jun 21 17:28:37 2001
@@ -14,6 +14,8 @@
extern void *finddevice(const char *);
extern int getprop(void *, const char *, void *, int);
+extern void *claim(unsigned int, unsigned int, unsigned int);
+extern void release(void *ptr, unsigned int len);
void make_bi_recs(unsigned long);
void gunzip(void *, int, unsigned char *, int *);
void stop_imac_ethernet(void);
@@ -78,6 +80,7 @@
printf("done %u bytes\n", len);
printf("%u bytes of heap consumed, max in use %u\n",
avail_high - begin_avail, heap_max);
+ release(begin_avail, SCRATCH_SIZE);
} else {
memmove(dst, im, len);
}
@@ -98,8 +101,13 @@
void make_bi_recs(unsigned long addr)
{
struct bi_record *rec;
- rec = (struct bi_record *)_ALIGN((unsigned long)addr+(1<<20)-1,(1<<20));
-
+
+ /* leave a 1MB gap then align to the next 1MB boundary */
+ addr = _ALIGN(addr+ (1<<20) - 1, (1<<20));
+ if (addr >= PROG_START + PROG_SIZE)
+ claim(addr, 0x1000, 0);
+
+ rec = (struct bi_record *)addr;
rec->tag = BI_FIRST;
rec->size = sizeof(struct bi_record);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
diff -uNr linux-v2.4.4/arch/ppc/coffboot/start.c rtlinux_kernel_2_4/arch/ppc/coffboot/start.c
--- linux-v2.4.4/arch/ppc/coffboot/start.c Thu Jun 21 17:33:46 2001
+++ rtlinux_kernel_2_4/arch/ppc/coffboot/start.c Thu Jun 21 17:31:23 2001
@@ -172,6 +172,25 @@
return args.ret;
}
+void
+release(void *virt, unsigned int size)
+{
+ struct prom_args {
+ char *service;
+ int nargs;
+ int nret;
+ void *virt;
+ unsigned int size;
+ } args;
+
+ args.service = "release";
+ args.nargs = 2;
+ args.nret = 0;
+ args.virt = virt;
+ args.size = size;
+ (*prom)(&args);
+}
+
int
getprop(void *phandle, const char *name, void *buf, int buflen)
{
diff -uNr linux-v2.4.4/arch/ppc/config.in rtlinux_kernel_2_4/arch/ppc/config.in
--- linux-v2.4.4/arch/ppc/config.in Thu Jun 21 17:29:31 2001
+++ rtlinux_kernel_2_4/arch/ppc/config.in Thu Jun 21 17:24:44 2001
@@ -3,8 +3,8 @@
# see Documentation/kbuild/config-language.txt.
#
define_bool CONFIG_UID16 n
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
+define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
+define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
mainmenu_name "Linux/PowerPC Kernel Configuration"
@@ -84,6 +84,7 @@
if [ "$CONFIG_6xx" = "y" -a "$CONFIG_8260" = "n" ]; then
choice 'Machine Type' \
"PowerMac/PReP/MTX/CHRP CONFIG_ALL_PPC \
+ Gemini CONFIG_GEMINI \
APUS CONFIG_APUS" PowerMac/PReP/MTX/CHRP
fi
@@ -118,7 +119,6 @@
comment 'General setup'
bool 'High memory support (experimental)' CONFIG_HIGHMEM
-bool 'Mac-on-Linux support' CONFIG_MOL
define_bool CONFIG_ISA n
define_bool CONFIG_EISA n
diff -uNr linux-v2.4.4/arch/ppc/configs/SM850_defconfig rtlinux_kernel_2_4/arch/ppc/configs/SM850_defconfig
--- linux-v2.4.4/arch/ppc/configs/SM850_defconfig Thu Jun 21 17:30:33 2001
+++ rtlinux_kernel_2_4/arch/ppc/configs/SM850_defconfig Thu Jun 21 17:27:42 2001
@@ -396,10 +396,10 @@
CONFIG_SCC3_ENET=y
# CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y
-CONFIG_8xxSMC2=y
-CONFIG_8xx_ALTSMC2=y
-CONFIG_8xx_CONS_SMC2=y
-# CONFIG_8xxSCC is not set
+CONFIG_SMC2_UART=y
+CONFIG_ALTSMC2=y
+CONFIG_CONS_SMC2=y
+# CONFIG_USE_SCC_IO is not set
#
# Generic MPC8xx Options
diff -uNr linux-v2.4.4/arch/ppc/configs/SPD823TS_defconfig rtlinux_kernel_2_4/arch/ppc/configs/SPD823TS_defconfig
--- linux-v2.4.4/arch/ppc/configs/SPD823TS_defconfig Thu Jun 21 17:33:39 2001
+++ rtlinux_kernel_2_4/arch/ppc/configs/SPD823TS_defconfig Thu Jun 21 17:25:22 2001
@@ -392,10 +392,10 @@
CONFIG_SCC2_ENET=y
# CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y
-CONFIG_8xxSMC2=y
-CONFIG_8xx_ALTSMC2=y
-# CONFIG_8xx_CONS_SMC2 is not set
-# CONFIG_8xxSCC is not set
+CONFIG_SMC2_UART=y
+CONFIG_ALTSMC2=y
+# CONFIG_CONS_SMC2 is not set
+# CONFIG_USE_SCC_IO is not set
#
# Generic MPC8xx Options
diff -uNr linux-v2.4.4/arch/ppc/configs/TQM823L_defconfig rtlinux_kernel_2_4/arch/ppc/configs/TQM823L_defconfig
--- linux-v2.4.4/arch/ppc/configs/TQM823L_defconfig Thu Jun 21 17:33:39 2001
+++ rtlinux_kernel_2_4/arch/ppc/configs/TQM823L_defconfig Thu Jun 21 17:28:25 2001
@@ -395,10 +395,10 @@
# CONFIG_SCC3_ENET is not set
# CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y
-CONFIG_8xxSMC2=y
-CONFIG_8xx_ALTSMC2=y
-# CONFIG_8xx_CONS_SMC2 is not set
-# CONFIG_8xxSCC is not set
+CONFIG_SMC2_UART=y
+CONFIG_ALTSMC2=y
+# CONFIG_CONS_SMC2 is not set
+# CONFIG_USE_SCC_IO is not set
#
# Generic MPC8xx Options
diff -uNr linux-v2.4.4/arch/ppc/configs/TQM850L_defconfig rtlinux_kernel_2_4/arch/ppc/configs/TQM850L_defconfig
--- linux-v2.4.4/arch/ppc/configs/TQM850L_defconfig Thu Jun 21 17:32:28 2001
+++ rtlinux_kernel_2_4/arch/ppc/configs/TQM850L_defconfig Thu Jun 21 17:31:01 2001
@@ -395,10 +395,10 @@
# CONFIG_SCC3_ENET is not set
# CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y
-CONFIG_8xxSMC2=y
-CONFIG_8xx_ALTSMC2=y
-# CONFIG_8xx_CONS_SMC2 is not set
-# CONFIG_8xxSCC is not set
+CONFIG_SMC2_UART=y
+CONFIG_ALTSMC2=y
+# CONFIG_CONS_SMC2 is not set
+# CONFIG_USE_SCC_IO is not set
#
# Generic MPC8xx Options
diff -uNr linux-v2.4.4/arch/ppc/configs/TQM860L_defconfig rtlinux_kernel_2_4/arch/ppc/configs/TQM860L_defconfig
--- linux-v2.4.4/arch/ppc/configs/TQM860L_defconfig Thu Jun 21 17:32:29 2001
+++ rtlinux_kernel_2_4/arch/ppc/configs/TQM860L_defconfig Thu Jun 21 17:26:37 2001
@@ -395,10 +395,10 @@
# CONFIG_SCC3_ENET is not set
# CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y
-CONFIG_8xxSMC2=y
-# CONFIG_8xx_ALTSMC2 is not set
-# CONFIG_8xx_CONS_SMC2 is not set
-# CONFIG_8xxSCC is not set
+CONFIG_SMC2_UART=y
+# CONFIG_ALTSMC2 is not set
+# CONFIG_CONS_SMC2 is not set
+# CONFIG_USE_SCC_IO is not set
#
# Generic MPC8xx Options
diff -uNr linux-v2.4.4/arch/ppc/configs/bseip_defconfig rtlinux_kernel_2_4/arch/ppc/configs/bseip_defconfig
--- linux-v2.4.4/arch/ppc/configs/bseip_defconfig Thu Jun 21 17:28:56 2001
+++ rtlinux_kernel_2_4/arch/ppc/configs/bseip_defconfig Thu Jun 21 17:24:12 2001
@@ -409,9 +409,9 @@
CONFIG_SCC2_ENET=y
# CONFIG_FEC_ENET is not set
# CONFIG_ENET_BIG_BUFFERS is not set
-CONFIG_8xxSMC2=y
-# CONFIG_8xx_ALTSMC2 is not set
-# CONFIG_8xxSCC is not set
+CONFIG_SMC2_UART=y
+# CONFIG_ALTSMC2 is not set
+# CONFIG_USE_SCC_IO is not set
#
# Generic MPC8xx Options
diff -uNr linux-v2.4.4/arch/ppc/configs/gemini_defconfig rtlinux_kernel_2_4/arch/ppc/configs/gemini_defconfig
--- linux-v2.4.4/arch/ppc/configs/gemini_defconfig Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/arch/ppc/configs/gemini_defconfig Thu Jun 21 17:24:17 2001
@@ -0,0 +1,492 @@
+#
+# Automatically generated by make menuconfig: don't edit
+#
+# CONFIG_UID16 is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Platform support
+#
+CONFIG_PPC=y
+CONFIG_6xx=y
+# CONFIG_4xx is not set
+# CONFIG_POWER3 is not set
+# CONFIG_POWER4 is not set
+# CONFIG_8xx is not set
+# CONFIG_8260 is not set
+# CONFIG_ALL_PPC is not set
+CONFIG_GEMINI=y
+# CONFIG_APUS is not set
+# CONFIG_PPC601_SYNC_FIX is not set
+# CONFIG_SMP is not set
+CONFIG_ALTIVEC=y
+CONFIG_MACH_SPECIFIC=y
+
+#
+# General setup
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_MOL is not set
+# CONFIG_ISA is not set
+# CONFIG_EISA is not set
+# CONFIG_SBUS is not set
+# CONFIG_MCA is not set
+CONFIG_PCI=y
+CONFIG_NET=y
+CONFIG_SYSCTL=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_KCORE_ELF=y
+CONFIG_BINFMT_ELF=y
+CONFIG_KERNEL_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_PCI_NAMES=y
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+# CONFIG_PPC_RTC is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_INITRD=y
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_BLK_DEV_LVM is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_NETLINK=y
+# CONFIG_RTNETLINK is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+# CONFIG_FILTER is not set
+CONFIG_UNIX=y
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_CONNTRACK is not set
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+# CONFIG_ATM is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_SD_EXTRA_DEVS=40
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_SR_EXTRA_DEVS=2
+CONFIG_CHR_DEV_SG=y
+# CONFIG_SCSI_DEBUG_QUEUES is not set
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_AM53C974 is not set
+# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_CPQFCTS is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_EATA_DMA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_NCR53C7xx is not set
+# CONFIG_SCSI_NCR53C8XX is not set
+CONFIG_SCSI_SYM53C8XX=y
+CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
+CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
+CONFIG_SCSI_NCR53C8XX_SYNC=20
+# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
+# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
+# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set
+# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PCI2000 is not set
+# CONFIG_SCSI_PCI2220I is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_QLOGIC_ISP is not set
+# CONFIG_SCSI_QLOGIC_FC is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_SIM710 is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_MESH is not set
+# CONFIG_SCSI_MAC53C94 is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
+# CONFIG_NET_SB1000 is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MACE is not set
+# CONFIG_BMAC is not set
+# CONFIG_GMAC is not set
+CONFIG_NCR885E=y
+# CONFIG_OAKNET is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Console drivers
+#
+# CONFIG_VGA_CONSOLE is not set
+
+#
+# Frame-buffer support
+#
+# CONFIG_FB is not set
+
+#
+# Input core support
+#
+# CONFIG_INPUT is not set
+
+#
+# Macintosh device drivers
+#
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_SERIAL=y
+CONFIG_SERIAL_CONSOLE=y
+# CONFIG_SERIAL_EXTENDED is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_JOYSTICK is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_INTEL_RNG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_FAT_FS is not set
+# CONFIG_MSDOS_FS is not set
+# CONFIG_UMSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_RAMFS is not set
+CONFIG_ISO9660_FS=y
+# CONFIG_JOLIET is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+CONFIG_DEVFS_FS=y
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_SYSV_FS_WRITE is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_ROOT_NFS is not set
+CONFIG_NFSD=y
+# CONFIG_NFSD_V3 is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+CONFIG_SOLARIS_X86_PARTITION=y
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_SMB_NLS is not set
+# CONFIG_NLS is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Kernel hacking
+#
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_KGDB is not set
+CONFIG_XMON=y
diff -uNr linux-v2.4.4/arch/ppc/configs/mbx_defconfig rtlinux_kernel_2_4/arch/ppc/configs/mbx_defconfig
--- linux-v2.4.4/arch/ppc/configs/mbx_defconfig Thu Jun 21 17:28:38 2001
+++ rtlinux_kernel_2_4/arch/ppc/configs/mbx_defconfig Thu Jun 21 17:23:55 2001
@@ -401,9 +401,9 @@
CONFIG_SCC1_ENET=y
# CONFIG_FEC_ENET is not set
CONFIG_ENET_BIG_BUFFERS=y
-CONFIG_8xxSMC2=y
-# CONFIG_8xx_ALTSMC2 is not set
-CONFIG_8xxSCC=y
+CONFIG_SMC2_UART=y
+# CONFIG_ALTSMC2 is not set
+CONFIG_USE_SCC_IO=y
#
# Generic MPC8xx Options
diff -uNr linux-v2.4.4/arch/ppc/configs/rpxcllf_defconfig rtlinux_kernel_2_4/arch/ppc/configs/rpxcllf_defconfig
--- linux-v2.4.4/arch/ppc/configs/rpxcllf_defconfig Thu Jun 21 17:30:54 2001
+++ rtlinux_kernel_2_4/arch/ppc/configs/rpxcllf_defconfig Thu Jun 21 17:25:59 2001
@@ -408,9 +408,9 @@
CONFIG_SCC1_ENET=y
CONFIG_FEC_ENET=y
CONFIG_ENET_BIG_BUFFERS=y
-CONFIG_8xxSMC2=y
-# CONFIG_8xx_ALTSMC2 is not set
-CONFIG_8xxSCC=y
+CONFIG_SMC2_UART=y
+# CONFIG_ALTSMC2 is not set
+CONFIG_USE_SCC_IO=y
#
# Generic MPC8xx Options
diff -uNr linux-v2.4.4/arch/ppc/configs/rpxlite_defconfig rtlinux_kernel_2_4/arch/ppc/configs/rpxlite_defconfig
--- linux-v2.4.4/arch/ppc/configs/rpxlite_defconfig Thu Jun 21 17:31:18 2001
+++ rtlinux_kernel_2_4/arch/ppc/configs/rpxlite_defconfig Thu Jun 21 17:26:20 2001
@@ -409,8 +409,8 @@
CONFIG_SCC2_ENET=y
# CONFIG_FEC_ENET is not set
# CONFIG_ENET_BIG_BUFFERS is not set
-# CONFIG_8xxSMC2 is not set
-# CONFIG_8xxSCC is not set
+# CONFIG_SMC2_UART is not set
+# CONFIG_USE_SCC_IO is not set
#
# Generic MPC8xx Options
diff -uNr linux-v2.4.4/arch/ppc/kernel/Makefile rtlinux_kernel_2_4/arch/ppc/kernel/Makefile
--- linux-v2.4.4/arch/ppc/kernel/Makefile Thu Jun 21 17:32:00 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/Makefile Thu Jun 21 17:27:32 2001
@@ -7,12 +7,10 @@
#
# Note 2! The CFLAGS definitions are now in the main makefile...
+USE_STANDARD_AS_RULE := true
+
ifdef CONFIG_PPC64BRIDGE
-.S.o:
- $(CC) $(CFLAGS) -D__ASSEMBLY__ -mppc64bridge -c $< -o $*.o
-else
-.S.o:
- $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $*.o
+EXTRA_AFLAGS := -Wa,-mppc64bridge
endif
ifeq ($(CONFIG_4xx),y)
@@ -31,7 +29,7 @@
export-objs := ppc_ksyms.o prep_setup.o
-obj-$(CONFIG_PPC) := entry.o traps.o irq.o idle.o time.o misc.o \
+obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
process.o signal.o bitops.o ptrace.o \
ppc_htab.o semaphore.o syscalls.o \
align.o setup.o
@@ -54,7 +52,7 @@
ifeq ($(CONFIG_8xx),y)
obj-$(CONFIG_PCI) += qspan_pci.c
else
-obj-$(CONFIG_PPC) += hashtable.o
+obj-y += hashtable.o
endif
obj-$(CONFIG_MATH_EMULATION) += softemu8xx.o
obj-$(CONFIG_MBX) += i8259.o
@@ -65,6 +63,8 @@
indirect_pci.o i8259.o prep_pci.o \
prep_time.o prep_nvram.o prep_setup.o
obj-$(CONFIG_PMAC_BACKLIGHT) += pmac_backlight.o
+obj-$(CONFIG_GEMINI) += gemini_prom.o gemini_pci.o gemini_setup.o \
+ open_pic.o
obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o
diff -uNr linux-v2.4.4/arch/ppc/kernel/apus_setup.c rtlinux_kernel_2_4/arch/ppc/kernel/apus_setup.c
--- linux-v2.4.4/arch/ppc/kernel/apus_setup.c Thu Jun 21 17:30:20 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/apus_setup.c Thu Jun 21 17:25:28 2001
@@ -1017,6 +1017,59 @@
0
};
+#define HARDWARE_MAPPED_SIZE (512*1024)
+unsigned long __init apus_find_end_of_memory(void)
+{
+ int shadow = 0;
+ unsigned long total;
+
+ /* The memory size reported by ADOS excludes the 512KB
+ reserved for PPC exception registers and possibly 512KB
+ containing a shadow of the ADOS ROM. */
+ {
+ unsigned long size = memory[0].size;
+
+ /* If 2MB aligned, size was probably user
+ specified. We can't tell anything about shadowing
+ in this case so skip shadow assignment. */
+ if (0 != (size & 0x1fffff)){
+ /* Align to 512KB to ensure correct handling
+ of both memfile and system specified
+ sizes. */
+ size = ((size+0x0007ffff) & 0xfff80000);
+ /* If memory is 1MB aligned, assume
+ shadowing. */
+ shadow = !(size & 0x80000);
+ }
+
+ /* Add the chunk that ADOS does not see. by aligning
+ the size to the nearest 2MB limit upwards. */
+ memory[0].size = ((size+0x001fffff) & 0xffe00000);
+ }
+
+ total = memory[0].size;
+
+ /* Remove the memory chunks that are controlled by special
+ Phase5 hardware. */
+
+ /* Remove the upper 512KB if it contains a shadow of
+ the ADOS ROM. FIXME: It might be possible to
+ disable this shadow HW. Check the booter
+ (ppc_boot.c) */
+ if (shadow)
+ total -= HARDWARE_MAPPED_SIZE;
+
+ /* Remove the upper 512KB where the PPC exception
+ vectors are mapped. */
+ total -= HARDWARE_MAPPED_SIZE;
+
+ /* Linux/APUS only handles one block of memory -- the one on
+ the PowerUP board. Other system memory is horrible slow in
+ comparison. The user can use other memory for swapping
+ using the z2ram device. */
+ ram_phys_base = memory[0].addr;
+ return total;
+}
__init
void apus_init_IRQ(void)
@@ -1037,10 +1090,6 @@
amiga_init_IRQ();
- int_control.int_sti = __no_use_sti;
- int_control.int_cli = __no_use_cli;
- int_control.int_save_flags = __no_use_save_flags;
- int_control.int_restore_flags = __no_use_restore_flags;
}
__init
@@ -1072,7 +1121,10 @@
ppc_md.irq_cannonicalize = apus_irq_cannonicalize;
ppc_md.init_IRQ = apus_init_IRQ;
ppc_md.get_irq = apus_get_irq;
- ppc_md.post_irq = apus_post_irq;
+
+#error Should use the ->end() member of irq_desc[x]. -- Cort
+ /*ppc_md.post_irq = apus_post_irq;*/
+
#ifdef CONFIG_HEARTBEAT
ppc_md.heartbeat = apus_heartbeat;
ppc_md.heartbeat_count = 1;
@@ -1091,6 +1143,8 @@
ppc_md.set_rtc_time = apus_set_rtc_time;
ppc_md.get_rtc_time = apus_get_rtc_time;
ppc_md.calibrate_decr = apus_calibrate_decr;
+
+ ppc_md.find_end_of_memory = apus_find_end_of_memory;
ppc_md.nvram_read_val = NULL;
ppc_md.nvram_write_val = NULL;
diff -uNr linux-v2.4.4/arch/ppc/kernel/chrp_pci.c rtlinux_kernel_2_4/arch/ppc/kernel/chrp_pci.c
--- linux-v2.4.4/arch/ppc/kernel/chrp_pci.c Thu Jun 21 17:28:26 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/chrp_pci.c Thu Jun 21 17:23:43 2001
@@ -264,6 +264,7 @@
}
}
+#if 0
static struct {
/* parent is iomem */
struct resource ram, pci_mem, isa_mem, pci_io, pci_cfg, rom_exp, flash;
@@ -297,62 +298,7 @@
{
bus->resource[1] = &gg2_resources.pci_mem;
}
-
-/* this is used by the pmac_pci code too... - paulus */
-void process_bridge_ranges(struct pci_controller *hose,
- struct device_node *dev, int primary)
-{
- unsigned int *ranges;
- int rlen = 0;
- int memno = 0;
- struct resource *res;
-
- hose->io_base_phys = 0;
- ranges = (unsigned int *) get_property(dev, "ranges", &rlen);
- while ((rlen -= 6 * sizeof(unsigned int)) >= 0) {
- res = NULL;
- switch (ranges[0] >> 24) {
- case 1: /* I/O space */
- if (ranges[2] != 0)
- break;
- hose->io_base_phys = ranges[3];
- hose->io_base_virt = ioremap(ranges[3], ranges[5]);
- if (primary)
- isa_io_base = (unsigned long) hose->io_base_virt;
- res = &hose->io_resource;
- res->flags = IORESOURCE_IO;
- res->start = ranges[2];
- break;
- case 2: /* memory space */
- memno = 0;
- if (ranges[1] == 0 && ranges[2] == 0
- && ranges[5] <= (16 << 20)) {
- /* 1st 16MB, i.e. ISA memory area */
- if (primary)
- isa_mem_base = ranges[3];
- memno = 1;
- }
- while (memno < 3 && hose->mem_resources[memno].flags)
- ++memno;
- if (memno == 0)
- hose->pci_mem_offset = ranges[3] - ranges[2];
- if (memno < 3) {
- res = &hose->mem_resources[memno];
- res->flags = IORESOURCE_MEM;
- res->start = ranges[3];
- }
- break;
- }
- if (res != NULL) {
- res->name = dev->full_name;
- res->end = res->start + ranges[5] - 1;
- res->parent = NULL;
- res->sibling = NULL;
- res->child = NULL;
- }
- ranges += 6;
- }
-}
+#endif /* 0 */
/* this is largely modeled and stolen after the pmac_pci code -- tgall
*/
@@ -366,8 +312,10 @@
volatile unsigned char *cfg;
unsigned int *dma;
#ifdef CONFIG_POWER3
- unsigned long *opprop = (unsigned long *)
- get_property(find_path_device("/"), "platform-open-pic", NULL);
+ struct device_node *root = find_path_device("/");
+ unsigned int *opprop = (unsigned int *)
+ get_property(root, "platform-open-pic", NULL);
+ int i;
#endif
for(; dev != NULL; dev = dev->next, ++index) {
@@ -405,10 +353,11 @@
hose->cfg_addr = (volatile unsigned int *) cfg;
hose->cfg_data = cfg + 0x10;
- process_bridge_ranges(hose, dev, index == 0);
+ pci_process_bridge_OF_ranges(hose, dev, index == 0);
#ifdef CONFIG_POWER3
- openpic_setup_ISU(index, opprop[index+1]);
+ i = root->n_addr_cells * (index + 2) - 1;
+ openpic_setup_ISU(index, opprop[i]);
#endif /* CONFIG_POWER3 */
/* check the first bridge for a property that we can
@@ -442,7 +391,7 @@
void __init
chrp_find_bridges(void)
{
- struct device_node *py;
+ struct device_node *py, *dev;
char *model, *name;
struct pci_controller* hose;
@@ -453,7 +402,7 @@
#else /* CONFIG_POWER4 */
model = get_property(find_path_device("/"), "model", NULL);
if (!strncmp("MOT", model, 3)) {
- struct pci_controller* hose;
+ struct pci_controller *hose;
hose = pcibios_alloc_controller();
if (!hose)
@@ -463,8 +412,9 @@
/* Check that please. This must be the root of the OF
* PCI tree (the root host bridge
*/
- hose->arch_data = find_devices("pci");
+ hose->arch_data = dev = find_devices("pci");
setup_grackle(hose, 0x20000);
+ pci_process_bridge_OF_ranges(hose, dev, 1);
return;
}
@@ -485,25 +435,22 @@
/* Check that please. This must be the root of the OF
* PCI tree (the root host bridge
*/
- hose->arch_data = find_devices("pci");
+ hose->arch_data = dev = find_devices("pci");
name = get_property(find_path_device("/"), "name", NULL);
if (!strncmp("IBM,7043-150", name, 12) ||
!strncmp("IBM,7046-155", name, 12) ||
!strncmp("IBM,7046-B50", name, 12) ) {
setup_grackle(hose, 0x01000000);
- isa_mem_base = 0x80000000;
+ pci_process_bridge_OF_ranges(hose, dev, 1);
return;
}
/* LongTrail */
hose->ops = &gg2_pci_ops;
pci_dram_offset = 0;
- isa_mem_base = 0xf7000000;
- hose->io_base_phys = (unsigned long) 0xf8000000;
- hose->io_base_virt = ioremap(hose->io_base_phys, 0x10000);
- isa_io_base = (unsigned long) hose->io_base_virt;
- ppc_md.pcibios_fixup = gg2_pcibios_fixup;
- ppc_md.pcibios_fixup_bus = gg2_pcibios_fixup_bus;
+ pci_process_bridge_OF_ranges(hose, find_devices("pci"), 1);
+// ppc_md.pcibios_fixup = gg2_pcibios_fixup;
+// ppc_md.pcibios_fixup_bus = gg2_pcibios_fixup_bus;
#endif /* CONFIG_POWER4 */
}
diff -uNr linux-v2.4.4/arch/ppc/kernel/chrp_setup.c rtlinux_kernel_2_4/arch/ppc/kernel/chrp_setup.c
--- linux-v2.4.4/arch/ppc/kernel/chrp_setup.c Thu Jun 21 17:32:02 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/chrp_setup.c Thu Jun 21 17:27:39 2001
@@ -67,6 +67,7 @@
void rtas_indicator_progress(char *, unsigned short);
void bootx_text_progress(char *, unsigned short);
+extern unsigned long pmac_find_end_of_memory(void);
extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
extern int pckbd_getkeycode(unsigned int scancode);
extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
@@ -194,37 +195,36 @@
u8 type)
{
u8 level0, type0, active;
- struct device_node *root;
-
- root = find_path_device("/");
- if (root &&
- !strncmp(get_property(root, "model", NULL), "IBM,LongTrail", 13 ) )
- {
- /* select logical device */
- sio_write(device, 0x07);
- active = sio_read(0x30);
- level0 = sio_read(0x70);
- type0 = sio_read(0x71);
- printk("sio: %s irq level %d, type %d, %sactive: ", name, level0, type0,
- !active ? "in" : "");
- if (level0 == level && type0 == type && active)
- printk("OK\n");
- else {
- printk("remapping to level %d, type %d, active\n", level, type);
- sio_write(0x01, 0x30);
- sio_write(level, 0x70);
- sio_write(type, 0x71);
- }
- }
+ /* select logical device */
+ sio_write(device, 0x07);
+ active = sio_read(0x30);
+ level0 = sio_read(0x70);
+ type0 = sio_read(0x71);
+ printk("sio: %s irq level %d, type %d, %sactive: ", name, level0,
+ type0, !active ? "in" : "");
+ if (level0 == level && type0 == type && active)
+ printk("OK\n");
+ else {
+ printk("remapping to level %d, type %d, active\n", level,
+ type);
+ sio_write(0x01, 0x30);
+ sio_write(level, 0x70);
+ sio_write(type, 0x71);
+ }
}
static void __init sio_init(void)
{
- /* logical device 0 (KBC/Keyboard) */
- sio_fixup_irq("keyboard", 0, 1, 2);
- /* select logical device 1 (KBC/Mouse) */
- sio_fixup_irq("mouse", 1, 12, 2);
+ struct device_node *root;
+
+ if ((root = find_path_device("/")) &&
+ !strncmp(get_property(root, "model", NULL), "IBM,LongTrail", 13)) {
+ /* logical device 0 (KBC/Keyboard) */
+ sio_fixup_irq("keyboard", 0, 1, 2);
+ /* select logical device 1 (KBC/Mouse) */
+ sio_fixup_irq("mouse", 1, 12, 2);
+ }
}
@@ -263,16 +263,19 @@
#ifndef CONFIG_POWER4
/* Some IBM machines don't have the hydra -- Cort */
- if ( !OpenPIC_Addr )
- {
+ if (!OpenPIC_Addr) {
+ struct device_node *root;
unsigned long *opprop;
+ int n;
- opprop = (unsigned long *)get_property(find_path_device("/"),
- "platform-open-pic", NULL);
+ root = find_path_device("/");
+ opprop = (unsigned long *) get_property
+ (root, "platform-open-pic", NULL);
+ n = root->n_addr_cells;
if (opprop != 0) {
printk("OpenPIC addrs: %lx %lx %lx\n",
- opprop[0], opprop[1], opprop[2]);
- OpenPIC_Addr = ioremap(opprop[0], 0x40000);
+ opprop[n-1], opprop[2*n-1], opprop[3*n-1]);
+ OpenPIC_Addr = ioremap(opprop[n-1], 0x40000);
}
}
#endif
@@ -281,6 +284,10 @@
* Fix the Super I/O configuration
*/
sio_init();
+
+ /*
+ * Setup the console operations
+ */
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
@@ -356,7 +363,7 @@
{
struct device_node *np;
int i;
- unsigned long *addrp;
+ unsigned int *addrp;
unsigned char* chrp_int_ack_special = 0;
unsigned char init_senses[NR_IRQS - NUM_8259_INTERRUPTS];
int nmi_irq = -1;
@@ -365,11 +372,12 @@
#endif
if (!(np = find_devices("pci"))
- || !(addrp = (unsigned long *)
+ || !(addrp = (unsigned int *)
get_property(np, "8259-interrupt-acknowledge", NULL)))
printk("Cannot find pci to get ack address\n");
else
- chrp_int_ack_special = (unsigned char *)ioremap(*addrp, 1);
+ chrp_int_ack_special = (unsigned char *)
+ ioremap(addrp[np->n_addr_cells-1], 1);
/* hydra still sets OpenPIC_InitSenses to a static set of values */
if (OpenPIC_InitSenses == NULL) {
prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS);
@@ -553,11 +561,9 @@
#ifndef CONFIG_POWER4
ppc_md.init_IRQ = chrp_init_IRQ;
ppc_md.get_irq = openpic_get_irq;
- ppc_md.post_irq = NULL;
#else
ppc_md.init_IRQ = xics_init_IRQ;
ppc_md.get_irq = xics_get_irq;
- ppc_md.post_irq = NULL;
#endif /* CONFIG_POWER4 */
ppc_md.init = chrp_init2;
@@ -570,6 +576,8 @@
ppc_md.set_rtc_time = chrp_set_rtc_time;
ppc_md.get_rtc_time = chrp_get_rtc_time;
ppc_md.calibrate_decr = chrp_calibrate_decr;
+
+ ppc_md.find_end_of_memory = pmac_find_end_of_memory;
#ifdef CONFIG_VT
/* these are adjusted in chrp_init2 if we have an ADB keyboard */
diff -uNr linux-v2.4.4/arch/ppc/kernel/entry.S rtlinux_kernel_2_4/arch/ppc/kernel/entry.S
--- linux-v2.4.4/arch/ppc/kernel/entry.S Thu Jun 21 17:32:06 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/entry.S Thu Jun 21 17:27:44 2001
@@ -30,7 +30,6 @@
#include <linux/errno.h>
#include <linux/sys.h>
#include <linux/config.h>
-#include "mol.h"
#undef SHOW_SYSCALLS
#undef SHOW_SYSCALLS_TASK
@@ -315,21 +314,12 @@
lwz r5,_MSR(r1)
andi. r5,r5,MSR_EE
beq 2f
- .globl lost_irq_ret
-lost_irq_ret:
-3: lis r4,ppc_n_lost_interrupts@ha
- lwz r4,ppc_n_lost_interrupts@l(r4)
- cmpi 0,r4,0
- beq+ 1f
- addi r3,r1,STACK_FRAME_OVERHEAD
- bl do_IRQ
- b 3b
-1: lis r4,irq_stat@ha /* &softirq_active for cpu 0 */
+ lis r4,irq_stat@ha /* &softirq_active for cpu 0 */
addi r4,r4,irq_stat@l
#ifdef CONFIG_SMP
/* get processor # */
lwz r3,PROCESSOR(r2)
- slwi r3,r3,5
+ slwi r3,r3,LG_CACHE_LINE_SIZE
add r4,r4,r3
#endif /* CONFIG_SMP */
lwz r5,0(r4) /* softirq_active */
@@ -351,7 +341,6 @@
beq+ do_signal_ret
li r3,0
addi r4,r1,STACK_FRAME_OVERHEAD
- MOL_HOOK_MMU(8,r8)
bl do_signal
.globl do_signal_ret
do_signal_ret:
@@ -391,7 +380,6 @@
stw r0,THREAD+KSP(r2) /* save kernel stack pointer */
tophys(r8,r1)
CLR_TOP32(r8)
- MOL_HOOK_MMU(9, r4) /* mod. r0,r2-r7, lr, ctr */
mtspr SPRG2,r8 /* phys exception stack pointer */
1:
lwz r3,_CTR(r1)
@@ -412,29 +400,6 @@
lwz r1,GPR1(r1)
SYNC
RFI
-
-/*
- * Fake an interrupt from kernel mode.
- * This is used when enable_irq loses an interrupt.
- * We only fill in the stack frame minimally.
- */
-_GLOBAL(fake_interrupt)
- mflr r0
- stw r0,4(r1)
- stwu r1,-INT_FRAME_SIZE(r1)
- stw r0,_NIP(r1)
- stw r0,_LINK(r1)
- mfmsr r3
- stw r3,_MSR(r1)
- li r0,0x0fac
- stw r0,TRAP(r1)
- addi r3,r1,STACK_FRAME_OVERHEAD
- li r4,1
- bl do_IRQ
- addi r1,r1,INT_FRAME_SIZE
- lwz r0,4(r1)
- mtlr r0
- blr
/*
diff -uNr linux-v2.4.4/arch/ppc/kernel/feature.c rtlinux_kernel_2_4/arch/ppc/kernel/feature.c
--- linux-v2.4.4/arch/ppc/kernel/feature.c Thu Jun 21 17:33:13 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/feature.c Thu Jun 21 17:30:11 2001
@@ -2,7 +2,7 @@
* arch/ppc/kernel/feature.c
*
* Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au)
- * Ben. Herrenschmidt (bh40@calva.net)
+ * Ben. Herrenschmidt (benh@kernel.crashing.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff -uNr linux-v2.4.4/arch/ppc/kernel/gemini_pci.c rtlinux_kernel_2_4/arch/ppc/kernel/gemini_pci.c
--- linux-v2.4.4/arch/ppc/kernel/gemini_pci.c Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/arch/ppc/kernel/gemini_pci.c Thu Jun 21 17:30:11 2001
@@ -0,0 +1,121 @@
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/malloc.h>
+
+#include <asm/machdep.h>
+#include <asm/gemini.h>
+#include <asm/byteorder.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/pci-bridge.h>
+
+#include "pci.h"
+
+#define pci_config_addr(bus,dev,offset) \
+ (0x80000000 | (bus<<16) | (dev<<8) | offset)
+
+
+int
+gemini_pcibios_read_config_byte(struct pci_dev *dev, int offset, u8 *val)
+{
+ unsigned long reg;
+ reg = grackle_read(pci_config_addr(dev->bus->number, dev->devfn,
+ (offset & ~(0x3))));
+ *val = ((reg >> ((offset & 0x3) << 3)) & 0xff);
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int
+gemini_pcibios_read_config_word(struct pci_dev *dev, int offset, u16 *val)
+{
+ unsigned long reg;
+ reg = grackle_read(pci_config_addr(dev->bus->number, dev->devfn,
+ (offset & ~(0x3))));
+ *val = ((reg >> ((offset & 0x3) << 3)) & 0xffff);
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int
+gemini_pcibios_read_config_dword(struct pci_dev *dev, int offset, u32 *val)
+{
+ *val = grackle_read(pci_config_addr(dev->bus->number, dev->devfn,
+ (offset & ~(0x3))));
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int
+gemini_pcibios_write_config_byte(struct pci_dev *dev, int offset, u8 val)
+{
+ unsigned long reg;
+ int shifts = offset & 0x3;
+ unsigned int addr = pci_config_addr(dev->bus->number, dev->devfn,
+ (offset & ~(0x3)));
+
+ reg = grackle_read(addr);
+ reg = (reg & ~(0xff << (shifts << 3))) | (val << (shifts << 3));
+ grackle_write(addr, reg );
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int
+gemini_pcibios_write_config_word(struct pci_dev *dev, int offset, u16 val)
+{
+ unsigned long reg;
+ int shifts = offset & 0x3;
+ unsigned int addr = pci_config_addr(dev->bus->number, dev->devfn,
+ (offset & ~(0x3)));
+
+ reg = grackle_read(addr);
+ reg = (reg & ~(0xffff << (shifts << 3))) | (val << (shifts << 3));
+ grackle_write(addr, reg );
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int
+gemini_pcibios_write_config_dword(struct pci_dev *dev, int offset, u32 val)
+{
+ grackle_write(pci_config_addr(dev->bus->number, dev->devfn,
+ (offset & ~(0x3))), val);
+ return PCIBIOS_SUCCESSFUL;
+}
+
+static struct pci_ops gemini_pci_ops =
+{
+ gemini_pcibios_read_config_byte,
+ gemini_pcibios_read_config_word,
+ gemini_pcibios_read_config_dword,
+ gemini_pcibios_write_config_byte,
+ gemini_pcibios_write_config_word,
+ gemini_pcibios_write_config_dword
+};
+
+void __init gemini_pcibios_fixup(void)
+{
+ int i;
+ struct pci_dev *dev;
+
+ pci_for_each_dev(dev) {
+ for(i = 0; i < 6; i++) {
+ if (dev->resource[i].flags & IORESOURCE_IO) {
+ dev->resource[i].start |= (0xfe << 24);
+ dev->resource[i].end |= (0xfe << 24);
+ }
+ }
+ }
+}
+
+
+/* The "bootloader" for Synergy boards does none of this for us, so we need to
+ lay it all out ourselves... --Dan */
+void __init gemini_find_bridges(void)
+{
+ struct pci_controller* hose;
+
+ ppc_md.pcibios_fixup = gemini_pcibios_fixup;
+
+ hose = pcibios_alloc_controller();
+ if (!hose)
+ return;
+ hose->ops = &gemini_pci_ops;
+}
diff -uNr linux-v2.4.4/arch/ppc/kernel/gemini_prom.S rtlinux_kernel_2_4/arch/ppc/kernel/gemini_prom.S
--- linux-v2.4.4/arch/ppc/kernel/gemini_prom.S Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/arch/ppc/kernel/gemini_prom.S Thu Jun 21 17:26:09 2001
@@ -0,0 +1,96 @@
+/*
+ * arch/ppc/kernel/gemini_prom.S
+ *
+ * Not really prom support code (yet), but sort of anti-prom code. The current
+ * bootloader does a number of things it shouldn't and doesn't do things that it
+ * should. The stuff in here is mainly a hodge-podge collection of setup code
+ * to get the board up and running.
+ * ---Dan
+ */
+
+#include "ppc_asm.tmpl"
+#include "ppc_defs.h"
+#include <linux/config.h>
+#include <asm/processor.h>
+#include <asm/page.h>
+#include <asm/gemini.h>
+
+#define HID0_ABE (1<<3)
+
+/*
+ * On 750's the MMU is on when Linux is booted, so we need to clear out the
+ * bootloader's BAT settings, make sure we're in supervisor state (gotcha!),
+ * and turn off the MMU.
+ *
+ */
+
+_GLOBAL(gemini_prom_init)
+#ifdef CONFIG_SMP
+ /* Since the MMU's on, get stuff in rom space that we'll need */
+ lis r4,GEMINI_CPUSTAT@h
+ ori r4,r4,GEMINI_CPUSTAT@l
+ lbz r5,0(r4)
+ andi. r5,r5,3
+ mr r24,r5 /* cpu # used later on */
+#endif
+ mfmsr r4
+ li r3,MSR_PR /* ensure supervisor! */
+ ori r3,r3,MSR_IR|MSR_DR
+ andc r4,r4,r3
+ mtmsr r4
+ isync
+#if 0
+ /* zero out the bats now that the MMU is off */
+prom_no_mmu:
+ li r3,0
+ mtspr IBAT0U,r3
+ mtspr IBAT0L,r3
+ mtspr IBAT1U,r3
+ mtspr IBAT1L,r3
+ mtspr IBAT2U,r3
+ mtspr IBAT2L,r3
+ mtspr IBAT3U,r3
+ mtspr IBAT3L,r3
+
+ mtspr DBAT0U,r3
+ mtspr DBAT0L,r3
+ mtspr DBAT1U,r3
+ mtspr DBAT1L,r3
+ mtspr DBAT2U,r3
+ mtspr DBAT2L,r3
+ mtspr DBAT3U,r3
+ mtspr DBAT3L,r3
+#endif
+
+ /* the bootloader (as far as I'm currently aware) doesn't mess with page
+ tables, but since we're already here, might as well zap these, too */
+ li r4,0
+ mtspr SDR1,r4
+
+ li r4,16
+ mtctr r4
+ li r3,0
+ li r4,0
+3: mtsrin r3,r4
+ addi r3,r3,1
+ bdnz 3b
+
+#ifdef CONFIG_SMP
+ /* The 750 book (and Mot/IBM support) says that this will "assist" snooping
+ when in SMP. Not sure yet whether this should stay or leave... */
+ mfspr r4,HID0
+ ori r4,r4,HID0_ABE
+ mtspr HID0,r4
+ sync
+#endif /* CONFIG_SMP */
+ blr
+
+/* apparently, SMon doesn't pay attention to HID0[SRST]. Disable the MMU and
+ branch to 0xfff00100 */
+_GLOBAL(_gemini_reboot)
+ lis r5,GEMINI_BOOT_INIT@h
+ ori r5,r5,GEMINI_BOOT_INIT@l
+ li r6,MSR_IP
+ mtspr SRR0,r5
+ mtspr SRR1,r6
+ rfi
diff -uNr linux-v2.4.4/arch/ppc/kernel/gemini_setup.c rtlinux_kernel_2_4/arch/ppc/kernel/gemini_setup.c
--- linux-v2.4.4/arch/ppc/kernel/gemini_setup.c Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/arch/ppc/kernel/gemini_setup.c Thu Jun 21 17:30:51 2001
@@ -0,0 +1,537 @@
+/*
+ * linux/arch/ppc/kernel/setup.c
+ *
+ * Copyright (C) 1995 Linus Torvalds
+ * Adapted from 'alpha' version by Gary Thomas
+ * Modified by Cort Dougan (cort@cs.nmt.edu)
+ * Synergy Microsystems board support by Dan Cox (dan@synergymicro.com)
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/pci.h>
+#include <linux/time.h>
+#include <linux/kdev_t.h>
+#include <linux/types.h>
+#include <linux/major.h>
+#include <linux/blk.h>
+#include <linux/console.h>
+
+#include <asm/system.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <asm/dma.h>
+#include <asm/io.h>
+#include <asm/m48t35.h>
+#include <asm/gemini.h>
+#include <asm/time.h>
+
+#include "local_irq.h"
+#include "open_pic.h"
+
+void gemini_find_bridges(void);
+static int gemini_get_clock_speed(void);
+extern void gemini_pcibios_fixup(void);
+
+static char *gemini_board_families[] = {
+ "VGM", "VSS", "KGM", "VGR", "VCM", "VCS", "KCM", "VCR"
+};
+static int gemini_board_count = sizeof(gemini_board_families) /
+ sizeof(gemini_board_families[0]);
+
+static unsigned int cpu_7xx[16] = {
+ 0, 15, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0
+};
+static unsigned int cpu_6xx[16] = {
+ 0, 0, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 0, 12, 7, 0
+};
+
+int chrp_get_irq(struct pt_regs *);
+void chrp_post_irq(struct pt_regs* regs, int);
+
+static inline unsigned long _get_HID1(void)
+{
+ unsigned long val;
+
+ __asm__ __volatile__("mfspr %0,1009" : "=r" (val));
+ return val;
+}
+
+/*
+ * prom_init is the Gemini version of prom.c:prom_init. We only need
+ * the BSS clearing code, so I copied that out of prom.c. This is a
+ * lot simpler than hacking prom.c so it will build with Gemini. -VAL
+ */
+
+#define PTRRELOC(x) ((typeof(x))((unsigned long)(x) + offset))
+
+unsigned long
+prom_init(void)
+{
+ unsigned long offset = reloc_offset();
+ unsigned long phys;
+ extern char __bss_start, _end;
+
+ /* First zero the BSS -- use memset, some arches don't have
+ * caches on yet */
+ memset_io(PTRRELOC(&__bss_start),0 , &_end - &__bss_start);
+
+ /* Default */
+ phys = offset + KERNELBASE;
+
+ gemini_prom_init();
+
+ return phys;
+}
+
+int
+gemini_get_cpuinfo(char *buffer)
+{
+ int len;
+ unsigned char reg, rev;
+ char *family;
+ unsigned int type;
+
+ reg = readb(GEMINI_FEAT);
+ family = gemini_board_families[((reg>>4) & 0xf)];
+ if (((reg>>4) & 0xf) > gemini_board_count)
+ printk(KERN_ERR "cpuinfo(): unable to determine board family\n");
+
+ reg = readb(GEMINI_BREV);
+ type = (reg>>4) & 0xf;
+ rev = reg & 0xf;
+
+ reg = readb(GEMINI_BECO);
+
+ len = sprintf( buffer, "machine\t\t: Gemini %s%d, rev %c, eco %d\n",
+ family, type, (rev + 'A'), (reg & 0xf));
+
+ len = sprintf(buffer, "board\t\t: Gemini %s", family);
+ if (type > 9)
+ len += sprintf(buffer+len, "%c", (type - 10) + 'A');
+ else
+ len += sprintf(buffer+len, "%d", type);
+
+ len += sprintf(buffer+len, ", rev %c, eco %d\n",
+ (rev + 'A'), (reg & 0xf));
+
+ len += sprintf(buffer+len, "clock\t\t: %dMhz\n",
+ gemini_get_clock_speed());
+
+ return len;
+}
+
+static u_char gemini_openpic_initsenses[] = {
+ 1,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0,
+ 1, /* remainder are level-triggered */
+};
+
+#define GEMINI_MPIC_ADDR (0xfcfc0000)
+#define GEMINI_MPIC_PCI_CFG (0x80005800)
+
+void __init gemini_openpic_init(void)
+{
+
+ OpenPIC_Addr = (volatile struct OpenPIC *)
+ grackle_read(GEMINI_MPIC_PCI_CFG + 0x10);
+ OpenPIC_InitSenses = gemini_openpic_initsenses;
+ OpenPIC_NumInitSenses = sizeof( gemini_openpic_initsenses );
+
+ ioremap( GEMINI_MPIC_ADDR, OPENPIC_SIZE);
+}
+
+
+extern unsigned long loops_per_jiffy;
+extern int root_mountflags;
+extern char cmd_line[];
+
+void
+gemini_heartbeat(void)
+{
+ static unsigned long led = GEMINI_LEDBASE+(4*8);
+ static char direction = 8;
+ *(char *)led = 0;
+ if ( (led + direction) > (GEMINI_LEDBASE+(7*8)) ||
+ (led + direction) < (GEMINI_LEDBASE+(4*8)) )
+ direction *= -1;
+ led += direction;
+ *(char *)led = 0xff;
+ ppc_md.heartbeat_count = ppc_md.heartbeat_reset;
+}
+
+void __init gemini_setup_arch(void)
+{
+ extern char cmd_line[];
+
+
+ loops_per_jiffy = 50000000/HZ;
+
+#ifdef CONFIG_BLK_DEV_INITRD
+ /* bootable off CDROM */
+ if (initrd_start)
+ ROOT_DEV = MKDEV(SCSI_CDROM_MAJOR, 0);
+ else
+#endif
+ ROOT_DEV = to_kdev_t(0x0801);
+
+ /* nothing but serial consoles... */
+ sprintf(cmd_line, "%s console=ttyS0", cmd_line);
+
+ printk("Boot arguments: %s\n", cmd_line);
+
+ ppc_md.heartbeat = gemini_heartbeat;
+ ppc_md.heartbeat_reset = HZ/8;
+ ppc_md.heartbeat_count = 1;
+
+ /* Lookup PCI hosts */
+ gemini_find_bridges();
+ /* take special pains to map the MPIC, since it isn't mapped yet */
+ gemini_openpic_init();
+ /* start the L2 */
+ gemini_init_l2();
+}
+
+
+int
+gemini_get_clock_speed(void)
+{
+ unsigned long hid1, pvr = _get_PVR();
+ int clock;
+
+ hid1 = (_get_HID1() >> 28) & 0xf;
+ if (PVR_VER(pvr) == 8 ||
+ PVR_VER(pvr) == 12)
+ hid1 = cpu_7xx[hid1];
+ else
+ hid1 = cpu_6xx[hid1];
+
+ switch((readb(GEMINI_BSTAT) & 0xc) >> 2) {
+
+ case 0:
+ default:
+ clock = (hid1*100)/3;
+ break;
+
+ case 1:
+ clock = (hid1*125)/3;
+ break;
+
+ case 2:
+ clock = (hid1*50);
+ break;
+ }
+
+ return clock;
+}
+
+void __init gemini_init_l2(void)
+{
+ unsigned char reg, brev, fam, creg;
+ unsigned long cache;
+ unsigned long pvr = _get_PVR();
+
+ reg = readb(GEMINI_L2CFG);
+ brev = readb(GEMINI_BREV);
+ fam = readb(GEMINI_FEAT);
+
+ switch(PVR_VER(pvr)) {
+
+ case 8:
+ if (reg & 0xc0)
+ cache = (((reg >> 6) & 0x3) << 28);
+ else
+ cache = 0x3 << 28;
+
+#ifdef CONFIG_SMP
+ /* Pre-3.0 processor revs had snooping errata. Leave
+ their L2's disabled with SMP. -- Dan */
+ if (PVR_CFG(pvr) < 3) {
+ printk("Pre-3.0 750; L2 left disabled!\n");
+ return;
+ }
+#endif /* CONFIG_SMP */
+
+ /* Special case: VGM5-B's came before L2 ratios were set on
+ the board. Processor speed shouldn't be too high, so
+ set L2 ratio to 1:1.5. */
+ if ((brev == 0x51) && ((fam & 0xa0) >> 4) == 0)
+ reg |= 1;
+
+ /* determine best cache ratio based upon what the board
+ tells us (which sometimes _may_ not be true) and
+ the processor speed. */
+ else {
+ if (gemini_get_clock_speed() > 250)
+ reg = 2;
+ }
+ break;
+ case 12:
+ {
+ static unsigned long l2_size_val = 0;
+
+ if (!l2_size_val)
+ l2_size_val = _get_L2CR();
+ cache = l2_size_val;
+ break;
+ }
+ case 4:
+ case 9:
+ creg = readb(GEMINI_CPUSTAT);
+ if (((creg & 0xc) >> 2) != 1)
+ printk("Dual-604 boards don't support the use of L2\n");
+ else
+ writeb(1, GEMINI_L2CFG);
+ return;
+ default:
+ printk("Unknown processor; L2 left disabled\n");
+ return;
+ }
+
+ cache |= ((1<<reg) << 25);
+ cache |= (L2CR_PIPE_LATEWR|L2CR_L2CTL|L2CR_INST_DISABLE);
+ _set_L2CR(0);
+ _set_L2CR(cache | L2CR_L2E);
+
+}
+
+void
+gemini_restart(char *cmd)
+{
+ __cli();
+ /* make a clean restart, not via the MPIC */
+ _gemini_reboot();
+ for(;;);
+}
+
+void
+gemini_power_off(void)
+{
+ for(;;);
+}
+
+void
+gemini_halt(void)
+{
+ gemini_restart(NULL);
+}
+
+void __init gemini_init_IRQ(void)
+{
+ /* gemini has no 8259 */
+ openpic_init(1, 0, 0, -1);
+}
+
+#define gemini_rtc_read(x) (readb(GEMINI_RTC+(x)))
+#define gemini_rtc_write(val,x) (writeb((val),(GEMINI_RTC+(x))))
+
+/* ensure that the RTC is up and running */
+long __init gemini_time_init(void)
+{
+ unsigned char reg;
+
+ reg = gemini_rtc_read(M48T35_RTC_CONTROL);
+
+ if ( reg & M48T35_RTC_STOPPED ) {
+ printk(KERN_INFO "M48T35 real-time-clock was stopped. Now starting...\n");
+ gemini_rtc_write((reg & ~(M48T35_RTC_STOPPED)), M48T35_RTC_CONTROL);
+ gemini_rtc_write((reg | M48T35_RTC_SET), M48T35_RTC_CONTROL);
+ }
+ return 0;
+}
+
+#undef DEBUG_RTC
+
+unsigned long
+gemini_get_rtc_time(void)
+{
+ unsigned int year, mon, day, hour, min, sec;
+ unsigned char reg;
+
+ reg = gemini_rtc_read(M48T35_RTC_CONTROL);
+ gemini_rtc_write((reg|M48T35_RTC_READ), M48T35_RTC_CONTROL);
+#ifdef DEBUG_RTC
+ printk("get rtc: reg = %x\n", reg);
+#endif
+
+ do {
+ sec = gemini_rtc_read(M48T35_RTC_SECONDS);
+ min = gemini_rtc_read(M48T35_RTC_MINUTES);
+ hour = gemini_rtc_read(M48T35_RTC_HOURS);
+ day = gemini_rtc_read(M48T35_RTC_DOM);
+ mon = gemini_rtc_read(M48T35_RTC_MONTH);
+ year = gemini_rtc_read(M48T35_RTC_YEAR);
+ } while( sec != gemini_rtc_read(M48T35_RTC_SECONDS));
+#ifdef DEBUG_RTC
+ printk("get rtc: sec=%x, min=%x, hour=%x, day=%x, mon=%x, year=%x\n",
+ sec, min, hour, day, mon, year);
+#endif
+
+ gemini_rtc_write(reg, M48T35_RTC_CONTROL);
+
+ BCD_TO_BIN(sec);
+ BCD_TO_BIN(min);
+ BCD_TO_BIN(hour);
+ BCD_TO_BIN(day);
+ BCD_TO_BIN(mon);
+ BCD_TO_BIN(year);
+
+ if ((year += 1900) < 1970)
+ year += 100;
+#ifdef DEBUG_RTC
+ printk("get rtc: sec=%x, min=%x, hour=%x, day=%x, mon=%x, year=%x\n",
+ sec, min, hour, day, mon, year);
+#endif
+
+ return mktime( year, mon, day, hour, min, sec );
+}
+
+
+int
+gemini_set_rtc_time( unsigned long now )
+{
+ unsigned char reg;
+ struct rtc_time tm;
+
+ to_tm( now, &tm );
+
+ reg = gemini_rtc_read(M48T35_RTC_CONTROL);
+#if DEBUG_RTC
+ printk("set rtc: reg = %x\n", reg);
+#endif
+
+ gemini_rtc_write((reg|M48T35_RTC_SET), M48T35_RTC_CONTROL);
+#if DEBUG_RTC
+ printk("set rtc: tm vals - sec=%x, min=%x, hour=%x, mon=%x, mday=%x, year=%x\n",
+ tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mon, tm.tm_mday, tm.tm_year);
+#endif
+
+ tm.tm_year -= 1900;
+ BIN_TO_BCD(tm.tm_sec);
+ BIN_TO_BCD(tm.tm_min);
+ BIN_TO_BCD(tm.tm_hour);
+ BIN_TO_BCD(tm.tm_mon);
+ BIN_TO_BCD(tm.tm_mday);
+ BIN_TO_BCD(tm.tm_year);
+#ifdef DEBUG_RTC
+ printk("set rtc: tm vals - sec=%x, min=%x, hour=%x, mon=%x, mday=%x, year=%x\n",
+ tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mon, tm.tm_mday, tm.tm_year);
+#endif
+
+ gemini_rtc_write(tm.tm_sec, M48T35_RTC_SECONDS);
+ gemini_rtc_write(tm.tm_min, M48T35_RTC_MINUTES);
+ gemini_rtc_write(tm.tm_hour, M48T35_RTC_HOURS);
+ gemini_rtc_write(tm.tm_mday, M48T35_RTC_DOM);
+ gemini_rtc_write(tm.tm_mon, M48T35_RTC_MONTH);
+ gemini_rtc_write(tm.tm_year, M48T35_RTC_YEAR);
+
+ /* done writing */
+ gemini_rtc_write(reg, M48T35_RTC_CONTROL);
+
+ if ((time_state == TIME_ERROR) || (time_state == TIME_BAD))
+ time_state = TIME_OK;
+
+ return 0;
+}
+
+/* use the RTC to determine the decrementer count */
+void __init gemini_calibrate_decr(void)
+{
+ int freq, divisor;
+ unsigned char reg;
+
+ /* determine processor bus speed */
+ reg = readb(GEMINI_BSTAT);
+
+ switch(((reg & 0x0c)>>2)&0x3) {
+ case 0:
+ default:
+ freq = 66667;
+ break;
+ case 1:
+ freq = 83000;
+ break;
+ case 2:
+ freq = 100000;
+ break;
+ }
+
+ freq *= 1000;
+ divisor = 4;
+ tb_ticks_per_jiffy = freq / HZ / divisor;
+ tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000);
+}
+
+unsigned long __init gemini_find_end_of_memory(void)
+{
+ unsigned long total;
+ unsigned char reg;
+
+ reg = readb(GEMINI_MEMCFG);
+ total = ((1<<((reg & 0x7) - 1)) *
+ (8<<((reg >> 3) & 0x7)));
+ total *= (1024*1024);
+ return total;
+}
+
+void __init gemini_init(unsigned long r3, unsigned long r4, unsigned long r5,
+ unsigned long r6, unsigned long r7)
+{
+ int i;
+ int chrp_get_irq( struct pt_regs * );
+
+ for(i = 0; i < GEMINI_LEDS; i++)
+ gemini_led_off(i);
+
+ ISA_DMA_THRESHOLD = 0;
+ DMA_MODE_READ = 0;
+ DMA_MODE_WRITE = 0;
+
+#ifdef CONFIG_BLK_DEV_INITRD
+ if ( r4 )
+ {
+ initrd_start = r4 + KERNELBASE;
+ initrd_end = r5 + KERNELBASE;
+ }
+#endif
+
+ ppc_md.setup_arch = gemini_setup_arch;
+ ppc_md.setup_residual = NULL;
+ ppc_md.get_cpuinfo = gemini_get_cpuinfo;
+ ppc_md.irq_cannonicalize = NULL;
+ ppc_md.init_IRQ = gemini_init_IRQ;
+ ppc_md.get_irq = openpic_get_irq;
+ ppc_md.init = NULL;
+
+ ppc_md.restart = gemini_restart;
+ ppc_md.power_off = gemini_power_off;
+ ppc_md.halt = gemini_halt;
+
+ ppc_md.time_init = gemini_time_init;
+ ppc_md.set_rtc_time = gemini_set_rtc_time;
+ ppc_md.get_rtc_time = gemini_get_rtc_time;
+ ppc_md.calibrate_decr = gemini_calibrate_decr;
+
+ ppc_md.find_end_of_memory = gemini_find_end_of_memory;
+
+ /* no keyboard/mouse/video stuff yet.. */
+ ppc_md.kbd_setkeycode = NULL;
+ ppc_md.kbd_getkeycode = NULL;
+ ppc_md.kbd_translate = NULL;
+ ppc_md.kbd_unexpected_up = NULL;
+ ppc_md.kbd_leds = NULL;
+ ppc_md.kbd_init_hw = NULL;
+#ifdef CONFIG_MAGIC_SYSRQ
+ ppc_md.ppc_kbd_sysrq_xlate = NULL;
+#endif
+ ppc_md.pcibios_fixup_bus = gemini_pcibios_fixup;
+}
diff -uNr linux-v2.4.4/arch/ppc/kernel/hashtable.S rtlinux_kernel_2_4/arch/ppc/kernel/hashtable.S
--- linux-v2.4.4/arch/ppc/kernel/hashtable.S Thu Jun 21 17:32:38 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/hashtable.S Thu Jun 21 17:28:54 2001
@@ -27,7 +27,6 @@
#include <asm/processor.h>
#include <asm/page.h>
#include <linux/config.h>
-#include "mol.h"
/*
* Load a PTE into the hash table, if possible.
@@ -609,11 +608,6 @@
* flush_hash_page(unsigned context, unsigned long va)
*/
_GLOBAL(flush_hash_page)
-#ifdef CONFIG_MOL
- mflr r10
- MOL_HOOK_MMU(10, r6)
- mtlr r10
-#endif
lis r6,Hash@ha
lwz r6,Hash@l(r6) /* hash table base */
cmpwi 0,r6,0 /* hash table in use? */
diff -uNr linux-v2.4.4/arch/ppc/kernel/head.S rtlinux_kernel_2_4/arch/ppc/kernel/head.S
--- linux-v2.4.4/arch/ppc/kernel/head.S Thu Jun 21 17:32:35 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/head.S Thu Jun 21 17:28:46 2001
@@ -31,24 +31,11 @@
#include <asm/page.h>
#include <linux/config.h>
#include <asm/mmu.h>
-#include "mol.h"
#ifdef CONFIG_APUS
#include <asm/amigappc.h>
#endif
-#ifndef CONFIG_PPC64BRIDGE
-CACHELINE_BYTES = 32
-LG_CACHELINE_BYTES = 5
-CACHELINE_MASK = 0x1f
-CACHELINE_WORDS = 8
-#else
-CACHELINE_BYTES = 128
-LG_CACHELINE_BYTES = 7
-CACHELINE_MASK = 0x7f
-CACHELINE_WORDS = 32
-#endif /* CONFIG_PPC64BRIDGE */
-
#ifdef CONFIG_PPC64BRIDGE
#define LOAD_BAT(n, reg, RA, RB) \
ld RA,(n*32)+0(reg); \
@@ -161,6 +148,7 @@
bl fix_mem_constants
#endif /* CONFIG_APUS */
+#ifndef CONFIG_GEMINI
/* Switch MMU off, clear BATs and flush TLB. At this point, r3 contains
* the physical address we are running at, returned by prom_init()
*/
@@ -168,6 +156,7 @@
__after_mmu_off:
bl clear_bats
bl flush_tlbs
+#endif
#ifndef CONFIG_POWER4
/* POWER4 doesn't have BATs */
@@ -294,21 +283,14 @@
.long hdlr; \
.long ret_from_except
-#define STD_MOL_EXCEPTION(n, label, hdlr, hook) \
- . = n; \
-label: \
- EXCEPTION_PROLOG; \
- MOL_HOOK(hook); \
- addi r3,r1,STACK_FRAME_OVERHEAD; \
- li r20,MSR_KERNEL; \
- bl transfer_to_handler; \
-i##n: \
- .long hdlr; \
- .long ret_from_except
-
/* System reset */
-#ifdef CONFIG_SMP /* MVME/MTX start the secondary here */
+#ifdef CONFIG_SMP /* MVME/MTX and gemini start the secondary here */
+#ifdef CONFIG_GEMINI
+ . = 0x100
+ b __secondary_start_gemini
+#else /* CONFIG_GEMINI */
STD_EXCEPTION(0x100, Reset, __secondary_start_psurge)
+#endif /* CONFIG_GEMINI */
#else
STD_EXCEPTION(0x100, Reset, UnknownException)
#endif
@@ -325,7 +307,6 @@
DataAccess:
EXCEPTION_PROLOG
#endif /* CONFIG_PPC64BRIDGE */
- MOL_HOOK(0)
mfspr r20,DSISR
andis. r0,r20,0xa470 /* weird error? */
bne 1f /* if not, try to put a PTE */
@@ -369,7 +350,6 @@
InstructionAccess:
EXCEPTION_PROLOG
#endif /* CONFIG_PPC64BRIDGE */
- MOL_HOOK(1)
andis. r0,r23,0x4000 /* no pte found? */
beq 1f /* if so, try to put a PTE */
mr r3,r22 /* into the hash table */
@@ -436,7 +416,6 @@
. = 0x700
ProgramCheck:
EXCEPTION_PROLOG
- MOL_HOOK(2)
addi r3,r1,STACK_FRAME_OVERHEAD
li r20,MSR_KERNEL
rlwimi r20,r23,0,16,16 /* copy EE bit from saved MSR */
@@ -449,7 +428,6 @@
. = 0x800
FPUnavailable:
EXCEPTION_PROLOG
- MOL_HOOK_RESTORE(3)
bne load_up_fpu /* if from user, just load it up */
li r20,MSR_KERNEL
bl transfer_to_handler /* if from kernel, take a trap */
@@ -460,7 +438,6 @@
. = 0x900
Decrementer:
EXCEPTION_PROLOG
- MOL_HOOK(4)
addi r3,r1,STACK_FRAME_OVERHEAD
li r20,MSR_KERNEL
bl transfer_to_handler
@@ -484,7 +461,7 @@
.long ret_from_except
/* Single step - not used on 601 */
- STD_MOL_EXCEPTION(0xd00, SingleStep, SingleStepException, 5)
+ STD_EXCEPTION(0xd00, SingleStep, SingleStepException)
STD_EXCEPTION(0xe00, Trap_0e, UnknownException)
/*
@@ -514,7 +491,6 @@
*/
. = 0x1000
InstructionTLBMiss:
- MOL_HOOK_TLBMISS( 14 )
/*
* r0: stored ctr
* r1: linux style pte ( later becomes ppc hardware pte )
@@ -586,7 +562,6 @@
*/
. = 0x1100
DataLoadTLBMiss:
- MOL_HOOK_TLBMISS( 15 )
/*
* r0: stored ctr
* r1: linux style pte ( later becomes ppc hardware pte )
@@ -657,7 +632,6 @@
*/
. = 0x1200
DataStoreTLBMiss:
- MOL_HOOK_TLBMISS( 16 )
/*
* r0: stored ctr
* r1: linux style pte ( later becomes ppc hardware pte )
@@ -704,7 +678,7 @@
mtcrf 0x80,r3
rfi
- STD_MOL_EXCEPTION(0x1300, Trap_13, InstructionBreakpoint, 11)
+ STD_EXCEPTION(0x1300, Trap_13, InstructionBreakpoint)
STD_EXCEPTION(0x1400, SMI, SMIException)
STD_EXCEPTION(0x1500, Trap_15, UnknownException)
STD_EXCEPTION(0x1600, Trap_16, UnknownException)
@@ -717,7 +691,7 @@
STD_EXCEPTION(0x1d00, Trap_1d, UnknownException)
STD_EXCEPTION(0x1e00, Trap_1e, UnknownException)
STD_EXCEPTION(0x1f00, Trap_1f, UnknownException)
- STD_MOL_EXCEPTION(0x2000, RunMode, RunModeException, 5)
+ STD_EXCEPTION(0x2000, RunMode, RunModeException)
STD_EXCEPTION(0x2100, Trap_21, UnknownException)
STD_EXCEPTION(0x2200, Trap_22, UnknownException)
STD_EXCEPTION(0x2300, Trap_23, UnknownException)
@@ -739,7 +713,6 @@
#ifdef CONFIG_ALTIVEC
AltiVecUnavailable:
EXCEPTION_PROLOG
- MOL_HOOK_RESTORE(12)
bne load_up_altivec /* if from user, just load it up */
li r20,MSR_KERNEL
bl transfer_to_handler /* if from kernel, take a trap */
@@ -805,7 +778,6 @@
lwz r24,0(r23) /* virtual address of handler */
lwz r23,4(r23) /* where to go when done */
FIX_SRR1(r20,r22)
- MOL_HOOK(6)
mtspr SRR0,r24
mtspr SRR1,r20
mtlr r23
@@ -1016,11 +988,6 @@
.globl giveup_altivec
giveup_altivec:
-#ifdef CONFIG_MOL
- mflr r4
- MOL_HOOK_MMU(13, r5)
- mtlr r4
-#endif
mfmsr r5
oris r5,r5,MSR_VEC@h
SYNC
@@ -1057,11 +1024,6 @@
*/
.globl giveup_fpu
giveup_fpu:
-#ifdef CONFIG_MOL
- mflr r4
- MOL_HOOK_MMU(7, r5)
- mtlr r4
-#endif
mfmsr r5
ori r5,r5,MSR_FP
SYNC
@@ -1116,7 +1078,7 @@
copy_and_flush:
addi r5,r5,-4
addi r6,r6,-4
-4: li r0,CACHELINE_WORDS
+4: li r0,CACHE_LINE_SIZE/4
mtctr r0
3: addi r6,r6,4 /* copy a cache line */
lwzx r0,r6,r4
@@ -1127,6 +1089,7 @@
icbi r6,r3 /* flush the icache line */
cmplw 0,r6,r5
blt 4b
+ sync /* additional sync needed on g4 */
isync
addi r5,r5,4
addi r6,r6,4
@@ -1165,6 +1128,7 @@
icbi r0,r14 /* flush the icache line */
cmpw r12,r13
bne 1b
+ sync /* additional sync needed on g4 */
isync
/*
@@ -1199,6 +1163,7 @@
cmpw r12,r13
bne 1b
+ sync /* additional sync needed on g4 */
isync /* No speculative loading until now */
blr
@@ -1266,6 +1231,20 @@
#endif /* CONFIG_APUS */
#ifdef CONFIG_SMP
+#ifdef CONFIG_GEMINI
+ .globl __secondary_start_gemini
+__secondary_start_gemini:
+ mfspr r4,HID0
+ ori r4,r4,HID0_ICFI
+ li r3,0
+ ori r3,r3,HID0_ICE
+ andc r4,r4,r3
+ mtspr HID0,r4
+ sync
+ bl prom_init
+ b __secondary_start
+#endif /* CONFIG_GEMINI */
+
.globl __secondary_start_psurge
__secondary_start_psurge:
li r24,1 /* cpu # */
@@ -1536,6 +1515,7 @@
* -- Cort
*/
clear_bats:
+#if !defined(CONFIG_GEMINI)
li r20,0
mfspr r9,PVR
rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */
@@ -1559,8 +1539,10 @@
mtspr IBAT2L,r20
mtspr IBAT3U,r20
mtspr IBAT3L,r20
+#endif /* !defined(CONFIG_GEMINI) */
blr
+#ifndef CONFIG_GEMINI
flush_tlbs:
lis r20, 0x40
1: addic. r20, r20, -0x1000
@@ -1579,6 +1561,7 @@
mtspr SRR1,r3
sync
RFI
+#endif
#ifndef CONFIG_POWER4
/*
@@ -1688,17 +1671,6 @@
2:
mtlr r4
blr
-#endif
-
-#ifdef CONFIG_MOL
-/*
- * Mac-on-linux hook_table. Don't put this in the data section -
- * the base address must be within the first 32KB of RAM.
- */
- .globl mol_interface
-mol_interface:
- .long MOL_INTERFACE_VERSION
- .fill 24,4,0 /* space for 24 hooks */
#endif
diff -uNr linux-v2.4.4/arch/ppc/kernel/head_8xx.S rtlinux_kernel_2_4/arch/ppc/kernel/head_8xx.S
--- linux-v2.4.4/arch/ppc/kernel/head_8xx.S Thu Jun 21 17:28:19 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/head_8xx.S Thu Jun 21 17:23:40 2001
@@ -30,13 +30,6 @@
#include <asm/mmu.h>
#include <asm/cache.h>
#include <asm/pgtable.h>
-
-/* XXX need definitions here for 16 byte cachelines on some/all 8xx
- -- paulus */
-CACHELINE_BYTES = 32
-LG_CACHELINE_BYTES = 5
-CACHELINE_MASK = 0x1f
-CACHELINE_WORDS = 8
.text
.globl _stext
@@ -757,7 +750,7 @@
copy_and_flush:
addi r5,r5,-4
addi r6,r6,-4
-4: li r0,CACHELINE_WORDS
+4: li r0,CACHE_LINE_SIZE/4
mtctr r0
3: addi r6,r6,4 /* copy a cache line */
lwzx r0,r6,r4
diff -uNr linux-v2.4.4/arch/ppc/kernel/irq.c rtlinux_kernel_2_4/arch/ppc/kernel/irq.c
--- linux-v2.4.4/arch/ppc/kernel/irq.c Thu Jun 21 17:31:58 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/irq.c Thu Jun 21 17:27:27 2001
@@ -176,9 +176,19 @@
return 0;
}
-/* This could be promoted to a real free_irq() ... */
-static int
-do_free_irq(int irq, void* dev_id)
+#if (defined(CONFIG_8xx) || defined(CONFIG_8260))
+/* Name change so we can catch standard drivers that potentially mess up
+ * the internal interrupt controller on 8xx and 8260. Just bear with me,
+ * I don't like this either and I am searching a better solution. For
+ * now, this is what I need. -- Dan
+ */
+#define request_irq request_8xxirq
+#elif defined(CONFIG_APUS)
+#define request_irq request_sysirq
+#define free_irq sys_free_irq
+#endif
+
+void free_irq(unsigned int irq, void* dev_id)
{
irq_desc_t *desc;
struct irqaction **p;
@@ -209,27 +219,15 @@
barrier();
#endif
irq_kfree(action);
- return 0;
+ return;
}
printk("Trying to free free IRQ%d\n",irq);
spin_unlock_irqrestore(&desc->lock,flags);
break;
}
- return -ENOENT;
+ return;
}
-#if (defined(CONFIG_8xx) || defined(CONFIG_8260))
-/* Name change so we can catch standard drivers that potentially mess up
- * the internal interrupt controller on 8xx and 8260. Just bear with me,
- * I don't like this either and I am searching a better solution. For
- * now, this is what I need. -- Dan
- */
-#define request_irq request_8xxirq
-#elif defined(CONFIG_APUS)
-#define request_irq request_sysirq
-#define free_irq sys_free_irq
-#endif
-
int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
unsigned long irqflags, const char * devname, void *dev_id)
{
@@ -239,8 +237,17 @@
if (irq >= NR_IRQS)
return -EINVAL;
if (!handler)
- /* We could implement really free_irq() instead of that... */
- return do_free_irq(irq, dev_id);
+ {
+ /*
+ * free_irq() used to be implemented as a call to
+ * request_irq() with handler being NULL. Now we have
+ * a real free_irq() but need to allow the old behavior
+ * for old code that hasn't caught up yet.
+ * -- Cort <cort@fsmlabs.com>
+ */
+ free_irq(irq, dev_id);
+ return 0;
+ }
action = (struct irqaction *)
irq_kmalloc(sizeof(struct irqaction), GFP_KERNEL);
@@ -266,11 +273,6 @@
return 0;
}
-void free_irq(unsigned int irq, void *dev_id)
-{
- request_irq(irq, NULL, 0, NULL, dev_id);
-}
-
/*
* Generic enable/disable code: this just calls
* down into the PIC-specific version for the actual
@@ -524,7 +526,7 @@
spin_unlock(&desc->lock);
}
-int do_IRQ(struct pt_regs *regs, int isfake)
+int do_IRQ(struct pt_regs *regs)
{
int cpu = smp_processor_id();
int irq;
@@ -546,10 +548,7 @@
goto out;
}
ppc_irq_dispatch_handler( regs, irq );
- if (ppc_md.post_irq)
- ppc_md.post_irq( regs, irq );
-
- out:
+out:
hardirq_exit( cpu );
return 1; /* lets ret_from_int know we can do checks */
}
@@ -851,15 +850,18 @@
}
#endif /* CONFIG_SMP */
-static struct proc_dir_entry * root_irq_dir;
-static struct proc_dir_entry * irq_dir [NR_IRQS];
-static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
+static struct proc_dir_entry *root_irq_dir;
+static struct proc_dir_entry *irq_dir[NR_IRQS];
+static struct proc_dir_entry *smp_affinity_entry[NR_IRQS];
#ifdef CONFIG_IRQ_ALL_CPUS
-unsigned int irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = 0xffffffff};
-#else /* CONFIG_IRQ_ALL_CPUS */
-unsigned int irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = 0x00000000};
-#endif /* CONFIG_IRQ_ALL_CPUS */
+#define DEFAULT_CPU_AFFINITY 0xffffffff
+#else
+#define DEFAULT_CPU_AFFINITY 0x00000001
+#endif
+
+unsigned int irq_affinity [NR_IRQS] =
+ { [0 ... NR_IRQS-1] = DEFAULT_CPU_AFFINITY };
#define HEX_DIGITS 8
@@ -919,16 +921,18 @@
err = parse_hex_value(buffer, count, &new_value);
-/* Why is this disabled ? --BenH */
-#if 0/*CONFIG_SMP*/
/*
* Do not allow disabling IRQs completely - it's a too easy
* way to make the system unusable accidentally :-) At least
* one online CPU still has to be targeted.
+ *
+ * We assume a 1-1 logical<->physical cpu mapping here. If
+ * we assume that the cpu indices in /proc/irq/../smp_affinity
+ * are actually logical cpu #'s then we have no problem.
+ * -- Cort <cort@fsmlabs.com>
*/
if (!(new_value & cpu_online_map))
return -EINVAL;
-#endif
irq_affinity[irq] = new_value;
irq_desc[irq].handler->set_affinity(irq, new_value);
diff -uNr linux-v2.4.4/arch/ppc/kernel/m8260_setup.c rtlinux_kernel_2_4/arch/ppc/kernel/m8260_setup.c
--- linux-v2.4.4/arch/ppc/kernel/m8260_setup.c Thu Jun 21 17:32:59 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/m8260_setup.c Thu Jun 21 17:29:41 2001
@@ -119,7 +119,7 @@
return(0);
}
-unsigned long __init
+unsigned long
m8260_get_rtc_time(void)
{
@@ -206,6 +206,18 @@
}
+/*
+ * Same hack as 8xx
+ */
+unsigned long __init m8260_find_end_of_memory(void)
+{
+ bd_t *binfo;
+ extern unsigned char __res[];
+
+ binfo = (bd_t *)__res;
+
+ return binfo->bi_memsize;
+}
void __init
m8260_init(unsigned long r3, unsigned long r4, unsigned long r5,
@@ -248,18 +260,8 @@
ppc_md.get_rtc_time = m8260_get_rtc_time;
ppc_md.calibrate_decr = m8260_calibrate_decr;
-#if 0
- ppc_md.kbd_setkeycode = pckbd_setkeycode;
- ppc_md.kbd_getkeycode = pckbd_getkeycode;
- ppc_md.kbd_pretranslate = pckbd_pretranslate;
- ppc_md.kbd_translate = pckbd_translate;
- ppc_md.kbd_unexpected_up = pckbd_unexpected_up;
- ppc_md.kbd_leds = pckbd_leds;
- ppc_md.kbd_init_hw = pckbd_init_hw;
-#ifdef CONFIG_MAGIC_SYSRQ
- ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
-#endif
-#else
+ ppc_md.find_end_of_memory = m8260_find_end_of_memory;
+
ppc_md.kbd_setkeycode = NULL;
ppc_md.kbd_getkeycode = NULL;
ppc_md.kbd_translate = NULL;
@@ -268,7 +270,6 @@
ppc_md.kbd_init_hw = NULL;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md.kbd_sysrq_xlate = NULL;
-#endif
#endif
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
diff -uNr linux-v2.4.4/arch/ppc/kernel/m8xx_setup.c rtlinux_kernel_2_4/arch/ppc/kernel/m8xx_setup.c
--- linux-v2.4.4/arch/ppc/kernel/m8xx_setup.c Thu Jun 21 17:33:39 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/m8xx_setup.c Thu Jun 21 17:31:07 2001
@@ -584,6 +584,25 @@
/* -------------------------------------------------------------------- */
+/*
+ * This is a big hack right now, but it may turn into something real
+ * someday.
+ *
+ * For the 8xx boards (at this time anyway), there is nothing to initialize
+ * associated the PROM. Rather than include all of the prom.c
+ * functions in the image just to get prom_init, all we really need right
+ * now is the initialization of the physical memory region.
+ */
+unsigned long __init m8xx_find_end_of_memory(void)
+{
+ bd_t *binfo;
+ extern unsigned char __res[];
+
+ binfo = (bd_t *)__res;
+
+ return binfo->bi_memsize;
+}
+
void __init
m8xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
@@ -629,18 +648,8 @@
ppc_md.get_rtc_time = m8xx_get_rtc_time;
ppc_md.calibrate_decr = m8xx_calibrate_decr;
-#if 0
- ppc_md.kbd_setkeycode = pckbd_setkeycode;
- ppc_md.kbd_getkeycode = pckbd_getkeycode;
- ppc_md.kbd_pretranslate = pckbd_pretranslate;
- ppc_md.kbd_translate = pckbd_translate;
- ppc_md.kbd_unexpected_up = pckbd_unexpected_up;
- ppc_md.kbd_leds = pckbd_leds;
- ppc_md.kbd_init_hw = pckbd_init_hw;
-#ifdef CONFIG_MAGIC_SYSRQ
- ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate;
-#endif
-#else
+ ppc_md.find_end_of_memory = m8xx_find_end_of_memory;
+
ppc_md.kbd_setkeycode = NULL;
ppc_md.kbd_getkeycode = NULL;
ppc_md.kbd_translate = NULL;
@@ -649,7 +658,6 @@
ppc_md.kbd_init_hw = NULL;
#ifdef CONFIG_MAGIC_SYSRQ
ppc_md.kbd_sysrq_xlate = NULL;
-#endif
#endif
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
diff -uNr linux-v2.4.4/arch/ppc/kernel/misc.S rtlinux_kernel_2_4/arch/ppc/kernel/misc.S
--- linux-v2.4.4/arch/ppc/kernel/misc.S Thu Jun 21 17:32:02 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/misc.S Thu Jun 21 17:27:39 2001
@@ -21,20 +21,6 @@
#include <asm/cache.h>
#include "ppc_asm.h"
-#if defined(CONFIG_4xx) || defined(CONFIG_8xx)
-#define CACHE_LINE_SIZE 16
-#define LG_CACHE_LINE_SIZE 4
-#define MAX_COPY_PREFETCH 1
-#elif !defined(CONFIG_PPC64BRIDGE)
-#define CACHE_LINE_SIZE 32
-#define LG_CACHE_LINE_SIZE 5
-#define MAX_COPY_PREFETCH 4
-#else
-#define CACHE_LINE_SIZE 128
-#define LG_CACHE_LINE_SIZE 7
-#define MAX_COPY_PREFETCH 1
-#endif /* CONFIG_4xx || CONFIG_8xx */
-
.text
.align 5
@@ -60,14 +46,37 @@
mtlr r0
blr
-/* void __no_use_save_flags(unsigned long *flags) */
-_GLOBAL(__no_use_save_flags)
+/* void __save_flags_ptr(unsigned long *flags) */
+_GLOBAL(__save_flags_ptr)
mfmsr r4
stw r4,0(r3)
blr
+ /*
+ * Need these nops here for taking over save/restore to
+ * handle lost intrs
+ * -- Cort
+ */
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+_GLOBAL(__save_flags_ptr_end)
-/* void __no_use_restore_flags(unsigned long flags) */
-_GLOBAL(__no_use_restore_flags)
+/* void __restore_flags(unsigned long flags) */
+_GLOBAL(__restore_flags)
/*
* Just set/clear the MSR_EE bit through restore/flags but do not
* change anything else. This is needed by the RT system and makes
@@ -82,66 +91,95 @@
/* Check if things are setup the way we want _already_. */
cmpw 0,r3,r4
beqlr
- /* are we enabling interrupts? */
- rlwinm. r0,r3,0,16,16
- beq 1f
- /* if so, check if there are any lost interrupts */
- lis r7,ppc_n_lost_interrupts@ha
- lwz r7,ppc_n_lost_interrupts@l(r7)
- cmpi 0,r7,0 /* lost interrupts to process first? */
- bne- do_lost_interrupts
1: SYNC
mtmsr r3
SYNC
blr
-
-_GLOBAL(__no_use_cli)
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+_GLOBAL(__restore_flags_end)
+
+_GLOBAL(__cli)
mfmsr r0 /* Get current interrupt state */
rlwinm r3,r0,16+1,32-1,31 /* Extract old value of 'EE' */
rlwinm r0,r0,0,17,15 /* clear MSR_EE in r0 */
SYNC /* Some chip revs have problems here... */
mtmsr r0 /* Update machine state */
blr /* Done */
+ /*
+ * Need these nops here for taking over save/restore to
+ * handle lost intrs
+ * -- Cort
+ */
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+_GLOBAL(__cli_end)
-_GLOBAL(__no_use_sti)
- lis r4,ppc_n_lost_interrupts@ha
- lwz r4,ppc_n_lost_interrupts@l(r4)
+_GLOBAL(__sti)
mfmsr r3 /* Get current state */
ori r3,r3,MSR_EE /* Turn on 'EE' bit */
- cmpi 0,r4,0 /* lost interrupts to process first? */
- bne- do_lost_interrupts
SYNC /* Some chip revs have problems here... */
mtmsr r3 /* Update machine state */
blr
-
-/*
- * We were about to enable interrupts but we have to simulate
- * some interrupts that were lost by enable_irq first.
- */
-_GLOBAL(do_lost_interrupts)
- stwu r1,-16(r1)
- mflr r0
- stw r0,20(r1)
- stw r3,8(r1)
-1: bl fake_interrupt
- lis r4,ppc_n_lost_interrupts@ha
- lwz r4,ppc_n_lost_interrupts@l(r4)
- cmpi 0,r4,0
- bne- 1b
- lwz r3,8(r1)
- SYNC
- mtmsr r3
- lwz r0,20(r1)
- mtlr r0
- addi r1,r1,16
- blr
+ /*
+ * Need these nops here for taking over save/restore to
+ * handle lost intrs
+ * -- Cort
+ */
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+_GLOBAL(__sti_end)
/*
* complement mask on the msr then "or" some values on.
* _nmask_and_or_msr(nmask, value_to_or)
*/
- _GLOBAL(_nmask_and_or_msr)
+_GLOBAL(_nmask_and_or_msr)
mfmsr r0 /* Get current msr */
andc r0,r0,r3 /* And off the bits set in r3 (first parm) */
or r0,r0,r4 /* Or on the bits in r4 (second parm) */
@@ -267,6 +305,7 @@
2: icbi 0,r6
addi r6,r6,CACHE_LINE_SIZE
bdnz 2b
+ sync /* additional sync needed on g4 */
isync
blr
diff -uNr linux-v2.4.4/arch/ppc/kernel/mol.h rtlinux_kernel_2_4/arch/ppc/kernel/mol.h
--- linux-v2.4.4/arch/ppc/kernel/mol.h Thu Jun 21 17:29:10 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/mol.h Wed Dec 31 17:00:00 1969
@@ -1,68 +0,0 @@
-/*
- * arch/ppc/kernel/mol.h
- *
- * <mol.h>
- *
- * Mac-on-Linux hook macros
- * <http://www.maconlinux.org>
- *
- * Copyright (C) 2000 Samuel Rydh (samuel@ibrium.se)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation
- *
- */
-
-#ifndef _PPC_KERNEL_MOL
-#define _PPC_KERNEL_MOL
-
-#include <linux/config.h>
-
-#ifdef CONFIG_MOL
-#define MOL_INTERFACE_VERSION 3
-
-#define MOL_HOOK(hook_num) \
- lwz r0,(mol_interface + 4 * hook_num + 4)@l(0); \
- cmpwi cr1,r0,0; \
- beq+ cr1,777f; \
- mtctr r0; \
- bctrl; \
-777: lwz r0,GPR0(r21)
-
-#define MOL_HOOK_RESTORE(hook_num) \
- mfcr r2; \
- MOL_HOOK(hook_num); \
- mtcrf 0x80,r2; \
- lwz r2,_CTR(r21); \
- mtctr r2; \
- lwz r2,GPR2(r21)
-
-#define MOL_HOOK_MMU(hook_num, scr) \
- lis scr,(mol_interface + 4 * hook_num + 4)@ha; \
- lwz scr,(mol_interface + 4 * hook_num + 4)@l(scr); \
- cmpwi cr1,scr,0; \
- beq+ cr1,778f; \
- mtctr scr; \
- bctrl; \
-778:
-
-#define MOL_HOOK_TLBMISS(hook_num) \
- lwz r0,(mol_interface + 4 * hook_num + 4)@l(0); \
- cmpwi r0,0; \
- beq+ 779f; \
- mflr r3; \
- mtlr r0; \
- blrl; \
- mtlr r3; \
-779:
-
-#else
-#define MOL_HOOK(num)
-#define MOL_HOOK_RESTORE(num)
-#define MOL_HOOK_MMU(num, scr)
-#define MOL_HOOK_TLBMISS(num)
-#endif
-
-
-#endif /* _PPC_KERNEL_MOL */
diff -uNr linux-v2.4.4/arch/ppc/kernel/open_pic.c rtlinux_kernel_2_4/arch/ppc/kernel/open_pic.c
--- linux-v2.4.4/arch/ppc/kernel/open_pic.c Thu Jun 21 17:32:22 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/open_pic.c Thu Jun 21 17:28:18 2001
@@ -775,11 +775,17 @@
int
openpic_get_irq(struct pt_regs *regs)
{
+/*
+ * Clean up needed. -VAL
+ */
+#ifndef CONFIG_GEMINI
extern int i8259_irq(int cpu);
-
+#endif
int irq = openpic_irq();
/* Management of the cascade should be moved out of here */
+
+ /* Yep - because openpic !=> i8259, for one thing. -VAL */
if (open_pic_irq_offset && irq == open_pic_irq_offset)
{
/*
@@ -787,8 +793,10 @@
*/
if ( chrp_int_ack_special )
irq = *chrp_int_ack_special;
+#ifndef CONFIG_GEMINI
else
irq = i8259_irq( smp_processor_id() );
+#endif
openpic_eoi();
}
if (irq == OPENPIC_VEC_SPURIOUS + open_pic_irq_offset) {
diff -uNr linux-v2.4.4/arch/ppc/kernel/pci.c rtlinux_kernel_2_4/arch/ppc/kernel/pci.c
--- linux-v2.4.4/arch/ppc/kernel/pci.c Thu Jun 21 17:33:16 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/pci.c Thu Jun 21 17:30:15 2001
@@ -399,6 +399,10 @@
return hose;
}
+#ifdef CONFIG_ALL_PPC
+/*
+ * Functions below are used on OpenFirmware machines.
+ */
static void
make_one_node_map(struct device_node* node, u8 pci_bus)
{
@@ -577,6 +581,95 @@
*devfn = ((reg[0] >> 8) & 0xff);
return 0;
}
+
+void __init
+pci_process_bridge_OF_ranges(struct pci_controller *hose,
+ struct device_node *dev, int primary)
+{
+ unsigned int *ranges, *prev;
+ int rlen = 0;
+ int memno = 0;
+ struct resource *res;
+ int na = dev->n_addr_cells;
+ int np = na + 5;
+
+ /* First we try to merge ranges to fix a problem with some pmacs
+ * that can have more than 3 ranges, fortunately using contiguous
+ * addresses -- BenH
+ */
+ ranges = (unsigned int *) get_property(dev, "ranges", &rlen);
+ prev = NULL;
+ while ((rlen -= np * sizeof(unsigned int)) >= 0) {
+ if (prev) {
+ if (prev[0] == ranges[0] && prev[1] == ranges[1] &&
+ (prev[2] + prev[na+4]) == ranges[2] &&
+ (prev[na+2] + prev[na+4]) == ranges[na+2]) {
+ prev[na+4] += ranges[na+4];
+ ranges[0] = 0;
+ ranges += np;
+ continue;
+ }
+ }
+ prev = ranges;
+ ranges += np;
+ }
+
+ /*
+ * The ranges property is laid out as an array of elements,
+ * each of which comprises:
+ * cells 0 - 2: a PCI address
+ * cells 3 or 3+4: a CPU physical address
+ * (size depending on dev->n_addr_cells)
+ * cells 4+5 or 5+6: the size of the range
+ */
+ rlen = 0;
+ hose->io_base_phys = 0;
+ ranges = (unsigned int *) get_property(dev, "ranges", &rlen);
+ while ((rlen -= np * sizeof(unsigned int)) >= 0) {
+ res = NULL;
+ switch (ranges[0] >> 24) {
+ case 1: /* I/O space */
+ if (ranges[2] != 0)
+ break;
+ hose->io_base_phys = ranges[na+2];
+ hose->io_base_virt = ioremap(ranges[na+2], ranges[na+4]);
+ if (primary)
+ isa_io_base = (unsigned long) hose->io_base_virt;
+ res = &hose->io_resource;
+ res->flags = IORESOURCE_IO;
+ res->start = ranges[2];
+ break;
+ case 2: /* memory space */
+ memno = 0;
+ if (ranges[1] == 0 && ranges[2] == 0
+ && ranges[na+4] <= (16 << 20)) {
+ /* 1st 16MB, i.e. ISA memory area */
+ if (primary)
+ isa_mem_base = ranges[na+2];
+ memno = 1;
+ }
+ while (memno < 3 && hose->mem_resources[memno].flags)
+ ++memno;
+ if (memno == 0)
+ hose->pci_mem_offset = ranges[na+2] - ranges[2];
+ if (memno < 3) {
+ res = &hose->mem_resources[memno];
+ res->flags = IORESOURCE_MEM;
+ res->start = ranges[na+2];
+ }
+ break;
+ }
+ if (res != NULL) {
+ res->name = dev->full_name;
+ res->end = res->start + ranges[na+4] - 1;
+ res->parent = NULL;
+ res->sibling = NULL;
+ res->child = NULL;
+ }
+ ranges += np;
+ }
+}
+#endif /* CONFIG_ALL_PPC */
void __init
pcibios_init(void)
diff -uNr linux-v2.4.4/arch/ppc/kernel/pmac_pci.c rtlinux_kernel_2_4/arch/ppc/kernel/pmac_pci.c
--- linux-v2.4.4/arch/ppc/kernel/pmac_pci.c Thu Jun 21 17:33:39 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/pmac_pci.c Thu Jun 21 17:31:08 2001
@@ -29,8 +29,6 @@
#undef DEBUG
-extern void process_bridge_ranges(struct pci_controller *hose,
- struct device_node *dev, int primary);
static void add_bridges(struct device_node *dev);
/* XXX Could be per-controller, but I don't think we risk anything by
@@ -382,17 +380,6 @@
hose->ops = ¯isc_pci_ops;
hose->cfg_addr = ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_data = ioremap(addr->address + 0xc00000, 0x1000);
-#if 0 /* done in process_bridge_ranges now - paulus */
- hose->io_base_phys = addr->address;
- /* is 0x10000 enough for io space ? */
- hose->io_base_virt = (void *)ioremap(addr->address, 0x10000);
-
- /* XXX This is the bridge with the PCI expansion bus. We route
- * legacy IOs to it.
- */
- if (addr->address == 0xf2000000)
- isa_io_base = (unsigned long)hose->io_base_virt;
-#endif
/* We "know" that the bridge at f2000000 has the PCI slots. */
return addr->address == 0xf2000000;
}
@@ -405,10 +392,6 @@
ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_data = (volatile unsigned char *)
ioremap(addr->address + 0xc00000, 0x1000);
-#if 0 /* done in process_bridge_ranges now - paulus */
- hose->io_base_phys = addr->address;
- hose->io_base_virt = (void *) ioremap(addr->address, 0x10000);
-#endif
init_bandit(hose);
}
@@ -421,23 +404,12 @@
ioremap(addr->address + 0x800000, 0x1000);
hose->cfg_data = (volatile unsigned char *)
ioremap(addr->address + 0xc00000, 0x1000);
-#if 0 /* done in process_bridge_ranges now - paulus */
- hose->io_base_phys = addr->address;
- hose->io_base_virt = (void *) ioremap(addr->address, 0x10000);
-#endif
}
void __init
setup_grackle(struct pci_controller *hose, unsigned io_space_size)
{
setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
-#if 0 /* done in process_bridge_ranges now - paulus */
- hose->io_base_phys = 0xfe000000;
- hose->io_base_virt = (void *) ioremap(0xfe000000, io_space_size);
- pci_dram_offset = 0;
- isa_mem_base = 0xfd000000;
- isa_io_base = (unsigned long) hose->io_base_virt;
-#endif
if (machine_is_compatible("AAPL,PowerBook1998"))
grackle_set_loop_snoop(hose, 1);
#if 0 /* Disabled for now, HW problems ??? */
@@ -505,7 +477,7 @@
/* Interpret the "ranges" property */
/* This also maps the I/O region and sets isa_io/mem_base */
- process_bridge_ranges(hose, dev, primary);
+ pci_process_bridge_OF_ranges(hose, dev, primary);
/* Fixup "bus-range" OF property */
fixup_bus_range(dev);
diff -uNr linux-v2.4.4/arch/ppc/kernel/pmac_pic.c rtlinux_kernel_2_4/arch/ppc/kernel/pmac_pic.c
--- linux-v2.4.4/arch/ppc/kernel/pmac_pic.c Thu Jun 21 17:30:03 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/pmac_pic.c Thu Jun 21 17:25:10 2001
@@ -10,6 +10,7 @@
#include <asm/smp.h>
#include <asm/prom.h>
#include <asm/pci-bridge.h>
+#include <asm/time.h>
#include "pmac_pic.h"
#include "open_pic.h"
@@ -44,10 +45,12 @@
* since it can lose interrupts (see pmac_set_irq_mask).
* -- Cort
*/
-void __pmac __no_use_set_lost(unsigned long irq_nr)
+void __pmac __set_lost(unsigned long irq_nr)
{
- if (!test_and_set_bit(irq_nr, ppc_lost_interrupts))
+ if (!test_and_set_bit(irq_nr, ppc_lost_interrupts)) {
atomic_inc(&ppc_n_lost_interrupts);
+ set_dec(1);
+ }
}
static void __pmac pmac_mask_and_ack_irq(unsigned int irq_nr)
@@ -373,7 +376,6 @@
irqctrler = NULL;
}
- int_control.int_set_lost = __no_use_set_lost;
/*
* G3 powermacs and 1999 G3 PowerBooks have 64 interrupts,
* 1998 G3 Series PowerBooks have 128,
diff -uNr linux-v2.4.4/arch/ppc/kernel/pmac_setup.c rtlinux_kernel_2_4/arch/ppc/kernel/pmac_setup.c
--- linux-v2.4.4/arch/ppc/kernel/pmac_setup.c Thu Jun 21 17:29:56 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/pmac_setup.c Thu Jun 21 17:25:07 2001
@@ -66,6 +66,7 @@
#include <asm/time.h>
#include "local_irq.h"
#include "pmac_pic.h"
+#include "../mm/mem_pieces.h"
#undef SHOW_GATWICK_IRQS
@@ -103,6 +104,8 @@
extern int pmac_pci_enable_device_hook(struct pci_dev *dev, int initial);
+struct device_node *memory_node;
+
unsigned char drive_info;
int ppc_override_l2cr = 0;
@@ -470,7 +473,7 @@
char *p;
/* Do nothing if the root has been set already. */
- if ((goodness < current_root_goodness) &&
+ if ((goodness <= current_root_goodness) &&
(ROOT_DEV != to_kdev_t(DEFAULT_ROOT_DEVICE)))
return;
p = strstr(saved_command_line, "root=");
@@ -635,6 +638,87 @@
#endif
#endif
+/*
+ * Read in a property describing some pieces of memory.
+ */
+
+static void __init get_mem_prop(char *name, struct mem_pieces *mp)
+{
+ struct reg_property *rp;
+ int i, s;
+ unsigned int *ip;
+ int nac = memory_node->n_addr_cells, nsc = memory_node->n_size_cells;
+
+ ip = (unsigned int *) get_property(memory_node, name, &s);
+ if (ip == NULL) {
+ printk(KERN_ERR "error: couldn't get %s property on /memory\n",
+ name);
+ abort();
+ }
+ s /= (nsc + nac) * 4;
+ rp = mp->regions;
+ for (i = 0; i < s; ++i, ip += nac+nsc) {
+ if (nac >= 2 && ip[nac-2] != 0)
+ continue;
+ rp->address = ip[nac-1];
+ if (nsc >= 2 && ip[nac+nsc-2] != 0)
+ rp->size = ~0U;
+ else
+ rp->size = ip[nac+nsc-1];
+ ++rp;
+ }
+ mp->n_regions = rp - mp->regions;
+
+ /* Make sure the pieces are sorted. */
+ mem_pieces_sort(mp);
+ mem_pieces_coalesce(mp);
+}
+
+/*
+ * On systems with Open Firmware, collect information about
+ * physical RAM and which pieces are already in use.
+ * At this point, we have (at least) the first 8MB mapped with a BAT.
+ * Our text, data, bss use something over 1MB, starting at 0.
+ * Open Firmware may be using 1MB at the 4MB point.
+ */
+unsigned long __init pmac_find_end_of_memory(void)
+{
+ unsigned long a, total;
+ struct mem_pieces phys_mem;
+
+ memory_node = find_devices("memory");
+ if (memory_node == NULL) {
+ printk(KERN_ERR "can't find memory node\n");
+ abort();
+ }
+
+ /*
+ * Find out where physical memory is, and check that it
+ * starts at 0 and is contiguous. It seems that RAM is
+ * always physically contiguous on Power Macintoshes.
+ *
+ * Supporting discontiguous physical memory isn't hard,
+ * it just makes the virtual <-> physical mapping functions
+ * more complicated (or else you end up wasting space
+ * in mem_map).
+ */
+ get_mem_prop("reg", &phys_mem);
+ if (phys_mem.n_regions == 0)
+ panic("No RAM??");
+ a = phys_mem.regions[0].address;
+ if (a != 0)
+ panic("RAM doesn't start at physical address 0");
+ total = phys_mem.regions[0].size;
+
+ if (phys_mem.n_regions > 1) {
+ printk("RAM starting at 0x%x is not contiguous\n",
+ phys_mem.regions[1].address);
+ printk("Using RAM from 0 to 0x%lx\n", total-1);
+ }
+
+ return total;
+}
+
void __init
pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
@@ -665,6 +749,8 @@
ppc_md.set_rtc_time = pmac_set_rtc_time;
ppc_md.get_rtc_time = pmac_get_rtc_time;
ppc_md.calibrate_decr = pmac_calibrate_decr;
+
+ ppc_md.find_end_of_memory = pmac_find_end_of_memory;
#ifdef CONFIG_VT
#ifdef CONFIG_INPUT
diff -uNr linux-v2.4.4/arch/ppc/kernel/ppc8260_pic.h rtlinux_kernel_2_4/arch/ppc/kernel/ppc8260_pic.h
--- linux-v2.4.4/arch/ppc/kernel/ppc8260_pic.h Thu Jun 21 17:33:39 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/ppc8260_pic.h Thu Jun 21 17:31:02 2001
@@ -8,8 +8,7 @@
void m8260_pic_init(void);
void m8260_do_IRQ(struct pt_regs *regs,
- int cpu,
- int isfake);
+ int cpu);
int m8260_get_irq(struct pt_regs *regs);
#endif /* _PPC_KERNEL_PPC8260_H */
diff -uNr linux-v2.4.4/arch/ppc/kernel/ppc8xx_pic.c rtlinux_kernel_2_4/arch/ppc/kernel/ppc8xx_pic.c
--- linux-v2.4.4/arch/ppc/kernel/ppc8xx_pic.c Thu Jun 21 17:30:20 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/ppc8xx_pic.c Thu Jun 21 17:25:28 2001
@@ -67,8 +67,7 @@
#if 0
void
m8xx_do_IRQ(struct pt_regs *regs,
- int cpu,
- int isfake)
+ int cpu)
{
int irq;
unsigned long bits = 0;
@@ -158,13 +157,15 @@
*/
switch (irq) {
#ifdef IDE0_INTERRUPT
- case IDE0_INTERRUPT: /* fall through */
+ case IDE0_INTERRUPT: /* IDE0 */
+ return (request_8xxirq(irq, handler, irqflags, devname,
+ dev_id));
#endif
#ifdef IDE1_INTERRUPT
- case IDE1_INTERRUPT: /* fall through */
+ case IDE1_INTERRUPT: /* IDE1 */
+ return (request_8xxirq(irq, handler, irqflags, devname,
+ dev_id));
#endif
- return (request_8xxirq(irq, handler, irqflags, devname, dev_id));
-
default: /* unknown IRQ -> panic */
panic("request_irq");
}
diff -uNr linux-v2.4.4/arch/ppc/kernel/ppc8xx_pic.h rtlinux_kernel_2_4/arch/ppc/kernel/ppc8xx_pic.h
--- linux-v2.4.4/arch/ppc/kernel/ppc8xx_pic.h Thu Jun 21 17:32:31 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/ppc8xx_pic.h Thu Jun 21 17:28:37 2001
@@ -8,8 +8,7 @@
void m8xx_pic_init(void);
void m8xx_do_IRQ(struct pt_regs *regs,
- int cpu,
- int isfake);
+ int cpu);
int m8xx_get_irq(struct pt_regs *regs);
#ifdef CONFIG_MBX
diff -uNr linux-v2.4.4/arch/ppc/kernel/ppc_asm.h rtlinux_kernel_2_4/arch/ppc/kernel/ppc_asm.h
--- linux-v2.4.4/arch/ppc/kernel/ppc_asm.h Thu Jun 21 17:33:13 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/ppc_asm.h Thu Jun 21 17:30:11 2001
@@ -130,3 +130,22 @@
#define MTMSRD(r) mtmsr r
#define CLR_TOP32(r)
#endif /* CONFIG_PPC64BRIDGE */
+
+/*
+ * Defines for cache-line size etc.
+ */
+#if defined(CONFIG_4xx) || defined(CONFIG_8xx)
+#define CACHE_LINE_SIZE 16
+#define LG_CACHE_LINE_SIZE 4
+#define MAX_COPY_PREFETCH 1
+
+#elif !defined(CONFIG_PPC64BRIDGE)
+#define CACHE_LINE_SIZE 32
+#define LG_CACHE_LINE_SIZE 5
+#define MAX_COPY_PREFETCH 4
+
+#else
+#define CACHE_LINE_SIZE 128
+#define LG_CACHE_LINE_SIZE 7
+#define MAX_COPY_PREFETCH 1
+#endif /* CONFIG_4xx || CONFIG_8xx */
diff -uNr linux-v2.4.4/arch/ppc/kernel/ppc_ksyms.c rtlinux_kernel_2_4/arch/ppc/kernel/ppc_ksyms.c
--- linux-v2.4.4/arch/ppc/kernel/ppc_ksyms.c Thu Jun 21 17:32:16 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/ppc_ksyms.c Thu Jun 21 17:28:07 2001
@@ -55,12 +55,11 @@
extern void transfer_to_handler(void);
extern void syscall_trace(void);
-extern void do_IRQ(struct pt_regs *regs, int isfake);
+extern void do_IRQ(struct pt_regs *regs);
extern void MachineCheckException(struct pt_regs *regs);
extern void AlignmentException(struct pt_regs *regs);
extern void ProgramCheckException(struct pt_regs *regs);
extern void SingleStepException(struct pt_regs *regs);
-extern void do_lost_interrupts(unsigned long);
extern int do_signal(sigset_t *, struct pt_regs *);
extern int pmac_newworld;
extern int sys_sigreturn(struct pt_regs *regs);
@@ -83,7 +82,6 @@
EXPORT_SYMBOL(sys_sigreturn);
EXPORT_SYMBOL(ppc_n_lost_interrupts);
EXPORT_SYMBOL(ppc_lost_interrupts);
-EXPORT_SYMBOL(do_lost_interrupts);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(disable_irq_nosync);
@@ -314,7 +312,14 @@
#endif
EXPORT_SYMBOL(__delay);
-EXPORT_SYMBOL(int_control);
+EXPORT_SYMBOL(__sti);
+EXPORT_SYMBOL(__sti_end);
+EXPORT_SYMBOL(__cli);
+EXPORT_SYMBOL(__cli_end);
+EXPORT_SYMBOL(__save_flags_ptr);
+EXPORT_SYMBOL(__save_flags_ptr_end);
+EXPORT_SYMBOL(__restore_flags);
+EXPORT_SYMBOL(__restore_flags_end);
EXPORT_SYMBOL(timer_interrupt_intercept);
EXPORT_SYMBOL(timer_interrupt);
EXPORT_SYMBOL(do_IRQ_intercept);
@@ -331,9 +336,6 @@
EXPORT_SYMBOL(__up);
EXPORT_SYMBOL(__down);
EXPORT_SYMBOL(__down_interruptible);
-EXPORT_SYMBOL(__down_trylock);
-EXPORT_SYMBOL(down_read_failed);
-EXPORT_SYMBOL(down_write_failed);
#if defined(CONFIG_KGDB) || defined(CONFIG_XMON)
extern void (*debugger)(struct pt_regs *regs);
@@ -362,6 +364,8 @@
EXPORT_SYMBOL(next_mmu_context);
EXPORT_SYMBOL(set_context);
EXPORT_SYMBOL(mmu_context_overflow);
+EXPORT_SYMBOL(flush_hash_page); /* For MOL */
+EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
EXPORT_SYMBOL_NOVERS(disarm_decr);
#if !defined(CONFIG_8xx) && !defined(CONFIG_4xx)
extern long *intercept_table;
@@ -369,17 +373,3 @@
#endif
extern long *ret_from_intercept;
EXPORT_SYMBOL(ret_from_intercept);
-
-#ifdef CONFIG_MOL
-extern ulong mol_interface[];
-extern PTE *Hash;
-extern unsigned long Hash_mask;
-extern void (*ret_from_except)(void);
-extern struct task_struct *last_task_used_altivec;
-EXPORT_SYMBOL_NOVERS(mol_interface);
-EXPORT_SYMBOL(Hash);
-EXPORT_SYMBOL(Hash_mask);
-EXPORT_SYMBOL(handle_mm_fault);
-EXPORT_SYMBOL(last_task_used_math);
-EXPORT_SYMBOL(ret_from_except);
-#endif /* CONFIG_MOL */
diff -uNr linux-v2.4.4/arch/ppc/kernel/prep_pci.c rtlinux_kernel_2_4/arch/ppc/kernel/prep_pci.c
--- linux-v2.4.4/arch/ppc/kernel/prep_pci.c Thu Jun 21 17:33:34 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/prep_pci.c Thu Jun 21 17:30:59 2001
@@ -437,8 +437,8 @@
static char ibm8xx_pci_IRQ_routes[] __prepdata = {
0, /* Line 0 - unused */
- 13, /* Line 1 */
- 10, /* Line 2 */
+ 15, /* Line 1 */
+ 15, /* Line 2 */
15, /* Line 3 */
15, /* Line 4 */
};
diff -uNr linux-v2.4.4/arch/ppc/kernel/prep_setup.c rtlinux_kernel_2_4/arch/ppc/kernel/prep_setup.c
--- linux-v2.4.4/arch/ppc/kernel/prep_setup.c Thu Jun 21 17:32:03 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/prep_setup.c Thu Jun 21 17:27:42 2001
@@ -312,7 +312,9 @@
/* remap the VGA memory */
vgacon_remap_base = 0xf0000000;
/*vgacon_remap_base = ioremap(0xc0000000, 0xba000);*/
- conswitchp = &vga_con;
+ conswitchp = &vga_con;
+#else
+ conswitchp = &dummy_con;
#endif
}
@@ -575,7 +577,7 @@
#if 0
void __prep
-prep_do_IRQ(struct pt_regs *regs, int cpu, int isfake)
+prep_do_IRQ(struct pt_regs *regs, int cpu)
{
int irq;
@@ -691,6 +693,35 @@
}
#endif
+/*
+ * This finds the amount of physical ram and does necessary
+ * setup for prep. This is pretty architecture specific so
+ * this will likely stay separate from the pmac.
+ * -- Cort
+ */
+unsigned long __init prep_find_end_of_memory(void)
+{
+ unsigned long total;
+#ifdef CONFIG_PREP_RESIDUAL
+ total = res->TotalMemory;
+#else
+ total = 0;
+#endif
+
+ if (total == 0 )
+ {
+ /*
+ * I need a way to probe the amount of memory if the residual
+ * data doesn't contain it. -- Cort
+ */
+ printk("Ramsize from residual data was 0 -- Probing for value\n");
+ total = 0x02000000;
+ printk("Ramsize default to be %ldM\n", total>>20);
+ }
+
+ return (total);
+}
+
unsigned long *MotSave_SmpIar;
unsigned char *MotSave_CpusState[2];
@@ -750,7 +781,8 @@
{
if ( !strncmp(res->VitalProductData.PrintableModel,"IBM",3) )
_prep_type = _PREP_IBM;
- _prep_type = _PREP_Motorola;
+ else
+ _prep_type = _PREP_Motorola;
}
else /* assume motorola if no residual (netboot?) */
#endif
@@ -783,6 +815,8 @@
ppc_md.calibrate_decr = mk48t59_calibrate_decr;
ppc_md.time_init = mk48t59_init;
}
+
+ ppc_md.find_end_of_memory = prep_find_end_of_memory;
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.insw = prep_ide_insw;
diff -uNr linux-v2.4.4/arch/ppc/kernel/process.c rtlinux_kernel_2_4/arch/ppc/kernel/process.c
--- linux-v2.4.4/arch/ppc/kernel/process.c Thu Jun 21 17:31:39 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/process.c Thu Jun 21 17:26:49 2001
@@ -378,45 +378,6 @@
}
/*
- * XXX ld.so expects the auxiliary table to start on
- * a 16-byte boundary, so we have to find it and
- * move it up. :-(
- */
-static inline void shove_aux_table(unsigned long sp)
-{
- int argc;
- char *p;
- unsigned long e;
- unsigned long aux_start, offset;
-
- if (__get_user(argc, (int *)sp))
- return;
- sp += sizeof(int) + (argc + 1) * sizeof(char *);
- /* skip over the environment pointers */
- do {
- if (__get_user(p, (char **)sp))
- return;
- sp += sizeof(char *);
- } while (p != NULL);
- aux_start = sp;
- /* skip to the end of the auxiliary table */
- do {
- if (__get_user(e, (unsigned long *)sp))
- return;
- sp += 2 * sizeof(unsigned long);
- } while (e != AT_NULL);
- offset = ((aux_start + 15) & ~15) - aux_start;
- if (offset != 0) {
- do {
- sp -= sizeof(unsigned long);
- if (__get_user(e, (unsigned long *)sp)
- || __put_user(e, (unsigned long *)(sp + offset)))
- return;
- } while (sp > aux_start);
- }
-}
-
-/*
* Set up a thread for executing a new program
*/
void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp)
@@ -425,7 +386,6 @@
regs->nip = nip;
regs->gpr[1] = sp;
regs->msr = MSR_USER;
- shove_aux_table(sp);
if (last_task_used_math == current)
last_task_used_math = 0;
if (last_task_used_altivec == current)
diff -uNr linux-v2.4.4/arch/ppc/kernel/prom.c rtlinux_kernel_2_4/arch/ppc/kernel/prom.c
--- linux-v2.4.4/arch/ppc/kernel/prom.c Thu Jun 21 17:32:37 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/prom.c Thu Jun 21 17:28:54 2001
@@ -757,14 +757,9 @@
setup_disp_fake_bi(RELOC(prom_disp_node));
#endif
- /* If pmac, then use quiesce call. We can't rely on prom_version
- * since some old iMacs appear to have an incorrect /openprom/model
- * entry in the device tree
- */
- if (!chrp) {
- prom_print(RELOC("Calling quiesce ...\n"));
- call_prom(RELOC("quiesce"), 0, 0);
- }
+ /* Use quiesce call to get OF to shut down any devices it's using */
+ prom_print(RELOC("Calling quiesce ...\n"));
+ call_prom(RELOC("quiesce"), 0, 0);
#ifdef CONFIG_BOOTX_TEXT
if (!chrp && RELOC(disp_bi)) {
@@ -839,7 +834,7 @@
__asm__ __volatile__ ("mfspr %0, 1008" : "=r" (flags));
prom_drawhex(flags);
}
- if (pvr == 8 || pvr == 12) {
+ if (pvr == 8 || pvr == 12 || pvr == 0x800c) {
prom_drawstring(RELOC("\nICTC : 0x"));
__asm__ __volatile__ ("mfspr %0, 1019" : "=r" (flags));
prom_drawhex(flags);
@@ -986,9 +981,11 @@
prom_print(RELOC("... failed\n"));
} else {
prom_print(RELOC("... ok\n"));
-
- /* Setup a useable color table when the appropriate
- * method is available. Should update this to set-colors */
+ /*
+ * Setup a usable color table when the appropriate
+ * method is available.
+ * Should update this to use set-colors.
+ */
for (i = 0; i < 32; i++)
if (prom_set_color(ih, i, RELOC(default_colors)[i*3],
RELOC(default_colors)[i*3+1],
@@ -1267,6 +1264,8 @@
np->name = get_property(np, "name", 0);
np->type = get_property(np, "device_type", 0);
+ np->n_addr_cells = naddrc;
+ np->n_size_cells = nsizec;
/* get the device addresses and interrupts */
if (ifunc != NULL) {
@@ -1283,6 +1282,14 @@
ip = (int *) get_property(np, "#size-cells", 0);
if (ip != NULL)
nsizec = *ip;
+ if (np->parent == NULL) {
+ /*
+ * Set the n_addr/size_cells on the root to its
+ * own values, rather than 0.
+ */
+ np->n_addr_cells = naddrc;
+ np->n_size_cells = nsizec;
+ }
/* the f50 sets the name to 'display' and 'compatible' to what we
* expect for the name -- Cort
@@ -1566,6 +1573,8 @@
}
ip = (int *) get_property(np, "AAPL,interrupts", &l);
+ if (ip == 0 && np->parent)
+ ip = (int *) get_property(np->parent, "AAPL,interrupts", &l);
if (ip == 0)
ip = (int *) get_property(np, "interrupts", &l);
if (ip != 0) {
@@ -1761,7 +1770,7 @@
i = 0;
adr = (struct address_range *) mem_start;
while ((l -= rpsize) >= 0) {
- adr[i].space = 0;
+ adr[i].space = (naddrc >= 2? rp[naddrc-2]: 0);
adr[i].address = rp[naddrc - 1];
adr[i].size = rp[naddrc + nsizec - 1];
++i;
@@ -2161,9 +2170,10 @@
{
if (disp_bi == 0)
return;
- /* check it's the same frame buffer (within 16MB) */
- if ((phys ^ (unsigned long)disp_bi->dispDeviceBase) & 0xff000000)
+ /* check it's the same frame buffer (within 64MB) */
+ if ((phys ^ (unsigned long)disp_bi->dispDeviceBase) & 0xfc000000) {
return;
+ }
disp_bi->dispDeviceBase = (__u8 *) phys;
disp_bi->dispDeviceRect[0] = 0;
diff -uNr linux-v2.4.4/arch/ppc/kernel/semaphore.c rtlinux_kernel_2_4/arch/ppc/kernel/semaphore.c
--- linux-v2.4.4/arch/ppc/kernel/semaphore.c Thu Jun 21 17:31:47 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/semaphore.c Thu Jun 21 17:27:07 2001
@@ -9,131 +9,122 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
+ *
+ * April 2001 - Reworked by Paul Mackerras <paulus@samba.org>
+ * to eliminate the SMP races in the old version between the updates
+ * of `count' and `waking'. Now we use negative `count' values to
+ * indicate that some process(es) are waiting for the semaphore.
*/
#include <linux/sched.h>
-
+#include <asm/atomic.h>
#include <asm/semaphore.h>
-#include <asm/semaphore-helper.h>
/*
- * Semaphores are implemented using a two-way counter:
- * The "count" variable is decremented for each process
- * that tries to sleep, while the "waking" variable is
- * incremented when the "up()" code goes to wake up waiting
- * processes.
- *
- * Notably, the inline "up()" and "down()" functions can
- * efficiently test if they need to do any extra work (up
- * needs to do something only if count was negative before
- * the increment operation.
- *
- * waking_non_zero() (from asm/semaphore.h) must execute
- * atomically.
- *
- * When __up() is called, the count was negative before
- * incrementing it, and we need to wake up somebody.
- *
- * This routine adds one to the count of processes that need to
- * wake up and exit. ALL waiting processes actually wake up but
- * only the one that gets to the "waking" field first will gate
- * through and acquire the semaphore. The others will go back
- * to sleep.
+ * Atomically update sem->count.
+ * This does the equivalent of the following:
*
- * Note that these functions are only called when there is
- * contention on the lock, and as such all this is the
- * "non-critical" part of the whole semaphore business. The
- * critical part is the inline stuff in <asm/semaphore.h>
- * where we want to avoid any extra jumps and calls.
+ * old_count = sem->count;
+ * tmp = MAX(old_count, 0) + incr;
+ * sem->count = tmp;
+ * return old_count;
*/
+static inline int __sem_update_count(struct semaphore *sem, int incr)
+{
+ int old_count, tmp;
+
+ __asm__ __volatile__("\n"
+"1: lwarx %0,0,%3\n"
+" srawi %1,%0,31\n"
+" andc %1,%0,%1\n"
+" add %1,%1,%4\n"
+" stwcx. %1,0,%3\n"
+" bne 1b"
+ : "=&r" (old_count), "=&r" (tmp), "=m" (sem->count)
+ : "r" (&sem->count), "r" (incr), "m" (sem->count)
+ : "cc");
+
+ return old_count;
+}
+
void __up(struct semaphore *sem)
{
- wake_one_more(sem);
+ /*
+ * Note that we incremented count in up() before we came here,
+ * but that was ineffective since the result was <= 0, and
+ * any negative value of count is equivalent to 0.
+ * This ends up setting count to 1, unless count is now > 0
+ * (i.e. because some other cpu has called up() in the meantime),
+ * in which case we just increment count.
+ */
+ __sem_update_count(sem, 1);
wake_up(&sem->wait);
}
/*
- * Perform the "down" function. Return zero for semaphore acquired,
- * return negative for signalled out of the function.
- *
- * If called from __down, the return is ignored and the wait loop is
- * not interruptible. This means that a task waiting on a semaphore
- * using "down()" cannot be killed until someone does an "up()" on
- * the semaphore.
- *
- * If called from __down_interruptible, the return value gets checked
- * upon return. If the return value is negative then the task continues
- * with the negative value in the return register (it can be tested by
- * the caller).
- *
- * Either form may be used in conjunction with "up()".
- *
+ * Note that when we come in to __down or __down_interruptible,
+ * we have already decremented count, but that decrement was
+ * ineffective since the result was < 0, and any negative value
+ * of count is equivalent to 0.
+ * Thus it is only when we decrement count from some value > 0
+ * that we have actually got the semaphore.
*/
+void __down(struct semaphore *sem)
+{
+ struct task_struct *tsk = current;
+ DECLARE_WAITQUEUE(wait, tsk);
-#define DOWN_VAR \
- struct task_struct *tsk = current; \
- wait_queue_t wait; \
- init_waitqueue_entry(&wait, tsk);
-
-#define DOWN_HEAD(task_state) \
- \
- \
- tsk->state = (task_state); \
- add_wait_queue(&sem->wait, &wait); \
- \
- /* \
- * Ok, we're set up. sem->count is known to be less than zero \
- * so we must wait. \
- * \
- * We can let go the lock for purposes of waiting. \
- * We re-acquire it after awaking so as to protect \
- * all semaphore operations. \
- * \
- * If "up()" is called before we call waking_non_zero() then \
- * we will catch it right away. If it is called later then \
- * we will have to go through a wakeup cycle to catch it. \
- * \
- * Multiple waiters contend for the semaphore lock to see \
- * who gets to gate through and who has to wait some more. \
- */ \
- for (;;) {
-
-#define DOWN_TAIL(task_state) \
- tsk->state = (task_state); \
- } \
- tsk->state = TASK_RUNNING; \
+ tsk->state = TASK_UNINTERRUPTIBLE;
+ add_wait_queue_exclusive(&sem->wait, &wait);
+ smp_wmb();
+
+ /*
+ * Try to get the semaphore. If the count is > 0, then we've
+ * got the semaphore; we decrement count and exit the loop.
+ * If the count is 0 or negative, we set it to -1, indicating
+ * that we are asleep, and then sleep.
+ */
+ while (__sem_update_count(sem, -1) <= 0) {
+ schedule();
+ tsk->state = TASK_UNINTERRUPTIBLE;
+ }
remove_wait_queue(&sem->wait, &wait);
+ tsk->state = TASK_RUNNING;
-void __down(struct semaphore * sem)
-{
- DOWN_VAR
- DOWN_HEAD(TASK_UNINTERRUPTIBLE)
- if (waking_non_zero(sem))
- break;
- schedule();
- DOWN_TAIL(TASK_UNINTERRUPTIBLE)
+ /*
+ * If there are any more sleepers, wake one of them up so
+ * that it can either get the semaphore, or set count to -1
+ * indicating that there are still processes sleeping.
+ */
+ wake_up(&sem->wait);
}
int __down_interruptible(struct semaphore * sem)
{
- int ret = 0;
- DOWN_VAR
- DOWN_HEAD(TASK_INTERRUPTIBLE)
-
- ret = waking_non_zero_interruptible(sem, tsk);
- if (ret)
- {
- if (ret == 1)
- /* ret != 0 only if we get interrupted -arca */
- ret = 0;
- break;
+ int retval = 0;
+ struct task_struct *tsk = current;
+ DECLARE_WAITQUEUE(wait, tsk);
+
+ tsk->state = TASK_INTERRUPTIBLE;
+ add_wait_queue_exclusive(&sem->wait, &wait);
+ smp_wmb();
+
+ while (__sem_update_count(sem, -1) <= 0) {
+ if (signal_pending(current)) {
+ /*
+ * A signal is pending - give up trying.
+ * Set sem->count to 0 if it is negative,
+ * since we are no longer sleeping.
+ */
+ __sem_update_count(sem, 0);
+ retval = -EINTR;
+ break;
+ }
+ schedule();
+ tsk->state = TASK_INTERRUPTIBLE;
}
- schedule();
- DOWN_TAIL(TASK_INTERRUPTIBLE)
- return ret;
-}
-
-int __down_trylock(struct semaphore * sem)
-{
- return waking_non_zero_trylock(sem);
+ tsk->state = TASK_RUNNING;
+ remove_wait_queue(&sem->wait, &wait);
+ wake_up(&sem->wait);
+ return retval;
}
diff -uNr linux-v2.4.4/arch/ppc/kernel/setup.c rtlinux_kernel_2_4/arch/ppc/kernel/setup.c
--- linux-v2.4.4/arch/ppc/kernel/setup.c Thu Jun 21 17:31:07 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/setup.c Thu Jun 21 17:26:09 2001
@@ -73,6 +73,12 @@
unsigned long r6,
unsigned long r7);
+extern void gemini_init(unsigned long r3,
+ unsigned long r4,
+ unsigned long r5,
+ unsigned long r6,
+ unsigned long r7);
+
#ifdef CONFIG_XMON
extern void xmon_map_scc(void);
#endif
@@ -80,13 +86,6 @@
extern boot_infos_t *boot_infos;
char saved_command_line[256];
unsigned char aux_device_present;
-struct int_control_struct int_control =
-{
- __no_use_cli,
- __no_use_sti,
- __no_use_restore_flags,
- __no_use_save_flags
-};
struct ide_machdep_calls ppc_ide_md;
int parse_bootinfo(void);
@@ -547,6 +546,11 @@
#ifdef CONFIG_APUS
case _MACH_apus:
apus_init(r3, r4, r5, r6, r7);
+ break;
+#endif
+#ifdef CONFIG_GEMINI
+ case _MACH_gemini:
+ gemini_init(r3, r4, r5, r6, r7);
break;
#endif
default:
diff -uNr linux-v2.4.4/arch/ppc/kernel/sleep.S rtlinux_kernel_2_4/arch/ppc/kernel/sleep.S
--- linux-v2.4.4/arch/ppc/kernel/sleep.S Thu Jun 21 17:28:39 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/sleep.S Thu Jun 21 17:23:55 2001
@@ -1,6 +1,6 @@
/*
* This file contains sleep low-level functions for PowerBook G3.
- * Copyright (C) 1999 Benjamin Herrenschmidt (bh40@calva.net)
+ * Copyright (C) 1999 Benjamin Herrenschmidt (benh@kernel.crashing.org)
* and Paul Mackerras (paulus@cs.anu.edu.au).
*
* This program is free software; you can redistribute it and/or
diff -uNr linux-v2.4.4/arch/ppc/kernel/smp.c rtlinux_kernel_2_4/arch/ppc/kernel/smp.c
--- linux-v2.4.4/arch/ppc/kernel/smp.c Thu Jun 21 17:30:03 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/smp.c Thu Jun 21 17:25:11 2001
@@ -40,6 +40,7 @@
#include <asm/residual.h>
#include <asm/feature.h>
#include <asm/time.h>
+#include <asm/gemini.h>
#include "open_pic.h"
int smp_threads_ready;
@@ -55,7 +56,7 @@
unsigned int prof_counter[NR_CPUS];
cycles_t cacheflush_time;
static int max_cpus __initdata = NR_CPUS;
-
+unsigned long cpu_online_map;
int smp_hw_index[NR_CPUS];
/* all cpu mappings are 1-1 -- Cort */
@@ -628,6 +629,43 @@
do_openpic_setup_cpu();
}
+#ifdef CONFIG_GEMINI
+static int
+smp_gemini_probe(void)
+{
+ int i, nr;
+
+ nr = (readb(GEMINI_CPUSTAT) & GEMINI_CPU_COUNT_MASK) >> 2;
+ if (nr == 0)
+ nr = 4;
+
+ if (nr > 1) {
+ openpic_request_IPIs();
+ for (i = 1; i < nr; ++i)
+ smp_hw_index[i] = i;
+ }
+
+ return nr;
+}
+
+static void
+smp_gemini_kick_cpu(int nr)
+{
+ openpic_init_processor( 1<<i );
+ openpic_init_processor( 0 );
+}
+
+static void
+smp_gemini_setup_cpu(void)
+{
+ if (OpenPIC_Addr)
+ do_openpic_setup_cpu();
+ if (cpu_nr > 0)
+ gemini_init_l2();
+}
+#endif /* CONFIG_GEMINI */
+
+
static struct smp_ops_t {
void (*message_pass)(int target, int msg, unsigned long data, int wait);
int (*probe)(void);
@@ -685,6 +723,16 @@
smp_prep_setup_cpu,
};
+#ifdef CONFIG_GEMINI
+/* Gemini */
+static struct smp_ops_t gemini_smp_ops = {
+ smp_openpic_message_pass,
+ smp_gemini_probe,
+ smp_gemini_kick_cpu,
+ smp_gemini_setup_cpu,
+};
+#endif /* CONFIG_GEMINI */
+
/*
* Common functions
*/
@@ -925,6 +973,11 @@
case _MACH_prep:
smp_ops = &prep_smp_ops;
break;
+#ifdef CONFIG_GEMINI
+ case _MACH_gemini:
+ smp_ops = &gemini_smp_ops;
+ break;
+#endif /* CONFIG_GEMINI */
default:
printk("SMP not supported on this machine.\n");
return;
@@ -946,6 +999,19 @@
/* create a process for the processor */
/* we don't care about the values in regs since we'll
never reschedule the forked task. */
+ /* We DO care about one bit in the pt_regs we
+ pass to do_fork. That is the MSR_FP bit in
+ regs.msr. If that bit is on, then do_fork
+ (via copy_thread) will call giveup_fpu.
+ giveup_fpu will get a pointer to our (current's)
+ last register savearea via current->thread.regs
+ and using that pointer will turn off the MSR_FP,
+ MSR_FE0 and MSR_FE1 bits. At this point, this
+ pointer is pointing to some arbitrary point within
+ our stack. */
+
+ memset(®s, 0, sizeof(struct pt_regs));
+
if (do_fork(CLONE_VM|CLONE_PID, 0, ®s, 0) < 0)
panic("failed fork for CPU %d", i);
p = init_task.prev_task;
@@ -1114,8 +1180,18 @@
init_idle();
+ /*
+ * This cpu is now "online". Only set them online
+ * before they enter the loop below since write access
+ * to the below variable is _not_ guaranteed to be
+ * atomic.
+ * -- Cort <cort@fsmlabs.com>
+ */
+ cpu_online_map |= 1UL << smp_processor_id();
+
while(!smp_commenced)
barrier();
+
/* see smp_commence for more info */
if (!smp_tb_synchronized && smp_num_cpus == 2) {
smp_software_tb_sync(cpu);
diff -uNr linux-v2.4.4/arch/ppc/kernel/time.c rtlinux_kernel_2_4/arch/ppc/kernel/time.c
--- linux-v2.4.4/arch/ppc/kernel/time.c Thu Jun 21 17:28:49 2001
+++ rtlinux_kernel_2_4/arch/ppc/kernel/time.c Thu Jun 21 17:24:06 2001
@@ -144,14 +144,20 @@
int next_dec;
unsigned long cpu = smp_processor_id();
unsigned jiffy_stamp = last_jiffy_stamp(cpu);
+ extern void do_IRQ(struct pt_regs *);
+
+ if (atomic_read(&ppc_n_lost_interrupts) != 0)
+ do_IRQ(regs);
hardirq_enter(cpu);
- if (!user_mode(regs))
- ppc_do_profile(instruction_pointer(regs));
- do {
+ while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) < 0) {
jiffy_stamp += tb_ticks_per_jiffy;
- if (smp_processor_id()) continue;
+ if (!user_mode(regs))
+ ppc_do_profile(instruction_pointer(regs));
+ if (smp_processor_id())
+ continue;
+
/* We are in an interrupt, no need to save/restore flags */
write_lock(&xtime_lock);
tb_last_stamp = jiffy_stamp;
@@ -184,7 +190,7 @@
last_rtc_update += 60;
}
write_unlock(&xtime_lock);
- } while((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) < 0);
+ }
if ( !disarm_decr[smp_processor_id()] )
set_dec(next_dec);
last_jiffy_stamp(cpu) = jiffy_stamp;
diff -uNr linux-v2.4.4/arch/ppc/lib/Makefile rtlinux_kernel_2_4/arch/ppc/lib/Makefile
--- linux-v2.4.4/arch/ppc/lib/Makefile Thu Jun 21 17:31:41 2001
+++ rtlinux_kernel_2_4/arch/ppc/lib/Makefile Thu Jun 21 17:26:59 2001
@@ -2,8 +2,7 @@
# Makefile for ppc-specific library files..
#
-.S.o:
- $(CC) $(AFLAGS) -c $< -o $*.o
+USE_STANDARD_AS_RULE := true
O_TARGET := lib.o
diff -uNr linux-v2.4.4/arch/ppc/mm/init.c rtlinux_kernel_2_4/arch/ppc/mm/init.c
--- linux-v2.4.4/arch/ppc/mm/init.c Thu Jun 21 17:29:16 2001
+++ rtlinux_kernel_2_4/arch/ppc/mm/init.c Thu Jun 21 17:24:30 2001
@@ -46,7 +46,6 @@
#include <asm/mmu_context.h>
#include <asm/pgtable.h>
#include <asm/mmu.h>
-#include <asm/residual.h>
#include <asm/uaccess.h>
#ifdef CONFIG_8xx
#include <asm/8xx_immap.h>
@@ -61,6 +60,7 @@
#include <asm/machdep.h>
#include <asm/setup.h>
#include <asm/amigahw.h>
+#include <asm/gemini.h>
#include "mem_pieces.h"
@@ -93,7 +93,6 @@
extern char __pmac_begin, __pmac_end;
extern char __apus_begin, __apus_end;
extern char __openfirmware_begin, __openfirmware_end;
-struct device_node *memory_node;
unsigned long ioremap_base;
unsigned long ioremap_bot;
unsigned long avail_start;
@@ -111,19 +110,6 @@
void MMU_init(void);
void *early_get_page(void);
-unsigned long prep_find_end_of_memory(void);
-unsigned long pmac_find_end_of_memory(void);
-unsigned long apus_find_end_of_memory(void);
-extern unsigned long find_end_of_memory(void);
-#ifdef CONFIG_8xx
-unsigned long m8xx_find_end_of_memory(void);
-#endif /* CONFIG_8xx */
-#ifdef CONFIG_4xx
-unsigned long oak_find_end_of_memory(void);
-#endif
-#ifdef CONFIG_8260
-unsigned long m8260_find_end_of_memory(void);
-#endif /* CONFIG_8260 */
static void mapin_ram(void);
int map_page(unsigned long va, unsigned long pa, int flags);
void set_phys_avail(unsigned long total_ram);
@@ -436,11 +422,9 @@
* Should check if it is a candidate for a BAT mapping
*/
- spin_lock(&init_mm.page_table_lock);
err = 0;
for (i = 0; i < size && err == 0; i += PAGE_SIZE)
err = map_page(v+i, p+i, flags);
- spin_unlock(&init_mm.page_table_lock);
if (err) {
if (mem_init_done)
vfree((void *)v);
@@ -487,17 +471,21 @@
{
pmd_t *pd;
pte_t *pg;
+ int err = -ENOMEM;
+ spin_lock(&init_mm.page_table_lock);
/* Use upper 10 bits of VA to index the first level map */
pd = pmd_offset(pgd_offset_k(va), va);
/* Use middle 10 bits of VA to index the second-level map */
pg = pte_alloc(&init_mm, pd, va);
- if (pg == 0)
- return -ENOMEM;
- set_pte(pg, mk_pte_phys(pa & PAGE_MASK, __pgprot(flags)));
- if (mem_init_done)
- flush_hash_page(0, va);
- return 0;
+ if (pg != 0) {
+ err = 0;
+ set_pte(pg, mk_pte_phys(pa & PAGE_MASK, __pgprot(flags)));
+ if (mem_init_done)
+ flush_hash_page(0, va);
+ }
+ spin_unlock(&init_mm.page_table_lock);
+ return err;
}
#ifndef CONFIG_8xx
@@ -668,33 +656,6 @@
}
#if !defined(CONFIG_4xx) && !defined(CONFIG_8xx)
-static void get_mem_prop(char *, struct mem_pieces *);
-
-#if defined(CONFIG_ALL_PPC)
-/*
- * Read in a property describing some pieces of memory.
- */
-
-static void __init get_mem_prop(char *name, struct mem_pieces *mp)
-{
- struct reg_property *rp;
- int s;
-
- rp = (struct reg_property *) get_property(memory_node, name, &s);
- if (rp == NULL) {
- printk(KERN_ERR "error: couldn't get %s property on /memory\n",
- name);
- abort();
- }
- mp->n_regions = s / sizeof(mp->regions[0]);
- memcpy(mp->regions, rp, s);
-
- /* Make sure the pieces are sorted. */
- mem_pieces_sort(mp);
- mem_pieces_coalesce(mp);
-}
-#endif /* CONFIG_ALL_PPC */
-
/*
* Set up one of the I/D BAT (block address translation) register pairs.
* The parameters are not checked; in particular size must be a power
@@ -877,14 +838,13 @@
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
- printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
-
for (; start < end; start += PAGE_SIZE) {
ClearPageReserved(virt_to_page(start));
set_page_count(virt_to_page(start), 1);
free_page(start);
totalram_pages++;
}
+ printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
}
#endif
@@ -904,27 +864,28 @@
/*
* The Zone Protection Register (ZPR) defines how protection will
* be applied to every page which is a member of a given zone. At
- * present, we utilize only two of the 4xx's zones. The first, zone
- * 0, is set at '00b and only allows access in supervisor-mode based
- * on the EX and WR bits. No user-mode access is allowed. The second,
- * zone 1, is set at '10b and in supervisor-mode allows access
- * without regard to the EX and WR bits. In user-mode, access is
- * allowed based on the EX and WR bits.
+ * present, we utilize only two of the 4xx's zones.
+ * The zone index bits (of ZSEL) in the PTE are used for software
+ * indicators, except the LSB. For user access, zone 15 is used,
+ * for kernel access, zone 14 is used. We set all but zone 15
+ * to zero, allowing only kernel access as indicated in the PTE.
+ * For zone 15, we set a 10 binary (I guess a 01 would work too)
+ * to allow user access as indicated in the PTE. This also allows
+ * kernel access as indicated in the PTE.
*/
- mtspr(SPRN_ZPR, 0x2aaaaaaa);
-
- /* Hardwire any TLB entries necessary here. */
+ mtspr(SPRN_ZPR, 0x00000002);
- PPC4xx_tlb_pin(KERNELBASE, 0, TLB_PAGESZ(PAGESZ_16M), 1);
+ flush_instruction_cache();
/*
* Find the top of physical memory and map all of it in starting
* at KERNELBASE.
*/
- total_memory = total_lowmem = oak_find_end_of_memory();
- end_of_DRAM = __va(total_memory);
+ total_memory = total_lowmem = ppc_md.find_end_of_memory();
+ end_of_DRAM = __va(total_lowmem);
+ set_phys_avail(total_lowmem);
mapin_ram();
/*
@@ -943,70 +904,13 @@
mtspr(SPRN_ICCR, 0x80000000); /* 128 MB of instr. space at 0x0. */
}
-#elif defined(CONFIG_8xx)
+#else /* !CONFIG_4xx */
void __init MMU_init(void)
{
if ( ppc_md.progress ) ppc_md.progress("MMU:enter", 0x111);
- total_memory = total_lowmem = m8xx_find_end_of_memory();
-#ifdef CONFIG_HIGHMEM
- if (total_lowmem > MAX_LOW_MEM) {
- total_lowmem = MAX_LOW_MEM;
- mem_pieces_remove(&phys_avail, total_lowmem,
- total_memory - total_lowmem, 0);
- }
-#endif /* CONFIG_HIGHMEM */
- end_of_DRAM = __va(total_lowmem);
- set_phys_avail(total_lowmem);
-
- /* Map in all of RAM starting at KERNELBASE */
- mapin_ram();
+ total_memory = ppc_md.find_end_of_memory();
- /* Now map in some of the I/O space that is generically needed
- * or shared with multiple devices.
- * All of this fits into the same 4Mbyte region, so it only
- * requires one page table page.
- */
- ioremap(IMAP_ADDR, IMAP_SIZE);
-#ifdef CONFIG_MBX
- ioremap(NVRAM_ADDR, NVRAM_SIZE);
- ioremap(MBX_CSR_ADDR, MBX_CSR_SIZE);
- ioremap(PCI_CSR_ADDR, PCI_CSR_SIZE);
-
- /* Map some of the PCI/ISA I/O space to get the IDE interface.
- */
- ioremap(PCI_ISA_IO_ADDR, 0x4000);
- ioremap(PCI_IDE_ADDR, 0x4000);
-#endif
-#ifdef CONFIG_RPXLITE
- ioremap(RPX_CSR_ADDR, RPX_CSR_SIZE);
- ioremap(HIOX_CSR_ADDR, HIOX_CSR_SIZE);
-#endif
-#ifdef CONFIG_RPXCLASSIC
- ioremap(PCI_CSR_ADDR, PCI_CSR_SIZE);
- ioremap(RPX_CSR_ADDR, RPX_CSR_SIZE);
-#endif
- if ( ppc_md.progress ) ppc_md.progress("MMU:exit", 0x211);
-}
-
-#else /* not 4xx or 8xx */
-void __init MMU_init(void)
-{
- if ( ppc_md.progress ) ppc_md.progress("MMU:enter", 0x111);
-
- if (have_of)
- total_memory = pmac_find_end_of_memory();
-#ifdef CONFIG_APUS
- else if (_machine == _MACH_apus )
- total_memory = apus_find_end_of_memory();
-#endif
-#if defined(CONFIG_8260)
- else
- total_memory = m8260_find_end_of_memory();
-#else
- else /* prep */
- total_memory = prep_find_end_of_memory();
-#endif
if (__max_memory && total_memory > __max_memory)
total_memory = __max_memory;
total_lowmem = total_memory;
@@ -1019,6 +923,7 @@
end_of_DRAM = __va(total_lowmem);
set_phys_avail(total_lowmem);
+#if !defined(CONFIG_8xx)
if ( ppc_md.progress ) ppc_md.progress("MMU:hash init", 0x300);
hash_init();
#ifndef CONFIG_PPC64BRIDGE
@@ -1026,16 +931,49 @@
#endif
ioremap_base = 0xf8000000;
+#endif /* CONFIG_8xx */
if ( ppc_md.progress ) ppc_md.progress("MMU:mapin", 0x301);
/* Map in all of RAM starting at KERNELBASE */
mapin_ram();
-#ifdef CONFIG_POWER4
+#if defined(CONFIG_POWER4)
ioremap_base = ioremap_bot = 0xfffff000;
isa_io_base = (unsigned long) ioremap(0xffd00000, 0x200000) + 0x100000;
-#else /* CONFIG_POWER4 */
+#elif defined(CONFIG_8xx)
+ /* Now map in some of the I/O space that is generically needed
+ * or shared with multiple devices.
+ * All of this fits into the same 4Mbyte region, so it only
+ * requires one page table page.
+ */
+ ioremap(IMAP_ADDR, IMAP_SIZE);
+#ifdef CONFIG_MBX
+ ioremap(NVRAM_ADDR, NVRAM_SIZE);
+ ioremap(MBX_CSR_ADDR, MBX_CSR_SIZE);
+ ioremap(PCI_CSR_ADDR, PCI_CSR_SIZE);
+
+ /* Map some of the PCI/ISA I/O space to get the IDE interface.
+ */
+ ioremap(PCI_ISA_IO_ADDR, 0x4000);
+ ioremap(PCI_IDE_ADDR, 0x4000);
+#endif
+#if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC)
+ ioremap(RPX_CSR_ADDR, RPX_CSR_SIZE);
+#if !defined(CONFIG_PCI)
+ ioremap(_IO_BASE,_IO_BASE_SIZE);
+#endif
+#endif
+#ifdef CONFIG_HTDMSOUND
+ ioremap(HIOX_CSR_ADDR, HIOX_CSR_SIZE);
+#endif
+#ifdef CONFIG_FADS
+ ioremap(BCSR_ADDR, BCSR_SIZE);
+#endif
+#ifdef CONFIG_PCI
+ ioremap(PCI_CSR_ADDR, PCI_CSR_SIZE);
+#endif
+#else /* !CONFIG_POWER4 && !CONFIG_8xx */
/*
* Setup the bat mappings we're going to load that cover
* the io areas. RAM was mapped by mapin_ram().
@@ -1069,6 +1007,10 @@
/* Map chip and ZorroII memory */
setbat(1, zTwoBase, 0x00000000, 0x01000000, IO_PAGE);
break;
+ case _MACH_gemini:
+ setbat(0, 0xf0000000, 0xf0000000, 0x10000000, IO_PAGE);
+ setbat(1, 0x80000000, 0x80000000, 0x10000000, IO_PAGE);
+ break;
case _MACH_8260:
/* Map the IMMR, plus anything else we can cover
* in that upper space according to the memory controller
@@ -1081,7 +1023,7 @@
break;
}
ioremap_bot = ioremap_base;
-#endif /* CONFIG_POWER4 */
+#endif /* CONFIG_POWER4 || CONFIG_8xx */
if ( ppc_md.progress ) ppc_md.progress("MMU:exit", 0x211);
#ifdef CONFIG_BOOTX_TEXT
@@ -1257,155 +1199,6 @@
}
#if !defined(CONFIG_4xx) && !defined(CONFIG_8xx)
-#if defined(CONFIG_ALL_PPC)
-/*
- * On systems with Open Firmware, collect information about
- * physical RAM and which pieces are already in use.
- * At this point, we have (at least) the first 8MB mapped with a BAT.
- * Our text, data, bss use something over 1MB, starting at 0.
- * Open Firmware may be using 1MB at the 4MB point.
- */
-unsigned long __init pmac_find_end_of_memory(void)
-{
- unsigned long a, total;
- struct mem_pieces phys_mem;
-
- memory_node = find_devices("memory");
- if (memory_node == NULL) {
- printk(KERN_ERR "can't find memory node\n");
- abort();
- }
-
- /*
- * Find out where physical memory is, and check that it
- * starts at 0 and is contiguous. It seems that RAM is
- * always physically contiguous on Power Macintoshes.
- *
- * Supporting discontiguous physical memory isn't hard,
- * it just makes the virtual <-> physical mapping functions
- * more complicated (or else you end up wasting space
- * in mem_map).
- */
- get_mem_prop("reg", &phys_mem);
- if (phys_mem.n_regions == 0)
- panic("No RAM??");
- a = phys_mem.regions[0].address;
- if (a != 0)
- panic("RAM doesn't start at physical address 0");
- total = phys_mem.regions[0].size;
-
- if (phys_mem.n_regions > 1) {
- printk("RAM starting at 0x%x is not contiguous\n",
- phys_mem.regions[1].address);
- printk("Using RAM from 0 to 0x%lx\n", total-1);
- }
-
- return total;
-}
-#endif /* CONFIG_ALL_PPC */
-
-#if defined(CONFIG_ALL_PPC)
-/*
- * This finds the amount of physical ram and does necessary
- * setup for prep. This is pretty architecture specific so
- * this will likely stay separate from the pmac.
- * -- Cort
- */
-unsigned long __init prep_find_end_of_memory(void)
-{
- unsigned long total;
-#ifdef CONFIG_PREP_RESIDUAL
- total = res->TotalMemory;
-#else
- total = 0;
-#endif
-
- if (total == 0 )
- {
- /*
- * I need a way to probe the amount of memory if the residual
- * data doesn't contain it. -- Cort
- */
- printk("Ramsize from residual data was 0 -- Probing for value\n");
- total = 0x02000000;
- printk("Ramsize default to be %ldM\n", total>>20);
- }
-
- return (total);
-}
-#endif /* defined(CONFIG_ALL_PPC) */
-
-#ifdef CONFIG_8260
-/*
- * Same hack as 8xx.
- */
-unsigned long __init m8260_find_end_of_memory(void)
-{
- bd_t *binfo;
- extern unsigned char __res[];
-
- binfo = (bd_t *)__res;
-
- return binfo->bi_memsize;
-}
-#endif /* CONFIG_8260 */
-
-#ifdef CONFIG_APUS
-#define HARDWARE_MAPPED_SIZE (512*1024)
-unsigned long __init apus_find_end_of_memory(void)
-{
- int shadow = 0;
- unsigned long total;
-
- /* The memory size reported by ADOS excludes the 512KB
- reserved for PPC exception registers and possibly 512KB
- containing a shadow of the ADOS ROM. */
- {
- unsigned long size = memory[0].size;
-
- /* If 2MB aligned, size was probably user
- specified. We can't tell anything about shadowing
- in this case so skip shadow assignment. */
- if (0 != (size & 0x1fffff)){
- /* Align to 512KB to ensure correct handling
- of both memfile and system specified
- sizes. */
- size = ((size+0x0007ffff) & 0xfff80000);
- /* If memory is 1MB aligned, assume
- shadowing. */
- shadow = !(size & 0x80000);
- }
-
- /* Add the chunk that ADOS does not see. by aligning
- the size to the nearest 2MB limit upwards. */
- memory[0].size = ((size+0x001fffff) & 0xffe00000);
- }
-
- total = memory[0].size;
-
- /* Remove the memory chunks that are controlled by special
- Phase5 hardware. */
-
- /* Remove the upper 512KB if it contains a shadow of
- the ADOS ROM. FIXME: It might be possible to
- disable this shadow HW. Check the booter
- (ppc_boot.c) */
- if (shadow)
- total -= HARDWARE_MAPPED_SIZE;
-
- /* Remove the upper 512KB where the PPC exception
- vectors are mapped. */
- total -= HARDWARE_MAPPED_SIZE;
-
- /* Linux/APUS only handles one block of memory -- the one on
- the PowerUP board. Other system memory is horrible slow in
- comparison. The user can use other memory for swapping
- using the z2ram device. */
- ram_phys_base = memory[0].addr;
- return total;
-}
-#endif /* CONFIG_APUS */
-
/*
* Initialize the hash table and patch the instructions in head.S.
*/
@@ -1514,43 +1307,7 @@
}
if ( ppc_md.progress ) ppc_md.progress("hash:done", 0x205);
}
-#elif defined(CONFIG_8xx)
-/*
- * This is a big hack right now, but it may turn into something real
- * someday.
- *
- * For the 8xx boards (at this time anyway), there is nothing to initialize
- * associated the PROM. Rather than include all of the prom.c
- * functions in the image just to get prom_init, all we really need right
- * now is the initialization of the physical memory region.
- */
-unsigned long __init m8xx_find_end_of_memory(void)
-{
- bd_t *binfo;
- extern unsigned char __res[];
-
- binfo = (bd_t *)__res;
-
- return binfo->bi_memsize;
-}
#endif /* !CONFIG_4xx && !CONFIG_8xx */
-
-#ifdef CONFIG_OAK
-/*
- * Return the virtual address representing the top of physical RAM
- * on the Oak board.
- */
-unsigned long __init
-oak_find_end_of_memory(void)
-{
- extern unsigned char __res[];
-
- unsigned long *ret;
- bd_t *bip = (bd_t *)__res;
-
- return bip->bi_memsize;
-}
-#endif
/*
* Set phys_avail to the amount of physical memory,
diff -uNr linux-v2.4.4/arch/ppc/xmon/start.c rtlinux_kernel_2_4/arch/ppc/xmon/start.c
--- linux-v2.4.4/arch/ppc/xmon/start.c Thu Jun 21 17:30:05 2001
+++ rtlinux_kernel_2_4/arch/ppc/xmon/start.c Thu Jun 21 17:25:15 2001
@@ -61,27 +61,37 @@
struct device_node *np;
unsigned long addr;
#ifdef CONFIG_BOOTX_TEXT
- extern boot_infos_t *disp_bi;
+ if (!machine_is_compatible("iMac")) {
+ extern boot_infos_t *disp_bi;
- /* see if there is a keyboard in the device tree
- with a parent of type "adb" */
- for (np = find_devices("keyboard"); np; np = np->next)
- if (np->parent && np->parent->type
- && strcmp(np->parent->type, "adb") == 0)
- break;
+ /* see if there is a keyboard in the device tree
+ with a parent of type "adb" */
+ for (np = find_devices("keyboard"); np; np = np->next)
+ if (np->parent && np->parent->type
+ && strcmp(np->parent->type, "adb") == 0)
+ break;
- /* needs to be hacked if xmon_printk is to be used
- from within find_via_pmu() */
+ /* needs to be hacked if xmon_printk is to be used
+ from within find_via_pmu() */
#ifdef CONFIG_ADB_PMU
- if (np != NULL && disp_bi && find_via_pmu())
- use_screen = 1;
+ if (np != NULL && disp_bi && find_via_pmu())
+ use_screen = 1;
#endif
#ifdef CONFIG_ADB_CUDA
- if (np != NULL && disp_bi && find_via_cuda())
- use_screen = 1;
+ if (np != NULL && disp_bi && find_via_cuda())
+ use_screen = 1;
#endif
+ }
+ prom_drawstring("xmon uses ");
if (use_screen)
- prom_drawstring("xmon uses screen and keyboard\n");
+ prom_drawstring("screen and keyboard\n");
+ else {
+ if (via_modem)
+ prom_drawstring("modem on ");
+ prom_drawstring(xmon_use_sccb? "printer": "modem");
+ prom_drawstring(" port\n");
+ }
+
#endif /* CONFIG_BOOTX_TEXT */
#ifdef CHRP_ESCC
@@ -100,6 +110,15 @@
base = (volatile unsigned char *) ioremap(addr & PAGE_MASK, PAGE_SIZE);
sccc = base + (addr & ~PAGE_MASK);
sccd = sccc + 0x10;
+ }
+ else if ( _machine & _MACH_gemini )
+ {
+ /* should already be mapped by the kernel boot */
+ sccc = (volatile unsigned char *) 0xffeffb0d;
+ sccd = (volatile unsigned char *) 0xffeffb08;
+ TXRDY = 0x20;
+ RXRDY = 1;
+ console = 1;
}
else
{
diff -uNr linux-v2.4.4/arch/ppc/xmon/start_8xx.c rtlinux_kernel_2_4/arch/ppc/xmon/start_8xx.c
--- linux-v2.4.4/arch/ppc/xmon/start_8xx.c Thu Jun 21 17:31:48 2001
+++ rtlinux_kernel_2_4/arch/ppc/xmon/start_8xx.c Thu Jun 21 17:27:08 2001
@@ -15,7 +15,7 @@
#include <asm/processor.h>
#include <asm/8xx_immap.h>
#include <asm/mpc8xx.h>
-#include "commproc.h"
+#include "../8xx_io/commproc.h"
extern void xmon_printf(const char *fmt, ...);
extern int xmon_8xx_write(char *str, int nb);
diff -uNr linux-v2.4.4/arch/ppc/xmon/xmon.c rtlinux_kernel_2_4/arch/ppc/xmon/xmon.c
--- linux-v2.4.4/arch/ppc/xmon/xmon.c Thu Jun 21 17:28:52 2001
+++ rtlinux_kernel_2_4/arch/ppc/xmon/xmon.c Thu Jun 21 17:24:08 2001
@@ -208,10 +208,11 @@
xmon_irq(int irq, void *d, struct pt_regs *regs)
{
unsigned long flags;
- save_flags(flags);cli();
+ __save_flags(flags);
+ __cli();
printf("Keyboard interrupt\n");
xmon(regs);
- restore_flags(flags);
+ __restore_flags(flags);
}
int
@@ -657,7 +658,7 @@
unsigned stack[2];
struct pt_regs regs;
extern char ret_from_intercept, ret_from_syscall_1, ret_from_syscall_2;
- extern char lost_irq_ret, do_bottom_half_ret, do_signal_ret;
+ extern char do_bottom_half_ret, do_signal_ret;
extern char ret_from_except;
printf("backtrace:\n");
@@ -676,7 +677,6 @@
|| stack[1] == (unsigned) &ret_from_except
|| stack[1] == (unsigned) &ret_from_syscall_1
|| stack[1] == (unsigned) &ret_from_syscall_2
- || stack[1] == (unsigned) &lost_irq_ret
|| stack[1] == (unsigned) &do_bottom_half_ret
|| stack[1] == (unsigned) &do_signal_ret) {
if (mread(sp+16, ®s, sizeof(regs)) != sizeof(regs))
diff -uNr linux-v2.4.4/drivers/acpi/include/acgcc.h rtlinux_kernel_2_4/drivers/acpi/include/acgcc.h
--- linux-v2.4.4/drivers/acpi/include/acgcc.h Thu Jun 21 17:28:46 2001
+++ rtlinux_kernel_2_4/drivers/acpi/include/acgcc.h Thu Jun 21 17:24:04 2001
@@ -100,7 +100,7 @@
#define BREAKPOINT3
#define disable() __cli()
#define enable() __sti()
-#define halt() __asm__ __volatile__ ("sti; hlt":::"memory")
+#define halt() safe_halt()
#define wbinvd()
/*! [Begin] no source code translation
diff -uNr linux-v2.4.4/drivers/block/swim3.c rtlinux_kernel_2_4/drivers/block/swim3.c
--- linux-v2.4.4/drivers/block/swim3.c Thu Jun 21 17:30:06 2001
+++ rtlinux_kernel_2_4/drivers/block/swim3.c Thu Jun 21 17:25:16 2001
@@ -248,10 +248,7 @@
int swim3_init(void);
#ifndef CONFIG_PMAC_PBOOK
-static inline int check_media_bay(struct device_node *which_bay, int what)
-{
- return 1;
-}
+#define check_media_bay(which, what) 1
#endif
static void swim3_select(struct floppy_state *fs, int sel)
diff -uNr linux-v2.4.4/drivers/char/keyboard.c rtlinux_kernel_2_4/drivers/char/keyboard.c
--- linux-v2.4.4/drivers/char/keyboard.c Thu Jun 21 17:28:55 2001
+++ rtlinux_kernel_2_4/drivers/char/keyboard.c Thu Jun 21 17:24:11 2001
@@ -322,7 +322,7 @@
compute_shiftstate();
kbd->slockstate = 0; /* play it safe */
#else
- keysym = U(plain_map[keycode]);
+ keysym = U(key_maps[0][keycode]);
type = KTYP(keysym);
if (type == KT_SHIFT)
(*key_handler[type])(keysym & 0xff, up_flag);
@@ -750,7 +750,7 @@
k = i*BITS_PER_LONG;
for(j=0; j<BITS_PER_LONG; j++,k++)
if(test_bit(k, key_down)) {
- sym = U(plain_map[k]);
+ sym = U(key_maps[0][k]);
if(KTYP(sym) == KT_SHIFT || KTYP(sym) == KT_SLOCK) {
val = KVAL(sym);
if (val == KVAL(K_CAPSSHIFT))
diff -uNr linux-v2.4.4/drivers/char/serial.c rtlinux_kernel_2_4/drivers/char/serial.c
--- linux-v2.4.4/drivers/char/serial.c Thu Jun 21 17:30:12 2001
+++ rtlinux_kernel_2_4/drivers/char/serial.c Thu Jun 21 17:25:22 2001
@@ -5221,6 +5221,7 @@
#endif
serial_driver.major = TTY_MAJOR;
serial_driver.minor_start = 64 + SERIAL_DEV_OFFSET;
+ serial_driver.name_base = SERIAL_DEV_OFFSET;
serial_driver.num = NR_PORTS;
serial_driver.type = TTY_DRIVER_TYPE_SERIAL;
serial_driver.subtype = SERIAL_TYPE_NORMAL;
diff -uNr linux-v2.4.4/drivers/char/tty_io.c rtlinux_kernel_2_4/drivers/char/tty_io.c
--- linux-v2.4.4/drivers/char/tty_io.c Thu Jun 21 17:28:18 2001
+++ rtlinux_kernel_2_4/drivers/char/tty_io.c Thu Jun 21 17:23:40 2001
@@ -148,6 +148,7 @@
extern long serial167_console_init(void);
extern void console_8xx_init(void);
extern int rs_8xx_init(void);
+extern void mac_scc_console_init(void);
extern void hwc_console_init(void);
extern void hwc_tty_init(void);
extern void con3215_init(void);
@@ -2184,6 +2185,8 @@
#ifdef CONFIG_SERIAL_CONSOLE
#if (defined(CONFIG_8xx) || defined(CONFIG_8260))
console_8xx_init();
+#elif defined(CONFIG_MAC_SERIAL)
+ mac_scc_console_init();
#elif defined(CONFIG_SERIAL)
serial_console_init();
#endif /* CONFIG_8xx */
diff -uNr linux-v2.4.4/drivers/ide/ide-features.c rtlinux_kernel_2_4/drivers/ide/ide-features.c
--- linux-v2.4.4/drivers/ide/ide-features.c Thu Jun 21 17:28:33 2001
+++ rtlinux_kernel_2_4/drivers/ide/ide-features.c Thu Jun 21 17:23:53 2001
@@ -287,7 +287,11 @@
#if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI)
byte unit = (drive->select.b.unit & 0x01);
- outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)), hwif->dma_base+2);
+ /* Some interfaces would like to use this routine, but don"t have this
+ * kind of DMA engine. --BenH.
+ */
+ if (hwif->dma_base)
+ outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)), hwif->dma_base+2);
#endif /* (CONFIG_BLK_DEV_IDEDMA) && !(CONFIG_DMA_NONPCI) */
/*
@@ -356,10 +360,15 @@
drive->id->dma_1word &= ~0x0F00;
#if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI)
- if (speed > XFER_PIO_4) {
- outb(inb(hwif->dma_base+2)|(1<<(5+unit)), hwif->dma_base+2);
- } else {
- outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)), hwif->dma_base+2);
+ /* Some interfaces would like to use this routine, but don"t have this
+ * kind of DMA engine. --BenH.
+ */
+ if (hwif->dma_base) {
+ if (speed > XFER_PIO_4) {
+ outb(inb(hwif->dma_base+2)|(1<<(5+unit)), hwif->dma_base+2);
+ } else {
+ outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)), hwif->dma_base+2);
+ }
}
#endif /* (CONFIG_BLK_DEV_IDEDMA) && !(CONFIG_DMA_NONPCI) */
diff -uNr linux-v2.4.4/drivers/macintosh/mac_hid.c rtlinux_kernel_2_4/drivers/macintosh/mac_hid.c
--- linux-v2.4.4/drivers/macintosh/mac_hid.c Thu Jun 21 17:28:53 2001
+++ rtlinux_kernel_2_4/drivers/macintosh/mac_hid.c Thu Jun 21 17:24:08 2001
@@ -15,6 +15,7 @@
#include <linux/proc_fs.h>
#include <linux/sysctl.h>
#include <linux/input.h>
+#include <linux/module.h>
#ifdef CONFIG_MAC_ADBKEYCODES
#include <linux/keyboard.h>
@@ -401,6 +402,8 @@
return keyboard_sends_linux_keycodes;
}
+EXPORT_SYMBOL(mac_hid_keyboard_sends_linux_keycodes);
+
static int __init mac_hid_setup(char *str)
{
int ints[2];
@@ -448,6 +451,8 @@
return 0;
}
+EXPORT_SYMBOL(mac_hid_mouse_emulate_buttons);
+
static void emumousebtn_input_register(void)
{
emumousebtn.name = "Macintosh mouse button emulation";
@@ -473,9 +478,19 @@
#ifdef CONFIG_MAC_ADBKEYCODES
memcpy(pc_key_maps_save, key_maps, sizeof(key_maps));
- if (!keyboard_sends_linux_keycodes)
+ if (!keyboard_sends_linux_keycodes) {
+#ifdef CONFIG_MAGIC_SYSRQ
+ ppc_md.ppc_kbd_sysrq_xlate = mac_hid_kbd_sysrq_xlate;
+ SYSRQ_KEY = 0x69;
+#endif
memcpy(key_maps, mac_key_maps_save, sizeof(key_maps));
+ } else {
+#ifdef CONFIG_MAGIC_SYSRQ
+ ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate;
+ SYSRQ_KEY = 0x54;
#endif
+ }
+#endif /* CONFIG_MAC_ADBKEYCODES */
#ifdef CONFIG_MAC_EMUMOUSEBTN
emumousebtn_input_register();
diff -uNr linux-v2.4.4/drivers/macintosh/mac_keyb.c rtlinux_kernel_2_4/drivers/macintosh/mac_keyb.c
--- linux-v2.4.4/drivers/macintosh/mac_keyb.c Thu Jun 21 17:31:25 2001
+++ rtlinux_kernel_2_4/drivers/macintosh/mac_keyb.c Thu Jun 21 17:26:26 2001
@@ -305,7 +305,7 @@
return 1;
}
-int mackbd_unexpected_up(unsigned char keycode)
+char mackbd_unexpected_up(unsigned char keycode)
{
return 0x80;
}
diff -uNr linux-v2.4.4/drivers/macintosh/macserial.c rtlinux_kernel_2_4/drivers/macintosh/macserial.c
--- linux-v2.4.4/drivers/macintosh/macserial.c Thu Jun 21 17:32:43 2001
+++ rtlinux_kernel_2_4/drivers/macintosh/macserial.c Thu Jun 21 17:29:01 2001
@@ -448,7 +448,7 @@
goto out;
info->tx_active = 0;
- if (info->x_char) {
+ if (info->x_char && !info->power_wait) {
/* Send next char */
write_zsdata(info->zs_channel, info->x_char);
info->x_char = 0;
@@ -456,7 +456,8 @@
goto out;
}
- if ((info->xmit_cnt <= 0) || info->tty->stopped || info->tx_stopped) {
+ if ((info->xmit_cnt <= 0) || info->tty->stopped || info->tx_stopped
+ || info->power_wait) {
write_zsreg(info->zs_channel, 0, RES_Tx_P);
goto out;
}
@@ -474,6 +475,14 @@
restore_flags(flags);
}
+static void powerup_done(unsigned long data)
+{
+ struct mac_serial *info = (struct mac_serial *) data;
+
+ info->power_wait = 0;
+ transmit_chars(info);
+}
+
static _INLINE_ void status_handle(struct mac_serial *info)
{
unsigned char status;
@@ -730,7 +739,7 @@
}
}
-static int startup(struct mac_serial * info, int can_sleep)
+static int startup(struct mac_serial * info)
{
int delay;
@@ -753,6 +762,18 @@
setup_scc(info);
+ if (delay) {
+ unsigned long flags;
+
+ /* delay is in ms */
+ save_flags(flags);
+ cli();
+ info->power_wait = 1;
+ mod_timer(&info->powerup_timer,
+ jiffies + (delay * HZ + 999) / 1000);
+ restore_flags(flags);
+ }
+
OPNDBG("enabling IRQ on ttyS%d (irq %d)...\n", info->line, info->irq);
info->flags |= ZILOG_INITIALIZED;
@@ -761,15 +782,6 @@
enable_irq(info->rx_dma_irq);
}
- if (delay) {
- if (can_sleep) {
- /* we need to wait a bit before using the port */
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(delay * HZ / 1000);
- } else
- mdelay(delay);
- }
-
return 0;
}
@@ -863,7 +875,7 @@
queue_task(&tty->flip.tqueue, &tq_timer);
}
-static void poll_rxdma(void *private_)
+static void poll_rxdma(unsigned long private_)
{
struct mac_serial *info = (struct mac_serial *) private_;
unsigned long flags;
@@ -2325,7 +2337,7 @@
* Start up serial port
*/
- retval = startup(info, 1);
+ retval = startup(info);
if (retval)
return retval;
@@ -2426,6 +2438,10 @@
zss->rx_dma_irq = ch->intrs[2].line;
spin_lock_init(&zss->rx_dma_lock);
}
+
+ init_timer(&zss->powerup_timer);
+ zss->powerup_timer.function = powerup_done;
+ zss->powerup_timer.data = (unsigned long) zss;
}
/* Ask the PROM how many Z8530s we have and initialize their zs_channels */
@@ -3119,7 +3135,7 @@
struct mac_serial *info = &zs_soft[i];
if (info->flags & ZILOG_SLEEPING) {
info->flags &= ~ZILOG_SLEEPING;
- startup(info, 0);
+ startup(info);
}
}
break;
diff -uNr linux-v2.4.4/drivers/macintosh/macserial.h rtlinux_kernel_2_4/drivers/macintosh/macserial.h
--- linux-v2.4.4/drivers/macintosh/macserial.h Thu Jun 21 17:33:45 2001
+++ rtlinux_kernel_2_4/drivers/macintosh/macserial.h Thu Jun 21 17:31:22 2001
@@ -115,6 +115,7 @@
char is_irda; /* is connected to an IrDA codec */
unsigned char tx_active; /* character is being xmitted */
unsigned char tx_stopped; /* output is suspended */
+ unsigned char power_wait; /* waiting for power-up delay to expire */
/* We need to know the current clock divisor
* to read the bps rate the chip has currently
@@ -186,6 +187,8 @@
void *dma_priv;
struct timer_list poll_dma_timer;
#define RX_DMA_TIMER (jiffies + 10*HZ/1000)
+
+ struct timer_list powerup_timer;
};
diff -uNr linux-v2.4.4/drivers/net/bmac.c rtlinux_kernel_2_4/drivers/net/bmac.c
--- linux-v2.4.4/drivers/net/bmac.c Thu Jun 21 17:31:07 2001
+++ rtlinux_kernel_2_4/drivers/net/bmac.c Thu Jun 21 17:26:08 2001
@@ -76,9 +76,6 @@
struct net_device_stats stats;
struct timer_list tx_timeout;
int timeout_active;
- int reset_and_enabled;
- int rx_allocated;
- int tx_allocated;
unsigned short hash_use_count[64];
unsigned short hash_table_mask[4];
struct net_device *next_bmac;
@@ -126,6 +123,7 @@
};
static struct net_device *bmac_devs;
+static unsigned char *bmac_emergency_rxbuf;
#ifdef CONFIG_PMAC_PBOOK
static int bmac_sleep_notify(struct pmu_sleep_notifier *self, int when);
@@ -151,9 +149,9 @@
static int bmac_transmit_packet(struct sk_buff *skb, struct net_device *dev);
static struct net_device_stats *bmac_stats(struct net_device *dev);
static void bmac_set_multicast(struct net_device *dev);
-static int bmac_reset_and_enable(struct net_device *dev, int enable);
+static void bmac_reset_and_enable(struct net_device *dev);
static void bmac_start_chip(struct net_device *dev);
-static int bmac_init_chip(struct net_device *dev);
+static void bmac_init_chip(struct net_device *dev);
static void bmac_init_registers(struct net_device *dev);
static void bmac_reset_chip(struct net_device *dev);
static int bmac_set_address(struct net_device *dev, void *addr);
@@ -185,17 +183,6 @@
}
static void
-dbdma_stop(volatile struct dbdma_regs *dmap)
-{
- dbdma_st32((volatile unsigned long *)&dmap->control,
- DBDMA_CLEAR(RUN) | DBDMA_SET(FLUSH));
- eieio();
-
- while (dbdma_ld32((volatile unsigned long *)&dmap->status) & (ACTIVE|FLUSH))
- eieio();
-}
-
-static void
dbdma_continue(volatile struct dbdma_regs *dmap)
{
dbdma_st32((volatile unsigned long *)&dmap->control,
@@ -467,12 +454,11 @@
}
}
-static int
+static void
bmac_init_chip(struct net_device *dev)
{
bmac_init_phy(dev);
bmac_init_registers(dev);
- return 1;
}
#ifdef CONFIG_PMAC_PBOOK
@@ -503,7 +489,7 @@
break;
case PBOOK_WAKE:
/* see if this is enough */
- bmac_reset_and_enable(bmac_devs, 1);
+ bmac_reset_and_enable(bmac_devs);
enable_irq(bmac_devs->irq);
enable_irq(bp->tx_dma_intr);
enable_irq(bp->rx_dma_intr);
@@ -569,9 +555,12 @@
}
static void
-bmac_construct_rxbuff(unsigned char *addr, volatile struct dbdma_cmd *cp)
+bmac_construct_rxbuff(struct sk_buff *skb, volatile struct dbdma_cmd *cp)
{
- dbdma_setcmd(cp, (INPUT_LAST | INTR_ALWAYS), RX_BUFLEN, virt_to_bus(addr), 0);
+ unsigned char *addr = skb? skb->data: bmac_emergency_rxbuf;
+
+ dbdma_setcmd(cp, (INPUT_LAST | INTR_ALWAYS), RX_BUFLEN,
+ virt_to_bus(addr), 0);
}
/* Bit-reverse one byte of an ethernet hardware address. */
@@ -586,7 +575,7 @@
}
-static int
+static void
bmac_init_tx_ring(struct bmac_data *bp)
{
volatile struct dbdma_regs *td = bp->tx_dma;
@@ -605,9 +594,6 @@
dbdma_reset(td);
out_le32(&td->wait_sel, 0x00200020);
out_le32(&td->cmdptr, virt_to_bus(bp->tx_cmds));
-
- return 1;
-
}
static int
@@ -615,22 +601,20 @@
{
volatile struct dbdma_regs *rd = bp->rx_dma;
int i;
+ struct sk_buff *skb;
/* initialize list of sk_buffs for receiving and set up recv dma */
- if (!bp->rx_allocated) {
- for (i = 0; i < N_RX_RING; i++) {
- bp->rx_bufs[i] = dev_alloc_skb(RX_BUFLEN+2);
- if (bp->rx_bufs[i] == NULL)
- return 0;
- skb_reserve(bp->rx_bufs[i], 2);
+ memset((char *)bp->rx_cmds, 0,
+ (N_RX_RING + 1) * sizeof(struct dbdma_cmd));
+ for (i = 0; i < N_RX_RING; i++) {
+ if ((skb = bp->rx_bufs[i]) == NULL) {
+ bp->rx_bufs[i] = skb = dev_alloc_skb(RX_BUFLEN+2);
+ if (skb != NULL)
+ skb_reserve(skb, 2);
}
- bp->rx_allocated = 1;
+ bmac_construct_rxbuff(skb, &bp->rx_cmds[i]);
}
- memset((char *)bp->rx_cmds, 0, (N_RX_RING+1) * sizeof(struct dbdma_cmd));
- for (i = 0; i < N_RX_RING; i++)
- bmac_construct_rxbuff(bp->rx_bufs[i]->data, &bp->rx_cmds[i]);
-
bp->rx_empty = 0;
bp->rx_fill = i;
@@ -706,27 +690,36 @@
cp = &bp->rx_cmds[i];
stat = ld_le16(&cp->xfer_status);
residual = ld_le16(&cp->res_count);
- if ((stat & ACTIVE) == 0) break;
+ if ((stat & ACTIVE) == 0)
+ break;
nb = RX_BUFLEN - residual - 2;
if (nb < (ETHERMINPACKET - ETHERCRC)) {
skb = NULL;
bp->stats.rx_length_errors++;
bp->stats.rx_errors++;
- } else skb = bp->rx_bufs[i];
+ } else {
+ skb = bp->rx_bufs[i];
+ bp->rx_bufs[i] = NULL;
+ }
if (skb != NULL) {
nb -= ETHERCRC;
skb_put(skb, nb);
skb->dev = dev;
skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb);
- bp->rx_bufs[i] = dev_alloc_skb(RX_BUFLEN+2);
- skb_reserve(bp->rx_bufs[i], 2);
- bmac_construct_rxbuff(bp->rx_bufs[i]->data, &bp->rx_cmds[i]);
+ dev->last_rx = jiffies;
++bp->stats.rx_packets;
bp->stats.rx_bytes += nb;
} else {
++bp->stats.rx_dropped;
}
+ dev->last_rx = jiffies;
+ if ((skb = bp->rx_bufs[i]) == NULL) {
+ bp->rx_bufs[i] = skb = dev_alloc_skb(RX_BUFLEN+2);
+ if (skb != NULL)
+ skb_reserve(bp->rx_bufs[i], 2);
+ }
+ bmac_construct_rxbuff(skb, &bp->rx_cmds[i]);
st_le16(&cp->res_count, 0);
st_le16(&cp->xfer_status, 0);
last = i;
@@ -772,7 +765,13 @@
if (txintcount < 10) {
XXDEBUG(("bmac_txdma_xfer_stat=%#0x\n", stat));
}
- if (!(stat & ACTIVE)) break;
+ if (!(stat & ACTIVE)) {
+ /*
+ * status field might not have been filled by DBDMA
+ */
+ if (cp == bus_to_virt(in_le32(&bp->tx_dma->cmdptr)))
+ break;
+ }
if (bp->tx_bufs[bp->tx_empty]) {
++bp->stats.tx_packets;
@@ -1215,7 +1214,7 @@
}
}
-static int bmac_reset_and_enable(struct net_device *dev, int enable)
+static void bmac_reset_and_enable(struct net_device *dev)
{
struct bmac_data *bp = dev->priv;
unsigned long flags;
@@ -1223,22 +1222,19 @@
unsigned char *data;
save_flags(flags); cli();
- bp->reset_and_enabled = 0;
bmac_reset_chip(dev);
- if (enable) {
- if (!bmac_init_tx_ring(bp) || !bmac_init_rx_ring(bp))
- return 0;
- if (!bmac_init_chip(dev))
- return 0;
- bmac_start_chip(dev);
- bmwrite(dev, INTDISABLE, EnableNormal);
- bp->reset_and_enabled = 1;
-
- /*
- * It seems that the bmac can't receive until it's transmitted
- * a packet. So we give it a dummy packet to transmit.
- */
- skb = dev_alloc_skb(ETHERMINPACKET);
+ bmac_init_tx_ring(bp);
+ bmac_init_rx_ring(bp);
+ bmac_init_chip(dev);
+ bmac_start_chip(dev);
+ bmwrite(dev, INTDISABLE, EnableNormal);
+
+ /*
+ * It seems that the bmac can't receive until it's transmitted
+ * a packet. So we give it a dummy packet to transmit.
+ */
+ skb = dev_alloc_skb(ETHERMINPACKET);
+ if (skb != NULL) {
data = skb_put(skb, ETHERMINPACKET);
memset(data, 0, ETHERMINPACKET);
memcpy(data, dev->dev_addr, 6);
@@ -1246,13 +1242,14 @@
bmac_transmit_packet(skb, dev);
}
restore_flags(flags);
- return 1;
}
static int __init bmac_probe(void)
{
struct device_node *bmac;
+ MOD_INC_USE_COUNT;
+
for (bmac = find_devices("bmac"); bmac != 0; bmac = bmac->next)
bmac_probe1(bmac, 0);
for (bmac = find_compatible_devices("network", "bmac+"); bmac != 0;
@@ -1265,7 +1262,10 @@
pmu_register_sleep_notifier(&bmac_sleep_notifier);
#endif
}
- return 0;
+
+ MOD_DEC_USE_COUNT;
+
+ return bmac_devs? 0: -ENODEV;
}
static void __init bmac_probe1(struct device_node *bmac, int is_bmac_plus)
@@ -1290,6 +1290,14 @@
}
}
+ if (bmac_emergency_rxbuf == NULL) {
+ bmac_emergency_rxbuf = kmalloc(RX_BUFLEN, GFP_KERNEL);
+ if (bmac_emergency_rxbuf == NULL) {
+ printk(KERN_ERR "BMAC: can't allocate emergency RX buffer\n");
+ return;
+ }
+ }
+
dev = init_etherdev(NULL, PRIV_BYTES);
if (!dev) {
printk(KERN_ERR "init_etherdev failed, out of memory for BMAC %s\n",
@@ -1390,9 +1398,7 @@
{
/* XXDEBUG(("bmac: enter open\n")); */
/* reset the chip */
- if (!bmac_reset_and_enable(dev, 1))
- return -ENOMEM;
-
+ bmac_reset_and_enable(dev);
dev->flags |= IFF_RUNNING;
return 0;
}
@@ -1428,7 +1434,6 @@
bp->rx_bufs[i] = NULL;
}
}
- bp->rx_allocated = 0;
XXDEBUG(("bmac: free tx bufs\n"));
for (i = 0; i<N_TX_RING; i++) {
if (bp->tx_bufs[i] != NULL) {
@@ -1436,7 +1441,6 @@
bp->tx_bufs[i] = NULL;
}
}
- bp->reset_and_enabled = 0;
XXDEBUG(("bmac: all bufs freed\n"));
return 0;
@@ -1607,6 +1611,11 @@
{
struct bmac_data *bp;
struct net_device *dev;
+
+ if (bmac_emergency_rxbuf != NULL) {
+ kfree(bmac_emergency_rxbuf);
+ bmac_emergency_rxbuf = NULL;
+ }
if (bmac_devs == 0)
return;
diff -uNr linux-v2.4.4/drivers/net/gmac.c rtlinux_kernel_2_4/drivers/net/gmac.c
--- linux-v2.4.4/drivers/net/gmac.c Thu Jun 21 17:31:53 2001
+++ rtlinux_kernel_2_4/drivers/net/gmac.c Thu Jun 21 17:27:20 2001
@@ -9,7 +9,7 @@
* Changes:
* Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 08/06/2000
* - check init_etherdev return in gmac_probe1
- * BenH <bh40@calva.net> - 03/09/2000
+ * BenH <benh@kernel.crashing.org> - 03/09/2000
* - Add support for new PHYs
* - Add some PowerBook sleep code
*
@@ -47,10 +47,11 @@
#define DEBUG_PHY
/* Driver version 1.3, kernel 2.4.x */
-#define GMAC_VERSION "v1.3k4"
+#define GMAC_VERSION "v1.4k4"
-static unsigned char dummy_buf[RX_BUF_ALLOC_SIZE + RX_OFFSET + GMAC_BUFFER_ALIGN];
-static struct net_device *gmacs = NULL;
+#define DUMMY_BUF_LEN RX_BUF_ALLOC_SIZE + RX_OFFSET + GMAC_BUFFER_ALIGN
+static unsigned char *dummy_buf;
+static struct net_device *gmacs;
/* Prototypes */
static int mii_read(struct gmac *gm, int phy, int r);
@@ -211,10 +212,12 @@
int link_100 = 0;
int gigabit = 0;
#ifdef DEBUG_PHY
- printk("Link state change, phy_status: 0x%04x\n", phy_status);
+ printk("%s: Link state change, phy_status: 0x%04x\n",
+ gm->dev->name, phy_status);
#endif
gm->phy_status = phy_status;
+ /* Should we enable that in generic mode ? */
lpar_ability = mii_read(gm, gm->phy_addr, MII_ANLPA);
if (lpar_ability & MII_ANLPA_PAUS)
GM_BIS(GM_MAC_CTRL_CONFIG, GM_MAC_CTRL_CONF_SND_PAUSE_EN);
@@ -249,6 +252,9 @@
#endif
full_duplex = ((stat2 & MII_LXT971_STATUS2_FULLDUPLEX) != 0);
link_100 = ((stat2 & MII_LXT971_STATUS2_SPEED) != 0);
+ } else {
+ full_duplex = (lpar_ability & MII_ANLPA_FDAM) != 0;
+ link_100 = (lpar_ability & MII_ANLPA_100M) != 0;
}
#ifdef DEBUG_PHY
printk(" full_duplex: %d, speed: %s\n", full_duplex,
@@ -274,6 +280,144 @@
}
}
+/* Power management: stop PHY chip for suspend mode
+ */
+static void
+gmac_suspend(struct gmac* gm)
+{
+ int data, timeout;
+ unsigned long flags;
+
+ gm->sleeping = 1;
+ netif_stop_queue(gm->dev);
+
+
+ spin_lock_irqsave(&gm->lock, flags);
+ if (gm->opened) {
+ disable_irq(gm->dev->irq);
+ /* Stop polling PHY */
+ mii_poll_stop(gm);
+ }
+ /* Mask out all chips interrupts */
+ GM_OUT(GM_IRQ_MASK, 0xffffffff);
+ spin_unlock_irqrestore(&gm->lock, flags);
+
+ if (gm->opened) {
+ int i;
+ /* Empty Tx ring of any remaining gremlins */
+ gmac_tx_cleanup(gm->dev, 1);
+
+ /* Empty Rx ring of any remaining gremlins */
+ for (i = 0; i < NRX; ++i) {
+ if (gm->rx_buff[i] != 0) {
+ dev_kfree_skb_irq(gm->rx_buff[i]);
+ gm->rx_buff[i] = 0;
+ }
+ }
+ }
+
+ /* Clear interrupts on 5201 */
+ if (gm->phy_type == PHY_B5201)
+ mii_write(gm, gm->phy_addr, MII_BCM5201_INTERRUPT, 0);
+
+ /* Drive MDIO high */
+ GM_OUT(GM_MIF_CFG, 0);
+
+ /* Unchanged, don't ask me why */
+ data = mii_read(gm, gm->phy_addr, MII_ANLPA);
+ mii_write(gm, gm->phy_addr, MII_ANLPA, data);
+
+ /* Put MDIO in sane state */
+ GM_OUT(GM_MIF_CFG, GM_MIF_CFGBB);
+ GM_OUT(GM_MIF_BB_CLOCK, 0);
+ GM_OUT(GM_MIF_BB_DATA, 0);
+ GM_OUT(GM_MIF_BB_OUT_ENABLE, 0);
+
+ /* Stop everything */
+ GM_OUT(GM_MAC_RX_CONFIG, 0);
+ GM_OUT(GM_MAC_TX_CONFIG, 0);
+ GM_OUT(GM_MAC_XIF_CONFIG, 0);
+ GM_OUT(GM_TX_CONF, 0);
+ GM_OUT(GM_RX_CONF, 0);
+
+ /* Set reset state */
+ GM_OUT(GM_RESET, GM_RESET_TX | GM_RESET_RX);
+ for (timeout = 100; timeout > 0; --timeout) {
+ mdelay(10);
+ if ((GM_IN(GM_RESET) & (GM_RESET_TX | GM_RESET_RX)) == 0)
+ break;
+ }
+ GM_OUT(GM_MAC_TX_RESET, GM_MAC_TX_RESET_NOW);
+ GM_OUT(GM_MAC_RX_RESET, GM_MAC_RX_RESET_NOW);
+
+ /* Superisolate PHY */
+ if (gm->phy_type == PHY_B5201)
+ mii_write(gm, gm->phy_addr, MII_BCM5201_MULTIPHY,
+ MII_BCM5201_MULTIPHY_SUPERISOLATE);
+
+ /* Unclock chip */
+ gmac_set_power(gm, 0);
+}
+
+static void
+gmac_resume(struct gmac *gm)
+{
+ int data;
+
+ if (gmac_powerup_and_reset(gm->dev)) {
+ printk(KERN_ERR "%s: Couldn't revive gmac ethernet !\n", gm->dev->name);
+ return;
+ }
+
+ gm->sleeping = 0;
+
+ if (gm->opened) {
+ /* Create fresh rings */
+ gmac_init_rings(gm, 1);
+ /* re-initialize the MAC */
+ gmac_mac_init(gm, gm->dev->dev_addr);
+ /* re-initialize the multicast tables & promisc mode if any */
+ gmac_set_multicast(gm->dev);
+ }
+
+ /* Early enable Tx and Rx so that we are clocked */
+ GM_BIS(GM_TX_CONF, GM_TX_CONF_DMA_EN);
+ mdelay(20);
+ GM_BIS(GM_RX_CONF, GM_RX_CONF_DMA_EN);
+ mdelay(20);
+ GM_BIS(GM_MAC_TX_CONFIG, GM_MAC_TX_CONF_ENABLE);
+ mdelay(20);
+ GM_BIS(GM_MAC_RX_CONFIG, GM_MAC_RX_CONF_ENABLE);
+ mdelay(20);
+ if (gm->phy_type == PHY_B5201) {
+ data = mii_read(gm, gm->phy_addr, MII_BCM5201_MULTIPHY);
+ mii_write(gm, gm->phy_addr, MII_BCM5201_MULTIPHY,
+ data & ~MII_BCM5201_MULTIPHY_SUPERISOLATE);
+ }
+ mdelay(1);
+
+ if (gm->opened) {
+ /* restart polling PHY */
+ mii_interrupt(gm);
+ /* restart DMA operations */
+ gmac_start_dma(gm);
+ netif_start_queue(gm->dev);
+ enable_irq(gm->dev->irq);
+ } else {
+ /* Driver not opened, just leave things off. Note that
+ * we could be smart and superisolate the PHY when the
+ * driver is closed, but I won't do that unless I have
+ * a better understanding of some electrical issues with
+ * this PHY chip --BenH
+ */
+ GM_OUT(GM_MAC_RX_CONFIG, 0);
+ GM_OUT(GM_MAC_TX_CONFIG, 0);
+ GM_OUT(GM_MAC_XIF_CONFIG, 0);
+ GM_OUT(GM_TX_CONF, 0);
+ GM_OUT(GM_RX_CONF, 0);
+ }
+}
+
static int
mii_do_reset_phy(struct gmac *gm, int phy_addr)
{
@@ -374,7 +518,7 @@
gm->phy_type = PHY_LXT971;
printk(KERN_INFO "%s Found LevelOne LX971 PHY\n", gm->dev->name);
} else {
- printk(KERN_ERR "%s: Warning ! Unknown PHY ID 0x%08x !\n",
+ printk(KERN_ERR "%s: Warning ! Unknown PHY ID 0x%08x, using generic mode...\n",
gm->dev->name, gm->phy_id);
}
@@ -448,8 +592,6 @@
PCI_CACHE_LINE_SIZE, 8);
}
} else {
- /* FIXME: Add PHY power down */
- gm->phy_type = 0;
feature_set_gmac_power(gm->of_node, 0);
}
}
@@ -472,11 +614,14 @@
if ((GM_IN(GM_RESET) & (GM_RESET_TX | GM_RESET_RX)) == 0) {
/* Mask out all chips interrupts */
GM_OUT(GM_IRQ_MASK, 0xffffffff);
+ GM_OUT(GM_MAC_TX_RESET, GM_MAC_TX_RESET_NOW);
+ GM_OUT(GM_MAC_RX_RESET, GM_MAC_RX_RESET_NOW);
return 0;
}
}
printk(KERN_ERR "%s reset failed!\n", dev->name);
gmac_set_power(gm, 0);
+ gm->phy_type = 0;
return -1;
}
@@ -747,7 +892,9 @@
int multicast_hash = 0;
int multicast_all = 0;
int promisc = 0;
-
+
+ if (gm->sleeping)
+ return;
/* Lock out others. */
netif_stop_queue(dev);
@@ -881,6 +1028,7 @@
/* Shut down chip */
gmac_set_power(gm, 0);
+ gm->phy_type = 0;
/* Empty rings of any remaining gremlins */
for (i = 0; i < NRX; ++i) {
@@ -904,7 +1052,6 @@
gmac_sleep_notify(struct pmu_sleep_notifier *self, int when)
{
struct gmac *gm;
- int i;
/* XXX should handle more than one */
if (gmacs == NULL)
@@ -920,38 +1067,10 @@
case PBOOK_SLEEP_REJECT:
break;
case PBOOK_SLEEP_NOW:
- disable_irq(gm->dev->irq);
- netif_stop_queue(gm->dev);
- gmac_stop_dma(gm);
- mii_poll_stop(gm);
- gmac_set_power(gm, 0);
- for (i = 0; i < NRX; ++i) {
- if (gm->rx_buff[i] != 0) {
- dev_kfree_skb(gm->rx_buff[i]);
- gm->rx_buff[i] = 0;
- }
- }
- for (i = 0; i < NTX; ++i) {
- if (gm->tx_buff[i] != 0) {
- dev_kfree_skb(gm->tx_buff[i]);
- gm->tx_buff[i] = 0;
- }
- }
+ gmac_suspend(gm);
break;
case PBOOK_WAKE:
- /* see if this is enough */
- gmac_powerup_and_reset(gm->dev);
- gm->full_duplex = 0;
- gm->phy_status = 0;
- mii_lookup_and_reset(gm);
- mii_setup_phy(gm);
- gmac_init_rings(gm, 0);
- gmac_mac_init(gm, gm->dev->dev_addr);
- gmac_set_multicast(gm->dev);
- mii_interrupt(gm);
- gmac_start_dma(gm);
- netif_start_queue(gm->dev);
- enable_irq(gm->dev->irq);
+ gmac_resume(gm);
break;
}
return PBOOK_SLEEP_OK;
@@ -967,7 +1086,10 @@
struct gmac *gm = (struct gmac *) dev->priv;
int i, timeout;
unsigned long flags;
-
+
+ if (gm->sleeping)
+ return;
+
printk (KERN_ERR "%s: transmit timed out, resetting\n", dev->name);
spin_lock_irqsave(&gm->lock, flags);
@@ -990,6 +1112,8 @@
if ((GM_IN(GM_RESET) & (GM_RESET_TX | GM_RESET_RX)) == 0) {
/* Mask out all chips interrupts */
GM_OUT(GM_IRQ_MASK, 0xffffffff);
+ GM_OUT(GM_MAC_TX_RESET, GM_MAC_TX_RESET_NOW);
+ GM_OUT(GM_MAC_RX_RESET, GM_MAC_RX_RESET_NOW);
break;
}
}
@@ -1022,6 +1146,9 @@
unsigned long flags;
int i;
+ if (gm->sleeping)
+ return 1;
+
spin_lock_irqsave(&gm->lock, flags);
i = gm->next_tx;
@@ -1274,7 +1401,7 @@
struct gmac *gm = (struct gmac *) dev->priv;
struct net_device_stats *stats = &gm->stats;
- if (gm && gm->opened) {
+ if (gm && gm->opened && !gm->sleeping) {
stats->rx_crc_errors += GM_IN(GM_MAC_RX_CRC_ERR_CTR);
GM_OUT(GM_MAC_RX_CRC_ERR_CTR, 0);
@@ -1315,10 +1442,14 @@
gmac = gmac->next)
gmac_probe1(gmac);
+#ifdef CONFIG_PMAC_PBOOK
+ if (gmacs)
+ pmu_register_sleep_notifier(&gmac_sleep_notifier);
+#endif
MOD_DEC_USE_COUNT;
- return 0;
+ return gmacs? 0: -ENODEV;
}
static void
@@ -1343,6 +1474,14 @@
return;
}
+ if (dummy_buf == NULL) {
+ dummy_buf = kmalloc(DUMMY_BUF_LEN, GFP_KERNEL);
+ if (dummy_buf == NULL) {
+ printk(KERN_ERR "GMAC: failed to allocated dummy buffer\n");
+ return;
+ }
+ }
+
tx_descpage = get_free_page(GFP_KERNEL);
if (tx_descpage == 0) {
printk(KERN_ERR "GMAC: can't get a page for tx descriptors\n");
@@ -1351,17 +1490,13 @@
rx_descpage = get_free_page(GFP_KERNEL);
if (rx_descpage == 0) {
printk(KERN_ERR "GMAC: can't get a page for rx descriptors\n");
- free_page(tx_descpage);
- return;
+ goto out_txdesc;
}
dev = init_etherdev(NULL, sizeof(struct gmac));
-
if (!dev) {
printk(KERN_ERR "GMAC: init_etherdev failed, out of memory\n");
- free_page(tx_descpage);
- free_page(rx_descpage);
- return;
+ goto out_rxdesc;
}
SET_MODULE_OWNER(dev);
@@ -1369,6 +1504,10 @@
dev->base_addr = gmac->addrs[0].address;
gm->regs = (volatile unsigned int *)
ioremap(gmac->addrs[0].address, 0x10000);
+ if (!gm->regs) {
+ printk(KERN_ERR "GMAC: unable to map I/O registers\n");
+ goto out_unreg;
+ }
dev->irq = gmac->intrs[0].line;
gm->dev = dev;
gm->of_node = gmac;
@@ -1394,6 +1533,7 @@
gm->phy_addr = 0;
gm->opened = 0;
+ gm->sleeping = 0;
dev->open = gmac_open;
dev->stop = gmac_close;
@@ -1404,13 +1544,18 @@
dev->watchdog_timeo = 5*HZ;
ether_setup(dev);
-
+
gm->next_gmac = gmacs;
gmacs = dev;
+ return;
-#ifdef CONFIG_PMAC_PBOOK
- pmu_register_sleep_notifier(&gmac_sleep_notifier);
-#endif
+out_unreg:
+ unregister_netdev(dev);
+ kfree(dev);
+out_rxdesc:
+ free_page(rx_descpage);
+out_txdesc:
+ free_page(tx_descpage);
}
MODULE_AUTHOR("Paul Mackerras/Ben Herrenschmidt");
@@ -1421,16 +1566,25 @@
struct gmac *gm;
struct net_device *dev;
+#ifdef CONFIG_PMAC_PBOOK
+ if (gmacs)
+ pmu_unregister_sleep_notifier(&gmac_sleep_notifier);
+#endif
+
while ((dev = gmacs) != NULL) {
gm = (struct gmac *) dev->priv;
unregister_netdev(dev);
+ iounmap((void *) gm->regs);
free_page(gm->tx_desc_page);
free_page(gm->rx_desc_page);
gmacs = gm->next_gmac;
kfree(dev);
}
+ if (dummy_buf != NULL) {
+ kfree(dummy_buf);
+ dummy_buf = NULL;
+ }
}
module_init(gmac_probe);
module_exit(gmac_cleanup_module);
-
diff -uNr linux-v2.4.4/drivers/net/gmac.h rtlinux_kernel_2_4/drivers/net/gmac.h
--- linux-v2.4.4/drivers/net/gmac.h Thu Jun 21 17:32:50 2001
+++ rtlinux_kernel_2_4/drivers/net/gmac.h Thu Jun 21 17:29:17 2001
@@ -722,6 +722,13 @@
#define MII_ANLPA_CSMA 0x0001 /* CSMA-CD Capable */
#define MII_ANLPA_PAUS 0x0400
+/* Generic PHYs
+ *
+ * These GENERIC values assumes that the PHY devices follow 802.3u and
+ * allow parallel detection to set the link partner ability register.
+ * Detection of 100Base-TX [H/F Duplex] and 100Base-T4 is supported.
+ */
+
/*
* Model-specific PHY registers
*
@@ -791,7 +798,6 @@
#define MII_LXT971_STATUS2_AUTONEG_COMPLETE 0x0080
-
/*
* DMA descriptors
*/
@@ -877,6 +883,7 @@
u8 pci_devfn;
spinlock_t lock;
int opened;
+ int sleeping;
struct net_device *next_gmac;
};
diff -uNr linux-v2.4.4/drivers/net/ne2k-pci.c rtlinux_kernel_2_4/drivers/net/ne2k-pci.c
--- linux-v2.4.4/drivers/net/ne2k-pci.c Thu Jun 21 17:31:07 2001
+++ rtlinux_kernel_2_4/drivers/net/ne2k-pci.c Thu Jun 21 17:26:08 2001
@@ -62,6 +62,8 @@
#if defined(__powerpc__)
#define inl_le(addr) le32_to_cpu(inl(addr))
#define inw_le(addr) le16_to_cpu(inw(addr))
+#undef insl
+#undef outsl
#define insl insl_ns
#define outsl outsl_ns
#endif
diff -uNr linux-v2.4.4/drivers/pci/Makefile rtlinux_kernel_2_4/drivers/pci/Makefile
--- linux-v2.4.4/drivers/pci/Makefile Thu Jun 21 17:33:10 2001
+++ rtlinux_kernel_2_4/drivers/pci/Makefile Thu Jun 21 17:29:59 2001
@@ -22,6 +22,7 @@
obj-$(CONFIG_ALPHA) += setup-bus.o setup-irq.o
obj-$(CONFIG_ARM) += setup-bus.o setup-irq.o
obj-$(CONFIG_SUPERH) += setup-bus.o setup-irq.o
+obj-$(CONFIG_ALL_PPC) += setup-bus.o
ifndef CONFIG_X86
obj-y += syscall.o
diff -uNr linux-v2.4.4/drivers/pci/pci.ids rtlinux_kernel_2_4/drivers/pci/pci.ids
--- linux-v2.4.4/drivers/pci/pci.ids Thu Jun 21 17:32:50 2001
+++ rtlinux_kernel_2_4/drivers/pci/pci.ids Thu Jun 21 17:29:17 2001
@@ -1069,6 +1069,13 @@
000e Hydra Mac I/O
0010 Heathrow Mac I/O
0017 Paddington Mac I/O
+ 0018 UniNorth FireWire
+ 0019 KeyLargo USB
+ 001e UniNorth PCI
+ 001f UniNorth PCI
+ 0020 UniNorth AGP
+ 0021 UniNorth GMAC
+ 0022 KeyLargo Mac I/O
106c Hyundai Electronics America
8801 Dual Pentium ISA/PCI Motherboard
8802 PowerPC ISA/PCI Motherboard
diff -uNr linux-v2.4.4/drivers/scsi/sym53c8xx_defs.h rtlinux_kernel_2_4/drivers/scsi/sym53c8xx_defs.h
--- linux-v2.4.4/drivers/scsi/sym53c8xx_defs.h Thu Jun 21 17:32:29 2001
+++ rtlinux_kernel_2_4/drivers/scsi/sym53c8xx_defs.h Thu Jun 21 17:28:32 2001
@@ -168,16 +168,12 @@
#endif
/*
- * Use normal IO if configured. Forced for alpha and powerpc.
- * Powerpc fails copying to on-chip RAM using memcpy_toio().
+ * Use normal IO if configured. Forced for alpha.
*/
#if defined(CONFIG_SCSI_NCR53C8XX_IOMAPPED)
#define SCSI_NCR_IOMAPPED
#elif defined(__alpha__)
#define SCSI_NCR_IOMAPPED
-#elif defined(__powerpc__)
-#define SCSI_NCR_IOMAPPED
-#define SCSI_NCR_PCI_MEM_NOT_SUPPORTED
#elif defined(__sparc__)
#undef SCSI_NCR_IOMAPPED
#endif
diff -uNr linux-v2.4.4/drivers/sgi/char/linux_logo.h rtlinux_kernel_2_4/drivers/sgi/char/linux_logo.h
--- linux-v2.4.4/drivers/sgi/char/linux_logo.h Thu Jun 21 17:29:24 2001
+++ rtlinux_kernel_2_4/drivers/sgi/char/linux_logo.h Wed Dec 31 17:00:00 1969
@@ -1,909 +0,0 @@
-/* This is a linux logo to be displayed on boot.
- *
- * You can put anything here, but:
- * LINUX_LOGO_COLORS has to be less than 224
- * image size has to be 80x80
- * values have to start from0x20
- * (i.e. RGB(linux_logo_red[0],
- * linux_logo_green[0],
- * linux_logo_blue[0]) is color0x20)
- */
-
-#define LINUX_LOGO_COLORS 221
-
-unsigned char linux_logo_red[] = {
- 0xF3, 0xF6, 0xF8, 0xF7, 0xEF, 0xE7, 0xE5, 0xE3,
- 0xCA, 0xD4, 0xDD, 0xC8, 0xC7, 0xC4, 0xC2, 0xE5,
- 0xF1, 0xED, 0xEE, 0xE6, 0xC6, 0xDA, 0xDD, 0xE5,
- 0xD9, 0xC6, 0xE3, 0xD0, 0xC6, 0xBA, 0xB0, 0xB6,
- 0xBB, 0xBE, 0xB9, 0xB8, 0xB3, 0xB2, 0xB0, 0xAD,
- 0xAC, 0xA9, 0xA8, 0xA6, 0xA4, 0xA1, 0xA0, 0x9D,
- 0xA0, 0x9F, 0x9E, 0x9C, 0x9B, 0x99, 0x9A, 0x99,
- 0x98, 0x95,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, 0x06, 0x06, 0x07, 0x16, 0x07, 0x0E,
- 0x08, 0x0A, 0x07, 0x0D, 0x2D, 0x3E, 0x09, 0x4E,
- 0x68, 0x52, 0x56, 0x58, 0x4B, 0x22, 0x20, 0x20,
- 0x27, 0x39, 0x28, 0x19, 0x1E, 0x1E, 0x08, 0x06,
- 0x07, 0x09, 0x08, 0x08, 0x05, 0x1D, 0x1F, 0x17,
- 0x18, 0x06, 0x79, 0x80, 0x7D, 0x7C, 0x7A, 0x78,
- 0x76, 0x71, 0x73, 0x6E, 0x6B, 0x68, 0x65, 0x62,
- 0x4B, 0x5B, 0x5F, 0x55, 0x56, 0x52, 0x4F, 0x46,
- 0x42, 0x5A, 0x14, 0x23, 0x3D, 0x2B, 0x21, 0x14,
- 0x06, 0x04, 0x03, 0x07, 0x09, 0x13, 0x2A, 0x3A,
- 0x37, 0x3E, 0x32, 0x33, 0x25, 0x2C, 0x07, 0x09,
- 0x1D, 0x14, 0x06, 0x02, 0x00
-};
-
-unsigned char linux_logo[] = {
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, 0x57,
- 0x58, 0x58, 0x59, 0x5C, 0x5D, 0x5F, 0x60, 0x61,
- 0x62, 0x61, 0x61, 0x62, 0x62, 0x62, 0x63, 0x63,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x60, 0x5E, 0x5E,
- 0x5E, 0x5D, 0x5D, 0x5C, 0x5D, 0x5B, 0x58, 0x58,
- 0x58, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x58,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, 0x57,
- 0x54, 0x56, 0x57, 0x67, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x67, 0x4C,
- 0x4A, 0x49, 0x4A, 0x49, 0x4A, 0x49, 0x49, 0x4A,
- 0x4A, 0x4B, 0x4B, 0x4B, 0x4C, 0x50, 0x51, 0x52,
- 0x54, 0x54, 0x56, 0x57, 0x57, 0x57, 0x57, 0x58,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x58, 0x56, 0x56, 0x53,
- 0x52, 0x53, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0xFB, 0xFB,
- 0x4B, 0x4B, 0x4B, 0x4A, 0x49, 0x4A, 0x4A, 0x49,
- 0x49, 0x49, 0x48, 0x49, 0x49, 0x4A, 0x4A, 0x4B,
- 0x4C, 0x4D, 0x52, 0x54, 0x56, 0x55, 0x57, 0x58,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x55, 0x54, 0x53, 0x52, 0x51, 0x50,
- 0x50, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, 0xF0, 0xF4, 0xFB,
- 0xFC, 0x67, 0x53, 0x50, 0x4D, 0x4C, 0x4C, 0x4C,
- 0x4B, 0x4A, 0x4A, 0x48, 0x49, 0x48, 0x48, 0x49,
- 0x49, 0x49, 0x4B, 0x4C, 0x50, 0x52, 0x53, 0x56,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x55, 0x54, 0x53, 0x51, 0x51, 0x50, 0x4C, 0x4D,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0xD2, 0xD7, 0xF5,
- 0xFC, 0xFC, 0x5D, 0x5D, 0x5C, 0x5C, 0x59, 0x58,
- 0x58, 0x56, 0x52, 0x4C, 0x4B, 0x4A, 0x4A, 0x48,
- 0x48, 0x48, 0x48, 0x48, 0x49, 0x4B, 0x4D, 0x51,
- 0x54, 0x56, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x55, 0x54,
- 0x53, 0x52, 0x51, 0x4D, 0x4D, 0x4D, 0x50, 0x50,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0x64, 0xD9, 0xF5,
- 0xF9, 0xFC, 0xFC, 0x64, 0x63, 0x62, 0x61, 0x61,
- 0x61, 0x60, 0x5E, 0x5B, 0x5A, 0x54, 0x52, 0x4C,
- 0x4B, 0x49, 0x49, 0x47, 0x47, 0x48, 0x49, 0x4B,
- 0x4C, 0x51, 0x53, 0x56, 0x57, 0x58, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x57, 0x57, 0x55, 0x53, 0x53,
- 0x51, 0x50, 0x50, 0x50, 0x50, 0x50, 0x53, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0xF5, 0xF9, 0xFC,
- 0xFC, 0xFC, 0xFC, 0x64, 0x64, 0x64, 0x64, 0x64,
- 0x64, 0x64, 0x64, 0x63, 0x61, 0x61, 0x5E, 0x59,
- 0x55, 0x52, 0x4C, 0x4A, 0x49, 0x47, 0x48, 0x48,
- 0x49, 0x4B, 0x4D, 0x51, 0x54, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x58, 0x55, 0x54, 0x54, 0x52, 0x51,
- 0x51, 0x51, 0x51, 0x51, 0x53, 0x54, 0x59, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xF7, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0x60, 0x60, 0x60, 0x61,
- 0x62, 0x63, 0x64, 0x64, 0x65, 0x65, 0x64, 0x63,
- 0x61, 0x5E, 0x59, 0x56, 0x4D, 0x4B, 0x48, 0x48,
- 0x48, 0x48, 0x49, 0x4B, 0x50, 0x53, 0x56, 0x56,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x56, 0x54, 0x53, 0x52, 0x51, 0x51,
- 0x51, 0x52, 0x53, 0x55, 0x59, 0x5D, 0x5E, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFB, 0xFB, 0xFB, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0x4C, 0x4E, 0x51, 0x52,
- 0x57, 0x5A, 0x5E, 0x60, 0x61, 0x63, 0x65, 0xCB,
- 0x64, 0x64, 0x63, 0x60, 0x5C, 0x57, 0x50, 0x4B,
- 0x48, 0x47, 0x47, 0x47, 0x4A, 0x4C, 0x52, 0x53,
- 0x54, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x55, 0x54, 0x53, 0x53, 0x51, 0x52, 0x52, 0x53,
- 0x53, 0x57, 0x5A, 0x5D, 0x5E, 0x5E, 0x60, 0xFC,
- 0xFC, 0xFC, 0xFB, 0xF9, 0xFC, 0xFC, 0xFC, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFA, 0xF9, 0xF5, 0xFB, 0xFC,
- 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0x45, 0x3F, 0x3F,
- 0x45, 0x48, 0x4B, 0x4D, 0x54, 0x5A, 0x5E, 0x61,
- 0x63, 0xCB, 0xCB, 0x65, 0x64, 0x62, 0x5E, 0x57,
- 0x50, 0x4B, 0x48, 0x47, 0x47, 0x48, 0x4B, 0x4D,
- 0x51, 0x56, 0x56, 0x57, 0x57, 0x57, 0x57, 0x57,
- 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x55,
- 0x54, 0x54, 0x53, 0x53, 0x52, 0x53, 0x54, 0x57,
- 0x59, 0x5C, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0xFC,
-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A, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58,
- 0x5A, 0x5A, 0x5A, 0x58, 0x55, 0x52, 0x51, 0x5A,
- 0x5D, 0x5D, 0x57, 0x4C, 0x51, 0x54, 0x5D, 0xFC,
- 0xFC, 0x2A, 0xFC, 0xC9, 0xAA, 0x8B, 0x8A, 0x8C,
- 0xAB, 0x8C, 0x8C, 0xFB, 0xFB, 0x23, 0x20, 0xF1,
- 0xFC, 0xFC, 0xFC, 0x3B, 0x33, 0x33, 0x32, 0x32,
- 0x31, 0x32, 0x30, 0x32, 0x32, 0x32, 0x32, 0x30,
- 0x31, 0x31, 0x31, 0x32, 0x33, 0x33, 0x3C, 0x41,
- 0x41, 0x2E, 0x2D, 0x45, 0x4D, 0x5D, 0x63, 0xCC,
- 0x65, 0x62, 0x5D, 0x51, 0x49, 0x47, 0x47, 0x4A,
- 0x59, 0x57, 0x57, 0x57, 0x57, 0x58, 0x58, 0x58,
- 0x5A, 0x5A, 0x58, 0x55, 0x53, 0x53, 0x5C, 0x5E,
- 0x59, 0x51, 0x4E, 0x54, 0x59, 0x5E, 0x62, 0xFC,
- 0xFC, 0xDB, 0xAA, 0xA1, 0x95, 0x9C, 0x8C, 0x88,
- 0x82, 0x83, 0x83, 0x8C, 0x88, 0xAE, 0xB9, 0xFB,
- 0xFC, 0xFC, 0xFC, 0x3C, 0x3B, 0x72, 0x38, 0x33,
- 0x33, 0x33, 0x31, 0x33, 0x31, 0x31, 0x31, 0x31,
- 0x33, 0x33, 0x38, 0x33, 0x72, 0x3B, 0x44, 0x2E,
- 0x41, 0x2E, 0x2E, 0x2D, 0x43, 0x4B, 0x5B, 0x63,
- 0xCB, 0xCC, 0x63, 0x5D, 0x51, 0x49, 0x47, 0x49,
- 0x5C, 0x58, 0x57, 0x57, 0x57, 0x57, 0x58, 0x58,
- 0x58, 0x58, 0x57, 0x53, 0x58, 0x5D, 0x5E, 0x55,
- 0x51, 0x53, 0x58, 0x5E, 0x60, 0x63, 0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, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x22, 0x21, 0x24, 0xFC, 0xFC, 0xFC, 0xE2, 0xC7,
- 0xB5, 0x90, 0x93, 0x93, 0x93, 0x90, 0x93, 0x93,
- 0x90, 0xB5, 0xC8, 0xE4, 0x5F, 0x45, 0x2E, 0x4D,
- 0x57, 0x57, 0x44, 0x43, 0x63, 0xDA, 0xDF, 0xDF,
- 0xD9, 0xCE, 0x4C, 0x2C, 0x3F, 0x3E, 0x40, 0x40,
- 0x60, 0x5E, 0x61, 0x61, 0x5E, 0x5B, 0x53, 0x52,
- 0x5C, 0x52, 0x52, 0x55, 0x61, 0xD4, 0xD5, 0xD1,
- 0x5E, 0x5B, 0x5C, 0xFB, 0xFC, 0xFC, 0x2A, 0x21,
- 0x23, 0x22, 0x23, 0x22, 0x22, 0x22, 0x23, 0x22,
- 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x22, 0x22, 0x22, 0xFB, 0xFC, 0xFC, 0xB3, 0xC8,
- 0xB5, 0x90, 0x92, 0xB5, 0x93, 0x93, 0xB5, 0x93,
- 0x92, 0xB5, 0xC8, 0xB9, 0xD0, 0x5E, 0x44, 0x40,
- 0x52, 0x58, 0x57, 0x48, 0x40, 0x63, 0xD9, 0xE0,
- 0xE0, 0xD9, 0xCB, 0x49, 0x2D, 0x3F, 0x45, 0x3F,
- 0x63, 0x61, 0x62, 0x60, 0x5E, 0x55, 0x4D, 0x59,
- 0x53, 0x4E, 0x54, 0x5D, 0xD2, 0xD4, 0xD2, 0x5E,
- 0x5C, 0x5D, 0xFC, 0xFC, 0xFC, 0xF8, 0x29, 0x23,
- 0x23, 0x23, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x23, 0x22, 0x22, 0x23, 0x23, 0x23, 0x22, 0x22,
- 0x22, 0x22, 0x22, 0xF0, 0xFC, 0xFC, 0xB3, 0xC7,
- 0xB5, 0x93, 0xB5, 0x93, 0x93, 0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x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, 0x81, 0xC7,
- 0xB7, 0xB7, 0xBC, 0xB7, 0xBC, 0xBC, 0xBC, 0xB7,
- 0xB7, 0xB7, 0xC8, 0x80, 0x58, 0x57, 0x40, 0xCE,
- 0xF3, 0xF2, 0xF2, 0xF0, 0xD5, 0x4C, 0x3F, 0x4B,
- 0x52, 0x50, 0x2D, 0x4B, 0x64, 0xD2, 0xCC, 0x61,
- 0x60, 0x58, 0x4A, 0x47, 0x47, 0x4C, 0x59, 0x64,
- 0xD0, 0xD0, 0x64, 0x59, 0x49, 0x5D, 0xFB, 0xFC,
- 0xD9, 0xFC, 0xD6, 0x23, 0x22, 0x22, 0x22, 0x23,
- 0x22, 0x22, 0x23, 0x23, 0x21, 0x21, 0x22, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, 0xB4, 0xC8,
- 0xBD, 0xB7, 0xBD, 0xBC, 0xBD, 0xC5, 0xBC, 0xC5,
- 0xBC, 0xBD, 0xC7, 0xAC, 0x58, 0x57, 0x58, 0x2C,
- 0xD1, 0xF0, 0xF3, 0xF3, 0xE0, 0xCD, 0x45, 0x3E,
- 0x48, 0x4B, 0x3F, 0x41, 0x56, 0x64, 0x65, 0x62,
- 0x5D, 0x52, 0x47, 0x48, 0x48, 0x53, 0x60, 0xCC,
- 0xD2, 0xD0, 0x63, 0x52, 0x4E, 0x53, 0xFB, 0xFB,
- 0xFC, 0xFC, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23,
- 0x22, 0x22, 0x23, 0x23, 0x20, 0x21, 0x22, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0xB4, 0xC7,
- 0xC5, 0xBC, 0xC5, 0xBD, 0xC5, 0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C,
- 0x4B, 0x4B, 0x3F, 0x42, 0x44, 0x4A, 0x51, 0x58,
- 0x4B, 0x48, 0x4B, 0x51, 0x4D, 0x5F, 0xD0, 0xD1,
- 0xD0, 0x64, 0x51, 0x44, 0x6B, 0xFC, 0xFB, 0xFC,
- 0xFC, 0x21, 0x23, 0x22, 0x22, 0x23, 0x22, 0x23,
- 0x22, 0x22, 0x23, 0x26, 0x21, 0x23, 0x23, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23,
- 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0xE5, 0xED,
- 0xE7, 0xBA, 0xC8, 0xC6, 0xC6, 0xC6, 0xC6, 0xC7,
- 0xC7, 0xE5, 0xED, 0xE6, 0x61, 0x41, 0x52, 0x58,
- 0x58, 0x57, 0x45, 0x5E, 0xD7, 0xDD, 0xD5, 0x60,
- 0x4B, 0x4C, 0x48, 0x4D, 0x4D, 0x50, 0x4D, 0x56,
- 0x4A, 0x3E, 0x53, 0x53, 0x52, 0x63, 0xD3, 0xD0,
- 0xCE, 0x60, 0x4A, 0x45, 0xFC, 0xFC, 0xF7, 0xFC,
- 0xFC, 0x21, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23,
- 0x22, 0x23, 0x21, 0x2A, 0x20, 0x23, 0x23, 0x22,
- 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22,
- 0x23, 0x22, 0x23, 0x22, 0x21, 0x23, 0xEB, 0xF6,
- 0xF6, 0xED, 0xED, 0xED, 0xED, 0xED, 0xED, 0xED,
- 0xF6, 0xF6, 0xF6, 0xE6, 0xDB, 0x58, 0x45, 0x4B,
- 0x58, 0x57, 0x4D, 0x4B, 0x64, 0xD4, 0xD0, 0x5C,
- 0x48, 0x51, 0x4C, 0x5D, 0x5E, 0x5C, 0x56, 0x59,
- 0x3E, 0x4A, 0x58, 0x54, 0x52, 0x65, 0xD3, 0xD0,
- 0xCF, 0x5D, 0x48, 0xFC, 0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 0x59, 0x61, 0xCC, 0xCC, 0x62,
- 0xD1, 0xD5, 0xDE, 0xD8, 0xDD, 0xCF, 0x4B, 0x4A,
- 0x45, 0x3E, 0x2D, 0xCB, 0xDC, 0xDE, 0xD8, 0xD5,
- 0x60, 0x54, 0x51, 0x4C, 0x4D, 0x5C, 0xCC, 0xCE,
- 0x5A, 0x2C, 0x50, 0x53, 0x3E, 0x59, 0xD8, 0xF3,
- 0xF2, 0xF3, 0xF3, 0xE0, 0x5E, 0x4A, 0x4C, 0x53,
- 0x5E, 0x63, 0xCC, 0xCC, 0xCC, 0xCD, 0xCF, 0xD3,
- 0x62, 0x53, 0xD6, 0xD6, 0xD6, 0xD6, 0x5B, 0x48,
- 0x64, 0x63, 0x59, 0x44, 0x57, 0x63, 0xD2, 0xD3,
- 0xD0, 0x5E, 0xD0, 0xD1, 0xCB, 0x58, 0x4C, 0xCF,
- 0xCF, 0xCE, 0xCE, 0x57, 0x63, 0xCC, 0xCD, 0x57,
-};
-
diff -uNr linux-v2.4.4/drivers/sound/dmasound/Makefile rtlinux_kernel_2_4/drivers/sound/dmasound/Makefile
--- linux-v2.4.4/drivers/sound/dmasound/Makefile Thu Jun 21 17:33:31 2001
+++ rtlinux_kernel_2_4/drivers/sound/dmasound/Makefile Thu Jun 21 17:30:48 2001
@@ -7,15 +7,21 @@
#
# Note 2! The CFLAGS definitions are now in the main makefile...
+O_TARGET = dmasound.o
+
export-objs := dmasound_core.o
-obj-$(CONFIG_DMASOUND_ATARI) += dmasound_core.o dmasound_atari.o
-obj-$(CONFIG_DMASOUND_AWACS) += dmasound_core.o dmasound_awacs.o
-obj-$(CONFIG_DMASOUND_PAULA) += dmasound_core.o dmasound_paula.o
-obj-$(CONFIG_DMASOUND_Q40) += dmasound_core.o dmasound_q40.o
-
-ifeq ($(CONFIG_DMASOUND),y)
- O_TARGET = dmasound.o
-endif
+list-multi := dmasound_pmac.o
+
+dmasound_pmac-objs := dmasound_awacs.o
+
+obj-$(CONFIG_DMASOUND) += dmasound_core.o
+obj-$(CONFIG_DMASOUND_ATARI) += dmasound_atari.o
+obj-$(CONFIG_DMASOUND_AWACS) += dmasound_pmac.o
+obj-$(CONFIG_DMASOUND_PAULA) += dmasound_paula.o
+obj-$(CONFIG_DMASOUND_Q40) += dmasound_q40.o
include $(TOPDIR)/Rules.make
+
+dmasound_pmac.o: $(dmasound_pmac-objs)
+ $(LD) $(EXTRA_LDFLAGS) -r -o $@ $(dmasound_pmac-objs)
diff -uNr linux-v2.4.4/drivers/sound/dmasound/dmasound.h rtlinux_kernel_2_4/drivers/sound/dmasound/dmasound.h
--- linux-v2.4.4/drivers/sound/dmasound/dmasound.h Thu Jun 21 17:32:07 2001
+++ rtlinux_kernel_2_4/drivers/sound/dmasound/dmasound.h Thu Jun 21 17:27:45 2001
@@ -29,6 +29,9 @@
#define SND_DEV_SNDPROC 9 /* /dev/sndproc for programmable devices */
#define SND_DEV_PSS SND_DEV_SNDPROC
+#define DMASOUND_CORE_REVISION 1
+#define DMASOUND_CORE_EDITION 1
+
#define DSP_DEFAULT_SPEED 8000
#define ON 1
@@ -121,12 +124,13 @@
void (*record)(void); /* optional */
void (*mixer_init)(void); /* optional */
int (*mixer_ioctl)(u_int, u_long); /* optional */
- void (*write_sq_setup)(void); /* optional */
- void (*read_sq_setup)(void); /* optional */
+ int (*write_sq_setup)(void); /* optional */
+ int (*read_sq_setup)(void); /* optional */
void (*sq_open)(void); /* optional */
int (*state_info)(char *); /* optional */
void (*abort_read)(void); /* optional */
int min_dsp_speed;
+ int version;
} MACHINE;
diff -uNr linux-v2.4.4/drivers/sound/dmasound/dmasound_atari.c rtlinux_kernel_2_4/drivers/sound/dmasound/dmasound_atari.c
--- linux-v2.4.4/drivers/sound/dmasound/dmasound_atari.c Thu Jun 21 17:29:02 2001
+++ rtlinux_kernel_2_4/drivers/sound/dmasound/dmasound_atari.c Thu Jun 21 17:24:17 2001
@@ -1438,9 +1438,10 @@
return AtaMixerIoctl(cmd, arg);
}
-static void AtaWriteSqSetup(void)
+static int AtaWriteSqSetup(void)
{
write_sq_ignore_int = 0;
+ return 0;
}
static void AtaSqOpen(void)
diff -uNr linux-v2.4.4/drivers/sound/dmasound/dmasound_awacs.c rtlinux_kernel_2_4/drivers/sound/dmasound/dmasound_awacs.c
--- linux-v2.4.4/drivers/sound/dmasound/dmasound_awacs.c Thu Jun 21 17:33:20 2001
+++ rtlinux_kernel_2_4/drivers/sound/dmasound/dmasound_awacs.c Thu Jun 21 17:30:29 2001
@@ -4,7 +4,14 @@
*
* PowerMac `AWACS' and `Burgundy' DMA Sound Driver
*
- * See linux/drivers/sound/dmasound/dmasound_core.c for copyright and credits
+ * See linux/drivers/sound/dmasound/dmasound_core.c for copyright and
+ * history prior to 2001/01/26.
+ *
+ * 26/01/2001 ed 0.1 Iain Sandoe
+ * - added version info.
+ * - moved dbdma command buffer allocation to PMacXXXSqSetup()
+ * - fixed up beep dbdma cmd buffers
+ *
*/
@@ -18,6 +25,7 @@
#include <linux/nvram.h>
#include <linux/tty.h>
#include <linux/vt_kern.h>
+#include <linux/irq.h>
#ifdef CONFIG_ADB_CUDA
#include <linux/cuda.h>
#endif
@@ -36,6 +44,8 @@
#include "awacs_defs.h"
#include "dmasound.h"
+#define DMASOUND_AWACS_REVISION 0
+#define DMASOUND_AWACS_EDITION 1
/*
* Interrupt numbers and addresses, obtained from the device tree.
@@ -54,15 +64,18 @@
int awacs_device_id = 0;
int awacs_has_iic = 0;
#define AWACS_BURGUNDY 100 /* fake revision # for burgundy */
+#define AWACS_DACA 80 /* fake revision # for daca (ibook)? */
/*
* Space for the DBDMA command blocks.
*/
static void *awacs_tx_cmd_space;
static volatile struct dbdma_cmd *awacs_tx_cmds;
+static int number_of_tx_cmd_buffers = 0;
static void *awacs_rx_cmd_space;
static volatile struct dbdma_cmd *awacs_rx_cmds;
+static int number_of_rx_cmd_buffers = 0;
/*
* Cached values of AWACS registers (we can't read them).
@@ -121,6 +134,7 @@
static int beep_playing = 0;
static int awacs_beep_state = 0;
static short *beep_buf;
+static void *beep_dbdma_cmd_space;
static volatile struct dbdma_cmd *beep_dbdma_cmd;
static void (*orig_mksound)(unsigned int, unsigned int);
static int is_pbook_3400;
@@ -246,8 +260,8 @@
static int PMacMixerIoctl(u_int cmd, u_long arg);
-static void PMacWriteSqSetup(void);
-static void PMacReadSqSetup(void);
+static int PMacWriteSqSetup(void);
+static int PMacReadSqSetup(void);
static void PMacAbortRead(void);
@@ -850,12 +864,16 @@
free_irq(awacs_irq, 0);
free_irq(awacs_tx_irq, 0);
free_irq(awacs_rx_irq, 0);
- kfree(awacs_tx_cmd_space);
+ if (awacs_tx_cmd_space)
+ kfree(awacs_tx_cmd_space);
if (awacs_rx_cmd_space)
kfree(awacs_rx_cmd_space);
- if (beep_buf)
+ if (beep_dbdma_cmd_space)
+ kfree(beep_dbdma_cmd_space);
+ if (beep_buf) {
kfree(beep_buf);
- kd_mksound = orig_mksound;
+ kd_mksound = orig_mksound;
+ }
#ifdef CONFIG_PMAC_PBOOK
pmu_unregister_sleep_notifier(&awacs_sleep_notifier);
#endif
@@ -1017,6 +1035,8 @@
if (awacs_beep_state) {
/* sound takes precedence over beeps */
out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16);
+ while (in_le32(&awacs_txdma->status) & RUN)
+ udelay(1);
out_le32(&awacs->control,
(in_le32(&awacs->control) & ~0x1f00)
| (awacs_rate_index << 8));
@@ -1043,6 +1063,7 @@
out_le16(&cp->command, OUTPUT_MORE + INTR_ALWAYS);
if (write_sq.active == 0)
out_le32(&awacs_txdma->cmdptr, virt_to_bus(cp));
+ (void)in_le32(&awacs_txdma->status);
out_le32(&awacs_txdma->control, ((RUN|WAKE) << 16) + (RUN|WAKE));
++write_sq.active;
}
@@ -1099,7 +1120,6 @@
static void
pmac_awacs_rx_intr(int irq, void *devid, struct pt_regs *regs)
{
-
/* For some reason on my PowerBook G3, I get one interrupt
* when the interrupt vector is installed (like something is
* pending). This happens before the dbdma is initialize by
@@ -1167,7 +1187,7 @@
static void
awacs_write(int val)
{
- if (awacs_revision >= AWACS_BURGUNDY)
+ if (awacs_revision >= AWACS_DACA)
return;
while (in_le32(&awacs->codec_ctrl) & MASK_NEWECMD)
; /* XXX should have timeout */
@@ -1182,6 +1202,8 @@
if (beep_playing) {
st_le16(&beep_dbdma_cmd->command, DBDMA_STOP);
out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16);
+ while (in_le32(&awacs_txdma->status) & RUN)
+ udelay(1);
out_le32(&awacs->control,
(in_le32(&awacs->control) & ~0x1f00)
| (awacs_rate_index << 8));
@@ -1207,6 +1229,8 @@
static int beep_nsamples_cache;
static int beep_volume_cache;
+ if (beep_buf == NULL)
+ return;
for (i = 0; i < 8 && awacs_freqs[i] >= BEEP_SRATE; ++i)
if (awacs_freqs_ok[i])
beep_speed = i;
@@ -1264,11 +1288,14 @@
save_flags(flags); cli();
if (beep_playing) { /* i.e. haven't been terminated already */
out_le32(&awacs_txdma->control, (RUN|WAKE|FLUSH|PAUSE) << 16);
+ while (in_le32(&awacs_txdma->status) & RUN)
+ udelay(1);
out_le32(&awacs->control,
(in_le32(&awacs->control) & ~0x1f00)
| (beep_speed << 8));
out_le32(&awacs->byteswap, 0);
out_le32(&awacs_txdma->cmdptr, virt_to_bus(beep_dbdma_cmd));
+ (void)in_le32(&awacs_txdma->status);
out_le32(&awacs_txdma->control, RUN | (RUN << 16));
}
restore_flags(flags);
@@ -1558,13 +1585,13 @@
static void
awacs_enable_amp(int spkr_vol)
{
+#ifdef CONFIG_ADB_CUDA
struct adb_request req;
awacs_spkr_vol = spkr_vol;
if (sys_ctrler != SYS_CTRLER_CUDA)
return;
-#ifdef CONFIG_ADB_CUDA
/* turn on headphones */
cuda_request(&req, NULL, 5, CUDA_PACKET, CUDA_GET_SET_IIC,
0x8a, 4, 0);
@@ -1585,6 +1612,7 @@
CUDA_GET_SET_IIC, 0x8a, 1, 0x29);
while (!req.complete) cuda_poll();
#endif /* CONFIG_ADB_CUDA */
+ }
}
@@ -1871,11 +1899,53 @@
}
-static void PMacWriteSqSetup(void)
+/* Write/Read sq setup functions:
+ Check to see if we have enough (or any) dbdma cmd buffers for the
+ user's fragment settings. If not, allocate some. If this fails we will
+ point at the beep buffer - as an emergency provision - to stop dma tromping
+ on some random bit of memory (if someone lets it go anyway).
+ The command buffers are then set up to point to the fragment buffers
+ (allocated elsewhere). We need n+1 commands the last of which holds
+ a NOP + loop to start.
+*/
+
+static int PMacWriteSqSetup(void)
{
int i;
volatile struct dbdma_cmd *cp;
+ /* stop the controller from doing any output - if it isn't already.
+ it _should_ be before this is called anyway */
+
+ out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16);
+ while (in_le32(&awacs_txdma->status) & RUN)
+ udelay(1);
+
+ if ((write_sq.numBufs+1) > number_of_tx_cmd_buffers) {
+ if (awacs_tx_cmd_space)
+ kfree(awacs_tx_cmd_space);
+ number_of_tx_cmd_buffers = 0;
+
+ /* we need nbufs + 1 (for the loop) and we should request + 1 again
+ because the DBDMA_ALIGN might pull the start up by up to
+ sizeof(struct dbdma_cmd) - 4 (assuming kmalloc aligns 32 bits).
+ */
+
+ awacs_tx_cmd_space = kmalloc
+ ((write_sq.numBufs + 1 + 1) * sizeof(struct dbdma_cmd),
+ GFP_KERNEL);
+ if (awacs_tx_cmd_space == NULL) {
+ /* don't leave it dangling - nasty but better than a random address */
+ out_le32(&awacs_txdma->cmdptr, virt_to_bus(beep_dbdma_cmd));
+ printk(KERN_ERR
+ "dmasound_pmac: can't allocate dbdma cmd buffers, driver disabled\n");
+ return -ENOMEM;
+ }
+ awacs_tx_cmds = (volatile struct dbdma_cmd *)
+ DBDMA_ALIGN(awacs_tx_cmd_space);
+ number_of_tx_cmd_buffers = write_sq.numBufs + 1;
+ }
+
cp = awacs_tx_cmds;
memset((void *)cp, 0, (write_sq.numBufs+1) * sizeof(struct dbdma_cmd));
for (i = 0; i < write_sq.numBufs; ++i, ++cp) {
@@ -1883,15 +1953,47 @@
}
st_le16(&cp->command, DBDMA_NOP + BR_ALWAYS);
st_le32(&cp->cmd_dep, virt_to_bus(awacs_tx_cmds));
- out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16);
+ /* point the controller at the command stack - ready to go */
out_le32(&awacs_txdma->cmdptr, virt_to_bus(awacs_tx_cmds));
+ return 0;
}
-static void PMacReadSqSetup(void)
+static int PMacReadSqSetup(void)
{
int i;
volatile struct dbdma_cmd *cp;
+ /* stop the controller from doing any input - if it isn't already.
+ it _should_ be before this is called anyway */
+
+ out_le32(&awacs_rxdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16);
+ while (in_le32(&awacs_rxdma->status) & RUN)
+ udelay(1);
+
+ if( (read_sq.numBufs+1) > number_of_rx_cmd_buffers ) {
+ if (awacs_rx_cmd_space)
+ kfree(awacs_rx_cmd_space);
+ number_of_rx_cmd_buffers = 0;
+
+ /* we need nbufs + 1 (for the loop) and we should request + 1 again
+ because the DBDMA_ALIGN might pull the start up by up to
+ sizeof(struct dbdma_cmd) - 4 (assuming kmalloc aligns 32 bits).
+ */
+
+ awacs_rx_cmd_space = kmalloc
+ ((read_sq.numBufs + 1 + 1) * sizeof(struct dbdma_cmd),
+ GFP_KERNEL);
+ if (awacs_rx_cmd_space == NULL) {
+ /* don't leave it dangling - nasty but better than a random address */
+ out_le32(&awacs_rxdma->cmdptr, virt_to_bus(beep_dbdma_cmd));
+ printk(KERN_ERR
+ "dmasound_pmac: can't allocate dbdma cmd buffers, driver disabled\n");
+ return -ENOMEM;
+ }
+ awacs_rx_cmds = (volatile struct dbdma_cmd *)
+ DBDMA_ALIGN(awacs_rx_cmd_space);
+ number_of_rx_cmd_buffers = read_sq.numBufs+1 ;
+ }
cp = awacs_rx_cmds;
memset((void *)cp, 0, (read_sq.numBufs+1) * sizeof(struct dbdma_cmd));
@@ -1907,14 +2009,9 @@
*/
st_le16(&cp->command, DBDMA_NOP + BR_ALWAYS);
st_le32(&cp->cmd_dep, virt_to_bus(awacs_rx_cmds));
-
- /* Don't start until the first read is done.
- * This will also abort any operations in progress if the DMA
- * happens to be running (and it shouldn't).
- */
- out_le32(&awacs_rxdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16);
+ /* point the controller at the command stack - ready to go */
out_le32(&awacs_rxdma->cmdptr, virt_to_bus(awacs_rx_cmds));
-
+ return 0;
}
static void PMacAbortRead(void)
@@ -1937,7 +2034,7 @@
static MACHINE machPMac = {
name: awacs_name,
- name2: "AWACS",
+ name2: "Built-in Sound",
open: PMacOpen,
release: PMacRelease,
dma_alloc: PMacAlloc,
@@ -1956,7 +2053,8 @@
write_sq_setup: PMacWriteSqSetup,
read_sq_setup: PMacReadSqSetup,
abort_read: PMacAbortRead,
- min_dsp_speed: 8000
+ min_dsp_speed: 8000,
+ version: ((DMASOUND_AWACS_REVISION<<8) + DMASOUND_AWACS_EDITION)
};
@@ -1966,6 +2064,7 @@
int __init dmasound_awacs_init(void)
{
struct device_node *np;
+ int vol;
if (_machine != _MACH_Pmac)
return -ENODEV;
@@ -1974,203 +2073,218 @@
awacs_revision = 0;
np = find_devices("awacs");
if (np == 0) {
+ unsigned int *prop, l, i;
+
/*
* powermac G3 models have a node called "davbus"
* with a child called "sound".
*/
struct device_node *sound;
np = find_devices("davbus");
+ /*
+ * if we didn't find a davbus device, try 'i2s-a' since
+ * this seems to be what iBooks have
+ */
+ if (np == NULL) {
+ np = find_devices("i2s-a");
+ }
+ if (np == NULL)
+ return -ENODEV;
sound = find_devices("sound");
- if (sound != 0 && sound->parent == np) {
- unsigned int *prop, l, i;
- prop = (unsigned int *)
- get_property(sound, "sub-frame", 0);
- if (prop != 0 && *prop >= 0 && *prop < 16)
- awacs_subframe = *prop;
- if (device_is_compatible(sound, "burgundy"))
- awacs_revision = AWACS_BURGUNDY;
- /* This should be verified on older screamers */
- if (device_is_compatible(sound, "screamer"))
- awacs_is_screamer = 1;
- prop = (unsigned int *)get_property(sound, "device-id", 0);
- if (prop != 0)
- awacs_device_id = *prop;
- awacs_has_iic = (find_devices("perch") != NULL);
-
- /* look for a property saying what sample rates
- are available */
- for (i = 0; i < 8; ++i)
- awacs_freqs_ok[i] = 0;
+ while (sound != 0 && sound->parent != np)
+ sound = sound->next;
+ if (sound == 0)
+ return -ENODEV;
+ prop = (unsigned int *) get_property(sound, "sub-frame", 0);
+ if (prop != 0 && *prop >= 0 && *prop < 16)
+ awacs_subframe = *prop;
+ if (device_is_compatible(sound, "burgundy"))
+ awacs_revision = AWACS_BURGUNDY;
+ if (device_is_compatible(sound, "daca"))
+ awacs_revision = AWACS_DACA;
+ /* This should be verified on older screamers */
+ if (device_is_compatible(sound, "screamer"))
+ awacs_is_screamer = 1;
+ prop = (unsigned int *)get_property(sound, "device-id", 0);
+ if (prop != 0)
+ awacs_device_id = *prop;
+ awacs_has_iic = (find_devices("perch") != NULL);
+
+ /* look for a property saying what sample rates
+ are available */
+ for (i = 0; i < 8; ++i)
+ awacs_freqs_ok[i] = 0;
+ prop = (unsigned int *)get_property(sound, "sample-rates", &l);
+ if (prop == 0)
prop = (unsigned int *) get_property
- (sound, "sample-rates", &l);
- if (prop == 0)
- prop = (unsigned int *) get_property
- (sound, "output-frame-rates", &l);
- if (prop != 0) {
- for (l /= sizeof(int); l > 0; --l) {
- /* sometimes the rate is in the
- high-order 16 bits (?) */
- unsigned int r = *prop++;
- if (r >= 0x10000)
- r >>= 16;
- for (i = 0; i < 8; ++i) {
- if (r == awacs_freqs[i]) {
- awacs_freqs_ok[i] = 1;
- break;
- }
+ (sound, "output-frame-rates", &l);
+ if (prop != 0) {
+ for (l /= sizeof(int); l > 0; --l) {
+ /* sometimes the rate is in the
+ high-order 16 bits (?) */
+ unsigned int r = *prop++;
+ if (r >= 0x10000)
+ r >>= 16;
+ for (i = 0; i < 8; ++i) {
+ if (r == awacs_freqs[i]) {
+ awacs_freqs_ok[i] = 1;
+ break;
}
}
- } else {
- /* assume just 44.1k is OK */
- awacs_freqs_ok[0] = 1;
}
+ } else {
+ /* assume just 44.1k is OK */
+ awacs_freqs_ok[0] = 1;
}
}
- if (np != NULL && np->n_addrs >= 3 && np->n_intrs >= 3) {
- int vol;
- dmasound.mach = machPMac;
-
- awacs = (volatile struct awacs_regs *)
- ioremap(np->addrs[0].address, 0x80);
- awacs_txdma = (volatile struct dbdma_regs *)
- ioremap(np->addrs[1].address, 0x100);
- awacs_rxdma = (volatile struct dbdma_regs *)
- ioremap(np->addrs[2].address, 0x100);
-
- awacs_irq = np->intrs[0].line;
- awacs_tx_irq = np->intrs[1].line;
- awacs_rx_irq = np->intrs[2].line;
-
- awacs_tx_cmd_space = kmalloc((write_sq.numBufs + 4) * sizeof(struct dbdma_cmd),
- GFP_KERNEL);
- if (awacs_tx_cmd_space == NULL) {
- printk(KERN_ERR "DMA sound driver: Not enough buffer memory, driver disabled!\n");
- return -ENOMEM;
- }
- awacs_node = np;
-#ifdef CONFIG_PMAC_PBOOK
- if (machine_is_compatible("PowerBook1,1")
- || machine_is_compatible("AAPL,PowerBook1998")) {
- pmu_suspend();
- feature_set(np, FEATURE_Sound_CLK_enable);
- feature_set(np, FEATURE_Sound_power);
- /* Shorter delay will not work */
- mdelay(1000);
- pmu_resume();
- }
-#endif
- awacs_tx_cmds = (volatile struct dbdma_cmd *)
- DBDMA_ALIGN(awacs_tx_cmd_space);
+ if (np->n_addrs < 3 || np->n_intrs < 3) {
+ printk(KERN_ERR "AWACS: can't use %s (%d addrs, %d intrs)\n",
+ np->full_name, np->n_addrs, np->n_intrs);
+ return -ENODEV;
+ }
+ dmasound.mach = machPMac;
- awacs_rx_cmd_space = kmalloc((read_sq.numBufs + 4) * sizeof(struct dbdma_cmd),
- GFP_KERNEL);
- if (awacs_rx_cmd_space == NULL) {
- printk("DMA sound driver: No memory for input");
- }
- awacs_rx_cmds = (volatile struct dbdma_cmd *)
- DBDMA_ALIGN(awacs_rx_cmd_space);
+ awacs = (volatile struct awacs_regs *)
+ ioremap(np->addrs[0].address, 0x80);
+ awacs_txdma = (volatile struct dbdma_regs *)
+ ioremap(np->addrs[1].address, 0x100);
+ awacs_rxdma = (volatile struct dbdma_regs *)
+ ioremap(np->addrs[2].address, 0x100);
+
+ awacs_irq = np->intrs[0].line;
+ awacs_tx_irq = np->intrs[1].line;
+ awacs_rx_irq = np->intrs[2].line;
+ awacs_node = np;
+#ifdef CONFIG_PMAC_PBOOK
+ if (machine_is_compatible("PowerBook1,1")
+ || machine_is_compatible("AAPL,PowerBook1998")) {
+ feature_set(np, FEATURE_Sound_CLK_enable);
+ feature_set(np, FEATURE_Sound_power);
+ /* Shorter delay will not work */
+ mdelay(1000);
+ }
+#endif
- awacs_reg[0] = MASK_MUX_CD;
- /* FIXME: Only machines with external SRS module need MASK_PAROUT */
- awacs_reg[1] = MASK_LOOPTHRU;
- if (awacs_has_iic || awacs_device_id == 0x5 || /*awacs_device_id == 0x8
- || */awacs_device_id == 0xb)
- awacs_reg[1] |= MASK_PAROUT;
- /* get default volume from nvram */
- vol = (~nvram_read_byte(0x1308) & 7) << 1;
- awacs_reg[2] = vol + (vol << 6);
- awacs_reg[4] = vol + (vol << 6);
- awacs_reg[5] = 0;
- awacs_reg[6] = 0;
- awacs_reg[7] = 0;
- out_le32(&awacs->control, 0x11);
- awacs_write(awacs_reg[0] + MASK_ADDR0);
- awacs_write(awacs_reg[1] + MASK_ADDR1);
- awacs_write(awacs_reg[2] + MASK_ADDR2);
- awacs_write(awacs_reg[4] + MASK_ADDR4);
- if (awacs_is_screamer) {
- awacs_write(awacs_reg[5] + MASK_ADDR5);
- awacs_write(awacs_reg[6] + MASK_ADDR6);
- awacs_write(awacs_reg[7] + MASK_ADDR7);
+ awacs_reg[0] = MASK_MUX_CD;
+ /* FIXME: Only machines with external SRS module need MASK_PAROUT */
+ awacs_reg[1] = MASK_LOOPTHRU;
+ if (awacs_has_iic || awacs_device_id == 0x5
+ || /*awacs_device_id == 0x8 ||*/ awacs_device_id == 0xb)
+ awacs_reg[1] |= MASK_PAROUT;
+ /* get default volume from nvram */
+ vol = (~nvram_read_byte(0x1308) & 7) << 1;
+ awacs_reg[2] = vol + (vol << 6);
+ awacs_reg[4] = vol + (vol << 6);
+ awacs_reg[5] = 0;
+ awacs_reg[6] = 0;
+ awacs_reg[7] = 0;
+ out_le32(&awacs->control, 0x11);
+ awacs_write(awacs_reg[0] + MASK_ADDR0);
+ awacs_write(awacs_reg[1] + MASK_ADDR1);
+ awacs_write(awacs_reg[2] + MASK_ADDR2);
+ awacs_write(awacs_reg[4] + MASK_ADDR4);
+ if (awacs_is_screamer) {
+ awacs_write(awacs_reg[5] + MASK_ADDR5);
+ awacs_write(awacs_reg[6] + MASK_ADDR6);
+ awacs_write(awacs_reg[7] + MASK_ADDR7);
+ }
+
+ /* Initialize recent versions of the awacs */
+ if (awacs_revision == 0) {
+ awacs_revision = (in_le32(&awacs->codec_stat) >> 12) & 0xf;
+ if (awacs_revision == 3) {
+ mdelay(100);
+ awacs_write(0x6000);
+ mdelay(2);
+ awacs_write(awacs_reg[1] + MASK_ADDR1);
+ awacs_enable_amp(100 * 0x101);
}
+ }
+ if (awacs_revision >= AWACS_BURGUNDY)
+ awacs_burgundy_init();
- /* Initialize recent versions of the awacs */
- if (awacs_revision == 0) {
- awacs_revision =
- (in_le32(&awacs->codec_stat) >> 12) & 0xf;
- if (awacs_revision == 3) {
- mdelay(100);
- awacs_write(0x6000);
- mdelay(2);
- awacs_write(awacs_reg[1] + MASK_ADDR1);
- awacs_enable_amp(100 * 0x101);
- }
- }
- if (awacs_revision >= AWACS_BURGUNDY)
- awacs_burgundy_init();
+ /* Reset dbdma channels */
+ out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE|DEAD) << 16);
+ while (in_le32(&awacs_txdma->status) & RUN)
+ udelay(1);
+ out_le32(&awacs_rxdma->control, (RUN|PAUSE|FLUSH|WAKE|DEAD) << 16);
+ while (in_le32(&awacs_rxdma->status) & RUN)
+ udelay(1);
+
+ /* Initialize beep stuff */
+ /* need to ask for two buffers to cater for potential pull-up
+ by DBDMA_ALIGN
+ */
+ beep_dbdma_cmd_space = kmalloc((1 + 1) * sizeof(struct dbdma_cmd),
+ GFP_KERNEL);
+ if (beep_dbdma_cmd_space == NULL) {
+ printk(KERN_ERR "dmasound_pmac: no beep dbdma cmd space\n") ;
+ return -ENOMEM;
+ }
+ beep_dbdma_cmd = (volatile struct dbdma_cmd *)
+ DBDMA_ALIGN(beep_dbdma_cmd_space);
+ beep_buf = (short *) kmalloc(BEEP_BUFLEN * 4, GFP_KERNEL);
+ if (beep_buf == NULL) {
+ printk(KERN_ERR "dmasound_pmac: no memory for beep buffer\n");
+ kfree(beep_dbdma_cmd_space);
+ return -ENOMEM;
+ }
+ /* OK, we should be safe to claim the mksound vector now */
+ orig_mksound = kd_mksound;
+ kd_mksound = awacs_mksound;
- /* Initialize beep stuff */
- beep_dbdma_cmd = awacs_tx_cmds + (write_sq.numBufs + 1);
- orig_mksound = kd_mksound;
- kd_mksound = awacs_mksound;
- beep_buf = (short *) kmalloc(BEEP_BUFLEN * 4, GFP_KERNEL);
- if (beep_buf == NULL)
- printk(KERN_WARNING "dmasound: no memory for "
- "beep buffer\n");
#ifdef CONFIG_PMAC_PBOOK
- pmu_register_sleep_notifier(&awacs_sleep_notifier);
+ pmu_register_sleep_notifier(&awacs_sleep_notifier);
#endif /* CONFIG_PMAC_PBOOK */
- /* Powerbooks have odd ways of enabling inputs such as
- an expansion-bay CD or sound from an internal modem
- or a PC-card modem. */
- if (machine_is_compatible("AAPL,3400/2400")
- || machine_is_compatible("AAPL,3500")) {
- is_pbook_3400 = 1;
- /*
- * Enable CD and PC-card sound inputs.
- * This is done by reading from address
- * f301a000, + 0x10 to enable the expansion-bay
- * CD sound input, + 0x80 to enable the PC-card
- * sound input. The 0x100 enables the SCSI bus
- * terminator power.
- */
- latch_base = (unsigned char *) ioremap
- (0xf301a000, 0x1000);
- in_8(latch_base + 0x190);
- } else if (machine_is_compatible("PowerBook1,1")
- || machine_is_compatible("AAPL,PowerBook1998")) {
- struct device_node* mio;
- macio_base = 0;
- is_pbook_G3 = 1;
- for (mio = np->parent; mio; mio = mio->parent) {
- if (strcmp(mio->name, "mac-io") == 0
- && mio->n_addrs > 0) {
- macio_base = (unsigned char *) ioremap
- (mio->addrs[0].address, 0x40);
- break;
- }
+ /* Powerbooks have odd ways of enabling inputs such as
+ an expansion-bay CD or sound from an internal modem
+ or a PC-card modem. */
+ if (machine_is_compatible("AAPL,3400/2400")
+ || machine_is_compatible("AAPL,3500")) {
+ is_pbook_3400 = 1;
+ /*
+ * Enable CD and PC-card sound inputs.
+ * This is done by reading from address
+ * f301a000, + 0x10 to enable the expansion-bay
+ * CD sound input, + 0x80 to enable the PC-card
+ * sound input. The 0x100 enables the SCSI bus
+ * terminator power.
+ */
+ latch_base = (unsigned char *) ioremap (0xf301a000, 0x1000);
+ in_8(latch_base + 0x190);
+
+ } else if (machine_is_compatible("PowerBook1,1")
+ || machine_is_compatible("AAPL,PowerBook1998")) {
+ struct device_node* mio;
+ macio_base = 0;
+ is_pbook_G3 = 1;
+ for (mio = np->parent; mio; mio = mio->parent) {
+ if (strcmp(mio->name, "mac-io") == 0
+ && mio->n_addrs > 0) {
+ macio_base = (unsigned char *) ioremap
+ (mio->addrs[0].address, 0x40);
+ break;
}
- /*
- * Enable CD sound input.
- * The relevant bits for writing to this byte are 0x8f.
- * I haven't found out what the 0x80 bit does.
- * For the 0xf bits, writing 3 or 7 enables the CD
- * input, any other value disables it. Values
- * 1, 3, 5, 7 enable the microphone. Values 0, 2,
- * 4, 6, 8 - f enable the input from the modem.
- */
- if (macio_base)
- out_8(macio_base + 0x37, 3);
- }
- sprintf(awacs_name, "PowerMac (AWACS rev %d) ",
- awacs_revision);
- return dmasound_init();
+ }
+ /*
+ * Enable CD sound input.
+ * The relevant bits for writing to this byte are 0x8f.
+ * I haven't found out what the 0x80 bit does.
+ * For the 0xf bits, writing 3 or 7 enables the CD
+ * input, any other value disables it. Values
+ * 1, 3, 5, 7 enable the microphone. Values 0, 2,
+ * 4, 6, 8 - f enable the input from the modem.
+ * -- paulus.
+ */
+ if (macio_base)
+ out_8(macio_base + 0x37, 3);
}
- return -ENODEV;
+ sprintf(awacs_name, "PowerMac (AWACS rev %d) ", awacs_revision);
+ return dmasound_init();
}
static void __exit dmasound_awacs_cleanup(void)
diff -uNr linux-v2.4.4/drivers/sound/dmasound/dmasound_core.c rtlinux_kernel_2_4/drivers/sound/dmasound/dmasound_core.c
--- linux-v2.4.4/drivers/sound/dmasound/dmasound_core.c Thu Jun 21 17:33:33 2001
+++ rtlinux_kernel_2_4/drivers/sound/dmasound/dmasound_core.c Thu Jun 21 17:30:57 2001
@@ -103,6 +103,13 @@
* 2000/3/25 Geert Uytterhoeven:
* - Integration of dmasound_q40
* - Small clean ups
+ *
+ * 2001/01/26 [rev 1.0] Iain Sandoe
+ * - make /dev/sndstat show revision & edition information.
+ * - since dmasound.mach.sq_setup() can fail on pmac its type
+ * has been changed to int and the returns are checked.
+ * [1.1] - stop missing translations from being called.
+ *
*/
@@ -117,7 +124,6 @@
#include "dmasound.h"
-
/*
* Declarations
*/
@@ -480,7 +486,12 @@
default:
return 0;
}
- return ct_func(userPtr, userCount, frame, frameUsed, frameLeft);
+ /* if the user has requested a non-existent translation don't try
+ to call it but just return 0 bytes moved
+ */
+ if (ct_func)
+ return ct_func(userPtr, userCount, frame, frameUsed, frameLeft);
+ return 0;
}
@@ -606,10 +617,10 @@
}
}
-static void sq_setup(struct sound_queue *sq, int max_count, int max_active,
- int block_size)
+static int sq_setup(struct sound_queue *sq, int max_count, int max_active,
+ int block_size)
{
- void (*setup_func)(void);
+ int (*setup_func)(void);
sq->max_count = max_count;
sq->max_active = max_active;
@@ -627,7 +638,8 @@
setup_func = dmasound.mach.read_sq_setup;
}
if (setup_func)
- setup_func();
+ return setup_func();
+ return 0;
}
static inline void sq_play(void)
@@ -817,7 +829,8 @@
return rc;
}
- sq_setup(sq, numbufs, numbufs, bufsize);
+ if ((rc = sq_setup(sq, numbufs, numbufs, bufsize)))
+ return rc;
sq->open_mode = file->f_mode;
}
return rc;
@@ -936,7 +949,7 @@
static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd,
u_long arg)
{
- int val;
+ int val, result;
u_long fmt;
int data;
int size, nbufs;
@@ -1013,7 +1026,9 @@
size = write_sq.bufSize;
} else
size = write_sq.bufSize;
- sq_setup(&write_sq, write_sq.numBufs, nbufs, size);
+ result = sq_setup(&write_sq, write_sq.numBufs, nbufs, size);
+ if (result)
+ return result;
return IOCTL_OUT(arg,write_sq.bufSize | write_sq.numBufs << 16);
case SNDCTL_DSP_GETOSPACE:
info.fragments = write_sq.max_active - write_sq.count;
@@ -1081,9 +1096,11 @@
* /dev/sndstat
*/
+#define STAT_BUFF_LEN 512
+
static struct {
int busy;
- char buf[512]; /* state.buf should not overflow! */
+ char buf[STAT_BUFF_LEN]; /* state.buf should not overflow! */
int len, ptr;
} state;
@@ -1099,7 +1116,13 @@
state.ptr = 0;
state.busy = 1;
- len += sprintf(buffer+len, "%sDMA sound driver:\n", dmasound.mach.name);
+ len += sprintf(buffer+len, "%sDMA sound driver rev %03d :\n",
+ dmasound.mach.name, (DMASOUND_CORE_REVISION<<4) +
+ ((dmasound.mach.version>>8) & 0x0f));
+ len += sprintf(buffer+len,
+ "Core driver edition %02d.%02d : %s driver edition %02d.%02d\n",
+ DMASOUND_CORE_REVISION, DMASOUND_CORE_EDITION, dmasound.mach.name2,
+ (dmasound.mach.version >> 8), (dmasound.mach.version & 0xff)) ;
len += sprintf(buffer+len, "\tsound.format = 0x%x",
dmasound.soft.format);
@@ -1145,6 +1168,9 @@
write_sq.count, write_sq.rear_size);
len += sprintf(buffer+len, "\tsq.active = %d sq.syncing = %d\n",
write_sq.active, write_sq.syncing);
+ if (len >= STAT_BUFF_LEN)
+ printk(KERN_ERR "dmasound_core: stat buffer overflowed!\n")
+;
state.len = len;
return 0;
}
@@ -1237,6 +1263,7 @@
if (irq_installed) {
sound_silence();
dmasound.mach.irqcleanup();
+ irq_installed = 0;
}
write_sq_release_buffers();
diff -uNr linux-v2.4.4/drivers/video/aty128.h rtlinux_kernel_2_4/drivers/video/aty128.h
--- linux-v2.4.4/drivers/video/aty128.h Thu Jun 21 17:30:28 2001
+++ rtlinux_kernel_2_4/drivers/video/aty128.h Thu Jun 21 17:25:34 2001
@@ -267,7 +267,6 @@
#define DAC_MASK 0xFF000000
#define DAC_BLANKING 0x00000004
#define DAC_RANGE_CNTL 0x00000003
-#define DAC_RANGE_CNTL 0x00000003
#define DAC_PALETTE_ACCESS_CNTL 0x00000020
#define DAC_PDWN 0x00008000
diff -uNr linux-v2.4.4/drivers/video/aty128fb.c rtlinux_kernel_2_4/drivers/video/aty128fb.c
--- linux-v2.4.4/drivers/video/aty128fb.c Thu Jun 21 17:32:08 2001
+++ rtlinux_kernel_2_4/drivers/video/aty128fb.c Thu Jun 21 17:27:47 2001
@@ -67,6 +67,9 @@
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
#endif
+#ifdef CONFIG_BOOTX_TEXT
+#include <asm/bootx.h>
+#endif /* CONFIG_BOOTX_TEXT */
#include <video/fbcon.h>
#include <video/fbcon-cfb8.h>
@@ -1240,6 +1243,13 @@
display_info.disp_reg_address = info->regbase_phys;
}
#endif /* CONFIG_FB_COMPAT_XPMAC */
+#ifdef CONFIG_BOOTX_TEXT
+ bootx_update_display(info->frame_buffer_phys,
+ (((par->crtc.h_total>>16) & 0xff)+1)*8,
+ ((par->crtc.v_total>>16) & 0x7ff)+1,
+ par->crtc.bpp,
+ par->crtc.vxres*par->crtc.bpp/8);
+#endif /* CONFIG_BOOTX_TEXT */
}
/*
@@ -1843,7 +1853,7 @@
if ((err = pci_enable_device(pdev))) {
printk(KERN_ERR "aty128fb: Cannot enable PCI device: %d\n",
err);
- goto err_out;
+ return -ENODEV;
}
fb_addr = pci_resource_start(pdev, 0);
diff -uNr linux-v2.4.4/drivers/video/atyfb.c rtlinux_kernel_2_4/drivers/video/atyfb.c
--- linux-v2.4.4/drivers/video/atyfb.c Thu Jun 21 17:32:21 2001
+++ rtlinux_kernel_2_4/drivers/video/atyfb.c Thu Jun 21 17:28:13 2001
@@ -632,7 +632,7 @@
writeb (val, info->ati_regbase + regindex);
}
-#if defined(CONFIG_PPC) || defined(CONFIG_PMAC_PBOOK)
+#if defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_PMAC_PBOOK)
static void aty_st_lcd(int index, u32 val, const struct fb_info_aty *info)
{
unsigned long temp;
@@ -1747,7 +1747,7 @@
program_bits >>= 1;
}
- udelay(1000); /* delay for 1 ms */
+ mdelay(1); /* delay for 1 ms */
(void)aty_ld_8(DAC_REGS, info); /* Clear DAC Counter */
aty_st_8(CRTC_GEN_CNTL + 3, old_crtc_ext_disp, info);
@@ -2705,7 +2705,7 @@
if (user) {
fb->open--;
- udelay(1000);
+ mdelay(1);
wait_for_idle(fb);
if (!fb->open) {
int was_mmaped = fb->mmaped;
@@ -4856,7 +4856,7 @@
aty_st_lcd(LCD_POWER_MANAGEMENT, pm, info);
do {
pm = aty_ld_lcd(LCD_POWER_MANAGEMENT, info);
- udelay(1000);
+ mdelay(1);
if ((--timeout) == 0)
break;
} while ((pm & PWR_MGT_STATUS_MASK) != PWR_MGT_STATUS_SUSPEND);
@@ -4875,7 +4875,7 @@
aty_st_lcd(LCD_POWER_MANAGEMENT, pm, info);
do {
pm = aty_ld_lcd(LCD_POWER_MANAGEMENT, info);
- udelay(1000);
+ mdelay(1);
if ((--timeout) == 0)
break;
} while ((pm & PWR_MGT_STATUS_MASK) != 0);
diff -uNr linux-v2.4.4/drivers/video/chipsfb.c rtlinux_kernel_2_4/drivers/video/chipsfb.c
--- linux-v2.4.4/drivers/video/chipsfb.c Thu Jun 21 17:31:07 2001
+++ rtlinux_kernel_2_4/drivers/video/chipsfb.c Thu Jun 21 17:26:09 2001
@@ -29,17 +29,19 @@
#include <linux/selection.h>
#include <linux/init.h>
#include <linux/pci.h>
+#include <asm/io.h>
+
#ifdef CONFIG_FB_COMPAT_XPMAC
#include <asm/vc_ioctl.h>
-#endif
-#include <asm/io.h>
-#include <asm/prom.h>
#include <asm/pci-bridge.h>
+#endif
#ifdef CONFIG_PMAC_BACKLIGHT
#include <asm/backlight.h>
#endif
+#ifdef CONFIG_PMAC_PBOOK
#include <linux/adb.h>
#include <linux/pmu.h>
+#endif
#include <video/fbcon.h>
#include <video/fbcon-cfb8.h>
@@ -56,14 +58,13 @@
struct {
__u8 red, green, blue;
} palette[256];
+ struct pci_dev *pdev;
unsigned long frame_buffer_phys;
__u8 *frame_buffer;
unsigned long blitter_regs_phys;
__u32 *blitter_regs;
unsigned long blitter_data_phys;
__u8 *blitter_data;
- unsigned long io_base_phys;
- __u8 *io_base;
struct fb_info_chips *next;
#ifdef CONFIG_PMAC_PBOOK
unsigned char *save_framebuffer;
@@ -74,10 +75,10 @@
};
#define write_ind(num, val, ap, dp) do { \
- out_8(p->io_base + (ap), (num)); out_8(p->io_base + (dp), (val)); \
+ outb((num), (ap)); outb((val), (dp)); \
} while (0)
#define read_ind(num, var, ap, dp) do { \
- out_8(p->io_base + (ap), (num)); var = in_8(p->io_base + (dp)); \
+ outb((num), (ap)); var = inb((dp)); \
} while (0);
/* extension registers */
@@ -97,10 +98,10 @@
#define read_sr(num, var) read_ind(num, var, 0x3c4, 0x3c5)
/* attribute registers - slightly strange */
#define write_ar(num, val) do { \
- in_8(p->io_base + 0x3da); write_ind(num, val, 0x3c0, 0x3c0); \
+ inb(0x3da); write_ind(num, val, 0x3c0, 0x3c0); \
} while (0)
#define read_ar(num, var) do { \
- in_8(p->io_base + 0x3da); read_ind(num, var, 0x3c0, 0x3c1); \
+ inb(0x3da); read_ind(num, var, 0x3c0, 0x3c1); \
} while (0)
static struct fb_info_chips *all_chips;
@@ -117,7 +118,7 @@
*/
int chips_init(void);
-static void chips_of_init(struct device_node *dp);
+static void chips_pci_init(struct pci_dev *dp);
static int chips_get_fix(struct fb_fix_screeninfo *fix, int con,
struct fb_info *info);
static int chips_get_var(struct fb_var_screeninfo *var, int con,
@@ -253,29 +254,29 @@
#endif /* CONFIG_PMAC_BACKLIGHT */
/* get the palette from the chip */
for (i = 0; i < 256; ++i) {
- out_8(p->io_base + 0x3c7, i);
+ outb(i, 0x3c7);
udelay(1);
- p->palette[i].red = in_8(p->io_base + 0x3c9);
- p->palette[i].green = in_8(p->io_base + 0x3c9);
- p->palette[i].blue = in_8(p->io_base + 0x3c9);
+ p->palette[i].red = inb(0x3c9);
+ p->palette[i].green = inb(0x3c9);
+ p->palette[i].blue = inb(0x3c9);
}
for (i = 0; i < 256; ++i) {
- out_8(p->io_base + 0x3c8, i);
+ outb(i, 0x3c8);
udelay(1);
- out_8(p->io_base + 0x3c9, 0);
- out_8(p->io_base + 0x3c9, 0);
- out_8(p->io_base + 0x3c9, 0);
+ outb(0, 0x3c9);
+ outb(0, 0x3c9);
+ outb(0, 0x3c9);
}
} else {
#ifdef CONFIG_PMAC_BACKLIGHT
set_backlight_enable(1);
#endif /* CONFIG_PMAC_BACKLIGHT */
for (i = 0; i < 256; ++i) {
- out_8(p->io_base + 0x3c8, i);
+ outb(i, 0x3c8);
udelay(1);
- out_8(p->io_base + 0x3c9, p->palette[i].red);
- out_8(p->io_base + 0x3c9, p->palette[i].green);
- out_8(p->io_base + 0x3c9, p->palette[i].blue);
+ outb(p->palette[i].red, 0x3c9);
+ outb(p->palette[i].green, 0x3c9);
+ outb(p->palette[i].blue, 0x3c9);
}
}
}
@@ -307,11 +308,11 @@
p->palette[regno].red = red;
p->palette[regno].green = green;
p->palette[regno].blue = blue;
- out_8(p->io_base + 0x3c8, regno);
+ outb(regno, 0x3c8);
udelay(1);
- out_8(p->io_base + 0x3c9, red);
- out_8(p->io_base + 0x3c9, green);
- out_8(p->io_base + 0x3c9, blue);
+ outb(red, 0x3c9);
+ outb(green, 0x3c9);
+ outb(blue, 0x3c9);
#ifdef FBCON_HAS_CFB16
if (regno < 16)
@@ -388,7 +389,7 @@
disp->visual = fix->visual;
disp->var = *var;
-#if (defined(CONFIG_PMAC_PBOOK) || defined(CONFIG_FB_COMPAT_XPMAC))
+#ifdef CONFIG_FB_COMPAT_XPMAC
display_info.depth = bpp;
display_info.pitch = fix->line_length;
#endif
@@ -517,7 +518,7 @@
for (i = 0; i < N_ELTS(chips_init_xr); ++i)
write_xr(chips_init_xr[i].addr, chips_init_xr[i].data);
- out_8(p->io_base + 0x3c2, 0x29); /* set misc output reg */
+ outb(0x29, 0x3c2); /* set misc output reg */
for (i = 0; i < N_ELTS(chips_init_sr); ++i)
write_sr(chips_init_sr[i].addr, chips_init_sr[i].data);
for (i = 0; i < N_ELTS(chips_init_gr); ++i)
@@ -545,7 +546,6 @@
// * 3400 has 1MB (I think). Don't know if it's expandable.
// -- Tim Seufert
p->fix.smem_len = 0x100000; // 1MB
- p->fix.mmio_start = p->io_base_phys;
p->fix.type = FB_TYPE_PACKED_PIXELS;
p->fix.visual = FB_VISUAL_PSEUDOCOLOR;
p->fix.line_length = 800;
@@ -607,6 +607,8 @@
#ifdef CONFIG_FB_COMPAT_XPMAC
if (!console_fb_info) {
+ unsigned long iobase;
+
display_info.height = p->var.yres;
display_info.width = p->var.xres;
display_info.depth = 8;
@@ -615,8 +617,9 @@
strncpy(display_info.name, "chips65550",
sizeof(display_info.name));
display_info.fb_address = p->frame_buffer_phys;
- display_info.cmap_adr_address = p->io_base_phys + 0x3c8;
- display_info.cmap_data_address = p->io_base_phys + 0x3c9;
+ iobase = pci_bus_io_base_phys(p->pdev->bus->number);
+ display_info.cmap_adr_address = iobase + 0x3c8;
+ display_info.cmap_data_address = iobase + 0x3c9;
display_info.disp_reg_address = p->blitter_regs_phys;
console_fb_info = &p->info;
}
@@ -632,35 +635,39 @@
int __init chips_init(void)
{
- struct device_node *dp;
+ struct pci_dev *dp = NULL;
- dp = find_devices("chips65550");
- if (dp != 0)
- chips_of_init(dp);
- return 0;
+ while ((dp = pci_find_device(PCI_VENDOR_ID_CT,
+ PCI_DEVICE_ID_CT_65550, dp)) != NULL)
+ if ((dp->class >> 16) == PCI_BASE_CLASS_DISPLAY)
+ chips_pci_init(dp);
+ return all_chips? 0: -ENODEV;
}
-static void __init chips_of_init(struct device_node *dp)
+static void __init chips_pci_init(struct pci_dev *dp)
{
struct fb_info_chips *p;
- unsigned long addr;
- unsigned char bus, devfn;
+ unsigned long addr, size;
unsigned short cmd;
- if (dp->n_addrs == 0)
+ if ((dp->resource[0].flags & IORESOURCE_MEM) == 0)
+ return;
+ addr = dp->resource[0].start;
+ size = dp->resource[0].end + 1 - addr;
+ if (addr == 0)
return;
p = kmalloc(sizeof(*p), GFP_ATOMIC);
if (p == 0)
return;
memset(p, 0, sizeof(*p));
- addr = dp->addrs[0].address;
- if (!request_mem_region(addr, dp->addrs[0].size, "chipsfb")) {
+ if (!request_mem_region(addr, size, "chipsfb")) {
kfree(p);
return;
}
#ifdef __BIG_ENDIAN
addr += 0x800000; // Use big-endian aperture
#endif
+ p->pdev = dp;
p->frame_buffer_phys = addr;
p->frame_buffer = __ioremap(addr, 0x200000, _PAGE_NO_CACHE);
p->blitter_regs_phys = addr + 0x400000;
@@ -668,14 +675,12 @@
p->blitter_data_phys = addr + 0x410000;
p->blitter_data = ioremap(addr + 0x410000, 0x10000);
- if (pci_device_loc(dp, &bus, &devfn) == 0) {
- pcibios_read_config_word(bus, devfn, PCI_COMMAND, &cmd);
- cmd |= 3; /* enable memory and IO space */
- pcibios_write_config_word(bus, devfn, PCI_COMMAND, cmd);
- p->io_base = (__u8 *) pci_io_base(bus);
- /* XXX really want the physical address here */
- p->io_base_phys = (unsigned long) pci_io_base(bus);
- }
+ /* we should use pci_enable_device here, but,
+ the device doesn't declare its I/O ports in its BARs
+ so pci_enable_device won't turn on I/O responses */
+ pci_read_config_word(dp, PCI_COMMAND, &cmd);
+ cmd |= 3; /* enable memory and IO space */
+ pci_write_config_word(dp, PCI_COMMAND, cmd);
/* Clear the entire framebuffer */
memset(p->frame_buffer, 0, 0x100000);
diff -uNr linux-v2.4.4/drivers/video/clgenfb.c rtlinux_kernel_2_4/drivers/video/clgenfb.c
--- linux-v2.4.4/drivers/video/clgenfb.c Thu Jun 21 17:32:20 2001
+++ rtlinux_kernel_2_4/drivers/video/clgenfb.c Thu Jun 21 17:28:11 2001
@@ -56,6 +56,12 @@
#ifdef CONFIG_AMIGA
#include <asm/amigahw.h>
#endif
+#ifdef CONFIG_ALL_PPC
+#include <asm/processor.h>
+#define isPReP (_machine == _MACH_prep)
+#else
+#define isPReP 0
+#endif
#include <video/fbcon.h>
#include <video/fbcon-mfb.h>
@@ -876,15 +882,15 @@
case 16:
_par->line_length = _par->var.xres_virtual * 2;
_par->visual = FB_VISUAL_DIRECTCOLOR;
-#ifdef CONFIG_PREP
- _par->var.red.offset = 2;
- _par->var.green.offset = -3;
- _par->var.blue.offset = 8;
-#else
- _par->var.red.offset = 10;
- _par->var.green.offset = 5;
- _par->var.blue.offset = 0;
-#endif
+ if(isPReP) {
+ _par->var.red.offset = 2;
+ _par->var.green.offset = -3;
+ _par->var.blue.offset = 8;
+ } else {
+ _par->var.red.offset = 10;
+ _par->var.green.offset = 5;
+ _par->var.blue.offset = 0;
+ }
_par->var.red.length = 5;
_par->var.green.length = 5;
_par->var.blue.length = 5;
@@ -893,15 +899,15 @@
case 24:
_par->line_length = _par->var.xres_virtual * 3;
_par->visual = FB_VISUAL_DIRECTCOLOR;
-#ifdef CONFIG_PREP
- _par->var.red.offset = 8;
- _par->var.green.offset = 16;
- _par->var.blue.offset = 24;
-#else
- _par->var.red.offset = 16;
- _par->var.green.offset = 8;
- _par->var.blue.offset = 0;
-#endif
+ if(isPReP) {
+ _par->var.red.offset = 8;
+ _par->var.green.offset = 16;
+ _par->var.blue.offset = 24;
+ } else {
+ _par->var.red.offset = 16;
+ _par->var.green.offset = 8;
+ _par->var.blue.offset = 0;
+ }
_par->var.red.length = 8;
_par->var.green.length = 8;
_par->var.blue.length = 8;
@@ -910,15 +916,15 @@
case 32:
_par->line_length = _par->var.xres_virtual * 4;
_par->visual = FB_VISUAL_DIRECTCOLOR;
-#ifdef CONFIG_PREP
- _par->var.red.offset = 8;
- _par->var.green.offset = 16;
- _par->var.blue.offset = 24;
-#else
- _par->var.red.offset = 16;
- _par->var.green.offset = 8;
- _par->var.blue.offset = 0;
-#endif
+ if(isPReP) {
+ _par->var.red.offset = 8;
+ _par->var.green.offset = 16;
+ _par->var.blue.offset = 24;
+ } else {
+ _par->var.red.offset = 16;
+ _par->var.green.offset = 8;
+ _par->var.blue.offset = 0;
+ }
_par->var.red.length = 8;
_par->var.green.length = 8;
_par->var.blue.length = 8;
@@ -1680,18 +1686,18 @@
#ifdef FBCON_HAS_CFB16
case 16:
assert (regno < 16);
-#ifdef CONFIG_PREP
- fb_info->fbcon_cmap.cfb16[regno] =
- ((red & 0xf800) >> 9) |
- ((green & 0xf800) >> 14) |
- ((green & 0xf800) << 2) |
- ((blue & 0xf800) >> 3);
-#else
- fb_info->fbcon_cmap.cfb16[regno] =
- ((red & 0xf800) >> 1) |
- ((green & 0xf800) >> 6) |
- ((blue & 0xf800) >> 11);
-#endif
+ if(isPReP) {
+ fb_info->fbcon_cmap.cfb16[regno] =
+ ((red & 0xf800) >> 9) |
+ ((green & 0xf800) >> 14) |
+ ((green & 0xf800) << 2) |
+ ((blue & 0xf800) >> 3);
+ } else {
+ fb_info->fbcon_cmap.cfb16[regno] =
+ ((red & 0xf800) >> 1) |
+ ((green & 0xf800) >> 6) |
+ ((blue & 0xf800) >> 11);
+ }
#endif /* FBCON_HAS_CFB16 */
#ifdef FBCON_HAS_CFB24
@@ -1707,17 +1713,17 @@
#ifdef FBCON_HAS_CFB32
case 32:
assert (regno < 16);
-#ifdef CONFIG_PREP
- fb_info->fbcon_cmap.cfb32[regno] =
- ((red & 0xff00)) |
- ((green & 0xff00) << 8) |
- ((blue & 0xff00) << 16);
-#else
- fb_info->fbcon_cmap.cfb32[regno] =
- ((red & 0xff00) << 8) |
- ((green & 0xff00)) |
- ((blue & 0xff00) >> 8);
-#endif
+ if(isPReP) {
+ fb_info->fbcon_cmap.cfb32[regno] =
+ ((red & 0xff00)) |
+ ((green & 0xff00) << 8) |
+ ((blue & 0xff00) << 16);
+ } else {
+ fb_info->fbcon_cmap.cfb32[regno] =
+ ((red & 0xff00) << 8) |
+ ((green & 0xff00)) |
+ ((blue & 0xff00) >> 8);
+ }
break;
#endif /* FBCON_HAS_CFB32 */
default:
@@ -2374,7 +2380,7 @@
-#ifdef CONFIG_PREP
+#ifdef CONFIG_ALL_PPC
#define PREP_VIDEO_BASE ((volatile unsigned long) 0xC0000000)
#define PREP_IO_BASE ((volatile unsigned char *) 0x80000000)
static void __init get_prep_addrs (unsigned long *display, unsigned long *registers)
@@ -2387,7 +2393,7 @@
DPRINTK ("EXIT\n");
}
-#endif /* CONFIG_PREP */
+#endif /* CONFIG_ALL_PPC */
@@ -2510,26 +2516,24 @@
info->pdev = pdev;
-#ifdef CONFIG_PREP
- /* Xbh does this, though 0 seems to be the init value */
- pcibios_write_config_dword (0, pdev->devfn, PCI_BASE_ADDRESS_0, 0x00000000);
-#endif
+ if(isPReP) {
+ /* Xbh does this, though 0 seems to be the init value */
+ pcibios_write_config_dword (0, pdev->devfn, PCI_BASE_ADDRESS_0,
+ 0x00000000);
-#ifdef CONFIG_PREP
- get_prep_addrs (&board_addr, &info->fbregs_phys);
-#else /* CONFIG_PREP */
- DPRINTK ("Attempt to get PCI info for Cirrus Graphics Card\n");
- get_pci_addrs (pdev, &board_addr, &info->fbregs_phys);
-#endif /* CONFIG_PREP */
+ get_prep_addrs (&board_addr, &info->fbregs_phys);
+ } else {
+ DPRINTK ("Attempt to get PCI info for Cirrus Graphics Card\n");
+ get_pci_addrs (pdev, &board_addr, &info->fbregs_phys);
+ }
DPRINTK ("Board address: 0x%lx, register address: 0x%lx\n", board_addr, info->fbregs_phys);
-#ifdef CONFIG_PREP
- /* PReP dies if we ioremap the IO registers, but it works w/out... */
- info->regs = (char *) info->fbregs_phys;
-#else
- info->regs = 0; /* FIXME: this forces VGA. alternatives? */
-#endif
+ if(isPReP) {
+ /* PReP dies if we ioremap the IO registers, but it works w/out... */
+ info->regs = (char *) info->fbregs_phys;
+ } else
+ info->regs = 0; /* FIXME: this forces VGA. alternatives? */
if (*btype == BT_GD5480) {
board_size = 32 * MB_;
diff -uNr linux-v2.4.4/drivers/video/controlfb.c rtlinux_kernel_2_4/drivers/video/controlfb.c
--- linux-v2.4.4/drivers/video/controlfb.c Thu Jun 21 17:28:33 2001
+++ rtlinux_kernel_2_4/drivers/video/controlfb.c Thu Jun 21 17:23:53 2001
@@ -363,6 +363,9 @@
pgprot_val(vma->vm_page_prot) |= _PAGE_WRITETHRU;
}
start &= PAGE_MASK;
+ if ((vma->vm_end - vma->vm_start + off) > len)
+ return -EINVAL;
+ off += start;
vma->vm_pgoff = off >> PAGE_SHIFT;
if (io_remap_page_range(vma->vm_start, off,
vma->vm_end - vma->vm_start, vma->vm_page_prot))
diff -uNr linux-v2.4.4/drivers/video/offb.c rtlinux_kernel_2_4/drivers/video/offb.c
--- linux-v2.4.4/drivers/video/offb.c Thu Jun 21 17:32:16 2001
+++ rtlinux_kernel_2_4/drivers/video/offb.c Thu Jun 21 17:28:05 2001
@@ -49,7 +49,8 @@
cmap_m64, /* ATI Mach64 */
cmap_r128, /* ATI Rage128 */
cmap_M3A, /* ATI Rage Mobility M3 Head A */
- cmap_M3B /* ATI Rage Mobility M3 Head B */
+ cmap_M3B, /* ATI Rage Mobility M3 Head B */
+ cmap_radeon /* ATI Radeon */
};
struct fb_info_offb {
@@ -433,6 +434,10 @@
unsigned long regbase = dp->parent->addrs[2].address;
info->cmap_adr = ioremap(regbase, 0x1FFF);
info->cmap_type = cmap_M3B;
+ } else if (dp && !strncmp(name, "ATY,Rage6", 9)) {
+ unsigned long regbase = dp->addrs[1].address;
+ info->cmap_adr = ioremap(regbase, 0x1FFF);
+ info->cmap_type = cmap_radeon;
} else if (!strncmp(name, "ATY,", 4)) {
unsigned long base = address & 0xff000000UL;
info->cmap_adr = ioremap(base + 0x7ff000, 0x1000) + 0xcc0;
@@ -669,6 +674,10 @@
out_8(info2->cmap_adr + 0xb0, i);
out_le32((unsigned *)(info2->cmap_adr + 0xb4), 0);
break;
+ case cmap_radeon:
+ out_8(info2->cmap_adr + 0xb0, i);
+ out_le32((unsigned *)(info2->cmap_adr + 0xb4), 0);
+ break;
}
}
else
@@ -748,6 +757,12 @@
out_le32((unsigned *)(info2->cmap_adr + 0xb4),
(red << 16 | green << 8 | blue));
break;
+ case cmap_radeon:
+ /* Set palette index & data (could be smarter) */
+ out_8(info2->cmap_adr + 0xb0, regno);
+ out_le32((unsigned *)(info2->cmap_adr + 0xb4),
+ (red << 16 | green << 8 | blue));
+ break;
}
if (regno < 16)
diff -uNr linux-v2.4.4/fs/binfmt_elf.c rtlinux_kernel_2_4/fs/binfmt_elf.c
--- linux-v2.4.4/fs/binfmt_elf.c Thu Jun 21 17:32:36 2001
+++ rtlinux_kernel_2_4/fs/binfmt_elf.c Thu Jun 21 17:28:48 2001
@@ -135,12 +135,13 @@
/*
* Force 16 byte _final_ alignment here for generality.
- * Leave an extra 16 bytes free so that on the PowerPC we
- * can move the aux table up to start on a 16-byte boundary.
*/
- sp = (elf_addr_t *)((~15UL & (unsigned long)(u_platform)) - 16UL);
+ sp = (elf_addr_t *)(~15UL & (unsigned long)(u_platform));
csp = sp;
- csp -= DLINFO_ITEMS*2 + (k_platform ? 2 : 0);
+ csp -= (1+DLINFO_ITEMS)*2 + (k_platform ? 2 : 0);
+#ifdef DLINFO_ARCH_ITEMS
+ csp -= DLINFO_ARCH_ITEMS*2;
+#endif
csp -= envc+1;
csp -= argc+1;
csp -= (!ibcs ? 3 : 1); /* argc itself */
@@ -174,6 +175,13 @@
NEW_AUX_ENT(10, AT_EUID, (elf_addr_t) current->euid);
NEW_AUX_ENT(11, AT_GID, (elf_addr_t) current->gid);
NEW_AUX_ENT(12, AT_EGID, (elf_addr_t) current->egid);
+#ifdef ARCH_DLINFO
+ /*
+ * ARCH_DLINFO must come last so platform specific code can enforce
+ * special alignment requirements on the AUXV if necessary (eg. PPC).
+ */
+ ARCH_DLINFO;
+#endif
#undef NEW_AUX_ENT
sp -= envc+1;
diff -uNr linux-v2.4.4/fs/proc/root.c rtlinux_kernel_2_4/fs/proc/root.c
--- linux-v2.4.4/fs/proc/root.c Thu Jun 21 17:31:52 2001
+++ rtlinux_kernel_2_4/fs/proc/root.c Thu Jun 21 17:27:18 2001
@@ -42,6 +42,9 @@
#ifdef CONFIG_PROC_DEVICETREE
proc_device_tree_init();
#endif
+#ifdef CONFIG_PPC_RTAS
+ proc_rtas_init();
+#endif
proc_bus = proc_mkdir("bus", 0);
}
diff -uNr linux-v2.4.4/include/asm-alpha/system.h rtlinux_kernel_2_4/include/asm-alpha/system.h
--- linux-v2.4.4/include/asm-alpha/system.h Thu Jun 21 17:33:20 2001
+++ rtlinux_kernel_2_4/include/asm-alpha/system.h Thu Jun 21 17:30:29 2001
@@ -262,8 +262,8 @@
__CALL_PAL_W1(cflush, unsigned long);
__CALL_PAL_R0(rdmces, unsigned long);
__CALL_PAL_R0(rdps, unsigned long);
-__CALL_PAL_R0(rdusp, unsigned long);
__CALL_PAL_RW1(swpipl, unsigned long, unsigned long);
+__CALL_PAL_R0(rdusp, unsigned long);
__CALL_PAL_R0(whami, unsigned long);
__CALL_PAL_W2(wrent, void*, unsigned long);
__CALL_PAL_W1(wripir, unsigned long);
@@ -290,13 +290,28 @@
extern int __min_ipl;
#endif
+#ifdef CONFIG_RTLINUX
+extern unsigned long (*__rdps)(void);
+extern unsigned long (*__swpipl)(unsigned long);
+#endif /* CONFIG_RTLINUX */
+
+#ifdef CONFIG_RTLINUX
+#define getipl() (__rdps() & 7)
+#define setipl(ipl) ((void) __swpipl(ipl))
+#else /* CONFIG_RTLINUX */
#define getipl() (rdps() & 7)
#define setipl(ipl) ((void) swpipl(ipl))
+#endif /* CONFIG_RTLINUX */
#define __cli() do { setipl(IPL_MAX); barrier(); } while(0)
#define __sti() do { barrier(); setipl(IPL_MIN); } while(0)
+#ifdef CONFIG_RTLINUX
+#define __save_flags(flags) ((flags) = __rdps())
+#define __save_and_cli(flags) ((flags) = __swpipl(IPL_MAX))
+#else
#define __save_flags(flags) ((flags) = rdps())
#define __save_and_cli(flags) do { (flags) = swpipl(IPL_MAX); barrier(); } while(0)
+#endif /* CONFIG_RTLINUX */
#define __restore_flags(flags) do { barrier(); setipl(flags); barrier(); } while(0)
#define local_irq_save(flags) __save_and_cli(flags)
diff -uNr linux-v2.4.4/include/asm-i386/apic.h rtlinux_kernel_2_4/include/asm-i386/apic.h
--- linux-v2.4.4/include/asm-i386/apic.h Thu Jun 21 17:32:21 2001
+++ rtlinux_kernel_2_4/include/asm-i386/apic.h Thu Jun 21 17:28:16 2001
@@ -53,6 +53,9 @@
extern inline void ack_APIC_irq(void)
{
+#ifdef CONFIG_RTLINUX
+ label_ack_APIC(); /* used to generate RTLinux patch point */
+#endif
/*
* ack_APIC_irq() actually gets compiled as a single instruction:
* - a single rmw on Pentium/82489DX
diff -uNr linux-v2.4.4/include/asm-i386/hw_irq.h rtlinux_kernel_2_4/include/asm-i386/hw_irq.h
--- linux-v2.4.4/include/asm-i386/hw_irq.h Thu Jun 21 17:29:11 2001
+++ rtlinux_kernel_2_4/include/asm-i386/hw_irq.h Thu Jun 21 17:24:28 2001
@@ -14,6 +14,7 @@
#include <linux/config.h>
#include <asm/irq.h>
+#include <asm/rtlinux.h>
/*
* IDT vectors usable for external interrupt sources start
@@ -123,20 +124,19 @@
#define BUILD_SMP_INTERRUPT(x,v) XBUILD_SMP_INTERRUPT(x,v)
#define XBUILD_SMP_INTERRUPT(x,v)\
asmlinkage void x(void); \
-asmlinkage void call_##x(void); \
__asm__( \
"\n"__ALIGN_STR"\n" \
SYMBOL_NAME_STR(x) ":\n\t" \
"pushl $"#v"\n\t" \
SAVE_ALL \
- SYMBOL_NAME_STR(call_##x)":\n\t" \
- "call "SYMBOL_NAME_STR(smp_##x)"\n\t" \
+ "pushl $ret_from_intr\n\t" \
+ RTLINUX_LABEL(smp_##x)\
+ "jmp "SYMBOL_NAME_STR(smp_##x)"\n\t" \
"jmp ret_from_intr\n");
#define BUILD_SMP_TIMER_INTERRUPT(x,v) XBUILD_SMP_TIMER_INTERRUPT(x,v)
#define XBUILD_SMP_TIMER_INTERRUPT(x,v) \
asmlinkage void x(struct pt_regs * regs); \
-asmlinkage void call_##x(void); \
__asm__( \
"\n"__ALIGN_STR"\n" \
SYMBOL_NAME_STR(x) ":\n\t" \
@@ -144,19 +144,18 @@
SAVE_ALL \
"movl %esp,%eax\n\t" \
"pushl %eax\n\t" \
- SYMBOL_NAME_STR(call_##x)":\n\t" \
+ RTLINUX_LABEL(smp_##x)\
"call "SYMBOL_NAME_STR(smp_##x)"\n\t" \
"addl $4,%esp\n\t" \
"jmp ret_from_intr\n");
#define BUILD_COMMON_IRQ() \
-asmlinkage void call_do_IRQ(void); \
__asm__( \
"\n" __ALIGN_STR"\n" \
"common_interrupt:\n\t" \
SAVE_ALL \
"pushl $ret_from_intr\n\t" \
- SYMBOL_NAME_STR(call_do_IRQ)":\n\t" \
+ RTLINUX_LABEL(do_IRQ)"\n\t" \
"jmp "SYMBOL_NAME_STR(do_IRQ));
/*
diff -uNr linux-v2.4.4/include/asm-i386/pgalloc.h rtlinux_kernel_2_4/include/asm-i386/pgalloc.h
--- linux-v2.4.4/include/asm-i386/pgalloc.h Thu Jun 21 17:32:44 2001
+++ rtlinux_kernel_2_4/include/asm-i386/pgalloc.h Thu Jun 21 17:29:09 2001
@@ -147,6 +147,33 @@
extern int do_check_pgt_cache(int, int);
+extern inline void set_pgdir(unsigned long address, pgd_t entry)
+{
+ struct task_struct * p;
+ pgd_t *pgd;
+#ifdef CONFIG_SMP
+ int i;
+#endif
+
+ read_lock(&tasklist_lock);
+ for_each_task(p) {
+ if (!p->mm)
+ continue;
+ *pgd_offset(p->mm,address) = entry;
+ }
+ read_unlock(&tasklist_lock);
+#ifndef CONFIG_SMP
+ for (pgd = (pgd_t *)pgd_quicklist; pgd; pgd = (pgd_t *)*(unsigned long *)pgd)
+ pgd[address >> PGDIR_SHIFT] = entry;
+#else
+ /* To pgd_alloc/pgd_free, one holds master kernel lock and so does our callee, so we can
+ modify pgd caches of other CPUs as well. -jj */
+ for (i = 0; i < NR_CPUS; i++)
+ for (pgd = (pgd_t *)cpu_data[i].pgd_quick; pgd; pgd = (pgd_t *)*(unsigned long *)pgd)
+ pgd[address >> PGDIR_SHIFT] = entry;
+#endif
+}
+
/*
* TLB flushing:
*
diff -uNr linux-v2.4.4/include/asm-i386/rtlinux.h rtlinux_kernel_2_4/include/asm-i386/rtlinux.h
--- linux-v2.4.4/include/asm-i386/rtlinux.h Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/include/asm-i386/rtlinux.h Thu Jun 21 17:29:00 2001
@@ -0,0 +1,14 @@
+
+/* RTLinux support for patching the running kernel.
+ * (c) Victor Yodaiken 1999
+*/
+
+#define label_ack_APIC() xlabel_code(0x12344321)
+#define xlabel_code(x) asm __volatile__(".section rtlinux_patch,\"a\"\n .align 4\n"\
+ ".long 1f,"#x"\n" ".previous\n 1:\n" );
+#define RTLINUX_LABEL(x)\
+ ".section rtlinux_patch,\"a\"\n .align 4\n .long 1f,"#x"\n .previous\n 1:\n"
+
+#define RTLINUX_EXPORT(x)\
+ asm (".section rtlinux_funcs,\"a\"\n .align 4\n"\
+ ".long "#x"\n .previous\n" );
diff -uNr linux-v2.4.4/include/asm-i386/rtlinux_cli.h rtlinux_kernel_2_4/include/asm-i386/rtlinux_cli.h
--- linux-v2.4.4/include/asm-i386/rtlinux_cli.h Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/include/asm-i386/rtlinux_cli.h Thu Jun 21 17:27:11 2001
@@ -0,0 +1,43 @@
+#ifndef RTLINUX_CLI_H
+#define RTLINUX_CLI_H
+
+/* interrupt control.. */
+#define rtl_hard_save_flags_kernel(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */ :"memory")
+#define rtl_hard_restore_flags_kernel(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
+#define rtl_hard_cli_kernel() __asm__ __volatile__("cli": : :"memory")
+#define rtl_hard_sti_kernel() __asm__ __volatile__("sti": : :"memory")
+
+/* For spinlocks etc */
+#define rtl_hard_local_irq_save_kernel(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory")
+#define rtl_hard_local_irq_restore_kernel(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
+#define rtl_hard_local_irq_disable_kernel() __asm__ __volatile__("cli": : :"memory")
+#define rtl_hard_local_irq_enable_kernel() __asm__ __volatile__("sti": : :"memory")
+struct irq_control_s {
+ void (*do_save_flags)(unsigned long *);
+ void (*do_restore_flags)(unsigned long);
+ void (*do_cli)(void);
+ void (*do_sti)(void);
+ void (*do_local_irq_save)(unsigned long *);
+ void (*do_local_irq_restore)(unsigned long);
+};
+extern struct irq_control_s irq_control;
+#undef __cli()
+#undef __sti()
+#undef __save_flags(x)
+#undef __restore_flags(x)
+#undef local_irq_save(x)
+#undef local_irq_restore(x)
+#undef local_irq_disable()
+#undef local_irq_enable()
+#define __save_flags(x) irq_control.do_save_flags(&x)
+#define __restore_flags(x) irq_control.do_restore_flags(x)
+#define __cli() irq_control.do_cli()
+#define __sti() irq_control.do_sti()
+#define local_irq_save(x) irq_control.do_local_irq_save((&x))
+#define local_irq_restore(x) irq_control.do_local_irq_restore(x)
+#define local_irq_disable() irq_control.do_cli()
+#define local_irq_enable() irq_control.do_sti()
+
+#undef safe_halt()
+#define safe_halt() do { __asm__ __volatile__("cli; nop; sti; hlt": : :"memory"); irq_control.do_sti(); } while (0)
+#endif /* RTLINUX_CLI_H */
diff -uNr linux-v2.4.4/include/asm-i386/rwlock.h rtlinux_kernel_2_4/include/asm-i386/rwlock.h
--- linux-v2.4.4/include/asm-i386/rwlock.h Thu Jun 21 17:31:39 2001
+++ rtlinux_kernel_2_4/include/asm-i386/rwlock.h Thu Jun 21 17:26:52 2001
@@ -28,7 +28,7 @@
"2:\tcall " helper "\n\t" \
"jmp 1b\n" \
".previous" \
- ::"a" (rw) : "memory")
+ : :"a" (rw) : "memory")
#define __build_read_lock_const(rw, helper) \
asm volatile(LOCK "subl $1,%0\n\t" \
@@ -58,7 +58,7 @@
"2:\tcall " helper "\n\t" \
"jmp 1b\n" \
".previous" \
- ::"a" (rw) : "memory")
+ : :"a" (rw) : "memory")
#define __build_write_lock_const(rw, helper) \
asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
diff -uNr linux-v2.4.4/include/asm-i386/smp.h rtlinux_kernel_2_4/include/asm-i386/smp.h
--- linux-v2.4.4/include/asm-i386/smp.h Thu Jun 21 17:29:03 2001
+++ rtlinux_kernel_2_4/include/asm-i386/smp.h Thu Jun 21 17:24:22 2001
@@ -11,6 +11,7 @@
#endif
#ifdef CONFIG_X86_LOCAL_APIC
+#include <asm/rtlinux.h>
#ifndef ASSEMBLY
#include <asm/fixmap.h>
#include <asm/bitops.h>
@@ -82,6 +83,7 @@
/* we don't want to mark this access volatile - bad code generation */
return GET_APIC_ID(*(unsigned long *)(APIC_BASE+APIC_ID));
}
+#define hw_smp_processor_id() (x86_apicid_to_cpu[hard_smp_processor_id() ])
#endif /* !ASSEMBLY */
@@ -99,5 +101,7 @@
#define PROC_CHANGE_PENALTY 15 /* Schedule penalty */
+#else
+#define hw_smp_processor_id() (0)
#endif
#endif
diff -uNr linux-v2.4.4/include/asm-i386/system.h rtlinux_kernel_2_4/include/asm-i386/system.h
--- linux-v2.4.4/include/asm-i386/system.h Thu Jun 21 17:32:30 2001
+++ rtlinux_kernel_2_4/include/asm-i386/system.h Thu Jun 21 17:28:37 2001
@@ -4,6 +4,7 @@
#include <linux/config.h>
#include <linux/kernel.h>
#include <asm/segment.h>
+#include <asm/rtlinux.h>
#include <linux/bitops.h> /* for LOCK_PREFIX */
#ifdef __KERNEL__
@@ -300,6 +301,9 @@
#define local_irq_disable() __cli()
#define local_irq_enable() __sti()
+#ifdef CONFIG_RTLINUX
+#include <asm/rtlinux_cli.h>
+#endif
#ifdef CONFIG_SMP
extern void __global_cli(void);
diff -uNr linux-v2.4.4/include/asm-ppc/atomic.h rtlinux_kernel_2_4/include/asm-ppc/atomic.h
--- linux-v2.4.4/include/asm-ppc/atomic.h Thu Jun 21 17:31:16 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/atomic.h Thu Jun 21 17:26:15 2001
@@ -86,4 +86,26 @@
#define atomic_dec(v) ((void) atomic_dec_return((v)))
#define atomic_dec_and_test(v) (atomic_dec_return((v)) == 0)
+/*
+ * Atomically test *v and decrement if it is greater than 0.
+ * The function returns the old value of *v minus 1.
+ */
+static __inline__ int atomic_dec_if_positive(atomic_t *v)
+{
+ int t;
+
+ __asm__ __volatile__("\n"
+"1: lwarx %0,0,%2\n"
+" addic. %0,%0,-1\n"
+" blt 2f\n"
+" stwcx. %0,0,%2\n"
+" bne 1b\n"
+"2:"
+ : "=&r" (t), "=m" (v->counter)
+ : "r" (&v->counter), "m" (v->counter)
+ : "cc");
+
+ return t;
+}
+
#endif /* _ASM_PPC_ATOMIC_H_ */
diff -uNr linux-v2.4.4/include/asm-ppc/bseip.h rtlinux_kernel_2_4/include/asm-ppc/bseip.h
--- linux-v2.4.4/include/asm-ppc/bseip.h Thu Jun 21 17:33:13 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/bseip.h Thu Jun 21 17:30:11 2001
@@ -8,6 +8,7 @@
#ifndef __MACH_BSEIP_DEFS
#define __MACH_BSEIP_DEFS
+#ifndef __ASSEMBLY__
/* A Board Information structure that is given to a program when
* prom starts it up.
*/
@@ -29,6 +30,7 @@
#define IMAP_SIZE ((uint)(64 * 1024))
#define PCMCIA_MEM_ADDR ((uint)0x04000000)
#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
+#endif /* !__ASSEMBLY__ */
/* We don't use the 8259.
*/
diff -uNr linux-v2.4.4/include/asm-ppc/elf.h rtlinux_kernel_2_4/include/asm-ppc/elf.h
--- linux-v2.4.4/include/asm-ppc/elf.h Thu Jun 21 17:29:32 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/elf.h Thu Jun 21 17:24:44 2001
@@ -74,20 +74,39 @@
* We need to put in some extra aux table entries to tell glibc what
* the cache block size is, so it can use the dcbz instruction safely.
*/
-#define AT_DCACHEBSIZE 17
-#define AT_ICACHEBSIZE 18
-#define AT_UCACHEBSIZE 19
+#define AT_DCACHEBSIZE 19
+#define AT_ICACHEBSIZE 20
+#define AT_UCACHEBSIZE 21
+/* A special ignored type value for PPC, for glibc compatibility. */
+#define AT_IGNOREPPC 22
extern int dcache_bsize;
extern int icache_bsize;
extern int ucache_bsize;
-#define DLINFO_EXTRA_ITEMS 3
-#define EXTRA_DLINFO do { \
- NEW_AUX_ENT(0, AT_DCACHEBSIZE, dcache_bsize); \
- NEW_AUX_ENT(1, AT_ICACHEBSIZE, icache_bsize); \
- NEW_AUX_ENT(2, AT_UCACHEBSIZE, ucache_bsize); \
-} while (0)
+/*
+ * The requirements here are:
+ * - keep the final alignment of sp (sp & 0xf)
+ * - make sure the 32-bit value at the first 16 byte aligned position of
+ * AUXV is greater than 16 for glibc compatibility.
+ * AT_IGNOREPPC is used for that.
+ * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC,
+ * even if DLINFO_ARCH_ITEMS goes to zero or is undefined.
+ */
+#define DLINFO_ARCH_ITEMS 3
+#define ARCH_DLINFO \
+do { \
+ sp -= DLINFO_ARCH_ITEMS * 2; \
+ NEW_AUX_ENT(0, AT_DCACHEBSIZE, dcache_bsize); \
+ NEW_AUX_ENT(1, AT_ICACHEBSIZE, icache_bsize); \
+ NEW_AUX_ENT(2, AT_UCACHEBSIZE, ucache_bsize); \
+ /* \
+ * Now handle glibc compatibility. \
+ */ \
+ sp -= 2*2; \
+ NEW_AUX_ENT(0, AT_IGNOREPPC, AT_IGNOREPPC); \
+ NEW_AUX_ENT(1, AT_IGNOREPPC, AT_IGNOREPPC); \
+ } while (0)
#endif /* __KERNEL__ */
#endif
diff -uNr linux-v2.4.4/include/asm-ppc/fads.h rtlinux_kernel_2_4/include/asm-ppc/fads.h
--- linux-v2.4.4/include/asm-ppc/fads.h Thu Jun 21 17:31:55 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/fads.h Thu Jun 21 17:27:24 2001
@@ -8,6 +8,7 @@
#ifndef __MACH_FADS_DEFS
#define __MACH_FADS_DEFS
+#ifndef __ASSEMBLY__
/* A Board Information structure that is given to a program when
* prom starts it up.
*/
@@ -16,24 +17,54 @@
unsigned int bi_memsize; /* Memory (end) size in bytes */
unsigned int bi_intfreq; /* Internal Freq, in Hz */
unsigned int bi_busfreq; /* Bus Freq, in Hz */
+ unsigned char bi_enetaddr[6];
+ unsigned int bi_baudrate;
} bd_t;
extern bd_t m8xx_board_info;
/* Memory map is configured by the PROM startup.
* I tried to follow the FADS manual, although the startup PROM
- * dictates this.
+ * dictates this and we simply have to move some of the physical
+ * addresses for Linux.
*/
-#define BCSR_ADDR ((uint)0x02100000)
+#define BCSR_ADDR ((uint)0xfe000000)
#define BCSR_SIZE ((uint)(64 * 1024))
-#define BCSR0 ((uint)0x02100000)
-#define BCSR1 ((uint)0x02100004)
-#define BCSR2 ((uint)0x02100008)
-#define BCSR3 ((uint)0x0210000c)
-#define BCSR4 ((uint)0x02100010)
-#define IMAP_ADDR ((uint)0x02200000)
+#define BCSR0 ((uint)0xfe000000)
+#define BCSR1 ((uint)0xfe000004)
+#define BCSR2 ((uint)0xfe000008)
+#define BCSR3 ((uint)0xfe00000c)
+#define BCSR4 ((uint)0xfe000010)
+#define IMAP_ADDR ((uint)0xf0000000)
#define IMAP_SIZE ((uint)(64 * 1024))
#define PCMCIA_MEM_ADDR ((uint)0x04000000)
#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
+
+/* Bits of interest in the BCSRs.
+ */
+#define BCSR1_ETHEN ((uint)0x20000000)
+#define BCSR1_RS232EN_1 ((uint)0x01000000)
+#define BCSR1_RS232EN_2 ((uint)0x00040000)
+#define BCSR4_ETHLOOP ((uint)0x80000000) /* EEST Loopback */
+#define BCSR4_EEFDX ((uint)0x40000000) /* EEST FDX enable */
+#define BCSR4_FETH_EN ((uint)0x08000000) /* PHY enable */
+#define BCSR4_FETHCFG0 ((uint)0x04000000) /* PHY autoneg mode */
+#define BCSR4_FETHCFG1 ((uint)0x00400000) /* PHY autoneg mode */
+#define BCSR4_FETHFDE ((uint)0x02000000) /* PHY FDX advertise */
+#define BCSR4_FETHRST ((uint)0x00200000) /* PHY Reset */
+#endif /* !__ASSEMBLY__ */
+
+/* Interrupt level assignments.
+ */
+#define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */
+#define PHY_INTERRUPT SIU_IRQ2 /* PHY link change interrupt */
+
+/* We don't use the 8259.
+ */
+#define NR_8259_INTS 0
+
+/* Machine type
+ */
+#define _MACH_8xx (_MACH_fads)
#endif
diff -uNr linux-v2.4.4/include/asm-ppc/gemini.h rtlinux_kernel_2_4/include/asm-ppc/gemini.h
--- linux-v2.4.4/include/asm-ppc/gemini.h Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/include/asm-ppc/gemini.h Thu Jun 21 17:28:03 2001
@@ -0,0 +1,168 @@
+/*
+ * include/asm-ppc/gemini.h
+ *
+ *
+ * Onboard registers and descriptions for Synergy Microsystems'
+ * "Gemini" boards.
+ *
+ */
+#ifdef __KERNEL__
+#ifndef __PPC_GEMINI_H
+#define __PPC_GEMINI_H
+
+/* Registers */
+
+#define GEMINI_SERIAL_B (0xffeffb00)
+#define GEMINI_SERIAL_A (0xffeffb08)
+#define GEMINI_USWITCH (0xffeffd00)
+#define GEMINI_BREV (0xffeffe00)
+#define GEMINI_BECO (0xffeffe08)
+#define GEMINI_FEAT (0xffeffe10)
+#define GEMINI_BSTAT (0xffeffe18)
+#define GEMINI_CPUSTAT (0xffeffe20)
+#define GEMINI_L2CFG (0xffeffe30)
+#define GEMINI_MEMCFG (0xffeffe38)
+#define GEMINI_FLROM (0xffeffe40)
+#define GEMINI_P0PCI (0xffeffe48)
+#define GEMINI_FLWIN (0xffeffe50)
+#define GEMINI_P0INTMASK (0xffeffe60)
+#define GEMINI_P0INTAP (0xffeffe68)
+#define GEMINI_PCIERR (0xffeffe70)
+#define GEMINI_LEDBASE (0xffeffe80)
+#define GEMINI_RTC (0xffe9fff8)
+#define GEMINI_LEDS 8
+#define GEMINI_SWITCHES 8
+
+
+/* Flash ROM bit definitions */
+#define GEMINI_FLS_WEN (1<<0)
+#define GEMINI_FLS_JMP (1<<6)
+#define GEMINI_FLS_BOOT (1<<7)
+
+/* Memory bit definitions */
+#define GEMINI_MEM_TYPE_MASK 0xc0
+#define GEMINI_MEM_SIZE_MASK 0x38
+#define GEMINI_MEM_BANK_MASK 0x07
+
+/* L2 cache bit definitions */
+#define GEMINI_L2_SIZE_MASK 0xc0
+#define GEMINI_L2_RATIO_MASK 0x03
+
+/* Timebase register bit definitons */
+#define GEMINI_TIMEB0_EN (1<<0)
+#define GEMINI_TIMEB1_EN (1<<1)
+#define GEMINI_TIMEB2_EN (1<<2)
+#define GEMINI_TIMEB3_EN (1<<3)
+
+/* CPU status bit definitions */
+#define GEMINI_CPU_ID_MASK 0x03
+#define GEMINI_CPU_COUNT_MASK 0x0c
+#define GEMINI_CPU0_HALTED (1<<4)
+#define GEMINI_CPU1_HALTED (1<<5)
+#define GEMINI_CPU2_HALTED (1<<6)
+#define GEMINI_CPU3_HALTED (1<<7)
+
+/* Board status bit definitions */
+#define GEMINI_BRD_FAIL (1<<0) /* FAIL led is lit */
+#define GEMINI_BRD_BUS_MASK 0x0c /* PowerPC bus speed */
+
+/* Board family/feature bit descriptions */
+#define GEMINI_FEAT_HAS_FLASH (1<<0)
+#define GEMINI_FEAT_HAS_ETH (1<<1)
+#define GEMINI_FEAT_HAS_SCSI (1<<2)
+#define GEMINI_FEAT_HAS_P0 (1<<3)
+#define GEMINI_FEAT_FAM_MASK 0xf0
+
+/* Mod/ECO bit definitions */
+#define GEMINI_ECO_LEVEL_MASK 0x0f
+#define GEMINI_MOD_MASK 0xf0
+
+/* Type/revision bit definitions */
+#define GEMINI_REV_MASK 0x0f
+#define GEMINI_TYPE_MASK 0xf0
+
+/* User switch definitions */
+#define GEMINI_SWITCH_VERBOSE 1 /* adds "debug" to boot cmd line */
+#define GEMINI_SWITCH_SINGLE_USER 7 /* boots into "single-user" mode */
+
+#define SGS_RTC_CONTROL 0
+#define SGS_RTC_SECONDS 1
+#define SGS_RTC_MINUTES 2
+#define SGS_RTC_HOURS 3
+#define SGS_RTC_DAY 4
+#define SGS_RTC_DAY_OF_MONTH 5
+#define SGS_RTC_MONTH 6
+#define SGS_RTC_YEAR 7
+
+#define SGS_RTC_SET 0x80
+#define SGS_RTC_IS_STOPPED 0x80
+
+#define GRACKLE_CONFIG_ADDR_ADDR (0xfec00000)
+#define GRACKLE_CONFIG_DATA_ADDR (0xfee00000)
+
+#define GEMINI_BOOT_INIT (0xfff00100)
+
+#ifndef __ASSEMBLY__
+
+static inline void grackle_write( unsigned long addr, unsigned long data )
+{
+ __asm__ __volatile__(
+ " stwbrx %1, 0, %0\n \
+ sync\n \
+ stwbrx %3, 0, %2\n \
+ sync "
+ : /* no output */
+ : "r" (GRACKLE_CONFIG_ADDR_ADDR), "r" (addr),
+ "r" (GRACKLE_CONFIG_DATA_ADDR), "r" (data));
+}
+
+static inline unsigned long grackle_read( unsigned long addr )
+{
+ unsigned long val;
+
+ __asm__ __volatile__(
+ " stwbrx %1, 0, %2\n \
+ sync\n \
+ lwbrx %0, 0, %3\n \
+ sync "
+ : "=r" (val)
+ : "r" (addr), "r" (GRACKLE_CONFIG_ADDR_ADDR),
+ "r" (GRACKLE_CONFIG_DATA_ADDR));
+
+ return val;
+}
+
+static inline void gemini_led_on( int led )
+{
+ if (led >= 0 && led < GEMINI_LEDS)
+ *(unsigned char *)(GEMINI_LEDBASE + (led<<3)) = 1;
+}
+
+static inline void gemini_led_off(int led)
+{
+ if (led >= 0 && led < GEMINI_LEDS)
+ *(unsigned char *)(GEMINI_LEDBASE + (led<<3)) = 0;
+}
+
+static inline int gemini_led_val(int led)
+{
+ int val = 0;
+ if (led >= 0 && led < GEMINI_LEDS)
+ val = *(unsigned char *)(GEMINI_LEDBASE + (led<<3));
+ return (val & 0x1);
+}
+
+/* returns processor id from the board */
+static inline int gemini_processor(void)
+{
+ unsigned char cpu = *(unsigned char *)(GEMINI_CPUSTAT);
+ return (int) ((cpu == 0) ? 4 : (cpu & GEMINI_CPU_ID_MASK));
+}
+
+
+extern void _gemini_reboot(void);
+extern void gemini_prom_init(void);
+extern void gemini_init_l2(void);
+#endif /* __ASSEMBLY__ */
+#endif
+#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/asm-ppc/gemini_serial.h rtlinux_kernel_2_4/include/asm-ppc/gemini_serial.h
--- linux-v2.4.4/include/asm-ppc/gemini_serial.h Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/include/asm-ppc/gemini_serial.h Thu Jun 21 17:27:47 2001
@@ -0,0 +1,41 @@
+#ifdef __KERNEL__
+#ifndef __ASMPPC_GEMINI_SERIAL_H
+#define __ASMPPC_GEMINI_SERIAL_H
+
+#include <linux/config.h>
+#include <asm/gemini.h>
+
+#ifdef CONFIG_SERIAL_MANY_PORTS
+#define RS_TABLE_SIZE 64
+#else
+#define RS_TABLE_SIZE 4
+#endif
+
+/* Rate for the 24.576 Mhz clock for the onboard serial chip */
+#define BASE_BAUD (24576000 / 16)
+
+#ifdef CONFIG_SERIAL_DETECT_IRQ
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
+#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_AUTO_IRQ)
+#else
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
+#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF)
+#endif
+
+#define STD_SERIAL_PORT_DEFNS \
+ { 0, BASE_BAUD, GEMINI_SERIAL_A, 15, STD_COM_FLAGS }, /* ttyS0 */ \
+ { 0, BASE_BAUD, GEMINI_SERIAL_B, 14, STD_COM_FLAGS }, /* ttyS1 */ \
+
+#ifdef CONFIG_GEMINI_PU32
+#define PU32_SERIAL_PORT_DEFNS \
+ { 0, BASE_BAUD, NULL, 0, STD_COM_FLAGS },
+#else
+#define PU32_SERIAL_PORT_DEFNS
+#endif
+
+#define SERIAL_PORT_DFNS \
+ STD_SERIAL_PORT_DEFNS \
+ PU32_SERIAL_PORT_DEFNS
+
+#endif
+#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/asm-ppc/hw_irq.h rtlinux_kernel_2_4/include/asm-ppc/hw_irq.h
--- linux-v2.4.4/include/asm-ppc/hw_irq.h Thu Jun 21 17:32:29 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/hw_irq.h Thu Jun 21 17:28:33 2001
@@ -7,31 +7,18 @@
#ifndef _PPC_HW_IRQ_H
#define _PPC_HW_IRQ_H
-struct int_control_struct
-{
- void (*int_cli)(void);
- void (*int_sti)(void);
- void (*int_restore_flags)(unsigned long);
- void (*int_save_flags)(unsigned long *);
- void (*int_set_lost)(unsigned long);
-};
-extern struct int_control_struct int_control;
extern unsigned long timer_interrupt_intercept;
extern unsigned long do_IRQ_intercept;
int timer_interrupt(struct pt_regs *);
-extern void __no_use_sti(void);
-extern void __no_use_cli(void);
-extern void __no_use_restore_flags(unsigned long);
-extern void __no_use_save_flags(unsigned long *);
-extern void __no_use_set_lost(unsigned long);
+extern void __sti(void);
+extern void __cli(void);
+extern void __restore_flags(unsigned long);
+extern void __save_flags_ptr(unsigned long *);
+extern unsigned long __sti_end, __cli_end, __restore_flags_end, __save_flags_ptr_end;
-#define __cli() int_control.int_cli()
-#define __sti() int_control.int_sti()
-#define __save_flags(flags) int_control.int_save_flags((unsigned long *)&flags)
-#define __restore_flags(flags) int_control.int_restore_flags((unsigned long)flags)
+#define __save_flags(flags) __save_flags_ptr((unsigned long *)&flags)
#define __save_and_cli(flags) ({__save_flags(flags);__cli();})
-#define __set_lost(irq) ({ if ((unsigned long)int_control.int_set_lost) int_control.int_set_lost(irq); })
extern void do_lost_interrupts(unsigned long);
diff -uNr linux-v2.4.4/include/asm-ppc/ide.h rtlinux_kernel_2_4/include/asm-ppc/ide.h
--- linux-v2.4.4/include/asm-ppc/ide.h Thu Jun 21 17:31:41 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/ide.h Thu Jun 21 17:26:58 2001
@@ -16,7 +16,7 @@
#include <asm/processor.h>
#ifndef MAX_HWIFS
-#define MAX_HWIFS 4
+#define MAX_HWIFS 8
#endif
#include <asm/hdreg.h>
@@ -159,8 +159,13 @@
} b;
} select_t;
+#if !defined(ide_request_irq)
#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
+#endif
+
+#if !defined(ide_free_irq)
#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
+#endif
/*
* The following are not needed for the non-m68k ports
diff -uNr linux-v2.4.4/include/asm-ppc/machdep.h rtlinux_kernel_2_4/include/asm-ppc/machdep.h
--- linux-v2.4.4/include/asm-ppc/machdep.h Thu Jun 21 17:29:03 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/machdep.h Thu Jun 21 17:24:21 2001
@@ -22,7 +22,6 @@
unsigned int (*irq_cannonicalize)(unsigned int irq);
void (*init_IRQ)(void);
int (*get_irq)(struct pt_regs *);
- void (*post_irq)( struct pt_regs *, int );
/* A general init function, called by ppc_init in init/main.c.
May be NULL. */
@@ -41,6 +40,7 @@
unsigned long heartbeat_reset;
unsigned long heartbeat_count;
+ unsigned long (*find_end_of_memory)(void);
void (*progress)(char *, unsigned short);
unsigned char (*nvram_read_val)(int addr);
diff -uNr linux-v2.4.4/include/asm-ppc/mbx.h rtlinux_kernel_2_4/include/asm-ppc/mbx.h
--- linux-v2.4.4/include/asm-ppc/mbx.h Thu Jun 21 17:29:40 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/mbx.h Thu Jun 21 17:24:50 2001
@@ -11,6 +11,7 @@
#ifndef __MACH_MBX_DEFS
#define __MACH_MBX_DEFS
+#ifndef __ASSEMBLY__
/* A Board Information structure that is given to a program when
* EPPC-Bug starts it up.
*/
@@ -25,7 +26,13 @@
unsigned int bi_busfreq; /* Bus Freq, in Hz */
unsigned int bi_clun; /* Boot device controller */
unsigned int bi_dlun; /* Boot device logical dev */
- unsigned int bi_baudrate; /* ...to be like everyone else */
+
+ /* These fields are not part of the board information structure
+ * provided by the boot rom. They are filled in by embed_config.c
+ * so we have the information consistent with other platforms.
+ */
+ unsigned char bi_enetaddr[6];
+ unsigned int bi_baudrate;
} bd_t;
/* Memory map for the MBX as configured by EPPC-Bug. We could reprogram
@@ -78,6 +85,7 @@
#define ISA_BRIDGE_INT SIU_IRQ3 /* All those PC things */
#define COMM_L_INT SIU_IRQ6 /* MBX Comm expansion connector pin */
#define STOP_ABRT_INT SIU_IRQ7 /* Stop/Abort header pin */
+#endif /* !__ASSEMBLY__ */
/* The MBX uses the 8259.
*/
diff -uNr linux-v2.4.4/include/asm-ppc/mmu_context.h rtlinux_kernel_2_4/include/asm-ppc/mmu_context.h
--- linux-v2.4.4/include/asm-ppc/mmu_context.h Thu Jun 21 17:29:03 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/mmu_context.h Thu Jun 21 17:24:20 2001
@@ -18,6 +18,12 @@
of any task that makes a kernel entry. Shared does not mean they
are not protected, just that the ASID comparison is not performed.
-- Dan
+
+ The IBM4xx has 256 contexts, so we can just rotate through these
+ as a way of "switching" contexts. If the TID of the TLB is zero,
+ the PID/TID comparison is disabled, so we can use a TID of zero
+ to represent all kernel pages as shared among all contexts.
+ -- Dan
*/
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
@@ -26,12 +32,22 @@
#ifdef CONFIG_8xx
#define NO_CONTEXT 16
#define LAST_CONTEXT 15
+#define BASE_CONTEXT (-1)
+#define MUNGE_CONTEXT(n) (n)
+#define flush_hash_segments(X, Y) do { } while (0)
+
+#elif CONFIG_4xx
+#define NO_CONTEXT 256
+#define LAST_CONTEXT 255
+#define BASE_CONTEXT (0)
#define MUNGE_CONTEXT(n) (n)
+#define flush_hash_segments(X, Y) do { } while (0)
#else
/* PPC 6xx, 7xx CPUs */
#define NO_CONTEXT 0
+#define BASE_CONTEXT (0)
#define LAST_CONTEXT 0xfffff
/*
diff -uNr linux-v2.4.4/include/asm-ppc/mpc8xx.h rtlinux_kernel_2_4/include/asm-ppc/mpc8xx.h
--- linux-v2.4.4/include/asm-ppc/mpc8xx.h Thu Jun 21 17:30:14 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/mpc8xx.h Thu Jun 21 17:25:24 2001
@@ -63,11 +63,14 @@
#define PCI_DRAM_OFFSET 0
#endif
#else
+#if !defined(_IO_BASE) /* defined in board specific header */
#define _IO_BASE 0
+#endif
#define _ISA_MEM_BASE 0
#define PCI_DRAM_OFFSET 0
#endif
+#ifndef __ASSEMBLY__
extern unsigned long isa_io_base;
extern unsigned long isa_mem_base;
extern unsigned long pci_dram_offset;
@@ -82,6 +85,7 @@
unsigned long flags,
const char *device,
void *dev_id);
+#endif /* !__ASSEMBLY__ */
#endif /* CONFIG_8xx */
#endif
#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/asm-ppc/oak.h rtlinux_kernel_2_4/include/asm-ppc/oak.h
--- linux-v2.4.4/include/asm-ppc/oak.h Thu Jun 21 17:33:45 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/oak.h Thu Jun 21 17:31:17 2001
@@ -66,5 +66,10 @@
}
#endif
+/* Generic 4xx type
+*/
+#define _MACH_4xx (_MACH_oak)
+
+
#endif /* __OAK_H__ */
#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/asm-ppc/pci-bridge.h rtlinux_kernel_2_4/include/asm-ppc/pci-bridge.h
--- linux-v2.4.4/include/asm-ppc/pci-bridge.h Thu Jun 21 17:30:18 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/pci-bridge.h Thu Jun 21 17:25:26 2001
@@ -27,6 +27,11 @@
extern struct pci_controller*
pci_find_hose_for_OF_device(struct device_node* node);
+/* Fill up host controller resources from the OF node */
+extern void
+pci_process_bridge_OF_ranges(struct pci_controller *hose,
+ struct device_node *dev, int primary);
+
/*
* Structure of a PCI controller (host bridge)
*/
diff -uNr linux-v2.4.4/include/asm-ppc/ppc4xx.h rtlinux_kernel_2_4/include/asm-ppc/ppc4xx.h
--- linux-v2.4.4/include/asm-ppc/ppc4xx.h Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/include/asm-ppc/ppc4xx.h Thu Jun 21 17:27:44 2001
@@ -0,0 +1,282 @@
+/*
+ *
+ * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
+ *
+ * Module name: ppc4xx.h
+ *
+ * Description:
+ * A generic include file which pulls in appropriate include files
+ * for specific board types based on configuration settings.
+ *
+ */
+
+#ifdef __KERNEL__
+#ifndef __PPC4XX_H__
+#define __PPC4XX_H__
+
+#include <linux/config.h>
+
+#ifndef __ASSEMBLY__
+
+#if defined(CONFIG_OAK)
+#include <asm/oak.h>
+#endif
+
+#if defined(CONFIG_WALNUT)
+#include <asm/walnut.h>
+#endif
+
+/* IO_BASE is for PCI I/O.
+ * ISA not supported, just here to resolve copilation.
+ */
+
+#define _IO_BASE 0xe8000000 /* The PCI address window */
+#define _ISA_MEM_BASE 0
+#define PCI_DRAM_OFFSET 0
+
+extern unsigned long isa_io_base;
+
+/*
+ * The "residual" board information structure the boot loader passes
+ * into the kernel.
+ */
+extern unsigned char __res[];
+
+/* I don't know if this is general to 4xx, or unique to a specific
+ * processor or board. In any case it is easy to move.
+ */
+#define PPC4xx_PCI_IO_ADDR ((uint)0xe8000000)
+#define PPC4xx_PCI_IO_SIZE ((uint)64*1024)
+#define PPC4xx_PCI_CFG_ADDR ((uint)0xeec00000)
+#define PPC4xx_PCI_CFG_SIZE ((uint)4*1024)
+#define PPC4xx_PCI_LCFG_ADDR ((uint)0xef400000)
+#define PPC4xx_PCI_LCFG_SIZE ((uint)4*1024)
+#define PPC4xx_ONB_IO_ADDR ((uint)0xef600000)
+#define PPC4xx_ONB_IO_SIZE ((uint)4*1024)
+
+#endif /* __ASSEMBLY__ */
+
+/* Device Control Registers unique to 4xx */
+
+#define DCRN_BEAR 0x090 /* Bus Error Address Register */
+#define DCRN_BESR 0x091 /* Bus Error Syndrome Register */
+#define BESR_DSES 0x80000000 /* Data-Side Error Status */
+#define BESR_DMES 0x40000000 /* DMA Error Status */
+#define BESR_RWS 0x20000000 /* Read/Write Status */
+#define BESR_ETMASK 0x1C000000 /* Error Type */
+#define ET_PROT 0
+#define ET_PARITY 1
+#define ET_NCFG 2
+#define ET_BUSERR 4
+#define ET_BUSTO 6
+#define DCRN_CHCR0 0x0B1 /* Chip Control Register 1 */
+#define DCRN_CHCR1 0x0B2 /* Chip Control Register 2 */
+#define DCRN_CHPSR 0x0B4 /* Chip Pin Strapping */
+#define DCRN_CPMER 0x0B9 /* CPM Enable */
+#define DCRN_CPMFR 0x0BA /* CPM Force */
+#define CPM_IIC 0x80000000 /* IIC interface */
+#define CPM_PCI 0x40000000 /* PCI bridge */
+#define CPM_CPU 0x20000000 /* processor core */
+#define CPM_DMA 0x10000000 /* DMA controller */
+#define CPM_BRG 0x08000000 /* PLB to OPB bridge */
+#define CPM_DCP 0x04000000 /* CodePack */
+#define CPM_EBC 0x02000000 /* ROM/SRAM peripheral controller */
+#define CPM_SDRAM 0x01000000 /* SDRAM memory controller */
+#define CPM_PLB 0x00800000 /* PLB bus arbiter */
+#define CPM_GPIO 0x00400000 /* General Purpose IO (??) */
+#define CPM_UART0 0x00200000 /* serial port 0 */
+#define CPM_UART1 0x00100000 /* serial port 1 */
+#define CPM_UIC 0x00080000 /* Universal Interrupt Controller */
+#define CPM_TMRCLK 0x00040000 /* CPU timers */
+#define CPM_EMAC_MM 0x00020000 /* on-chip ethernet MM unit */
+#define CPM_EMAC_RM 0x00010000 /* on-chip ethernet RM unit */
+#define CPM_EMAC_TM 0x00008000 /* on-chip ethernet TM unit */
+#define DCRN_CPMSR 0x0B8 /* CPM Status */
+
+#define DCRN_DMACR0 0x100 /* DMA Channel Control Register 0 */
+#define DCRN_DMACT0 0x101 /* DMA Count Register 0 */
+#define DCRN_DMADA0 0x102 /* DMA Destination Address Register 0 */
+#define DCRN_DMASA0 0x103 /* DMA Source Address Register 0 */
+#define DCRN_ASG0 0x104 /* DMA Scatter/Gather Descriptor Addr 0 */
+
+#define DCRN_DMACR1 0x108 /* DMA Channel Control Register 1 */
+#define DCRN_DMACT1 0x109 /* DMA Count Register 1 */
+#define DCRN_DMADA1 0x10A /* DMA Destination Address Register 1 */
+#define DCRN_DMASA1 0x10B /* DMA Source Address Register 1 */
+#define DCRN_ASG1 0x10C /* DMA Scatter/Gather Descriptor Addr 1 */
+
+#define DCRN_DMACR2 0x110 /* DMA Channel Control Register 2 */
+#define DCRN_DMACT2 0x111 /* DMA Count Register 2 */
+#define DCRN_DMADA2 0x112 /* DMA Destination Address Register 2 */
+#define DCRN_DMASA2 0x113 /* DMA Source Address Register 2 */
+#define DCRN_ASG2 0x114 /* DMA Scatter/Gather Descriptor Addr 2 */
+
+#define DCRN_DMACR3 0x118 /* DMA Channel Control Register 3 */
+#define DCRN_DMACT3 0x119 /* DMA Count Register 3 */
+#define DCRN_DMADA3 0x11A /* DMA Destination Address Register 3 */
+#define DCRN_DMASA3 0x11B /* DMA Source Address Register 3 */
+#define DCRN_ASG3 0x11C /* DMA Scatter/Gather Descriptor Addr 3 */
+
+#define DCRN_DMASR 0x120 /* DMA Status Register */
+#define DCRN_ASGC 0x123 /* DMA Scatter/Gather Command */
+#define DCRN_ADR 0x124 /* DMA Address Decode */
+
+#define DCRN_SLP 0x125 /* DMA Sleep Register */
+#define DCRN_POL 0x126 /* DMA Polarity Register */
+
+
+#define DCRN_EBCCFGADR 0x012 /* Peripheral Controller Address */
+#define DCRN_EBCCFGDATA 0x013 /* Peripheral Controller Data */
+#define DCRN_EXISR 0x040 /* External Interrupt Status Register */
+#define DCRN_EXIER 0x042 /* External Interrupt Enable Register */
+#define EXIER_CIE 0x80000000 /* Critical Interrupt Enable */
+#define EXIER_SRIE 0x08000000 /* Serial Port Rx Int. Enable */
+#define EXIER_STIE 0x04000000 /* Serial Port Tx Int. Enable */
+#define EXIER_JRIE 0x02000000 /* JTAG Serial Port Rx Int. Enable */
+#define EXIER_JTIE 0x01000000 /* JTAG Serial Port Tx Int. Enable */
+#define EXIER_D0IE 0x00800000 /* DMA Channel 0 Interrupt Enable */
+#define EXIER_D1IE 0x00400000 /* DMA Channel 1 Interrupt Enable */
+#define EXIER_D2IE 0x00200000 /* DMA Channel 2 Interrupt Enable */
+#define EXIER_D3IE 0x00100000 /* DMA Channel 3 Interrupt Enable */
+#define EXIER_E0IE 0x00000010 /* External Interrupt 0 Enable */
+#define EXIER_E1IE 0x00000008 /* External Interrupt 1 Enable */
+#define EXIER_E2IE 0x00000004 /* External Interrupt 2 Enable */
+#define EXIER_E3IE 0x00000002 /* External Interrupt 3 Enable */
+#define EXIER_E4IE 0x00000001 /* External Interrupt 4 Enable */
+#define DCRN_IOCR 0x0A0 /* Input/Output Configuration Register */
+#define IOCR_E0TE 0x80000000
+#define IOCR_E0LP 0x40000000
+#define IOCR_E1TE 0x20000000
+#define IOCR_E1LP 0x10000000
+#define IOCR_E2TE 0x08000000
+#define IOCR_E2LP 0x04000000
+#define IOCR_E3TE 0x02000000
+#define IOCR_E3LP 0x01000000
+#define IOCR_E4TE 0x00800000
+#define IOCR_E4LP 0x00400000
+#define IOCR_EDT 0x00080000
+#define IOCR_SOR 0x00040000
+#define IOCR_EDO 0x00008000
+#define IOCR_2XC 0x00004000
+#define IOCR_ATC 0x00002000
+#define IOCR_SPD 0x00001000
+#define IOCR_BEM 0x00000800
+#define IOCR_PTD 0x00000400
+#define IOCR_ARE 0x00000080
+#define IOCR_DRC 0x00000020
+#define IOCR_RDM(x) (((x) & 0x3) << 3)
+#define IOCR_TCS 0x00000004
+#define IOCR_SCS 0x00000002
+#define IOCR_SPC 0x00000001
+#define DCRN_KIAR 0x014 /* Decompression Controller Address */
+#define DCRN_KIDR 0x015 /* Decompression Controller Data */
+#define DCRN_MALCR 0x180 /* MAL Configuration */
+#define MALCR_MMSR 0x80000000 /* MAL Software reset */
+#define MALCR_PLBP_1 0x00400000 /* MAL reqest priority: */
+#define MALCR_PLBP_2 0x00800000 /* lowsest is 00 */
+#define MALCR_PLBP_3 0x00C00000 /* highest */
+#define MALCR_GA 0x00200000 /* Guarded Active Bit */
+#define MALCR_OA 0x00100000 /* Ordered Active Bit */
+#define MALCR_PLBLE 0x00080000 /* PLB Lock Error Bit */
+#define MALCR_PLBLT_1 0x00040000 /* PLB Latency Timer */
+#define MALCR_PLBLT_2 0x00020000
+#define MALCR_PLBLT_3 0x00010000
+#define MALCR_PLBLT_4 0x00008000
+#define MALCR_PLBLT_DEFAULT 0x00078000 /* JSP: Is this a valid default?? */
+#define MALCR_PLBB 0x00004000 /* PLB Burst Deactivation Bit */
+#define MALCR_OPBBL 0x00000080 /* OPB Lock Bit */
+#define MALCR_EOPIE 0x00000004 /* End Of Packet Interrupt Enable */
+#define MALCR_LEA 0x00000002 /* Locked Error Active */
+#define MALCR_MSD 0x00000001 /* MAL Scroll Descriptor Bit */
+#define DCRN_MALDBR 0x183 /* Debug Register */
+#define DCRN_MALESR 0x181 /* Error Status */
+#define MALESR_EVB 0x80000000 /* Error Valid Bit */
+#define MALESR_CID 0x40000000 /* Channel ID Bit for channel 0 */
+#define MALESR_DE 0x00100000 /* Descriptor Error */
+#define MALESR_OEN 0x00080000 /* OPB Non-Fullword Error */
+#define MALESR_OTE 0x00040000 /* OPB Timeout Error */
+#define MALESR_OSE 0x00020000 /* OPB Slave Error */
+#define MALESR_PEIN 0x00010000 /* PLB Bus Error Indication */
+#define MALESR_DEI 0x00000010 /* Descriptor Error Interrupt */
+#define MALESR_ONEI 0x00000008 /* OPB Non-Fullword Error Interrupt */
+#define MALESR_OTEI 0x00000004 /* OPB Timeout Error Interrupt */
+#define MALESR_OSEI 0x00000002 /* OPB Slace Error Interrupt */
+#define MALESR_PBEI 0x00000001 /* PLB Bus Error Interrupt */
+#define DCRN_MALIER 0x182 /* Interrupt Enable */
+#define MALIER_DE 0x00000010 /* Descriptor Error Interrupt Enable */
+#define MALIER_NE 0x00000008 /* OPB Non-word Transfer Int Enable */
+#define MALIER_TE 0x00000004 /* OPB Time Out Error Interrupt Enable */
+#define MALIER_OPBE 0x00000002 /* OPB Slave Error Interrupt Enable */
+#define MALIER_PLBE 0x00000001 /* PLB Error Interrupt Enable */
+#define DCRN_MALTXCARR 0x185 /* TX Channed Active Reset Register */
+#define DCRN_MALTXCASR 0x184 /* TX Channel Active Set Register */
+#define DCRN_MALTXDEIR 0x187 /* Tx Descriptor Error Interrupt */
+#define DCRN_MALTXEOBISR 0x186 /* Tx End of Buffer Interrupt Status */
+#define MALOBISR_CH0 0x80000000 /* EOB channel 1 bit */
+#define MALOBISR_CH2 0x40000000 /* EOB channel 2 bit */
+#define DCRN_MALRXCARR 0x191 /* RX Channed Active Reset Register */
+#define DCRN_MALRXCASR 0x190 /* RX Channel Active Set Register */
+#define DCRN_MALRXDEIR 0x193 /* Rx Descriptor Error Interrupt */
+#define DCRN_MALRXEOBISR 0x192 /* Rx End of Buffer Interrupt Status */
+#define DCRN_MALRXCTP0R 0x1C0 /* Channel Rx 0 Channel Table Pointer */
+#define DCRN_MALTXCTP0R 0x1A0 /* Channel Tx 0 Channel Table Pointer */
+#define DCRN_MALTXCTP1R 0x1A1 /* Channel Tx 1 Channel Table Pointer */
+#define DCRN_MALRCBS0 0x1E0 /* Channel Rx 0 Channel Buffer Size */
+#define DCRN_MEMCFGADR 0x010 /* Memory Controller Address */
+#define DCRN_MEMCFGDATA 0x011 /* Memory Controller Data */
+#define DCRN_OCMISARC 0x018 /* OCM Instr Side Addr Range Compare */
+#define DCRN_OCMISCR 0x019 /* OCM Instr Side Control */
+#define DCRN_OCMDSARC 0x01A /* OCM Data Side Addr Range Compare */
+#define DCRN_OCMDSCR 0x01B /* OCM Data Side Control */
+#define DCRN_PLB0_ACR 0x087 /* PLB Arbiter Control */
+#define DCRN_PLB0_BEAR 0x086 /* PLB Error Address */
+#define DCRN_PLB0_BESR 0x084 /* PLB Error Status */
+#define DCRN_PLLMR 0x0B0 /* PLL Mode */
+#define DCRN_POB0_BEAR 0x0A2 /* PLB to OPB Error Address */
+#define DCRN_POB0_BESR0 0x0A0 /* PLB to OPB Error Status Register 1 */
+#define DCRN_POB0_BESR1 0x0A4 /* PLB to OPB Error Status Register 1 */
+#define DCRN_UICCR 0x0C3 /* UIC Critical */
+#define DCRN_UICER 0x0C2 /* UIC Enable */
+#define DCRN_UICPR 0x0C4 /* UIC Polarity */
+#define DCRN_UICSR 0x0C0 /* UIC Status */
+#define DCRN_UICTR 0x0C5 /* UIC Triggering */
+#define DCRN_UICMSR 0x0C6 /* UIC Masked Status */
+#define DCRN_UICVR 0x0C7 /* UIC Vector */
+#define DCRN_UICVCR 0x0C8 /* UIC Vector Configuration */
+#define UIC_U0 0x80000000 /* UART0 */
+#define UIC_U1 0x40000000 /* UART1 */
+#define UIC_IIC 0x20000000 /* IIC */
+#define UIC_EM 0x10000000 /* External Master */
+#define UIC_PCI 0x08000000 /* PCI */
+#define UIC_D0 0x04000000 /* DMA Channel 0 */
+#define UIC_D1 0x02000000 /* DMA Channel 1 */
+#define UIC_D2 0x01000000 /* DMA Channel 2 */
+#define UIC_D3 0x00800000 /* DMA Channel 3 */
+#define UIC_EW 0x00400000 /* Ethernet Wake-up */
+#define UIC_MS 0x00200000 /* MAL SERR */
+#define UIC_MTE 0x00100000 /* MAL TX EOB */
+#define UIC_MRE 0x00080000 /* MAL RX EOB */
+#define UIC_MTD 0x00040000 /* MAL TX DE */
+#define UIC_MRD 0x00020000 /* MAL RX DE */
+#define UIC_E 0x00010000 /* Ethernet */
+#define UIC_EPS 0x00008000 /* External PCI SERR */
+#define UIC_EC 0x00004000 /* ECC Correctable Error */
+#define UIC_PPM 0x00002000 /* PCI Power Management */
+/*
+** 0x00001000 reserved
+** 0x00000800 reserved
+** 0x00000400 reserved
+** 0x00000200 reserved
+** 0x00000100 reserved
+** 0x00000080 reserved
+*/
+#define UIC_EIR0 0x00000040 /* External IRQ 0 */
+#define UIC_EIR1 0x00000020 /* External IRQ 0 */
+#define UIC_EIR2 0x00000010 /* External IRQ 0 */
+#define UIC_EIR3 0x00000008 /* External IRQ 0 */
+#define UIC_EIR4 0x00000004 /* External IRQ 0 */
+#define UIC_EIR5 0x00000002 /* External IRQ 0 */
+#define UIC_EIR6 0x00000001 /* External IRQ 0 */
+
+#endif /* __PPC4XX_H__ */
+#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/asm-ppc/ppc4xx_serial.h rtlinux_kernel_2_4/include/asm-ppc/ppc4xx_serial.h
--- linux-v2.4.4/include/asm-ppc/ppc4xx_serial.h Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/include/asm-ppc/ppc4xx_serial.h Thu Jun 21 17:30:04 2001
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2000 MontaVista Software Inc.
+ * PPC405GP modifications
+ * Author: MontaVista Software, Inc.
+ * frank_rowand@mvista.com or source@mvista.com
+ * debbie_chu@mvista.com
+ *
+ * Module name: ppc405_serial.h
+ *
+ * Description:
+ * Macros, definitions, and data structures specific to the IBM PowerPC
+ * 405 on-chip serial port devices.
+ */
+
+#ifdef __KERNEL__
+#ifndef __ASMPPC_PPC4xx_SERIAL_H
+#define __ASMPPC_PPC4xx_SERIAL_H
+
+#include <linux/config.h>
+
+#ifdef CONFIG_SERIAL_MANY_PORTS
+#define RS_TABLE_SIZE 64
+#else
+#define RS_TABLE_SIZE 4
+#endif
+
+#define PPC405GP_UART0_INT 0
+#define PPC405GP_UART1_INT 1
+
+/*
+** 405GP UARTs are *not* PCI devices, so need to specify a non-pci memory
+** address and an io_type of SERIAL_IO_MEM.
+*/
+
+#define PPC405GP_UART0_IO_BASE (u8 *) 0xef600300
+#define PPC405GP_UART1_IO_BASE (u8 *) 0xef600400
+
+/*
+** - there is no config option for this
+** - this name could be more informative
+** - also see arch/ppc/kernel/ppc405_serial.c
+**
+** #define CONFIG_PPC405GP_INTERNAL_CLOCK
+*/
+#ifdef CONFIG_PPC405GP_INTERNAL_CLOCK
+#define BASE_BAUD 201600
+#else
+#define BASE_BAUD 691200
+#endif
+
+
+#ifdef CONFIG_SERIAL_DETECT_IRQ
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
+#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
+#else
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
+#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF)
+#endif
+
+
+#ifdef CONFIG_STB03XXX
+
+#define UART0_IO_BASE 0x40040000
+#define UART0_INT 20
+
+#define STD_SERIAL_PORT_DFNS \
+ /* ttyS0 */ \
+ { 0, BASE_BAUD, 0, UART0_INT, STD_COM_FLAGS, 0, 0, 0, 0, 0, 0, 0, \
+ UART0_IO_BASE, 0, 0, 0, {}, {}, {}, SERIAL_IO_MEM, NULL },
+
+#elif defined(CONFIG_UART1_DFLT_CONSOLE)
+
+#define STD_SERIAL_PORT_DFNS \
+ /* ttyS1 */ \
+ { 0, BASE_BAUD, 0, PPC405GP_UART1_INT, STD_COM_FLAGS, 0, 0, 0, 0, 0, 0, 0, \
+ PPC405GP_UART1_IO_BASE, 0, 0, 0, {}, {}, {}, SERIAL_IO_MEM, NULL }, \
+ /* ttyS0 */ \
+ { 0, BASE_BAUD, 0, PPC405GP_UART0_INT, STD_COM_FLAGS, 0, 0, 0, 0, 0, 0, 0, \
+ PPC405GP_UART0_IO_BASE, 0, 0, 0, {}, {}, {}, SERIAL_IO_MEM, NULL },
+
+#else
+
+#define STD_SERIAL_PORT_DFNS \
+ /* ttyS0 */ \
+ { 0, BASE_BAUD, 0, PPC405GP_UART0_INT, STD_COM_FLAGS, 0, 0, 0, 0, 0, 0, 0, \
+ PPC405GP_UART0_IO_BASE, 0, 0, 0, {}, {}, {}, SERIAL_IO_MEM, NULL }, \
+ /* ttyS1 */ \
+ { 0, BASE_BAUD, 0, PPC405GP_UART1_INT, STD_COM_FLAGS, 0, 0, 0, 0, 0, 0, 0, \
+ PPC405GP_UART1_IO_BASE, 0, 0, 0, {}, {}, {}, SERIAL_IO_MEM, NULL },
+
+#endif
+
+
+#define SERIAL_PORT_DFNS \
+ STD_SERIAL_PORT_DFNS \
+ {}
+
+
+
+#endif /* __ASMPPC_PPC4xx_SERIAL_H */
+#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/asm-ppc/processor.h rtlinux_kernel_2_4/include/asm-ppc/processor.h
--- linux-v2.4.4/include/asm-ppc/processor.h Thu Jun 21 17:31:25 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/processor.h Thu Jun 21 17:26:27 2001
@@ -12,6 +12,7 @@
#include <asm/ptrace.h>
#include <asm/types.h>
+#include <asm/mpc8xx.h>
/* Machine State Register (MSR) Fields */
@@ -31,6 +32,7 @@
#define MSR_ME (1<<12) /* Machine Check Enable */
#define MSR_FE0 (1<<11) /* Floating Exception mode 0 */
#define MSR_SE (1<<10) /* Single Step */
+#define MSR_DWE (1<<10) /* Debug Wait Enable (4xx) */
#define MSR_BE (1<<9) /* Branch Trace */
#define MSR_DE (1<<9) /* Debug Exception Enable */
#define MSR_FE1 (1<<8) /* Floating Exception mode 1 */
@@ -82,6 +84,7 @@
/* Special Purpose Registers (SPRNs)*/
+#define SPRN_CCR0 0x3B3 /* Core Configuration Register (4xx) */
#define SPRN_CDBCR 0x3D7 /* Cache Debug Control Register */
#define SPRN_CTR 0x009 /* Count Register */
#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */
@@ -132,6 +135,8 @@
#define SPRN_DBCR0 0x3F2 /* Debug Control Register 0 */
#define SPRN_DBCR1 0x3BD /* Debug Control Register 1 */
#define SPRN_DBSR 0x3F0 /* Debug Status Register */
+#define DBSR_IC 0x80000000 /* Instruction Completion */
+#define DBSR_TIE 0x10000000 /* Trap Instruction debug Event */
#define SPRN_DCCR 0x3FA /* Data Cache Cacheability Register */
#define DCCR_NOCACHE 0 /* Noncacheable */
#define DCCR_CACHE 1 /* Cacheable */
@@ -141,6 +146,26 @@
#define DCWR_WRITE 1 /* Write-through */
#define SPRN_DEAR 0x3D5 /* Data Error Address Register */
#define SPRN_DEC 0x016 /* Decrement Register */
+#define SPRN_DER 0x095 /* Debug Enable Regsiter */
+#define DER_RSTE 0x40000000 /* Reset Interrupt */
+#define DER_CHSTPE 0x20000000 /* Check Stop */
+#define DER_MCIE 0x10000000 /* Machine Check Interrupt */
+#define DER_EXTIE 0x02000000 /* External Interrupt */
+#define DER_ALIE 0x01000000 /* Alignment Interrupt */
+#define DER_PRIE 0x00800000 /* Program Interrupt */
+#define DER_FPUVIE 0x00400000 /* FP Unavailable Interrupt */
+#define DER_DECIE 0x00200000 /* Decrementer Interrupt */
+#define DER_SYSIE 0x00040000 /* System Call Interrupt */
+#define DER_TRE 0x00020000 /* Trace Interrupt */
+#define DER_SEIE 0x00004000 /* FP SW Emulation Interrupt */
+#define DER_ITLBMSE 0x00002000 /* Imp. Spec. Instruction TLB Miss */
+#define DER_ITLBERE 0x00001000 /* Imp. Spec. Instruction TLB Error */
+#define DER_DTLBMSE 0x00000800 /* Imp. Spec. Data TLB Miss */
+#define DER_DTLBERE 0x00000400 /* Imp. Spec. Data TLB Error */
+#define DER_LBRKE 0x00000008 /* Load/Store Breakpoint Interrupt */
+#define DER_IBRKE 0x00000004 /* Instruction Breakpoint Interrupt */
+#define DER_EBRKE 0x00000002 /* External Breakpoint Interrupt */
+#define DER_DPIE 0x00000001 /* Dev. Port Nonmaskable Request */
#define SPRN_DMISS 0x3D0 /* Data TLB Miss Register */
#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
#define SPRN_EAR 0x11A /* External Address Register */
@@ -178,6 +203,7 @@
#define HID0_SPD (1<<9) /* Speculative disable */
#define HID0_SGE (1<<7) /* Store Gathering Enable */
#define HID0_SIED (1<<7) /* Serial Instr. Execution [Disable] */
+#define HID0_DFCA (1<<6) /* Data Cache Flush Assist */
#define HID0_BTIC (1<<5) /* Branch Target Instruction Cache Enable */
#define HID0_ABE (1<<3) /* Address Broadcast Enable */
#define HID0_BHTE (1<<2) /* Branch History Table Enable */
@@ -203,12 +229,35 @@
#define SPRN_IMISS 0x3D4 /* Instruction TLB Miss Register */
#define SPRN_IMMR 0x27E /* Internal Memory Map Register */
#define SPRN_L2CR 0x3F9 /* Level 2 Cache Control Regsiter */
-#define L2CR_PIPE_LATEWR (0x01800000) /* late-write SRAM */
-#define L2CR_L2CTL (0x00100000) /* RAM control */
-#define L2CR_INST_DISABLE (0x00400000) /* disable for insn's */
-#define L2CR_L2I (0x00200000) /* global invalidate */
-#define L2CR_L2E (0x80000000) /* enable */
-#define L2CR_L2WT (0x00080000) /* write-through */
+#define L2CR_L2E 0x80000000 /* L2 enable */
+#define L2CR_L2PE 0x40000000 /* L2 parity enable */
+#define L2CR_L2SIZ_MASK 0x30000000 /* L2 size mask */
+#define L2CR_L2SIZ_256KB 0x10000000 /* L2 size 256KB */
+#define L2CR_L2SIZ_512KB 0x20000000 /* L2 size 512KB */
+#define L2CR_L2SIZ_1MB 0x30000000 /* L2 size 1MB */
+#define L2CR_L2CLK_MASK 0x0e000000 /* L2 clock mask */
+#define L2CR_L2CLK_DISABLED 0x00000000 /* L2 clock disabled */
+#define L2CR_L2CLK_DIV1 0x02000000 /* L2 clock / 1 */
+#define L2CR_L2CLK_DIV1_5 0x04000000 /* L2 clock / 1.5 */
+#define L2CR_L2CLK_DIV2 0x08000000 /* L2 clock / 2 */
+#define L2CR_L2CLK_DIV2_5 0x0a000000 /* L2 clock / 2.5 */
+#define L2CR_L2CLK_DIV3 0x0c000000 /* L2 clock / 3 */
+#define L2CR_L2RAM_MASK 0x01800000 /* L2 RAM type mask */
+#define L2CR_L2RAM_FLOW 0x00000000 /* L2 RAM flow through */
+#define L2CR_L2RAM_PIPE 0x01000000 /* L2 RAM pipelined */
+#define L2CR_L2RAM_PIPE_LW 0x01800000 /* L2 RAM pipelined latewr */
+#define L2CR_L2DO 0x00400000 /* L2 data only */
+#define L2CR_L2I 0x00200000 /* L2 global invalidate */
+#define L2CR_L2CTL 0x00100000 /* L2 RAM control */
+#define L2CR_L2WT 0x00080000 /* L2 write-through */
+#define L2CR_L2TS 0x00040000 /* L2 test support */
+#define L2CR_L2OH_MASK 0x00030000 /* L2 output hold mask */
+#define L2CR_L2OH_0_5 0x00000000 /* L2 output hold 0.5 ns */
+#define L2CR_L2OH_1_0 0x00010000 /* L2 output hold 1.0 ns */
+#define L2CR_L2SL 0x00008000 /* L2 DLL slow */
+#define L2CR_L2DF 0x00004000 /* L2 differential clock */
+#define L2CR_L2BYP 0x00002000 /* L2 DLL bypass */
+#define L2CR_L2IP 0x00000001 /* L2 GI in progress */
#define SPRN_LR 0x008 /* Link Register */
#define SPRN_MMCR0 0x3B8 /* Monitor Mode Control Register 0 */
#define SPRN_MMCR1 0x3BC /* Monitor Mode Control Register 1 */
@@ -235,6 +284,10 @@
#define SPRN_SPRG1 0x111 /* Special Purpose Register General 1 */
#define SPRN_SPRG2 0x112 /* Special Purpose Register General 2 */
#define SPRN_SPRG3 0x113 /* Special Purpose Register General 3 */
+#define SPRN_SPRG4 0x114 /* Special Purpose Register General 4 (4xx) */
+#define SPRN_SPRG5 0x115 /* Special Purpose Register General 5 (4xx) */
+#define SPRN_SPRG6 0x116 /* Special Purpose Register General 6 (4xx) */
+#define SPRN_SPRG7 0x117 /* Special Purpose Register General 7 (4xx) */
#define SPRN_SRR0 0x01A /* Save/Restore Register 0 */
#define SPRN_SRR1 0x01B /* Save/Restore Register 1 */
#define SPRN_SRR2 0x3DE /* Save/Restore Register 2 */
@@ -243,10 +296,6 @@
#define SPRN_TBRU 0x10D /* Time Base Read Upper Register (user, R/O) */
#define SPRN_TBWL 0x11C /* Time Base Lower Register (supervisor, R/W) */
#define SPRN_TBWU 0x11D /* Time Base Upper Register (supervisor, R/W) */
-#define SPRN_TBHI 0x3DC /* Time Base High (4xx) */
-#define SPRN_TBHU 0x3CC /* Time Base High User-mode (4xx) */
-#define SPRN_TBLO 0x3DD /* Time Base Low (4xx) */
-#define SPRN_TBLU 0x3CD /* Time Base Low User-mode (4xx) */
#define SPRN_TCR 0x3DA /* Timer Control Register */
#define TCR_WP(x) (((x)&0x3)<<30) /* WDT Period */
#define WP_2_17 0 /* 2^17 clocks */
@@ -343,10 +392,18 @@
#define SPR1 SPRN_SPRG1
#define SPR2 SPRN_SPRG2
#define SPR3 SPRN_SPRG3
+#define SPR4 SPRN_SPRG4 /* Supervisor Private Registers (4xx) */
+#define SPR5 SPRN_SPRG5
+#define SPR6 SPRN_SPRG6
+#define SPR7 SPRN_SPRG7
#define SPRG0 SPRN_SPRG0
#define SPRG1 SPRN_SPRG1
#define SPRG2 SPRN_SPRG2
#define SPRG3 SPRN_SPRG3
+#define SPRG4 SPRN_SPRG4
+#define SPRG5 SPRN_SPRG5
+#define SPRG6 SPRN_SPRG6
+#define SPRG7 SPRN_SPRG7
#define SRR0 SPRN_SRR0 /* Save and Restore Register 0 */
#define SRR1 SPRN_SRR1 /* Save and Restore Register 1 */
#define TBRL SPRN_TBRL /* Time Base Read Lower Register */
@@ -359,84 +416,6 @@
#define THRM3 SPRN_THRM3 /* Thermal Management Register 3 */
#define XER SPRN_XER
-
-/* Device Control Registers */
-
-#define DCRN_BEAR 0x090 /* Bus Error Address Register */
-#define DCRN_BESR 0x091 /* Bus Error Syndrome Register */
-#define BESR_DSES 0x80000000 /* Data-Side Error Status */
-#define BESR_DMES 0x40000000 /* DMA Error Status */
-#define BESR_RWS 0x20000000 /* Read/Write Status */
-#define BESR_ETMASK 0x1C000000 /* Error Type */
-#define ET_PROT 0
-#define ET_PARITY 1
-#define ET_NCFG 2
-#define ET_BUSERR 4
-#define ET_BUSTO 6
-#define DCRN_DMACC0 0x0C4 /* DMA Chained Count Register 0 */
-#define DCRN_DMACC1 0x0CC /* DMA Chained Count Register 1 */
-#define DCRN_DMACC2 0x0D4 /* DMA Chained Count Register 2 */
-#define DCRN_DMACC3 0x0DC /* DMA Chained Count Register 3 */
-#define DCRN_DMACR0 0x0C0 /* DMA Channel Control Register 0 */
-#define DCRN_DMACR1 0x0C8 /* DMA Channel Control Register 1 */
-#define DCRN_DMACR2 0x0D0 /* DMA Channel Control Register 2 */
-#define DCRN_DMACR3 0x0D8 /* DMA Channel Control Register 3 */
-#define DCRN_DMACT0 0x0C1 /* DMA Count Register 0 */
-#define DCRN_DMACT1 0x0C9 /* DMA Count Register 1 */
-#define DCRN_DMACT2 0x0D1 /* DMA Count Register 2 */
-#define DCRN_DMACT3 0x0D9 /* DMA Count Register 3 */
-#define DCRN_DMADA0 0x0C2 /* DMA Destination Address Register 0 */
-#define DCRN_DMADA1 0x0CA /* DMA Destination Address Register 1 */
-#define DCRN_DMADA2 0x0D2 /* DMA Destination Address Register 2 */
-#define DCRN_DMADA3 0x0DA /* DMA Destination Address Register 3 */
-#define DCRN_DMASA0 0x0C3 /* DMA Source Address Register 0 */
-#define DCRN_DMASA1 0x0CB /* DMA Source Address Register 1 */
-#define DCRN_DMASA2 0x0D3 /* DMA Source Address Register 2 */
-#define DCRN_DMASA3 0x0DB /* DMA Source Address Register 3 */
-#define DCRN_DMASR 0x0E0 /* DMA Status Register */
-#define DCRN_EXIER 0x042 /* External Interrupt Enable Register */
-#define EXIER_CIE 0x80000000 /* Critical Interrupt Enable */
-#define EXIER_SRIE 0x08000000 /* Serial Port Rx Int. Enable */
-#define EXIER_STIE 0x04000000 /* Serial Port Tx Int. Enable */
-#define EXIER_JRIE 0x02000000 /* JTAG Serial Port Rx Int. Enable */
-#define EXIER_JTIE 0x01000000 /* JTAG Serial Port Tx Int. Enable */
-#define EXIER_D0IE 0x00800000 /* DMA Channel 0 Interrupt Enable */
-#define EXIER_D1IE 0x00400000 /* DMA Channel 1 Interrupt Enable */
-#define EXIER_D2IE 0x00200000 /* DMA Channel 2 Interrupt Enable */
-#define EXIER_D3IE 0x00100000 /* DMA Channel 3 Interrupt Enable */
-#define EXIER_E0IE 0x00000010 /* External Interrupt 0 Enable */
-#define EXIER_E1IE 0x00000008 /* External Interrupt 1 Enable */
-#define EXIER_E2IE 0x00000004 /* External Interrupt 2 Enable */
-#define EXIER_E3IE 0x00000002 /* External Interrupt 3 Enable */
-#define EXIER_E4IE 0x00000001 /* External Interrupt 4 Enable */
-#define DCRN_EXISR 0x040 /* External Interrupt Status Register */
-#define DCRN_IOCR 0x0A0 /* Input/Output Configuration Register */
-#define IOCR_E0TE 0x80000000
-#define IOCR_E0LP 0x40000000
-#define IOCR_E1TE 0x20000000
-#define IOCR_E1LP 0x10000000
-#define IOCR_E2TE 0x08000000
-#define IOCR_E2LP 0x04000000
-#define IOCR_E3TE 0x02000000
-#define IOCR_E3LP 0x01000000
-#define IOCR_E4TE 0x00800000
-#define IOCR_E4LP 0x00400000
-#define IOCR_EDT 0x00080000
-#define IOCR_SOR 0x00040000
-#define IOCR_EDO 0x00008000
-#define IOCR_2XC 0x00004000
-#define IOCR_ATC 0x00002000
-#define IOCR_SPD 0x00001000
-#define IOCR_BEM 0x00000800
-#define IOCR_PTD 0x00000400
-#define IOCR_ARE 0x00000080
-#define IOCR_DRC 0x00000020
-#define IOCR_RDM(x) (((x) & 0x3) << 3)
-#define IOCR_TCS 0x00000004
-#define IOCR_SCS 0x00000002
-#define IOCR_SPC 0x00000001
-
-
/* Processor Version Register */
/* Processor Version Register (PVR) field extraction */
@@ -509,15 +488,15 @@
#define _MACH_rpxlite 0x00000040 /* RPCG RPX-Lite 8xx board */
#define _MACH_bseip 0x00000080 /* Bright Star Engineering ip-Engine */
#define _MACH_unused0 0x00000100 /* Now free to be used */
-#define _MACH_unused1 0x00000200 /* Now free to be used */
+#define _MACH_gemini 0x00000200 /* Synergy Microsystems gemini board */
#define _MACH_classic 0x00000400 /* RPCG RPX-Classic 8xx board */
#define _MACH_oak 0x00000800 /* IBM "Oak" 403 eval. board */
#define _MACH_walnut 0x00001000 /* IBM "Walnut" 405GP eval. board */
#define _MACH_8260 0x00002000 /* Generic 8260 */
#define _MACH_tqm860 0x00004000 /* TQM860/L */
#define _MACH_tqm8xxL 0x00008000 /* TQM8xxL */
-#define _MACH_spd8xxL 0x00010000 /* SPD8xx */
-#define _MACH_ibms8 0x00020000 /* IVMS8 */
+#define _MACH_spd8xx 0x00010000 /* SPD8xx */
+#define _MACH_ivms8 0x00020000 /* IVMS8 */
/* see residual.h for these */
#define _PREP_Motorola 0x01 /* motorola prep */
@@ -711,6 +690,9 @@
#define have_of 0
#elif defined(CONFIG_APUS)
#define _machine _MACH_apus
+#define have_of 0
+#elif defined(CONFIG_GEMINI)
+#define _machine _MACH_gemini
#define have_of 0
#elif defined(CONFIG_8260)
#define _machine _MACH_8260
diff -uNr linux-v2.4.4/include/asm-ppc/prom.h rtlinux_kernel_2_4/include/asm-ppc/prom.h
--- linux-v2.4.4/include/asm-ppc/prom.h Thu Jun 21 17:32:15 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/prom.h Thu Jun 21 17:28:00 2001
@@ -35,13 +35,6 @@
unsigned int size;
};
-struct translation_property {
- unsigned int virt;
- unsigned int size;
- unsigned int phys;
- unsigned int flags;
-};
-
struct property {
char *name;
int length;
@@ -64,6 +57,8 @@
struct device_node *sibling;
struct device_node *next; /* next device of same type */
struct device_node *allnext; /* next in list of all nodes */
+ int n_addr_cells;
+ int n_size_cells;
};
struct prom_args;
diff -uNr linux-v2.4.4/include/asm-ppc/rpxclassic.h rtlinux_kernel_2_4/include/asm-ppc/rpxclassic.h
--- linux-v2.4.4/include/asm-ppc/rpxclassic.h Thu Jun 21 17:33:45 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/rpxclassic.h Thu Jun 21 17:31:23 2001
@@ -11,6 +11,7 @@
#include <linux/config.h>
+#ifndef __ASSEMBLY__
/* A Board Information structure that is given to a program when
* prom starts it up.
*/
@@ -60,19 +61,37 @@
#define BCSR0_PCMCIA3VOLT ((uint)0x000a0000) /* CLLF */
#define BCSR0_PCMCIA5VOLT ((uint)0x00060000) /* CLLF */
+#define BCSR1_IPB5SEL ((uint)0x00100000)
+#define BCSR1_PCVCTL4 ((uint)0x00080000)
+#define BCSR1_PCVCTL5 ((uint)0x00040000)
+#define BCSR1_PCVCTL6 ((uint)0x00020000)
+#define BCSR1_PCVCTL7 ((uint)0x00010000)
+
#define BCSR2_EN232XCVR ((uint)0x00008000)
#define BCSR2_QSPACESEL ((uint)0x00004000)
#define BCSR2_FETHLEDMODE ((uint)0x00000800) /* CLLF */
-#if defined(CONFIG_RPXLCD) || defined(CONFIG_HTDMSOUND)
-/* HIOX Expansion card.
-*/
-#include <asm/rpx_hiox.h>
+#if defined(CONFIG_HTDMSOUND)
+#include <asm/rpxhiox.h>
+#endif
+
+/* define IO_BASE for pcmcia, CLLF only */
+#if !defined(CONFIG_PCI)
+#define _IO_BASE 0x80000000
+#define _IO_BASE_SIZE 0x1000
+
+/* for pcmcia sandisk */
+#ifdef CONFIG_IDE
+#define MAX_HWIFS 1
+#define ide_request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
+#endif
#endif
/* Interrupt level assignments.
*/
#define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */
+
+#endif /* !__ASSEMBLY__ */
/* We don't use the 8259.
*/
diff -uNr linux-v2.4.4/include/asm-ppc/rpxhiox.h rtlinux_kernel_2_4/include/asm-ppc/rpxhiox.h
--- linux-v2.4.4/include/asm-ppc/rpxhiox.h Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/include/asm-ppc/rpxhiox.h Thu Jun 21 17:30:44 2001
@@ -0,0 +1,42 @@
+
+/*
+ * The Embedded Planet HIOX expansion card definitions.
+ * There were a few different versions of these cards, but only
+ * the one that escaped real production is defined here.
+ *
+ * Copyright (c) 2000 Dan Malek (dmalek@jlc.net)
+ */
+#ifndef __MACH_RPX_HIOX_DEFS
+#define __MACH_RPX_HIOX_DEFS
+
+#define HIOX_CSR_ADDR ((uint)0xfac00000)
+#define HIOX_CSR_SIZE ((uint)(4 * 1024))
+#define HIOX_CSR0_ADDR HIOX_CSR_ADDR
+#define HIOX_CSR4_ADDR ((uint)0xfac00004)
+
+#define HIOX_CSR0_DEFAULT ((uint)0x380f3c00)
+#define HIOX_CSR0_ENSCC2 ((uint)0x80000000)
+#define HIOX_CSR0_ENSMC2 ((uint)0x04000000)
+#define HIOX_CSR0_ENVDOCLK ((uint)0x02000000)
+#define HIOX_CSR0_VDORST_HL ((uint)0x01000000)
+#define HIOX_CSR0_RS232SEL ((uint)0x0000c000)
+#define HIOX_CSR0_SCC3SEL ((uint)0x0000c000)
+#define HIOX_CSR0_SMC1SEL ((uint)0x00008000)
+#define HIOX_CSR0_SCC1SEL ((uint)0x00004000)
+#define HIOX_CSR0_ENTOUCH ((uint)0x00000080)
+#define HIOX_CSR0_PDOWN100 ((uint)0x00000060)
+#define HIOX_CSR0_PDOWN10 ((uint)0x00000040)
+#define HIOX_CSR0_PDOWN1 ((uint)0x00000020)
+#define HIOX_CSR0_TSELSPI ((uint)0x00000010)
+#define HIOX_CSR0_TIRQSTAT ((uint)0x00000008)
+#define HIOX_CSR4_DEFAULT ((uint)0x00000000)
+#define HIOX_CSR4_ENTIRQ2 ((uint)0x20000000)
+#define HIOX_CSR4_ENTIRQ3 ((uint)0x10000000)
+#define HIOX_CSR4_ENAUDIO ((uint)0x00000080)
+#define HIOX_CSR4_RSTAUDIO ((uint)0x00000040) /* 0 == reset */
+#define HIOX_CSR4_AUDCLKHI ((uint)0x00000020)
+#define HIOX_CSR4_AUDSPISEL ((uint)0x00000010)
+#define HIOX_CSR4_AUDIRQSTAT ((uint)0x00000008)
+#define HIOX_CSR4_AUDCLKSEL ((uint)0x00000007)
+
+#endif
diff -uNr linux-v2.4.4/include/asm-ppc/rpxlite.h rtlinux_kernel_2_4/include/asm-ppc/rpxlite.h
--- linux-v2.4.4/include/asm-ppc/rpxlite.h Thu Jun 21 17:33:38 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/rpxlite.h Thu Jun 21 17:31:01 2001
@@ -9,6 +9,7 @@
#ifndef __MACH_RPX_DEFS
#define __MACH_RPX_DEFS
+#ifndef __ASSEMBLY__
/* A Board Information structure that is given to a program when
* prom starts it up.
*/
@@ -31,8 +32,6 @@
#define RPX_CSR_SIZE ((uint)(4 * 1024))
#define IMAP_ADDR ((uint)0xfa200000)
#define IMAP_SIZE ((uint)(64 * 1024))
-#define HIOX_CSR_ADDR ((uint)0xfac00000)
-#define HIOX_CSR_SIZE ((uint)(4 * 1024))
#define PCMCIA_MEM_ADDR ((uint)0x04000000)
#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
#define PCMCIA_IO_ADDR ((uint)0x04400000)
@@ -52,10 +51,25 @@
#define BCSR0_PCMCIA3VOLT ((uint)0x000a0000)
#define BCSR0_PCMCIA5VOLT ((uint)0x00060000)
-/* HIO Expansion card.
-*/
-#define HIOX_CSR_ENAUDIO ((uint)0x00000200)
-#define HIOX_CSR_RSTAUDIO ((uint)0x00000100) /* 0 == reset */
+#define BCSR1_IPB5SEL ((uint)0x00100000)
+#define BCSR1_PCVCTL4 ((uint)0x00080000)
+#define BCSR1_PCVCTL5 ((uint)0x00040000)
+#define BCSR1_PCVCTL6 ((uint)0x00020000)
+#define BCSR1_PCVCTL7 ((uint)0x00010000)
+
+#if defined(CONFIG_HTDMSOUND)
+#include <asm/rpxhiox.h>
+#endif
+#endif /* !__ASSEMBLY__ */
+
+/* define IO_BASE for pcmcia */
+#define _IO_BASE 0x80000000
+#define _IO_BASE_SIZE 0x1000
+
+#ifdef CONFIG_IDE
+#define MAX_HWIFS 1
+#define ide_request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
+#endif
/* We don't use the 8259.
*/
diff -uNr linux-v2.4.4/include/asm-ppc/rwsem.h rtlinux_kernel_2_4/include/asm-ppc/rwsem.h
--- linux-v2.4.4/include/asm-ppc/rwsem.h Wed Dec 31 17:00:00 1969
+++ rtlinux_kernel_2_4/include/asm-ppc/rwsem.h Thu Jun 21 17:29:35 2001
@@ -0,0 +1,134 @@
+/*
+ * include/asm-ppc/rwsem.h: R/W semaphores for PPC using the stuff
+ * in lib/rwsem.c. Adapted largely from include/asm-i386/rwsem.h
+ * by Paul Mackerras <paulus@samba.org>.
+ */
+
+#ifndef _PPC_RWSEM_H
+#define _PPC_RWSEM_H
+
+#ifdef __KERNEL__
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <asm/atomic.h>
+#include <asm/system.h>
+
+/*
+ * the semaphore definition
+ */
+struct rw_semaphore {
+ /* XXX this should be able to be an atomic_t -- paulus */
+ signed long count;
+#define RWSEM_UNLOCKED_VALUE 0x00000000
+#define RWSEM_ACTIVE_BIAS 0x00000001
+#define RWSEM_ACTIVE_MASK 0x0000ffff
+#define RWSEM_WAITING_BIAS (-0x00010000)
+#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
+#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
+ spinlock_t wait_lock;
+ struct list_head wait_list;
+#if RWSEM_DEBUG
+ int debug;
+#endif
+};
+
+/*
+ * initialisation
+ */
+#if RWSEM_DEBUG
+#define __RWSEM_DEBUG_INIT , 0
+#else
+#define __RWSEM_DEBUG_INIT /* */
+#endif
+
+#define __RWSEM_INITIALIZER(name) \
+ { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
+ LIST_HEAD_INIT((name).wait_list) \
+ __RWSEM_DEBUG_INIT }
+
+#define DECLARE_RWSEM(name) \
+ struct rw_semaphore name = __RWSEM_INITIALIZER(name)
+
+extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem);
+
+static inline void init_rwsem(struct rw_semaphore *sem)
+{
+ sem->count = RWSEM_UNLOCKED_VALUE;
+ spin_lock_init(&sem->wait_lock);
+ INIT_LIST_HEAD(&sem->wait_list);
+#if RWSEM_DEBUG
+ sem->debug = 0;
+#endif
+}
+
+/*
+ * lock for reading
+ */
+static inline void __down_read(struct rw_semaphore *sem)
+{
+ if (atomic_inc_return((atomic_t *)(&sem->count)) >= 0)
+ smp_wmb();
+ else
+ rwsem_down_read_failed(sem);
+}
+
+/*
+ * lock for writing
+ */
+static inline void __down_write(struct rw_semaphore *sem)
+{
+ int tmp;
+
+ tmp = atomic_add_return(RWSEM_ACTIVE_WRITE_BIAS,
+ (atomic_t *)(&sem->count));
+ if (tmp == RWSEM_ACTIVE_WRITE_BIAS)
+ smp_wmb();
+ else
+ rwsem_down_write_failed(sem);
+}
+
+/*
+ * unlock after reading
+ */
+static inline void __up_read(struct rw_semaphore *sem)
+{
+ int tmp;
+
+ smp_wmb();
+ tmp = atomic_dec_return((atomic_t *)(&sem->count));
+ if (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0)
+ rwsem_wake(sem);
+}
+
+/*
+ * unlock after writing
+ */
+static inline void __up_write(struct rw_semaphore *sem)
+{
+ smp_wmb();
+ if (atomic_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
+ (atomic_t *)(&sem->count)) < 0)
+ rwsem_wake(sem);
+}
+
+/*
+ * implement atomic add functionality
+ */
+static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
+{
+ atomic_add(delta, (atomic_t *)(&sem->count));
+}
+
+/*
+ * implement exchange and add functionality
+ */
+static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
+{
+ smp_mb();
+ return atomic_add_return(delta, (atomic_t *)(&sem->count));
+}
+
+#endif /* __KERNEL__ */
+#endif /* _PPC_RWSEM_XADD_H */
diff -uNr linux-v2.4.4/include/asm-ppc/semaphore-helper.h rtlinux_kernel_2_4/include/asm-ppc/semaphore-helper.h
--- linux-v2.4.4/include/asm-ppc/semaphore-helper.h Thu Jun 21 17:30:42 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/semaphore-helper.h Wed Dec 31 17:00:00 1969
@@ -1,109 +0,0 @@
-#ifdef __KERNEL__
-#ifndef _PPC_SEMAPHORE_HELPER_H
-#define _PPC_SEMAPHORE_HELPER_H
-
-/*
- * SMP- and interrupt-safe semaphores..
- *
- * (C) Copyright 1996 Linus Torvalds
- * Adapted for PowerPC by Gary Thomas and Paul Mackerras
- */
-
-#include <asm/atomic.h>
-
-/*
- * These two (wake_one_more and waking_non_zero) _must_ execute
- * atomically wrt each other.
- *
- * This is trivially done with load with reservation and
- * store conditional on the ppc.
- */
-
-static inline void wake_one_more(struct semaphore * sem)
-{
- atomic_inc(&sem->waking);
-}
-
-static inline int waking_non_zero(struct semaphore *sem)
-{
- int ret, tmp;
-
- /* Atomic decrement sem->waking iff it is > 0 */
- __asm__ __volatile__(
- "1: lwarx %1,0,%2\n" /* tmp = sem->waking */
- " cmpwi 0,%1,0\n" /* test tmp */
- " addic %1,%1,-1\n" /* --tmp */
- " ble- 2f\n" /* exit if tmp was <= 0 */
- " stwcx. %1,0,%2\n" /* update sem->waking */
- " bne- 1b\n" /* try again if update failed*/
- " li %0,1\n" /* ret = 1 */
- "2:"
- : "=r" (ret), "=&r" (tmp)
- : "r" (&sem->waking), "0" (0)
- : "cr0", "memory");
-
- return ret;
-}
-/*
- * waking_non_zero_interruptible:
- * 1 got the lock
- * 0 go to sleep
- * -EINTR interrupted
- */
-static inline int waking_non_zero_interruptible(struct semaphore *sem,
- struct task_struct *tsk)
-{
- int ret, tmp;
-
- /* Atomic decrement sem->waking iff it is > 0 */
- __asm__ __volatile__(
- "1: lwarx %1,0,%2\n" /* tmp = sem->waking */
- " cmpwi 0,%1,0\n" /* test tmp */
- " addic %1,%1,-1\n" /* --tmp */
- " ble- 2f\n" /* exit if tmp was <= 0 */
- " stwcx. %1,0,%2\n" /* update sem->waking */
- " bne- 1b\n" /* try again if update failed*/
- " li %0,1\n" /* ret = 1 */
- "2:"
- : "=r" (ret), "=&r" (tmp)
- : "r" (&sem->waking), "0" (0)
- : "cr0", "memory");
-
- if (ret == 0 && signal_pending(tsk)) {
- atomic_inc(&sem->count);
- ret = -EINTR;
- }
- return ret;
-}
-
-/*
- * waking_non_zero_trylock:
- * 1 failed to lock
- * 0 got the lock
- */
-static inline int waking_non_zero_trylock(struct semaphore *sem)
-{
- int ret, tmp;
-
- /* Atomic decrement sem->waking iff it is > 0 */
- __asm__ __volatile__(
- "1: lwarx %1,0,%2\n" /* tmp = sem->waking */
- " cmpwi 0,%1,0\n" /* test tmp */
- " addic %1,%1,-1\n" /* --tmp */
- " ble- 2f\n" /* exit if tmp was <= 0 */
- " stwcx. %1,0,%2\n" /* update sem->waking */
- " bne- 1b\n" /* try again if update failed*/
- " li %0,0\n" /* ret = 0 */
- "2:"
- : "=r" (ret), "=&r" (tmp)
- : "r" (&sem->waking), "0" (1)
- : "cr0", "memory");
-
- if (ret)
- atomic_inc(&sem->count);
-
- return ret;
-}
-
-#endif /* _PPC_SEMAPHORE_HELPER_H */
-#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/asm-ppc/semaphore.h rtlinux_kernel_2_4/include/asm-ppc/semaphore.h
--- linux-v2.4.4/include/asm-ppc/semaphore.h Thu Jun 21 17:32:02 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/semaphore.h Thu Jun 21 17:27:39 2001
@@ -7,6 +7,11 @@
*
* Stole some rw spinlock-based semaphore stuff from asm-alpha/semaphore.h
* -- Ani Joshi (ajoshi@unixbox.com)
+ *
+ * Remove spinlock-based RW semaphores; RW semaphore definitions are
+ * now in rwsem.h and we use the the generic lib/rwsem.c implementation.
+ * Rework semaphores to use atomic_dec_if_positive.
+ * -- Paul Mackerras (paulus@samba.org)
*/
#ifdef __KERNEL__
@@ -17,8 +22,12 @@
#include <linux/rwsem.h>
struct semaphore {
+ /*
+ * Note that any negative value of count is equivalent to 0,
+ * but additionally indicates that some process(es) might be
+ * sleeping on `wait'.
+ */
atomic_t count;
- atomic_t waking;
wait_queue_head_t wait;
#if WAITQUEUE_DEBUG
long __magic;
@@ -32,23 +41,23 @@
# define __SEM_DEBUG_INIT(name)
#endif
-#define __SEMAPHORE_INITIALIZER(name,count) \
-{ ATOMIC_INIT(count), ATOMIC_INIT(0), __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
- __SEM_DEBUG_INIT(name) }
+#define __SEMAPHORE_INITIALIZER(name, count) \
+ { ATOMIC_INIT(count), \
+ __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
+ __SEM_DEBUG_INIT(name) }
#define __MUTEX_INITIALIZER(name) \
- __SEMAPHORE_INITIALIZER(name,1)
+ __SEMAPHORE_INITIALIZER(name, 1)
-#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
+#define __DECLARE_SEMAPHORE_GENERIC(name, count) \
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
-#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
-#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
+#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1)
+#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name, 0)
-extern inline void sema_init (struct semaphore *sem, int val)
+static inline void sema_init (struct semaphore *sem, int val)
{
atomic_set(&sem->count, val);
- atomic_set(&sem->waking, 0);
init_waitqueue_head(&sem->wait);
#if WAITQUEUE_DEBUG
sem->__magic = (long)&sem->__magic;
@@ -67,46 +76,59 @@
extern void __down(struct semaphore * sem);
extern int __down_interruptible(struct semaphore * sem);
-extern int __down_trylock(struct semaphore * sem);
extern void __up(struct semaphore * sem);
extern inline void down(struct semaphore * sem)
{
- if (atomic_dec_return(&sem->count) >= 0)
- wmb();
- else
+#if WAITQUEUE_DEBUG
+ CHECK_MAGIC(sem->__magic);
+#endif
+
+ /*
+ * Try to get the semaphore, take the slow path if we fail.
+ */
+ if (atomic_dec_return(&sem->count) < 0)
__down(sem);
+ smp_wmb();
}
extern inline int down_interruptible(struct semaphore * sem)
{
int ret = 0;
- if (atomic_dec_return(&sem->count) >= 0)
- wmb();
- else
+#if WAITQUEUE_DEBUG
+ CHECK_MAGIC(sem->__magic);
+#endif
+
+ if (atomic_dec_return(&sem->count) < 0)
ret = __down_interruptible(sem);
+ smp_wmb();
return ret;
}
extern inline int down_trylock(struct semaphore * sem)
{
- int ret = 0;
+ int ret;
- if (atomic_dec_return(&sem->count) >= 0)
- wmb();
- else
- ret = __down_trylock(sem);
+#if WAITQUEUE_DEBUG
+ CHECK_MAGIC(sem->__magic);
+#endif
+
+ ret = atomic_dec_if_positive(&sem->count) < 0;
+ smp_wmb();
return ret;
}
extern inline void up(struct semaphore * sem)
{
- mb();
+#if WAITQUEUE_DEBUG
+ CHECK_MAGIC(sem->__magic);
+#endif
+
+ smp_wmb();
if (atomic_inc_return(&sem->count) <= 0)
__up(sem);
-}
-
+}
#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/asm-ppc/serial.h rtlinux_kernel_2_4/include/asm-ppc/serial.h
--- linux-v2.4.4/include/asm-ppc/serial.h Thu Jun 21 17:29:47 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/serial.h Thu Jun 21 17:24:57 2001
@@ -5,6 +5,12 @@
#ifdef __KERNEL__
#include <linux/config.h>
+#ifdef CONFIG_GEMINI
+#include <asm/gemini_serial.h>
+#elif defined(CONFIG_4xx)
+#include <asm/ppc4xx_serial.h>
+#else
+
/*
* This assumes you have a 1.8432 MHz clock for your UART.
*
@@ -123,4 +129,5 @@
HUB6_SERIAL_PORT_DFNS \
MCA_SERIAL_PORT_DFNS
+#endif /* !CONFIG_GEMINI and others */
#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/asm-ppc/smp.h rtlinux_kernel_2_4/include/asm-ppc/smp.h
--- linux-v2.4.4/include/asm-ppc/smp.h Thu Jun 21 17:31:39 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/smp.h Thu Jun 21 17:26:52 2001
@@ -1,8 +1,11 @@
/* smp.h: PPC specific SMP stuff.
*
- * Taken from asm-sparc/smp.h
+ * Original was a copy of sparc smp.h. Now heavily modified
+ * for PPC.
+ *
+ * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
+ * Copyright (C) 1996-2001 Cort Dougan <cort@fsmlabs.com>
*/
-
#ifdef __KERNEL__
#ifndef _PPC_SMP_H
#define _PPC_SMP_H
@@ -21,9 +24,11 @@
unsigned long *pte_cache;
unsigned long pgtable_cache_sz;
};
-extern struct cpuinfo_PPC cpu_data[NR_CPUS];
+extern struct cpuinfo_PPC cpu_data[NR_CPUS];
+extern unsigned long cpu_online_map;
extern unsigned long smp_proc_in_lock[NR_CPUS];
+extern volatile unsigned long cpu_callin_map[NR_CPUS];
extern void smp_store_cpu_info(int id);
extern void smp_send_tlb_invalidate(int);
@@ -37,7 +42,6 @@
/* 1 to 1 mapping on PPC -- Cort */
#define cpu_logical_map(cpu) (cpu)
#define cpu_number_map(x) (x)
-extern volatile unsigned long cpu_callin_map[NR_CPUS];
#define smp_processor_id() (current->processor)
diff -uNr linux-v2.4.4/include/asm-ppc/system.h rtlinux_kernel_2_4/include/asm-ppc/system.h
--- linux-v2.4.4/include/asm-ppc/system.h Thu Jun 21 17:28:19 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/system.h Thu Jun 21 17:23:40 2001
@@ -3,7 +3,6 @@
*
* Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
*/
-#ifdef __KERNEL__
#ifndef __PPC_SYSTEM_H
#define __PPC_SYSTEM_H
@@ -47,6 +46,7 @@
#define smp_wmb() __asm__ __volatile__("": : :"memory")
#endif /* CONFIG_SMP */
+#ifdef __KERNEL__
extern void xmon_irq(int, void *, struct pt_regs *);
extern void xmon(struct pt_regs *excp);
extern void print_backtrace(unsigned long *);
@@ -115,6 +115,8 @@
#define local_irq_save(flags) __save_and_cli(flags)
#define local_irq_restore(flags) __restore_flags(flags)
+#endif /* __KERNEL__ */
+
#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
static __inline__ unsigned long
@@ -216,4 +218,3 @@
})
#endif /* __PPC_SYSTEM_H */
-#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/asm-ppc/time.h rtlinux_kernel_2_4/include/asm-ppc/time.h
--- linux-v2.4.4/include/asm-ppc/time.h Thu Jun 21 17:31:52 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/time.h Thu Jun 21 17:27:17 2001
@@ -9,6 +9,7 @@
#ifdef __KERNEL__
#include <linux/config.h>
#include <linux/mc146818rtc.h>
+#include <linux/threads.h>
#include <asm/processor.h>
@@ -23,7 +24,12 @@
int via_calibrate_decr(void);
-/* Accessor functions for the decrementer register. */
+/* Accessor functions for the decrementer register.
+ * The 4xx doesn't even have a decrementer. I tried to use the
+ * generic timer interrupt code, which seems OK, with the 4xx PIT
+ * in auto-reload mode. The problem is PIT stops counting when it
+ * hits zero. If it would wrap, we could use it just like a decrementer.
+ */
static __inline__ unsigned int get_dec(void)
{
#if defined(CONFIG_4xx)
@@ -36,14 +42,12 @@
static __inline__ void set_dec(unsigned int val)
{
#if defined(CONFIG_4xx)
- mtspr(SPRN_PIT, val);
-#else
-#ifdef CONFIG_8xx_CPU6
+ return; /* Have to let it auto-reload */
+#elif defined(CONFIG_8xx_CPU6)
set_dec_cpu6(val);
#else
mtspr(SPRN_DEC, val);
#endif
-#endif
}
/* Accessor functions for the timebase (RTC on 601) registers. */
@@ -59,6 +63,12 @@
extern __inline__ unsigned long get_tbl(void) {
unsigned long tbl;
asm volatile("mftb %0" : "=r" (tbl));
+ return tbl;
+}
+
+extern __inline__ unsigned long get_tbu(void) {
+ unsigned long tbl;
+ asm volatile("mftbu %0" : "=r" (tbl));
return tbl;
}
diff -uNr linux-v2.4.4/include/asm-ppc/walnut.h rtlinux_kernel_2_4/include/asm-ppc/walnut.h
--- linux-v2.4.4/include/asm-ppc/walnut.h Thu Jun 21 17:31:48 2001
+++ rtlinux_kernel_2_4/include/asm-ppc/walnut.h Thu Jun 21 17:27:08 2001
@@ -2,12 +2,21 @@
*
* Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
*
- * Module name: walnut.h
+ * Copyright 2000 MontaVista Software Inc.
+ * PPC405 modifications
+ * Author: MontaVista Software, Inc.
+ * frank_rowand@mvista.com or source@mvista.com
+ * debbie_chu@mvista.com
+ *
+ * Module name: ppc405.h
*
* Description:
- * Macros, definitions, and data structures specific to the IBM PowerPC
- * 405GP "Walnut" evaluation board. Anything specific to the processor
- * itself is defined elsewhere.
+ * Macros, definitions, and data structures specific to the IBM PowerPC
+ * based boards.
+ *
+ * This includes:
+ *
+ * 405GP "Walnut" evaluation board
*
*/
@@ -19,12 +28,37 @@
#ifdef __cplusplus
extern "C" {
#endif
+/*
+ * Data structure defining board information maintained by the boot
+ * ROM on IBM's "Walnut" evaluation board. An effort has been made to
+ * keep the field names consistent with the 8xx 'bd_t' board info
+ * structures.
+ */
+typedef struct board_info {
+ unsigned char bi_s_version[4]; /* Version of this structure */
+ unsigned char bi_r_version[30]; /* Version of the IBM ROM */
+ unsigned int bi_memsize; /* DRAM installed, in bytes */
+ unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */
+ unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */
+ unsigned int bi_procfreq; /* Processor speed, in Hz */
+ unsigned int bi_plb_busfreq; /* PLB Bus speed, in Hz */
+ unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */
+} bd_t;
+/* Memory map for the IBM "Walnut" 405GP evaluation board.
+ * Generic 4xx plus RTC.
+ */
+#define WALNUT_RTC_ADDR ((uint)0xf0001000)
+#define WALNUT_RTC_SIZE ((uint)4*1024)
#ifdef __cplusplus
}
#endif
+
+/* Generic 4xx type
+*/
+#define _MACH_4xx (_MACH_walnut)
#endif /* __WALNUT_H__ */
#endif /* __KERNEL__ */
diff -uNr linux-v2.4.4/include/linux/proc_fs.h rtlinux_kernel_2_4/include/linux/proc_fs.h
--- linux-v2.4.4/include/linux/proc_fs.h Thu Jun 21 17:29:33 2001
+++ rtlinux_kernel_2_4/include/linux/proc_fs.h Thu Jun 21 17:24:48 2001
@@ -127,6 +127,11 @@
*/
extern void proc_device_tree_init(void);
+/*
+ * proc_rtas.c
+ */
+extern void proc_rtas_init(void);
+
extern struct proc_dir_entry *proc_symlink(const char *,
struct proc_dir_entry *, const char *);
extern struct proc_dir_entry *proc_mknod(const char *,mode_t,
diff -uNr linux-v2.4.4/kernel/exit.c rtlinux_kernel_2_4/kernel/exit.c
--- linux-v2.4.4/kernel/exit.c Thu Jun 21 17:31:31 2001
+++ rtlinux_kernel_2_4/kernel/exit.c Thu Jun 21 17:26:34 2001
@@ -419,10 +419,15 @@
write_unlock_irq(&tasklist_lock);
}
+void (*rtl_do_exit_handler)(long code) = 0;
+
NORET_TYPE void do_exit(long code)
{
struct task_struct *tsk = current;
+ if (rtl_do_exit_handler) {
+ rtl_do_exit_handler(code);
+ }
if (in_interrupt())
panic("Aiee, killing interrupt handler!");
if (!tsk->pid)
diff -uNr linux-v2.4.4/kernel/fork.c rtlinux_kernel_2_4/kernel/fork.c
--- linux-v2.4.4/kernel/fork.c Thu Jun 21 17:33:39 2001
+++ rtlinux_kernel_2_4/kernel/fork.c Thu Jun 21 17:31:07 2001
@@ -203,7 +203,9 @@
atomic_set(&mm->mm_count, 1);
init_rwsem(&mm->mmap_sem);
mm->page_table_lock = SPIN_LOCK_UNLOCKED;
+ lock_kernel();
mm->pgd = pgd_alloc(mm);
+ unlock_kernel();
if (mm->pgd)
return mm;
free_mm(mm);
@@ -234,7 +236,9 @@
inline void __mmdrop(struct mm_struct *mm)
{
if (mm == &init_mm) BUG();
+ lock_kernel();
pgd_free(mm->pgd);
+ unlock_kernel();
destroy_context(mm);
free_mm(mm);
}
diff -uNr linux-v2.4.4/mm/vmalloc.c rtlinux_kernel_2_4/mm/vmalloc.c
--- linux-v2.4.4/mm/vmalloc.c Thu Jun 21 17:31:53 2001
+++ rtlinux_kernel_2_4/mm/vmalloc.c Thu Jun 21 17:27:19 2001
@@ -148,6 +148,7 @@
spin_lock(&init_mm.page_table_lock);
do {
pmd_t *pmd;
+ pgd_t olddir = *dir;
pmd = pmd_alloc(&init_mm, dir, address);
ret = -ENOMEM;
@@ -157,6 +158,10 @@
ret = -ENOMEM;
if (alloc_area_pmd(pmd, address, end - address, gfp_mask, prot))
break;
+#if defined(__i386__)
+ if (pgd_val(olddir) != pgd_val(*dir))
+ set_pgdir(address, *dir);
+#endif /* __i386__ */
address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++;
diff -uNr linux-v2.4.4/scripts/mkdep.c rtlinux_kernel_2_4/scripts/mkdep.c
--- linux-v2.4.4/scripts/mkdep.c Thu Jun 21 17:31:31 2001
+++ rtlinux_kernel_2_4/scripts/mkdep.c Thu Jun 21 17:26:34 2001
@@ -45,8 +45,7 @@
-char __depname[512] = "\n\t@touch ";
-#define depname (__depname+9)
+char depname[512];
int hasdep;
struct path_struct {
@@ -529,12 +528,11 @@
char * map;
fd = open(filename, O_RDONLY);
- if (fd < 0) {
+ if ((fd < 0) || (fstat(fd, &st) < 0)) {
perror(filename);
return;
}
- fstat(fd, &st);
if (st.st_size == 0) {
fprintf(stderr,"%s is empty\n",filename);
close(fd);
@@ -559,11 +557,46 @@
clear_config();
state_machine(map, map+st.st_size);
if (hasdep) {
- puts(command);
- if (*command)
+ if (*command) {
+ if (lstat(command, &st) < 0) {
+ perror (command);
+ goto DONE;
+ }
+ /*
+ * Don't try to touch through symlinks
+ * [Not the fastest way to do it, but we do it only once.]
+ * >>>mv '?' '?.sym'&&cp '?.sym' '?'&&rm -f '?'.sym\n\0<<<
+ * 4 3 11 7 10 7 ==> 42
+ */
+ if (S_ISLNK(st.st_mode)) {
+ int len = strlen(command);
+ char *cmd = malloc((5*len) + 42);
+ if (!cmd) {
+ perror ("out of memory");
+ goto DONE;
+ }
+ sprintf (cmd, "mv '%s' '%s.sym'&&"
+ "cp '%s.sym' '%s'&&"
+ "rm -f '%s.sym'\n",
+ command, command,
+ command, command,
+ command);
+ if (system(cmd) != 0) {
+ perror (command);
+ free (cmd);
+ goto DONE;
+ }
+ free (cmd);
+ }
+ fputs ("\n\t@touch ", stdout);
+ fputs (command, stdout);
+
define_precious(filename);
+ }
+ putchar('\n');
}
+DONE:
munmap(map, mapsize);
close(fd);
}
@@ -607,7 +640,7 @@
while (--argc > 0) {
const char * filename = *++argv;
- const char * command = __depname;
+ const char * command = depname;
g_filename = 0;
len = strlen(filename);
memcpy(depname, filename, len+1);
|