LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-03-2011, 09:52 PM   #1
zhu_heqing
LQ Newbie
 
Registered: Jul 2011
Posts: 4

Rep: Reputation: Disabled
Post How can I catch IPI via linux device driver on x86?


Run 64-bit linux on Intel processor, x86 platform. My use case: other cores (may run other OS) will send the IPI to core#0 (linux), the interrupt need be caught/addressed.

I can catch the inter processor interrupts via the kernel hacking.

But I am not successful to register the interrupt handler to catch the IPI using the linux kernel driver. The below APIs were tested but failed: request_irq/setup_irq/probe_irq_on/off. I can get some IRQ reigsterred. But unable to the catch the interrupt.

How do I generate the interrupt on core#0? Just write the APIC ICR with the destination core id, and vector number.

Any help is highly appreciated.
 
Old 07-05-2011, 02:37 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
You are better to call some API to setup IPI interrupt instead of writing APIC ICR register directly.
 
Old 07-07-2011, 04:32 AM   #3
zhu_heqing
LQ Newbie
 
Registered: Jul 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
I am now able to use requestt_irq/free_irq for IPI. It seemed that the irq/interrupt vector delta is about 0x30. Verified on 2 systems.

However I cannot use any send_IPI_mask provided by the kernel API. They are not exported. Correct me if I were wrong.
 
Old 07-07-2011, 04:44 AM   #4
zhu_heqing
LQ Newbie
 
Registered: Jul 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Let me make this clear: The above IRQ/Interrupt vector delta (0x30) is tested/verified within a very limited range, less than 0xf. IRQ shall be dynamically allocated, I don't have the answer on which code decides the gap. It just dirty work with a little lucky.

Welcome to the elegant approach or suggestions.
 
Old 07-08-2011, 02:18 PM   #5
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Why do you need to capture/address IPI interrupt? Is your Linux kernel generic or dedicated?
 
Old 07-10-2011, 11:58 PM   #6
zhu_heqing
LQ Newbie
 
Registered: Jul 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Sorry for late reply. The linux kernel is standard but only running core #0. Other cores will run other Operating system (non-linux). That's why need do IPI.
 
Old 07-11-2011, 02:24 PM   #7
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
If Linux kernel is standard. You are better find out another way to capture IPI.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting around Linux Installation Catch-22 w/r/t NVidia Driver knidsrok Linux - Newbie 2 06-14-2011 07:07 PM
[SOLVED] USB device is not claimed by any active driver for every device in Linux 2.4 jacquesdirac Linux - Hardware 3 11-12-2010 08:35 AM
Suse 10 and ATI Linux x86 Driver 8.18.8 Sparky1 SUSE / openSUSE 11 10-31-2005 06:48 PM
ATI Proprietary Linux x86 Driver husnos Linux - Hardware 10 08-05-2005 05:02 PM
ATI Proprietary Linux x86 Driver Superganja23 Linux - Software 6 01-22-2005 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration