Hi, On Thu, Jul 13, 2006 at 01:12:14PM +0530, [EMAIL PROTECTED] wrote: > We've written a device driver in linux for a pcmcia card with usb and > serial functionality. I need to test this driver on a dual core/SMP > machine. We work on kernel 2.6.15.4. I have recompiled this kernel > version on my dual core machine with the CONFIG_SMP flag set during > menuconfig. > > How do i ensure that my driver is making use of the SMP feature? Do > build my driver code i have a makefile in which i use the EXTRA_CFLAGS= > -D__SMP__ -DCONFIG_SMP -DLINUX. > Am i using the right flags? Do these flags really have any significance > in deciding whether the SMP capability will be exploited? Are there any > other flags i need to use while building my driver code? What does the > -jN flag mean? Should i be using it in my case. > > Please guide me. I am a bit confused.
Are you talking about "make -jN"? If so, that is purely for deciding how many threads to use to *compile* the code, not run-time execution. Not relevant. As Arjan said, you should use the normal kbuild infrastructure, either for external module builds by using something like: make -C /lib/modules/`uname -r`/build M=`pwd` make -C /lib/modules/`uname -r`/build M=`pwd` modules_install or for in-kernel-tree builds. See linux/Documentation/kbuild/ Simply provide a driver Makefile that contains all tags required for kbuild infrastructure, that should automatically take care of any and all compiler flags you need to use, whether you're using an SMP kernel configuration or not. For sample users of the external kbuild driver build, see e.g. the acx WLAN driver (both in-kernel and external build possible there, see README). About SMP in general: AFAIK there is nothing to configure here, the only thing you really have to get right is proper locking inside your driver to prevent concurrent resource access. Andreas Mohr P.S.: oh, and getting this driver submitted for kernel inclusion would be nice :) (both for you and us, since it'd reduce amount of maintenance work due to people improving it automatically) ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel