linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] PM / QoS: unconditionally build the feature
@ 2012-02-07  8:34 Jean Pihet
  2012-02-07  8:34 ` [PATCH 1/2] " Jean Pihet
  2012-02-07  8:34 ` [PATCH 2/2] PM / QoS: unconditionally build the per-device constraints feature Jean Pihet
  0 siblings, 2 replies; 13+ messages in thread
From: Jean Pihet @ 2012-02-07  8:34 UTC (permalink / raw)
  To: Linux PM mailing list, linux-kernel, Rafael J. Wysocki,
	Mark Gross, Venkatesh Pallipadi
  Cc: Jean Pihet

The PM QoS features depend on CONFIG_PM which depends on
PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
not having these CONFIGs.
    
Those patches allow the features in all cases.

Based on 3.3-rc1 from mainline.
Tested on OMAP3 Beagleboard, with CONFIG_PM.
Compile tested using the i386 defconfig, with and without CONFIG_PM.


Jean Pihet (2):
  PM / QoS: unconditionally build the feature
  PM / QoS: unconditionally build the per-device constraints feature

 drivers/base/power/Makefile |    3 +-
 include/linux/pm_qos.h      |   66 -------------------------------------------
 kernel/power/Makefile       |    3 +-
 3 files changed, 4 insertions(+), 68 deletions(-)

-- 
1.7.5.4


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

* [PATCH 1/2] PM / QoS: unconditionally build the feature
  2012-02-07  8:34 [PATCH 0/2] PM / QoS: unconditionally build the feature Jean Pihet
@ 2012-02-07  8:34 ` Jean Pihet
  2012-02-12  2:06   ` mark gross
                     ` (2 more replies)
  2012-02-07  8:34 ` [PATCH 2/2] PM / QoS: unconditionally build the per-device constraints feature Jean Pihet
  1 sibling, 3 replies; 13+ messages in thread
From: Jean Pihet @ 2012-02-07  8:34 UTC (permalink / raw)
  To: Linux PM mailing list, linux-kernel, Rafael J. Wysocki,
	Mark Gross, Venkatesh Pallipadi
  Cc: Jean Pihet

The PM QoS feature depends on CONFIG_PM which depends on
PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
not having these CONFIGs.

This patch allows the feature in all cases.

Reported-by: Venkatesh Pallipadi <venki@google.com>
Signed-off-by: Jean Pihet <j-pihet@ti.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Mark Gross <markgross@thegnar.org>
---
 include/linux/pm_qos.h |   29 +----------------------------
 kernel/power/Makefile  |    3 ++-
 2 files changed, 3 insertions(+), 29 deletions(-)

diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index e5bbcba..105be69 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -63,7 +63,6 @@ static inline int dev_pm_qos_request_active(struct dev_pm_qos_request *req)
 	return req->dev != 0;
 }
 
-#ifdef CONFIG_PM
 int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node,
 			 enum pm_qos_req_action action, int value);
 void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
@@ -78,6 +77,7 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
 int pm_qos_request_active(struct pm_qos_request *req);
 s32 pm_qos_read_value(struct pm_qos_constraints *c);
 
+#ifdef CONFIG_PM
 s32 __dev_pm_qos_read_value(struct device *dev);
 s32 dev_pm_qos_read_value(struct device *dev);
 int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
@@ -95,33 +95,6 @@ void dev_pm_qos_constraints_destroy(struct device *dev);
 int dev_pm_qos_add_ancestor_request(struct device *dev,
 				    struct dev_pm_qos_request *req, s32 value);
 #else
-static inline int pm_qos_update_target(struct pm_qos_constraints *c,
-				       struct plist_node *node,
-				       enum pm_qos_req_action action,
-				       int value)
-			{ return 0; }
-static inline void pm_qos_add_request(struct pm_qos_request *req,
-				      int pm_qos_class, s32 value)
-			{ return; }
-static inline void pm_qos_update_request(struct pm_qos_request *req,
-					 s32 new_value)
-			{ return; }
-static inline void pm_qos_remove_request(struct pm_qos_request *req)
-			{ return; }
-
-static inline int pm_qos_request(int pm_qos_class)
-			{ return 0; }
-static inline int pm_qos_add_notifier(int pm_qos_class,
-				      struct notifier_block *notifier)
-			{ return 0; }
-static inline int pm_qos_remove_notifier(int pm_qos_class,
-					 struct notifier_block *notifier)
-			{ return 0; }
-static inline int pm_qos_request_active(struct pm_qos_request *req)
-			{ return 0; }
-static inline s32 pm_qos_read_value(struct pm_qos_constraints *c)
-			{ return 0; }
-
 static inline s32 __dev_pm_qos_read_value(struct device *dev)
 			{ return 0; }
 static inline s32 dev_pm_qos_read_value(struct device *dev)
diff --git a/kernel/power/Makefile b/kernel/power/Makefile
index 07e0e28..66d808e 100644
--- a/kernel/power/Makefile
+++ b/kernel/power/Makefile
@@ -1,7 +1,8 @@
 
 ccflags-$(CONFIG_PM_DEBUG)	:= -DDEBUG
 
-obj-$(CONFIG_PM)		+= main.o qos.o
+obj-y				+= qos.o
+obj-$(CONFIG_PM)		+= main.o
 obj-$(CONFIG_VT_CONSOLE_SLEEP)	+= console.o
 obj-$(CONFIG_FREEZER)		+= process.o
 obj-$(CONFIG_SUSPEND)		+= suspend.o
-- 
1.7.5.4


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

* [PATCH 2/2] PM / QoS: unconditionally build the per-device constraints feature
  2012-02-07  8:34 [PATCH 0/2] PM / QoS: unconditionally build the feature Jean Pihet
  2012-02-07  8:34 ` [PATCH 1/2] " Jean Pihet
@ 2012-02-07  8:34 ` Jean Pihet
  2012-02-12  2:07   ` mark gross
  1 sibling, 1 reply; 13+ messages in thread
From: Jean Pihet @ 2012-02-07  8:34 UTC (permalink / raw)
  To: Linux PM mailing list, linux-kernel, Rafael J. Wysocki,
	Mark Gross, Venkatesh Pallipadi
  Cc: Jean Pihet

The per-device PM QoS feature depends on CONFIG_PM which depends
on PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
not having these CONFIGs.

This patch allows the feature in all cases.

Signed-off-by: Jean Pihet <j-pihet@ti.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Mark Gross <markgross@thegnar.org>
---
 drivers/base/power/Makefile |    3 ++-
 include/linux/pm_qos.h      |   39 ---------------------------------------
 2 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
index 2e58ebb..312eb65 100644
--- a/drivers/base/power/Makefile
+++ b/drivers/base/power/Makefile
@@ -1,4 +1,5 @@
-obj-$(CONFIG_PM)	+= sysfs.o generic_ops.o common.o qos.o
+obj-y			+= qos.o
+obj-$(CONFIG_PM)	+= sysfs.o generic_ops.o common.o
 obj-$(CONFIG_PM_SLEEP)	+= main.o wakeup.o
 obj-$(CONFIG_PM_RUNTIME)	+= runtime.o
 obj-$(CONFIG_PM_TRACE_RTC)	+= trace.o
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 105be69..37b017a 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -77,7 +77,6 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
 int pm_qos_request_active(struct pm_qos_request *req);
 s32 pm_qos_read_value(struct pm_qos_constraints *c);
 
-#ifdef CONFIG_PM
 s32 __dev_pm_qos_read_value(struct device *dev);
 s32 dev_pm_qos_read_value(struct device *dev);
 int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
@@ -94,43 +93,5 @@ void dev_pm_qos_constraints_init(struct device *dev);
 void dev_pm_qos_constraints_destroy(struct device *dev);
 int dev_pm_qos_add_ancestor_request(struct device *dev,
 				    struct dev_pm_qos_request *req, s32 value);
-#else
-static inline s32 __dev_pm_qos_read_value(struct device *dev)
-			{ return 0; }
-static inline s32 dev_pm_qos_read_value(struct device *dev)
-			{ return 0; }
-static inline int dev_pm_qos_add_request(struct device *dev,
-					 struct dev_pm_qos_request *req,
-					 s32 value)
-			{ return 0; }
-static inline int dev_pm_qos_update_request(struct dev_pm_qos_request *req,
-					    s32 new_value)
-			{ return 0; }
-static inline int dev_pm_qos_remove_request(struct dev_pm_qos_request *req)
-			{ return 0; }
-static inline int dev_pm_qos_add_notifier(struct device *dev,
-					  struct notifier_block *notifier)
-			{ return 0; }
-static inline int dev_pm_qos_remove_notifier(struct device *dev,
-					     struct notifier_block *notifier)
-			{ return 0; }
-static inline int dev_pm_qos_add_global_notifier(
-					struct notifier_block *notifier)
-			{ return 0; }
-static inline int dev_pm_qos_remove_global_notifier(
-					struct notifier_block *notifier)
-			{ return 0; }
-static inline void dev_pm_qos_constraints_init(struct device *dev)
-{
-	dev->power.power_state = PMSG_ON;
-}
-static inline void dev_pm_qos_constraints_destroy(struct device *dev)
-{
-	dev->power.power_state = PMSG_INVALID;
-}
-static inline int dev_pm_qos_add_ancestor_request(struct device *dev,
-				    struct dev_pm_qos_request *req, s32 value)
-			{ return 0; }
-#endif
 
 #endif
-- 
1.7.5.4


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

* Re: [PATCH 1/2] PM / QoS: unconditionally build the feature
  2012-02-07  8:34 ` [PATCH 1/2] " Jean Pihet
@ 2012-02-12  2:06   ` mark gross
  2012-02-12 21:37   ` Rafael J. Wysocki
  2012-02-13 13:50   ` [PATCH] " Jean Pihet
  2 siblings, 0 replies; 13+ messages in thread
From: mark gross @ 2012-02-12  2:06 UTC (permalink / raw)
  To: Jean Pihet
  Cc: Linux PM mailing list, linux-kernel, Rafael J. Wysocki,
	Mark Gross, Venkatesh Pallipadi, Jean Pihet

acked-by <markgross@thegnar.org>

On Tue, Feb 07, 2012 at 09:34:05AM +0100, Jean Pihet wrote:
> The PM QoS feature depends on CONFIG_PM which depends on
> PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
> not having these CONFIGs.
> 
> This patch allows the feature in all cases.
> 
> Reported-by: Venkatesh Pallipadi <venki@google.com>
> Signed-off-by: Jean Pihet <j-pihet@ti.com>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Mark Gross <markgross@thegnar.org>
> ---
>  include/linux/pm_qos.h |   29 +----------------------------
>  kernel/power/Makefile  |    3 ++-
>  2 files changed, 3 insertions(+), 29 deletions(-)
> 
> diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
> index e5bbcba..105be69 100644
> --- a/include/linux/pm_qos.h
> +++ b/include/linux/pm_qos.h
> @@ -63,7 +63,6 @@ static inline int dev_pm_qos_request_active(struct dev_pm_qos_request *req)
>  	return req->dev != 0;
>  }
>  
> -#ifdef CONFIG_PM
>  int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node,
>  			 enum pm_qos_req_action action, int value);
>  void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
> @@ -78,6 +77,7 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
>  int pm_qos_request_active(struct pm_qos_request *req);
>  s32 pm_qos_read_value(struct pm_qos_constraints *c);
>  
> +#ifdef CONFIG_PM
>  s32 __dev_pm_qos_read_value(struct device *dev);
>  s32 dev_pm_qos_read_value(struct device *dev);
>  int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
> @@ -95,33 +95,6 @@ void dev_pm_qos_constraints_destroy(struct device *dev);
>  int dev_pm_qos_add_ancestor_request(struct device *dev,
>  				    struct dev_pm_qos_request *req, s32 value);
>  #else
> -static inline int pm_qos_update_target(struct pm_qos_constraints *c,
> -				       struct plist_node *node,
> -				       enum pm_qos_req_action action,
> -				       int value)
> -			{ return 0; }
> -static inline void pm_qos_add_request(struct pm_qos_request *req,
> -				      int pm_qos_class, s32 value)
> -			{ return; }
> -static inline void pm_qos_update_request(struct pm_qos_request *req,
> -					 s32 new_value)
> -			{ return; }
> -static inline void pm_qos_remove_request(struct pm_qos_request *req)
> -			{ return; }
> -
> -static inline int pm_qos_request(int pm_qos_class)
> -			{ return 0; }
> -static inline int pm_qos_add_notifier(int pm_qos_class,
> -				      struct notifier_block *notifier)
> -			{ return 0; }
> -static inline int pm_qos_remove_notifier(int pm_qos_class,
> -					 struct notifier_block *notifier)
> -			{ return 0; }
> -static inline int pm_qos_request_active(struct pm_qos_request *req)
> -			{ return 0; }
> -static inline s32 pm_qos_read_value(struct pm_qos_constraints *c)
> -			{ return 0; }
> -
>  static inline s32 __dev_pm_qos_read_value(struct device *dev)
>  			{ return 0; }
>  static inline s32 dev_pm_qos_read_value(struct device *dev)
> diff --git a/kernel/power/Makefile b/kernel/power/Makefile
> index 07e0e28..66d808e 100644
> --- a/kernel/power/Makefile
> +++ b/kernel/power/Makefile
> @@ -1,7 +1,8 @@
>  
>  ccflags-$(CONFIG_PM_DEBUG)	:= -DDEBUG
>  
> -obj-$(CONFIG_PM)		+= main.o qos.o
> +obj-y				+= qos.o
> +obj-$(CONFIG_PM)		+= main.o
>  obj-$(CONFIG_VT_CONSOLE_SLEEP)	+= console.o
>  obj-$(CONFIG_FREEZER)		+= process.o
>  obj-$(CONFIG_SUSPEND)		+= suspend.o
> -- 
> 1.7.5.4
> 

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

* Re: [PATCH 2/2] PM / QoS: unconditionally build the per-device constraints feature
  2012-02-07  8:34 ` [PATCH 2/2] PM / QoS: unconditionally build the per-device constraints feature Jean Pihet
@ 2012-02-12  2:07   ` mark gross
  2012-02-12 21:27     ` Rafael J. Wysocki
  0 siblings, 1 reply; 13+ messages in thread
From: mark gross @ 2012-02-12  2:07 UTC (permalink / raw)
  To: Jean Pihet
  Cc: Linux PM mailing list, linux-kernel, Rafael J. Wysocki,
	Mark Gross, Venkatesh Pallipadi, Jean Pihet

why are these two patches?

I think you could squash them into one and it would be just fine.

--mark

On Tue, Feb 07, 2012 at 09:34:06AM +0100, Jean Pihet wrote:
> The per-device PM QoS feature depends on CONFIG_PM which depends
> on PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
> not having these CONFIGs.
> 
> This patch allows the feature in all cases.
> 
> Signed-off-by: Jean Pihet <j-pihet@ti.com>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Mark Gross <markgross@thegnar.org>
> ---
>  drivers/base/power/Makefile |    3 ++-
>  include/linux/pm_qos.h      |   39 ---------------------------------------
>  2 files changed, 2 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
> index 2e58ebb..312eb65 100644
> --- a/drivers/base/power/Makefile
> +++ b/drivers/base/power/Makefile
> @@ -1,4 +1,5 @@
> -obj-$(CONFIG_PM)	+= sysfs.o generic_ops.o common.o qos.o
> +obj-y			+= qos.o
> +obj-$(CONFIG_PM)	+= sysfs.o generic_ops.o common.o
>  obj-$(CONFIG_PM_SLEEP)	+= main.o wakeup.o
>  obj-$(CONFIG_PM_RUNTIME)	+= runtime.o
>  obj-$(CONFIG_PM_TRACE_RTC)	+= trace.o
> diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
> index 105be69..37b017a 100644
> --- a/include/linux/pm_qos.h
> +++ b/include/linux/pm_qos.h
> @@ -77,7 +77,6 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
>  int pm_qos_request_active(struct pm_qos_request *req);
>  s32 pm_qos_read_value(struct pm_qos_constraints *c);
>  
> -#ifdef CONFIG_PM
>  s32 __dev_pm_qos_read_value(struct device *dev);
>  s32 dev_pm_qos_read_value(struct device *dev);
>  int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
> @@ -94,43 +93,5 @@ void dev_pm_qos_constraints_init(struct device *dev);
>  void dev_pm_qos_constraints_destroy(struct device *dev);
>  int dev_pm_qos_add_ancestor_request(struct device *dev,
>  				    struct dev_pm_qos_request *req, s32 value);
> -#else
> -static inline s32 __dev_pm_qos_read_value(struct device *dev)
> -			{ return 0; }
> -static inline s32 dev_pm_qos_read_value(struct device *dev)
> -			{ return 0; }
> -static inline int dev_pm_qos_add_request(struct device *dev,
> -					 struct dev_pm_qos_request *req,
> -					 s32 value)
> -			{ return 0; }
> -static inline int dev_pm_qos_update_request(struct dev_pm_qos_request *req,
> -					    s32 new_value)
> -			{ return 0; }
> -static inline int dev_pm_qos_remove_request(struct dev_pm_qos_request *req)
> -			{ return 0; }
> -static inline int dev_pm_qos_add_notifier(struct device *dev,
> -					  struct notifier_block *notifier)
> -			{ return 0; }
> -static inline int dev_pm_qos_remove_notifier(struct device *dev,
> -					     struct notifier_block *notifier)
> -			{ return 0; }
> -static inline int dev_pm_qos_add_global_notifier(
> -					struct notifier_block *notifier)
> -			{ return 0; }
> -static inline int dev_pm_qos_remove_global_notifier(
> -					struct notifier_block *notifier)
> -			{ return 0; }
> -static inline void dev_pm_qos_constraints_init(struct device *dev)
> -{
> -	dev->power.power_state = PMSG_ON;
> -}
> -static inline void dev_pm_qos_constraints_destroy(struct device *dev)
> -{
> -	dev->power.power_state = PMSG_INVALID;
> -}
> -static inline int dev_pm_qos_add_ancestor_request(struct device *dev,
> -				    struct dev_pm_qos_request *req, s32 value)
> -			{ return 0; }
> -#endif
>  
>  #endif
> -- 
> 1.7.5.4
> 

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

