Re: [PATCH 07/12] SFI: add x86 support

Feng Tang
2009-07-10T06:51:19Z

On Fri, 10 Jul 2009 14:37:26 +0800
Ingo Molnar <mingo@elte.hu> wrote:

>
> * Len Brown <lenb@kernel.org> wrote:
>
> > From: Feng Tang <feng.tang@intel.com>
> >
> > arch/x86/kernel/sfi.c serves the dual-purpose of supporting the
> > SFI core with arch specific code, as well as a home for the
> > arch-specific code that uses SFI.
> >
> > Signed-off-by: Feng Tang <feng.tang@intel.com>
> > Signed-off-by: Len Brown <len.brown@intel.com>
> > ---
> > arch/x86/kernel/Makefile | 1 +
> > arch/x86/kernel/sfi.c | 284
> > ++++++++++++++++++++++++++++++++++++++++++++++
> > drivers/sfi/sfi_core.c | 2 +- 3 files changed, 286
> > insertions(+), 1 deletions(-) create mode 100644
> > arch/x86/kernel/sfi.c
> >
> > diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
> > index 6c327b8..e430123 100644
> > --- a/arch/x86/kernel/Makefile
> > +++ b/arch/x86/kernel/Makefile
> > @@ -53,6 +53,7 @@ obj-y += step.o
> > obj-$(CONFIG_STACKTRACE) += stacktrace.o
> > obj-y += cpu/
> > obj-y += acpi/
> > +obj-$(CONFIG_SFI) += sfi.o
> > obj-y += reboot.o
> > obj-$(CONFIG_MCA) += mca_32.o
> > obj-$(CONFIG_X86_MSR) += msr.o

>
> and write those 'any match' lines as:
>
> sfi_table_parse(SFI_SIG_CPUS, SFI_ANY_KEY, sfi_parse_cpus);
>
> which is _far_ more readable and more extensible as well. (it is
> trivial to extend such a design with a new key field - while with
> the current open-coded structure it's far more invasive to do such a
> change.)
>
> Thanks,
>
> Ingo

Thanks again for the great comments to this v2 series, will address them soon.

Thanks,
Feng