Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757053AbYCWVRT (ORCPT ); Sun, 23 Mar 2008 17:17:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754650AbYCWVRI (ORCPT ); Sun, 23 Mar 2008 17:17:08 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:52040 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753780AbYCWVRG (ORCPT ); Sun, 23 Mar 2008 17:17:06 -0400 From: "Rafael J. Wysocki" To: Sam Ravnborg Subject: Re: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 2) Date: Sun, 23 Mar 2008 22:16:43 +0100 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) Cc: pm list , ACPI Devel Maling List , Alan Stern , Greg KH , Len Brown , LKML , Alexey Starikovskiy , David Brownell , Pavel Machek , Benjamin Herrenschmidt References: <200803210101.04706.rjw@sisk.pl> <20080321081536.GA25009@uranus.ravnborg.org> In-Reply-To: <20080321081536.GA25009@uranus.ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803232216.44627.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1150 Lines: 35 On Friday, 21 of March 2008, Sam Ravnborg wrote: > Hi Rafael. Hi Sam, > Is it possible to extend this in some way so we avoid the > #ifdef stuff in the drivers? Well, I'd love to do something like this. > We could introduce a few special sections that we discard if > PM is not in use. > We have a reliable build time infrastructure to detect > inconsistencies if needed. > > Something like: > #define __suspend __section(.suspend.text) > #define __suspenddata __section(.suspend.data) > > #define __hibernate __section(.hibernate.text) > #define __hibernatedata __section(.hibernate.data) > > A few more tricks will be needed when we assign the functon pointers. > We have __devexit_p(*) and we may use something similar. Unfortunately, I have a little experience with linkers and I don't think I'll be able to do anything like this in a reasonable time without any help. Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/