* Re: [PATCH 2/2] PM / QoS: unconditionally build the per-device constraints feature
  2012-02-12  2:07   ` mark gross
@ 2012-02-12 21:27     ` Rafael J. Wysocki
  2012-02-15 15:33       ` mark gross
  0 siblings, 1 reply; 13+ messages in thread
From: Rafael J. Wysocki @ 2012-02-12 21:27 UTC (permalink / raw)
  To: markgross
  Cc: Jean Pihet, Linux PM mailing list, linux-kernel,
	Venkatesh Pallipadi, Jean Pihet

On Sunday, February 12, 2012, mark gross wrote:
> why are these two patches?
> 
> I think you could squash them into one and it would be just fine.

Well, what sense does _device_ PM QoS make without CONFIG_PM?

Rafael


> On Tue, Feb 07, 2012 at 09:34:06AM +0100, Jean Pihet wrote:
> > The per-device PM QoS feature depends on CONFIG_PM which depends
> > on PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
> > not having these CONFIGs.
> > 
> > This patch allows the feature in all cases.
> > 
> > Signed-off-by: Jean Pihet <j-pihet@ti.com>
> > Cc: Rafael J. Wysocki <rjw@sisk.pl>
> > Cc: Mark Gross <markgross@thegnar.org>
> > ---
> >  drivers/base/power/Makefile |    3 ++-
> >  include/linux/pm_qos.h      |   39 ---------------------------------------
> >  2 files changed, 2 insertions(+), 40 deletions(-)
> > 
> > diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
> > index 2e58ebb..312eb65 100644
> > --- a/drivers/base/power/Makefile
> > +++ b/drivers/base/power/Makefile
> > @@ -1,4 +1,5 @@
> > -obj-$(CONFIG_PM)	+= sysfs.o generic_ops.o common.o qos.o
> > +obj-y			+= qos.o
> > +obj-$(CONFIG_PM)	+= sysfs.o generic_ops.o common.o
> >  obj-$(CONFIG_PM_SLEEP)	+= main.o wakeup.o
> >  obj-$(CONFIG_PM_RUNTIME)	+= runtime.o
> >  obj-$(CONFIG_PM_TRACE_RTC)	+= trace.o
> > diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
> > index 105be69..37b017a 100644
> > --- a/include/linux/pm_qos.h
> > +++ b/include/linux/pm_qos.h
> > @@ -77,7 +77,6 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
> >  int pm_qos_request_active(struct pm_qos_request *req);
> >  s32 pm_qos_read_value(struct pm_qos_constraints *c);
> >  
> > -#ifdef CONFIG_PM
> >  s32 __dev_pm_qos_read_value(struct device *dev);
> >  s32 dev_pm_qos_read_value(struct device *dev);
> >  int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
> > @@ -94,43 +93,5 @@ void dev_pm_qos_constraints_init(struct device *dev);
> >  void dev_pm_qos_constraints_destroy(struct device *dev);
> >  int dev_pm_qos_add_ancestor_request(struct device *dev,
> >  				    struct dev_pm_qos_request *req, s32 value);
> > -#else
> > -static inline s32 __dev_pm_qos_read_value(struct device *dev)
> > -			{ return 0; }
> > -static inline s32 dev_pm_qos_read_value(struct device *dev)
> > -			{ return 0; }
> > -static inline int dev_pm_qos_add_request(struct device *dev,
> > -					 struct dev_pm_qos_request *req,
> > -					 s32 value)
> > -			{ return 0; }
> > -static inline int dev_pm_qos_update_request(struct dev_pm_qos_request *req,
> > -					    s32 new_value)
> > -			{ return 0; }
> > -static inline int dev_pm_qos_remove_request(struct dev_pm_qos_request *req)
> > -			{ return 0; }
> > -static inline int dev_pm_qos_add_notifier(struct device *dev,
> > -					  struct notifier_block *notifier)
> > -			{ return 0; }
> > -static inline int dev_pm_qos_remove_notifier(struct device *dev,
> > -					     struct notifier_block *notifier)
> > -			{ return 0; }
> > -static inline int dev_pm_qos_add_global_notifier(
> > -					struct notifier_block *notifier)
> > -			{ return 0; }
> > -static inline int dev_pm_qos_remove_global_notifier(
> > -					struct notifier_block *notifier)
> > -			{ return 0; }
> > -static inline void dev_pm_qos_constraints_init(struct device *dev)
> > -{
> > -	dev->power.power_state = PMSG_ON;
> > -}
> > -static inline void dev_pm_qos_constraints_destroy(struct device *dev)
> > -{
> > -	dev->power.power_state = PMSG_INVALID;
> > -}
> > -static inline int dev_pm_qos_add_ancestor_request(struct device *dev,
> > -				    struct dev_pm_qos_request *req, s32 value)
> > -			{ return 0; }
> > -#endif
> >  
> >  #endif
> 
> 


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

* Re: [PATCH 1/2] PM / QoS: unconditionally build the feature
  2012-02-07  8:34 ` [PATCH 1/2] " Jean Pihet
  2012-02-12  2:06   ` mark gross
@ 2012-02-12 21:37   ` Rafael J. Wysocki
  2012-02-13 13:50   ` [PATCH] " Jean Pihet
  2 siblings, 0 replies; 13+ messages in thread
From: Rafael J. Wysocki @ 2012-02-12 21:37 UTC (permalink / raw)
  To: Jean Pihet
  Cc: Linux PM mailing list, linux-kernel, Mark Gross,
	Venkatesh Pallipadi, Jean Pihet

On Tuesday, February 07, 2012, Jean Pihet wrote:
> The PM QoS feature depends on CONFIG_PM which depends on
> PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
> not having these CONFIGs.
> 
> This patch allows the feature in all cases.

Since the Venki's patch has been merged in the meantime, can you please
rebase this on top of the current Linus' tree?

Rafael


> Reported-by: Venkatesh Pallipadi <venki@google.com>
> Signed-off-by: Jean Pihet <j-pihet@ti.com>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Mark Gross <markgross@thegnar.org>
> ---
>  include/linux/pm_qos.h |   29 +----------------------------
>  kernel/power/Makefile  |    3 ++-
>  2 files changed, 3 insertions(+), 29 deletions(-)
> 
> diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
> index e5bbcba..105be69 100644
> --- a/include/linux/pm_qos.h
> +++ b/include/linux/pm_qos.h
> @@ -63,7 +63,6 @@ static inline int dev_pm_qos_request_active(struct dev_pm_qos_request *req)
>  	return req->dev != 0;
>  }
>  
> -#ifdef CONFIG_PM
>  int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node,
>  			 enum pm_qos_req_action action, int value);
>  void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
> @@ -78,6 +77,7 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
>  int pm_qos_request_active(struct pm_qos_request *req);
>  s32 pm_qos_read_value(struct pm_qos_constraints *c);
>  
> +#ifdef CONFIG_PM
>  s32 __dev_pm_qos_read_value(struct device *dev);
>  s32 dev_pm_qos_read_value(struct device *dev);
>  int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
> @@ -95,33 +95,6 @@ void dev_pm_qos_constraints_destroy(struct device *dev);
>  int dev_pm_qos_add_ancestor_request(struct device *dev,
>  				    struct dev_pm_qos_request *req, s32 value);
>  #else
> -static inline int pm_qos_update_target(struct pm_qos_constraints *c,
> -				       struct plist_node *node,
> -				       enum pm_qos_req_action action,
> -				       int value)
> -			{ return 0; }
> -static inline void pm_qos_add_request(struct pm_qos_request *req,
> -				      int pm_qos_class, s32 value)
> -			{ return; }
> -static inline void pm_qos_update_request(struct pm_qos_request *req,
> -					 s32 new_value)
> -			{ return; }
> -static inline void pm_qos_remove_request(struct pm_qos_request *req)
> -			{ return; }
> -
> -static inline int pm_qos_request(int pm_qos_class)
> -			{ return 0; }
> -static inline int pm_qos_add_notifier(int pm_qos_class,
> -				      struct notifier_block *notifier)
> -			{ return 0; }
> -static inline int pm_qos_remove_notifier(int pm_qos_class,
> -					 struct notifier_block *notifier)
> -			{ return 0; }
> -static inline int pm_qos_request_active(struct pm_qos_request *req)
> -			{ return 0; }
> -static inline s32 pm_qos_read_value(struct pm_qos_constraints *c)
> -			{ return 0; }
> -
>  static inline s32 __dev_pm_qos_read_value(struct device *dev)
>  			{ return 0; }
>  static inline s32 dev_pm_qos_read_value(struct device *dev)
> diff --git a/kernel/power/Makefile b/kernel/power/Makefile
> index 07e0e28..66d808e 100644
> --- a/kernel/power/Makefile
> +++ b/kernel/power/Makefile
> @@ -1,7 +1,8 @@
>  
>  ccflags-$(CONFIG_PM_DEBUG)	:= -DDEBUG
>  
> -obj-$(CONFIG_PM)		+= main.o qos.o
> +obj-y				+= qos.o
> +obj-$(CONFIG_PM)		+= main.o
>  obj-$(CONFIG_VT_CONSOLE_SLEEP)	+= console.o
>  obj-$(CONFIG_FREEZER)		+= process.o
>  obj-$(CONFIG_SUSPEND)		+= suspend.o
> 


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

* [PATCH] PM / QoS: unconditionally build the feature
  2012-02-07  8:34 ` [PATCH 1/2] " Jean Pihet
  2012-02-12  2:06   ` mark gross
  2012-02-12 21:37   ` Rafael J. Wysocki
@ 2012-02-13 13:50   ` Jean Pihet
  2012-02-13 15:41     ` Rafael J. Wysocki
  2 siblings, 1 reply; 13+ messages in thread
From: Jean Pihet @ 2012-02-13 13:50 UTC (permalink / raw)
  To: Linux PM mailing list, linux-kernel, Rafael J. Wysocki,
	Mark Gross, Venkatesh Pallipadi
  Cc: Jean Pihet

The PM QoS feature depends on CONFIG_PM which depends on
PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
not having these CONFIGs.

This patch allows the feature in all cases.

Signed-off-by: Jean Pihet <j-pihet@ti.com>
Reported-by: Venkatesh Pallipadi <venki@google.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Mark Gross <markgross@thegnar.org>
---
 include/linux/pm_qos.h |   41 +----------------------------------------
 kernel/power/Makefile  |    3 ++-
 2 files changed, 3 insertions(+), 41 deletions(-)

diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 4d99e4e..105be69 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -63,7 +63,6 @@ static inline int dev_pm_qos_request_active(struct dev_pm_qos_request *req)
 	return req->dev != 0;
 }
 
-#ifdef CONFIG_PM
 int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node,
 			 enum pm_qos_req_action action, int value);
 void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
@@ -78,6 +77,7 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
 int pm_qos_request_active(struct pm_qos_request *req);
 s32 pm_qos_read_value(struct pm_qos_constraints *c);
 
+#ifdef CONFIG_PM
 s32 __dev_pm_qos_read_value(struct device *dev);
 s32 dev_pm_qos_read_value(struct device *dev);
 int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
@@ -95,45 +95,6 @@ void dev_pm_qos_constraints_destroy(struct device *dev);
 int dev_pm_qos_add_ancestor_request(struct device *dev,
 				    struct dev_pm_qos_request *req, s32 value);
 #else
-static inline int pm_qos_update_target(struct pm_qos_constraints *c,
-				       struct plist_node *node,
-				       enum pm_qos_req_action action,
-				       int value)
-			{ return 0; }
-static inline void pm_qos_add_request(struct pm_qos_request *req,
-				      int pm_qos_class, s32 value)
-			{ return; }
-static inline void pm_qos_update_request(struct pm_qos_request *req,
-					 s32 new_value)
-			{ return; }
-static inline void pm_qos_remove_request(struct pm_qos_request *req)
-			{ return; }
-
-static inline int pm_qos_request(int pm_qos_class)
-{
-	switch (pm_qos_class) {
-	case PM_QOS_CPU_DMA_LATENCY:
-		return PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE;
-	case PM_QOS_NETWORK_LATENCY:
-		return PM_QOS_NETWORK_LAT_DEFAULT_VALUE;
-	case PM_QOS_NETWORK_THROUGHPUT:
-		return PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE;
-	default:
-		return PM_QOS_DEFAULT_VALUE;
-	}
-}
-
-static inline int pm_qos_add_notifier(int pm_qos_class,
-				      struct notifier_block *notifier)
-			{ return 0; }
-static inline int pm_qos_remove_notifier(int pm_qos_class,
-					 struct notifier_block *notifier)
-			{ return 0; }
-static inline int pm_qos_request_active(struct pm_qos_request *req)
-			{ return 0; }
-static inline s32 pm_qos_read_value(struct pm_qos_constraints *c)
-			{ return 0; }
-
 static inline s32 __dev_pm_qos_read_value(struct device *dev)
 			{ return 0; }
 static inline s32 dev_pm_qos_read_value(struct device *dev)
diff --git a/kernel/power/Makefile b/kernel/power/Makefile
index 07e0e28..66d808e 100644
--- a/kernel/power/Makefile
+++ b/kernel/power/Makefile
@@ -1,7 +1,8 @@
 
 ccflags-$(CONFIG_PM_DEBUG)	:= -DDEBUG
 
-obj-$(CONFIG_PM)		+= main.o qos.o
+obj-y				+= qos.o
+obj-$(CONFIG_PM)		+= main.o
 obj-$(CONFIG_VT_CONSOLE_SLEEP)	+= console.o
 obj-$(CONFIG_FREEZER)		+= process.o
 obj-$(CONFIG_SUSPEND)		+= suspend.o
-- 
1.7.5.4


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

* Re: [PATCH] PM / QoS: unconditionally build the feature
  2012-02-13 15:41     ` Rafael J. Wysocki
@ 2012-02-13 15:40       ` Jean Pihet
  2012-02-17 19:27       ` [linux-pm] " Pavel Machek
  1 sibling, 0 replies; 13+ messages in thread
From: Jean Pihet @ 2012-02-13 15:40 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux PM mailing list, linux-kernel, Mark Gross,
	Venkatesh Pallipadi, Jean Pihet

Hi Rafael,

2012/2/13 Rafael J. Wysocki <rjw@sisk.pl>:
> On Monday, February 13, 2012, Jean Pihet wrote:
>> The PM QoS feature depends on CONFIG_PM which depends on
>> PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
>> not having these CONFIGs.
>>
>> This patch allows the feature in all cases.
>>
>> Signed-off-by: Jean Pihet <j-pihet@ti.com>
>> Reported-by: Venkatesh Pallipadi <venki@google.com>
>> Cc: Rafael J. Wysocki <rjw@sisk.pl>
>> Cc: Mark Gross <markgross@thegnar.org>
>
> Applied, but I modified the changelog (please have a look at the
> linux-pm/pm-qos branch for details).
Ok thanks! Will look at it as soon as the changes are propagated to linux-pm.

>
> Thanks,
> Rafael
>

Jean

>
>> ---
>>  include/linux/pm_qos.h |   41 +----------------------------------------
>>  kernel/power/Makefile  |    3 ++-
>>  2 files changed, 3 insertions(+), 41 deletions(-)
>>
>> diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
>> index 4d99e4e..105be69 100644
>> --- a/include/linux/pm_qos.h
>> +++ b/include/linux/pm_qos.h
>> @@ -63,7 +63,6 @@ static inline int dev_pm_qos_request_active(struct dev_pm_qos_request *req)
>>       return req->dev != 0;
>>  }
>>
>> -#ifdef CONFIG_PM
>>  int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node,
>>                        enum pm_qos_req_action action, int value);
>>  void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
>> @@ -78,6 +77,7 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
>>  int pm_qos_request_active(struct pm_qos_request *req);
>>  s32 pm_qos_read_value(struct pm_qos_constraints *c);
>>
>> +#ifdef CONFIG_PM
>>  s32 __dev_pm_qos_read_value(struct device *dev);
>>  s32 dev_pm_qos_read_value(struct device *dev);
>>  int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
>> @@ -95,45 +95,6 @@ void dev_pm_qos_constraints_destroy(struct device *dev);
>>  int dev_pm_qos_add_ancestor_request(struct device *dev,
>>                                   struct dev_pm_qos_request *req, s32 value);
>>  #else
>> -static inline int pm_qos_update_target(struct pm_qos_constraints *c,
>> -                                    struct plist_node *node,
>> -                                    enum pm_qos_req_action action,
>> -                                    int value)
>> -                     { return 0; }
>> -static inline void pm_qos_add_request(struct pm_qos_request *req,
>> -                                   int pm_qos_class, s32 value)
>> -                     { return; }
>> -static inline void pm_qos_update_request(struct pm_qos_request *req,
>> -                                      s32 new_value)
>> -                     { return; }
>> -static inline void pm_qos_remove_request(struct pm_qos_request *req)
>> -                     { return; }
>> -
>> -static inline int pm_qos_request(int pm_qos_class)
>> -{
>> -     switch (pm_qos_class) {
>> -     case PM_QOS_CPU_DMA_LATENCY:
>> -             return PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE;
>> -     case PM_QOS_NETWORK_LATENCY:
>> -             return PM_QOS_NETWORK_LAT_DEFAULT_VALUE;
>> -     case PM_QOS_NETWORK_THROUGHPUT:
>> -             return PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE;
>> -     default:
>> -             return PM_QOS_DEFAULT_VALUE;
>> -     }
>> -}
>> -
>> -static inline int pm_qos_add_notifier(int pm_qos_class,
>> -                                   struct notifier_block *notifier)
>> -                     { return 0; }
>> -static inline int pm_qos_remove_notifier(int pm_qos_class,
>> -                                      struct notifier_block *notifier)
>> -                     { return 0; }
>> -static inline int pm_qos_request_active(struct pm_qos_request *req)
>> -                     { return 0; }
>> -static inline s32 pm_qos_read_value(struct pm_qos_constraints *c)
>> -                     { return 0; }
>> -
>>  static inline s32 __dev_pm_qos_read_value(struct device *dev)
>>                       { return 0; }
>>  static inline s32 dev_pm_qos_read_value(struct device *dev)
>> diff --git a/kernel/power/Makefile b/kernel/power/Makefile
>> index 07e0e28..66d808e 100644
>> --- a/kernel/power/Makefile
>> +++ b/kernel/power/Makefile
>> @@ -1,7 +1,8 @@
>>
>>  ccflags-$(CONFIG_PM_DEBUG)   := -DDEBUG
>>
>> -obj-$(CONFIG_PM)             += main.o qos.o
>> +obj-y                                += qos.o
>> +obj-$(CONFIG_PM)             += main.o
>>  obj-$(CONFIG_VT_CONSOLE_SLEEP)       += console.o
>>  obj-$(CONFIG_FREEZER)                += process.o
>>  obj-$(CONFIG_SUSPEND)                += suspend.o
>>
>

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

* Re: [PATCH] PM / QoS: unconditionally build the feature
  2012-02-13 13:50   ` [PATCH] " Jean Pihet
