Questions tagged [irq]

An interrupt request is a hardware signal sent to the processor that temporarily stops a running program and allows to handle a hardware event.

In an IBM PC compatible personal computer, an interrupt request (or IRQ) is a hardware signal sent to the processor that temporarily stops a running program and allows a special program, an interrupt handler, to run instead. Interrupts are used to handle such events as data receipt from a modem or network, or a key press or mouse movement. The interrupt request level (IRQL) is the priority of an interrupt request.

Related tags:

209 questions
0
votes
0 answers

How to trigger the Linux IRQ handler thread again when it finishes if there was same IRQ triggered while it was running

int request_threaded_irq(unsigned int irq, irq_handler_t handler, irq_handler_t thread_fn, unsigned long irqflags, const char *devname, void *dev_id); How can we the IRQ handler thread calling thread_fn again when it finishes,…
0
votes
0 answers

Linux rx and tx stats in /proc/tty/driver/serial file is not working

I am trying to echo some string to /dev/ttyS0 and the rx and tx stats in /proc/tty/driver/serial remain 0. If I change the irq of ttyS0 to 0 and then echo some string to ttyS0, the stats are changing according to the length of the string. Would…
0
votes
1 answer

convert HW IRQ to Linux IRQ

I have a HW_IRQ is shared between 2 kernel modules. Module1 is loaded at the boot time and called: request_irq(linux_irq1, handler1, IRQF_SHARED, ...);. After booting up, I want to load the Module2 that shared the same HW_IRQ with the Module1. I…
drymon
  • 113
  • 1
  • 6
0
votes
1 answer

How to provide interrupt generating GPIOs from a kernel module

I've written a (working) kernel module which uses returns a struct gpio_chip instance to specify how reads and writes (using the module-provided GPIOs) should be handled. static struct gpio_chip template_chip = { .label =…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
0
votes
2 answers

Why are all irq disabled for retarget write on STM32?

I am looking at the following function which retargets stdout to UART in the STM32 Std peripheral library. int _write(int fd, char *ptr, int len) { uint32_t primask = __get_PRIMASK(); __disable_irq(); for (int i = 0; i < len; i++) { while…
0
votes
0 answers

how to use interrupt function in Ubuntu 20?

I am a beginner with linux interrupt function, I try to run the program below in Ubuntu 20, but there is always red wave line with the "#include ", I search the file and copy it into the directory. But after that, I get other…
0
votes
0 answers

Can I increase a thread irq priority

I write a device driver to receive data from the hardware. The logic is when device data is ready, it will send an irq to the Linux host. The communication interface is SPI. However, the SPI controller driver to read data in the machine can not be…
gaosiy
  • 3
  • 3
0
votes
0 answers

About the use of tasklet_hrtimer_init in hardware interrupt callback function

Comment of function tasklet_hrtimer_init: Init a tasklet/hrtimer combo for softirq callbacks There are few routines used in kernel about tasklet_hrtimer_init. Can tasklet_hrtimer_init be used in the callback function of hardware interrupt?
Carlos
  • 1
  • 3
0
votes
0 answers

Linux kernel IRQ to execute long action

I am implementing a kernel module to handle power-off event. Our HW setup will emit an IRQ when power cut-off happens, and device can run 200ms more after that. During this time I have to close all rw-opened Fd to avoid file corruption. I am…
Maluvel
  • 425
  • 1
  • 6
  • 13
0
votes
0 answers

GICv2 IRQ ID 1023

I am just trying my rk3328 (armv8) bare metal os. I am use irq routines for wait the vblank and to draw the frame. The VOP (graphics PU) trigs the IRQ. The GIC intercepts the signal , and it calls the correct routine. But immediately the GIC…
Lino
  • 7
  • 4
0
votes
0 answers

Linux drm graphics driver for rockchip vop and irqs

I am just using the drm driver for coding my custom vop driver for rockchip. It's working but I have a problem, the vop is not triggering the irqs and I am not able to use the status registers for detect the vblank region. Here's my…
Lino
  • 7
  • 4
0
votes
0 answers

Reading GIC ID IRQ on Rk3328

I am working on my OS bare-metal for my rk3328 tvbox. I am just write the code for irq handler but I have a problem reading the ID's IRQ occurred I am reading always 0 on ICCIAR register. Thanks for any help
Lino
  • 7
  • 4
0
votes
0 answers

Using libiio trigger to propagate IRQ to userspace

I browsed most of that litterature already and the kernel side of it is very much covered, understood and assimilated. However my question is basically: How can I be alerted, for example through a callback function, when an interruption occurs in…
0
votes
1 answer

Set the process priority and the affinity of an irq process from C/C++

i want to set rise the priority and the affinity of irq processes (spi, gpiod) in linux, from a program written in C/C++. To set the priority of my own process I use pthread_setschedparam to set the affinity of my own process I use…
fws
  • 11
  • 4
0
votes
0 answers

Same IRQ number shared by two subsystems

My system has an SMBus controller and a serial UART that appear as different PCI devices: 00:1e.3 Communication controller: Intel Corporation Atom Processor Z36xxx/Z37xxx Series LPIO1 HSUART Controller #1 (rev 11) 00:1f.3 SMBus: Intel Corporation…
rgov
  • 3,516
  • 1
  • 31
  • 51