Re: [Powertop] [PATCH] conditionally disable pci support on ARM platforms

Rajagopal Venkat <rajagopal.venkat at linaro.org>
Newsgroups dev.linux.lists.powertop
Message-ID <CA+Z25wVLkMN7soPHqbNBUEDmosZs7r9R=rW=HKrLE8=Z3pVg9Q@mail.gmail.com>
On 23 June 2012 01:31, Arjan van de Ven <arjan(a)linux.intel.com> wrote:

> On 6/22/2012 11:42 AM, Rajagopal Venkat wrote:
> > +case "$host" in
> > +arm*)
> > +     AC_DEFINE([HAVE_NO_PCI],[1],[Define if host platform is ARM])
> > +     ;;
> > +*)
> > +     PKG_CHECK_MODULES([PCIUTILS], [libpci],[],[
> > +             AC_SEARCH_LIBS([pci_get_dev], [pci], [],
> AC_MSG_ERROR([libpci is required but was not found]), [])
> > +     ])
> > +     ;;
> > +esac
> > +
>
> I don't like this part.
>
> if libpci is option, it is optional.
>
> Agree. libpci should be optional.

At present build script is enforcing to install libpci which may not be
necessarily true for all platforms. Solution can be something like,

PKG_CHECK_MODULES([PCIUTILS], [libpci],[],[
        AC_SEARCH_LIBS([pci_get_dev], [pci], [],
[AC_DEFINE([HAVE_NO_PCI],[1],[Define if pci is not supported])], [])
        ])


> being arm or not is completely irrelevant in this regard.
> (and there will undoubtedly ARM systems at some point that will have PCI
> in them)
>
>
>
attachment.html (text/html, 1.5 KB)
<br><br><div class="gmail_quote">On 23 June 2012 01:31, Arjan van de Ven <span dir="ltr">&lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 6/22/2012 11:42 AM, Rajagopal Venkat wrote:<br>
&gt; +case &quot;$host&quot; in<br>
&gt; +arm*)<br>
&gt; +     AC_DEFINE([HAVE_NO_PCI],[1],[Define if host platform is ARM])<br>
&gt; +     ;;<br>
&gt; +*)<br>
&gt; +     PKG_CHECK_MODULES([PCIUTILS], [libpci],[],[<br>
&gt; +             AC_SEARCH_LIBS([pci_get_dev], [pci], [], AC_MSG_ERROR([libpci is required but was not found]), [])<br>
&gt; +     ])<br>
&gt; +     ;;<br>
&gt; +esac<br>
&gt; +<br>
<br>
</div>I don&#39;t like this part.<br>
<br>
if libpci is option, it is optional.<br>
<br></blockquote><div>Agree. libpci should be optional. <br><br>At present build script is enforcing to install libpci which may not be necessarily true for all platforms. Solution can be something like,<br> <br>PKG_CHECK_MODULES([PCIUTILS], [libpci],[],[<br>
        AC_SEARCH_LIBS([pci_get_dev], [pci], [], [AC_DEFINE([HAVE_NO_PCI],[1],[Define if pci is not supported])], [])<br>        ])<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

being arm or not is completely irrelevant in this regard.<br>
(and there will undoubtedly ARM systems at some point that will have PCI<br>
in them)<br>
<br>
<br>
</blockquote></div><br>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.