@ 2012-02-13 15:41     ` Rafael J. Wysocki
  2012-02-13 15:40       ` Jean Pihet
  2012-02-17 19:27       ` [linux-pm] " Pavel Machek
  0 siblings, 2 replies; 13+ messages in thread
From: Rafael J. Wysocki @ 2012-02-13 15:41 UTC (permalink / raw)
  To: Jean Pihet
  Cc: Linux PM mailing list, linux-kernel, Mark Gross,
	Venkatesh Pallipadi, Jean Pihet

On Monday, February 13, 2012, Jean Pihet wrote:
> The PM QoS feature depends on CONFIG_PM which depends on
> PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
> not having these CONFIGs.
> 
> This patch allows the feature in all cases.
> 
> Signed-off-by: Jean Pihet <j-pihet@ti.com>
> Reported-by: Venkatesh Pallipadi <venki@google.com>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Mark Gross <markgross@thegnar.org>

Applied, but I modified the changelog (please have a look at the
linux-pm/pm-qos branch for details).

Thanks,
Rafael


> ---
>  include/linux/pm_qos.h |   41 +----------------------------------------
>  kernel/power/Makefile  |    3 ++-
>  2 files changed, 3 insertions(+), 41 deletions(-)
> 
> diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
> index 4d99e4e..105be69 100644
> --- a/include/linux/pm_qos.h
> +++ b/include/linux/pm_qos.h
> @@ -63,7 +63,6 @@ static inline int dev_pm_qos_request_active(struct dev_pm_qos_request *req)
>  	return req->dev != 0;
>  }
>  
> -#ifdef CONFIG_PM
>  int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node,
>  			 enum pm_qos_req_action action, int value);
>  void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
> @@ -78,6 +77,7 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
>  int pm_qos_request_active(struct pm_qos_request *req);
>  s32 pm_qos_read_value(struct pm_qos_constraints *c);
>  
> +#ifdef CONFIG_PM
>  s32 __dev_pm_qos_read_value(struct device *dev);
>  s32 dev_pm_qos_read_value(struct device *dev);
>  int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
> @@ -95,45 +95,6 @@ void dev_pm_qos_constraints_destroy(struct device *dev);
>  int dev_pm_qos_add_ancestor_request(struct device *dev,
>  				    struct dev_pm_qos_request *req, s32 value);
>  #else
> -static inline int pm_qos_update_target(struct pm_qos_constraints *c,
> -				       struct plist_node *node,
> -				       enum pm_qos_req_action action,
> -				       int value)
> -			{ return 0; }
> -static inline void pm_qos_add_request(struct pm_qos_request *req,
> -				      int pm_qos_class, s32 value)
> -			{ return; }
> -static inline void pm_qos_update_request(struct pm_qos_request *req,
> -					 s32 new_value)
> -			{ return; }
> -static inline void pm_qos_remove_request(struct pm_qos_request *req)
> -			{ return; }
> -
> -static inline int pm_qos_request(int pm_qos_class)
> -{
> -	switch (pm_qos_class) {
> -	case PM_QOS_CPU_DMA_LATENCY:
> -		return PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE;
> -	case PM_QOS_NETWORK_LATENCY:
> -		return PM_QOS_NETWORK_LAT_DEFAULT_VALUE;
> -	case PM_QOS_NETWORK_THROUGHPUT:
> -		return PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE;
> -	default:
> -		return PM_QOS_DEFAULT_VALUE;
> -	}
> -}
> -
> -static inline int pm_qos_add_notifier(int pm_qos_class,
> -				      struct notifier_block *notifier)
> -			{ return 0; }
> -static inline int pm_qos_remove_notifier(int pm_qos_class,
> -					 struct notifier_block *notifier)
> -			{ return 0; }
> -static inline int pm_qos_request_active(struct pm_qos_request *req)
> -			{ return 0; }
> -static inline s32 pm_qos_read_value(struct pm_qos_constraints *c)
> -			{ return 0; }
> -
>  static inline s32 __dev_pm_qos_read_value(struct device *dev)
>  			{ return 0; }
>  static inline s32 dev_pm_qos_read_value(struct device *dev)
> diff --git a/kernel/power/Makefile b/kernel/power/Makefile
> index 07e0e28..66d808e 100644
> --- a/kernel/power/Makefile
> +++ b/kernel/power/Makefile
> @@ -1,7 +1,8 @@
>  
>  ccflags-$(CONFIG_PM_DEBUG)	:= -DDEBUG
>  
> -obj-$(CONFIG_PM)		+= main.o qos.o
> +obj-y				+= qos.o
> +obj-$(CONFIG_PM)		+= main.o
>  obj-$(CONFIG_VT_CONSOLE_SLEEP)	+= console.o
>  obj-$(CONFIG_FREEZER)		+= process.o
>  obj-$(CONFIG_SUSPEND)		+= suspend.o
> 


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

* Re: [PATCH 2/2] PM / QoS: unconditionally build the per-device constraints feature
  2012-02-12 21:27     ` Rafael J. Wysocki
