[OpenAFS-devel] problems with #define CONFIG_SMP in param*linux*.h (+ patch)

seth vidal skvidal@phy.duke.edu
20 Jul 2002 11:10:38 -0400


--=-Tj/D4LPH0fZgBntoyJga
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Sat, 2002-07-20 at 10:33, Matthew Miller wrote:
> I was trying to rebuild the OpenAFS 1.2.5 RPM on a Red Hat Linux 7.x syst=
em
> updated to their 2.4.18-5 kernel package. The build process broke when
> trying to make the MP kernel modules -- dying in include/linux/sched.h li=
ne
> 454, where there's this bit:
>=20
> #if CONFIG_SMP
> extern void set_cpus_allowed(task_t *p, unsigned long new_mask);
> #else
> #define set_cpus_allowed(p, new_mask)   do { } while (0)
> #endif
>=20
> At first I thought that this should be changed to #ifdef (which does inde=
ed
> work around the problem), but I talked with a kernel developer at RH, and=
 he
> tells me that the kernel is right and OpenAFS is wrong -- either #ifdef o=
r
> #if should work. So, I think the following patch (which also causes the
> problem to go away) is the correct solution.
>=20
> If I'm wrong, please let me know. If I'm right, please apply.
>=20
> Thanks.
>=20


This patch was posted a few weeks ago here:
#ifdef CONFIG_SMP

and we #define CONFIG_SMP to an empty value in
src/config/param.i386_linux24.h (actually in all of the param headers
for all of the linux ports).   Applying the patch below lets me build
successfully for 2.4.18-5.

--- param.i386_linux24.h        2002/01/31 21:48:23     1.1.1.1
+++ param.i386_linux24.h        2002/06/21 06:10:49
@@ -30,7 +30,7 @@
  * MP to compile for Linux
  */
 #ifdef AFS_SMP
-#define CONFIG_SMP
+#define CONFIG_SMP 1
 #ifndef CONFIG_X86_LOCAL_APIC
 #define CONFIG_X86_LOCAL_APIC
 #endif



it appears to let everything compile correctly.

-sv


--=-Tj/D4LPH0fZgBntoyJga
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA9OX1u1Aj3x2mIbMcRArgAAKCAx0SWYm1f9GNM0BWJKTFv+ayJNQCfYSlo
Qhh953NPURisJMk18JWBEZ0=
=VNWc
-----END PGP SIGNATURE-----

--=-Tj/D4LPH0fZgBntoyJga--