Skip to contentSkip to conversation

cpu: Fix abstract_cpu::calculate_freq

PATCH In review Namhyung Kim 3 participants 4 messages Sep 20, 2012 – Oct 15, 2012

lore
Share & tools
lore

Namhyung Kim

author
#0 lore raw

PATCH 1/1 cpu: Fix abstract_cpu::calculate_freq

The 'freq' should have the maximun frequency value of all children. But the current code does not update the freq properly. Fix it.

Signed-off-by Namhyung Kim <namhyung(a)gmail.com>
---
 src/cpu/abstract_cpu.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/cpu/abstract_cpu.cpp +1 -1
index 386d981..de55cf2 100644
@@ -341,7 +341,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
 				is_idle = false;
 			}
 			if (f > freq)
-				f = freq;
+				freq = f;
 		}
 
 	current_frequency = freq;
Signature · 1 line
1.7.9.2
#1 lore raw
Quoted 4 lines · Namhyung Kim

The 'freq' should have the maximun frequency value of all children. But the current code does not update the freq properly. Fix it.

Signed-off-by Namhyung Kim <namhyung(a)gmail.com>

looks good to me, thanks.

	-ss
Quoted 17 lines
---
 src/cpu/abstract_cpu.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/cpu/abstract_cpu.cpp +1 -1
index 386d981..de55cf2 100644
@@ -341,7 +341,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
 				is_idle = false;
 			}
 			if (f > freq)
-				f = freq;
+				freq = f;
 		}
 
 	current_frequency = freq;
author
#2 lore raw

2012-09-20 (목), 17:46 +0300, Sergey Senozhatsky:

Quoted 9 lines · Namhyung Kim
Quoted 4 lines

The 'freq' should have the maximun frequency value of all children. But the current code does not update the freq properly. Fix it.

Signed-off-by Namhyung Kim <namhyung(a)gmail.com>

looks good to me, thanks.

	-ss

Ping.

It seems that it's not merged yet. Chris, could you please merge this?

Thanks,
Namhyung

Quoted 18 lines
Quoted 18 lines
---
 src/cpu/abstract_cpu.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/cpu/abstract_cpu.cpp +1 -1
index 386d981..de55cf2 100644
@@ -341,7 +341,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
 				is_idle = false;
 			}
 			if (f > freq)
-				f = freq;
+				freq = f;
 		}
 
 	current_frequency = freq;
Signature · 2 lines
Regards,
Namhyung Kim
#3 lore raw
In reply to Namhyung Kim
Quoted 13 lines · Namhyung Kim

The 'freq' should have the maximun frequency value of all children. But the current code does not update the freq properly. Fix it.

Signed-off-by Namhyung Kim <namhyung(a)gmail.com>
---
  src/cpu/abstract_cpu.cpp |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
src/cpu/abstract_cpu.cpp +0 -0
index 386d981..de55cf2 100644

src/cpu/abstract_cpu.cpp void abstract_cpu::calculate_freq(uint64_t time) · line 347

Quoted 8 lines
src/cpu/abstract_cpu.cpp +1 -1
@@ -341,7 +341,7 @@ void abstract_cpu::calculate_freq(uint64_t time)
  				is_idle = false;
  			}
  			if (f > freq)
-				f = freq;
+				freq = f;
  		}
 
  	current_frequency = freq;

Your patch has been merged
Thank You
-C