Re: [PATCH v2 06/19] powerpc/cputable: Split cpu_specs[] out of cputable.h

From
Michael Ellerman <mpe@ellerman.id.au>
Date
2022-10-07 10:00:05
Also in
lkml
Reply to
Christophe Leroy, 2022-10-06
Christophe Leroy [off-list ref] writes:
Le 20/09/2022 à 10:56, Nicholas Piggin a écrit :
quoted
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
Thread (23 messages) 23 messages, 4 authors, last reply 2022-10-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help