public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: suspend.c vs driver-model.txt
@ 2002-07-30  0:25 Grover, Andrew
  0 siblings, 0 replies; 57+ messages in thread
From: Grover, Andrew @ 2002-07-30  0:25 UTC (permalink / raw)
  To: 'Patrick Mochel'; +Cc: acpi-devel-pyega4qmqnRoyOMFzWx49A

> From: Patrick Mochel [mailto:mochel-3NddpPZAyC0@public.gmane.org] 
> > People interested in other arches need to step up and make 
> sure their
> > platform's requirements are met. Failing that, IA32 is the 
> HW that most
> > people have so that's what is going to be mde to work 
> first. Linux itself
> > was not a cross-platform OS from day one -- the 
> generalization came later.
> 
> I love these arguments of yours; I get a big kick out of 
> them. Like your 
> defense of "premature optimization is the root of all evil." 
> Sure it is, 
> but that's no excuse to write inefficient algorithms. 

It is an excuse to use simple algorithms until they are proven to be
inefficient, and only then replace them with something faster and more
complex.

But, I think you meant to target my *other* favorite software aphorism: "bad
code is better than no code"...yes? :) I still think that Linux's birth is a
great example of this, and how software can grow, evolve, and improve over
time.

> Just like it's no excuse to create a general scheme based on 
> one platform. 
> c.f. the original Linux Driver Model that you guys posted one 
> year ago. 
> That is the epitome of my argument. I'm not worked up about 
> it, but you 
> guys have done that kinda stuff more than you should, and I'm 
> glad you're 
> in the business of designing general APIs any more. 

(I assume there should be a "not" in there)

Well, the idea was that maybe it was not quite generic enough, but then it
would evolve into something that could work for all platforms, as people who
cared about other arches had their say. Didn't work out that way, I guess.

Considering that a year ago was pre-device tree, I think us taking a stab at
an interface was not unreasonable.

> driverfs was never about PM. It was about exposing kernel 
> infrastructure 
> to userspace. I gave you the device tree and power management 
> hooks first. 
> I apologize that I have not had a chance to follow through 
> and actually 
> implement the hooks for the drivers, but there turned out to 
> be a lot more 
> cool stuff to play with.. :)

OK, that's true. The device tree is the crucial thing for PM.

Regards -- Andy

http://www.joelonsoftware.com/articles/fog0000000017.html
http://www.joelonsoftware.com/articles/fog0000000339.html


-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

