* Re: [GIT PULL] Disintegrate and kill asm/system.h
[not found] ` <20120329135555.06593144b65bf81cc9191f8a@canb.auug.org.au>
@ 2012-03-29 4:15 ` Stephen Rothwell
2012-03-29 4:21 ` Michael Neuling
2012-03-29 4:24 ` Linus Torvalds
0 siblings, 2 replies; 10+ messages in thread
From: Stephen Rothwell @ 2012-03-29 4:15 UTC (permalink / raw)
To: Linus
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
[-- Attachment #1: Type: text/plain, Size: 2677 bytes --]
Hi all,
On Thu, 29 Mar 2012 13:55:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 29 Mar 2012 13:50:44 +1100 Michael Neuling <mikey@neuling.org> wrote:
> >
> > > Here are a bunch of patches to disintegrate asm/system.h into a set of separate
> > > bits to relieve the problem of circular inclusion dependencies.
> > >
> > > The following changes since commit 437538267b672f9320833907f1b5acbb2605f4be:
> > >
> > > Merge tag 'fbdev-updates-for-3.4' of git://github.com/schandinat/linux-2.6 (2012-03-22 20:43:40 -0700)
> > >
> > > are available in the git repository at:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system.git split-asm-system_h
> >
> > It would have been nice to have this in linux-next for a day or two to
> > sort out the merge issues, hence....
>
> Um, what can I say but "yeah, it would have been nice" :-(
The following patch fixes (as much as possible) a powerpc allyesconfig build.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Mar 2012 14:58:10 +1100
Subject: [PATCH] powerpc: fix fallout from system.h split up
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/fadump.c | 2 ++
arch/powerpc/kernel/kgdb.c | 1 +
kernel/irq/irqdomain.c | 3 +++
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index cfe7a38..18bdf74 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -40,6 +40,8 @@
#include <asm/prom.h>
#include <asm/rtas.h>
#include <asm/fadump.h>
+#include <asm/debug.h>
+#include <asm/setup.h>
static struct fw_dump fw_dump;
static struct fadump_mem_struct fdm;
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 76a6e40..782bd0a 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -24,6 +24,7 @@
#include <asm/current.h>
#include <asm/processor.h>
#include <asm/machdep.h>
+#include <asm/debug.h>
/*
* This table contains the mapping between PowerPC hardware trap types, and
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index af48e59..1f94ddf 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -12,6 +12,9 @@
#include <linux/slab.h>
#include <linux/smp.h>
#include <linux/fs.h>
+#ifdef CONFIG_VIRQ_DEBUG
+#include <asm/debug.h>
+#endif
#define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs.
* ie. legacy 8259, gets irqs 1..15 */
--
1.7.9.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [GIT PULL] Disintegrate and kill asm/system.h
2012-03-29 4:15 ` [GIT PULL] Disintegrate and kill asm/system.h Stephen Rothwell
@ 2012-03-29 4:21 ` Michael Neuling
2012-03-29 4:24 ` Linus Torvalds
1 sibling, 0 replies; 10+ messages in thread
From: Michael Neuling @ 2012-03-29 4:21 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, arnd, ppc-dev, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, Linus
In message <20120329151544.ef2117821dfb459e8b52af48@canb.auug.org.au> you wrote
:
> --Signature=_Thu__29_Mar_2012_15_15_44_+1100_WbAuFOESkuBxVlHq
> Content-Type: text/plain; charset=US-ASCII
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> Hi all,
>
> On Thu, 29 Mar 2012 13:55:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> =
> wrote:
> >
> > On Thu, 29 Mar 2012 13:50:44 +1100 Michael Neuling <mikey@neuling.org> wr=
> ote:
> > >
> > > > Here are a bunch of patches to disintegrate asm/system.h into a set o=
> f separate
> > > > bits to relieve the problem of circular inclusion dependencies.
> > > >=20
> > > > The following changes since commit 437538267b672f9320833907f1b5acbb26=
> 05f4be:
> > > >=20
> > > > Merge tag 'fbdev-updates-for-3.4' of git://github.com/schandinat/li=
> nux-2.6 (2012-03-22 20:43:40 -0700)
> > > >=20
> > > > are available in the git repository at:
> > > >=20
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_sy=
> stem.git split-asm-system_h
> > >=20
> > > It would have been nice to have this in linux-next for a day or two to
> > > sort out the merge issues, hence....
> >=20
> > Um, what can I say but "yeah, it would have been nice" :-(
>
> The following patch fixes (as much as possible) a powerpc allyesconfig build.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 29 Mar 2012 14:58:10 +1100
> Subject: [PATCH] powerpc: fix fallout from system.h split up
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Michael Neuling <mikey@neuling.org>
Thanks, this is much better than my crappy fix.
Mikey
> ---
> arch/powerpc/kernel/fadump.c | 2 ++
> arch/powerpc/kernel/kgdb.c | 1 +
> kernel/irq/irqdomain.c | 3 +++
> 3 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
> index cfe7a38..18bdf74 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -40,6 +40,8 @@
> #include <asm/prom.h>
> #include <asm/rtas.h>
> #include <asm/fadump.h>
> +#include <asm/debug.h>
> +#include <asm/setup.h>
> =20
> static struct fw_dump fw_dump;
> static struct fadump_mem_struct fdm;
> diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
> index 76a6e40..782bd0a 100644
> --- a/arch/powerpc/kernel/kgdb.c
> +++ b/arch/powerpc/kernel/kgdb.c
> @@ -24,6 +24,7 @@
> #include <asm/current.h>
> #include <asm/processor.h>
> #include <asm/machdep.h>
> +#include <asm/debug.h>
> =20
> /*
> * This table contains the mapping between PowerPC hardware trap types, and
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af48e59..1f94ddf 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -12,6 +12,9 @@
> #include <linux/slab.h>
> #include <linux/smp.h>
> #include <linux/fs.h>
> +#ifdef CONFIG_VIRQ_DEBUG
> +#include <asm/debug.h>
> +#endif
> =20
> #define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs.
> * ie. legacy 8259, gets irqs 1..15 */
> --=20
> 1.7.9.1
>
> --=20
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
>
> --Signature=_Thu__29_Mar_2012_15_15_44_+1100_WbAuFOESkuBxVlHq
> Content-Type: application/pgp-signature
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iQIcBAEBCAAGBQJPc+HwAAoJEECxmPOUX5FET2oP/2slayQM3wN4DhXAE/v+JeBU
> bEmqlZE5DgrAK6Pu65YrlZlYVvfvOsivTwu/tfQ+FLlJHGiPHbVu7zKv/em+cRtz
> dTMQSuYolSyRzAyk+QBD4lUN+SZ8OFfs9XbVxhyTCBe+1qdUUdyul4ajrvo9vMiw
> +0eHw1WlozwGOdWcYy/9BdHXPVUiJGjWksmGmAQz0aTbTY5DVfKjiEsHIRS+lJ0f
> nsrKfWOk5z+4yT2AjteEYcPScxxO2F73VZEr/xBEn5R3siuEgZF6P1n96gTxe/3l
> jdKQG6R2QHfKBpx8kphL3qAom5ehese2YaYkufDn4u+/QXtrDoYE/F2a646I7dc3
> LN2SCiLLiaba11uW06cfdiwpkrlF05nHJR3CnEUt8dSQbS/vEjxlRHa9V3cl7Y9/
> c2rK6z3YQwZXL53LTO4YMv5yaYDathWPKwanGJSocWICq6gbtWl4XevoLRwmkRo1
> TuMAj1jy69mxFdiQQA5LO+JRkQN4POo2+vBUb+0RncNrR/tIpp5xB9np30bwIdNI
> +VS0I2IQD4VntQp+CF/O/y8SEfyqo/7BWPpZhneRy6LMKC9aOe1RpSgKDa4ZvWYh
> BW60vTDNnc5CNSjOtfOtW55m+JH/eY2/Hidy/Yt7PjLXGi+6KKy0eY7Kl6G0PuS1
> 3/KLLW8Vu3GxBLUWiXZv
> =1Nhy
> -----END PGP SIGNATURE-----
>
> --Signature=_Thu__29_Mar_2012_15_15_44_+1100_WbAuFOESkuBxVlHq--
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [GIT PULL] Disintegrate and kill asm/system.h
2012-03-29 4:15 ` [GIT PULL] Disintegrate and kill asm/system.h Stephen Rothwell
2012-03-29 4:21 ` Michael Neuling
@ 2012-03-29 4:24 ` Linus Torvalds
2012-03-29 4:42 ` Stephen Rothwell
1 sibling, 1 reply; 10+ messages in thread
From: Linus Torvalds @ 2012-03-29 4:24 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
On Wed, Mar 28, 2012 at 9:15 PM, Stephen Rothwell <sfr@canb.auug.org.au> wr=
ote:
>
> The following patch fixes (as much as possible) a powerpc allyesconfig bu=
ild.
Ugh:
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af48e59..1f94ddf 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -12,6 +12,9 @@
> =A0#include <linux/slab.h>
> =A0#include <linux/smp.h>
> =A0#include <linux/fs.h>
> +#ifdef CONFIG_VIRQ_DEBUG
> +#include <asm/debug.h>
> +#endif
Can we please move that abortion into arch/powerpc/? Instead of making
generic code even uglier..
Linus
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [GIT PULL] Disintegrate and kill asm/system.h
2012-03-29 4:24 ` Linus Torvalds
@ 2012-03-29 4:42 ` Stephen Rothwell
2012-03-29 4:55 ` Michael Neuling
2012-03-29 5:02 ` Linus Torvalds
0 siblings, 2 replies; 10+ messages in thread
From: Stephen Rothwell @ 2012-03-29 4:42 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
[-- Attachment #1: Type: text/plain, Size: 6352 bytes --]
Hi Linus,
On Wed, 28 Mar 2012 21:24:41 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> On Wed, Mar 28, 2012 at 9:15 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > The following patch fixes (as much as possible) a powerpc allyesconfig build.
>
> Ugh:
>
> > diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> > index af48e59..1f94ddf 100644
> > --- a/kernel/irq/irqdomain.c
> > +++ b/kernel/irq/irqdomain.c
> > @@ -12,6 +12,9 @@
> > #include <linux/slab.h>
> > #include <linux/smp.h>
> > #include <linux/fs.h>
> > +#ifdef CONFIG_VIRQ_DEBUG
> > +#include <asm/debug.h>
> > +#endif
>
> Can we please move that abortion into arch/powerpc/? Instead of making
> generic code even uglier..
How about this (build tested on powerpc allyesconfig):
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Mar 2012 14:58:10 +1100
Subject: [PATCH] powerpc: fix fallout from system.h split up
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/fadump.c | 2 +
arch/powerpc/kernel/irq.c | 72 ++++++++++++++++++++++++++++++++++++++++++
arch/powerpc/kernel/kgdb.c | 1 +
kernel/irq/irqdomain.c | 72 ------------------------------------------
4 files changed, 75 insertions(+), 72 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index cfe7a38..18bdf74 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -40,6 +40,8 @@
#include <asm/prom.h>
#include <asm/rtas.h>
#include <asm/fadump.h>
+#include <asm/debug.h>
+#include <asm/setup.h>
static struct fw_dump fw_dump;
static struct fadump_mem_struct fdm;
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 243dbab..ff165f5 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -623,3 +623,75 @@ static int __init setup_noirqdistrib(char *str)
__setup("noirqdistrib", setup_noirqdistrib);
#endif /* CONFIG_PPC64 */
+
+#ifdef CONFIG_VIRQ_DEBUG
+static int virq_debug_show(struct seq_file *m, void *private)
+{
+ unsigned long flags;
+ struct irq_desc *desc;
+ const char *p;
+ static const char none[] = "none";
+ void *data;
+ int i;
+
+ seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
+ "chip name", "chip data", "domain name");
+
+ for (i = 1; i < nr_irqs; i++) {
+ desc = irq_to_desc(i);
+ if (!desc)
+ continue;
+
+ raw_spin_lock_irqsave(&desc->lock, flags);
+
+ if (desc->action && desc->action->handler) {
+ struct irq_chip *chip;
+
+ seq_printf(m, "%5d ", i);
+ seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
+
+ chip = irq_desc_get_chip(desc);
+ if (chip && chip->name)
+ p = chip->name;
+ else
+ p = none;
+ seq_printf(m, "%-15s ", p);
+
+ data = irq_desc_get_chip_data(desc);
+ seq_printf(m, "0x%16p ", data);
+
+ if (desc->irq_data.domain->of_node)
+ p = desc->irq_data.domain->of_node->full_name;
+ else
+ p = none;
+ seq_printf(m, "%s\n", p);
+ }
+
+ raw_spin_unlock_irqrestore(&desc->lock, flags);
+ }
+
+ return 0;
+}
+
+static int virq_debug_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, virq_debug_show, inode->i_private);
+}
+
+static const struct file_operations virq_debug_fops = {
+ .open = virq_debug_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+static int __init irq_debugfs_init(void)
+{
+ if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
+ NULL, &virq_debug_fops) == NULL)
+ return -ENOMEM;
+
+ return 0;
+}
+__initcall(irq_debugfs_init);
+#endif /* CONFIG_VIRQ_DEBUG */
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 76a6e40..782bd0a 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -24,6 +24,7 @@
#include <asm/current.h>
#include <asm/processor.h>
#include <asm/machdep.h>
+#include <asm/debug.h>
/*
* This table contains the mapping between PowerPC hardware trap types, and
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index af48e59..ae645ab 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -632,78 +632,6 @@ unsigned int irq_linear_revmap(struct irq_domain *domain,
return revmap[hwirq];
}
-#ifdef CONFIG_VIRQ_DEBUG
-static int virq_debug_show(struct seq_file *m, void *private)
-{
- unsigned long flags;
- struct irq_desc *desc;
- const char *p;
- static const char none[] = "none";
- void *data;
- int i;
-
- seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
- "chip name", "chip data", "domain name");
-
- for (i = 1; i < nr_irqs; i++) {
- desc = irq_to_desc(i);
- if (!desc)
- continue;
-
- raw_spin_lock_irqsave(&desc->lock, flags);
-
- if (desc->action && desc->action->handler) {
- struct irq_chip *chip;
-
- seq_printf(m, "%5d ", i);
- seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
-
- chip = irq_desc_get_chip(desc);
- if (chip && chip->name)
- p = chip->name;
- else
- p = none;
- seq_printf(m, "%-15s ", p);
-
- data = irq_desc_get_chip_data(desc);
- seq_printf(m, "0x%16p ", data);
-
- if (desc->irq_data.domain->of_node)
- p = desc->irq_data.domain->of_node->full_name;
- else
- p = none;
- seq_printf(m, "%s\n", p);
- }
-
- raw_spin_unlock_irqrestore(&desc->lock, flags);
- }
-
- return 0;
-}
-
-static int virq_debug_open(struct inode *inode, struct file *file)
-{
- return single_open(file, virq_debug_show, inode->i_private);
-}
-
-static const struct file_operations virq_debug_fops = {
- .open = virq_debug_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
-static int __init irq_debugfs_init(void)
-{
- if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
- NULL, &virq_debug_fops) == NULL)
- return -ENOMEM;
-
- return 0;
-}
-__initcall(irq_debugfs_init);
-#endif /* CONFIG_VIRQ_DEBUG */
-
int irq_domain_simple_map(struct irq_domain *d, unsigned int irq,
irq_hw_number_t hwirq)
{
--
1.7.9.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [GIT PULL] Disintegrate and kill asm/system.h
2012-03-29 4:42 ` Stephen Rothwell
@ 2012-03-29 4:55 ` Michael Neuling
2012-03-29 5:02 ` Linus Torvalds
1 sibling, 0 replies; 10+ messages in thread
From: Michael Neuling @ 2012-03-29 4:55 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, arnd, ppc-dev, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, Linus Torvalds
> > Can we please move that abortion into arch/powerpc/? Instead of making
> > generic code even uglier..
>
> How about this (build tested on powerpc allyesconfig):
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 29 Mar 2012 14:58:10 +1100
> Subject: [PATCH] powerpc: fix fallout from system.h split up
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
FWIW.. this works for me too..
Acked-by: Michael Neuling <mikey@neuling.org>
Mikey
> ---
> arch/powerpc/kernel/fadump.c | 2 +
> arch/powerpc/kernel/irq.c | 72 ++++++++++++++++++++++++++++++++++++++=
> ++++
> arch/powerpc/kernel/kgdb.c | 1 +
> kernel/irq/irqdomain.c | 72 --------------------------------------=
> ----
> 4 files changed, 75 insertions(+), 72 deletions(-)
>
> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
> index cfe7a38..18bdf74 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -40,6 +40,8 @@
> #include <asm/prom.h>
> #include <asm/rtas.h>
> #include <asm/fadump.h>
> +#include <asm/debug.h>
> +#include <asm/setup.h>
> =20
> static struct fw_dump fw_dump;
> static struct fadump_mem_struct fdm;
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 243dbab..ff165f5 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -623,3 +623,75 @@ static int __init setup_noirqdistrib(char *str)
> =20
> __setup("noirqdistrib", setup_noirqdistrib);
> #endif /* CONFIG_PPC64 */
> +
> +#ifdef CONFIG_VIRQ_DEBUG
> +static int virq_debug_show(struct seq_file *m, void *private)
> +{
> + unsigned long flags;
> + struct irq_desc *desc;
> + const char *p;
> + static const char none[] =3D "none";
> + void *data;
> + int i;
> +
> + seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
> + "chip name", "chip data", "domain name");
> +
> + for (i =3D 1; i < nr_irqs; i++) {
> + desc =3D irq_to_desc(i);
> + if (!desc)
> + continue;
> +
> + raw_spin_lock_irqsave(&desc->lock, flags);
> +
> + if (desc->action && desc->action->handler) {
> + struct irq_chip *chip;
> +
> + seq_printf(m, "%5d ", i);
> + seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
> +
> + chip =3D irq_desc_get_chip(desc);
> + if (chip && chip->name)
> + p =3D chip->name;
> + else
> + p =3D none;
> + seq_printf(m, "%-15s ", p);
> +
> + data =3D irq_desc_get_chip_data(desc);
> + seq_printf(m, "0x%16p ", data);
> +
> + if (desc->irq_data.domain->of_node)
> + p =3D desc->irq_data.domain->of_node->full_name
;
> + else
> + p =3D none;
> + seq_printf(m, "%s\n", p);
> + }
> +
> + raw_spin_unlock_irqrestore(&desc->lock, flags);
> + }
> +
> + return 0;
> +}
> +
> +static int virq_debug_open(struct inode *inode, struct file *file)
> +{
> + return single_open(file, virq_debug_show, inode->i_private);
> +}
> +
> +static const struct file_operations virq_debug_fops =3D {
> + .open =3D virq_debug_open,
> + .read =3D seq_read,
> + .llseek =3D seq_lseek,
> + .release =3D single_release,
> +};
> +
> +static int __init irq_debugfs_init(void)
> +{
> + if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
> + NULL, &virq_debug_fops) =3D=3D NULL)
> + return -ENOMEM;
> +
> + return 0;
> +}
> +__initcall(irq_debugfs_init);
> +#endif /* CONFIG_VIRQ_DEBUG */
> diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
> index 76a6e40..782bd0a 100644
> --- a/arch/powerpc/kernel/kgdb.c
> +++ b/arch/powerpc/kernel/kgdb.c
> @@ -24,6 +24,7 @@
> #include <asm/current.h>
> #include <asm/processor.h>
> #include <asm/machdep.h>
> +#include <asm/debug.h>
> =20
> /*
> * This table contains the mapping between PowerPC hardware trap types, and
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af48e59..ae645ab 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -632,78 +632,6 @@ unsigned int irq_linear_revmap(struct irq_domain *doma=
> in,
> return revmap[hwirq];
> }
> =20
> -#ifdef CONFIG_VIRQ_DEBUG
> -static int virq_debug_show(struct seq_file *m, void *private)
> -{
> - unsigned long flags;
> - struct irq_desc *desc;
> - const char *p;
> - static const char none[] =3D "none";
> - void *data;
> - int i;
> -
> - seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
> - "chip name", "chip data", "domain name");
> -
> - for (i =3D 1; i < nr_irqs; i++) {
> - desc =3D irq_to_desc(i);
> - if (!desc)
> - continue;
> -
> - raw_spin_lock_irqsave(&desc->lock, flags);
> -
> - if (desc->action && desc->action->handler) {
> - struct irq_chip *chip;
> -
> - seq_printf(m, "%5d ", i);
> - seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
> -
> - chip =3D irq_desc_get_chip(desc);
> - if (chip && chip->name)
> - p =3D chip->name;
> - else
> - p =3D none;
> - seq_printf(m, "%-15s ", p);
> -
> - data =3D irq_desc_get_chip_data(desc);
> - seq_printf(m, "0x%16p ", data);
> -
> - if (desc->irq_data.domain->of_node)
> - p =3D desc->irq_data.domain->of_node->full_name
;
> - else
> - p =3D none;
> - seq_printf(m, "%s\n", p);
> - }
> -
> - raw_spin_unlock_irqrestore(&desc->lock, flags);
> - }
> -
> - return 0;
> -}
> -
> -static int virq_debug_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, virq_debug_show, inode->i_private);
> -}
> -
> -static const struct file_operations virq_debug_fops =3D {
> - .open =3D virq_debug_open,
> - .read =3D seq_read,
> - .llseek =3D seq_lseek,
> - .release =3D single_release,
> -};
> -
> -static int __init irq_debugfs_init(void)
> -{
> - if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
> - NULL, &virq_debug_fops) =3D=3D NULL)
> - return -ENOMEM;
> -
> - return 0;
> -}
> -__initcall(irq_debugfs_init);
> -#endif /* CONFIG_VIRQ_DEBUG */
> -
> int irq_domain_simple_map(struct irq_domain *d, unsigned int irq,
> irq_hw_number_t hwirq)
> {
> --=20
> 1.7.9.1
>
>
> --=20
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [GIT PULL] Disintegrate and kill asm/system.h
2012-03-29 4:42 ` Stephen Rothwell
2012-03-29 4:55 ` Michael Neuling
@ 2012-03-29 5:02 ` Linus Torvalds
2012-03-29 8:11 ` Benjamin Herrenschmidt
1 sibling, 1 reply; 10+ messages in thread
From: Linus Torvalds @ 2012-03-29 5:02 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
On Wed, Mar 28, 2012 at 9:42 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> How about this (build tested on powerpc allyesconfig):
Looks better.
Grant - what's the plan about that CONFIG_VIRQ_DEBUG thing? In theory
something like it could be useful as a generic thing, but at least
right now it is clearly powerpc-specific (not just that the config
option only exists for powerpc: it has that whole
'powerpc_debugfs_root' thing in it)?
Stephen's patch very much looks like the right thing, but if there was
some plan to actually make this generic ...
Linus
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [GIT PULL] Disintegrate and kill asm/system.h
2012-03-29 5:02 ` Linus Torvalds
@ 2012-03-29 8:11 ` Benjamin Herrenschmidt
2012-03-29 21:14 ` Grant Likely
0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2012-03-29 8:11 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-arch, Stephen Rothwell, Michael Neuling, arnd, linux-kernel,
David Howells, paul.gortmaker, hpa, akpm, ppc-dev
On Wed, 2012-03-28 at 22:02 -0700, Linus Torvalds wrote:
> On Wed, Mar 28, 2012 at 9:42 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > How about this (build tested on powerpc allyesconfig):
>
> Looks better.
>
> Grant - what's the plan about that CONFIG_VIRQ_DEBUG thing? In theory
> something like it could be useful as a generic thing, but at least
> right now it is clearly powerpc-specific (not just that the config
> option only exists for powerpc: it has that whole
> 'powerpc_debugfs_root' thing in it)?
>
> Stephen's patch very much looks like the right thing, but if there was
> some plan to actually make this generic ...
Yes, as I said earlier I think Grant should make it generic, there's
no reason to keep that powerpc specific, it's fairly useful and nothing
in userspace relies on the existing location of the debugfs file that I
know about.
Another option is to put the mapping information in /proc/interrupts but
worry that changing anything in there (like adding a column) will break
countless userspace tools.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [GIT PULL] Disintegrate and kill asm/system.h
2012-03-29 8:11 ` Benjamin Herrenschmidt
@ 2012-03-29 21:14 ` Grant Likely
2012-03-29 21:48 ` Thomas Gleixner
0 siblings, 1 reply; 10+ messages in thread
From: Grant Likely @ 2012-03-29 21:14 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linux-arch, Stephen Rothwell, Michael Neuling, arnd, ppc-dev,
linux-kernel, David Howells, paul.gortmaker, hpa, akpm,
Linus Torvalds
On Thu, Mar 29, 2012 at 2:11 AM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Wed, 2012-03-28 at 22:02 -0700, Linus Torvalds wrote:
>> On Wed, Mar 28, 2012 at 9:42 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> >
>> > How about this (build tested on powerpc allyesconfig):
>>
>> Looks better.
>>
>> Grant - what's the plan about that CONFIG_VIRQ_DEBUG thing? In theory
>> something like it could be useful as a generic thing, but at least
>> right now it is clearly powerpc-specific (not just that the config
>> option only exists for powerpc: it has that whole
>> 'powerpc_debugfs_root' thing in it)?
>>
>> Stephen's patch very much looks like the right thing, but if there was
>> some plan to actually make this generic ...
>
> Yes, as I said earlier I think Grant should make it generic, there's
> no reason to keep that powerpc specific, it's fairly useful and nothing
> in userspace relies on the existing location of the debugfs file that I
> know about.
>
> Another option is to put the mapping information in /proc/interrupts but
> worry that changing anything in there (like adding a column) will break
> countless userspace tools.
I posted an RFC patch that does exactly that, but I'm similarly
nervous for the same reason:
http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg56368.html
The rightmost fields of /proc/interrupts are a weird set of
conditional outputs that don't really have any parsable formatting to
them. It may be safe to apply my patch because it adds another field
in the middle of a section of conditional outputs* anyway so tools
already won't know what those fields mean. But, regardless, I'm not
going to take responsibility for applying that patch unless encouraged
by several other maintainers to do so.
*It's added to the middle instead of the end purely for aesthetic
reasons. The rightmost field is a freeform string without a field
width, so if put at the end they would never line up. Suggestions for
a better layout are welcome.
g.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [GIT PULL] Disintegrate and kill asm/system.h
2012-03-29 21:14 ` Grant Likely
@ 2012-03-29 21:48 ` Thomas Gleixner
2012-03-29 22:16 ` Grant Likely
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Gleixner @ 2012-03-29 21:48 UTC (permalink / raw)
To: Grant Likely
Cc: linux-arch, Stephen Rothwell, Michael Neuling, arnd, ppc-dev,
linux-kernel, David Howells, paul.gortmaker, hpa, akpm,
Linus Torvalds
On Thu, 29 Mar 2012, Grant Likely wrote:
> On Thu, Mar 29, 2012 at 2:11 AM, Benjamin Herrenschmidt
> The rightmost fields of /proc/interrupts are a weird set of
> conditional outputs that don't really have any parsable formatting to
> them. It may be safe to apply my patch because it adds another field
> in the middle of a section of conditional outputs* anyway so tools
> already won't know what those fields mean. But, regardless, I'm not
> going to take responsibility for applying that patch unless encouraged
> by several other maintainers to do so.
Go ahead. We changed that output several times in the last years
without causing the end of the universe.
Thanks,
tglx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [GIT PULL] Disintegrate and kill asm/system.h
2012-03-29 21:48 ` Thomas Gleixner
@ 2012-03-29 22:16 ` Grant Likely
0 siblings, 0 replies; 10+ messages in thread
From: Grant Likely @ 2012-03-29 22:16 UTC (permalink / raw)
To: Thomas Gleixner
Cc: linux-arch, Stephen Rothwell, Michael Neuling, arnd, ppc-dev,
linux-kernel, David Howells, paul.gortmaker, hpa, akpm,
Linus Torvalds
On Thu, Mar 29, 2012 at 3:48 PM, Thomas Gleixner <tglx@linutronix.de> wrote=
:
> On Thu, 29 Mar 2012, Grant Likely wrote:
>> On Thu, Mar 29, 2012 at 2:11 AM, Benjamin Herrenschmidt
>> The rightmost fields of /proc/interrupts are a weird set of
>> conditional outputs that don't really have any parsable formatting to
>> them. =A0It may be safe to apply my patch because it adds another field
>> in the middle of a section of conditional outputs* anyway so tools
>> already won't know what those fields mean. =A0But, regardless, I'm not
>> going to take responsibility for applying that patch unless encouraged
>> by several other maintainers to do so.
>
> Go ahead. We changed that output several times in the last years
> without causing the end of the universe.
Okay, RFC patch sent. I'm okay to wait for v3.5 for this, but it can
go into v3.4 if anyone really wants it faster.
g.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-03-29 22:17 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5599.1332958811@redhat.com>
[not found] ` <30702.1332989444@neuling.org>
[not found] ` <20120329135555.06593144b65bf81cc9191f8a@canb.auug.org.au>
2012-03-29 4:15 ` [GIT PULL] Disintegrate and kill asm/system.h Stephen Rothwell
2012-03-29 4:21 ` Michael Neuling
2012-03-29 4:24 ` Linus Torvalds
2012-03-29 4:42 ` Stephen Rothwell
2012-03-29 4:55 ` Michael Neuling
2012-03-29 5:02 ` Linus Torvalds
2012-03-29 8:11 ` Benjamin Herrenschmidt
2012-03-29 21:14 ` Grant Likely
2012-03-29 21:48 ` Thomas Gleixner
2012-03-29 22:16 ` Grant Likely
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).