[OpenAFS-devel] openafs-1.4.1-rc5 & sparc64_linux26
Jeffrey Hutzelman
jhutz@cmu.edu
Sun, 29 Jan 2006 16:19:37 -0500
On Sunday, January 29, 2006 09:14:20 PM +0100 Stephan Wienczny
<Wienczny@Uni-Paderborn.de> wrote:
> hi,
>
> I had some problems compiling the linux kernel module for openafs on
> linux-2.8.0. I wrote two pachtes I attached.
>
> the 1.4.0 patch are parts from a patch I wrote for this version. It
> changes osi_modules.c
OpenAFS is written in C, not C++; C++-style comments are inappropriate.
Further, your patch would be considerably easier to read and analyze if you
had not added extraneous comments to lines you were not actually changing.
Nonetheless, I at least was able to examine the effect of your patch, and
it seems to be OK except that it removes the case that handled pre-2.4
linux on that architecture.
Your change was, essentially, this:
-#ifdef AFS_SPARC64_LINUX24_ENV
- if (current->thread.flags & SPARC_FLAG_32BIT)
-#elif defined(AFS_SPARC64_LINUX20_ENV)
- if (current->tss.flags & SPARC_FLAG_32BIT)
+#ifdef AFS_SPARC64_LINUX20_ENV
+#ifdef AFS_SPARC64_LINUX26_ENV
+ if (test_thread_flag(TIF_32BIT))
+#elif defined (AFS_SPARC64_LINUX24_ENV)
+ if (current->thread.flags & SPARC_FLAG_32BIT)
+#endif
I would suggest instead a smaller, simpler change which does not
gratuitously break support for another platform:
-#ifdef AFS_SPARC64_LINUX24_ENV
+#ifdef AFS_SPARC64_LINUX26_ENV
+ if (test_thread_flag(TIF_32BIT))
+#elif defined(AFS_SPARC64_LINUX24_ENV)
if (current->thread.flags & SPARC_FLAG_32BIT)
#elif defined(AFS_SPARC64_LINUX20_ENV)
if (current->tss.flags & SPARC_FLAG_32BIT)
> the 1.4.1-rc5 patch changes configure.in to include linux26 support for
> sparc64
No, it doesn't change configure.in; it attempts to change aclocal.m4, a
generated file. The correct change is to src/cf/osconf.m4, followed by
running regen.sh again to update aclocal.m4 and the configure script.
Note that while this change is needed for the 1.4.x branch, it would not be
needed on the head, which handles sparc64_linux* with a pattern.
-- Jeffrey T. Hutzelman (N3NHS) <jhutz+@cmu.edu>
Sr. Research Systems Programmer
School of Computer Science - Research Computing Facility
Carnegie Mellon University - Pittsburgh, PA