{"id":263468,"date":"2023-02-03T06:05:02","date_gmt":"2023-02-02T22:05:02","guid":{"rendered":"https:\/\/lrxjmw.cn\/jynhlbbnhdsq.html"},"modified":"2023-02-03T06:05:02","modified_gmt":"2023-02-02T22:05:02","slug":"jynhlbbnhdsq","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/jynhlbbnhdsq.html","title":{"rendered":"\u57fa\u4e8e\u5185\u6838Linux5.4.70\u7248\u672c\u5185\u6838\u5b9a\u65f6\u5668"},"content":{"rendered":"

\u6587\u7ae0\u76ee\u5f55<\/p>\n

1. \u5b9a\u65f6\u5668\u7b80\u4ecb<\/p>\n

\u672c\u7bc7\u6587\u7ae0\u4ecb\u7ecd\u5185\u6838\u5b9a\u65f6\u5668\u662f\u57fa\u4e8e\u5185\u6838Linux<\/a>5.4.70\u7248\u672c\uff0c\u5b83\u662f\u5185\u6838\u7528\u6765\u63a7\u5236\u518d\u672a\u6765\u67d0\u4e2a\u65f6\u95f4\u70b9\uff08\u57fa\u4e8ejiffies\uff09\u8c03\u5ea6\u6267\u884c\u67d0\u4e2a\u51fd\u6570\u7684\u4e00\u79cd\u673a\u5236\uff0c\u4ee3\u7801\u5b9e\u73b0\u4f4d\u4e8einclude\/linux\/timer.h\u548ckernel\/time\/timer.c\u6587\u4ef6\u4e2d\u3002<\/p>\n

\u5b9a\u65f6\u5668\u6570\u636e\u7ed3\u6784\uff0c\u5982\u4e0b\uff1a<\/p>\n

\n

struct<\/span> timer_list<\/span> {<\/span>\n\t\/*\n\t * All fields that change during normal runtime grouped to the\n\t * same cacheline\n\t *\/<\/span>\n\tstruct<\/span> hlist_node<\/span>\tentry;<\/span> \/\/ \u5b9a\u65f6\u5668\u5217\u8868<\/span>\n\tunsigned<\/span> long<\/span>\t\texpires;<\/span> \/\/ \u5b9a\u65f6\u5668\u5230\u671f\u65f6\u95f4\uff08linux\u7684jiffies\u57fa\u51c6\u65f6\u95f4\uff09<\/span>\n\tvoid<\/span>\t\t\t(<\/span>*<\/span>function)<\/span>(<\/span>struct<\/span> timer_list<\/span> *<\/span>)<\/span>;<\/span> \/\/ \u5b9a\u65f6\u5668\u5904\u7406\u51fd\u6570<\/span>\n\tu32\t\t\tflags;<\/span>\n#<\/span>ifdef<\/span> CONFIG_LOCKDEP<\/span><\/span>\n\tstruct<\/span> lockdep_map<\/span>\tlockdep_map;<\/span>\n#<\/span>endif<\/span><\/span>\n}<\/span>;<\/span>\n<\/code><\/pre>\n<\/p>\n

Note\uff1a\u65b0\u7248\u672c\u5185\u6838\u5bf9\u4e8evoid (*function)(struct timer_list *)\u5904\u7406\u51fd\u6570\u7684\u53c2\u6570\u53d1\u751f\u4e86\u53d8\u5316\uff0cstruct timer_list *\u5b9a\u65f6\u5668\u5730\u5740\u53ef\u4ee5\u901a\u8fc7from_timer\u4e5f\u5c31\u662fcontainer_of\u8ba1\u7b97\u51fa\u4f20\u53c2\u8fdb\u6765\u7684\u7ed3\u6784\u4f53\u9996\u5730\u5740linux\u7cfb\u7edf\u65e5\u5fd7\uff0c\u8fd9\u6837\u6765\u8fbe\u5230\u4f20\u53c2\u7684\u76ee\u6807\u3002\u4f7f\u7528\u4f8b\u5b50\u5982\u4e0b\uff1a\uff08\u4e0d\u5b8c\u6574\uff0c\u53ea\u4e3a\u8bf4\u660e\u95ee\u9898\u3002\uff09<\/p>\n

\n

#<\/span>define<\/span> from_timer<\/span>(<\/span>var,<\/span> callback_timer,<\/span> timer_fieldname)<\/span> <\/span><\/span>\n\tcontainer_of<\/span>(<\/span>callback_timer,<\/span> typeof<\/span>(<\/span>*<\/span>var)<\/span>,<\/span> timer_fieldname)<\/span><\/span><\/span>\n\/\/ \u4e3a\u6bcf\u4e2akey\u5b9a\u4e49\u4e86\u4e00\u4e2atimer<\/span>\nstruct<\/span> gpio_key_cfg<\/span>\n{<\/span>\n\tint<\/span> gpio_num;<\/span>\n\tint<\/span> gpio_irq;<\/span>\n

linux \u5185\u6838\u5b9a\u65f6\u5668_linux\u5185\u6838\u5b8c\u5168\u5256\u6790--\u57fa\u4e8e0.12\u5185\u6838_android linux\u5185\u6838\u5c42<\/p>\n\tint<\/span> gpio_flag;<\/span>\n\tstruct<\/span> gpio_desc<\/span> *<\/span>gpiod;<\/span>\n\tstruct<\/span> timer_list<\/span> key_timer;<\/span>\n}<\/span>;<\/span>\nstatic<\/span> void<\/span> key_timer_expires<\/span>(<\/span>struct<\/span> timer_list<\/span> *<\/span>t)<\/span>\n{<\/span>\n\tint<\/span> val;<\/span>\n\t\/**\n\t *\u8fd9\u91cc\u5c31\u662f\u901a\u8fc7struct timer_list *t\u6765\u83b7\u53d6\u8be5gpio key\u7684struct gpio_key_cfg\u5730\u5740\u3002\n\t * \u8fd9\u6837\u53ca\u77e5\u9053\u4e86\u662f\u54ea\u4e2atimer expires\uff0c\u8fd8\u77e5\u9053\u4e86\u662f\u54ea\u4e2agpio\u4ea7\u751f\u7684\u4e8b\u4ef6\u3002\u5b83\u5c31\u662f\u8fd9\u6837\u6765\u7ed9timer\u6765\u4f20\u9012\u53c2\u6570\u3002\n\t *\/<\/span>\n\tstruct<\/span> gpio_key_cfg<\/span> *<\/span>pGpioKey =<\/span> from_timer<\/span>(<\/span>pGpioKey,<\/span> t,<\/span> key_timer)<\/span>;<\/span>\n\tval =<\/span> gpiod_get_value<\/span>(<\/span>pGpioKey-><\/span>gpiod)<\/span>;<\/span>\n\tprintk<\/span>(<\/span>\"key_timer_expires %d %dn\"<\/span>,<\/span> pGpioKey-><\/span>gpio_num,<\/span> val)<\/span>;<\/span>\n}<\/span>\ntimer_setup<\/span>(<\/span>&<\/span>pGpioKeyCfg[<\/span>i]<\/span>.<\/span>key_timer,<\/span> key_timer_expires,<\/span> 0<\/span>)<\/span>;<\/span> \/\/ \u5728probe\u4e2d\uff0c\u4e3a\u6bcf\u4e00\u4e2akey\u521b\u5efa\u4e00\u4e2atimer<\/span>\nmod_timer<\/span>(<\/span>&<\/span>pGpioKey-><\/span>key_timer,<\/span> jiffies +<\/span> HZ\/<\/span>50<\/span>)<\/span>;<\/span> \/\/ key\u4e2d\u65ad\u53d1\u751f\u540e\uff0c\u542f\u52a8timer\u3002<\/span>\n<\/code><\/pre>\n<\/p>\n

2. Timer\u76f8\u5173API\u4ecb\u7ecd<\/p>\n

\u51fd\u6570<\/p>\n

\u8bf4\u660e<\/p>\n

timer_setup(timer, callback, flags)<\/p>\n

\u521d\u59cb\u5316\u5b9a\u65f6\u5668\uff0c\u4e3b\u8981\u662f\u521d\u59cb\u5316 timer_list \u7ed3\u6784\u4f53\uff0c<\/p>\n

android linux\u5185\u6838\u5c42_linux \u5185\u6838\u5b9a\u65f6\u5668_linux\u5185\u6838\u5b8c\u5168\u5256\u6790--\u57fa\u4e8e0.12\u5185\u6838<\/p>\n

\u8bbe\u7f6e\u5176\u4e2d\u7684\u51fd\u6570\u3001flags\u3002<\/p>\n

DEFINE_TIMER(_name, _function)<\/p>\n

\u521d\u59cb\u5316\u5b9a\u65f6\u5668\uff0c\u4e3b\u8981\u662f\u5b9a\u4e49\u5e76\u521d\u59cb\u5316 timer_list \u7ed3\u6784\u4f53\uff0c<\/p>\n

\u8bbe\u7f6e\u5176\u4e2d\u7684\u51fd\u6570\u3001flags\u9ed8\u8ba4\u4e3a0\u3002<\/p>\n

void add_timer(struct timer_list *timer)<\/p>\n

\u5411\u5185\u6838\u6dfb\u52a0\u5b9a\u65f6\u5668\u3002timer->expires \u8868\u793a\u8d85\u65f6\u65f6\u95f4\u3002<\/p>\n

\u5f53\u8d85\u65f6\u65f6\u95f4\u5230\u8fbe\uff0c\u5185\u6838\u5c31\u4f1a\u8c03\u7528\u8fd9\u4e2a\u51fd\u6570\uff1atimer->function(timer->data)\u3002<\/p>\n

int mod_timer(struct timer_list *timer, unsigned long expires)<\/p>\n

\u4fee\u6539\u5b9a\u65f6\u5668\u7684\u8d85\u65f6\u65f6\u95f4<\/p>\n

int timer_pending(const struct timer_list * timer)<\/p>\n

int del_timer(struct timer_list * timer)<\/p>\n

\u5220\u9664\u5b9a\u65f6\u5668\u3002<\/p>\n

3. Timer\u65f6\u95f4\u5355\u4f4d<\/p>\n

\u5728\u5185\u6838\u7684\u914d\u7f6e\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230CONFIG_HZ\u7684\u914d\u7f6e\uff0c\u5982\u4e0b\uff1a<\/p>\n

\u8fd9\u8868\u793a\u5185\u6838\u6bcf\u79d2\u4e2d\u4f1a\u53d1\u751f 100 \u6b21\u7cfb\u7edf\u6ef4\u7b54\u4e2d\u65ad(tick)\uff0c\u8fd9\u5c31\u50cf\u4eba\u7c7b\u7684\u5fc3\u8df3\u4e00\u6837\uff0c\u8fd9\u662f Linux \u7cfb\u7edf\u7684\u5fc3\u8df3\u3002\u6bcf\u53d1\u751f\u4e00\u6b21 tick \u4e2d\u65ad\uff0c\u5168\u5c40\u53d8\u91cf jiffies \u5c31\u4f1a\u7d2f\u52a0 1\u3002<\/p>\n

CONFIG_HZ=100 \u8868\u793a\u6bcf\u4e2a\u6ef4\u7b54\u662f 10ms\u3002<\/p>\n

\u5b9a\u65f6\u5668\u7684\u65f6\u95f4\u5c31\u662f\u57fa\u4e8e jiffies \uff0c\u6211\u4eec\u4fee\u6539\u8d85\u65f6\u65f6\u95f4\u65f6\uff0c\u4e00\u822c\u4f7f\u7528\u8fd9 2 \u79cd\u65b9\u6cd5\uff1a<\/p>\n

\n

mod_timer<\/span>(<\/span>&<\/span>timer,<\/span> jiffies +<\/span> xxx)<\/span>;<\/span> \/\/ xxx \u8868\u793a\u591a\u5c11\u4e2a\u6ef4\u7b54\u540e\u8d85\u65f6\uff0c\u4e5f\u5c31\u662f xxx*10ms<\/span>\nmod_timer<\/span>(<\/span>&<\/span>timer,<\/span> jiffies +<\/span> 2<\/span>*<\/span>HZ)<\/span>;<\/span> \/\/ HZ \u7b49\u4e8e CONFIG_HZ\uff0c2*HZ \u5c31\u76f8\u5f53\u4e8e 2 \u79d2<\/span>\n<\/code><\/pre>\n<\/p>\n

4. Timer Demo\u6d4b\u8bd5\u9a8c\u8bc1<\/p>\n

\u4e0b\u9762Demo\u4f7f\u7528\u4e862\u79cd\u65b9\u6cd5\u521d\u59cb\u5316Timer\uff1a<\/p>\n

\u65b9\u6cd5\u4e00\uff1atimer_setup(&test_timer1, kernel_timer_expires, 0);\u65b9\u6cd5\u4e8c\uff1aDEFINE_TIMER(test_timer2, kernel_timer_expires);<\/p>\n

\u4f7f\u7528mod_timer\u4fee\u6539timer\u8d85\u65f6\u95f4\u5e76\u542f\u52a8\uff0c\u5728\u4e0d\u4f7f\u7528\u7684\u65f6del_timer\u5220\u9664Timer\u3002<\/p>\n

\n

#<\/span>include<\/span> <\/span><\/span>\n#<\/span>include<\/span> <\/span><\/span>\n\n#<\/span>include<\/span> <\/span><\/span>\nstatic<\/span> void<\/span> kernel_timer_expires<\/span>(<\/span>struct<\/span> timer_list<\/span> *<\/span>t)<\/span>;<\/span>\nstatic<\/span> struct<\/span> timer_list<\/span> test_timer1;<\/span>\n\/\/\u521d\u59cb\u5316timer2<\/span>\nstatic<\/span> DEFINE_TIMER<\/span>(<\/span>test_timer2,<\/span> kernel_timer_expires)<\/span>;<\/span>\nstatic<\/span> void<\/span> kernel_timer_expires<\/span>(<\/span>struct<\/span> timer_list<\/span> *<\/span>t)<\/span>\n{<\/span>\n\tif<\/span>(<\/span>t ==<\/span> &<\/span>test_timer1)<\/span>{<\/span>\n\t\tprintk<\/span>(<\/span>\"Timer 1 is comingrn\"<\/span>)<\/span>;<\/span>\n\t\tmod_timer<\/span>(<\/span>&<\/span>test_timer1,<\/span> jiffies +<\/span> 1<\/span>*<\/span>HZ)<\/span>;<\/span> \/\/ \u91cd\u65b0\u8bbe\u7f6etimer1 1s timeout<\/span>\n\t}<\/span>else<\/span> if<\/span>(<\/span>t ==<\/span> &<\/span>test_timer2)<\/span>{<\/span>\n\t\tprintk<\/span>(<\/span>\"Timer 2 is comingrn\"<\/span>)<\/span>;<\/span>\n\t\tmod_timer<\/span>(<\/span>&<\/span>test_timer2,<\/span> jiffies +<\/span> 2<\/span>*<\/span>HZ)<\/span>;<\/span> \/\/ \u91cd\u65b0\u8bbe\u7f6etimer2 2s timeout<\/span>\n\t}<\/span>else<\/span>{<\/span>\n\t\tprintk<\/span>(<\/span>\"Err: timer is unknown!!!rn\"<\/span>)<\/span>;<\/span>\n\t}<\/span>\n}<\/span>\nstatic<\/span> int<\/span> __init kernel_timer_init<\/span>(<\/span>void<\/span>)<\/span>\n{<\/span>\n\tprintk<\/span>(<\/span>\"Enter timer test...rn\"<\/span>)<\/span>;<\/span>\n\t\/\/\u521d\u59cb\u5316timer1<\/span>\n\ttimer_setup<\/span>(<\/span>&<\/span>test_timer1,<\/span> kernel_timer_expires,<\/span> 0<\/span>)<\/span>;<\/span>\n\n\t\/\/\u542f\u52a8timer1\u3001timer2<\/span>\n\tmod_timer<\/span>(<\/span>&<\/span>test_timer1,<\/span> jiffies +<\/span> 1<\/span>*<\/span>HZ)<\/span>;<\/span> \/\/ 1s timeout<\/span>\n\tmod_timer<\/span>(<\/span>&<\/span>test_timer2,<\/span> jiffies +<\/span> 2<\/span>*<\/span>HZ)<\/span>;<\/span> \/\/ 2s timeout<\/span>\n\t\n\treturn<\/span> 0<\/span>;<\/span>\n}<\/span>\nstatic<\/span> void<\/span> __exit kernel_timer_exit<\/span>(<\/span>void<\/span>)<\/span>\n{<\/span>\t\n\tprintk<\/span>(<\/span>\"Exit timer test!!!rn\"<\/span>)<\/span>;<\/span>\n\t\n\tdel_timer<\/span>(<\/span>&<\/span>test_timer1)<\/span>;<\/span>\t\n\tdel_timer<\/span>(<\/span>&<\/span>test_timer2)<\/span>;<\/span>\n}<\/span>\nmodule_init<\/span>(<\/span>kernel_timer_init)<\/span>;<\/span>\nmodule_exit<\/span>(<\/span>kernel_timer_exit)<\/span>;<\/span>\n<\/code><\/pre>\n<\/p>\n

\u7f16\u8bd1\u70e7\u5f55\u9a8c\u8bc1\u5982\u4e0b\uff1a<\/p>\n

\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n

5. \u5b9a\u65f6\u5668\u5185\u90e8\u673a\u5236\u7b80\u5355\u5206\u6790<\/p>\n

\u5b9a\u65f6\u5668\u5c31\u662f\u901a\u8fc7\u8f6f\u4ef6\u4e2d\u65ad\u6765\u5b9e\u73b0\u7684\uff0c\u5b83\u5c5e\u4e8e TIMER_SOFTIRQ \u8f6f\u4e2d\u65ad\u3002\u5bf9\u4e8e TIMER_SOFTIRQ \u8f6f\u4e2d\u65ad\u7ea2\u65d7linux5.0\uff0c\u521d\u59cb\u5316\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n

\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n

\u5f53\u53d1\u751f\u786c\u4ef6\u4e2d\u65ad\u65f6\uff0c\u786c\u4ef6\u4e2d\u65ad\u5904\u7406\u5b8c\u540e\uff0c\u5185\u6838\u4f1a\u8c03\u7528\u8f6f\u4ef6\u4e2d\u65ad\u7684\u5904\u7406\u51fd\u6570\u3002\u5bf9\u4e8e TIMER_SOFTIRQ\uff0c\u4f1a\u8c03\u7528 run_timer_softirq\uff0c\u5b83\u7684\u51fd\u6570\u5982\u4e0b\uff1a<\/p>\n

\n

run_timer_softirq\n\t__run_timers<\/span>(<\/span>base)<\/span>;<\/span>\n\t\twhile<\/span> (<\/span>time_after_eq<\/span>(<\/span>jiffies,<\/span> base-><\/span>clk)<\/span>)<\/span> {<\/span>\n\t\t\t\u2026\u2026\n\n\t\t\texpire_timers<\/span>(<\/span>base,<\/span> heads +<\/span> levels)<\/span>;<\/span>\n\t\t\t\tfn =<\/span> timer-><\/span>function;<\/span> \/\/ \u83b7\u53d6\u5f53\u524dtimer\u7684function\u51fd\u6570\u3002<\/span>\n\t\t\t\tcall_timer_fn<\/span>(<\/span>timer,<\/span> fn,<\/span> baseclk)<\/span>;<\/span>\n\t\t\t\t\tfn<\/span>(<\/span>timer)<\/span>;<\/span>  \/\/ \u8c03\u7528\u8d85\u65f6timer\u7684function\u51fd\u6570\u3002<\/span>\n<\/code><\/pre>\n<\/p>\n

\u5f53jiffies \u5927\u4e8e\u6216\u7b49\u4e8e timer->expires \u65f6\uff0c\u8be5timer \u5c31\u8d85\u65f6\u3002\u5728 TIMER_SOFTIRQ \u7684\u5904\u7406\u51fd\u6570\u4e2d\uff0c\u4f1a\u4ece\u94fe\u8868\u4e2d\u628a\u8fd9\u4e9b\u8d85\u65f6\u7684 timer \u53d6\u51fa\u6765\uff0c\u6267\u884c\u5176\u4e2d\u7684\u51fd\u6570\u3002<\/p>\n

\uff1f\uff1f\uff1f\uff1f\uff1f\uff1f\u7cfb\u7edf\u662f\u5982\u4f55\u4ea7\u751f\u6ef4\u7b54\u7684 \uff1f\uff1f\uff1f\uff1f\uff1f\uff1f<\/p>\n

\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n

\u901a\u8fc7\u4e0a\u9762\u7684\u622a\u56fe\u53ef\u4ee5\u53d1\u73b0\u6ef4\u7b54\u4e2d\u65ad\u540d\u5b57\u5c31\u662f\u201ci.MX Timer Tick\u201d\uff0c\u901a\u8fc7\u540d\u5b57\u53ef\u4ee5\u627e\u5230\u5bf9\u5e94\u7684\u6e90\u7801timer-imx-gpt.c\u5982\u4e0b\uff1a<\/p>\n

\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n

mxc_timer_interrupt \u5c31\u662f\u6ef4\u7b54\u4e2d\u65ad\u7684\u5904\u7406\u51fd\u6570\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n

\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n

\u7ecf\u8fc7ced->event_handler(ced)\u6574\u4e2a\u5185\u6838\u4ee3\u7801\u641c\u7d22\u53d1\u73b0\uff0c\u5b83\u8c03\u7528\u7684\u662ftick_handle_periodic\u4f4d\u4e8e kerneltimetick-common.c \u4e2d\uff0c\u5b83\u91cc\u9762\u7684\u8c03\u7528\u5173\u7cfb\u5982\u4e0b\uff1a<\/p>\n

\n

tick_handle_periodic\n\ttick_periodic<\/span>(<\/span>cpu)<\/span>;<\/span>\n\t\tdo_timer<\/span>(<\/span>1<\/span>)<\/span>;<\/span>\n\t\t\tjiffies_64 +=<\/span> ticks;<\/span> \/\/ jiffies \u5c31\u662f jiffies_64<\/span>\n<\/code><\/pre>\n<\/p>\n

jiffies \u5c31\u662f jiffies_64\uff0c\u56e0\u4e3a\u5728 archarmkernelvmlinux.lds.S \u88ab\u5b9a\u4e49\u5982\u4e0b\uff1a<\/p>\n

\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n

6. \u53c2\u8003\u8d44\u6599<\/p>\n

1\uff1aLinux\u5185\u6838\u5b9a\u65f6\u5668\u548c\u5de5\u4f5c\u961f\u5217\u7684\u603b\u7ed3\u548c\u5b9e\u4f8b<\/p>\n

2\uff1alinux\u5185\u6838\u5b9a\u65f6\u5668\u4f7f\u7528\u53ca\u539f\u7406<\/p>\n

3\uff1aLinux\u5b9a\u65f6\u5668\u7684\u4f7f\u7528<\/p>\n

4\uff1aLinux\u5185\u6838\u5b9a\u65f6\u5668<\/p>\n

5\uff1aLinux\u5185\u6838\u5b9a\u65f6\u5668<\/p>\n

6\uff1a\u97e6\u4e1c\u5c71\u8d44\u6599<\/p>\n

\u300a\u5d4c\u5165\u5f0fLinux\u5e94\u7528\u5f00\u53d1\u5b8c\u5168\u624b\u518c_\u97e6\u4e1c\u5c71\u5168\u7cfb\u5217\u89c6\u9891\u6587\u6863-IMX6ULL\u5f00\u53d1\u677f.pdf\u300b<\/p>\n","protected":false},"excerpt":{"rendered":"

\u672c\u7bc7\u6587\u7ae0\u4ecb\u7ecd\u5185\u6838\u5b9a\u65f6\u5668\u662f\u57fa\u4e8e\u5185\u6838Linux5.70\u7248\u672c\uff0c\u5b83\u662f\u5185\u6838\u7528\u6765\u63a7\u5236\u518d\u672a\u6765\u67d0\u4e2a\u65f6\u95f4\u70b9\uff08\u57fa\u4e8ejiffies\uff09\u8c03\u5ea6\u6267\u884c\u67d0\u4e2a\u51fd\u6570\u7684\u4e00\u79cd\u673a\u5236\uff0c\u4ee3\u7801\u5b9e\u73b0\u4f4d\u4e8einclude\/linux\/timer.\u5411\u5185\u6838\u6dfb\u52a0\u5b9a\u65f6\u5668\u30021\uff1aLinux\u5185\u6838\u5b9a\u65f6\u5668\u548c\u5de5\u4f5c\u961f\u5217\u7684\u603b\u7ed3\u548c\u5b9e\u4f8b2\uff1alinux\u5185\u6838\u5b9a\u65f6\u5668\u4f7f\u7528\u53ca\u539f\u74063\uff1aLinux\u5b9a\u65f6\u5668\u7684\u4f7f\u75284\uff1aLinux\u5185\u6838\u5b9a\u65f6\u56685\uff1aLinux\u5185\u6838\u5b9a\u65f6\u5668<\/p>\n","protected":false},"author":1,"featured_media":263469,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-263468","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/263468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=263468"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/263468\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/263469"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=263468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=263468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=263468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}

\u5728IMX6ULL\u5f00\u53d1\u677f\u6267\u884c\u547d\u4ee4<\/a>cat \/proc\/interrupts\uff0c\u53ef\u4ee5\u770b\u5230 CPU0 \u4e0b\u6709\u4e00\u4e2a\u6570\u503c\u53d8\u5316\u7279\u522b\u5feb\uff0c\u5b83\u5c31\u662f\u6ef4\u7b54\u4e2d\u65ad\uff1a<\/p>\n

\u5b9a\u65f6\u5668\u72b6\u6001\u67e5\u8be2\uff0c\u5982\u679c\u5728\u7cfb\u7edf<\/a>\u7684\u5b9a\u65f6\u5668\u5217\u8868\u4e2d\u5219\u8fd4\u56de1linux \u5185\u6838\u5b9a\u65f6\u5668<\/strong>linux \u5185\u6838\u5b9a\u65f6\u5668<\/strong>\uff0c\u5426\u5219\u8fd4\u56de0\uff1b<\/p>\n