[Sound-open-firmware] [PATCH] configure.ac: add CONFIG_HOST_PTABLE flag for platforms which need handle it

Liam Girdwood liam.r.girdwood at intel.com
Wed Dec 6 09:57:06 CET 2017


On Wed, 2017-12-06 at 08:43 +0000, Liam Girdwood wrote:
> On Wed, 2017-12-06 at 15:42 +0800, Keyon Jie wrote:
> > 
> > On 2017年12月06日 15:20, Liam Girdwood wrote:
> > > On Wed, 2017-12-06 at 15:05 +0800, Keyon Jie wrote:
> > > > We only need handle host page tables on platforms that we
> > > > program DMA host buffer(addr/size) inside firmware, for
> > > > other platforms, host driver will program these settings
> > > > and won't pass in page tables.
> > > > 
> > > > So here add frag CONFIG_HOST_PTABLE to configure this for
> > > > different platforms, on Baytrail, Cherrytrail, we need
> > > > CONFIG_HOST_PTABLE to be selected.
> > > > 
> > > > Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
> > > > ---
> > > >   configure.ac        | 2 ++
> > > >   src/ipc/intel-ipc.c | 6 ++++++
> > > >   2 files changed, 8 insertions(+)
> > > > 
> > > > diff --git a/configure.ac b/configure.ac
> > > > index 093d0b4..e437d06 100644
> > > > --- a/configure.ac
> > > > +++ b/configure.ac
> > > > @@ -82,6 +82,7 @@ case "$with_platform" in
> > > >   
> > > >   	AC_DEFINE([CONFIG_BAYTRAIL], [1], [Configure for
> > > > Baytrail])
> > > >   	AC_DEFINE([CONFIG_DMA_TRACE], [1], [Configure DMA
> > > > trace])
> > > > +	AC_DEFINE([CONFIG_HOST_PTABLE], [1], [Configure
> > > > handling
> > > > host page table])
> > > >       ;;
> > > >       cherrytrail*)
> > > >   
> > > > @@ -99,6 +100,7 @@ case "$with_platform" in
> > > >   
> > > >   	AC_DEFINE([CONFIG_CHERRYTRAIL], [1], [Configure for
> > > > Cherrytrail])
> > > >   	AC_DEFINE([CONFIG_DMA_TRACE], [1], [Configure DMA
> > > > trace])
> > > > +	AC_DEFINE([CONFIG_HOST_PTABLE], [1], [Configure
> > > > handling
> > > > host page table])
> > > >       ;;
> > > >       *)
> > > >           AC_MSG_ERROR([Host platform not specified])
> > > 
> > > 
> > > Best to do this outside switch() with AM_CONDITIONAL
> > > 
> > > AM_CONDITIONAL(BUILD_BLAH,  test "$FW_NAME" = "byt" -o "$FW_NAME"
> > > =
> > > "apl")
> > 
> > Per my understanding, AM_CONDITIONAL() is used to define the
> > condition 
> > which can be used in Makefile.am, to decide if we need to compile
> > some 
> > files.
> > 
> > But here it is only used as a configure item which the macro will
> > be 
> > used in source code directly, so maybe this is better way?
> > At the same time, with this format, it is very easy to check all 
> > settings/configs for a specific platform -- they are all gathered
> > together.
> > 
> > I do want to use this to remove some unnecessary files for
> > specific 
> > platform, which will lead to small .ri files. e.g. if we don't use 
> > dma-trac which does not apply e.c then don't compile it.
> > 
> 
> ok, so it looks like we need to do both here, but dont do
> AM_CONTIDIONAL inside the switch (confuses automake).

Sorry, I mean for the DMA trace patch, not this one which does not
apply. Can you redo.

Thanks

Liam

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


More information about the Sound-open-firmware mailing list