> > I think for an arch_has_* #ifdef it is normal to make them uppercase.
> > Anyway, those naming details can get upstream feedback when you post.
> 
> OK. ARCH_HAS_SINGLE_STEP_INFO ?

I think the convention is ARCH_HAS_FOO where foo is the exact name sans
"arch_" of the actual function name.  Another approach sometimes used is an
arch_* macro where the generic code can use #ifdef arch_foo #define arch_foo.
Then if an arch wants to use an extern or inline instead of a macro, it can
do "#define arch_foo arch_foo" or "#define arch_foo x86_foo" or suchlike.

Anyway, upstream opinions on these details change with the winds.  Just
pick an existing example of an arch_* hook to use as the model and do
something analogous.  The upstream review will tell you if they want it to
follow some other model instead.  The only thing I'd say is to follow one
of the models where you don't need each arch to define anything new just to
keep compiling.  i.e., some existing cases have added:

        #define arch_foobar(x, y, z)    do { } while (0)

to arch/*/include/asm/foo.h where they have to repeat that en masse in
every arch just to get back to "nothing new".  That seems foolish to me.


Thanks,
Roland

Reply via email to