1*1a59d1b8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 27fe2f639SDominik Brodowski /* cpufreq-bench CPUFreq microbenchmark 37fe2f639SDominik Brodowski * 47fe2f639SDominik Brodowski * Copyright (C) 2008 Christian Kornacker <ckornacker@suse.de> 57fe2f639SDominik Brodowski */ 67fe2f639SDominik Brodowski 77fe2f639SDominik Brodowski /* load loop, this schould take about 1 to 2ms to complete */ 87fe2f639SDominik Brodowski #define ROUNDS(x) {unsigned int rcnt; \ 97fe2f639SDominik Brodowski for (rcnt = 0; rcnt < x*1000; rcnt++) { \ 1002af3cb5SDominik Brodowski (void)(((int)(pow(rcnt, rcnt) * \ 1102af3cb5SDominik Brodowski sqrt(rcnt*7230970)) ^ 7230716) ^ \ 1202af3cb5SDominik Brodowski (int)atan2(rcnt, rcnt)); \ 137fe2f639SDominik Brodowski } } \ 147fe2f639SDominik Brodowski 157fe2f639SDominik Brodowski 167fe2f639SDominik Brodowski void start_benchmark(struct config *config); 17