Re: [Powertop][PATCH v3] conditionally disable pci if not supported

2012-07-12 Thread Rajagopal Venkat
On 13 July 2012 11:03, Ricardo Salveti  wrote:

> On Fri, Jul 13, 2012 at 2:02 AM, Rajagopal Venkat
>  wrote:
> > Can someone consider this patch for merge?
>
> As we will have libpci available at most distros by default, isn't
> there a way of doing run-time detection instead of disabling it at
> build time?
>

This patch disables powertop PCI support only when libpci is not
available on a system. Nothing specific to ARM platforms.

I don't think it can be done at run-time. Without this patch if libpci
is not available, powertop compilation itself will fail.


> This is just because we'll be getting more and more ARM boards which
> have PCI-e as well, so we'll need to handle systems with and without
> any PCI available.
>
>
Cheers,
> --
> Ricardo Salveti de Araujo
>
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [Powertop][PATCH v3] conditionally disable pci if not supported

2012-07-12 Thread Ricardo Salveti
On Fri, Jul 13, 2012 at 2:02 AM, Rajagopal Venkat
 wrote:
> Can someone consider this patch for merge?

As we will have libpci available at most distros by default, isn't
there a way of doing run-time detection instead of disabling it at
build time?

This is just because we'll be getting more and more ARM boards which
have PCI-e as well, so we'll need to handle systems with and without
any PCI available.

Cheers,
-- 
Ricardo Salveti de Araujo

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [Powertop][PATCH] fix cpuidle state name parsing

2012-07-12 Thread Rajagopal Venkat
Can someone consider this patch for merge?

On 23 June 2012 00:08, Rajagopal Venkat  wrote:

> parse cpuidle C state based on sysfs file entry(stateX)
> instead of state name/description
>
> Signed-off-by: Rajagopal Venkat 
> ---
>  src/cpu/abstract_cpu.cpp |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp
> index cd4eba0..72969fc 100644
> --- a/src/cpu/abstract_cpu.cpp
> +++ b/src/cpu/abstract_cpu.cpp
> @@ -147,7 +147,7 @@ void abstract_cpu::insert_cstate(const char
> *linux_name, const char *human_name,
> strcpy(state->linux_name, linux_name);
> strcpy(state->human_name, human_name);
>
> -   c = human_name;
> +   c = linux_name;
> while (*c) {
> if (strcmp(linux_name, "active")==0) {
> state->line_level = LEVEL_C0;
> --
> 1.7.9.5
>
>
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [Powertop][PATCH v3] conditionally disable pci if not supported

2012-07-12 Thread Rajagopal Venkat
Can someone consider this patch for merge?

On 25 June 2012 22:44, Rajagopal Venkat  wrote:

> disable pci if not supported by host platform. When
> libpci is not found, define a macro which will be
> used for conditional compilation.
>
> Signed-off-by: Rajagopal Venkat 
> ---
>  configure.ac |5 +++--
>  src/lib.cpp  |   20 ++--
>  src/lib.h|5 +
>  3 files changed, 26 insertions(+), 4 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 4da4eea..3cbc7b0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -48,8 +48,9 @@ AC_CHECK_FUNCS([fdatasync getpagesize gettimeofday
> memmove memset mkdir munmap p
>  AC_SEARCH_LIBS([delwin], [ncursesw ncurses], [], AC_MSG_ERROR([ncurses is
> required but was not found]), [])
>
>  PKG_CHECK_MODULES([PCIUTILS], [libpci],[],[
> -   AC_SEARCH_LIBS([pci_get_dev], [pci], [], AC_MSG_ERROR([libpci is
> required but was not found]), [])
> -])
> +   AC_SEARCH_LIBS([pci_get_dev], [pci], [],
> AC_DEFINE([HAVE_NO_PCI],[1],[Define if pci is not supported]), [])
> +])
> +
>  PKG_CHECK_MODULES([LIBZ], [zlib],[],[
> AC_SEARCH_LIBS([deflate], [z], [], AC_MSG_ERROR([zlib is required
> but was not found]), [])
>  ])
> diff --git a/src/lib.cpp b/src/lib.cpp
> index 0f87e48..77e49a2 100644
> --- a/src/lib.cpp
> +++ b/src/lib.cpp
> @@ -35,11 +35,13 @@
>  #include 
>  #include 
>
> +#include "lib.h"
> +
> +#ifndef HAVE_NO_PCI
>  extern "C" {
>  #include 
>  }
> -
> -#include "lib.h"
> +#endif
>
>  #include 
>  #include 
> @@ -266,6 +268,7 @@ void format_watts(double W, char *buffer, unsigned int
> len)
>  }
>
>
> +#ifndef HAVE_NO_PCI
>  static struct pci_access *pci_access;
>
>  char *pci_id_to_name(uint16_t vendor, uint16_t device, char *buffer, int
> len)
> @@ -290,6 +293,19 @@ void end_pci_access(void)
> pci_free_name_list(pci_access);
>  }
>
> +#else
> +
> +char *pci_id_to_name(uint16_t vendor, uint16_t device, char *buffer, int
> len)
> +{
> +   return NULL;
> +}
> +
> +void end_pci_access(void)
> +{
> +}
> +
> +#endif /* HAVE_NO_PCI */
> +
>  int utf_ok = -1;
>
>
> diff --git a/src/lib.h b/src/lib.h
> index 588c023..7093b7f 100644
> --- a/src/lib.h
> +++ b/src/lib.h
> @@ -30,6 +30,11 @@
>  #endif
>  #include 
>
> +/* Include only for Automake builds */
> +#ifdef HAVE_CONFIG_H
> +#include "config.h"
> +#endif
> +
>  #ifndef DISABLE_I18N
>  #define _(STRING)gettext(STRING)
>  #else
> --
> 1.7.9.5
>
>
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH] pm-qa : Fix global variable with sigatomic_t