^ permalink raw reply	[flat|nested] 57+ messages in thread
[parent not found: <20020729180037.GB1233@elf.ucw.cz>]
* RE: suspend.c vs driver-model.txt
@ 2002-07-24 19:43 Grover, Andrew
       [not found] ` <59885C5E3098D511AD690002A5072D3C07990D78-OU+JdkIUtvcLll3ZsUKC9FDQ4js95KgL@public.gmane.org>
  0 siblings, 1 reply; 57+ messages in thread
From: Grover, Andrew @ 2002-07-24 19:43 UTC (permalink / raw)
  To: 'Patrick Mochel', Lyle
  Cc: acpi-devel-pyega4qmqnRoyOMFzWx49A,
	benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r

> From: Patrick Mochel [mailto:mochel-3NddpPZAyC0@public.gmane.org] 

> The ACPI code that is in there is relatively close. I did 
> that on purpose, 
> thinking that this stuff will be generalized someday. 
> However, whatever 
> end solution that exists _must_ not be designed the behavior 
> of ACPI. In 
> fact, I am hesitant talking about this general model on this 
> list for fear 
> that someone that is already brainwashed by the Great 
> Firmware Abomination 
> will say either "We can already do this!" or "I'll do it (in 
> ACPI first 
> and generalize it)." 

linux-pm-devel-pyega4qmqnRoyOMFzWx49A@public.gmane.org was created to have a non-ACPI-specific PM
forum. Nobody has used that, but it's there, and I'm subscribed just in case
anyone does. ;-)

People interested in other arches need to step up and make sure their
platform's requirements are met. Failing that, IA32 is the HW that most
people have so that's what is going to be mde to work first. Linux itself
was not a cross-platform OS from day one -- the generalization came later.

> <harshness>
> The ACPI subsystem has a tendency to duplicate existing 
> interfaces, or 
> come up with completely new ones, intending to be applicable 
> to the rest 
> of the kernel. The are highly ACPI-centric, yet they expect 
> them to be 
> standard. They aren't publicized or discussed on any list but 
> this one. 
> But, they're left to be fixed up and cleaned up by the other 
> people in the 
> community. 

I agree that any time ACPI can use an existing interface over defining a new
one that's good, but for a lot of things existing interfaces didn't exist.
In 2.5 we now are starting to see std interfaces for device enum (thanks to
you) and processor performance control (the cpufreq project) but thermal,
battery, etc do not yet have arch-neutral interfaces for ACPI to plug into.
Are these the interface you are referring to, or different ones?

> I refuse to lay blame on anyone for my inability to work 
> faster or harder. 
> But, a lot of people complain that I've been working on this 
> for a year, 
> and they still can't suspend their laptop. My rebuttal is 
> that if I had 
> actually gotten cooperation and compromise at the source 
> level, in many 
> areas, we probably wouldn't still be dealing with this. 

If anyone complains about the lack of progress then they don't understand
the scope of the work. I think *that* is why we're not there yet, instead of
a lack of cooperation.

The only criticism I have is that driverfs etc. has grown to be much more
than PM. I know you've been working with Greg, but it's still too much,
IMHO. -EPLATEFULL, indeed.

> So, someone needs to do it. I don't have time. And, I don't 
> trust anyone 
> related to ACPI to do it right (except maybe Andy in a 
> different context, 
> but he's overworked as it is). 

Ben sounds willing. ;-)

Regards -- Andy


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 57+ messages in thread
[parent not found: <lwspm@o-o.yi.org>]
* suspend.c vs driver-model.txt
@ 2002-07-24 13:38 Lyle
  0 siblings, 0 replies; 57+ messages in thread
From: Lyle @ 2002-07-24 13:38 UTC (permalink / raw)
  To: acpi-devel-pyega4qmqnRoyOMFzWx49A


The more I look at this, the more convinced I am that driver-model.txt 
describes the proper approach, and suspend.c just has it backwards.  Even 
though no drivers really implement the functionality properly yet, it makes 
sense to get the framework right so that they *can*, eventually.

I don't know why driver.h has the enums listed in a different order from 
driver-model.txt, or if it's really necessary to fix the order, unless 
somebody decides to start doing ordered comparisons.

Just to make it clear what I mean:
			 
*** kernel/suspend.c   Wed Jul 24 09:21:39 2002
--- kernel/suspend.c.orig      Wed Jul 24 09:20:32 2002
***************
*** 647,650 ****
  {
-       device_resume(RESUME_ENABLE);
        device_resume(RESUME_RESTORE_STATE);
  }
--- 647,650 ----
  {
        device_resume(RESUME_RESTORE_STATE);
+       device_resume(RESUME_ENABLE);
  }
***************
*** 655,658 ****
        device_suspend(4, SUSPEND_NOTIFY);
-       device_suspend(4, SUSPEND_DISABLE);
        device_suspend(4, SUSPEND_SAVE_STATE);
        if(!pm_suspend_state) {
--- 655,658 ----
        device_suspend(4, SUSPEND_NOTIFY);
        device_suspend(4, SUSPEND_SAVE_STATE);
+       device_suspend(4, SUSPEND_DISABLE);
        if(!pm_suspend_state) {
***************
*** 674,677 ****
  {
-       device_resume(RESUME_ENABLE);
        device_resume(RESUME_RESTORE_STATE);
        if(flags & RESUME_PHASE2) {
--- 674,677 ----
  {
        device_resume(RESUME_RESTORE_STATE);
+       device_resume(RESUME_ENABLE);
        if(flags & RESUME_PHASE2) {



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

end of thread, other threads:[~2002-07-31 21:44 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mochel@osdl.org>
     [not found] ` <Pine.LNX.4.44.0207240843090.954-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-24 16:37   ` suspend.c vs driver-model.txt Lyle
     [not found]     ` <20020724163701.D99F714808-RAHWjsxJnJUdnm+yROfE0A@public.gmane.org>
2002-07-24 18:25       ` Patrick Mochel
     [not found]         ` <Pine.LNX.4.44.0207241100080.954-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-24 17:38           ` Benjamin Herrenschmidt
     [not found]             ` <20020724173809.10194-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-29  9:00               ` Pavel Machek
     [not found]                 ` <20020729090041.GB115-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-29 15:08                   ` Benjamin Herrenschmidt
     [not found]                     ` <20020729150807.3604-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-29 17:56                       ` Pavel Machek
     [not found]                         ` <20020729175650.GA1233-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-29 17:33                           ` Benjamin Herrenschmidt
     [not found]                             ` <20020729173302.30557-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-29 18:31                               ` Pavel Machek
     [not found]                                 ` <20020729183143.GA13729-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-29 18:05                                   ` Benjamin Herrenschmidt
     [not found]                                     ` <20020729180547.20998-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-29 19:11                                       ` Pavel Machek
     [not found]                                         ` <20020729191146.GE13729-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-30  7:57                                           ` Benjamin Herrenschmidt
2002-07-29 22:36               ` Patrick Mochel
2002-07-24 17:56   ` Lyle
2002-07-30  0:25 Grover, Andrew
     [not found] <20020729180037.GB1233@elf.ucw.cz>
     [not found] ` <20020729180037.GB1233-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-29 17:55   ` Benjamin Herrenschmidt
     [not found]     ` <20020729175556.13645-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-29 19:02       ` Pavel Machek
     [not found]         ` <20020729190219.GD13729-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-07-30  7:53           ` Benjamin Herrenschmidt
     [not found]             ` <20020730075329.26474-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 18:29               ` Pavel Machek
     [not found]                 ` <20020730182921.GD7567-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:18                   ` Benjamin Herrenschmidt
     [not found]                     ` <20020730181810.30687-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:38                       ` Pavel Machek
     [not found]                         ` <20020730193857.GC12091-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:39                           ` Benjamin Herrenschmidt
     [not found]                             ` <20020730183941.6386-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:51                               ` Pavel Machek
     [not found]                                 ` <20020730195149.GI12091-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:50                                   ` Benjamin Herrenschmidt
2002-07-30 18:47                   ` Patrick Mochel
     [not found]                     ` <Pine.LNX.4.44.0207301136050.22697-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-30 18:54                       ` Pavel Machek
