From: Alexander Gran <alex@zodiac.dnsalias.org>
To: john stultz <johnstul@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.16-rc6-mm1 : Setting clocksource results in error
Date: Wed, 15 Mar 2006 11:53:14 +0100 [thread overview]
Message-ID: <200603151153.18873@zodiac.zodiac.dnsalias.org> (raw)
In-Reply-To: <1142363464.8797.10.camel@cog.beaverton.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2137 bytes --]
Hi,
applied patch. Didn't work?! Same error as before..
regards
Alex
Am Dienstag, 14. März 2006 20:11 schrieb john stultz:
> On Tue, 2006-03-14 at 09:35 +0100, Alexander Gran wrote:
> > I'm still fiddeling with my way to slow netbeans debugger. I just tried
> > to change the clocksource. That resulted in an error, but apparently
> > worked. Is that expected behaviour:
> > root@t40:/sys/devices/system/clocksource/clocksource0# l
> > insgesamt 0
> > -rw------- 1 root root 4,0K 2006-03-14 09:31 available_clocksource
> > -rw------- 1 root root 0 2006-03-14 09:31 current_clocksource
> > root@t40:/sys/devices/system/clocksource/clocksource0# cat
> > available_clocksource
> > acpi_pm jiffies tsc pit
> > root@t40:/sys/devices/system/clocksource/clocksource0# echo acpi_pm >
> > current_clocksource
> > -su: echo: write error: Das Argument ist ungültig
> > root@t40:/sys/devices/system/clocksource/clocksource0# cat
> > current_clocksource acpi_pm
>
> Huh. Interesting.
>
> Oh! I see it, we're stripping the \n from the name and returning a count
> value one less then what was given.
>
> You can verify it by noticing "echo -n tsc > current_clocksource" does
> not give the error.
>
> This small fix should resolve it.
>
> Thanks for the bug report!
> -john
>
> Signed-off-by: John Stultz <johnstul@us.ibm.com>
>
> diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
> index d2ce2c3..fe22f64 100644
> --- a/kernel/time/clocksource.c
> +++ b/kernel/time/clocksource.c
> @@ -220,6 +220,7 @@ sysfs_show_current_clocksources(struct s
> static ssize_t sysfs_override_clocksource(struct sys_device *dev,
> const char *buf, size_t count)
> {
> + size_t ret = count;
> /* strings from sysfs write are not 0 terminated! */
> if (count >= sizeof(override_name))
> return -EINVAL;
> @@ -241,7 +242,7 @@ static ssize_t sysfs_override_clocksourc
>
> spin_unlock_irq(&clocksource_lock);
>
> - return count;
> + return ret;
> }
>
> /**
--
Encrypted Mails welcome.
PGP-Key at http://zodiac.dnsalias.org/misc/pgpkey.asc | Key-ID: 0x6D7DD291
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
next prev parent reply other threads:[~2006-03-15 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-14 8:35 Alexander Gran
2006-03-14 19:11 ` john stultz
2006-03-15 10:53 ` Alexander Gran [this message]
2006-03-15 17:16 ` john stultz
2006-03-15 17:28 ` Alexander Gran
2006-03-15 17:32 ` john stultz
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=200603151153.18873@zodiac.zodiac.dnsalias.org \
--to=alex@zodiac.dnsalias.org \
--cc=akpm@osdl.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®