lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1173879210.31159.30.camel@localhost.localdomain>
Date:	Wed, 14 Mar 2007 09:33:30 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Chris Wright <chrisw@...s-sol.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Glauber de Oliveira Costa <glommer@...il.com>
Subject: Re: [PATCH 00/18] Make common x86 arch area for i386 and x86_64 -
	Take 2

On Wed, 2007-03-14 at 13:53 +0100, Ingo Molnar wrote:
> * Andi Kleen <andi@...stfloor.org> wrote:
> 
> > Steven Rostedt <rostedt@...dmis.org> writes:
> > > 
> > > So I spent last night hacking up something to try to make a common 
> > > ground for all code that is shared between x86_64 and i386.  I 
> > > called this
> > > 
> > >    arch/x86
> > 
> > NACK. I think the current ways work just fine.
> 
> i agree. We've recently factored out quite a bit of common code between 
> i386 and x86_64 recently: genirq, gtod/clocksource and clockevents.

But those are things that can mostly be shared across all archs.

> 
> and that's how i think unification of architectures should be done: move 
> code into kernel/* and drivers/*, _not_ into another architecture. That 
> way all architectures benefit.
> 

I'm OK with it, although I did waste a lot of effort making those
patches (But I speak better in C than in English, or any other verbal
language, so it wasn't that bad). But if you look at the code that was
merged, I'm not sure many other archs will benefit. How many archs use
mtrr's? Perhaps these still can go into the drivers directory with a bit
of work. Don't know, I'm not that close to that code to be sure, and
don't have the time to find out ATM.


But at least there needs to be a more common way to share files between
the two archs. Having a file with just a single line of:

#include "../../i386/kernel/mycommoncode.c"

is not that elegant. The make files are, perhaps, a bit better.  Another
thing that happens a lot with these shared funcs in these files, is
finding them . Since "make TAGS" doesn't bother to check i386 when run
with ARCH=x86_64. The first time I searched for early_printk while
developing i386 took me an hour, since my search scripts don't check
other archs (I've changed that since).  I thought that the function was
one of these macro created functions, and was non-arch specific (didn't
look into arch).

So, when creating new shared code, what's the "proper" way?

-- Steve

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