2002-07-30  8:04           ` Benjamin Herrenschmidt
     [not found]             ` <20020730080418.11907-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 18:22               ` Pavel Machek
     [not found]                 ` <20020730182255.GC7567-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:32                   ` Patrick Mochel
     [not found]                     ` <Pine.LNX.4.44.0207301125370.22697-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-30 18:44                       ` Pavel Machek
     [not found]                         ` <20020730184442.GE7567-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:22                           ` Benjamin Herrenschmidt
     [not found]                             ` <20020730182219.13608-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:42                               ` Pavel Machek
     [not found]                                 ` <20020730194214.GD12091-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:43                                   ` Benjamin Herrenschmidt
     [not found]                                     ` <20020730184305.23369-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:56                                       ` Pavel Machek
     [not found]                                         ` <20020730195655.GK12091-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:57                                           ` Benjamin Herrenschmidt
     [not found]                                             ` <20020730185730.615-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 20:06                                               ` Pavel Machek
     [not found]                                                 ` <20020730200634.GA16297-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 21:21                                                   ` Patrick Mochel
     [not found]                                                     ` <Pine.LNX.4.44.0207301406440.22697-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-31 21:44                                                       ` Pavel Machek
2002-07-30 22:33                                                   ` Benjamin Herrenschmidt
2002-07-30 18:51                           ` Patrick Mochel
     [not found]                             ` <Pine.LNX.4.44.0207301148350.22697-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-30 18:25                               ` Benjamin Herrenschmidt
     [not found]                                 ` <20020730182552.1477-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:47                                   ` Pavel Machek
2002-07-30 19:00                               ` Pavel Machek
     [not found]                                 ` <20020730190041.GH7567-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:27                                   ` Benjamin Herrenschmidt
2002-07-30 19:03                                   ` Patrick Mochel
     [not found]                                     ` <Pine.LNX.4.44.0207301202250.22697-100000-yZQdDDOm3n9ZQn2sFP3R7eTW4wlIGRCZ@public.gmane.org>
2002-07-30 19:11                                       ` Pavel Machek
     [not found]                                         ` <20020730191127.GB11531-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 19:12                                           ` Patrick Mochel
2002-07-30 20:46                                   ` Alan Cox
     [not found]                                     ` <1028061979.7974.40.camel-MMxVpc8zpTQVh3rx8e9g/fyykp6/JSeS3vcXtXqGYxw@public.gmane.org>
2002-07-30 18:34                                       ` Benjamin Herrenschmidt
     [not found]                                         ` <20020730183448.20582-Q0ErXNX1RuY/GWcAdfcqrQ@public.gmane.org>
2002-07-30 19:53                                           ` Pavel Machek
     [not found]                                             ` <20020730195348.GJ12091-jyMamyUUXNJG4ohzP4jBZS1Fcj925eT/@public.gmane.org>
2002-07-30 18:51                                               ` Benjamin Herrenschmidt
2002-07-30 20:11                       ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2002-07-24 19:43 Grover, Andrew
     [not found] ` <59885C5E3098D511AD690002A5072D3C07990D78-OU+JdkIUtvcLll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2002-07-29 22:50   ` Patrick Mochel
     [not found] <lwspm@o-o.yi.org>
     [not found] ` <20020724133821.5598714808-RAHWjsxJnJUdnm+yROfE0A@public.gmane.org>
2002-07-24 13:47   ` Lyle
     [not found]     ` <20020724134715.6060914808-RAHWjsxJnJUdnm+yROfE0A@public.gmane.org>
2002-07-24 15:51       ` Patrick Mochel
2002-07-24 17:07   ` Pavel Machek
2002-07-24 13:38 Lyle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox