Skip to contentSkip to conversation

How to diasble interrupt of current core in multicore cpu

DISCUSSION J.Hwan Kim 4 participants 4 messages May 30, 2014 – Jun 5, 2014

lore
Share & tools
lore

J.Hwan Kim

author
#0 lore raw

Hi, everyone

How to disable interrupt for current core in multicore CPU?

Thanks in advance
Kim.

#2 lore raw

linux-3.12.6/Documentation/IRQ-affinity.txt

Quoted 26 lines · Pranay Srivastava

are you looking for

local_irq_disable?

Quoted 11 lines · J.Hwan Kim

Hi, everyone

How to disable interrupt for current core in multicore CPU?

Thanks in advance
Kim.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

--

        ---P.K.S

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

#3 lore raw
In reply to Pranay Srivastava

-----Original Message-----
From: [email protected] [mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of Pranay Srivastava
Sent: Friday, May 30, 2014 4:26 PM
To: J.Hwan Kim
Cc: kernelnewbies
Subject: Re: How to diasble interrupt of current core in multicore cpu

are you looking for

local_irq_disable?

Quoted 7 lines · J.Hwan Kim

Hi, everyone

How to disable interrupt for current core in multicore CPU?

Thanks in advance
Kim.

local_irq_save/restore would be more suitable. you can use them without considering
is interrupt enabled now. your code may looks like this:
local_irq_save()
/*your code comes here with interrupt disabled*/
local_irq_restore()
in this way, if interrupt is in state A (may be enabled or disabled), before you call local_irq_save(), then after you call local_irq_restore, the interrupt will still be in state A. harmless to other code.

Quoted 4 lines

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Signature · 6 lines
        ---P.K.S

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies