Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1326421 > unrolled thread

[PATCH 3/5] sound: query dynamic DEBUG_PAGEALLOC setting

Started byJoonsoo Kim <js1304@gmail.com>
First post2016-02-04 07:00 +0100
Last post2016-02-05 10:30 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/5] sound: query dynamic DEBUG_PAGEALLOC setting Joonsoo Kim <js1304@gmail.com> - 2016-02-04 07:00 +0100
    Re: [PATCH 3/5] sound: query dynamic DEBUG_PAGEALLOC setting David Rientjes <rientjes@google.com> - 2016-02-04 23:20 +0100
    Re: [PATCH 3/5] sound: query dynamic DEBUG_PAGEALLOC setting Takashi Iwai <tiwai@suse.de> - 2016-02-05 10:30 +0100

#1326421 — [PATCH 3/5] sound: query dynamic DEBUG_PAGEALLOC setting

FromJoonsoo Kim <js1304@gmail.com>
Date2016-02-04 07:00 +0100
Subject[PATCH 3/5] sound: query dynamic DEBUG_PAGEALLOC setting
Message-ID<qYl7t-4t9-19@gated-at.bofh.it>
We can disable debug_pagealloc processing even if the code is complied
with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query
whether it is enabled or not in runtime.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
 sound/drivers/pcsp/pcsp.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c
index 27e25bb..72e2d00 100644
--- a/sound/drivers/pcsp/pcsp.c
+++ b/sound/drivers/pcsp/pcsp.c
@@ -14,6 +14,7 @@
 #include <linux/input.h>
 #include <linux/delay.h>
 #include <linux/bitops.h>
+#include <linux/mm.h>
 #include "pcsp_input.h"
 #include "pcsp.h"
 
@@ -148,11 +149,11 @@ static int alsa_card_pcsp_init(struct device *dev)
 		return err;
 	}
 
-#ifdef CONFIG_DEBUG_PAGEALLOC
 	/* Well, CONFIG_DEBUG_PAGEALLOC makes the sound horrible. Lets alert */
-	printk(KERN_WARNING "PCSP: CONFIG_DEBUG_PAGEALLOC is enabled, "
-	       "which may make the sound noisy.\n");
-#endif
+	if (debug_pagealloc_enabled()) {
+		printk(KERN_WARNING "PCSP: CONFIG_DEBUG_PAGEALLOC is enabled, "
+		       "which may make the sound noisy.\n");
+	}
 
 	return 0;
 }
-- 
1.9.1

[toc] | [next] | [standalone]


#1327232

FromDavid Rientjes <rientjes@google.com>
Date2016-02-04 23:20 +0100
Message-ID<qYApP-887-13@gated-at.bofh.it>
In reply to#1326421
On Thu, 4 Feb 2016, Joonsoo Kim wrote:

> We can disable debug_pagealloc processing even if the code is complied
> with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query
> whether it is enabled or not in runtime.
> 
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Acked-by: David Rientjes <rientjes@google.com>

[toc] | [prev] | [next] | [standalone]


#1327557

FromTakashi Iwai <tiwai@suse.de>
Date2016-02-05 10:30 +0100
Message-ID<qYKSe-6Mb-5@gated-at.bofh.it>
In reply to#1326421
On Thu, 04 Feb 2016 06:56:24 +0100,
Joonsoo Kim wrote:
> 
> We can disable debug_pagealloc processing even if the code is complied
> with CONFIG_DEBUG_PAGEALLOC. This patch changes the code to query
> whether it is enabled or not in runtime.
> 
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Acked-by: Takashi Iwai <tiwai@suse.de>


Takashi


> ---
>  sound/drivers/pcsp/pcsp.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c
> index 27e25bb..72e2d00 100644
> --- a/sound/drivers/pcsp/pcsp.c
> +++ b/sound/drivers/pcsp/pcsp.c
> @@ -14,6 +14,7 @@
>  #include <linux/input.h>
>  #include <linux/delay.h>
>  #include <linux/bitops.h>
> +#include <linux/mm.h>
>  #include "pcsp_input.h"
>  #include "pcsp.h"
>  
> @@ -148,11 +149,11 @@ static int alsa_card_pcsp_init(struct device *dev)
>  		return err;
>  	}
>  
> -#ifdef CONFIG_DEBUG_PAGEALLOC
>  	/* Well, CONFIG_DEBUG_PAGEALLOC makes the sound horrible. Lets alert */
> -	printk(KERN_WARNING "PCSP: CONFIG_DEBUG_PAGEALLOC is enabled, "
> -	       "which may make the sound noisy.\n");
> -#endif
> +	if (debug_pagealloc_enabled()) {
> +		printk(KERN_WARNING "PCSP: CONFIG_DEBUG_PAGEALLOC is enabled, "
> +		       "which may make the sound noisy.\n");
> +	}
>  
>  	return 0;
>  }
> -- 
> 1.9.1
> 
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web