触发内核中断处理程序:如何? [英] Trigger Kernel Interrupt Handler: How?

查看:99
本文介绍了触发内核中断处理程序:如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过传说中的理解内核来理解内核中的异步中断处理. Linux内核.

I am trying to understand Asynchronous Interrupt handling in kernel, ofcourse through the legendary Understanding the Linux Kernel.

在此过程中,将如何以及由谁触发内核中断处理程序?

In this process how and who will trigger Kernel Interrupt Handler?

我希望有人可以帮助我更正此问题并澄清我的问题 1)如何以及由谁触发内核中断处理程序? 2)如何定义新的或更改现有的硬件中断处理程序?

I would like some one to help me correcting this and to clarify my question on 1)How and Who trigger Kernel Interrupt Handler? 2)How to define new or change existing hardware interrupt handlers?

先谢谢您!

推荐答案

Robert Love的"Linux Kernel Development"中的这张图片很好地描述了中断的路径.处理器在预定义的Enty点do_IRQ()中中断内核.如果有相应的中断处理程序,它将被执行.

This picture from Robert Love's "Linux Kernel Development" pretty well describes path of interrupt. Processor interrupts the kernel in the predefined enty point do_IRQ(). If there is corresponding interrupt handler, it will get executed.

要处理中断,应在request_irq()中注册中断处理程序.

To handle interrupt, you should register your interrupt handler with request_irq().

这篇关于触发内核中断处理程序:如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