Subject: Re: CVS commit: src/sys/arch/evbppc
To: None <tsutsui@ceres.dti.ne.jp>
From: Shigeyuki Fukushima <shige@NetBSD.org>
List: source-changes
Date: 01/23/2005 05:50:42
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Subject: Re: CVS commit: src/sys/arch/evbppc
Date: Sat, 22 Jan 2005 20:30:31 +0900

> IMHO, obs405_machdep.c looks better name rather than md_machdep.c.
> (machine-dependent machdep.c?)

Hmm...
I think,  walnut board source codes will be based on powerpc/ibm4xx codes.
  - evbppc/obs405/obs405_machdep.c
  - evbppc/walnut/walnut_machdep.c
  - evbppc/xxx/xxx_machdep.c
     :

I want to avoid using "xxx" persistently... :)

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Subject: Re: CVS commit: src/sys/arch/powerpc
Date: Sat, 22 Jan 2005 20:36:37 +0900
> - Why do we have both powerpc/ibm4xx/ibm4xx_machdep.c and
>   powerpc/ibm4xx/machdep.c?

This is related above.
Powerpc/ibm4xx/machdep.c includes functions declared at kern/*.c.
These functions are glue.
Powerpc/ibm4xx/ibmXXX_machdep.c includes real functions.

The reason of above layout is that I don't want the following situation:
    evbppc/obs405/machdep.c:
        cpu_reboot()
    powerpc/ibm4xx/ibm4xx_machdep.c: [4xx-common functions]
        cpu_configure()
        cpu_startup()
    powerpc/ibm4xx/ibm40x_machdep.c: [40x-common functions]
        cpu_startup()
        cpu_reboot()
If I want to use ibm4xx_machdep.c:cpu_configure.c and 
ibm40x_machdep.c:cpu_startup.c for obs405 machine,
this layout causes object-linking-conflict.


Hum... machdep = machine-dependent ...
machdep.c should be located at machine directory?
Functions in powerpc/ibm4xx/machdep.c are glue.
machdep.c => machdep_glue.c is ok?


I have an another naming proposal bellow.
   evbppc/xxx/machdep.c
   powerpc/ibm4xx/machdep_glue.c
   powerpc/ibm4xx/ibm4xx_machdep.c
   powerpc/ibm4xx/ibm40x_machdep.c
      :
Is it ok?

Regards,
--- shige
Shigeyuki Fukushima <shige@{FreeBSD,jp.FreeBSD,NetBSD}.org>