[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87k05cnecz.fsf@mpe.ellerman.id.au>
Date: Fri, 07 Oct 2022 20:59:40 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Christophe Leroy <christophe.leroy@...roup.eu>,
Nicholas Piggin <npiggin@...il.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH v2 06/19] powerpc/cputable: Split cpu_specs[] out of
cputable.h
Christophe Leroy <christophe.leroy@...roup.eu> writes:
> Le 20/09/2022 à 10:56, Nicholas Piggin a écrit :
>> On Tue Sep 20, 2022 at 3:01 AM AEST, Christophe Leroy wrote:
>>
>> This series is a nice cleanup. No comments yet but kernel/ is getting
>> pretty crowded. Should we make some subdirectories for subarch things
>> like mm has?
>>
>> Can do that after your series. Probably requires another merge window
>> to do it.
>>
>
> By the way, I'm wondering how we decide whether some code goes in
> arch/powerpc/kernel/ or in arch/powerpc/lib/
On a case-by-case basis? :)
I think our lib is *mostly* routines that are library like, eg. string
copy, memcpy, memcmp etc. Though there's also single step code, code
patching etc.
I guess one thing they have in common is that they're (somewhat) self
contained routines that do a specific thing, and that they are called
from various other parts of the kernel.
On the other hand code in kernel *tends* to be more larger things, like
early boot sequence, interrupt/syscall entry, module loading etc.
But really kernel is where everything lives that doesn't have anywhere
else to go, so it's a bit of a dumping ground.
Talking specifically about all these CPU files, I think we could create
an arch/powerpc/cpu for them. On x86 they have arch/x86/kernel/cpu, but
the kernel seems redundant.
With all the CPU specs, CPU setups, and dt_cpu_ftrs.c we'd have ~4500
lines that could go in arch/powerpc/cpu. Which seems like enough to
justify a directory.
cheers
Powered by blists - more mailing lists