madang
    request_irq可以这样使用吗 spin_lock_irqsave( ) request_irq(); spin_unlock_restore();
    留言板  发表时间:2016-03-02 11:43
    郭健
    @郭健:你可以再仔细看看irq_create_mapping的代码,虽然其名字是创建映射,但是该函数首先是通过HW interrupt ID来找virtual interrupt ID,如果存在,则不需要创建,直接返回virtual interrupt ID,因此,映射不会创建两次的。
    wowo
    @heavenward:recal只是用来计算当前的频率值,不会涉及clock路径的选择,如果需要使用不同的parent,还是需要通过set parent接口主动设置的。
    Linux common clock framework(2)_clock provider  发表时间:2016-03-01 20:58
    heavenward
    有个小疑问。像uart这种需要不同工作频率的设备,在get source clk时,也有可能需要不同的source clk 频率来得到正确的工作频率。如果uart的clk source是个mux clk,可以从frac,divider,fix 3种类型获取时钟频率的话,获取与fix clk不同的时钟频率时,recal 函数是会尝试从frac,divider,这2个父得到请求的时钟么?
    Linux common clock framework(2)_clock provider  发表时间:2016-03-01 16:13
    callme_friend
    @郭健:在platform_get_irq()里确实看到最终调用了map,初始化了irq_desc->handle_irq。 我又有个疑问:在of_platform_populate()里,把dts解析出的node转化为platform设备时,也会调用domain_ops的map,也会初始化irq_desc->handle_irq;这样是不是和驱动的probe函数里有重复执行map的可能? 我跟的代码是3.17版本: zynq_init_machine()--> of_platform_populate()--> //创建平台设备 of_platform_bus_create()--> of_platform_device_create_pdata()--> of_device_alloc()--> of_irq_to_resource_table()--> of_irq_to_resource()--> irq_of_parse_and_map()--> irq_create_of_mapping()--> irq_create_mapping()--> irq_domain_associate()--> //即gic_irq_domain_map:里面初始化irq_desc->handle_irq domain->ops->map() 我的dts如下: gpio0: gpio@e000a000 { compatible = "xlnx,zynq-gpio-1.0"; #gpio-cells = <2>; clocks = <&clkc 42>; gpio-controller; interrupt-parent = <&intc>; interrupts = <0 20 4>; reg = <0xe000a000 0x1000>; }; 对应的驱动代码: static struct platform_driver zynq_gpio_driver = { .probe = zynq_gpio_probe, zynq_gpio_probe() platform_get_irq()--> of_irq_get()--> irq_create_of_mapping()--> irq_create_mapping(domain,hwirq)--> irq_domain_associate()--> //即gic_irq_domain_map:里面初始化irq_desc->handle_irq domain->ops->map() //gic_irq_domain_map ------------------------------------------------------------- 上述gpio节点,会不会在of_platform_populate()和zynq_gpio_probe()时,被先后调用?那hw irq到virq的映射岂不是发生两次?
    wowo
    @heavenward:第三篇已经有了,请参考:http://www.wowotech.net/pm_subsystem/clock_framework_core.html,谢谢
    Linux common clock framework(1)_概述  发表时间:2016-03-01 10:43
    heavenward
    @wowo:我们还是很关心第三篇的,我觉得第三部分才是精华,能更清楚的明白透彻
    Linux common clock framework(1)_概述  发表时间:2016-03-01 10:17
    郭健
    @callme_friend:其实基本上驱动也不会直接调用这些借口函数,这些接口函数多半进行了封装。例如:对于platform bus上的设备,其驱动的probe函数可以使用下面的代码: ...... adc->irq = platform_get_irq(pdev, 1); if (adc->irq <= 0) { dev_err(dev, "failed to get adc irq\n"); return -ENOENT; } ret = devm_request_irq(dev, adc->irq, s3c_adc_irq, 0, dev_name(dev), adc); if (ret < 0) { dev_err(dev, "failed to attach adc irq\n"); return ret; } ...... platform_get_irq这个函数可以看一看,然后你就明白了。
    郭健
    @huad_:我的理解:都已经disable了preempt,当然不会有调度了。虽然中断可以禁止抢占代码的执行,并且也许唤醒了优先级更高的进程,但是由于是禁止抢占的,因此中断返回的时候并不会发生调度。
    linux kernel的中断子系统之(八):softirq  发表时间:2016-02-29 23:22
    郭健
    @Jordon Wu:这份文档是翻译的,因此上面的图片也都是直接copy原文的,呵呵~~我也不知道Paul是用什么工具画的。
    Perf book 9.3章节翻译(上)  发表时间:2016-02-29 23:12

共7862条482/787上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 下一页
Copyright @ 2013-2015 蜗窝科技 All rights reserved. Powered by emlog