(adding tech-kern to CC) On 15.08.2010 14:04, Alan Barrett wrote: > On Sun, 15 Aug 2010, Joerg Sonnenberger wrote: >> Just use dynamic sysctls, please. No reason to wire down the OID. > > It might make sense to add comments near all existing lists of > hard-wired sysctl OID values asking people not to add more of them. > > Index: arch/x86/include/cpu.h > --- arch/x86/include/cpu.h 24 Jul 2010 00:45:56 -0000 1.23 > +++ arch/x86/include/cpu.h 15 Aug 2010 12:02:26 -0000 > @@ -439,7 +439,9 @@ void x86_bus_space_mallocok(void); > #endif /* _KERNEL || _STANDALONE */ > > /* > - * CTL_MACHDEP definitions. > + * CTL_MACHDEP definitions, for sysctl nodes that pre-date the > + * availability of the dynamic sysctl(9) interface. New sysctl nodes > + * should use CTL_CREATE instead of adding new definitions here. > */ > #define CPU_CONSDEV 1 /* dev_t: console terminal > device */ > #define CPU_BIOSBASEMEM 2 /* int: bios-reported base mem > (K) */ > @@ -462,6 +464,7 @@ void x86_bus_space_mallocok(void); > #define CPU_TMLR_VOLTAGE 13 /* int: curret voltage */ > #define CPU_TMLR_PERCENTAGE 14 /* int: current clock > percentage */ > #define CPU_MAXID 15 /* number of valid machdep ids > */ > +/* Please do not add new CPU_xxx definitions; see comment above */
Shall it be added for all other archs then? I assume that they can all benefit from the dynamic sysctl(9) interface? Quick grepping: arch/alpha/include/cpu.h arch/amiga/include/cpu.h arch/arm/include/cpu.h arch/atari/include/cpu.h arch/cesfic/include/cpu.h arch/hp300/include/cpu.h arch/hp700/include/cpu.h arch/sh3/include/cpu.h arch/luna68k/include/cpu.h arch/m68k/include/sysctl.h arch/mac68k/include/cpu.h arch/mips/include/cpu.h arch/mvme68k/include/cpu.h arch/news68k/include/cpu.h arch/powerpc/include/cpu.h arch/sparc/include/cpu.h arch/sparc64/include/cpu.h arch/vax/include/cpu.h arch/x68k/include/cpu.h arch/x86/include/cpu.h -- Jean-Yves Migeon [email protected]
