RE : PPC arch and spinlocks

3 messages, 3 authors, 2005-06-09 · open the first message on its own page

RE : PPC arch and spinlocks

From: Garcia Jérémie <hidden>
Date: 2005-06-09 09:32:17

First of all,tks Jeff for this link.=20
So reading that, I understood that I need to enable the SMP support in =
the makemenuconfig
in order to use spinlocks even if I'm working on UP platform.
That's what I did but I now go through compile errors (I'm using a =
montavista PE 3.1):

In file included from =
/myWorks/en-cours/linux-2.4.20_mvl31/include/linux/smp.h:14,
                 from ppc4xx_setup.c:34:
/myWorks/en-cours/linux-2.4.20_mvl31/include/asm/smp.h:28: error: =
`NR_CPUS' undeclared here (not in a function)
/myWorks/en-cours/linux-2.4.20_mvl31/include/asm/smp.h:30: error: =
`NR_CPUS' undeclared here (not in a function)
/myWorks/en-cours/linux-2.4.20_mvl31/include/asm/smp.h:31: error: =
`NR_CPUS' undeclared here (not in a function)
/myWorks/en-cours/linux-2.4.20_mvl31/include/asm/smp.h:31: embrouill=E9 =
par les erreurs pr=E9c=E9dentes, abandon
make[1]: *** [ppc4xx_setup.o] Erreur 1
make[1]: Quitte le r=E9pertoire =
`/myWorks/en-cours/linux-2.4.20_mvl31/arch/ppc/kernel'
make: *** [_dir_arch/ppc/kernel] Erreur 2

Is it a known problem for the montavista ppc users??

-------- Message d'origine--------
De: Jeff Angielski [mailto:jeff@theptrgroup.com]
Date: mer. 08/06/2005 17:26
=C0: Garcia J=E9r=E9mie
Cc: linuxppc-dev@ozlabs.org
Objet : Re: PPC arch and spinlocks
=20
On Wed, 2005-06-08 at 16:29 +0200, Garcia J=E9r=E9mie wrote:
Hi everybody, I need your help one more time.
I'm new to kernel device driver (linux newbie) and I'd like to control =
concurrent access
to our hardware resources. (I'm working on a ppc405EP platform =
uniprocessor)

You might find this guide useful:

http://www.kernelnewbies.org/documents/kdoc/kernel-locking/lklockingguide=
.html



Jeff Angielski
The PTR Group

Re: RE : PPC arch and spinlocks

From: Geoff Levand <hidden>
Date: 2005-06-09 15:20:08

� wrote:
First of all,tks Jeff for this link. 
So reading that, I understood that I need to enable the SMP support in
the makemenuconfig
in order to use spinlocks even if I'm working on UP platform.
That's what I did but I now go through compile errors (I'm using a
montavista PE 3.1):

In file included from
/myWorks/en-cours/linux-2.4.20_mvl31/include/linux/smp.h:14,
                 from ppc4xx_setup.c:34:
/myWorks/en-cours/linux-2.4.20_mvl31/include/asm/smp.h:28: error:
`NR_CPUS' undeclared here (not in a function)
/myWorks/en-cours/linux-2.4.20_mvl31/include/asm/smp.h:30: error:
`NR_CPUS' undeclared here (not in a function)
/myWorks/en-cours/linux-2.4.20_mvl31/include/asm/smp.h:31: error:
`NR_CPUS' undeclared here (not in a function)
/myWorks/en-cours/linux-2.4.20_mvl31/include/asm/smp.h:31: embrouill�
par les erreurs pr�c�dentes, abandon
make[1]: *** [ppc4xx_setup.o] Erreur 1
make[1]: Quitte le r�pertoire
`/myWorks/en-cours/linux-2.4.20_mvl31/arch/ppc/kernel'
make: *** [_dir_arch/ppc/kernel] Erreur 2
ppc4xx core doesn't support SMP.

Re: RE : PPC arch and spinlocks

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2005-06-09 22:45:55

On Thu, 2005-06-09 at 11:28 +0200, Garcia Jérémie wrote:
First of all,tks Jeff for this link. 
So reading that, I understood that I need to enable the SMP support in the makemenuconfig
in order to use spinlocks even if I'm working on UP platform.
That's what I did but I now go through compile errors (I'm using a montavista PE 3.1):
No, spinlocks are always around, though they do nothing on UP (except if
you use the _irq variants). Also, SMP isn't supported on 4xx.

You should do what Hollis says :)

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help