2012-07-12 Thread Hongbo Zhang
Merged.


On 12 July 2012 16:52, Daniel Lezcano  wrote:

> Signed-off-by: Daniel Lezcano 
> ---
>  utils/cpucycle.c |8 
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/utils/cpucycle.c b/utils/cpucycle.c
> index 5ad36bc..f896815 100644
> --- a/utils/cpucycle.c
> +++ b/utils/cpucycle.c
> @@ -35,11 +35,11 @@
>  #include 
>  #include 
>
> -static bool intr;
> +volatile sig_atomic_t intr = 0;
>
>  void sigalarm(int sig)
>  {
> -   intr = true;
> +   intr = 1;
>  }
>
>  int main(int argc, char *argv[])
> @@ -97,10 +97,10 @@ int main(int argc, char *argv[])
>
> /* warmup */
> alarm(1);
> -   for (counter = 0, intr = false; !intr ; counter++);
> +   for (counter = 0, intr = 0; !intr ; counter++);
>
> alarm(1);
> -   for (counter = 0, intr = false; !intr ; counter++);
> +   for (counter = 0, intr = 0; !intr ; counter++);
>
> printf("%ld\n", counter);
>
> --
> 1.7.5.4
>
>
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Using ARM Energy probe and PandaBoard

2012-07-12 Thread Paul Larson
I've been looking a bit at how to get this running under DS-5, but I
haven't found much documentation.  Best thing I've found so far has been
http://www.youtube.com/watch?v=aDStdtopy_g
I tried going through this, and even found caiman on my box at
/usr/local/DS-5/bin/caiman
However, when I try to replicate what they did here, I get a trace ok, but
no power data in my graph.  You may want to give it a try though, maybe it
will work for you.

On Thu, Jul 12, 2012 at 11:51 AM, Dechesne, Nicolas wrote:

