Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\irq\manage.c Create Date:2022-07-28 10:10:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:quest_percpu_nmi - allocate a percpu interrupt line for NMI delivery*@irq: Interrupt line to allocate*@handler: Function to be called when the IRQ occurs

Proto:int request_percpu_nmi(unsigned int irq, irq_handler_t handler, const char *name, void __percpu *dev_id)

Type:int

Parameter:

TypeParameterName
unsigned intirq
irq_handler_thandler
const char *name
void __percpu *dev_id
2482  If Not handler Then Return -EINVAL
2485  desc = Interrupt to descriptor
2487  If Not desc || Not irq_settings_can_request(desc) || Not irq_settings_is_per_cpu_devid(desc) || irq_settings_can_autoenable(desc) || Not irq_supports_nmi(desc) Then Return -EINVAL
2494  If istate & IRQS_NMI Then Return -EINVAL
2497  action = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
2498  If Not action Then Return -ENOMEM
2501  handler = handler
2502  flags = Interrupt is per cpu | Do not disable this IRQ during suspend | Interrupt cannot be threaded | Flag to exclude this interrupt from irq balancing
2504  name = name
2505  percpu_dev_id = dev_id
2507  retval = q_chip_pm_get - Enable power for an IRQ chip*@data: Pointer to interrupt specific data* Enable the power to the IRQ chip referenced by the interrupt data* structure.
2508  If retval < 0 Then Go to err_out
2511  retval = register an interrupt
2512  If retval Then Go to err_irq_setup
2515  raw_spin_lock_irqsave( & lock, flags)
2516  istate |= IRQS_NMI
2517  raw_spin_unlock_irqrestore( & lock, flags)
2519  Return 0
2521  err_irq_setup :
2522  q_chip_pm_put - Disable power for an IRQ chip*@data: Pointer to interrupt specific data* Disable the power to the IRQ chip referenced by the interrupt data* structure, belongs. Note that power will only be disabled, once this
2523  err_out :
2524  kfree - free previously allocated memory*@objp: pointer returned by kmalloc.* If @objp is NULL, no operation is performed.* Don't free memory not originally allocated by kmalloc()* or you will run into trouble.
2526  Return retval