cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
To: Dave Jones <davej@redhat.com>
Cc: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>,
	Alexey Starikovskiy <alexey_y_starikovskiy@linux.intel.com>,
	"Brown, Len" <len.brown@intel.com>,
	linux-acpi@vger.kernel.org, cpufreq@lists.linux.org.uk
Subject: Re: acpi-cpufreq oddness
Date: Fri, 18 Aug 2006 13:45:17 -0700	[thread overview]
Message-ID: <20060818134517.A22660@unix-os.sc.intel.com> (raw)
In-Reply-To: <20060818190454.GB18750@redhat.com>; from davej@redhat.com on Fri, Aug 18, 2006 at 03:04:54PM -0400

On Fri, Aug 18, 2006 at 03:04:54PM -0400, Dave Jones wrote:
> On Fri, Aug 18, 2006 at 11:59:26AM -0700, Pallipadi, Venkatesh wrote:
> 
>  > >I don't have handy access to a git tree at the moment, and 
>  > >I've forgotten
>  > >the history of the recent changes here.
>  > >
>  > >Alexey/Len, any ideas whats going on here?
>  > >
>  > >		Dave
>  > >
>  > 
>  > Does the error say "Invalid _PSD data" or something similar. Seems to be
>  > a side-effect of earlier software co-ordination patchset. If this is the
>  > error you are seeing, I will send in a quick patch to fix it.
> 
> No, there's nothing in dmesg.
> This is from the perror() in modprobe printing out the human-readable form
> of -EINVAL
> 
> An strace shows ..
> 
> init_module(0x8287a88, 16244, "")       = -1 EINVAL (Invalid argument)
> write(2, "FATAL: Error inserting acpi_cpuf"..., 139FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.17-1.2571.fc6/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko): Invalid argument
> 
> 
> 		Dave
> 
> 
> -- 
> http://www.codemonkey.org.uk

EINVAL is actually coming from early_init call and the return value of that
call should be ignored. Attached patch resolves the issue.

Thanks,
Venki


Ignore the return value of early_init_acpi(), as it can give false error
messages. If there is something really wrong, then register_driver will fail
cleanly with EINVAL later.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Index: linux-2.6.18-rc4/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
===================================================================
--- linux-2.6.18-rc4.orig/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ linux-2.6.18-rc4/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -567,16 +567,11 @@ static struct cpufreq_driver acpi_cpufre
 static int __init
 acpi_cpufreq_init (void)
 {
-	int                     result = 0;
-
 	dprintk("acpi_cpufreq_init\n");
 
-	result = acpi_cpufreq_early_init_acpi();
+	acpi_cpufreq_early_init_acpi();
 
-	if (!result)
- 		result = cpufreq_register_driver(&acpi_cpufreq_driver);
-	
-	return (result);
+ 	return cpufreq_register_driver(&acpi_cpufreq_driver);
 }
 
 

  reply	other threads:[~2006-08-18 20:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18 18:59 acpi-cpufreq oddness Pallipadi, Venkatesh
2006-08-18 19:04 ` Dave Jones
2006-08-18 20:45   ` Venkatesh Pallipadi [this message]
2006-08-18 21:09     ` Dave Jones
2006-08-18 20:54   ` Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2006-08-18 18:43 Dave Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060818134517.A22660@unix-os.sc.intel.com \
    --to=venkatesh.pallipadi@intel.com \
    --cc=alexey_y_starikovskiy@linux.intel.com \
    --cc=cpufreq@lists.linux.org.uk \
    --cc=davej@redhat.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox