From: Michael Hanselmann <linux-kernel@hansmi.ch>
To: Andrew Morton <akpm@osdl.org>
Cc: linuxppc-dev@ozlabs.org, johannes@sipsolutions.net,
aris@valeta.org, linux-kernel@killerfox.forkbomb.ch
Subject: Re: powermac: More powermac backlight fixes
Date: Tue, 25 Jul 2006 20:44:06 +0200 [thread overview]
Message-ID: <20060725184406.GA12226@hansmi.ch> (raw)
In-Reply-To: <20060724200315.d3c80ed0.akpm@osdl.org>
Hello Andrew
On Mon, Jul 24, 2006 at 08:03:15PM -0700, Andrew Morton wrote:
> I see schedule_work()s in there, but no flush_scheduled_work()s or anything
> like that. Generally, this means there are races against rmmod, close(),
> etc.
I'll check that. Another patch is in the work already.
> > +void pmac_backlight_disable()
> > +{
> > + atomic_inc(&kernel_backlight_disabled);
> > +}
> > +
> > +void pmac_backlight_enable()
> > +{
> > + atomic_dec(&kernel_backlight_disabled);
> > +}
> > +
> So if userspace calls ioctl(PMU_IOC_GRAB_BACKLIGHT) eleven times, eleven
> enables are needed? (Actually, eleven open()/close() sequences, I think).
> Methinks you wanted just
> kernel_backlight_disabled = 1;
> ?
Aristeu already asked me that, and no, the disabling is meant to be
recursive. The old code did something like "spin_lock(...); disable++;
spin_unlock(...);". It then checked for "if (disable) return;". My code
basically moves the code from the via-pmu driver and removes the
spinlocks.
Thanks,
Michael
next prev parent reply other threads:[~2006-07-25 18:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-15 13:09 powermac: More powermac backlight fixes Michael Hanselmann
2006-07-25 3:03 ` Andrew Morton
2006-07-25 18:44 ` Michael Hanselmann [this message]
2006-07-25 20:06 ` Michael Hanselmann
2006-07-25 21:49 ` Benjamin Herrenschmidt
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=20060725184406.GA12226@hansmi.ch \
--to=linux-kernel@hansmi.ch \
--cc=akpm@osdl.org \
--cc=aris@valeta.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@killerfox.forkbomb.ch \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).