Commit graph

6 commits

Author SHA1 Message Date
Shuah Khan 4ca90c21b2 selftests: intel_pstate: add .gitignore
Add .gitignore for generated files.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2017-06-30 10:06:24 -06:00
SeongJae Park dc816e5d84 selftest/intel_pstate/aperf: Use LDLIBS instead of LDFLAGS
Build of aperf fails as below:
```
gcc  -Wall -D_GNU_SOURCE   -lm  aperf.c  -o /tools/testing/selftests/intel_pstate/aperf
/tmp/ccKf3GF6.o: In function `main':
aperf.c:(.text+0x278): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
```

The faulure occurs because -lm was defined as LDFLAGS and implicit rule
of make places LDFLAGS before source file.  This commit fixes the
problem by using LDLIBS instead of LDFLAGS.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2017-06-23 13:35:08 -06:00
Stafford Horne 29fa1d436e selftests/intel_pstate: Update makefile to match new style
Recent changes from Bamvor (88baa78d1f) have standardized the
variable names like TEST_GEN_FILES and removed the need for make targets
all and clean.

These changes bring the intel_pstate test inline with those changes.

Cc: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2017-01-19 10:30:40 -07:00
Stafford Horne aff985fd07 selftests/intel_pstate: Fix warning on loop index overflow
The build was showing the warning:
 aperf.c:60:27: warning: iteration 2147483647 invokes undefined behavior
 [-Waggressive-loop-optimizations]
  for (i=0; i<0x8fffffff; i++) {

This change sets i, cpu and fd to unsigned int as they should not need
to be signed.

Cc: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2017-01-19 10:30:34 -07:00
Muhammad Falak R Wani 6eab37daf0 tools: testing: define the _GNU_SOURCE macro
Add the macro _GNU_SOURCE, to fix CPU_ZERO and CPU_SET undefined compile
errors.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2016-05-16 09:06:17 -06:00
Prarit Bhargava ed2d26d7cb tools, testing, add test for intel_pstate driver
This test used the cpupower utility to set the cpu frequency from the
maximum turbo value to the minimum supported value in steps of 100 MHz.

The results are displayed in a table which indicate the "Target" state,
or the requested frequency in MHz, the Actual frequency, as read from
/proc/cpuinfo, the difference between the Target and Actual frequencies,
and the value of MSR 0x199 (MSR_IA32_PERF_CTL) which indicates what
pstate the cpu is in, and the value of
/sys/devices/system/cpu/intel_pstate/max_perf_pct X maximum turbo state

Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: linux-api@vger.kernel.org
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2015-11-23 13:30:59 -07:00