Re: SMP environment driver building issue ...

Rui Sousa (rsousa@grad.physics.sunysb.edu)
Sat, 18 Sep 1999 04:26:02 -0400


"WANG,YIDING (HP-SanJose,ex1)" wrote:
>
> I have loaded RH6.0 to Dell PowerEdge2300 with 2 CPUs. My driver is
> compiled under UP system. When running 'insmod hpfc', Linux complains that
> the driver module is not for SMP system.
>
> So I recompiled driver in this SMP system with CFLAG including "__SMP__".
> The driver cannot be comiled due to following errors:
>
> gcc -c -g -O -D__SMP__ -D__KERNEL__ -DMODULE -DFCLayer_TachyonTL -I../h
> -I../common/h -I/usr/src/linux/include hpfc.c
> /usr/src/linux/include/asm/smp.h: In function `hard_smp_processor_id':
> In file included from /usr/src/linux/include/linux/smp.h:11,
> from /usr/src/linux/include/linux/sched.h:20,
> from /usr/src/linux/include/linux/blkdev.h:5,
> from /usr/src/linux/include/linux/blk.h:4,
> from hpfc.c:81:
> /usr/src/linux/include/asm/smp.h:209: `APIC_BASE' undeclared (first use in
> this function)
> /usr/src/linux/include/asm/smp.h:209: (Each undeclared identifier is
> reported only once
> /usr/src/linux/include/asm/smp.h:209: for each function it appears in.)
> /usr/src/linux/include/asm/smp.h:209: `APIC_ID' undeclared (first use in
> this function)
> hpfc.c: In function `hpfc_DetectHBA':
> hpfc.c:615: warning: passing arg 2 of `request_irq' from incompatible
> pointer type
> hpfc.c: At top level:
> hpfc.c:2259: warning: initialization from incompatible pointer type
> hpfc.c:2259: warning: initialization from incompatible pointer type
> hpfc.c:2259: warning: initialization from incompatible pointer type
> hpfc.c:2259: warning: initialization from incompatible pointer type
> hpfc.c:2259: warning: initialization from incompatible pointer type
> hpfc.c:2259: warning: initialization from incompatible pointer type
> make: *** [hpfc.o] Error 1
>
> Could anyone help me on this issue please!
> 1, To compile a driver with SMP enabled, what flag should be defined?
> 2. What else do I need to make driver compiled for SMP?
>
> Many thanks!
>
> -eddie
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

Hi,

Configure you kernel source for SMP (make menuconfig). Then run "make dep".
This should be enough.
Some of the kernel source headers file are modified according to the
configuration,
so if you never compiled a SMP kernel the source is not set right.

Rui Sousa

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