Re: Question about ARM FASTFPE

From: Masahiro Yamada
Date: Wed Jul 10 2019 - 05:54:49 EST


On Wed, Jul 10, 2019 at 5:23 PM Russell King - ARM Linux admin
<linux@xxxxxxxxxxxxxxx> wrote:
>
> On Wed, Jul 10, 2019 at 01:30:24PM +0900, Masahiro Yamada wrote:
> > Hi.
> >
> > I have a question about the following code
> > in arch/arm/Makefile:
> >
> >
> > # Do we have FASTFPE?
> > FASTFPE :=arch/arm/fastfpe
> > ifeq ($(FASTFPE),$(wildcard $(FASTFPE)))
> > FASTFPE_OBJ :=$(FASTFPE)/
> > endif
> >
> >
> > Since arch/arm/fastfpe does not exist in the upstream tree,
> > I guess this is a hook to compile downstream source code.
> >
> > If a user puts arch/arm/fastfpe/ into their local source tree,
> > Kbuild is supposed to compile the files in it.
> >
> > Is this correct?
> >
> >
> > If so, I am afraid this would not work for O= building.
> >
> > $(wildcard ...) checks if this directory exists in the *objtree*,
> > while scripts/Makefile.build needs to include
> > arch/arm/fastfpe/Makefile from *srctree*.
> >
> > I think the correct code should be like follows:
> >
> > # Do we have FASTFPE?
> > FASTFPE :=arch/arm/fastfpe
> > ifneq ($(wildcard $(srctree)/$(FASTFPE)),)
> > FASTFPE_OBJ :=$(FASTFPE)/
> > endif
> >
> >
> > Having said that, I am not sure this code is worth fixing.
> >
> > This code was added around v2.5.1.9,
>
> ... as a _result_ of a discussion and deciding not to upstream it,
> but to still allow its use. Fastfpe is faster than nwfpe (so has
> a definite advantage for FP intensive applications) but we decided
> we didn't want two FP emulation codes in the kernel. However, if
> someone wants to use it, it has to be built into the kernel, it
> can't be modular.


IMHO, the entry in Makefile and Kconfig should be removed
from upstream, then moved to a part of the fastfpe local patch.



--
Best Regards
Masahiro Yamada