public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] pci cpumask: remove local cpumask_t's from the stack
@ 2009-01-05 20:33 Mike Travis
  2009-01-05 20:33 ` [PATCH 1/2] cpumask: update local_cpus_show to use new cpumask API Mike Travis
  2009-01-05 20:33 ` [PATCH 2/2] cpumask: update pci_bus_show_cpuaffinity " Mike Travis
  0 siblings, 2 replies; 6+ messages in thread
From: Mike Travis @ 2009-01-05 20:33 UTC (permalink / raw)
  To: Jesse Barnes, Ingo Molnar
  Cc: Rusty Russell, H. Peter Anvin, Thomas Gleixner, Jack Steiner,
	linux-kernel


Rebased against linux-next/master (v2.6.28-rc8-5814-g8dba8f5)>

*** Note these are also in tip/cpus4096 at:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git
branch: cpus4096

    588235b: cpumask: update pci_bus_show_cpuaffinity to use new cpumask API
    3be8305: cpumask: update local_cpus_show to use new cpumask API

(Perhaps "git-pulling" them from there is a better method?)

Signed-off-by: Mike Travis <travis@sgi.com>

-- 

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

* [PATCH 1/2] cpumask: update local_cpus_show to use new cpumask API
  2009-01-05 20:33 [PATCH 0/2] pci cpumask: remove local cpumask_t's from the stack Mike Travis
@ 2009-01-05 20:33 ` Mike Travis
  2009-01-05 21:10   ` Jesse Barnes
  2009-01-05 20:33 ` [PATCH 2/2] cpumask: update pci_bus_show_cpuaffinity " Mike Travis
  1 sibling, 1 reply; 6+ messages in thread
From: Mike Travis @ 2009-01-05 20:33 UTC (permalink / raw)
  To: Jesse Barnes, Ingo Molnar
  Cc: Rusty Russell, H. Peter Anvin, Thomas Gleixner, Jack Steiner,
	linux-kernel

[-- Attachment #1: cpumask:update-local_cpus_show.patch --]
[-- Type: text/plain, Size: 1415 bytes --]

Impact: cleanup, reduce stack usage, use new cpumask API.

Replace the local cpumask_t variable with a pointer to the
const cpumask that needs to be printed.

Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/pci/pci-sysfs.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- linux-2.6-for-ingo.orig/drivers/pci/pci-sysfs.c
+++ linux-2.6-for-ingo/drivers/pci/pci-sysfs.c
@@ -70,11 +70,11 @@ static ssize_t broken_parity_status_stor
 static ssize_t local_cpus_show(struct device *dev,
 			struct device_attribute *attr, char *buf)
 {		
-	cpumask_t mask;
+	const struct cpumask *mask;
 	int len;
 
-	mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
-	len = cpumask_scnprintf(buf, PAGE_SIZE-2, &mask);
+	mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
+	len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask);
 	buf[len++] = '\n';
 	buf[len] = '\0';
 	return len;
@@ -84,11 +84,11 @@ static ssize_t local_cpus_show(struct de
 static ssize_t local_cpulist_show(struct device *dev,
 			struct device_attribute *attr, char *buf)
 {
-	cpumask_t mask;
+	const struct cpumask *mask;
 	int len;
 
-	mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
-	len = cpulist_scnprintf(buf, PAGE_SIZE-2, &mask);
+	mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
+	len = cpulist_scnprintf(buf, PAGE_SIZE-2, mask);
 	buf[len++] = '\n';
 	buf[len] = '\0';
 	return len;

-- 

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

* [PATCH 2/2] cpumask: update pci_bus_show_cpuaffinity to use new cpumask API
  2009-01-05 20:33 [PATCH 0/2] pci cpumask: remove local cpumask_t's from the stack Mike Travis
  2009-01-05 20:33 ` [PATCH 1/2] cpumask: update local_cpus_show to use new cpumask API Mike Travis
@ 2009-01-05 20:33 ` Mike Travis
  1 sibling, 0 replies; 6+ messages in thread
From: Mike Travis @ 2009-01-05 20:33 UTC (permalink / raw)
  To: Jesse Barnes, Ingo Molnar
  Cc: Rusty Russell, H. Peter Anvin, Thomas Gleixner, Jack Steiner,
	linux-kernel

[-- Attachment #1: cpumask:update-pci_bus_show_cpuaffinity.patch --]
[-- Type: text/plain, Size: 946 bytes --]

Impact: cleanup, reduce stack usage, use new cpumask API.

Replace the local cpumask_t variable with a pointer to the
const cpumask that needs to be printed.

Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/pci/probe.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- linux-2.6-for-ingo.orig/drivers/pci/probe.c
+++ linux-2.6-for-ingo/drivers/pci/probe.c
@@ -51,12 +51,12 @@ static ssize_t pci_bus_show_cpuaffinity(
 					char *buf)
 {
 	int ret;
-	cpumask_t cpumask;
+	const struct cpumask *cpumask;
 
-	cpumask = pcibus_to_cpumask(to_pci_bus(dev));
+	cpumask = cpumask_of_pcibus(to_pci_bus(dev));
 	ret = type?
-		cpulist_scnprintf(buf, PAGE_SIZE-2, &cpumask) :
-		cpumask_scnprintf(buf, PAGE_SIZE-2, &cpumask);
+		cpulist_scnprintf(buf, PAGE_SIZE-2, cpumask) :
+		cpumask_scnprintf(buf, PAGE_SIZE-2, cpumask);
 	buf[ret++] = '\n';
 	buf[ret] = '\0';
 	return ret;

-- 

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

* Re: [PATCH 1/2] cpumask: update local_cpus_show to use new cpumask API
  2009-01-05 20:33 ` [PATCH 1/2] cpumask: update local_cpus_show to use new cpumask API Mike Travis
@ 2009-01-05 21:10   ` Jesse Barnes
  2009-01-05 23:08     ` Mike Travis
  2009-01-06 12:37     ` Ingo Molnar
  0 siblings, 2 replies; 6+ messages in thread
From: Jesse Barnes @ 2009-01-05 21:10 UTC (permalink / raw)
  To: Mike Travis
  Cc: Ingo Molnar, Rusty Russell, H. Peter Anvin, Thomas Gleixner,
	Jack Steiner, linux-kernel

On Monday, January 5, 2009 12:33 pm Mike Travis wrote:
> Impact: cleanup, reduce stack usage, use new cpumask API.
>
> Replace the local cpumask_t variable with a pointer to the
> const cpumask that needs to be printed.
>
> Signed-off-by: Mike Travis <travis@sgi.com>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/pci/pci-sysfs.c |   12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Hm, clearly there are other patches in Ingo's tree that this depends on, since 
this patch assumes the presence of cpumask_of_pcibus and has slightly 
different cpumask_scnprintf context.  I'll just let Ingo push the whole thing.

-- 
Jesse Barnes, Intel Open Source Technology Center


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

* Re: [PATCH 1/2] cpumask: update local_cpus_show to use new cpumask API
  2009-01-05 21:10   ` Jesse Barnes
@ 2009-01-05 23:08     ` Mike Travis
  2009-01-06 12:37     ` Ingo Molnar
  1 sibling, 0 replies; 6+ messages in thread
From: Mike Travis @ 2009-01-05 23:08 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: Ingo Molnar, Rusty Russell, H. Peter Anvin, Thomas Gleixner,
	Jack Steiner, linux-kernel

Jesse Barnes wrote:
> On Monday, January 5, 2009 12:33 pm Mike Travis wrote:
>> Impact: cleanup, reduce stack usage, use new cpumask API.
>>
>> Replace the local cpumask_t variable with a pointer to the
>> const cpumask that needs to be printed.
>>
>> Signed-off-by: Mike Travis <travis@sgi.com>
>> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
>> ---
>>  drivers/pci/pci-sysfs.c |   12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> Hm, clearly there are other patches in Ingo's tree that this depends on, since 
> this patch assumes the presence of cpumask_of_pcibus and has slightly 
> different cpumask_scnprintf context.  I'll just let Ingo push the whole thing.
> 

Ok, thanks.  I saw that but I *think* all of this is in Linus' tree.

Cheers,
Mike

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

* Re: [PATCH 1/2] cpumask: update local_cpus_show to use new cpumask API
  2009-01-05 21:10   ` Jesse Barnes
  2009-01-05 23:08     ` Mike Travis
@ 2009-01-06 12:37     ` Ingo Molnar
  1 sibling, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2009-01-06 12:37 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: Mike Travis, Ingo Molnar, Rusty Russell, H. Peter Anvin,
	Thomas Gleixner, Jack Steiner, linux-kernel


* Jesse Barnes <jbarnes@virtuousgeek.org> wrote:

> On Monday, January 5, 2009 12:33 pm Mike Travis wrote:
> > Impact: cleanup, reduce stack usage, use new cpumask API.
> >
> > Replace the local cpumask_t variable with a pointer to the
> > const cpumask that needs to be printed.
> >
> > Signed-off-by: Mike Travis <travis@sgi.com>
> > Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> >  drivers/pci/pci-sysfs.c |   12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> Hm, clearly there are other patches in Ingo's tree that this depends on, 
> since this patch assumes the presence of cpumask_of_pcibus and has 
> slightly different cpumask_scnprintf context.  I'll just let Ingo push 
> the whole thing.

okay, will push them to Linus.

	Ingo

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

end of thread, other threads:[~2009-01-06 12:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-05 20:33 [PATCH 0/2] pci cpumask: remove local cpumask_t's from the stack Mike Travis
2009-01-05 20:33 ` [PATCH 1/2] cpumask: update local_cpus_show to use new cpumask API Mike Travis
2009-01-05 21:10   ` Jesse Barnes
2009-01-05 23:08     ` Mike Travis
2009-01-06 12:37     ` Ingo Molnar
2009-01-05 20:33 ` [PATCH 2/2] cpumask: update pci_bus_show_cpuaffinity " Mike Travis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox