Re: How to handle interrupts on SMP systems

From: Richard B. Johnson
Date: Tue Apr 27 2004 - 09:46:28 EST


On Tue, 27 Apr 2004, Srinivas G. wrote:

>
> Hi,
>
> We developed a driver for PCIHOTLINK card under linux kernel 2.4.18-3.
> It was working fine under it. Now our idea is to port it SMP system with
> the same kernel. We ported. It was compiled without any problem under
> SMP system. But it is not generating any interrupts. We have changed the
> Makefile also. We added -D__SMP__ macro and -DCONFIG_SMP macro in
> Makefile. No compilation errors. But interrupts are not generating.
>
> If anybody will have any idea please let me know.
>
> Thanks in advance,
>
> Regards,
>
> Srinivas G

There is no difference between SMP and non-SMP systems as far
as interrupt generation is concerned. You might have a hardware-
initialization bug that shows up only when you use some SMP
macros. Make sure you are using the proper macros to access your
hardware and not just pretending the return value of ioremap_nocache()
is a pointer (it's not, it's a cookie).

Also SMP adds some additional code. So, it might change the
degree of optimization that the compiler performs. You need to
use the 'volatile' key-word in cases where the compiler might
not otherwise know that something could get changed in an
interrupt.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5557.45 BogoMips).
Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/