> hi there,
>
> at HK connect i learned about the ARM energy probe (
> http://www.arm.com/about/newsroom/arm-enables-energy-aware-coding-with-the-arm-energy-probe-and-ds-5-toolchain.php).
> Since that we ordered some probes, and I was wondering if someone is
> working in linaro on enabling power measurements? I would be interested in
> DS5 or even command line tools to retrieve information, ideally from
> Panda...
>
> thx
>
> ___
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>
>
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Using ARM Energy probe and PandaBoard

2012-07-12 Thread Dechesne, Nicolas
hi there,

at HK connect i learned about the ARM energy probe (
http://www.arm.com/about/newsroom/arm-enables-energy-aware-coding-with-the-arm-energy-probe-and-ds-5-toolchain.php).
Since that we ordered some probes, and I was wondering if someone is
working in linaro on enabling power measurements? I would be interested in
DS5 or even command line tools to retrieve information, ideally from
Panda...

thx
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Build failure for Omap

2012-07-12 Thread Scott Bambrough

On 12-07-12 11:36 AM, Viresh Kumar wrote:

On 12 July 2012 16:19, Andrey Konovalov mailto:andrey.konova...@linaro.org>> wrote:

make ARCH=arm O=../panda omap2plus_defconfig (After this, OMAP 2/3/4
none is selected in .config)
make ARCH=arm O=../panda uImage

LD  init/built-in.o
arch/arm/mach-vexpress/built-__in.o: In function
`v2m_dt_timer_init':
/root/viresh/work/linux/__kernel/arch/arm/mach-vexpress/__v2m.c:663:
undefined reference to `arch_timer_broken_for_sched___clock'
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2


Something is wrong: why vexpress??


Yes, you are right.
I am looking at this now.


Broken probably by:

  commit 9c118124d1c75f06b64a756be579d3b4cf2c99ec
Author: Arnd Bergmann mailto:a...@arndb.de>>
Date:   Tue May 8 15:17:25 2012 +

 ARM: initial multiplatform support
 This lets us build a multiplatform kernel for experimental purposes.
 However, it will not be useful for any real work, because it relies
 on a number of useful things to be disabled for now:
-config ARCH_OMAP
+config ARCH_CHOICE_OMAP
 bool "TI OMAP"
-   select HAVE_CLK
-   select ARCH_REQUIRE_GPIOLIB
-   select ARCH_HAS_CPUFREQ
-   select CLKSRC_MMIO
-   select GENERIC_CLOCKEVENTS
-   select ARCH_HAS_HOLES_MEMORYMODEL
+   select ARCH_OMAP
 select MAY_HAVE_SPARSE_IRQ
 help
   Support for TI's OMAP platform (OMAP1/2/3/4).
@@ -982,6 +963,51 @@ config ARCH_ZYNQ
   Support for Xilinx Zynq ARM Cortex A9 Platform
  endchoice
+config ARCH_OMAP
+   bool
+   select HAVE_CLK
+   select ARCH_REQUIRE_GPIOLIB
+   select ARCH_HAS_CPUFREQ
+   select CLKSRC_MMIO
+   select GENERIC_CLOCKEVENTS
+   select ARCH_HAS_HOLES_MEMORYMODEL
+   select MAY_HAVE_SPARSE_IRQ
+


This patch must have updated all defconfigs too, which probably now
require to have
CONFIG_ARCH_CHOICE_OMAP?

--
viresh


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev



Try the omap4plus_defconfig.

Scott

--
Scott Bambrough
Technical Director, Member Services
Linaro Ltd.



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Build failure for Omap

2012-07-12 Thread Viresh Kumar
On 12 July 2012 16:19, Andrey Konovalov  wrote:

> make ARCH=arm O=../panda omap2plus_defconfig (After this, OMAP 2/3/4
>> none is selected in .config)
>> make ARCH=arm O=../panda uImage
>>
>>LD  init/built-in.o
>> arch/arm/mach-vexpress/built-**in.o: In function `v2m_dt_timer_init':
>> /root/viresh/work/linux/**kernel/arch/arm/mach-vexpress/**v2m.c:663:
>> undefined reference to `arch_timer_broken_for_sched_**clock'
>> make[1]: *** [vmlinux] Error 1
>> make: *** [sub-make] Error 2
>>
>>
>> Something is wrong: why vexpress??
>>
>
> Yes, you are right.
> I am looking at this now.


Broken probably by:

 commit 9c118124d1c75f06b64a756be579d3b4cf2c99ec
Author: Arnd Bergmann 
Date:   Tue May 8 15:17:25 2012 +

ARM: initial multiplatform support

This lets us build a multiplatform kernel for experimental purposes.
However, it will not be useful for any real work, because it relies
on a number of useful things to be disabled for now:

-config ARCH_OMAP
+config ARCH_CHOICE_OMAP
bool "TI OMAP"
-   select HAVE_CLK
-   select ARCH_REQUIRE_GPIOLIB
-   select ARCH_HAS_CPUFREQ
-   select CLKSRC_MMIO
-   select GENERIC_CLOCKEVENTS
-   select ARCH_HAS_HOLES_MEMORYMODEL
+   select ARCH_OMAP
select MAY_HAVE_SPARSE_IRQ
help
  Support for TI's OMAP platform (OMAP1/2/3/4).
@@ -982,6 +963,51 @@ config ARCH_ZYNQ
  Support for Xilinx Zynq ARM Cortex A9 Platform
 endchoice

+config ARCH_OMAP
+   bool
+   select HAVE_CLK
+   select ARCH_REQUIRE_GPIOLIB
+   select ARCH_HAS_CPUFREQ
+   select CLKSRC_MMIO
+   select GENERIC_CLOCKEVENTS
+   select ARCH_HAS_HOLES_MEMORYMODEL
+   select MAY_HAVE_SPARSE_IRQ
+


This patch must have updated all defconfigs too, which probably now require
to have
CONFIG_ARCH_CHOICE_OMAP?

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Build failure for Omap

2012-07-12 Thread Andrey Konovalov

On 07/12/2012 07:18 PM, Viresh Kumar wrote:

Hi,

Sorry if I am missing something very obvious, I am building OMAP for the
first time.

I fetched latest kernel from:

http://git.linaro.org/gitweb?p=kernel/linux-linaro-tracking.git;a=shortlog;h=refs/heads/linux-linaro

tried to do following:

make ARCH=arm O=../panda omap2plus_defconfig (After this, OMAP 2/3/4
none is selected in .config)
make ARCH=arm O=../panda uImage

   LD  drivers/usb/built-in.o
   LD  drivers/video/console/built-in.o
   LD  drivers/video/built-in.o
   LD  drivers/built-in.o
   LINKvmlinux
   LD  vmlinux.o
   MODPOST vmlinux.o
   GEN .version
   CHK include/generated/compile.h
   UPD include/generated/compile.h
   CC  init/version.o
   LD  init/built-in.o
arch/arm/mach-vexpress/built-in.o: In function `v2m_dt_timer_init':
/root/viresh/work/linux/kernel/arch/arm/mach-vexpress/v2m.c:663:
undefined reference to `arch_timer_broken_for_sched_clock'
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2


Something is wrong: why vexpress??


Yes, you are right.
I am looking at this now.

Thanks,
Andrey



--
viresh




___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Build failure for Omap

2012-07-12 Thread Viresh Kumar
Hi,

Sorry if I am missing something very obvious, I am building OMAP for the
first time.

I fetched latest kernel from:

http://git.linaro.org/gitweb?p=kernel/linux-linaro-tracking.git;a=shortlog;h=refs/heads/linux-linaro

tried to do following:

make ARCH=arm O=../panda omap2plus_defconfig (After this, OMAP 2/3/4 none
is selected in .config)
make ARCH=arm O=../panda uImage

  LD  drivers/usb/built-in.o
  LD  drivers/video/console/built-in.o
  LD  drivers/video/built-in.o
  LD  drivers/built-in.o
  LINKvmlinux
  LD  vmlinux.o
  MODPOST vmlinux.o
  GEN .version
  CHK include/generated/compile.h
  UPD include/generated/compile.h
  CC  init/version.o
  LD  init/built-in.o
arch/arm/mach-vexpress/built-in.o: In function `v2m_dt_timer_init':
/root/viresh/work/linux/kernel/arch/arm/mach-vexpress/v2m.c:663: undefined
reference to `arch_timer_broken_for_sched_clock'
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2


Something is wrong: why vexpress??

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH] pm-qa : Fix global variable with sigatomic_t

2012-07-12 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano 
---
 utils/cpucycle.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/utils/cpucycle.c b/utils/cpucycle.c
index 5ad36bc..f896815 100644
--- a/utils/cpucycle.c
+++ b/utils/cpucycle.c
@@ -35,11 +35,11 @@
 #include 
 #include 
 
-static bool intr;
+volatile sig_atomic_t intr = 0;
 
 void sigalarm(int sig)
 {
-   intr = true;
+   intr = 1;
 }
 
 int main(int argc, char *argv[])
@@ -97,10 +97,10 @@ int main(int argc, char *argv[])
 
/* warmup */
alarm(1);
-   for (counter = 0, intr = false; !intr ; counter++);
+   for (counter = 0, intr = 0; !intr ; counter++);
 
alarm(1);
-   for (counter = 0, intr = false; !intr ; counter++);
+   for (counter = 0, intr = 0; !intr ; counter++);
 
printf("%ld\n", counter);
 
-- 
1.7.5.4


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev