All of lore.kernel.org
 help / color / mirror / Atom feed
* [Powertop] [PATCH] Add a more informative error message about MSR not found
@ 2013-02-21  9:27 jani.nikula
  0 siblings, 0 replies; 4+ messages in thread
From: jani.nikula @ 2013-02-21  9:27 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 902 bytes --]

From: Jani Nikula <jani.nikula(a)intel.com>

Suggest enabling CONFIG_X86_MSR. Add \n at the end of the error message.

Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>

---

Note: This breaks translations looking for msgid "msr reg not found". I'm
unsure how you want this kind of changes handled.
---
 src/cpu/intel_cpus.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
index 2b78d31..30c311f 100644
--- a/src/cpu/intel_cpus.cpp
+++ b/src/cpu/intel_cpus.cpp
@@ -58,7 +58,7 @@ static uint64_t get_msr(int cpu, uint64_t offset)
 		fd = sprintf(msr_path, "/dev/msr%d", cpu);
 
 		if (access(msr_path, R_OK) != 0){
-			fprintf(stderr, _("msr reg not found"));
+			fprintf(stderr, _("Model-specific registers (MSR) not found (try enabling CONFIG_X86_MSR).\n"));
 			exit(-2);
 		}
 	}
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Powertop] [PATCH] Add a more informative error message about MSR not found
@ 2013-02-21  9:37 Sergey Senozhatsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2013-02-21  9:37 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]

On (02/21/13 11:27), jani.nikula(a)linux.intel.com wrote:
> From: Jani Nikula <jani.nikula(a)intel.com>
> 
> Suggest enabling CONFIG_X86_MSR. Add \n at the end of the error message.
> 
> Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>
> 
> ---
> 
> Note: This breaks translations looking for msgid "msr reg not found". I'm
> unsure how you want this kind of changes handled.
> ---
>  src/cpu/intel_cpus.cpp |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
> index 2b78d31..30c311f 100644
> --- a/src/cpu/intel_cpus.cpp
> +++ b/src/cpu/intel_cpus.cpp
> @@ -58,7 +58,7 @@ static uint64_t get_msr(int cpu, uint64_t offset)
>  		fd = sprintf(msr_path, "/dev/msr%d", cpu);
>  
>  		if (access(msr_path, R_OK) != 0){
> -			fprintf(stderr, _("msr reg not found"));
> +			fprintf(stderr, _("Model-specific registers (MSR) not found (try enabling CONFIG_X86_MSR).\n"));
>  			exit(-2);
>  		}
>  	}
> -- 

I think we're beyond the `string freeze' date, most likely it will not get into upcoming release.


	-ss


> 1.7.9.5
> 
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Powertop] [PATCH] Add a more informative error message about MSR not found
@ 2013-02-21 11:17 Jani Nikula
  0 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2013-02-21 11:17 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 708 bytes --]

On Thu, 21 Feb 2013, Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com> wrote:
> I think we're beyond the `string freeze' date, most likely it will not
> get into upcoming release.

I'm ignorant about powertop release practices, and don't mind whether it
makes the next release or not; hopefully some release after that though.

I'm just trying to give a hint to the next developer hitting the issue,
so he won't have to first grep the powertop sources to figure out what
the error really is about, and then the kernel sources to figure out
who's responsible for creating /dev/cpu/%d/msr, and what config knob to
turn to enable that... The README patch I sent of course helps too.

BR,
Jani.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Powertop] [PATCH] Add a more informative error message about MSR not found
@ 2013-02-21 12:52 Sergey Senozhatsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2013-02-21 12:52 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

On (02/21/13 13:17), Jani Nikula wrote:
> On Thu, 21 Feb 2013, Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com> wrote:
> > I think we're beyond the `string freeze' date, most likely it will not
> > get into upcoming release.
> 
> I'm ignorant about powertop release practices, and don't mind whether it
> makes the next release or not; hopefully some release after that though.
> 
> I'm just trying to give a hint to the next developer hitting the issue,
> so he won't have to first grep the powertop sources to figure out what
> the error really is about, and then the kernel sources to figure out
> who's responsible for creating /dev/cpu/%d/msr, and what config knob to
> turn to enable that... The README patch I sent of course helps too.
>

sure, thanks.

	-ss
 
> BR,
> Jani.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-21 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-21 11:17 [Powertop] [PATCH] Add a more informative error message about MSR not found Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2013-02-21 12:52 Sergey Senozhatsky
2013-02-21  9:37 Sergey Senozhatsky
2013-02-21  9:27 jani.nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.