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"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></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> > +case "$host" in<br> > +arm*)<br> > + AC_DEFINE([HAVE_NO_PCI],[1],[Define if host platform is ARM])<br> > + ;;<br> > +*)<br> > + PKG_CHECK_MODULES([PCIUTILS], [libpci],[],[<br> > + AC_SEARCH_LIBS([pci_get_dev], [pci], [], AC_MSG_ERROR([libpci is required but was not found]), [])<br> > + ])<br> > + ;;<br> > +esac<br> > +<br> <br> </div>I don'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>