lkml.org 
[lkml]   [2007]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 00/18] Make common x86 arch area for i386 and x86_64 - Take 2
Ingo Molnar wrote:
> * Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>
>>>symbolic links perhaps? In that case i'd also introduce a common
>>>naming scheme: x86_early_printk.c - to make sure we know it right
>>>away that those files are bi-arch.
>>
>>Hey, I know! This is a radical idea, but what if we put the name at
>>the head of the file, and called it
>>
>> arch/x86/kernel/early_printk.c
>>
>>instead? Then we could teach each of i386 and x86-64 to include it
>>from that area, and we could put other shared files under the same
>>directory hierarchy so that it would be easy to see which ones are
>>shared?
>
>
> that is nice too, but it has some disadvantages as well in practice. For
> example i often want to see 'everything' that belongs to an arch in just
> one subdirectory. That way one can grep it for example, instead of
> having to grep two separate places. Symlinks would be fine for that, but
> an explicit split not really i think - unless we can get some really
> significant chunk of code into that hierarchy, so that it makes
> functional /sense/ to look at it in isolation.
>
> with the prefix suggestion we can keep these 'shared' files merged in a
> single, main functional tree (x86_64), but still have them marked in the
> VFS as being shared. But ... either way is fine to me - no strong
> feelings, really.

You could do both. Have the x86 directory that Linus suggests for shared
files, then have the build system generate the symlinks for you.

Could have arch/x86_64/kernel/common arch/x86_64/mm/common etc. symlinks.
that point to arch/x86/kernel, arch/x86/mm etc.

This way you know exactly which files are shared and which are not, which
is basically impossible without a grep currently. You also get to do a
single grep of all arch code. Best of both worlds? Or do I miss something?

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com

-
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/

\
 
 \ /
  Last update: 2007-03-15 17:53    [W:0.116 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site