70-216 Q257

70-216 Q257
3 4 6 1 4 -1 1 3 -2 1 2 -3 2 4 -5 2 3 -6 3 4 -4 4 6 1 2 -3 1 3 -2 1 4 -1 2 3 -6 2 4 -5 3 4 -4 2000 2000 1 2 -10000 2 3 -10000 3 4 -10000 4 5 -10000 5 6 -10000 6 7 -10000 7 8 -10000 8 9 -10000 9 10 -10000 10 11 -10000 11 12 -10000 12 13 -10000 13 14 -10000 14 15 -10000 15 16 -10000 16 17 -10000 17 18 -10000 18 19 -10000 19 20 -10000 20 21 -10000 21 22 -10000 22 23 -10000 23 24 -10000 24 25 -10000 25 26 -10000 26 27 -10000 27 28 -10000 28 29 -10000 29 30 -10000 30 31 -10000 31 32 -10000 32 33 -10000 33 34 -10000 34 35 -10000 35 36 -10000 36 37 -10000 37 38 -10000 38 39 -10000 39 40 -10000 40 41 -10000 41 42 -10000 42 43 -10000 43 44 -10000 44 45 -10000 45 46 -10000 46 47 -10000 47 48 -10000 48 49 -10000 49 50 -10000 50 51 -10000 51 52 -10000 52 53 -10000 53 54 -10000 54 55 -10000 55 56 -10000 56 57 -10000 57 58 -10000 58 59 -10000 59 60 -10000 60 61 -10000 61 62 -10000 62 63 -10000 63 64 -10000 64 65 -10000 65 66 -10000 66 67 -10000 67 68 -10000 68 69 -10000 69 70 -10000 70 71 -10000 71 72 -10000 72 73 -10000 73 74 -10000 74 75 -10000 75 76 -10000 76 77 -10000 77 78 -10000 78 79 -10000 79 80 -10000 80 81 -10000 81 82 -10000 82 83 -10000 83 84 -10000 84 85 -10000 85 86 -10000 86 87 -10000 87 88 -10000 88 89 -10000 89 90 -10000 90 91 -10000 91 92 -10000 92 93 -10000 93 94 -10000 94 95 -10000 95 96 -10000 96 97 -10000 97 98 -10000 98 99 -10000 99 100 -10000 100 101 -10000 101 102 -10000 102 103 -10000 103 104 -10000 104 105 -10000 105 106 -10000 106 107 -10000 107 108 -10000 108 109 -10000 109 110 -10000 110 111 -10000 111 112 -10000 112 113 -10000 113 114 -10000 114 115 -10000 115 116 -10000 116 117 -10000 117 118 -10000 118 119 -10000 119 120 -10000 120 121 -10000 121 122 -10000 122 123 -10000 123 124 -10000 124 125 -10000 125 126 -10000 126 127 -10000 127 128 -10000 128 129 -10000 129 130 -10000 130 131 -10000 131 132 -10000 132 133 -10000 133 134 -10000 134 135 -10000 135 136 -10000 136 137 -10000 137 138 -10000 138 139 -10000 139 140 -10000 140 141 -10000 141 142 -10000 142 143 -10000 143 144 -10000 144 145 -10000 145 146 -10000 146 147 -10000 147 148 -10000 148 149 -10000 149 150 -10000 150 151 -10000 151 152 -10000 152 153 -10000 153 154 -10000 154 155 -10000 155 156 -10000 156 157 -10000 157 158 -10000 158 159 -10000 159 160 -10000 160 161 -10000 161 162 -10000 162 163 -10000 163 164 -10000 164 165 -10000 165 166 -10000 166 167 -10000 167 168 -10000 168 169 -10000 169 170 -10000 170 171 -10000 171 172 -10000 172 173 -10000 173 174 -10000 174 175 -10000 175 176 -10000 176 177 -10000 177 178 -10000 178 179 -10000 179 180 -10000 180 181 -10000 181 182 -10000 182 183 -10000 183 184 -10000 184 185 -10000 185 186 -10000 186 187 -10000 187 188 -10000 188 189 -10000 189 190 -10000 190 191 -10000 191 192 -10000 192 193 -10000 193 194 -10000 194 195 -10000 195 196 -10000 196 197 -10000 197 198 -10000 198 199 -10000 199 200 -10000 200 201 -10000 201 202 -10000 202 203 -10000 203 204 -10000 204 205 -10000 205 206 -10000 206 207 -10000 207 208 -10000 208 209 -10000 209 210 -10000 210 211 -10000 211 212 -10000 212 213 -10000 213 214 -10000 214 215 -10000 215 216 -10000 216 217 -10000 217 218 -10000 218 219 -10000 219 220 -10000 220 221 -10000 221 222 -10000 222 223 -10000 223 224 -10000 224 225 -10000 225 226 -10000 226 227 -10000 227 228 -10000 228 229 -10000 229 230 -10000 230 231 -10000 231 232 -10000 232 233 -10000 233 234 -10000 234 235 -10000 235 236 -10000 236 237 -10000 237 238 -10000 238 239 -10000 239 240 -10000 240 241 -10000 241 242 -10000 242 243 -10000 243 244 -10000 244 245 -10000 245 246 -10000 246 247 -10000 247 248 -10000 248 249 -10000 249 250 -10000 250 251 -10000 251 252 -10000 252 253 -10000 253 254 -10000 254 255 -10000 255 256 -10000 256 257 -10000 257 258 -10000 258 259 -10000 259 260 -10000 260 261 -10000 261 262 -10000 262 263 -10000 263 264 -10000 264 265 -10000 265 266 -10000 266 267 -10000 267 268 -10000 268 269 -10000 269 270 -10000 270 271 -10000 271 272 -10000 272 273 -10000 273 274 -10000 274 275 -10000 275 276 -10000 276 277 -10000 277 278 -10000 278 279 -10000 279 280 -10000 280 281 -10000 281 282 -10000 282 283 -10000 283 284 -10000 284 285 -10000 285 286 -10000 286 287 -10000 287 288 -10000 288 289 -10000 289 290 -10000 290 291 -10000 291 292 -10000 292 293 -10000 293 294 -10000 294 295 -10000 295 296 -10000 296 297 -10000 297 298 -10000 298 299 -10000 299 300 -10000 300 301 -10000 301 302 -10000 302 303 -10000 303 304 -10000 304 305 -10000 305 306 -10000 306 307 -10000 307 308 -10000 308 309 -10000 309 310 -10000 310 311 -10000 311 312 -10000 312 313 -10000 313 314 -10000 314 315 -10000 315 316 -10000 316 317 -10000 317 318 -10000 318 319 -10000 319 320 -10000 320 321 -10000 321 322 -10000 322 323 -10000 323 324 -10000 324 325 -10000 325 326 -10000 326 327 -10000 327 328 -10000 328 329 -10000 329 330 -10000 330 331 -10000 331 332 -10000 332 333 -10000 333 334 -10000 334 335 -10000 335 336 -10000 336 337 -10000 337 338 -10000 338 339 -10000 339 340 -10000 340 341 -10000 341 342 -10000 342 343 -10000 343 344 -10000 344 345 -10000 345 346 -10000 346 347 -10000 347 348 -10000 348 349 -10000 349 350 -10000 350 351 -10000 351 352 -10000 352 353 -10000 353 354 -10000 354 355 -10000 355 356 -10000 356 357 -10000 357 358 -10000 358 359 -10000 359 360 -10000 360 361 -10000 361 362 -10000 362 363 -10000 363 364 -10000 364 365 -10000 365 366 -10000 366 367 -10000 367 368 -10000 368 369 -10000 369 370 -10000 370 371 -10000 371 372 -10000 372 373 -10000 373 374 -10000 374 375 -10000 375 376 -10000 376 377 -10000 377 378 -10000 378 379 -10000 379 380 -10000 380 381 -10000 381 382 -10000 382 383 -10000 383 384 -10000 384 385 -10000 385 386 -10000 386 387 -10000 387 388 -10000 388 389 -10000 389 390 -10000 390 391 -10000 391 392 -10000 392 393 -10000 393 394 -10000 394 395 -10000 395 396 -10000 396 397 -10000 397 398 -10000 398 399 -10000 399 400 -10000 400 401 -10000 401 402 -10000 402 403 -10000 403 404 -10000 404 405 -10000 405 406 -10000 406 407 -10000 407 408 -10000 408 409 -10000 409 410 -10000 410 411 -10000 411 412 -10000 412 413 -10000 413 414 -10000 414 415 -10000 415 416 -10000 416 417 -10000 417 418 -10000 418 419 -10000 419 420 -10000 420 421 -10000 421 422 -10000 422 423 -10000 423 424 -10000 424 425 -10000 425 426 -10000 426 427 -10000 427 428 -10000 428 429 -10000 429 430 -10000 430 431 -10000 431 432 -10000 432 433 -10000 433 434 -10000 434 435 -10000 435 436 -10000 436 437 -10000 437 438 -10000 438 439 -10000 439 440 -10000 440 441 -10000 441 442 -10000 442 443 -10000 443 444 -10000 444 445 -10000 445 446 -10000 446 447 -10000 447 448 -10000 448 449 -10000 449 450 -10000 450 451 -10000 451 452 -10000 452 453 -10000 453 454 -10000 454 455 -10000 455 456 -10000 456 457 -10000 457 458 -10000 458 459 -10000 459 460 -10000 460 461 -10000 461 462 -10000 462 463 -10000 463 464 -10000 464 465 -10000 465 466 -10000 466 467 -10000 467 468 -10000 468 469 -10000 469 470 -10000 470 471 -10000 471 472 -10000 472 473 -10000 473 474 -10000 474 475 -10000 475 476 -10000 476 477 -10000 477 478 -10000 478 479 -10000 479 480 -10000 480 481 -10000 481 482 -10000 482 483 -10000 483 484 -10000 484 485 -10000 485 486 -10000 486 487 -10000 487 488 -10000 488 489 -10000 489 490 -10000 490 491 -10000 491 492 -10000 492 493 -10000 493 494 -10000 494 495 -10000 495 496 -10000 496 497 -10000 497 498 -10000 498 499 -10000 499 500 -10000 500 501 -10000 501 502 -10000 502 503 -10000 503 504 -10000 504 505 -10000 505 506 -10000 506 507 -10000 507 508 -10000 508 509 -10000 509 510 -10000 510 511 -10000 511 512 -10000 512 513 -10000 513 514 -10000 514 515 -10000 515 516 -10000 516 517 -10000 517 518 -10000 518 519 -10000 519 520 -10000 520 521 -10000 521 522 -10000 522 523 -10000 523 524 -10000 524 525 -10000 525 526 -10000 526 527 -10000 527 528 -10000 528 529 -10000 529 530 -10000 530 531 -10000 531 532 -10000 532 533 -10000 533 534 -10000 534 535 -10000 535 536 -10000 536 537 -10000 537 538 -10000 538 539 -10000 539 540 -10000 540 541 -10000 541 542 -10000 542 543 -10000 543 544 -10000 544 545 -10000 545 546 -10000 546 547 -10000 547 548 -10000 548 549 -10000 549 550 -10000 550 551 -10000 551 552 -10000 552 553 -10000 553 554 -10000 554 555 -10000 555 556 -10000 556 557 -10000 557 558 -10000 558 559 -10000 559 560 -10000 560 561 -10000 561 562 -10000 562 563 -10000 563 564 -10000 564 565 -10000 565 566 -10000 566 567 -10000 567 568 -10000 568 569 -10000 569 570 -10000 570 571 -10000 571 572 -10000 572 573 -10000 573 574 -10000 574 575 -10000 575 576 -10000 576 577 -10000 577 578 -10000 578 579 -10000 579 580 -10000 580 581 -10000 581 582 -10000 582 583 -10000 583 584 -10000 584 585 -10000 585 586 -10000 586 587 -10000 587 588 -10000 588 589 -10000 589 590 -10000 590 591 -10000 591 592 -10000 592 593 -10000 593 594 -10000 594 595 -10000 595 596 -10000 596 597 -10000 597 598 -10000 598 599 -10000 599 600 -10000 600 601 -10000 601 602 -10000 602 603 -10000 603 604 -10000 604 605 -10000 605 606 -10000 606 607 -10000 607 608 -10000 608 609 -10000 609 610 -10000 610 611 -10000 611 612 -10000 612 613 -10000 613 614 -10000 614 615 -10000 615 616 -10000 616 617 -10000 617 618 -10000 618 619 -10000 619 620 -10000 620 621 -10000 621 622 -10000 622 623 -10000 623 624 -10000 624 625 -10000 625 626 -10000 626 627 -10000 627 628 -10000 628 629 -10000 629 630 -10000 630 631 -10000 631 632 -10000 632 633 -10000 633 634 -10000 634 635 -10000 635 636 -10000 636 637 -10000 637 638 -10000 638 639 -10000 639 640 -10000 640 641 -10000 641 642 -10000 642 643 -10000 643 644 -10000 644 645 -10000 645 646 -10000 646 647 -10000 647 648 -10000 648 649 -10000 649 650 -10000 650 651 -10000 651 652 -10000 652 653 -10000 653 654 -10000 654 655 -10000 655 656 -10000 656 657 -10000 657 658 -10000 658 659 -10000 659 660 -10000 660 661 -10000 661 662 -10000 662 663 -10000 663 664 -10000 664 665 -10000 665 666 -10000 666 667 -10000 667 668 -10000 668 669 -10000 669 670 -10000 670 671 -10000 671 672 -10000 672 673 -10000 673 674 -10000 674 675 -10000 675 676 -10000 676 677 -10000 677 678 -10000 678 679 -10000 679 680 -10000 680 681 -10000 681 682 -10000 682 683 -10000 683 684 -10000 684 685 -10000 685 686 -10000 686 687 -10000 687 688 -10000 688 689 -10000 689 690 -10000 690 691 -10000 691 692 -10000 692 693 -10000 693 694 -10000 694 695 -10000 695 696 -10000 696 697 -10000 697 698 -10000 698 699 -10000 699 700 -10000 700 701 -10000 701 702 -10000 702 703 -10000 703 704 -10000 704 705 -10000 705 706 -10000 706 707 -10000 707 708 -10000 708 709 -10000 709 710 -10000 710 711 -10000 711 712 -10000 712 713 -10000 713 714 -10000 714 715 -10000 715 716 -10000 716 717 -10000 717 718 -10000 718 719 -10000 719 720 -10000 720 721 -10000 721 722 -10000 722 723 -10000 723 724 -10000 724 725 -10000 725 726 -10000 726 727 -10000 727 728 -10000 728 729 -10000 729 730 -10000 730 731 -10000 731 732 -10000 732 733 -10000 733 734 -10000 734 735 -10000 735 736 -10000 736 737 -10000 737 738 -10000 738 739 -10000 739 740 -10000 740 741 -10000 741 742 -10000 742 743 -10000 743 744 -10000 744 745 -10000 745 746 -10000 746 747 -10000 747 748 -10000 748 749 -10000 749 750 -10000 750 751 -10000 751 752 -10000 752 753 -10000 753 754 -10000 754 755 -10000 755 756 -10000 756 757 -10000 757 758 -10000 758 759 -10000 759 760 -10000 760 761 -10000 761 762 -10000 762 763 -10000 763 764 -10000 764 765 -10000 765 766 -10000 766 767 -10000 767 768 -10000 768 769 -10000 769 770 -10000 770 771 -10000 771 772 -10000 772 773 -10000 773 774 -10000 774 775 -10000 775 776 -10000 776 777 -10000 777 778 -10000 778 779 -10000 779 780 -10000 780 781 -10000 781 782 -10000 782 783 -10000 783 784 -10000 784 785 -10000 785 786 -10000 786 787 -10000 787 788 -10000 788 789 -10000 789 790 -10000 790 791 -10000 791 792 -10000 792 793 -10000 793 794 -10000 794 795 -10000 795 796 -10000 796 797 -10000 797 798 -10000 798 799 -10000 799 800 -10000 800 801 -10000 801 802 -10000 802 803 -10000 803 804 -10000 804 805 -10000 805 806 -10000 806 807 -10000 807 808 -10000 808 809 -10000 809 810 -10000 810 811 -10000 811 812 -10000 812 813 -10000 813 814 -10000 814 815 -10000 815 816 -10000 816 817 -10000 817 818 -10000 818 819 -10000 819 820 -10000 820 821 -10000 821 822 -10000 822 823 -10000 823 824 -10000 824 825 -10000 825 826 -10000 826 827 -10000 827 828 -10000 828 829 -10000 829 830 -10000 830 831 -10000 831 832 -10000 832 833 -10000 833 834 -10000 834 835 -10000 835 836 -10000 836 837 -10000 837 838 -10000 838 839 -10000 839 840 -10000 840 841 -10000 841 842 -10000 842 843 -10000 843 844 -10000 844 845 -10000 845 846 -10000 846 847 -10000 847 848 -10000 848 849 -10000 849 850 -10000 850 851 -10000 851 852 -10000 852 853 -10000 853 854 -10000 854 855 -10000 855 856 -10000 856 857 -10000 857 858 -10000 858 859 -10000 859 860 -10000 860 861 -10000 861 862 -10000 862 863 -10000 863 864 -10000 864 865 -10000 865 866 -10000 866 867 -10000 867 868 -10000 868 869 -10000 869 870 -10000 870 871 -10000 871 872 -10000 872 873 -10000 873 874 -10000 874 875 -10000 875 876 -10000 876 877 -10000 877 878 -10000 878 879 -10000 879 880 -10000 880 881 -10000 881 882 -10000 882 883 -10000 883 884 -10000 884 885 -10000 885 886 -10000 886 887 -10000 887 888 -10000 888 889 -10000 889 890 -10000 890 891 -10000 891 892 -10000 892 893 -10000 893 894 -10000 894 895 -10000 895 896 -10000 896 897 -10000 897 898 -10000 898 899 -10000 899 900 -10000 900 901 -10000 901 902 -10000 902 903 -10000 903 904 -10000 904 905 -10000 905 906 -10000 906 907 -10000 907 908 -10000 908 909 -10000 909 910 -10000 910 911 -10000 911 912 -10000 912 913 -10000 913 914 -10000 914 915 -10000 915 916 -10000 916 917 -10000 917 918 -10000 918 919 -10000 919 920 -10000 920 921 -10000 921 922 -10000 922 923 -10000 923 924 -10000 924 925 -10000 925 926 -10000 926 927 -10000 927 928 -10000 928 929 -10000 929 930 -10000 930 931 -10000 931 932 -10000 932 933 -10000 933 934 -10000 934 935 -10000 935 936 -10000 936 937 -10000 937 938 -10000 938 939 -10000 939 940 -10000 940 941 -10000 941 942 -10000 942 943 -10000 943 944 -10000 944 945 -10000 945 946 -10000 946 947 -10000 947 948 -10000 948 949 -10000 949 950 -10000 950 951 -10000 951 952 -10000 952 953 -10000 953 954 -10000 954 955 -10000 955 956 -10000 956 957 -10000 957 958 -10000 958 959 -10000 959 960 -10000 960 961 -10000 961 962 -10000 962 963 -10000 963 964 -10000 964 965 -10000 965 966 -10000 966 967 -10000 967 968 -10000 968 969 -10000 969 970 -10000 970 971 -10000 971 972 -10000 972 973 -10000 973 974 -10000 974 975 -10000 975 976 -10000 976 977 -10000 977 978 -10000 978 979 -10000 979 980 -10000 980 981 -10000 981 982 -10000 982 983 -10000 983 984 -10000 984 985 -10000 985 986 -10000 986 987 -10000 987 988 -10000 988 989 -10000 989 990 -10000 990 991 -10000 991 992 -10000 992 993 -10000 993 994 -10000 994 995 -10000 995 996 -10000 996 997 -10000 997 998 -10000 998 999 -10000 999 1000 -10000 1000 1001 -10000 1001 1002 -10000 1002 1003 -10000 1003 1004 -10000 1004 1005 -10000 1005 1006 -10000 1006 1007 -10000 1007 1008 -10000 1008 1009 -10000 1009 1010 -10000 1010 1011 -10000 1011 1012 -10000 1012 1013 -10000 1013 1014 -10000 1014 1015 -10000 1015 1016 -10000 1016 1017 -10000 1017 1018 -10000 1018 1019 -10000 1019 1020 -10000 1020 1021 -10000 1021 1022 -10000 1022 1023 -10000 1023 1024 -10000 1024 1025 -10000 1025 1026 -10000 1026 1027 -10000 1027 1028 -10000 1028 1029 -10000 1029 1030 -10000 1030 1031 -10000 1031 1032 -10000 1032 1033 -10000 1033 1034 -10000 1034 1035 -10000 1035 1036 -10000 1036 1037 -10000 1037 1038 -10000 1038 1039 -10000 1039 1040 -10000 1040 1041 -10000 1041 1042 -10000 1042 1043 -10000 1043 1044 -10000 1044 1045 -10000 1045 1046 -10000 1046 1047 -10000 1047 1048 -10000 1048 1049 -10000 1049 1050 -10000 1050 1051 -10000 1051 1052 -10000 1052 1053 -10000 1053 1054 -10000 1054 1055 -10000 1055 1056 -10000 1056 1057 -10000 1057 1058 -10000 1058 1059 -10000 1059 1060 -10000 1060 1061 -10000 1061 1062 -10000 1062 1063 -10000 1063 1064 -10000 1064 1065 -10000 1065 1066 -10000 1066 1067 -10000 1067 1068 -10000 1068 1069 -10000 1069 1070 -10000 1070 1071 -10000 1071 1072 -10000 1072 1073 -10000 1073 1074 -10000 1074 1075 -10000 1075 1076 -10000 1076 1077 -10000 1077 1078 -10000 1078 1079 -10000 1079 1080 -10000 1080 1081 -10000 1081 1082 -10000 1082 1083 -10000 1083 1084 -10000 1084 1085 -10000 1085 1086 -10000 1086 1087 -10000 1087 1088 -10000 1088 1089 -10000 1089 1090 -10000 1090 1091 -10000 1091 1092 -10000 1092 1093 -10000 1093 1094 -10000 1094 1095 -10000 1095 1096 -10000 1096 1097 -10000 1097 1098 -10000 1098 1099 -10000 1099 1100 -10000 1100 1101 -10000 1101 1102 -10000 1102 1103 -10000 1103 1104 -10000 1104 1105 -10000 1105 1106 -10000 1106 1107 -10000 1107 1108 -10000 1108 1109 -10000 1109 1110 -10000 1110 1111 -10000 1111 1112 -10000 1112 1113 -10000 1113 1114 -10000 1114 1115 -10000 1115 1116 -10000 1116 1117 -10000 1117 1118 -10000 1118 1119 -10000 1119 1120 -10000 1120 1121 -10000 1121 1122 -10000 1122 1123 -10000 1123 1124 -10000 1124 1125 -10000 1125 1126 -10000 1126 1127 -10000 1127 1128 -10000 1128 1129 -10000 1129 1130 -10000 1130 1131 -10000 1131 1132 -10000 1132 1133 -10000 1133 1134 -10000 1134 1135 -10000 1135 1136 -10000 1136 1137 -10000 1137 1138 -10000 1138 1139 -10000 1139 1140 -10000 1140 1141 -10000 1141 1142 -10000 1142 1143 -10000 1143 1144 -10000 1144 1145 -10000 1145 1146 -10000 1146 1147 -10000 1147 1148 -10000 1148 1149 -10000 1149 1150 -10000 1150 1151 -10000 1151 1152 -10000 1152 1153 -10000 1153 1154 -10000 1154 1155 -10000 1155 1156 -10000 1156 1157 -10000 1157 1158 -10000 1158 1159 -10000 1159 1160 -10000 1160 1161 -10000 1161 1162 -10000 1162 1163 -10000 1163 1164 -10000 1164 1165 -10000 1165 1166 -10000 1166 1167 -10000 1167 1168 -10000 1168 1169 -10000 1169 1170 -10000 1170 1171 -10000 1171 1172 -10000 1172 1173 -10000 1173 1174 -10000 1174 1175 -10000 1175 1176 -10000 1176 1177 -10000 1177 1178 -10000 1178 1179 -10000 1179 1180 -10000 1180 1181 -10000 1181 1182 -10000 1182 1183 -10000 1183 1184 -10000 1184 1185 -10000 1185 1186 -10000 1186 1187 -10000 1187 1188 -10000 1188 1189 -10000 1189 1190 -10000 1190 1191 -10000 1191 1192 -10000 1192 1193 -10000 1193 1194 -10000 1194 1195 -10000 1195 1196 -10000 1196 1197 -10000 1197 1198 -10000 1198 1199 -10000 1199 1200 -10000 1200 1201 -10000 1201 1202 -10000 1202 1203 -10000 1203 1204 -10000 1204 1205 -10000 1205 1206 -10000 1206 1207 -10000 1207 1208 -10000 1208 1209 -10000 1209 1210 -10000 1210 1211 -10000 1211 1212 -10000 1212 1213 -10000 1213 1214 -10000 1214 1215 -10000 1215 1216 -10000 1216 1217 -10000 1217 1218 -10000 1218 1219 -10000 1219 1220 -10000 1220 1221 -10000 1221 1222 -10000 1222 1223 -10000 1223 1224 -10000 1224 1225 -10000 1225 1226 -10000 1226 1227 -10000 1227 1228 -10000 1228 1229 -10000 1229 1230 -10000 1230 1231 -10000 1231 1232 -10000 1232 1233 -10000 1233 1234 -10000 1234 1235 -10000 1235 1236 -10000 1236 1237 -10000 1237 1238 -10000 1238 1239 -10000 1239 1240 -10000 1240 1241 -10000 1241 1242 -10000 1242 1243 -10000 1243 1244 -10000 1244 1245 -10000 1245 1246 -10000 1246 1247 -10000 1247 1248 -10000 1248 1249 -10000 1249 1250 -10000 1250 1251 -10000 1251 1252 -10000 1252 1253 -10000 1253 1254 -10000 1254 1255 -10000 1255 1256 -10000 1256 1257 -10000 1257 1258 -10000 1258 1259 -10000 1259 1260 -10000 1260 1261 -10000 1261 1262 -10000 1262 1263 -10000 1263 1264 -10000 1264 1265 -10000 1265 1266 -10000 1266 1267 -10000 1267 1268 -10000 1268 1269 -10000 1269 1270 -10000 1270 1271 -10000 1271 1272 -10000 1272 1273 -10000 1273 1274 -10000 1274 1275 -10000 1275 1276 -10000 1276 1277 -10000 1277 1278 -10000 1278 1279 -10000 1279 1280 -10000 1280 1281 -10000 1281 1282 -10000 1282 1283 -10000 1283 1284 -10000 1284 1285 -10000 1285 1286 -10000 1286 1287 -10000 1287 1288 -10000 1288 1289 -10000 1289 1290 -10000 1290 1291 -10000 1291 1292 -10000 1292 1293 -10000 1293 1294 -10000 1294 1295 -10000 1295 1296 -10000 1296 1297 -10000 1297 1298 -10000 1298 1299 -10000 1299 1300 -10000 1300 1301 -10000 1301 1302 -10000 1302 1303 -10000 1303 1304 -10000 1304 1305 -10000 1305 1306 -10000 1306 1307 -10000 1307 1308 -10000 1308 1309 -10000 1309 1310 -10000 1310 1311 -10000 1311 1312 -10000 1312 1313 -10000 1313 1314 -10000 1314 1315 -10000 1315 1316 -10000 1316 1317 -10000 1317 1318 -10000 1318 1319 -10000 1319 1320 -10000 1320 1321 -10000 1321 1322 -10000 1322 1323 -10000 1323 1324 -10000 1324 1325 -10000 1325 1326 -10000 1326 1327 -10000 1327 1328 -10000 1328 1329 -10000 1329 1330 -10000 1330 1331 -10000 1331 1332 -10000 1332 1333 -10000 1333 1334 -10000 1334 1335 -10000 1335 1336 -10000 1336 1337 -10000 1337 1338 -10000 1338 1339 -10000 1339 1340 -10000 1340 1341 -10000 1341 1342 -10000 1342 1343 -10000 1343 1344 -10000 1344 1345 -10000 1345 1346 -10000 1346 1347 -10000 1347 1348 -10000 1348 1349 -10000 1349 1350 -10000 1350 1351 -10000 1351 1352 -10000 1352 1353 -10000 1353 1354 -10000 1354 1355 -10000 1355 1356 -10000 1356 1357 -10000 1357 1358 -10000 1358 1359 -10000 1359 1360 -10000 1360 1361 -10000 1361 1362 -10000 1362 1363 -10000 1363 1364 -10000 1364 1365 -10000 1365 1366 -10000 1366 1367 -10000 1367 1368 -10000 1368 1369 -10000 1369 1370 -10000 1370 1371 -10000 1371 1372 -10000 1372 1373 -10000 1373 1374 -10000 1374 1375 -10000 1375 1376 -10000 1376 1377 -10000 1377 1378 -10000 1378 1379 -10000 1379 1380 -10000 1380 1381 -10000 1381 1382 -10000 1382 1383 -10000 1383 1384 -10000 1384 1385 -10000 1385 1386 -10000 1386 1387 -10000 1387 1388 -10000 1388 1389 -10000 1389 1390 -10000 1390 1391 -10000 1391 1392 -10000 1392 1393 -10000 1393 1394 -10000 1394 1395 -10000 1395 1396 -10000 1396 1397 -10000 1397 1398 -10000 1398 1399 -10000 1399 1400 -10000 1400 1401 -10000 1401 1402 -10000 1402 1403 -10000 1403 1404 -10000 1404 1405 -10000 1405 1406 -10000 1406 1407 -10000 1407 1408 -10000 1408 1409 -10000 1409 1410 -10000 1410 1411 -10000 1411 1412 -10000 1412 1413 -10000 1413 1414 -10000 1414 1415 -10000 1415 1416 -10000 1416 1417 -10000 1417 1418 -10000 1418 1419 -10000 1419 1420 -10000 1420 1421 -10000 1421 1422 -10000 1422 1423 -10000 1423 1424 -10000 1424 1425 -10000 1425 1426 -10000 1426 1427 -10000 1427 1428 -10000 1428 1429 -10000 1429 1430 -10000 1430 1431 -10000 1431 1432 -10000 1432 1433 -10000 1433 1434 -10000 1434 1435 -10000 1435 1436 -10000 1436 1437 -10000 1437 1438 -10000 1438 1439 -10000 1439 1440 -10000 1440 1441 -10000 1441 1442 -10000 1442 1443 -10000 1443 1444 -10000 1444 1445 -10000 1445 1446 -10000 1446 1447 -10000 1447 1448 -10000 1448 1449 -10000 1449 1450 -10000 1450 1451 -10000 1451 1452 -10000 1452 1453 -10000 1453 1454 -10000 1454 1455 -10000 1455 1456 -10000 1456 1457 -10000 1457 1458 -10000 1458 1459 -10000 1459 1460 -10000 1460 1461 -10000 1461 1462 -10000 1462 1463 -10000 1463 1464 -10000 1464 1465 -10000 1465 1466 -10000 1466 1467 -10000 1467 1468 -10000 1468 1469 -10000 1469 1470 -10000 1470 1471 -10000 1471 1472 -10000 1472 1473 -10000 1473 1474 -10000 1474 1475 -10000 1475 1476 -10000 1476 1477 -10000 1477 1478 -10000 1478 1479 -10000 1479 1480 -10000 1480 1481 -10000 1481 1482 -10000 1482 1483 -10000 1483 1484 -10000 1484 1485 -10000 1485 1486 -10000 1486 1487 -10000 1487 1488 -10000 1488 1489 -10000 1489 1490 -10000 1490 1491 -10000 1491 1492 -10000 1492 1493 -10000 1493 1494 -10000 1494 1495 -10000 1495 1496 -10000 1496 1497 -10000 1497 1498 -10000 1498 1499 -10000 1499 1500 -10000 1500 1501 -10000 1501 1502 -10000 1502 1503 -10000 1503 1504 -10000 1504 1505 -10000 1505 1506 -10000 1506 1507 -10000 1507 1508 -10000 1508 1509 -10000 1509 1510 -10000 1510 1511 -10000 1511 1512 -10000 1512 1513 -10000 1513 1514 -10000 1514 1515 -10000 1515 1516 -10000 1516 1517 -10000 1517 1518 -10000 1518 1519 -10000 1519 1520 -10000 1520 1521 -10000 1521 1522 -10000 1522 1523 -10000 1523 1524 -10000 1524 1525 -10000 1525 1526 -10000 1526 1527 -10000 1527 1528 -10000 1528 1529 -10000 1529 1530 -10000 1530 1531 -10000 1531 1532 -10000 1532 1533 -10000 1533 1534 -10000 1534 1535 -10000 1535 1536 -10000 1536 1537 -10000 1537 1538 -10000 1538 1539 -10000 1539 1540 -10000 1540 1541 -10000 1541 1542 -10000 1542 1543 -10000 1543 1544 -10000 1544 1545 -10000 1545 1546 -10000 1546 1547 -10000 1547 1548 -10000 1548 1549 -10000 1549 1550 -10000 1550 1551 -10000 1551 1552 -10000 1552 1553 -10000 1553 1554 -10000 1554 1555 -10000 1555 1556 -10000 1556 1557 -10000 1557 1558 -10000 1558 1559 -10000 1559 1560 -10000 1560 1561 -10000 1561 1562 -10000 1562 1563 -10000 1563 1564 -10000 1564 1565 -10000 1565 1566 -10000 1566 1567 -10000 1567 1568 -10000 1568 1569 -10000 1569 1570 -10000 1570 1571 -10000 1571 1572 -10000 1572 1573 -10000 1573 1574 -10000 1574 1575 -10000 1575 1576 -10000 1576 1577 -10000 1577 1578 -10000 1578 1579 -10000 1579 1580 -10000 1580 1581 -10000 1581 1582 -10000 1582 1583 -10000 1583 1584 -10000 1584 1585 -10000 1585 1586 -10000 1586 1587 -10000 1587 1588 -10000 1588 1589 -10000 1589 1590 -10000 1590 1591 -10000 1591 1592 -10000 1592 1593 -10000 1593 1594 -10000 1594 1595 -10000 1595 1596 -10000 1596 1597 -10000 1597 1598 -10000 1598 1599 -10000 1599 1600 -10000 1600 1601 -10000 1601 1602 -10000 1602 1603 -10000 1603 1604 -10000 1604 1605 -10000 1605 1606 -10000 1606 1607 -10000 1607 1608 -10000 1608 1609 -10000 1609 1610 -10000 1610 1611 -10000 1611 1612 -10000 1612 1613 -10000 1613 1614 -10000 1614 1615 -10000 1615 1616 -10000 1616 1617 -10000 1617 1618 -10000 1618 1619 -10000 1619 1620 -10000 1620 1621 -10000 1621 1622 -10000 1622 1623 -10000 1623 1624 -10000 1624 1625 -10000 1625 1626 -10000 1626 1627 -10000 1627 1628 -10000 1628 1629 -10000 1629 1630 -10000 1630 1631 -10000 1631 1632 -10000 1632 1633 -10000 1633 1634 -10000 1634 1635 -10000 1635 1636 -10000 1636 1637 -10000 1637 1638 -10000 1638 1639 -10000 1639 1640 -10000 1640 1641 -10000 1641 1642 -10000 1642 1643 -10000 1643 1644 -10000 1644 1645 -10000 1645 1646 -10000 1646 1647 -10000 1647 1648 -10000 1648 1649 -10000 1649 1650 -10000 1650 1651 -10000 1651 1652 -10000 1652 1653 -10000 1653 1654 -10000 1654 1655 -10000 1655 1656 -10000 1656 1657 -10000 1657 1658 -10000 1658 1659 -10000 1659 1660 -10000 1660 1661 -10000 1661 1662 -10000 1662 1663 -10000 1663 1664 -10000 1664 1665 -10000 1665 1666 -10000 1666 1667 -10000 1667 1668 -10000 1668 1669 -10000 1669 1670 -10000 1670 1671 -10000 1671 1672 -10000 1672 1673 -10000 1673 1674 -10000 1674 1675 -10000 1675 1676 -10000 1676 1677 -10000 1677 1678 -10000 1678 1679 -10000 1679 1680 -10000 1680 1681 -10000 1681 1682 -10000 1682 1683 -10000 1683 1684 -10000 1684 1685 -10000 1685 1686 -10000 1686 1687 -10000 1687 1688 -10000 1688 1689 -10000 1689 1690 -10000 1690 1691 -10000 1691 1692 -10000 1692 1693 -10000 1693 1694 -10000 1694 1695 -10000 1695 1696 -10000 1696 1697 -10000 1697 1698 -10000 1698 1699 -10000 1699 1700 -10000 1700 1701 -10000 1701 1702 -10000 1702 1703 -10000 1703 1704 -10000 1704 1705 -10000 1705 1706 -10000 1706 1707 -10000 1707 1708 -10000 1708 1709 -10000 1709 1710 -10000 1710 1711 -10000 1711 1712 -10000 1712 1713 -10000 1713 1714 -10000 1714 1715 -10000 1715 1716 -10000 1716 1717 -10000 1717 1718 -10000 1718 1719 -10000 1719 1720 -10000 1720 1721 -10000 1721 1722 -10000 1722 1723 -10000 1723 1724 -10000 1724 1725 -10000 1725 1726 -10000 1726 1727 -10000 1727 1728 -10000 1728 1729 -10000 1729 1730 -10000 1730 1731 -10000 1731 1732 -10000 1732 1733 -10000 1733 1734 -10000 1734 1735 -10000 1735 1736 -10000 1736 1737 -10000 1737 1738 -10000 1738 1739 -10000 1739 1740 -10000 1740 1741 -10000 1741 1742 -10000 1742 1743 -10000 1743 1744 -10000 1744 1745 -10000 1745 1746 -10000 1746 1747 -10000 1747 1748 -10000 1748 1749 -10000 1749 1750 -10000 1750 1751 -10000 1751 1752 -10000 1752 1753 -10000 1753 1754 -10000 1754 1755 -10000 1755 1756 -10000 1756 1757 -10000 1757 1758 -10000 1758 1759 -10000 1759 1760 -10000 1760 1761 -10000 1761 1762 -10000 1762 1763 -10000 1763 1764 -10000 1764 1765 -10000 1765 1766 -10000 1766 1767 -10000 1767 1768 -10000 1768 1769 -10000 1769 1770 -10000 1770 1771 -10000 1771 1772 -10000 1772 1773 -10000 1773 1774 -10000 1774 1775 -10000 1775 1776 -10000 1776 1777 -10000 1777 1778 -10000 1778 1779 -10000 1779 1780 -10000 1780 1781 -10000 1781 1782 -10000 1782 1783 -10000 1783 1784 -10000 1784 1785 -10000 1785 1786 -10000 1786 1787 -10000 1787 1788 -10000 1788 1789 -10000 1789 1790 -10000 1790 1791 -10000 1791 1792 -10000 1792 1793 -10000 1793 1794 -10000 1794 1795 -10000 1795 1796 -10000 1796 1797 -10000 1797 1798 -10000 1798 1799 -10000 1799 1800 -10000 1800 1801 -10000 1801 1802 -10000 1802 1803 -10000 1803 1804 -10000 1804 1805 -10000 1805 1806 -10000 1806 1807 -10000 1807 1808 -10000 1808 1809 -10000 1809 1810 -10000 1810 1811 -10000 1811 1812 -10000 1812 1813 -10000 1813 1814 -10000 1814 1815 -10000 1815 1816 -10000 1816 1817 -10000 1817 1818 -10000 1818 1819 -10000 1819 1820 -10000 1820 1821 -10000 1821 1822 -10000 1822 1823 -10000 1823 1824 -10000 1824 1825 -10000 1825 1826 -10000 1826 1827 -10000 1827 1828 -10000 1828 1829 -10000 1829 1830 -10000 1830 1831 -10000 1831 1832 -10000 1832 1833 -10000 1833 1834 -10000 1834 1835 -10000 1835 1836 -10000 1836 1837 -10000 1837 1838 -10000 1838 1839 -10000 1839 1840 -10000 1840 1841 -10000 1841 1842 -10000 1842 1843 -10000 1843 1844 -10000 1844 1845 -10000 1845 1846 -10000 1846 1847 -10000 1847 1848 -10000 1848 1849 -10000 1849 1850 -10000 1850 1851 -10000 1851 1852 -10000 1852 1853 -10000 1853 1854 -10000 1854 1855 -10000 1855 1856 -10000 1856 1857 -10000 1857 1858 -10000 1858 1859 -10000 1859 1860 -10000 1860 1861 -10000 1861 1862 -10000 1862 1863 -10000 1863 1864 -10000 1864 1865 -10000 1865 1866 -10000 1866 1867 -10000 1867 1868 -10000 1868 1869 -10000 1869 1870 -10000 1870 1871 -10000 1871 1872 -10000 1872 1873 -10000 1873 1874 -10000 1874 1875 -10000 1875 1876 -10000 1876 1877 -10000 1877 1878 -10000 1878 1879 -10000 1879 1880 -10000 1880 1881 -10000 1881 1882 -10000 1882 1883 -10000 1883 1884 -10000 1884 1885 -10000 1885 1886 -10000 1886 1887 -10000 1887 1888 -10000 1888 1889 -10000 1889 1890 -10000 1890 1891 -10000 1891 1892 -10000 1892 1893 -10000 1893 1894 -10000 1894 1895 -10000 1895 1896 -10000 1896 1897 -10000 1897 1898 -10000 1898 1899 -10000 1899 1900 -10000 1900 1901 -10000 1901 1902 -10000 1902 1903 -10000 1903 1904 -10000 1904 1905 -10000 1905 1906 -10000 1906 1907 -10000 1907 1908 -10000 1908 1909 -10000 1909 1910 -10000 1910 1911 -10000 1911 1912 -10000 1912 1913 -10000 1913 1914 -10000 1914 1915 -10000 1915 1916 -10000 1916 1917 -10000 1917 1918 -10000 1918 1919 -10000 1919 1920 -10000 1920 1921 -10000 1921 1922 -10000 1922 1923 -10000 1923 1924 -10000 1924 1925 -10000 1925 1926 -10000 1926 1927 -10000 1927 1928 -10000 1928 1929 -10000 1929 1930 -10000 1930 1931 -10000 1931 1932 -10000 1932 1933 -10000 1933 1934 -10000 1934 1935 -10000 1935 1936 -10000 1936 1937 -10000 1937 1938 -10000 1938 1939 -10000 1939 1940 -10000 1940 1941 -10000 1941 1942 -10000 1942 1943 -10000 1943 1944 -10000 1944 1945 -10000 1945 1946 -10000 1946 1947 -10000 1947 1948 -10000 1948 1949 -10000 1949 1950 -10000 1950 1951 -10000 1951 1952 -10000 1952 1953 -10000 1953 1954 -10000 1954 1955 -10000 1955 1956 -10000 1956 1957 -10000 1957 1958 -10000 1958 1959 -10000 1959 1960 -10000 1960 1961 -10000 1961 1962 -10000 1962 1963 -10000 1963 1964 -10000 1964 1965 -10000 1965 1966 -10000 1966 1967 -10000 1967 1968 -10000 1968 1969 -10000 1969 1970 -10000 1970 1971 -10000 1971 1972 -10000 1972 1973 -10000 1973 1974 -10000 1974 1975 -10000 1975 1976 -10000 1976 1977 -10000 1977 1978 -10000 1978 1979 -10000 1979 1980 -10000 1980 1981 -10000 1981 1982 -10000 1982 1983 -10000 1983 1984 -10000 1984 1985 -10000 1985 1986 -10000 1986 1987 -10000 1987 1988 -10000 1988 1989 -10000 1989 1990 -10000 1990 1991 -10000 1991 1992 -10000 1992 1993 -10000 1993 1994 -10000 1994 1995 -10000 1995 1996 -10000 1996 1997 -10000 1997 1998 -10000 1998 1999 -10000 1999 2000 -10000 2000 1 -10000
11-25
xref: /MT6769_15.0.0_release/vnd/vendor/mediatek/proprietary/bootable/bootloader/lk/platform/mt6768/gpio_init.c HomeAnnotateLine# Scopes# Navigate#Raw Download current directory 1 /* Copyright Statement: 2 * 3 * This software/firmware and related documentation ("MediaTek Software") are 4 * protected under relevant copyright laws. The information contained herein is 5 * confidential and proprietary to MediaTek Inc. and/or its licensors. Without 6 * the prior written permission of MediaTek inc. and/or its licensors, any 7 * reproduction, modification, use or disclosure of MediaTek Software, and 8 * information contained herein, in whole or in part, shall be strictly 9 * prohibited. 10 * 11 * MediaTek Inc. (C) 2017. All rights reserved. 12 * 13 * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES 14 * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") 15 * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER 16 * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL 17 * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 18 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR 19 * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH 20 * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, 21 * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES 22 * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. 23 * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO 24 * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK 25 * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE 26 * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR 27 * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S 28 * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE 29 * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE 30 * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE 31 * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 32 * 33 * The following software/firmware and/or related documentation ("MediaTek 34 * Software") have been modified by MediaTek Inc. All revisions are subject to 35 * any receiver's applicable license agreements with MediaTek Inc. 36 */ 37 #include <platform/mt_gpio.h> 38 39 #if !defined(FPGA_PLATFORM) && !defined(USE_DTB_NO_DWS) 40 #include <cust_power.h> 41 #include <cust_gpio_boot.h> 42 #endif 43 44 #include <platform/mt_reg_base.h> 45 46 #include <debug.h> 47 #define GPIO_INIT_DEBUG 48 /*----------------------------------------------------------------------------*/ 49 #define GPIOTAG "[GPIO] " 50 #define GPIODBG(fmt, arg...) dprintf(INFO, GPIOTAG "%s: " fmt, __FUNCTION__ ,##arg) 51 #define GPIOERR(fmt, arg...) dprintf(INFO, GPIOTAG "%s: " fmt, __FUNCTION__ ,##arg) 52 #define GPIOVER(fmt, arg...) dprintf(INFO, GPIOTAG "%s: " fmt, __FUNCTION__ ,##arg) 53 54 #define GPIO_WR32(addr, data) DRV_WriteReg32(addr,data) 55 #define GPIO_RD32(addr) DRV_Reg32(addr) 56 57 #define ADDR_BIT 0 58 #define VAL_BIT 1 59 #define MASK_BIT 2 60 61 //#define GPIO_SET_DEFAULT_DBG 62 63 /*----------------------------------------------------------------------------*/ 64 #ifdef FPGA_PLATFORM 65 void mt_gpio_set_default(void) 66 { 67 return; 68 } 69 #else 70 71 #include <platform/gpio_init.h> 72 73 /* #ifdef OPLUS_FEATURE_CHG_BASIC */ 74 /* oplus add for user build disable uart */ 75 #include <platform.h> 76 #include <platform/boot_mode.h> 77 /* #endif */ 78 79 /* #ifdef OPLUS_FEATURE_CHG_BASIC */ 80 /* oplus add for user build disable uart */ 81 #define UART_DT_NODE_RX_NAME "rxpin" 82 #define UART_DT_NODE_TX_NAME "txpin" 83 #define UART_DT_NODE_NAME_SOC "/serial@11002000" 84 /* #endif */ 85 #ifdef USE_DTB_NO_DWS 86 #include <libfdt.h> 87 #include <lk_builtin_dtb.h> 88 extern void msdc_gpio_and_pad_init_by_id(int id); 89 #define ELEMENTS_PER_GPIO 7 90 #define GPIO_DT_NODE_NAME "/gpio@10005000" 91 #define GPIO_DT_NODE_PROP_NAME "gpio_init_default" 92 int mt_gpio_get_default_chip_from_dtb(void) 93 { 94 void *lk_drv_fdt = get_lk_overlayed_dtb(); 95 96 if (lk_drv_fdt == NULL) 97 panic("lk driver fdt is NULL!\n"); 98 int off = fdt_path_offset(lk_drv_fdt, GPIO_DT_NODE_NAME); 99 unsigned int *data; 100 int len = 0, pin, j; 101 102 dprintf(INFO, "[GPIO] Found " GPIO_DT_NODE_NAME "at offset %d\n", off); 103 if (off < 0) { 104 dprintf(CRITICAL, "[GPIO] Failed to find " GPIO_DT_NODE_NAME " in dtb\n"); 105 return -1; 106 } else { 107 data = (unsigned int *)fdt_getprop(lk_drv_fdt, off, GPIO_DT_NODE_PROP_NAME, &len); 108 if (len <= 0 || !data) { 109 dprintf(CRITICAL, "[GPIO] Fail to found property " GPIO_DT_NODE_PROP_NAME "\n"); 110 return -1; 111 } 112 dprintf(INFO, "[GPIO] Found perperty at 0x%08x, len %d\n", (unsigned int)data, len); 113 } 114 115 if ((len > 0) && ((len % ELEMENTS_PER_GPIO) == 0)) { 116 len /= (ELEMENTS_PER_GPIO * 4); //Per element use 4 bytes */ 117 for (j = 0; j < len; j++) { 118 pin = fdt32_to_cpu(*data); 119 120 if (pin < 0 || pin >= MT_GPIO_BASE_MAX) { 121 data += 7; 122 continue; 123 } 124 125 data++; 126 gpio_array[pin].mode = (unsigned char) fdt32_to_cpu(*data); 127 128 data++; 129 gpio_array[pin].dir = (unsigned char) fdt32_to_cpu(*data); 130 131 data++; 132 gpio_array[pin].dataout = (unsigned char) fdt32_to_cpu(*data); 133 134 data++; 135 gpio_array[pin].pullen = (unsigned char) fdt32_to_cpu(*data); 136 137 data++; 138 gpio_array[pin].pull = (unsigned char) fdt32_to_cpu(*data); 139 140 data++; 141 gpio_array[pin].smt = (unsigned char) fdt32_to_cpu(*data); 142 143 data++; 144 } 145 } 146 147 return 0; 148 } 149 #endif 150 151 void mt_gpio_set_default_chip(void) 152 { 153 unsigned pin = 0; 154 155 /* #ifdef OPLUS_FEATURE_CHG_BASIC */ 156 /* oplus add for user build disable uart */ 157 void *lk_drv_fdt = NULL; 158 unsigned int *data_rx; 159 unsigned int *data_tx; 160 int pin_rx = -1; 161 int pin_tx = -1; 162 int off1, len1, len2; 163 /* #endif */ 164 165 #ifdef USE_DTB_NO_DWS 166 /* 167 * Pins set as GPIO_INIT_NO_COVER, 168 * mode setting will not override in 169 * mt_gpio_get_default_chip_from_dtb() 170 */ 171 /* Init pin mode as 0xFF */ 172 for (pin = 0; pin < MT_GPIO_BASE_MAX; pin++) 173 gpio_array[pin].mode = 0xFF; 174 175 if (mt_gpio_get_default_chip_from_dtb() < 0) 176 return; 177 178 /* #ifdef OPLUS_FEATURE_CHG_BASIC */ 179 /* oplus add for user build disable uart */ 180 lk_drv_fdt = get_lk_overlayed_dtb(); 181 182 off1 = fdt_path_offset(lk_drv_fdt, UART_DT_NODE_NAME_SOC); 183 data_rx = (unsigned int *)fdt_getprop(lk_drv_fdt, off1, UART_DT_NODE_RX_NAME, &len1); 184 data_tx = (unsigned int *)fdt_getprop(lk_drv_fdt, off1, UART_DT_NODE_TX_NAME, &len2); 185 if (data_rx != NULL && data_tx != NULL) { 186 pin_rx = fdt32_to_cpu(*data_rx); 187 pin_tx = fdt32_to_cpu(*data_tx); 188 dprintf(CRITICAL, "[GPIO] len1=%d, len2=%d, data_rx=%d, data_tx=%d\n", len1, len2, pin_rx, pin_tx); 189 } 190 /* #endif */ 191 #endif 192 193 for (pin = 0; pin < MT_GPIO_BASE_MAX; pin++) { 194 /* Skip pins which is set as GPIO_INIT_NO_COVER */ 195 if (gpio_array[pin].mode == 0xFF) 196 continue; 197 198 /* set GPIOx_MODE*/ 199 mt_set_gpio_mode(0x80000000 + pin , gpio_array[pin].mode); 200 201 /* set GPIOx_DIR*/ 202 if (gpio_array[pin].dir != 0xFF) 203 mt_set_gpio_dir(0x80000000 + pin, gpio_array[pin].dir); 204 205 /* set GPIOx_PULL*/ 206 if (gpio_array[pin].pullen == 0) 207 gpio_array[pin].pull = GPIO_NO_PULL; 208 if (gpio_array[pin].pull != 0xFF) 209 mt_set_gpio_pull_select(0x80000000 + pin, gpio_array[pin].pull); 210 211 /* set GPIOx_PULLEN*/ 212 if (gpio_array[pin].pullen != 0xFF) 213 mt_set_gpio_pull_enable(0x80000000 + pin , gpio_array[pin].pullen); 214 215 /* set GPIOx_DATAOUT*/ 216 if (gpio_array[pin].dataout != 0xFF) 217 mt_set_gpio_out(0x80000000 + pin, gpio_array[pin].dataout); 218 219 /* set GPIO0_SMT */ 220 if (gpio_array[pin].smt != 0xFF) 221 mt_set_gpio_smt(0x80000000 + pin, gpio_array[pin].smt); 222 223 #ifdef GPIO_SET_DEFAULT_DBG 224 dprintf(CRITICAL, "GPIO%d desired: %d %d %d %d %d %d\n", 225 pin, 226 gpio_array[pin].mode, 227 gpio_array[pin].dir, 228 gpio_array[pin].pull, 229 gpio_array[pin].pullen, 230 gpio_array[pin].dataout, 231 gpio_array[pin].smt); 232 233 /* set GPIOx_MODE*/ 234 dprintf(CRITICAL, "GPIO%d modified: %d %d %d %d %d %d\n", 235 pin, 236 mt_get_gpio_mode(0x80000000 + pin), 237 mt_get_gpio_dir(0x80000000 + pin), 238 mt_get_gpio_pull_select(0x80000000 + pin), 239 mt_get_gpio_pull_enable(0x80000000 + pin), 240 mt_get_gpio_out(0x80000000 + pin), 241 mt_get_gpio_smt(0x80000000 + pin)); 242 #endif 243 244 } 245 /* #ifdef OPLUS_FEATURE_CHG_BASIC */ 246 /* oplus add for user build disable uart */ 247 #ifdef USER_LOAD 248 if (pin_rx == -1 || pin_tx == -1) { 249 dprintf(CRITICAL, "user build, but cannot read rx or tx pin!\n"); 250 } else { 251 if (g_boot_mode == FACTORY_BOOT) { 252 dprintf(CRITICAL, "user build, but FTM mode, do nothing!\n"); 253 } else if (g_boot_arg->log_dynamic_switch == 1) { 254 dprintf(CRITICAL, "user build, but oplus uart, do nothing!\n"); 255 } else { 256 mt_set_gpio_mode(pin_rx, 0); 257 mt_set_gpio_pull_enable(pin_rx, 0); 258 mt_set_gpio_dir(pin_rx, 0); 259 260 mt_set_gpio_mode(pin_tx, 0); 261 mt_set_gpio_pull_enable(pin_tx, 0); 262 mt_set_gpio_dir(pin_tx, 0); 263 264 dprintf(CRITICAL, "user build, oplus set uart0 input & pulldown!\n"); 265 } 266 } 267 #endif 268 /* #endif *//* OPLUS_FEATURE_CHG_BASIC */ 269 } 270 271 void mt_gpio_set_default(void) 272 { 273 mt_gpio_set_default_chip(); 274 275 return; 276 } 277 /*----------------------------------------------------------------------------*/ 278 #if CHECK_POINT_TEST 279 #if defined(GPIO_INIT_DEBUG) 280 static GPIO_REGS saved; 281 #endif 282 283 void mt_gpio_checkpoint_save(void) 284 { 285 #if defined(GPIO_INIT_DEBUG) 286 GPIO_REGS *pReg = (GPIO_REGS*)(GPIO_BASE); 287 GPIO_REGS *cur = &saved; 288 int idx; 289 290 memset(cur, 0x00, sizeof(*cur)); 291 for (idx = 0; idx < sizeof(pReg->dir)/sizeof(pReg->dir[0]); idx++) 292 cur->dir[idx].val = GPIO_RD32(&pReg->dir[idx]); 293 #if 0 294 for (idx = 0; idx < sizeof(pReg->pullen)/sizeof(pReg->pullen[0]); idx++) 295 cur->pullen[idx].val = GPIO_RD32(&pReg->pullen[idx]); 296 for (idx = 0; idx < sizeof(pReg->pullsel)/sizeof(pReg->pullsel[0]); idx++) 297 cur->pullsel[idx].val =GPIO_RD32(&pReg->pullsel[idx]); 298 #endif 299 for (idx = 0; idx < sizeof(pReg->dout)/sizeof(pReg->dout[0]); idx++) 300 cur->dout[idx].val = GPIO_RD32(&pReg->dout[idx]); 301 for (idx = 0; idx < sizeof(pReg->mode)/sizeof(pReg->mode[0]); idx++) 302 cur->mode[idx].val = GPIO_RD32(&pReg->mode[idx]); 303 #endif 304 } 305 /*----------------------------------------------------------------------------*/ 306 EXPORT_SYMBOL(mt_gpio_checkpoint_save); 307 /*----------------------------------------------------------------------------*/ 308 void mt_gpio_dump_diff(GPIO_REGS* pre, GPIO_REGS* cur) 309 { 310 #if defined(GPIO_INIT_DEBUG) 311 GPIO_REGS *pReg = (GPIO_REGS*)(GPIO_BASE); 312 int idx; 313 unsigned char* p = (unsigned char*)pre; 314 unsigned char* q = (unsigned char*)cur; 315 316 GPIOVER("------ dumping difference between %p and %p ------\n", pre, cur); 317 for (idx = 0; idx < sizeof(pReg->dir)/sizeof(pReg->dir[0]); idx++) { 318 if (pre->dir[idx].val != cur->dir[idx].val) 319 GPIOVER("diff: dir[%2d] : 0x%08X <=> 0x%08X\n", idx, pre->dir[idx].val, cur->dir[idx].val); 320 } 321 #if 0 322 for (idx = 0; idx < sizeof(pReg->pullen)/sizeof(pReg->pullen[0]); idx++) { 323 if (pre->pullen[idx].val != cur->pullen[idx].val) 324 GPIOVER("diff: pullen[%2d] : 0x%08X <=> 0x%08X\n", idx, pre->pullen[idx].val, cur->pullen[idx].val); 325 } 326 for (idx = 0; idx < sizeof(pReg->pullsel)/sizeof(pReg->pullsel[0]); idx++) { 327 if (pre->pullsel[idx].val != cur->pullsel[idx].val) 328 GPIOVER("diff: pullsel[%2d]: 0x%08X <=> 0x%08X\n", idx, pre->pullsel[idx].val, cur->pullsel[idx].val); 329 } 330 #endif 331 for (idx = 0; idx < sizeof(pReg->dout)/sizeof(pReg->dout[0]); idx++) { 332 if (pre->dout[idx].val != cur->dout[idx].val) 333 GPIOVER("diff: dout[%2d] : 0x%08X <=> 0x%08X\n", idx, pre->dout[idx].val, cur->dout[idx].val); 334 } 335 for (idx = 0; idx < sizeof(pReg->mode)/sizeof(pReg->mode[0]); idx++) { 336 if (pre->mode[idx].val != cur->mode[idx].val) 337 GPIOVER("diff: mode[%2d] : 0x%08X <=> 0x%08X\n", idx, pre->mode[idx].val, cur->mode[idx].val); 338 } 339 340 for (idx = 0; idx < sizeof(*pre); idx++) { 341 if (p[idx] != q[idx]) 342 GPIOVER("diff: raw[%2d]: 0x%02X <=> 0x%02X\n", idx, p[idx], q[idx]); 343 } 344 GPIOVER("memcmp(%p, %p, %d) = %d\n", p, q, sizeof(*pre), memcmp(p, q, sizeof(*pre))); 345 GPIOVER("------ dumping difference end --------------------------------\n"); 346 #endif 347 } 348 /*----------------------------------------------------------------------------*/ 349 void mt_gpio_checkpoint_compare(void) 350 { 351 #if defined(GPIO_INIT_DEBUG) 352 GPIO_REGS *pReg = (GPIO_REGS*)(GPIO_BASE); 353 GPIO_REGS latest; 354 GPIO_REGS *cur = &latest; 355 int idx; 356 357 memset(cur, 0x00, sizeof(*cur)); 358 for (idx = 0; idx < sizeof(pReg->dir)/sizeof(pReg->dir[0]); idx++) 359 cur->dir[idx].val = GPIO_RD32(&pReg->dir[idx]); 360 #if 0 361 for (idx = 0; idx < sizeof(pReg->pullen)/sizeof(pReg->pullen[0]); idx++) 362 cur->pullen[idx].val = GPIO_RD32(&pReg->pullen[idx]); 363 for (idx = 0; idx < sizeof(pReg->pullsel)/sizeof(pReg->pullsel[0]); idx++) 364 cur->pullsel[idx].val =GPIO_RD32(&pReg->pullsel[idx]); 365 #endif 366 for (idx = 0; idx < sizeof(pReg->dout)/sizeof(pReg->dout[0]); idx++) 367 cur->dout[idx].val = GPIO_RD32(&pReg->dout[idx]); 368 for (idx = 0; idx < sizeof(pReg->mode)/sizeof(pReg->mode[0]); idx++) 369 cur->mode[idx].val = GPIO_RD32(&pReg->mode[idx]); 370 371 //mt_gpio_dump_diff(&latest, &saved); 372 //GPIODBG("memcmp(%p, %p, %d) = %d\n", &latest, &saved, sizeof(GPIO_REGS), memcmp(&latest, &saved, sizeof(GPIO_REGS))); 373 if (memcmp(&latest, &saved, sizeof(GPIO_REGS))) { 374 GPIODBG("checkpoint compare fail!!\n"); 375 GPIODBG("dump checkpoint....\n"); 376 //mt_gpio_dump(&saved); 377 GPIODBG("\n\n"); 378 GPIODBG("dump current state\n"); 379 //mt_gpio_dump(&latest); 380 GPIODBG("\n\n"); 381 mt_gpio_dump_diff(&saved, &latest); 382 //WARN_ON(1); 383 } else { 384 GPIODBG("checkpoint compare success!!\n"); 385 } 386 #endif 387 } 388 /*----------------------------------------------------------------------------*/ 389 EXPORT_SYMBOL(mt_gpio_checkpoint_compare); 390 /*----------------------------------------------------------------------------*/ 391 #endif 392 #endif 393 served by {OpenGrok Last Index Update: Thu Aug 07 23:03:58 CST 2025mt_gpio_get_default_chip_from_dtb 获取的g_boot_mode =0 ,但是预期是4
最新发布
11-28
[root@localhost opt]# ./download_k8s_offline.sh ======================================== Kubernetes 离线部署包生成脚本 (v3.1) ======================================== 🔄 配置系统仓库... Repository epel is listed more than once in the configuration Docker CE Stable 9.6 kB/s | 3.5 kB 00:00 Kubernetes 5.3 kB/s | 1.4 kB 00:00 软件包 epel-release-8-22.el8.noarch 已安装。 依赖关系解决。 无需任何处理。 完毕! 🔄 创建 yum 缓存(不使用 fast 参数)... Repository epel is listed more than once in the configuration 38 文件已删除 Repository epel is listed more than once in the configuration CentOS-8 - BaseOS - mirrors.aliyun.com 4.2 MB/s | 4.6 MB 00:01 CentOS-8 - AppStream - mirrors.aliyun.com 6.0 MB/s | 8.4 MB 00:01 CentOS-8 - Extras - mirrors.aliyun.com 23 kB/s | 10 kB 00:00 Extra Packages for Enterprise Linux 8 - x86_64 7.1 MB/s | 14 MB 00:01 Docker CE Stable 145 kB/s | 79 kB 00:00 Kubernetes 297 kB/s | 182 kB 00:00 元数据缓存已建立。 ✅ 仓库配置完成 🛠️ 安装必要工具... Repository epel is listed more than once in the configuration 上次元数据过期检查:0:00:09 前,执行于 2025年07月25日 星期五 04时51分38秒。 软件包 yum-utils-4.0.21-3.el8.noarch 已安装。 软件包 createrepo_c-0.17.2-3.el8.x86_64 已安装。 软件包 wget-1.19.5-10.el8.x86_64 已安装。 软件包 curl-7.61.1-22.el8.x86_64 已安装。 软件包 jq-1.5-12.el8.x86_64 已安装。 依赖关系解决。 无需任何处理。 完毕! ✅ 工具安装完成 🔍 检测可用 Kubernetes 版本... 📋 可用 Kubernetes 版本: 1) 1.33.3 2) 1.33.2 3) 1.33.1 4) 1.33.0 5) 1.32.7 6) 1.32.6 7) 1.32.5 8) 1.32.4 9) 1.32.3 10) 1.32.2 11) 1.28.2-0 12) 1.28.1-0 13) 1.28.0-0 14) 1.27.6-0 15) 1.27.5-0 16) 1.27.4-0 17) 1.27.3-0 18) 1.27.2-0 19) 1.27.1-0 20) 1.27.0-0 21) 1.26.9-0 22) 1.26.8-0 23) 1.26.7-0 24) 1.26.6-0 25) 1.26.5-0 26) 1.26.4-0 27) 1.26.3-0 28) 1.26.2-0 29) 1.26.1-0 30) 1.26.0-0 31) 1.25.14-0 32) 1.25.13-0 33) 1.25.12-0 34) 1.25.11-0 35) 1.25.10-0 36) 1.25.9-0 37) 1.25.8-0 38) 1.25.7-0 39) 1.25.6-0 40) 1.25.5-0 41) 1.25.4-0 42) 1.25.3-0 43) 1.25.2-0 44) 1.25.1-0 45) 1.25.0-0 46) 1.24.17-0 47) 1.24.16-0 48) 1.24.15-0 49) 1.24.14-0 50) 1.24.13-0 51) 1.24.12-0 52) 1.24.11-0 53) 1.24.10-0 54) 1.24.9-0 55) 1.24.8-0 56) 1.24.7-0 57) 1.24.6-0 58) 1.24.5-0 59) 1.24.4-0 60) 1.24.3-0 61) 1.24.2-0 62) 1.24.1-0 63) 1.24.0-0 64) 1.23.17-0 65) 1.23.16-0 66) 1.23.15-0 67) 1.23.14-0 68) 1.23.13-0 69) 1.23.12-0 70) 1.23.11-0 71) 1.23.10-0 72) 1.23.9-0 73) 1.23.8-0 74) 1.23.7-0 75) 1.23.6-0 76) 1.23.5-0 77) 1.23.4-0 78) 1.23.3-0 79) 1.23.2-0 80) 1.23.1-0 81) 1.23.0-0 82) 1.22.17-0 83) 1.22.16-0 84) 1.22.15-0 85) 1.22.14-0 86) 1.22.13-0 87) 1.22.12-0 88) 1.22.11-0 89) 1.22.10-0 90) 1.22.9-0 91) 1.22.8-0 92) 1.22.7-0 93) 1.22.6-0 94) 1.22.5-0 95) 1.22.4-0 96) 1.22.3-0 97) 1.22.2-0 98) 1.22.1-0 99) 1.22.0-0 100) 1.21.14-0 101) 1.21.13-0 102) 1.21.12-0 103) 1.21.11-0 104) 1.21.10-0 105) 1.21.9-0 106) 1.21.8-0 107) 1.21.7-0 108) 1.21.6-0 109) 1.21.5-0 110) 1.21.4-0 111) 1.21.3-0 112) 1.21.2-0 113) 1.21.1-0 114) 1.21.0-0 115) 1.20.15-0 116) 1.20.14-0 117) 1.20.13-0 118) 1.20.12-0 119) 1.20.11-0 120) 1.20.10-0 121) 1.20.9-0 122) 1.20.8-0 123) 1.20.7-0 124) 1.20.6-0 125) 1.20.5-0 126) 1.20.4-0 127) 1.20.2-0 128) 1.20.1-0 129) 1.20.0-0 130) 1.19.16-0 131) 1.19.15-0 132) 1.19.14-0 133) 1.19.13-0 134) 1.19.12-0 135) 1.19.11-0 136) 1.19.10-0 137) 1.19.9-0 138) 1.19.8-0 139) 1.19.7-0 140) 1.19.6-0 141) 1.19.5-0 142) 1.19.4-0 143) 1.19.3-0 144) 1.19.2-0 145) 1.19.1-0 146) 1.19.0-0 147) 1.18.20-0 148) 1.18.19-0 149) 1.18.18-0 150) 1.18.17-0 151) 1.18.16-0 152) 1.18.15-0 153) 1.18.14-0 154) 1.18.13-0 155) 1.18.12-0 156) 1.18.10-0 157) 1.18.9-0 158) 1.18.8-0 159) 1.18.6-0 160) 1.18.5-0 161) 1.18.4-1 162) 1.18.4-0 163) 1.18.3-0 164) 1.18.2-0 165) 1.18.1-0 166) 1.18.0-0 167) 1.17.17-0 168) 1.17.16-0 169) 1.17.15-0 170) 1.17.14-0 171) 1.17.13-0 172) 1.17.12-0 173) 1.17.11-0 174) 1.17.9-0 175) 1.17.8-0 176) 1.17.7-1 177) 1.17.7-0 178) 1.17.6-0 179) 1.17.5-0 180) 1.17.4-0 181) 1.17.3-0 182) 1.17.2-0 183) 1.17.1-0 184) 1.17.0-0 185) 1.16.15-0 186) 1.16.14-0 187) 1.16.13-0 188) 1.16.12-0 189) 1.16.11-1 190) 1.16.11-0 191) 1.16.10-0 192) 1.16.9-0 193) 1.16.8-0 194) 1.16.7-0 195) 1.16.6-0 196) 1.16.5-0 197) 1.16.4-0 198) 1.16.3-0 199) 1.16.2-0 200) 1.16.1-0 201) 1.16.0-0 202) 1.15.12-0 203) 1.15.11-0 204) 1.15.10-0 205) 1.15.9-0 206) 1.15.8-0 207) 1.15.7-0 208) 1.15.6-0 209) 1.15.5-0 210) 1.15.4-0 211) 1.15.3-0 212) 1.15.2-0 213) 1.15.1-0 214) 1.15.0-0 215) 1.14.10-0 216) 1.14.9-0 217) 1.14.8-0 218) 1.14.7-0 219) 1.14.6-0 220) 1.14.5-0 221) 1.14.4-0 222) 1.14.3-0 223) 1.14.2-0 224) 1.14.1-0 225) 1.14.0-0 226) 1.13.12-0 227) 1.13.11-0 228) 1.13.10-0 229) 1.13.9-0 230) 1.13.8-0 231) 1.13.7-0 232) 1.13.6-0 233) 1.13.5-0 234) 1.13.4-0 235) 1.13.3-0 236) 1.13.2-0 237) 1.13.1-0 238) 1.13.0-0 239) 1.12.10-0 240) 1.12.9-0 241) 1.12.8-0 242) 1.12.7-0 243) 1.12.6-0 244) 1.12.5-0 245) 1.12.4-0 246) 1.12.3-0 247) 1.12.2-0 248) 1.12.1-0 249) 1.12.0-0 250) 1.11.10-0 251) 1.11.9-0 252) 1.11.8-0 253) 1.11.7-0 254) 1.11.6-0 255) 1.11.5-0 256) 1.11.4-0 257) 1.11.3-0 258) 1.11.2-0 259) 1.11.1-0 260) 1.11.0-0 261) 1.10.13-0 262) 1.10.12-0 263) 1.10.11-0 264) 1.10.10-0 265) 1.10.9-0 266) 1.10.8-0 267) 1.10.7-0 268) 1.10.6-0 269) 1.10.5-0 270) 1.10.4-0 271) 1.10.3-0 272) 1.10.2-0 273) 1.10.1-0 274) 1.10.0-0 275) 1.9.11-0 276) 1.9.10-0 277) 1.9.9-0 278) 1.9.8-0 279) 1.9.7-0 280) 1.9.6-0 281) 1.9.5-0 282) 1.9.4-0 283) 1.9.3-0 284) 1.9.2-0 285) 1.9.1-0 286) 1.9.0-0 287) 1.8.15-0 288) 1.8.14-0 289) 1.8.13-0 290) 1.8.12-0 291) 1.8.11-0 292) 1.8.10-0 293) 1.8.9-0 294) 1.8.8-0 295) 1.8.7-0 296) 1.8.6-0 297) 1.8.5-1 298) 1.8.5-0 299) 1.8.4-1 300) 1.8.4-0 301) 1.8.3-1 302) 1.8.3-0 303) 1.8.2-1 304) 1.8.2-0 305) 1.8.1-1 306) 1.8.1-0 307) 1.8.0-1 308) 1.8.0-0 309) 1.7.16-0 310) 1.7.15-0 311) 1.7.14-0 312) 1.7.11-1 313) 1.7.11-0 314) 1.7.10-1 315) 1.7.10-0 316) 1.7.9-1 317) 1.7.9-0 318) 1.7.8-2 319) 1.7.8-1 320) 1.7.7-2 321) 1.7.7-1 322) 1.7.6-2 323) 1.7.6-1 324) 1.7.5-1 325) 1.7.5-0 326) 1.7.4-1 327) 1.7.4-0 328) 1.7.3-2 329) 1.7.3-1 330) 1.7.2-1 331) 1.7.2-0 332) 1.7.1-1 333) 1.7.1-0 334) 1.7.0-1 335) 1.7.0-0 336) 1.6.13-1 337) 1.6.13-0 338) 1.6.12-1 339) 1.6.12-0 340) 1.6.11-1 341) 1.6.11-0 342) 1.6.10-1 343) 1.6.10-0 344) 1.6.9-1 345) 1.6.9-0 346) 1.6.8-1 347) 1.6.8-0 348) 1.6.7-1 349) 1.6.7-0 350) 1.6.6-1 351) 1.6.6-0 352) 1.6.5-1 353) 1.6.5-0 354) 1.6.4-1 355) 1.6.4-0 356) 1.6.3-1 357) 1.6.3-0 358) 1.6.2-1 359) 1.6.2-0 360) 1.6.1-1 361) 1.6.1-0 362) 1.6.0-1 363) 1.6.0-0 364) 1.5.4-1 365) 1.5.4-0 👉 请选择版本号 [1-365, 默认1]: 11 ✅ 已选择版本: Kubernetes v1.28.2 📦 下载Kubernetes组件... ⬇️ 下载: kubelet-1.28.2-0 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubelet-1.28.2-0.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubelet-1.28.2-0.el7.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubelet-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubelet-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubelet-1.28.2-0.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubelet-1.28.2-0.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubelet-1.28.2-0.el7.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubelet-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubelet-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubelet-1.28.2-0.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubelet-1.28.2-0.rpm 🔗 尝试: https://dl.k8s.io/release/kubelet-1.28.2-0.el7.rpm 🔗 尝试: https://dl.k8s.io/release/kubelet-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubelet-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubelet-1.28.2-0.x86_64.rpm 🔄 使用yumdownloader下载: kubelet Repository epel is listed more than once in the configuration 错误:未知仓库:'k8s-*' mv: '/opt/k8s-offline/packages/kubelet-1.28.2-0.rpm' 与'/opt/k8s-offline/packages/kubelet-1.28.2-0.rpm' 为同一文件 ✅ yumdownloader下载成功: kubelet-1.28.2-0.rpm ⬇️ 下载: kubeadm-1.28.2-0 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubeadm-1.28.2-0.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubeadm-1.28.2-0.el7.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubeadm-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubeadm-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubeadm-1.28.2-0.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubeadm-1.28.2-0.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubeadm-1.28.2-0.el7.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubeadm-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubeadm-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubeadm-1.28.2-0.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubeadm-1.28.2-0.rpm 🔗 尝试: https://dl.k8s.io/release/kubeadm-1.28.2-0.el7.rpm 🔗 尝试: https://dl.k8s.io/release/kubeadm-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubeadm-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubeadm-1.28.2-0.x86_64.rpm 🔄 使用yumdownloader下载: kubeadm Repository epel is listed more than once in the configuration 错误:未知仓库:'k8s-*' mv: '/opt/k8s-offline/packages/kubeadm-1.28.2-0.rpm' 与'/opt/k8s-offline/packages/kubeadm-1.28.2-0.rpm' 为同一文件 ✅ yumdownloader下载成功: kubeadm-1.28.2-0.rpm ⬇️ 下载: kubectl-1.28.2-0 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubectl-1.28.2-0.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubectl-1.28.2-0.el7.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubectl-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubectl-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/kubectl-1.28.2-0.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubectl-1.28.2-0.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubectl-1.28.2-0.el7.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubectl-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubectl-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/kubectl-1.28.2-0.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubectl-1.28.2-0.rpm 🔗 尝试: https://dl.k8s.io/release/kubectl-1.28.2-0.el7.rpm 🔗 尝试: https://dl.k8s.io/release/kubectl-1.28.2-0.el7.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubectl-1.28.2-0.el8.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/kubectl-1.28.2-0.x86_64.rpm 🔄 使用yumdownloader下载: kubectl Repository epel is listed more than once in the configuration 错误:未知仓库:'k8s-*' mv: '/opt/k8s-offline/packages/kubectl-1.28.2-0.rpm' 与'/opt/k8s-offline/packages/kubectl-1.28.2-0.rpm' 为同一文件 ✅ yumdownloader下载成功: kubectl-1.28.2-0.rpm ⬇️ 下载: cri-tools-1.26.0 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/cri-tools-1.26.0.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/cri-tools-1.26.0.el7.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/cri-tools-1.26.0.el7.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/cri-tools-1.26.0.el8.x86_64.rpm 🔗 尝试: https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/Packages/cri-tools-1.26.0.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/cri-tools-1.26.0.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/cri-tools-1.26.0.el7.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/cri-tools-1.26.0.el7.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/cri-tools-1.26.0.el8.x86_64.rpm 🔗 尝试: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/cri-tools-1.26.0.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/cri-tools-1.26.0.rpm 🔗 尝试: https://dl.k8s.io/release/cri-tools-1.26.0.el7.rpm 🔗 尝试: https://dl.k8s.io/release/cri-tools-1.26.0.el7.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/cri-tools-1.26.0.el8.x86_64.rpm 🔗 尝试: https://dl.k8s.io/release/cri-tools-1.26.0.x86_64.rpm 🔄 使用yumdownloader下载: cri-tools Repository epel is listed more than once in the configuration 错误:未知仓库:'k8s-*' mv: '/opt/k8s-offline/packages/cri-tools-1.26.0.rpm' 与'/opt/k8s-offline/packages/cri-tools-1.26.0.rpm' 为同一文件 ✅ yumdownloader下载成功: cri-tools-1.26.0.rpm ✅ Kubernetes组件下载完成 🐳 下载Docker组件... 根据日志重新生成所有脚本
07-26
---------------------------- PROCESS ENDED (4596) for package com.kotei.fusionpositiondemo.debug ---------------------------- 2025-08-05 15:13:33.804 4972-4972 nativeloader com.kotei.fusionpositiondemo.debug D Load libframework-connectivity-tiramisu-jni.so using APEX ns com_android_tethering for caller /apex/com.android.tethering/javalib/framework-connectivity-t.jar: ok 2025-08-05 15:13:33.899 4972-4972 nativeloader com.kotei.fusionpositiondemo.debug D Load /data/user/0/com.kotei.fusionpositiondemo.debug/code_cache/startup_agents/9758b833-agent.so using system ns (caller=<unknown>): ok 2025-08-05 15:13:33.929 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug W hiddenapi: DexFile /data/data/com.kotei.fusionpositiondemo.debug/code_cache/.studio/instruments-07dd17c6.jar is in boot class path but is not in a known location 2025-08-05 15:13:34.006 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug W Redefining intrinsic method java.lang.Thread java.lang.Thread.currentThread(). This may cause the unexpected use of the original definition of java.lang.Thread java.lang.Thread.currentThread()in methods that have already been compiled. 2025-08-05 15:13:34.006 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug W Redefining intrinsic method boolean java.lang.Thread.interrupted(). This may cause the unexpected use of the original definition of boolean java.lang.Thread.interrupted()in methods that have already been compiled. 2025-08-05 15:13:34.039 4972-4972 CompatChangeReporter com.kotei.fusionpositiondemo.debug D Compat change id reported: 242716250; UID 10216; state: ENABLED ---------------------------- PROCESS STARTED (4972) for package com.kotei.fusionpositiondemo.debug ---------------------------- 2025-08-05 15:13:34.216 4972-4972 nativeloader com.kotei.fusionpositiondemo.debug D Configuring clns-9 for other apk /data/app/~~iRz61aG51jr6IKfcBO13Pw==/com.kotei.fusionpositiondemo.debug-NtZ59R1bU1VaYYMSRrjpBA==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~iRz61aG51jr6IKfcBO13Pw==/com.kotei.fusionpositiondemo.debug-NtZ59R1bU1VaYYMSRrjpBA==/lib/x86_64:/data/app/~~iRz61aG51jr6IKfcBO13Pw==/com.kotei.fusionpositiondemo.debug-NtZ59R1bU1VaYYMSRrjpBA==/base.apk!/lib/x86_64, permitted_path=/data:/mnt/expand:/data/user/0/com.kotei.fusionpositiondemo.debug 2025-08-05 15:13:34.220 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I AssetManager2(0x70d598f55878) locale list changing from [] to [en-US] 2025-08-05 15:13:34.222 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I AssetManager2(0x70d598f52cb8) locale list changing from [] to [en-US] 2025-08-05 15:13:34.229 4972-4972 GraphicsEnvironment com.kotei.fusionpositiondemo.debug V Currently set values for: 2025-08-05 15:13:34.229 4972-4972 GraphicsEnvironment com.kotei.fusionpositiondemo.debug V angle_gl_driver_selection_pkgs=[] 2025-08-05 15:13:34.229 4972-4972 GraphicsEnvironment com.kotei.fusionpositiondemo.debug V angle_gl_driver_selection_values=[] 2025-08-05 15:13:34.230 4972-4972 GraphicsEnvironment com.kotei.fusionpositiondemo.debug V com.kotei.fusionpositiondemo.debug is not listed in per-application setting 2025-08-05 15:13:34.230 4972-4972 GraphicsEnvironment com.kotei.fusionpositiondemo.debug V ANGLE allowlist from config: 2025-08-05 15:13:34.230 4972-4972 GraphicsEnvironment com.kotei.fusionpositiondemo.debug V com.kotei.fusionpositiondemo.debug is not listed in ANGLE allowlist or settings, returning default 2025-08-05 15:13:34.230 4972-4972 GraphicsEnvironment com.kotei.fusionpositiondemo.debug V Neither updatable production driver nor prerelease driver is supported. 2025-08-05 15:13:34.236 4972-4972 ActivityThread com.kotei.fusionpositiondemo.debug W Application com.kotei.fusionpositiondemo.debug is suspending. Debugger needs to resume to continue. 2025-08-05 15:13:34.237 4972-4972 System.out com.kotei.fusionpositiondemo.debug I Sending WAIT chunk 2025-08-05 15:13:34.237 4972-4972 System.out com.kotei.fusionpositiondemo.debug I Waiting for debugger first packet 2025-08-05 15:13:35.002 536-536 adbd adbd E failed to connect to socket 'localabstract:/com.kotei.fusionpositiondemo.debug-0/platform-1754378014920.sock': could not connect to localabstract address 'localabstract:/com.kotei.fusionpositiondemo.debug-0/platform-1754378014920.sock' 2025-08-05 15:13:36.788 4972-4976 nativeloader com.kotei.fusionpositiondemo.debug D Load libjdwp.so using system ns (caller=<unknown>): ok 2025-08-05 15:13:36.988 4972-4972 System.out com.kotei.fusionpositiondemo.debug I Debug.suspendAllAndSentVmStart 2025-08-05 15:13:37.347 4972-4972 System.out com.kotei.fusionpositiondemo.debug I Debug.suspendAllAndSendVmStart, resumed 2025-08-05 15:13:37.400 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden method Landroid/view/WindowManagerGlobal;->getInstance()Landroid/view/WindowManagerGlobal; (runtime_flags=0, domain=platform, api=unsupported) from Lcurtains/internal/WindowManagerSpy$windowManagerInstance$2; (domain=app) using reflection: allowed 2025-08-05 15:13:37.401 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden field Landroid/view/WindowManagerGlobal;->mViews:Ljava/util/ArrayList; (runtime_flags=0, domain=platform, api=unsupported) from Lcurtains/internal/WindowManagerSpy$mViewsField$2; (domain=app) using reflection: allowed 2025-08-05 15:13:37.401 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden field Landroid/app/ActivityThread;->mH:Landroid/app/ActivityThread$H; (runtime_flags=0, domain=platform, api=unsupported) from Lleakcanary/ServiceWatcher; (domain=app) using reflection: allowed 2025-08-05 15:13:37.402 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden method Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread; (runtime_flags=0, domain=platform, api=unsupported) from Lleakcanary/ServiceWatcher$activityThreadInstance$2; (domain=app) using reflection: allowed 2025-08-05 15:13:37.402 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden field Landroid/os/Handler;->mCallback:Landroid/os/Handler$Callback; (runtime_flags=0, domain=platform, api=unsupported) from Lleakcanary/ServiceWatcher; (domain=app) using reflection: allowed 2025-08-05 15:13:37.402 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden field Landroid/util/Singleton;->mInstance:Ljava/lang/Object; (runtime_flags=0, domain=platform, api=unsupported) from Lleakcanary/ServiceWatcher; (domain=app) using reflection: allowed 2025-08-05 15:13:37.402 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden method Landroid/util/Singleton;->get()Ljava/lang/Object; (runtime_flags=0, domain=platform, api=unsupported) from Lleakcanary/ServiceWatcher; (domain=app) using reflection: allowed 2025-08-05 15:13:37.403 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden field Landroid/app/ActivityManager;->IActivityManagerSingleton:Landroid/util/Singleton; (runtime_flags=0, domain=platform, api=unsupported) from Lleakcanary/ServiceWatcher; (domain=app) using reflection: allowed 2025-08-05 15:13:37.431 4972-5040 DisplayManager com.kotei.fusionpositiondemo.debug I Choreographer implicitly registered for the refresh rate. 2025-08-05 15:13:37.438 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I AssetManager2(0x70d598f52678) locale list changing from [] to [en-US] 2025-08-05 15:13:37.483 4972-4972 AppCompatDelegate com.kotei.fusionpositiondemo.debug D Checking for metadata for AppLocalesMetadataHolderService : Service not found 2025-08-05 15:13:37.484 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I AssetManager2(0x70d598f55558) locale list changing from [] to [en-US] 2025-08-05 15:13:37.506 4972-4972 ashmem com.kotei.fusionpositiondemo.debug E Pinning is deprecated since Android Q. Please use trim or other methods. 2025-08-05 15:13:37.809 4972-5038 itiondemo.debug com.kotei.fusionpositiondemo.debug W Verification of void leakcanary.RemoteWorkManagerHeapAnalyzer.onEvent(leakcanary.EventListener$Event) took 299.711ms (517.16 bytecodes/s) (0B arena alloc) 2025-08-05 15:13:38.107 4972-5038 LeakCanary com.kotei.fusionpositiondemo.debug D LeakCanary is currently disabled: Waiting for debugger to detach. 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getAllProviders: passive 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getAllProviders: network 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getAllProviders: fused 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getAllProviders: gps 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getProviders true: passive 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getProviders true: fused 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getProviders true: gps 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getProviders false: passive 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getProviders false: network 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getProviders false: fused 2025-08-05 15:13:38.112 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getProviders false: gps 2025-08-05 15:13:38.113 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager getGnssHardwareModelName: Android Studio Emulator GPS 2025-08-05 15:13:38.185 4972-5040 EGL_emulation com.kotei.fusionpositiondemo.debug I Opening libGLESv1_CM_emulation.so 2025-08-05 15:13:38.185 4972-5040 EGL_emulation com.kotei.fusionpositiondemo.debug I Opening libGLESv2_emulation.so 2025-08-05 15:13:38.190 4972-5040 HWUI com.kotei.fusionpositiondemo.debug W Failed to initialize 101010-2 format, error = EGL_SUCCESS 2025-08-05 15:13:38.261 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug W Verification of void com.kotei.fusionpositioningengine.FusionPositionManager$3.onLocationChanged(android.location.Location) took 145.249ms (1184.17 bytecodes/s) (0B arena alloc) 2025-08-05 15:13:38.298 4972-4972 DesktopModeFlags com.kotei.fusionpositiondemo.debug D Toggle override initialized to: OVERRIDE_UNSET 2025-08-05 15:13:38.347 4972-4972 HWUI com.kotei.fusionpositiondemo.debug W Image decoding logging dropped! 2025-08-05 15:13:38.351 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (runtime_flags=0, domain=platform, api=unsupported) from Landroidx/appcompat/widget/ViewUtils; (domain=app) using reflection: allowed 2025-08-05 15:13:38.351 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (runtime_flags=0, domain=platform, api=unsupported) from Landroidx/appcompat/widget/ViewUtils; (domain=app) using reflection: allowed 2025-08-05 15:13:38.374 4972-4972 itiondemo.debug com.kotei.fusionpositiondemo.debug I hiddenapi: Accessing hidden field Lcom/android/internal/policy/DecorView;->mWindow:Lcom/android/internal/policy/PhoneWindow; (runtime_flags=0, domain=platform, api=unsupported) from Lcurtains/internal/WindowSpy$windowField$2; (domain=app) using reflection: allowed 2025-08-05 15:13:38.376 4972-4972 HWUI com.kotei.fusionpositiondemo.debug W Unknown dataspace 0 2025-08-05 15:13:38.895 4972-4977 itiondemo.debug com.kotei.fusionpositiondemo.debug I Compiler allocated 5042KB to compile void android.view.ViewRootImpl.performTraversals() 2025-08-05 15:13:39.047 4972-4972 InsetsController com.kotei.fusionpositiondemo.debug D hide(ime(), fromIme=false) 2025-08-05 15:13:39.047 4972-4972 ImeTracker com.kotei.fusionpositiondemo.debug I com.kotei.fusionpositiondemo.debug:b7546c62: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN 2025-08-05 15:13:39.122 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager onSatelliteStatusChanged: 6 2025-08-05 15:13:40.092 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager onSatelliteStatusChanged: 6 2025-08-05 15:13:41.092 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager onSatelliteStatusChanged: 6 2025-08-05 15:13:42.095 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager onSatelliteStatusChanged: 6 2025-08-05 15:13:42.103 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager GPS_PROVIDER getLatitude: 37.421998333333335 2025-08-05 15:13:42.104 4972-4972 com.kotei....ionManager com.kotei.fusionpositiondemo.debug D initLocationManager GPS_PROVIDER getLongitude: -122.084 2025-08-05 15:13:42.122 4972-4972 System.out com.kotei.fusionpositiondemo.debug I 2025-08-05 15:13:42.121 [com.kotei.fusionpositionengine.FusionPosition] 初始化融合定位引擎 2025-08-05 15:13:42.235 4972-4972 nativeloader com.kotei.fusionpositiondemo.debug D Load /data/app/~~iRz61aG51jr6IKfcBO13Pw==/com.kotei.fusionpositiondemo.debug-NtZ59R1bU1VaYYMSRrjpBA==/base.apk!/lib/x86_64/libkoteiLocationJni.so using class loader ns clns-9 (caller=/data/app/~~iRz61aG51jr6IKfcBO13Pw==/com.kotei.fusionpositiondemo.debug-NtZ59R1bU1VaYYMSRrjpBA==/base.apk!classes2.dex): ok 2025-08-05 15:13:42.257 4972-4972 AndroidRuntime com.kotei.fusionpositiondemo.debug D Shutting down VM 2025-08-05 15:13:42.259 4972-4972 AndroidRuntime com.kotei.fusionpositiondemo.debug E FATAL EXCEPTION: main Process: com.kotei.fusionpositiondemo.debug, PID: 4972 com.kotei.fusionpositionengine.NativeException: Failed to set CarMsg message at com.kotei.fusionpositionengine.FusionPosition.setCarMsg(FusionPosition.java:153) at com.kotei.fusionpositioningengine.FusionPositionManager$3.onLocationChanged(FusionPositionManager.java:101) at android.location.LocationListener.onLocationChanged(LocationListener.java:63) at android.location.LocationManager$LocationListenerTransport$1.operate(LocationManager.java:3303) at android.location.LocationManager$LocationListenerTransport$1.operate(LocationManager.java:3300) at com.android.internal.listeners.ListenerExecutor.lambda$executeSafely$0(ListenerExecutor.java:127) at com.android.internal.listeners.ListenerExecutor$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at android.os.Handler.handleCallback(Handler.java:995) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loopOnce(Looper.java:248) at android.os.Looper.loop(Looper.java:338) at android.app.ActivityThread.main(ActivityThread.java:9067) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932) Caused by: java.lang.RuntimeException: Field mAccuracy not found at com.kotei.fusionpositionengine.FusionPositionJNI.setCarMsg(Native Method) at com.kotei.fusionpositionengine.FusionPosition.setCarMsg(FusionPosition.java:150) ... 14 more 2025-08-05 15:13:42.266 4972-4972 Process com.kotei.fusionpositiondemo.debug I Sending signal. PID: 4972 SIG: 9 ---------------------------- PROCESS ENDED (4972) for package com.kotei.fusionpositiondemo.debug ---------------------------- 2025-08-05 15:13:42.280 714-809 InputDispatcher system_server E channel 'e97d02e com.kotei.fusionpositiondemo.debug/com.kotei.fusionpositioningengine.MainActivity' ~ Channel is unrecoverably broken and will be disposed! 2025-08-05 15:13:42.290 714-735 AppOps system_server E Operation not started: uid=10216 pkg=com.kotei.fusionpositiondemo.debug(null) op=GPS 以逻辑图方式总结log
08-06
xref: /casio_MT6878_16.0.0_master/vnd/kernel-6.1/block/blk-core.c HomeAnnotateLine# Scopes# Navigate#Raw Download current directory 1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright (C) 1994, Karl Keyte: Added support for disk statistics 5 * Elevator latency, (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE 6 * Queue request tables / lock, selectable elevator, Jens Axboe <axboe@suse.de> 7 * kernel-doc documentation started by NeilBrown <neilb@cse.unsw.edu.au> 8 * - July2000 9 * bio rewrite, highmem i/o, etc, Jens Axboe <axboe@suse.de> - may 2001 10 */ 11 12 /* 13 * This handles all read/write requests to block devices 14 */ 15 #include <linux/kernel.h> 16 #include <linux/module.h> 17 #include <linux/bio.h> 18 #include <linux/blkdev.h> 19 #include <linux/blk-pm.h> 20 #include <linux/blk-integrity.h> 21 #include <linux/highmem.h> 22 #include <linux/mm.h> 23 #include <linux/pagemap.h> 24 #include <linux/kernel_stat.h> 25 #include <linux/string.h> 26 #include <linux/init.h> 27 #include <linux/completion.h> 28 #include <linux/slab.h> 29 #include <linux/swap.h> 30 #include <linux/writeback.h> 31 #include <linux/task_io_accounting_ops.h> 32 #include <linux/fault-inject.h> 33 #include <linux/list_sort.h> 34 #include <linux/delay.h> 35 #include <linux/ratelimit.h> 36 #include <linux/pm_runtime.h> 37 #include <linux/t10-pi.h> 38 #include <linux/debugfs.h> 39 #include <linux/bpf.h> 40 #include <linux/part_stat.h> 41 #include <linux/sched/sysctl.h> 42 #include <linux/blk-crypto.h> 43 44 #define CREATE_TRACE_POINTS 45 #include <trace/events/block.h> 46 47 #include "blk.h" 48 #ifndef __GENKSYMS__ 49 #include "blk-mq-debugfs.h" 50 #endif 51 #include "blk-mq-sched.h" 52 #include "blk-pm.h" 53 #include "blk-cgroup.h" 54 #include "blk-throttle.h" 55 #include "blk-ioprio.h" 56 57 #ifdef CONFIG_BLK_MQ_USE_LOCAL_THREAD 58 extern long bio_cnt; // total bio sumbit 59 extern long rt_bio_cnt; // total rt bio sumbit, part of bio_cnt 60 extern long ux_bio_cnt; // total ux bio sumbit, part of rt_bio_cnt 61 #endif 62 63 struct dentry *blk_debugfs_root; 64 65 EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_remap); 66 EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_remap); 67 EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_complete); 68 EXPORT_TRACEPOINT_SYMBOL_GPL(block_split); 69 EXPORT_TRACEPOINT_SYMBOL_GPL(block_unplug); 70 EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_insert); 71 EXPORT_TRACEPOINT_SYMBOL_GPL(block_bio_queue); 72 EXPORT_TRACEPOINT_SYMBOL_GPL(block_getrq); 73 EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_issue); 74 EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_merge); 75 EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_requeue); 76 EXPORT_TRACEPOINT_SYMBOL_GPL(block_rq_complete); 77 78 DEFINE_IDA(blk_queue_ida); 79 80 /* 81 * For queue allocation 82 */ 83 struct kmem_cache *blk_requestq_cachep; 84 struct kmem_cache *blk_requestq_srcu_cachep; 85 86 /* 87 * Controlling structure to kblockd 88 */ 89 static struct workqueue_struct *kblockd_workqueue; 90 91 /** 92 * blk_queue_flag_set - atomically set a queue flag 93 * @flag: flag to be set 94 * @q: request queue 95 */ 96 void blk_queue_flag_set(unsigned int flag, struct request_queue *q) 97 { 98 set_bit(flag, &q->queue_flags); 99 } 100 EXPORT_SYMBOL(blk_queue_flag_set); 101 102 /** 103 * blk_queue_flag_clear - atomically clear a queue flag 104 * @flag: flag to be cleared 105 * @q: request queue 106 */ 107 void blk_queue_flag_clear(unsigned int flag, struct request_queue *q) 108 { 109 clear_bit(flag, &q->queue_flags); 110 } 111 EXPORT_SYMBOL(blk_queue_flag_clear); 112 113 /** 114 * blk_queue_flag_test_and_set - atomically test and set a queue flag 115 * @flag: flag to be set 116 * @q: request queue 117 * 118 * Returns the previous value of @flag - 0 if the flag was not set and 1 if 119 * the flag was already set. 120 */ 121 bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q) 122 { 123 return test_and_set_bit(flag, &q->queue_flags); 124 } 125 EXPORT_SYMBOL_GPL(blk_queue_flag_test_and_set); 126 127 #define REQ_OP_NAME(name) [REQ_OP_##name] = #name 128 static const char *const blk_op_name[] = { 129 REQ_OP_NAME(READ), 130 REQ_OP_NAME(WRITE), 131 REQ_OP_NAME(FLUSH), 132 REQ_OP_NAME(DISCARD), 133 REQ_OP_NAME(SECURE_ERASE), 134 REQ_OP_NAME(ZONE_RESET), 135 REQ_OP_NAME(ZONE_RESET_ALL), 136 REQ_OP_NAME(ZONE_OPEN), 137 REQ_OP_NAME(ZONE_CLOSE), 138 REQ_OP_NAME(ZONE_FINISH), 139 REQ_OP_NAME(ZONE_APPEND), 140 REQ_OP_NAME(WRITE_ZEROES), 141 REQ_OP_NAME(DRV_IN), 142 REQ_OP_NAME(DRV_OUT), 143 }; 144 #undef REQ_OP_NAME 145 146 /** 147 * blk_op_str - Return string XXX in the REQ_OP_XXX. 148 * @op: REQ_OP_XXX. 149 * 150 * Description: Centralize block layer function to convert REQ_OP_XXX into 151 * string format. Useful in the debugging and tracing bio or request. For 152 * invalid REQ_OP_XXX it returns string "UNKNOWN". 153 */ 154 inline const char *blk_op_str(enum req_op op) 155 { 156 const char *op_str = "UNKNOWN"; 157 158 if (op < ARRAY_SIZE(blk_op_name) && blk_op_name[op]) 159 op_str = blk_op_name[op]; 160 161 return op_str; 162 } 163 EXPORT_SYMBOL_GPL(blk_op_str); 164 165 static const struct { 166 int errno; 167 const char *name; 168 } blk_errors[] = { 169 [BLK_STS_OK] = { 0, "" }, 170 [BLK_STS_NOTSUPP] = { -EOPNOTSUPP, "operation not supported" }, 171 [BLK_STS_TIMEOUT] = { -ETIMEDOUT, "timeout" }, 172 [BLK_STS_NOSPC] = { -ENOSPC, "critical space allocation" }, 173 [BLK_STS_TRANSPORT] = { -ENOLINK, "recoverable transport" }, 174 [BLK_STS_TARGET] = { -EREMOTEIO, "critical target" }, 175 [BLK_STS_NEXUS] = { -EBADE, "critical nexus" }, 176 [BLK_STS_MEDIUM] = { -ENODATA, "critical medium" }, 177 [BLK_STS_PROTECTION] = { -EILSEQ, "protection" }, 178 [BLK_STS_RESOURCE] = { -ENOMEM, "kernel resource" }, 179 [BLK_STS_DEV_RESOURCE] = { -EBUSY, "device resource" }, 180 [BLK_STS_AGAIN] = { -EAGAIN, "nonblocking retry" }, 181 [BLK_STS_OFFLINE] = { -ENODEV, "device offline" }, 182 183 /* device mapper special case, should not leak out: */ 184 [BLK_STS_DM_REQUEUE] = { -EREMCHG, "dm internal retry" }, 185 186 /* zone device specific errors */ 187 [BLK_STS_ZONE_OPEN_RESOURCE] = { -ETOOMANYREFS, "open zones exceeded" }, 188 [BLK_STS_ZONE_ACTIVE_RESOURCE] = { -EOVERFLOW, "active zones exceeded" }, 189 190 /* everything else not covered above: */ 191 [BLK_STS_IOERR] = { -EIO, "I/O" }, 192 }; 193 194 blk_status_t errno_to_blk_status(int errno) 195 { 196 int i; 197 198 for (i = 0; i < ARRAY_SIZE(blk_errors); i++) { 199 if (blk_errors[i].errno == errno) 200 return (__force blk_status_t)i; 201 } 202 203 return BLK_STS_IOERR; 204 } 205 EXPORT_SYMBOL_GPL(errno_to_blk_status); 206 207 int blk_status_to_errno(blk_status_t status) 208 { 209 int idx = (__force int)status; 210 211 if (WARN_ON_ONCE(idx >= ARRAY_SIZE(blk_errors))) 212 return -EIO; 213 return blk_errors[idx].errno; 214 } 215 EXPORT_SYMBOL_GPL(blk_status_to_errno); 216 217 const char *blk_status_to_str(blk_status_t status) 218 { 219 int idx = (__force int)status; 220 221 if (WARN_ON_ONCE(idx >= ARRAY_SIZE(blk_errors))) 222 return "<null>"; 223 return blk_errors[idx].name; 224 } 225 226 /** 227 * blk_sync_queue - cancel any pending callbacks on a queue 228 * @q: the queue 229 * 230 * Description: 231 * The block layer may perform asynchronous callback activity 232 * on a queue, such as calling the unplug function after a timeout. 233 * A block device may call blk_sync_queue to ensure that any 234 * such activity is cancelled, thus allowing it to release resources 235 * that the callbacks might use. The caller must already have made sure 236 * that its ->submit_bio will not re-add plugging prior to calling 237 * this function. 238 * 239 * This function does not cancel any asynchronous activity arising 240 * out of elevator or throttling code. That would require elevator_exit() 241 * and blkcg_exit_queue() to be called with queue lock initialized. 242 * 243 */ 244 void blk_sync_queue(struct request_queue *q) 245 { 246 del_timer_sync(&q->timeout); 247 cancel_work_sync(&q->timeout_work); 248 } 249 EXPORT_SYMBOL(blk_sync_queue); 250 251 /** 252 * blk_set_pm_only - increment pm_only counter 253 * @q: request queue pointer 254 */ 255 void blk_set_pm_only(struct request_queue *q) 256 { 257 atomic_inc(&q->pm_only); 258 } 259 EXPORT_SYMBOL_GPL(blk_set_pm_only); 260 261 void blk_clear_pm_only(struct request_queue *q) 262 { 263 int pm_only; 264 265 pm_only = atomic_dec_return(&q->pm_only); 266 WARN_ON_ONCE(pm_only < 0); 267 if (pm_only == 0) 268 wake_up_all(&q->mq_freeze_wq); 269 } 270 EXPORT_SYMBOL_GPL(blk_clear_pm_only); 271 272 /** 273 * blk_put_queue - decrement the request_queue refcount 274 * @q: the request_queue structure to decrement the refcount for 275 * 276 * Decrements the refcount of the request_queue kobject. When this reaches 0 277 * we'll have blk_release_queue() called. 278 * 279 * Context: Any context, but the last reference must not be dropped from 280 * atomic context. 281 */ 282 void blk_put_queue(struct request_queue *q) 283 { 284 kobject_put(&q->kobj); 285 } 286 EXPORT_SYMBOL(blk_put_queue); 287 288 void blk_queue_start_drain(struct request_queue *q) 289 { 290 /* 291 * When queue DYING flag is set, we need to block new req 292 * entering queue, so we call blk_freeze_queue_start() to 293 * prevent I/O from crossing blk_queue_enter(). 294 */ 295 blk_freeze_queue_start(q); 296 if (queue_is_mq(q)) 297 blk_mq_wake_waiters(q); 298 /* Make blk_queue_enter() reexamine the DYING flag. */ 299 wake_up_all(&q->mq_freeze_wq); 300 } 301 302 /** 303 * blk_queue_enter() - try to increase q->q_usage_counter 304 * @q: request queue pointer 305 * @flags: BLK_MQ_REQ_NOWAIT and/or BLK_MQ_REQ_PM 306 */ 307 int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags) 308 { 309 const bool pm = flags & BLK_MQ_REQ_PM; 310 311 while (!blk_try_enter_queue(q, pm)) { 312 if (flags & BLK_MQ_REQ_NOWAIT) 313 return -EAGAIN; 314 315 /* 316 * read pair of barrier in blk_freeze_queue_start(), we need to 317 * order reading __PERCPU_REF_DEAD flag of .q_usage_counter and 318 * reading .mq_freeze_depth or queue dying flag, otherwise the 319 * following wait may never return if the two reads are 320 * reordered. 321 */ 322 smp_rmb(); 323 wait_event(q->mq_freeze_wq, 324 (!q->mq_freeze_depth && 325 blk_pm_resume_queue(pm, q)) || 326 blk_queue_dying(q)); 327 if (blk_queue_dying(q)) 328 return -ENODEV; 329 } 330 331 return 0; 332 } 333 334 int __bio_queue_enter(struct request_queue *q, struct bio *bio) 335 { 336 while (!blk_try_enter_queue(q, false)) { 337 struct gendisk *disk = bio->bi_bdev->bd_disk; 338 339 if (bio->bi_opf & REQ_NOWAIT) { 340 if (test_bit(GD_DEAD, &disk->state)) 341 goto dead; 342 bio_wouldblock_error(bio); 343 return -EAGAIN; 344 } 345 346 /* 347 * read pair of barrier in blk_freeze_queue_start(), we need to 348 * order reading __PERCPU_REF_DEAD flag of .q_usage_counter and 349 * reading .mq_freeze_depth or queue dying flag, otherwise the 350 * following wait may never return if the two reads are 351 * reordered. 352 */ 353 smp_rmb(); 354 wait_event(q->mq_freeze_wq, 355 (!q->mq_freeze_depth && 356 blk_pm_resume_queue(false, q)) || 357 test_bit(GD_DEAD, &disk->state)); 358 if (test_bit(GD_DEAD, &disk->state)) 359 goto dead; 360 } 361 362 return 0; 363 dead: 364 bio_io_error(bio); 365 return -ENODEV; 366 } 367 368 void blk_queue_exit(struct request_queue *q) 369 { 370 percpu_ref_put(&q->q_usage_counter); 371 } 372 373 static void blk_queue_usage_counter_release(struct percpu_ref *ref) 374 { 375 struct request_queue *q = 376 container_of(ref, struct request_queue, q_usage_counter); 377 378 wake_up_all(&q->mq_freeze_wq); 379 } 380 381 static void blk_rq_timed_out_timer(struct timer_list *t) 382 { 383 struct request_queue *q = from_timer(q, t, timeout); 384 385 kblockd_schedule_work(&q->timeout_work); 386 } 387 388 static void blk_timeout_work(struct work_struct *work) 389 { 390 } 391 392 struct request_queue *blk_alloc_queue(int node_id, bool alloc_srcu) 393 { 394 struct request_queue *q; 395 396 q = kmem_cache_alloc_node(blk_get_queue_kmem_cache(alloc_srcu), 397 GFP_KERNEL | __GFP_ZERO, node_id); 398 if (!q) 399 return NULL; 400 401 if (alloc_srcu) { 402 blk_queue_flag_set(QUEUE_FLAG_HAS_SRCU, q); 403 if (init_srcu_struct(q->srcu) != 0) 404 goto fail_q; 405 } 406 407 q->last_merge = NULL; 408 409 q->id = ida_alloc(&blk_queue_ida, GFP_KERNEL); 410 if (q->id < 0) 411 goto fail_srcu; 412 413 q->stats = blk_alloc_queue_stats(); 414 if (!q->stats) 415 goto fail_id; 416 417 q->node = node_id; 418 419 atomic_set(&q->nr_active_requests_shared_tags, 0); 420 421 timer_setup(&q->timeout, blk_rq_timed_out_timer, 0); 422 INIT_WORK(&q->timeout_work, blk_timeout_work); 423 INIT_LIST_HEAD(&q->icq_list); 424 425 kobject_init(&q->kobj, &blk_queue_ktype); 426 427 mutex_init(&q->debugfs_mutex); 428 mutex_init(&q->sysfs_lock); 429 mutex_init(&q->sysfs_dir_lock); 430 spin_lock_init(&q->queue_lock); 431 432 init_waitqueue_head(&q->mq_freeze_wq); 433 mutex_init(&q->mq_freeze_lock); 434 435 /* 436 * Init percpu_ref in atomic mode so that it's faster to shutdown. 437 * See blk_register_queue() for details. 438 */ 439 if (percpu_ref_init(&q->q_usage_counter, 440 blk_queue_usage_counter_release, 441 PERCPU_REF_INIT_ATOMIC, GFP_KERNEL)) 442 goto fail_stats; 443 444 blk_set_default_limits(&q->limits); 445 q->nr_requests = BLKDEV_DEFAULT_RQ; 446 447 return q; 448 449 fail_stats: 450 blk_free_queue_stats(q->stats); 451 fail_id: 452 ida_free(&blk_queue_ida, q->id); 453 fail_srcu: 454 if (alloc_srcu) 455 cleanup_srcu_struct(q->srcu); 456 fail_q: 457 kmem_cache_free(blk_get_queue_kmem_cache(alloc_srcu), q); 458 return NULL; 459 } 460 461 /** 462 * blk_get_queue - increment the request_queue refcount 463 * @q: the request_queue structure to increment the refcount for 464 * 465 * Increment the refcount of the request_queue kobject. 466 * 467 * Context: Any context. 468 */ 469 bool blk_get_queue(struct request_queue *q) 470 { 471 if (unlikely(blk_queue_dying(q))) 472 return false; 473 kobject_get(&q->kobj); 474 return true; 475 } 476 EXPORT_SYMBOL(blk_get_queue); 477 478 #ifdef CONFIG_FAIL_MAKE_REQUEST 479 480 static DECLARE_FAULT_ATTR(fail_make_request); 481 482 static int __init setup_fail_make_request(char *str) 483 { 484 return setup_fault_attr(&fail_make_request, str); 485 } 486 __setup("fail_make_request=", setup_fail_make_request); 487 488 bool should_fail_request(struct block_device *part, unsigned int bytes) 489 { 490 return part->bd_make_it_fail && should_fail(&fail_make_request, bytes); 491 } 492 493 static int __init fail_make_request_debugfs(void) 494 { 495 struct dentry *dir = fault_create_debugfs_attr("fail_make_request", 496 NULL, &fail_make_request); 497 498 return PTR_ERR_OR_ZERO(dir); 499 } 500 501 late_initcall(fail_make_request_debugfs); 502 #endif /* CONFIG_FAIL_MAKE_REQUEST */ 503 504 static inline void bio_check_ro(struct bio *bio) 505 { 506 if (op_is_write(bio_op(bio)) && bdev_read_only(bio->bi_bdev)) { 507 if (op_is_flush(bio->bi_opf) && !bio_sectors(bio)) 508 return; 509 pr_warn_ratelimited("Trying to write to read-only block-device %pg\n", 510 bio->bi_bdev); 511 /* Older lvm-tools actually trigger this */ 512 } 513 } 514 515 static noinline int should_fail_bio(struct bio *bio) 516 { 517 if (should_fail_request(bdev_whole(bio->bi_bdev), bio->bi_iter.bi_size)) 518 return -EIO; 519 return 0; 520 } 521 ALLOW_ERROR_INJECTION(should_fail_bio, ERRNO); 522 523 /* 524 * Check whether this bio extends beyond the end of the device or partition. 525 * This may well happen - the kernel calls bread() without checking the size of 526 * the device, e.g., when mounting a file system. 527 */ 528 static inline int bio_check_eod(struct bio *bio) 529 { 530 sector_t maxsector = bdev_nr_sectors(bio->bi_bdev); 531 unsigned int nr_sectors = bio_sectors(bio); 532 533 if (nr_sectors && maxsector && 534 (nr_sectors > maxsector || 535 bio->bi_iter.bi_sector > maxsector - nr_sectors)) { 536 pr_info_ratelimited("%s: attempt to access beyond end of device\n" 537 "%pg: rw=%d, sector=%llu, nr_sectors = %u limit=%llu\n", 538 current->comm, bio->bi_bdev, bio->bi_opf, 539 bio->bi_iter.bi_sector, nr_sectors, maxsector); 540 return -EIO; 541 } 542 return 0; 543 } 544 545 /* 546 * Remap block n of partition p to block n+start(p) of the disk. 547 */ 548 static int blk_partition_remap(struct bio *bio) 549 { 550 struct block_device *p = bio->bi_bdev; 551 552 if (unlikely(should_fail_request(p, bio->bi_iter.bi_size))) 553 return -EIO; 554 if (bio_sectors(bio)) { 555 bio->bi_iter.bi_sector += p->bd_start_sect; 556 trace_block_bio_remap(bio, p->bd_dev, 557 bio->bi_iter.bi_sector - 558 p->bd_start_sect); 559 } 560 bio_set_flag(bio, BIO_REMAPPED); 561 return 0; 562 } 563 564 /* 565 * Check write append to a zoned block device. 566 */ 567 static inline blk_status_t blk_check_zone_append(struct request_queue *q, 568 struct bio *bio) 569 { 570 int nr_sectors = bio_sectors(bio); 571 572 /* Only applicable to zoned block devices */ 573 if (!bdev_is_zoned(bio->bi_bdev)) 574 return BLK_STS_NOTSUPP; 575 576 /* The bio sector must point to the start of a sequential zone */ 577 if (bio->bi_iter.bi_sector & (bdev_zone_sectors(bio->bi_bdev) - 1) || 578 !bio_zone_is_seq(bio)) 579 return BLK_STS_IOERR; 580 581 /* 582 * Not allowed to cross zone boundaries. Otherwise, the BIO will be 583 * split and could result in non-contiguous sectors being written in 584 * different zones. 585 */ 586 if (nr_sectors > q->limits.chunk_sectors) 587 return BLK_STS_IOERR; 588 589 /* Make sure the BIO is small enough and will not get split */ 590 if (nr_sectors > q->limits.max_zone_append_sectors) 591 return BLK_STS_IOERR; 592 593 bio->bi_opf |= REQ_NOMERGE; 594 595 return BLK_STS_OK; 596 } 597 598 static void __submit_bio(struct bio *bio) 599 { 600 struct gendisk *disk = bio->bi_bdev->bd_disk; 601 602 if (unlikely(!blk_crypto_bio_prep(&bio))) 603 return; 604 605 if (!disk->fops->submit_bio) { 606 blk_mq_submit_bio(bio); 607 } else if (likely(bio_queue_enter(bio) == 0)) { 608 disk->fops->submit_bio(bio); 609 blk_queue_exit(disk->queue); 610 } 611 } 612 613 /* 614 * The loop in this function may be a bit non-obvious, and so deserves some 615 * explanation: 616 * 617 * - Before entering the loop, bio->bi_next is NULL (as all callers ensure 618 * that), so we have a list with a single bio. 619 * - We pretend that we have just taken it off a longer list, so we assign 620 * bio_list to a pointer to the bio_list_on_stack, thus initialising the 621 * bio_list of new bios to be added. ->submit_bio() may indeed add some more 622 * bios through a recursive call to submit_bio_noacct. If it did, we find a 623 * non-NULL value in bio_list and re-enter the loop from the top. 624 * - In this case we really did just take the bio of the top of the list (no 625 * pretending) and so remove it from bio_list, and call into ->submit_bio() 626 * again. 627 * 628 * bio_list_on_stack[0] contains bios submitted by the current ->submit_bio. 629 * bio_list_on_stack[1] contains bios that were submitted before the current 630 * ->submit_bio, but that haven't been processed yet. 631 */ 632 static void __submit_bio_noacct(struct bio *bio) 633 { 634 struct bio_list bio_list_on_stack[2]; 635 636 BUG_ON(bio->bi_next); 637 638 bio_list_init(&bio_list_on_stack[0]); 639 current->bio_list = bio_list_on_stack; 640 641 do { 642 struct request_queue *q = bdev_get_queue(bio->bi_bdev); 643 struct bio_list lower, same; 644 645 /* 646 * Create a fresh bio_list for all subordinate requests. 647 */ 648 bio_list_on_stack[1] = bio_list_on_stack[0]; 649 bio_list_init(&bio_list_on_stack[0]); 650 651 __submit_bio(bio); 652 653 /* 654 * Sort new bios into those for a lower level and those for the 655 * same level. 656 */ 657 bio_list_init(&lower); 658 bio_list_init(&same); 659 while ((bio = bio_list_pop(&bio_list_on_stack[0])) != NULL) 660 if (q == bdev_get_queue(bio->bi_bdev)) 661 bio_list_add(&same, bio); 662 else 663 bio_list_add(&lower, bio); 664 665 /* 666 * Now assemble so we handle the lowest level first. 667 */ 668 bio_list_merge(&bio_list_on_stack[0], &lower); 669 bio_list_merge(&bio_list_on_stack[0], &same); 670 bio_list_merge(&bio_list_on_stack[0], &bio_list_on_stack[1]); 671 } while ((bio = bio_list_pop(&bio_list_on_stack[0]))); 672 673 current->bio_list = NULL; 674 } 675 676 static void __submit_bio_noacct_mq(struct bio *bio) 677 { 678 struct bio_list bio_list[2] = { }; 679 680 current->bio_list = bio_list; 681 682 do { 683 __submit_bio(bio); 684 } while ((bio = bio_list_pop(&bio_list[0]))); 685 686 current->bio_list = NULL; 687 } 688 689 void submit_bio_noacct_nocheck(struct bio *bio) 690 { 691 blk_cgroup_bio_start(bio); 692 blkcg_bio_issue_init(bio); 693 694 if (!bio_flagged(bio, BIO_TRACE_COMPLETION)) { 695 trace_block_bio_queue(bio); 696 /* 697 * Now that enqueuing has been traced, we need to trace 698 * completion as well. 699 */ 700 bio_set_flag(bio, BIO_TRACE_COMPLETION); 701 } 702 703 /* 704 * We only want one ->submit_bio to be active at a time, else stack 705 * usage with stacked devices could be a problem. Use current->bio_list 706 * to collect a list of requests submited by a ->submit_bio method while 707 * it is active, and then process them after it returned. 708 */ 709 if (current->bio_list) 710 bio_list_add(&current->bio_list[0], bio); 711 else if (!bio->bi_bdev->bd_disk->fops->submit_bio) 712 __submit_bio_noacct_mq(bio); 713 else 714 __submit_bio_noacct(bio); 715 } 716 717 /** 718 * submit_bio_noacct - re-submit a bio to the block device layer for I/O 719 * @bio: The bio describing the location in memory and on the device. 720 * 721 * This is a version of submit_bio() that shall only be used for I/O that is 722 * resubmitted to lower level drivers by stacking block drivers. All file 723 * systems and other upper level users of the block layer should use 724 * submit_bio() instead. 725 */ 726 void submit_bio_noacct(struct bio *bio) 727 { 728 struct block_device *bdev = bio->bi_bdev; 729 struct request_queue *q = bdev_get_queue(bdev); 730 blk_status_t status = BLK_STS_IOERR; 731 struct blk_plug *plug; 732 733 might_sleep(); 734 735 plug = blk_mq_plug(bio); 736 if (plug && plug->nowait) 737 bio->bi_opf |= REQ_NOWAIT; 738 739 /* 740 * For a REQ_NOWAIT based request, return -EOPNOTSUPP 741 * if queue does not support NOWAIT. 742 */ 743 if ((bio->bi_opf & REQ_NOWAIT) && !bdev_nowait(bdev)) 744 goto not_supported; 745 746 if (should_fail_bio(bio)) 747 goto end_io; 748 bio_check_ro(bio); 749 if (!bio_flagged(bio, BIO_REMAPPED)) { 750 if (unlikely(bio_check_eod(bio))) 751 goto end_io; 752 if (bdev->bd_partno && unlikely(blk_partition_remap(bio))) 753 goto end_io; 754 } 755 756 /* 757 * Filter flush bio's early so that bio based drivers without flush 758 * support don't have to worry about them. 759 */ 760 if (op_is_flush(bio->bi_opf) && 761 !test_bit(QUEUE_FLAG_WC, &q->queue_flags)) { 762 bio->bi_opf &= ~(REQ_PREFLUSH | REQ_FUA); 763 if (!bio_sectors(bio)) { 764 status = BLK_STS_OK; 765 goto end_io; 766 } 767 } 768 769 if (!test_bit(QUEUE_FLAG_POLL, &q->queue_flags)) 770 bio_clear_polled(bio); 771 772 switch (bio_op(bio)) { 773 case REQ_OP_DISCARD: 774 if (!bdev_max_discard_sectors(bdev)) 775 goto not_supported; 776 break; 777 case REQ_OP_SECURE_ERASE: 778 if (!bdev_max_secure_erase_sectors(bdev)) 779 goto not_supported; 780 break; 781 case REQ_OP_ZONE_APPEND: 782 status = blk_check_zone_append(q, bio); 783 if (status != BLK_STS_OK) 784 goto end_io; 785 break; 786 case REQ_OP_ZONE_RESET: 787 case REQ_OP_ZONE_OPEN: 788 case REQ_OP_ZONE_CLOSE: 789 case REQ_OP_ZONE_FINISH: 790 if (!bdev_is_zoned(bio->bi_bdev)) 791 goto not_supported; 792 break; 793 case REQ_OP_ZONE_RESET_ALL: 794 if (!bdev_is_zoned(bio->bi_bdev) || !blk_queue_zone_resetall(q)) 795 goto not_supported; 796 break; 797 case REQ_OP_WRITE_ZEROES: 798 if (!q->limits.max_write_zeroes_sectors) 799 goto not_supported; 800 break; 801 default: 802 break; 803 } 804 805 if (blk_throtl_bio(bio)) 806 return; 807 submit_bio_noacct_nocheck(bio); 808 return; 809 810 not_supported: 811 status = BLK_STS_NOTSUPP; 812 end_io: 813 bio->bi_status = status; 814 bio_endio(bio); 815 } 816 EXPORT_SYMBOL(submit_bio_noacct); 817 818 #ifdef CONFIG_BLK_MQ_USE_LOCAL_THREAD 819 extern bool test_task_ux(struct task_struct *task); 820 #endif 821 822 static void bio_set_ioprio(struct bio *bio) 823 { 824 /* Nobody set ioprio so far? Initialize it based on task's nice value */ 825 if (IOPRIO_PRIO_CLASS(bio->bi_ioprio) == IOPRIO_CLASS_NONE) 826 bio->bi_ioprio = get_current_ioprio(); 827 blkcg_set_ioprio(bio); 828 #ifdef CONFIG_BLK_MQ_USE_LOCAL_THREAD 829 bio_cnt++; 830 831 if (IOPRIO_PRIO_CLASS(bio->bi_ioprio) == IOPRIO_CLASS_RT) { 832 rt_bio_cnt++; 833 } else if (test_task_ux(current)) { 834 bio->bi_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_RT, 4); 835 rt_bio_cnt++; 836 ux_bio_cnt++; 837 } 838 #endif 839 } 840 841 /** 842 * submit_bio - submit a bio to the block device layer for I/O 843 * @bio: The &struct bio which describes the I/O 844 * 845 * submit_bio() is used to submit I/O requests to block devices. It is passed a 846 * fully set up &struct bio that describes the I/O that needs to be done. The 847 * bio will be send to the device described by the bi_bdev field. 848 * 849 * The success/failure status of the request, along with notification of 850 * completion, is delivered asynchronously through the ->bi_end_io() callback 851 * in @bio. The bio must NOT be touched by the caller until ->bi_end_io() has 852 * been called. 853 */ 854 void submit_bio(struct bio *bio) 855 { 856 if (blkcg_punt_bio_submit(bio)) 857 return; 858 859 if (bio_op(bio) == REQ_OP_READ) { 860 task_io_account_read(bio->bi_iter.bi_size); 861 count_vm_events(PGPGIN, bio_sectors(bio)); 862 } else if (bio_op(bio) == REQ_OP_WRITE) { 863 count_vm_events(PGPGOUT, bio_sectors(bio)); 864 } 865 866 bio_set_ioprio(bio); 867 submit_bio_noacct(bio); 868 } 869 EXPORT_SYMBOL(submit_bio); 870 871 /** 872 * bio_poll - poll for BIO completions 873 * @bio: bio to poll for 874 * @iob: batches of IO 875 * @flags: BLK_POLL_* flags that control the behavior 876 * 877 * Poll for completions on queue associated with the bio. Returns number of 878 * completed entries found. 879 * 880 * Note: the caller must either be the context that submitted @bio, or 881 * be in a RCU critical section to prevent freeing of @bio. 882 */ 883 int bio_poll(struct bio *bio, struct io_comp_batch *iob, unsigned int flags) 884 { 885 blk_qc_t cookie = READ_ONCE(bio->bi_cookie); 886 struct block_device *bdev; 887 struct request_queue *q; 888 int ret = 0; 889 890 bdev = READ_ONCE(bio->bi_bdev); 891 if (!bdev) 892 return 0; 893 894 q = bdev_get_queue(bdev); 895 if (cookie == BLK_QC_T_NONE || 896 !test_bit(QUEUE_FLAG_POLL, &q->queue_flags)) 897 return 0; 898 899 /* 900 * As the requests that require a zone lock are not plugged in the 901 * first place, directly accessing the plug instead of using 902 * blk_mq_plug() should not have any consequences during flushing for 903 * zoned devices. 904 */ 905 blk_flush_plug(current->plug, false); 906 907 /* 908 * We need to be able to enter a frozen queue, similar to how 909 * timeouts also need to do that. If that is blocked, then we can 910 * have pending IO when a queue freeze is started, and then the 911 * wait for the freeze to finish will wait for polled requests to 912 * timeout as the poller is preventer from entering the queue and 913 * completing them. As long as we prevent new IO from being queued, 914 * that should be all that matters. 915 */ 916 if (!percpu_ref_tryget(&q->q_usage_counter)) 917 return 0; 918 if (queue_is_mq(q)) { 919 ret = blk_mq_poll(q, cookie, iob, flags); 920 } else { 921 struct gendisk *disk = q->disk; 922 923 if (disk && disk->fops->poll_bio) 924 ret = disk->fops->poll_bio(bio, iob, flags); 925 } 926 blk_queue_exit(q); 927 return ret; 928 } 929 EXPORT_SYMBOL_GPL(bio_poll); 930 931 /* 932 * Helper to implement file_operations.iopoll. Requires the bio to be stored 933 * in iocb->private, and cleared before freeing the bio. 934 */ 935 int iocb_bio_iopoll(struct kiocb *kiocb, struct io_comp_batch *iob, 936 unsigned int flags) 937 { 938 struct bio *bio; 939 int ret = 0; 940 941 /* 942 * Note: the bio cache only uses SLAB_TYPESAFE_BY_RCU, so bio can 943 * point to a freshly allocated bio at this point. If that happens 944 * we have a few cases to consider: 945 * 946 * 1) the bio is beeing initialized and bi_bdev is NULL. We can just 947 * simply nothing in this case 948 * 2) the bio points to a not poll enabled device. bio_poll will catch 949 * this and return 0 950 * 3) the bio points to a poll capable device, including but not 951 * limited to the one that the original bio pointed to. In this 952 * case we will call into the actual poll method and poll for I/O, 953 * even if we don't need to, but it won't cause harm either. 954 * 955 * For cases 2) and 3) above the RCU grace period ensures that bi_bdev 956 * is still allocated. Because partitions hold a reference to the whole 957 * device bdev and thus disk, the disk is also still valid. Grabbing 958 * a reference to the queue in bio_poll() ensures the hctxs and requests 959 * are still valid as well. 960 */ 961 rcu_read_lock(); 962 bio = READ_ONCE(kiocb->private); 963 if (bio) 964 ret = bio_poll(bio, iob, flags); 965 rcu_read_unlock(); 966 967 return ret; 968 } 969 EXPORT_SYMBOL_GPL(iocb_bio_iopoll); 970 971 void update_io_ticks(struct block_device *part, unsigned long now, bool end) 972 { 973 unsigned long stamp; 974 again: 975 stamp = READ_ONCE(part->bd_stamp); 976 if (unlikely(time_after(now, stamp)) && 977 likely(try_cmpxchg(&part->bd_stamp, &stamp, now)) && 978 (end || part_in_flight(part))) 979 __part_stat_add(part, io_ticks, now - stamp); 980 981 if (part->bd_partno) { 982 part = bdev_whole(part); 983 goto again; 984 } 985 } 986 987 unsigned long bdev_start_io_acct(struct block_device *bdev, 988 unsigned int sectors, enum req_op op, 989 unsigned long start_time) 990 { 991 const int sgrp = op_stat_group(op); 992 993 part_stat_lock(); 994 update_io_ticks(bdev, start_time, false); 995 part_stat_inc(bdev, ios[sgrp]); 996 part_stat_add(bdev, sectors[sgrp], sectors); 997 part_stat_local_inc(bdev, in_flight[op_is_write(op)]); 998 part_stat_unlock(); 999 1000 return start_time; 1001 } 1002 EXPORT_SYMBOL(bdev_start_io_acct); 1003 1004 /** 1005 * bio_start_io_acct_time - start I/O accounting for bio based drivers 1006 * @bio: bio to start account for 1007 * @start_time: start time that should be passed back to bio_end_io_acct(). 1008 */ 1009 void bio_start_io_acct_time(struct bio *bio, unsigned long start_time) 1010 { 1011 bdev_start_io_acct(bio->bi_bdev, bio_sectors(bio), 1012 bio_op(bio), start_time); 1013 } 1014 EXPORT_SYMBOL_GPL(bio_start_io_acct_time); 1015 1016 /** 1017 * bio_start_io_acct - start I/O accounting for bio based drivers 1018 * @bio: bio to start account for 1019 * 1020 * Returns the start time that should be passed back to bio_end_io_acct(). 1021 */ 1022 unsigned long bio_start_io_acct(struct bio *bio) 1023 { 1024 return bdev_start_io_acct(bio->bi_bdev, bio_sectors(bio), 1025 bio_op(bio), jiffies); 1026 } 1027 EXPORT_SYMBOL_GPL(bio_start_io_acct); 1028 1029 void bdev_end_io_acct(struct block_device *bdev, enum req_op op, 1030 unsigned long start_time) 1031 { 1032 const int sgrp = op_stat_group(op); 1033 unsigned long now = READ_ONCE(jiffies); 1034 unsigned long duration = now - start_time; 1035 1036 part_stat_lock(); 1037 update_io_ticks(bdev, now, true); 1038 part_stat_add(bdev, nsecs[sgrp], jiffies_to_nsecs(duration)); 1039 part_stat_local_dec(bdev, in_flight[op_is_write(op)]); 1040 part_stat_unlock(); 1041 } 1042 EXPORT_SYMBOL(bdev_end_io_acct); 1043 1044 void bio_end_io_acct_remapped(struct bio *bio, unsigned long start_time, 1045 struct block_device *orig_bdev) 1046 { 1047 bdev_end_io_acct(orig_bdev, bio_op(bio), start_time); 1048 } 1049 EXPORT_SYMBOL_GPL(bio_end_io_acct_remapped); 1050 1051 /** 1052 * blk_lld_busy - Check if underlying low-level drivers of a device are busy 1053 * @q : the queue of the device being checked 1054 * 1055 * Description: 1056 * Check if underlying low-level drivers of a device are busy. 1057 * If the drivers want to export their busy state, they must set own 1058 * exporting function using blk_queue_lld_busy() first. 1059 * 1060 * Basically, this function is used only by request stacking drivers 1061 * to stop dispatching requests to underlying devices when underlying 1062 * devices are busy. This behavior helps more I/O merging on the queue 1063 * of the request stacking driver and prevents I/O throughput regression 1064 * on burst I/O load. 1065 * 1066 * Return: 1067 * 0 - Not busy (The request stacking driver should dispatch request) 1068 * 1 - Busy (The request stacking driver should stop dispatching request) 1069 */ 1070 int blk_lld_busy(struct request_queue *q) 1071 { 1072 if (queue_is_mq(q) && q->mq_ops->busy) 1073 return q->mq_ops->busy(q); 1074 1075 return 0; 1076 } 1077 EXPORT_SYMBOL_GPL(blk_lld_busy); 1078 1079 int kblockd_schedule_work(struct work_struct *work) 1080 { 1081 return queue_work(kblockd_workqueue, work); 1082 } 1083 EXPORT_SYMBOL(kblockd_schedule_work); 1084 1085 int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork, 1086 unsigned long delay) 1087 { 1088 return mod_delayed_work_on(cpu, kblockd_workqueue, dwork, delay); 1089 } 1090 EXPORT_SYMBOL(kblockd_mod_delayed_work_on); 1091 1092 void blk_start_plug_nr_ios(struct blk_plug *plug, unsigned short nr_ios) 1093 { 1094 struct task_struct *tsk = current; 1095 1096 /* 1097 * If this is a nested plug, don't actually assign it. 1098 */ 1099 if (tsk->plug) 1100 return; 1101 1102 plug->mq_list = NULL; 1103 plug->cached_rq = NULL; 1104 plug->nr_ios = min_t(unsigned short, nr_ios, BLK_MAX_REQUEST_COUNT); 1105 plug->rq_count = 0; 1106 plug->multiple_queues = false; 1107 plug->has_elevator = false; 1108 plug->nowait = false; 1109 INIT_LIST_HEAD(&plug->cb_list); 1110 1111 /* 1112 * Store ordering should not be needed here, since a potential 1113 * preempt will imply a full memory barrier 1114 */ 1115 tsk->plug = plug; 1116 } 1117 1118 /** 1119 * blk_start_plug - initialize blk_plug and track it inside the task_struct 1120 * @plug: The &struct blk_plug that needs to be initialized 1121 * 1122 * Description: 1123 * blk_start_plug() indicates to the block layer an intent by the caller 1124 * to submit multiple I/O requests in a batch. The block layer may use 1125 * this hint to defer submitting I/Os from the caller until blk_finish_plug() 1126 * is called. However, the block layer may choose to submit requests 1127 * before a call to blk_finish_plug() if the number of queued I/Os 1128 * exceeds %BLK_MAX_REQUEST_COUNT, or if the size of the I/O is larger than 1129 * %BLK_PLUG_FLUSH_SIZE. The queued I/Os may also be submitted early if 1130 * the task schedules (see below). 1131 * 1132 * Tracking blk_plug inside the task_struct will help with auto-flushing the 1133 * pending I/O should the task end up blocking between blk_start_plug() and 1134 * blk_finish_plug(). This is important from a performance perspective, but 1135 * also ensures that we don't deadlock. For instance, if the task is blocking 1136 * for a memory allocation, memory reclaim could end up wanting to free a 1137 * page belonging to that request that is currently residing in our private 1138 * plug. By flushing the pending I/O when the process goes to sleep, we avoid 1139 * this kind of deadlock. 1140 */ 1141 void blk_start_plug(struct blk_plug *plug) 1142 { 1143 blk_start_plug_nr_ios(plug, 1); 1144 } 1145 EXPORT_SYMBOL(blk_start_plug); 1146 1147 static void flush_plug_callbacks(struct blk_plug *plug, bool from_schedule) 1148 { 1149 LIST_HEAD(callbacks); 1150 1151 while (!list_empty(&plug->cb_list)) { 1152 list_splice_init(&plug->cb_list, &callbacks); 1153 1154 while (!list_empty(&callbacks)) { 1155 struct blk_plug_cb *cb = list_first_entry(&callbacks, 1156 struct blk_plug_cb, 1157 list); 1158 list_del(&cb->list); 1159 cb->callback(cb, from_schedule); 1160 } 1161 } 1162 } 1163 1164 struct blk_plug_cb *blk_check_plugged(blk_plug_cb_fn unplug, void *data, 1165 int size) 1166 { 1167 struct blk_plug *plug = current->plug; 1168 struct blk_plug_cb *cb; 1169 1170 if (!plug) 1171 return NULL; 1172 1173 list_for_each_entry(cb, &plug->cb_list, list) 1174 if (cb->callback == unplug && cb->data == data) 1175 return cb; 1176 1177 /* Not currently on the callback list */ 1178 BUG_ON(size < sizeof(*cb)); 1179 cb = kzalloc(size, GFP_ATOMIC); 1180 if (cb) { 1181 cb->data = data; 1182 cb->callback = unplug; 1183 list_add(&cb->list, &plug->cb_list); 1184 } 1185 return cb; 1186 } 1187 EXPORT_SYMBOL(blk_check_plugged); 1188 1189 void __blk_flush_plug(struct blk_plug *plug, bool from_schedule) 1190 { 1191 if (!list_empty(&plug->cb_list)) 1192 flush_plug_callbacks(plug, from_schedule); 1193 blk_mq_flush_plug_list(plug, from_schedule); 1194 /* 1195 * Unconditionally flush out cached requests, even if the unplug 1196 * event came from schedule. Since we know hold references to the 1197 * queue for cached requests, we don't want a blocked task holding 1198 * up a queue freeze/quiesce event. 1199 */ 1200 if (unlikely(!rq_list_empty(plug->cached_rq))) 1201 blk_mq_free_plug_rqs(plug); 1202 } 1203 1204 /** 1205 * blk_finish_plug - mark the end of a batch of submitted I/O 1206 * @plug: The &struct blk_plug passed to blk_start_plug() 1207 * 1208 * Description: 1209 * Indicate that a batch of I/O submissions is complete. This function 1210 * must be paired with an initial call to blk_start_plug(). The intent 1211 * is to allow the block layer to optimize I/O submission. See the 1212 * documentation for blk_start_plug() for more information. 1213 */ 1214 void blk_finish_plug(struct blk_plug *plug) 1215 { 1216 if (plug == current->plug) { 1217 __blk_flush_plug(plug, false); 1218 current->plug = NULL; 1219 } 1220 } 1221 EXPORT_SYMBOL(blk_finish_plug); 1222 1223 void blk_io_schedule(void) 1224 { 1225 /* Prevent hang_check timer from firing at us during very long I/O */ 1226 unsigned long timeout = sysctl_hung_task_timeout_secs * HZ / 2; 1227 1228 if (timeout) 1229 io_schedule_timeout(timeout); 1230 else 1231 io_schedule(); 1232 } 1233 EXPORT_SYMBOL_GPL(blk_io_schedule); 1234 1235 int __init blk_dev_init(void) 1236 { 1237 #ifdef CONFIG_BLK_MQ_USE_LOCAL_THREAD 1238 const char *config = of_blk_feature_read("kblockd_ux_unbound_enable"); 1239 #endif 1240 BUILD_BUG_ON((__force u32)REQ_OP_LAST >= (1 << REQ_OP_BITS)); 1241 BUILD_BUG_ON(REQ_OP_BITS + REQ_FLAG_BITS > 8 * 1242 sizeof_field(struct request, cmd_flags)); 1243 BUILD_BUG_ON(REQ_OP_BITS + REQ_FLAG_BITS > 8 * 1244 sizeof_field(struct bio, bi_opf)); 1245 BUILD_BUG_ON(ALIGN(offsetof(struct request_queue, srcu), 1246 __alignof__(struct request_queue)) != 1247 sizeof(struct request_queue)); 1248 1249 #ifdef CONFIG_BLK_MQ_USE_LOCAL_THREAD 1250 if (config && strcmp(config, "y") == 0) 1251 kblockd_workqueue = alloc_workqueue("kblockd", 1252 WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_UX | WQ_UNBOUND, 0); 1253 else 1254 #endif 1255 /* used for unplugging and affects IO latency/throughput - HIGHPRI */ 1256 kblockd_workqueue = alloc_workqueue("kblockd", 1257 WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); 1258 if (!kblockd_workqueue) 1259 panic("Failed to create kblockd\n"); 1260 1261 blk_requestq_cachep = kmem_cache_create("request_queue", 1262 sizeof(struct request_queue), 0, SLAB_PANIC, NULL); 1263 1264 blk_requestq_srcu_cachep = kmem_cache_create("request_queue_srcu", 1265 sizeof(struct request_queue) + 1266 sizeof(struct srcu_struct), 0, SLAB_PANIC, NULL); 1267 1268 blk_debugfs_root = debugfs_create_dir("block", NULL); 1269 blk_mq_debugfs_init(); 1270 1271 return 0; 1272 } 1273 served by {OpenGrok Last Index Update: Sat Nov 22 16:34:38 CST 2025 submit_bio的代码流程,怎么提交为request
11-25
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值