Re: IRQ Dynamically Allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 08, 2007 at 12:10:27AM +0000, Gene Ng wrote:
> This is the first time that I am working with the linux kernel.  
> 
> I am having problem with finding the IRQs that are assigned in the
> kernel under the kernel 2.2.19.

Wow, where did you dig that up? That's a 6 year old kernel, I hope you
don't mind the number of people remembering details about such an
ancient kernel is rather low.

> After retrieving the list of unassigned IRQs, I need to assign 4
> serial ports to the unassigned IRQs.

That's not always possible. If the IRQ line from the serial port is
routed to IRQ 3 (for example), there is no way you can assign it to IRQ
5.

>  I have tried to call the
> get_irq_list() function from my own kernel module, but this function
> call crashed my module while executing.  So, I tried to use retrieve
> the Interrupt Descriptors Table using struct irq_desc_t, but I have
> not been able to find a function call that would return me the system
> Interrupt Descriptor Table with the struct irq_desc_t.

Forget about how the 80386 handles interrupts in protected mode, the
kernel will handle those gory details for you. How the kernel will
assign an IRQ to a device depends mostly on the bus type. For ISA, you
have no choice other than using whatever is hardwired. ISA-PnP will
allow some flexibility, but not much. PCI is the most flexible, but it
still depends on how the PCI bus is connected to the IRQ controller. If
you have a modern system, it will probably have an APIC IRQ controller,
which (among other things) will allow for more than the standard 16
interrupts. I'm not sure 2.2.19 supports APIC, though.

>  I believe
> irq.c module would generate this, but there seems to be linking
> problem or this module is not accessible outside of the kernel space.

Correct, you can't touch kernel symbols from userspace.

> Hopefully, you guys would be able to point me to the correct place in
> locate this.

I'd suggest to use a more recent kernel. 2.6.23 would be nice.


Erik

-- 
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux