On Wednesday 14 August 2002 14:20, Christoph Hellwig wrote:
> On Wed, Aug 14, 2002 at 12:56:27PM +0200, Arnd Bergmann wrote:
> > It's not logical, but it tends to help because it's what's meant most
> > of the time. I don't know a single place in the kernel where you want
> > to test for (CONFIG_ARCH_S390 && !CONFIG_ARCH_S390X).
>
> BTW, ho much differences are between arch/s390 and arch/s390x? Is there
> any chance it could use the same #ifdef __LP64__ trick parisc uses for
> its 32 and 64bit versions? so far every file I've looked at was duplicated
> exactly in s390 and s390x.
The biggest differences are that s390 has an fpu emulation while s390x has
emulation for s390 binaries. These are not an issue -- just an ifdef for
the files. The other problem is that the assembly opcodes are different
-- 64 bit instructions have a 'g' in the opcode so you need two versions
of each .S file and #ifdefs for each inline asm.
The remaining differences are stuff that depends on sizeof(void*) and some
more backwards compatible system calls for s390, the diff -u between these
is ~300kb out of 500kb of the common .c files. I'd expect this to become
at least 50 #ifdefs plus some moved files (e.g. s390x/kernel/ptrace.c ->
s390/kernel/ptrace64.c) and an audit of all places where the difference
is nonobvious.
I also had the idea to unify the two (actually have tried a few months ago
but did not bring it to a clean end), but was not really sure if it was a
good one. Do you think it is worth the effort of merging the existing code
and changing all the documentation referring to arch/s390x?
We do indeed want to merge include/asm-s390 include/asm-s390x, which would
help building a compiler that supports both on s390x, but nobody has
worked on that recently -- I had done this for ~2.5.8 but it soon got
outdated.
Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:36 EST