@ 2012-02-15 15:33       ` mark gross
  0 siblings, 0 replies; 13+ messages in thread
From: mark gross @ 2012-02-15 15:33 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: markgross, Jean Pihet, Linux PM mailing list, linux-kernel,
	Venkatesh Pallipadi, Jean Pihet

On Sun, Feb 12, 2012 at 10:27:39PM +0100, Rafael J. Wysocki wrote:
> On Sunday, February 12, 2012, mark gross wrote:
> > why are these two patches?
> > 
> > I think you could squash them into one and it would be just fine.
> 
> Well, what sense does _device_ PM QoS make without CONFIG_PM?

I forgot about device pm qos.  

your right.

--mark

> Rafael
> 
> 
> > On Tue, Feb 07, 2012 at 09:34:06AM +0100, Jean Pihet wrote:
> > > The per-device PM QoS feature depends on CONFIG_PM which depends
> > > on PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
> > > not having these CONFIGs.
> > > 
> > > This patch allows the feature in all cases.
> > > 
> > > Signed-off-by: Jean Pihet <j-pihet@ti.com>
> > > Cc: Rafael J. Wysocki <rjw@sisk.pl>
> > > Cc: Mark Gross <markgross@thegnar.org>
> > > ---
> > >  drivers/base/power/Makefile |    3 ++-
> > >  include/linux/pm_qos.h      |   39 ---------------------------------------
> > >  2 files changed, 2 insertions(+), 40 deletions(-)
> > > 
> > > diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
> > > index 2e58ebb..312eb65 100644
> > > --- a/drivers/base/power/Makefile
> > > +++ b/drivers/base/power/Makefile
> > > @@ -1,4 +1,5 @@
> > > -obj-$(CONFIG_PM)	+= sysfs.o generic_ops.o common.o qos.o
> > > +obj-y			+= qos.o
> > > +obj-$(CONFIG_PM)	+= sysfs.o generic_ops.o common.o
> > >  obj-$(CONFIG_PM_SLEEP)	+= main.o wakeup.o
> > >  obj-$(CONFIG_PM_RUNTIME)	+= runtime.o
> > >  obj-$(CONFIG_PM_TRACE_RTC)	+= trace.o
> > > diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
> > > index 105be69..37b017a 100644
> > > --- a/include/linux/pm_qos.h
> > > +++ b/include/linux/pm_qos.h
> > > @@ -77,7 +77,6 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
> > >  int pm_qos_request_active(struct pm_qos_request *req);
> > >  s32 pm_qos_read_value(struct pm_qos_constraints *c);
> > >  
> > > -#ifdef CONFIG_PM
> > >  s32 __dev_pm_qos_read_value(struct device *dev);
> > >  s32 dev_pm_qos_read_value(struct device *dev);
> > >  int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
> > > @@ -94,43 +93,5 @@ void dev_pm_qos_constraints_init(struct device *dev);
> > >  void dev_pm_qos_constraints_destroy(struct device *dev);
> > >  int dev_pm_qos_add_ancestor_request(struct device *dev,
> > >  				    struct dev_pm_qos_request *req, s32 value);
> > > -#else
> > > -static inline s32 __dev_pm_qos_read_value(struct device *dev)
> > > -			{ return 0; }
> > > -static inline s32 dev_pm_qos_read_value(struct device *dev)
> > > -			{ return 0; }
> > > -static inline int dev_pm_qos_add_request(struct device *dev,
> > > -					 struct dev_pm_qos_request *req,
> > > -					 s32 value)
> > > -			{ return 0; }
> > > -static inline int dev_pm_qos_update_request(struct dev_pm_qos_request *req,
> > > -					    s32 new_value)
> > > -			{ return 0; }
> > > -static inline int dev_pm_qos_remove_request(struct dev_pm_qos_request *req)
> > > -			{ return 0; }
> > > -static inline int dev_pm_qos_add_notifier(struct device *dev,
> > > -					  struct notifier_block *notifier)
> > > -			{ return 0; }
> > > -static inline int dev_pm_qos_remove_notifier(struct device *dev,
> > > -					     struct notifier_block *notifier)
> > > -			{ return 0; }
> > > -static inline int dev_pm_qos_add_global_notifier(
> > > -					struct notifier_block *notifier)
> > > -			{ return 0; }
> > > -static inline int dev_pm_qos_remove_global_notifier(
> > > -					struct notifier_block *notifier)
> > > -			{ return 0; }
> > > -static inline void dev_pm_qos_constraints_init(struct device *dev)
> > > -{
> > > -	dev->power.power_state = PMSG_ON;
> > > -}
> > > -static inline void dev_pm_qos_constraints_destroy(struct device *dev)
> > > -{
> > > -	dev->power.power_state = PMSG_INVALID;
> > > -}
> > > -static inline int dev_pm_qos_add_ancestor_request(struct device *dev,
> > > -				    struct dev_pm_qos_request *req, s32 value)
> > > -			{ return 0; }
> > > -#endif
> > >  
> > >  #endif
> > 
> > 
> 

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

* Re: [linux-pm] [PATCH] PM / QoS: unconditionally build the feature
  2012-02-13 15:41     ` Rafael J. Wysocki
  2012-02-13 15:40       ` Jean Pihet
@ 2012-02-17 19:27       ` Pavel Machek
  2012-02-17 20:48         ` Rafael J. Wysocki
  1 sibling, 1 reply; 13+ messages in thread
From: Pavel Machek @ 2012-02-17 19:27 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Jean Pihet, Venkatesh Pallipadi, Linux PM mailing list,
	Jean Pihet, linux-kernel, Mark Gross

On Mon 2012-02-13 16:41:10, Rafael J. Wysocki wrote:
> On Monday, February 13, 2012, Jean Pihet wrote:
> > The PM QoS feature depends on CONFIG_PM which depends on
> > PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
> > not having these CONFIGs.
> > 
> > This patch allows the feature in all cases.
> > 
> > Signed-off-by: Jean Pihet <j-pihet@ti.com>
> > Reported-by: Venkatesh Pallipadi <venki@google.com>
> > Cc: Rafael J. Wysocki <rjw@sisk.pl>
> > Cc: Mark Gross <markgross@thegnar.org>
> 
> Applied, but I modified the changelog (please have a look at the
> linux-pm/pm-qos branch for details).

Is it good idea? For servers, power management / QoS is not
neccessary... What about fixing kconfig, instead?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [linux-pm] [PATCH] PM / QoS: unconditionally build the feature
  2012-02-17 19:27       ` [linux-pm] " Pavel Machek
@ 2012-02-17 20:48         ` Rafael J. Wysocki
  0 siblings, 0 replies; 13+ messages in thread
From: Rafael J. Wysocki @ 2012-02-17 20:48 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Jean Pihet, Venkatesh Pallipadi, Linux PM mailing list,
	Jean Pihet, linux-kernel, Mark Gross

On Friday, February 17, 2012, Pavel Machek wrote:
> On Mon 2012-02-13 16:41:10, Rafael J. Wysocki wrote:
> > On Monday, February 13, 2012, Jean Pihet wrote:
> > > The PM QoS feature depends on CONFIG_PM which depends on
> > > PM_SLEEP || PM_RUNTIME. This breaks CPU C-states with kernels
> > > not having these CONFIGs.
> > > 
> > > This patch allows the feature in all cases.
> > > 
> > > Signed-off-by: Jean Pihet <j-pihet@ti.com>
> > > Reported-by: Venkatesh Pallipadi <venki@google.com>
> > > Cc: Rafael J. Wysocki <rjw@sisk.pl>
> > > Cc: Mark Gross <markgross@thegnar.org>
> > 
> > Applied, but I modified the changelog (please have a look at the
> > linux-pm/pm-qos branch for details).
> 
> Is it good idea? For servers, power management / QoS is not
> neccessary... 

Yes, it is.  They surely use CPUidle.

Thanks,
Rafael

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

end of thread, other threads:[~2012-02-17 20:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-07  8:34 [PATCH 0/2] PM / QoS: unconditionally build the feature Jean Pihet
2012-02-07  8:34 ` [PATCH 1/2] " Jean Pihet
2012-02-12  2:06   ` mark gross
2012-02-12 21:37   ` Rafael J. Wysocki
2012-02-13 13:50   ` [PATCH] " Jean Pihet
2012-02-13 15:41     ` Rafael J. Wysocki
2012-02-13 15:40       ` Jean Pihet
2012-02-17 19:27       ` [linux-pm] " Pavel Machek
2012-02-17 20:48         ` Rafael J. Wysocki
2012-02-07  8:34 ` [PATCH 2/2] PM / QoS: unconditionally build the per-device constraints feature Jean Pihet
2012-02-12  2:07   ` mark gross
2012-02-12 21:27     ` Rafael J. Wysocki
2012-02-15 15:33       ` mark gross

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).