2004-04-27 12:51:49

by Srinivas G.

[permalink] [raw]
Subject: How to handle interrupts on SMP systems


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


2004-04-27 14:45:31

by Richard B. Johnson

[permalink] [raw]
Subject: Re: How to handle interrupts on SMP systems

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.