All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <877hv9yb9l.fsf@deeprootsystems.com>

diff --git a/a/1.txt b/N1/1.txt
index 31f0237..dcc86f2 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -20,147 +20,3 @@ Kevin Hilman <khilman@deeprootsystems.com> writes:
 Here's one more for the PM fixes queue from Atrem.
 
 Kevin
-
-
-
-
->From ee894b18e064447f86019af38a90ccb091880942 Mon Sep 17 00:00:00 2001
-From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-Date: Thu, 1 Oct 2009 10:01:55 +0300
-Subject: [PATCH 6/6] OMAP3: PM: introduce a new powerdomain walk helper
-
-The 'pwrdm_for_each()' function walks powerdomains with a spinlock
-locked, so the the callbacks cannot do anything which may sleep.
-This patch introduces a 'pwrdm_for_each_nolock()' helper which does
-the same, but without the spinlock locked. This fixes the following
-lockdep warning:
-
-[    0.000000] WARNING: at kernel/lockdep.c:2460 lockdep_trace_alloc+0xac/0xec()
-[    0.000000] Modules linked in:
-(unwind_backtrace+0x0/0xdc) from [<c0045464>] (warn_slowpath_common+0x48/0x60)
-(warn_slowpath_common+0x48/0x60) from [<c0067dd4>] (lockdep_trace_alloc+0xac/0xec)
-(lockdep_trace_alloc+0xac/0xec) from [<c009da14>] (kmem_cache_alloc+0x1c/0xd0)
-(kmem_cache_alloc+0x1c/0xd0) from [<c00b21d8>] (d_alloc+0x1c/0x1a4)
-(d_alloc+0x1c/0x1a4) from [<c00a887c>] (__lookup_hash+0xd8/0x118)
-(__lookup_hash+0xd8/0x118) from [<c00a9f20>] (lookup_one_len+0x84/0x94)
-(lookup_one_len+0x84/0x94) from [<c010d12c>] (debugfs_create_file+0x8c/0x20c)
-(debugfs_create_file+0x8c/0x20c) from [<c010d320>] (debugfs_create_dir+0x1c/0x20)
-(debugfs_create_dir+0x1c/0x20) from [<c000e8cc>] (pwrdms_setup+0x60/0x90)
-(pwrdms_setup+0x60/0x90) from [<c002e010>] (pwrdm_for_each+0x30/0x80)
-(pwrdm_for_each+0x30/0x80) from [<c000e79c>] (pm_dbg_init+0x7c/0x14c)
-(pm_dbg_init+0x7c/0x14c) from [<c00232b4>] (do_one_initcall+0x5c/0x1b8)
-(do_one_initcall+0x5c/0x1b8) from [<c00083f8>] (kernel_init+0x90/0x10c)
-(kernel_init+0x90/0x10c) from [<c00242c4>] (kernel_thread_exit+0x0/0x8)
-
-Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
----
- arch/arm/mach-omap2/pm-debug.c                |    4 +-
- arch/arm/mach-omap2/powerdomain.c             |   39 +++++++++++++++++-------
- arch/arm/plat-omap/include/mach/powerdomain.h |    2 +
- 3 files changed, 31 insertions(+), 14 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
-index 1b4c160..2fc4d6a 100644
---- a/arch/arm/mach-omap2/pm-debug.c
-+++ b/arch/arm/mach-omap2/pm-debug.c
-@@ -541,7 +541,7 @@ static int __init pm_dbg_init(void)
- 		printk(KERN_ERR "%s: only OMAP3 supported\n", __func__);
- 		return -ENODEV;
- 	}
--		
-+
- 	d = debugfs_create_dir("pm_debug", NULL);
- 	if (IS_ERR(d))
- 		return PTR_ERR(d);
-@@ -551,7 +551,7 @@ static int __init pm_dbg_init(void)
- 	(void) debugfs_create_file("time", S_IRUGO,
- 		d, (void *)DEBUG_FILE_TIMERS, &debug_fops);
- 
--	pwrdm_for_each(pwrdms_setup, (void *)d);
-+	pwrdm_for_each_nolock(pwrdms_setup, (void *)d);
- 
- 	pm_dbg_dir = debugfs_create_dir("registers", d);
- 	if (IS_ERR(pm_dbg_dir))
-diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
-index 2594cbf..f00289a 100644
---- a/arch/arm/mach-omap2/powerdomain.c
-+++ b/arch/arm/mach-omap2/powerdomain.c
-@@ -273,35 +273,50 @@ struct powerdomain *pwrdm_lookup(const char *name)
- }
- 
- /**
-- * pwrdm_for_each - call function on each registered clockdomain
-+ * pwrdm_for_each_nolock - call function on each registered clockdomain
-  * @fn: callback function *
-  *
-  * Call the supplied function for each registered powerdomain.  The
-  * callback function can return anything but 0 to bail out early from
-- * the iterator.  The callback function is called with the pwrdm_rwlock
-- * held for reading, so no powerdomain structure manipulation
-- * functions should be called from the callback, although hardware
-- * powerdomain control functions are fine.  Returns the last return
-- * value of the callback function, which should be 0 for success or
-- * anything else to indicate failure; or -EINVAL if the function
-- * pointer is null.
-+ * the iterator.  Returns the last return value of the callback function, which
-+ * should be 0 for success or anything else to indicate failure; or -EINVAL if
-+ * the function pointer is null.
-  */
--int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm, void *user),
--			void *user)
-+int pwrdm_for_each_nolock(int (*fn)(struct powerdomain *pwrdm, void *user),
-+				void *user)
- {
- 	struct powerdomain *temp_pwrdm;
--	unsigned long flags;
- 	int ret = 0;
- 
- 	if (!fn)
- 		return -EINVAL;
- 
--	read_lock_irqsave(&pwrdm_rwlock, flags);
- 	list_for_each_entry(temp_pwrdm, &pwrdm_list, node) {
- 		ret = (*fn)(temp_pwrdm, user);
- 		if (ret)
- 			break;
- 	}
-+
-+	return ret;
-+}
-+
-+/**
-+ * pwrdm_for_each - call function on each registered clockdomain
-+ * @fn: callback function *
-+ *
-+ * This function is the same as 'pwrdm_for_each_nolock()', but keeps the
-+ * &pwrdm_rwlock locked for reading, so no powerdomain structure manipulation
-+ * functions should be called from the callback, although hardware powerdomain
-+ * control functions are fine.
-+ */
-+int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm, void *user),
-+			void *user)
-+{
-+	unsigned long flags;
-+	int ret;
-+
-+	read_lock_irqsave(&pwrdm_rwlock, flags);
-+	ret = pwrdm_for_each_nolock(fn, user);
- 	read_unlock_irqrestore(&pwrdm_rwlock, flags);
- 
- 	return ret;
-diff --git a/arch/arm/plat-omap/include/mach/powerdomain.h b/arch/arm/plat-omap/include/mach/powerdomain.h
-index 6271d85..fa64614 100644
---- a/arch/arm/plat-omap/include/mach/powerdomain.h
-+++ b/arch/arm/plat-omap/include/mach/powerdomain.h
-@@ -135,6 +135,8 @@ struct powerdomain *pwrdm_lookup(const char *name);
- 
- int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm, void *user),
- 			void *user);
-+int pwrdm_for_each_nolock(int (*fn)(struct powerdomain *pwrdm, void *user),
-+			void *user);
- 
- int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm);
- int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm);
--- 
-1.6.4.3
diff --git a/a/content_digest b/N1/content_digest
index 7288d82..49108a2 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,9 +1,8 @@
  "ref\01254507295-11381-1-git-send-email-khilman@deeprootsystems.com\0"
- "From\0Kevin Hilman <khilman@deeprootsystems.com>\0"
- "Subject\0Re: [PATCH 0/5] OMAP PM fixes for 2.6.32\0"
+ "From\0khilman@deeprootsystems.com (Kevin Hilman)\0"
+ "Subject\0[PATCH 0/5] OMAP PM fixes for 2.6.32\0"
  "Date\0Mon, 05 Oct 2009 10:57:10 -0700\0"
- "To\0linux-omap@vger.kernel.org\0"
- "Cc\0linux-arm-kernel@lists.infradead.org\0"
+ "To\0linux-arm-kernel@lists.infradead.org\0"
  "\00:1\0"
  "b\0"
  "Kevin Hilman <khilman@deeprootsystems.com> writes:\n"
@@ -27,150 +26,6 @@
  "\n"
  "Here's one more for the PM fixes queue from Atrem.\n"
  "\n"
- "Kevin\n"
- "\n"
- "\n"
- "\n"
- "\n"
- ">From ee894b18e064447f86019af38a90ccb091880942 Mon Sep 17 00:00:00 2001\n"
- "From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>\n"
- "Date: Thu, 1 Oct 2009 10:01:55 +0300\n"
- "Subject: [PATCH 6/6] OMAP3: PM: introduce a new powerdomain walk helper\n"
- "\n"
- "The 'pwrdm_for_each()' function walks powerdomains with a spinlock\n"
- "locked, so the the callbacks cannot do anything which may sleep.\n"
- "This patch introduces a 'pwrdm_for_each_nolock()' helper which does\n"
- "the same, but without the spinlock locked. This fixes the following\n"
- "lockdep warning:\n"
- "\n"
- "[    0.000000] WARNING: at kernel/lockdep.c:2460 lockdep_trace_alloc+0xac/0xec()\n"
- "[    0.000000] Modules linked in:\n"
- "(unwind_backtrace+0x0/0xdc) from [<c0045464>] (warn_slowpath_common+0x48/0x60)\n"
- "(warn_slowpath_common+0x48/0x60) from [<c0067dd4>] (lockdep_trace_alloc+0xac/0xec)\n"
- "(lockdep_trace_alloc+0xac/0xec) from [<c009da14>] (kmem_cache_alloc+0x1c/0xd0)\n"
- "(kmem_cache_alloc+0x1c/0xd0) from [<c00b21d8>] (d_alloc+0x1c/0x1a4)\n"
- "(d_alloc+0x1c/0x1a4) from [<c00a887c>] (__lookup_hash+0xd8/0x118)\n"
- "(__lookup_hash+0xd8/0x118) from [<c00a9f20>] (lookup_one_len+0x84/0x94)\n"
- "(lookup_one_len+0x84/0x94) from [<c010d12c>] (debugfs_create_file+0x8c/0x20c)\n"
- "(debugfs_create_file+0x8c/0x20c) from [<c010d320>] (debugfs_create_dir+0x1c/0x20)\n"
- "(debugfs_create_dir+0x1c/0x20) from [<c000e8cc>] (pwrdms_setup+0x60/0x90)\n"
- "(pwrdms_setup+0x60/0x90) from [<c002e010>] (pwrdm_for_each+0x30/0x80)\n"
- "(pwrdm_for_each+0x30/0x80) from [<c000e79c>] (pm_dbg_init+0x7c/0x14c)\n"
- "(pm_dbg_init+0x7c/0x14c) from [<c00232b4>] (do_one_initcall+0x5c/0x1b8)\n"
- "(do_one_initcall+0x5c/0x1b8) from [<c00083f8>] (kernel_init+0x90/0x10c)\n"
- "(kernel_init+0x90/0x10c) from [<c00242c4>] (kernel_thread_exit+0x0/0x8)\n"
- "\n"
- "Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>\n"
- "Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>\n"
- "---\n"
- " arch/arm/mach-omap2/pm-debug.c                |    4 +-\n"
- " arch/arm/mach-omap2/powerdomain.c             |   39 +++++++++++++++++-------\n"
- " arch/arm/plat-omap/include/mach/powerdomain.h |    2 +\n"
- " 3 files changed, 31 insertions(+), 14 deletions(-)\n"
- "\n"
- "diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c\n"
- "index 1b4c160..2fc4d6a 100644\n"
- "--- a/arch/arm/mach-omap2/pm-debug.c\n"
- "+++ b/arch/arm/mach-omap2/pm-debug.c\n"
- "@@ -541,7 +541,7 @@ static int __init pm_dbg_init(void)\n"
- " \t\tprintk(KERN_ERR \"%s: only OMAP3 supported\\n\", __func__);\n"
- " \t\treturn -ENODEV;\n"
- " \t}\n"
- "-\t\t\n"
- "+\n"
- " \td = debugfs_create_dir(\"pm_debug\", NULL);\n"
- " \tif (IS_ERR(d))\n"
- " \t\treturn PTR_ERR(d);\n"
- "@@ -551,7 +551,7 @@ static int __init pm_dbg_init(void)\n"
- " \t(void) debugfs_create_file(\"time\", S_IRUGO,\n"
- " \t\td, (void *)DEBUG_FILE_TIMERS, &debug_fops);\n"
- " \n"
- "-\tpwrdm_for_each(pwrdms_setup, (void *)d);\n"
- "+\tpwrdm_for_each_nolock(pwrdms_setup, (void *)d);\n"
- " \n"
- " \tpm_dbg_dir = debugfs_create_dir(\"registers\", d);\n"
- " \tif (IS_ERR(pm_dbg_dir))\n"
- "diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c\n"
- "index 2594cbf..f00289a 100644\n"
- "--- a/arch/arm/mach-omap2/powerdomain.c\n"
- "+++ b/arch/arm/mach-omap2/powerdomain.c\n"
- "@@ -273,35 +273,50 @@ struct powerdomain *pwrdm_lookup(const char *name)\n"
- " }\n"
- " \n"
- " /**\n"
- "- * pwrdm_for_each - call function on each registered clockdomain\n"
- "+ * pwrdm_for_each_nolock - call function on each registered clockdomain\n"
- "  * @fn: callback function *\n"
- "  *\n"
- "  * Call the supplied function for each registered powerdomain.  The\n"
- "  * callback function can return anything but 0 to bail out early from\n"
- "- * the iterator.  The callback function is called with the pwrdm_rwlock\n"
- "- * held for reading, so no powerdomain structure manipulation\n"
- "- * functions should be called from the callback, although hardware\n"
- "- * powerdomain control functions are fine.  Returns the last return\n"
- "- * value of the callback function, which should be 0 for success or\n"
- "- * anything else to indicate failure; or -EINVAL if the function\n"
- "- * pointer is null.\n"
- "+ * the iterator.  Returns the last return value of the callback function, which\n"
- "+ * should be 0 for success or anything else to indicate failure; or -EINVAL if\n"
- "+ * the function pointer is null.\n"
- "  */\n"
- "-int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm, void *user),\n"
- "-\t\t\tvoid *user)\n"
- "+int pwrdm_for_each_nolock(int (*fn)(struct powerdomain *pwrdm, void *user),\n"
- "+\t\t\t\tvoid *user)\n"
- " {\n"
- " \tstruct powerdomain *temp_pwrdm;\n"
- "-\tunsigned long flags;\n"
- " \tint ret = 0;\n"
- " \n"
- " \tif (!fn)\n"
- " \t\treturn -EINVAL;\n"
- " \n"
- "-\tread_lock_irqsave(&pwrdm_rwlock, flags);\n"
- " \tlist_for_each_entry(temp_pwrdm, &pwrdm_list, node) {\n"
- " \t\tret = (*fn)(temp_pwrdm, user);\n"
- " \t\tif (ret)\n"
- " \t\t\tbreak;\n"
- " \t}\n"
- "+\n"
- "+\treturn ret;\n"
- "+}\n"
- "+\n"
- "+/**\n"
- "+ * pwrdm_for_each - call function on each registered clockdomain\n"
- "+ * @fn: callback function *\n"
- "+ *\n"
- "+ * This function is the same as 'pwrdm_for_each_nolock()', but keeps the\n"
- "+ * &pwrdm_rwlock locked for reading, so no powerdomain structure manipulation\n"
- "+ * functions should be called from the callback, although hardware powerdomain\n"
- "+ * control functions are fine.\n"
- "+ */\n"
- "+int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm, void *user),\n"
- "+\t\t\tvoid *user)\n"
- "+{\n"
- "+\tunsigned long flags;\n"
- "+\tint ret;\n"
- "+\n"
- "+\tread_lock_irqsave(&pwrdm_rwlock, flags);\n"
- "+\tret = pwrdm_for_each_nolock(fn, user);\n"
- " \tread_unlock_irqrestore(&pwrdm_rwlock, flags);\n"
- " \n"
- " \treturn ret;\n"
- "diff --git a/arch/arm/plat-omap/include/mach/powerdomain.h b/arch/arm/plat-omap/include/mach/powerdomain.h\n"
- "index 6271d85..fa64614 100644\n"
- "--- a/arch/arm/plat-omap/include/mach/powerdomain.h\n"
- "+++ b/arch/arm/plat-omap/include/mach/powerdomain.h\n"
- "@@ -135,6 +135,8 @@ struct powerdomain *pwrdm_lookup(const char *name);\n"
- " \n"
- " int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm, void *user),\n"
- " \t\t\tvoid *user);\n"
- "+int pwrdm_for_each_nolock(int (*fn)(struct powerdomain *pwrdm, void *user),\n"
- "+\t\t\tvoid *user);\n"
- " \n"
- " int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm);\n"
- " int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm);\n"
- "-- \n"
- 1.6.4.3
+ Kevin
 
-40cd7bd05b48706481ab07da2c00f9a2465ff777cbc2961a9ec2789fa9a5b2bd
+0df609f14252df101bc4ee6145a6b99fcde0f472b7ed432cc3a6427df555766e

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.