From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: + rework-pm_ops-pm_disk_mode-kill-misuse.patch added to -mm tree Date: Thu, 22 Mar 2007 15:33:13 +0100 Message-ID: <20070322143313.GA7963@elf.ucw.cz> References: <200703212334.l2LNYDjj007030@shell0.pdx.osdl.net> <20070322094825.GA29627@flint.arm.linux.org.uk> <20070322015614.dafa1ed7.akpm@linux-foundation.org> <20070322100355.GA6834@elf.ucw.cz> <1174558128.3944.78.camel@johannes.berg> <20070322132622.GD29627@flint.arm.linux.org.uk> <20070322133117.GC6050@elf.ucw.cz> <20070322142437.GB21954@linux-sh.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20070322142437.GB21954@linux-sh.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Paul Mundt , Russell King , Johannes Berg , Andrew Morton , david-b@pacbell.net, greg@kroah.com, lenb@kernel.org, linux-pm@lists.linux-foundation.org, rjw@sisk.pl List-Id: linux-pm@vger.kernel.org On Thu 2007-03-22 23:24:37, Paul Mundt wrote: > On Thu, Mar 22, 2007 at 02:31:17PM +0100, Pavel Machek wrote: > > > > No, once SOFTWARE_SUSPEND is configured there's *no way* to disable= it > > > > after the fact via pm_ops. Read valid_state() in kernel/power/main.= c. > > > = > > > So how does a platform with only flash (and an insufficient amount of > > > flash at that) tell the suspend code that suspend-to-disk is not > > > supported? > > = > > Hohum, perhaps it can suspend to SD card? Or perhaps it can suspend > > over network? > > = > > Suspend code will properly fail if there's not enough swap space. > > = > > ...plus you are allowed to return -EINVAL from arch_prepare_suspend() > > or how is it called. > = > So then how exactly is this helping anything? It's pointless to have the > sysfs file visible for platforms that are never going to support suspend > to disk, and -EINVAL'ing out in another path is simply moving the > problem. Platforms that are never going to support s2disk = a) should be fixed b) do not have CONFIG_SOFTWARE_SUSPEND. Pavel -- = (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html