Skip to contentSkip to conversation

sparc32: cleanup irq + smp files

RFC PATCH Superseded Sam Ravnborg 2 participants 8 messages Jan 23, 2011 – Jan 29, 2011 SPARC + UltraSPARC (sparc/sparc64)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover sparc32: cleanup irq + smp files

I am slowly working towards the goal of migrating sparc32 to genirq.
PArt of the job is to understand the current code-base. While reading the code I was constantly distracted by all the minor issues in these.

So I cooked up a few patches to clean up the files.

In general I did like this:
- Manually identified headers that was not needed
- Added comments from an old patch from davem
- Read through the file and fixed all the obvious stuff
- Ran checkpatch on each file and fixed what I considered relevant

The files does not pass checkpatch with no warnings - this was not my goal.
But the readability has increased which is good.

The patchset is based on top of sparc-next and does not include changes previously posted that updates sparc64 irq support.
I will rebase if/when these patches are applied to sparc-next.

The RFC patchset is sent out so people can comment on them.

Note: I could have split it up much further but I did not see much gain in this. The current patchset looks quite review-able to me.

Some of the files has gained several additional comments. These are all from an old patch I got from davem.

The patch "sparc32: remove tick14.c" is the same as was sent out yesterday.

Sam

Sam Ravnborg (7):
sparc32: remove tick14.c
sparc32: add irq + smp declarations to headers sparc32,sun4c: irq file cleanup
sparc32,sun4m: irq, smp files cleanup
sparc32,sun4d: irq, smp files cleanup
sparc32,sun4d: drop unused code in sun4d_distribute_irqs() sparc32,sun4d: add comment in empty statement in sun4d_request_irq()

 arch/sparc/include/asm/mmu_32.h |    3 +
 arch/sparc/include/asm/smp_32.h |    6 +
 arch/sparc/kernel/Makefile      |    1 -
 arch/sparc/kernel/irq_32.c      |    6 +-
 arch/sparc/kernel/kernel.h      |   47 ++++++++
 arch/sparc/kernel/setup_32.c    |   19 ++--
 arch/sparc/kernel/sun4c_irq.c   |   81 ++++++++-------
 arch/sparc/kernel/sun4d_irq.c   |  227 +++++++++++++++++---------------------
 arch/sparc/kernel/sun4d_smp.c   |  176 +++++++++++-------------------
 arch/sparc/kernel/sun4m_irq.c   |  182 ++++++++++++++++---------------
 arch/sparc/kernel/sun4m_smp.c   |   91 ++++------------
 arch/sparc/kernel/tick14.c      |   39 -------
 arch/sparc/prom/misc_32.c       |    4 -
 13 files changed, 394 insertions(+), 488 deletions(-)
#1 lore raw
Quoted 7 lines · Sam Ravnborg

I am slowly working towards the goal of migrating sparc32 to genirq.
PArt of the job is to understand the current code-base. While reading the code I was constantly distracted by all the minor issues in these.

So I cooked up a few patches to clean up the files.

The patches survied my SPARCclassic config and defconfig. But allnoconfig bails out with an error.

This is because asm-generic/tlb.h require linux/pagemap.h. The include happended implicitly before.

Workaround is simple - see below.
I will try to get it fixed in asm-generic for benefit of all users.

Sam

arch/sparc/include/asm/tlb_32.h +2 -0
index 6d02d1c..d29b2ea 100644
@@ -1,6 +1,8 @@
 #ifndef _SPARC_TLB_H
 #define _SPARC_TLB_H
 
+#include <linux/pagemap.h>
+
 #define tlb_start_vma(tlb, vma) \
 do {								\
 	flush_cache_range(vma, vma->vm_start, vma->vm_end);	\
maintainer
#2 lore raw
In reply to Sam Ravnborg

From: Sam Ravnborg <[email protected]>
Date: Sun, 23 Jan 2011 22:54:38 +0100

Quoted 9 lines

The patches survied my SPARCclassic config and defconfig. But allnoconfig bails out with an error.

This is because asm-generic/tlb.h require linux/pagemap.h. The include happended implicitly before.

Workaround is simple - see below.
I will try to get it fixed in asm-generic for benefit of all users.

Please get this fix in asm-generic and merged upstream, then repost your series and mention this dependency so I can merge in Linus's tree first.

Thanks.

maintainer
#3 lore raw
In reply to Sam Ravnborg

From: David Miller <[email protected]>
Date: Mon, 24 Jan 2011 16:11:32 -0800 (PST)

Quoted 10 lines

From: Sam Ravnborg <[email protected]>
Date: Sun, 23 Jan 2011 22:54:38 +0100

Quoted 7 lines

The patches survied my SPARCclassic config and defconfig. But allnoconfig bails out with an error.

This is because asm-generic/tlb.h require linux/pagemap.h. The include happended implicitly before.

Quoted 8 lines
Quoted 2 lines

Workaround is simple - see below.
I will try to get it fixed in asm-generic for benefit of all users.

Please get this fix in asm-generic and merged upstream, then repost your series and mention this dependency so I can merge in Linus's tree first.

Thanks.

BTW, I did review the patches and they do otherwise look perfectly fine to me.

#4 lore raw
In reply to Sam Ravnborg
Quoted 10 lines · David Miller

From: Sam Ravnborg <[email protected]>
Date: Sun, 23 Jan 2011 22:54:38 +0100

Quoted 7 lines

The patches survied my SPARCclassic config and defconfig. But allnoconfig bails out with an error.

This is because asm-generic/tlb.h require linux/pagemap.h. The include happended implicitly before.

Quoted 6 lines
Quoted 2 lines

Workaround is simple - see below.
I will try to get it fixed in asm-generic for benefit of all users.

Please get this fix in asm-generic and merged upstream, then repost your series and mention this dependency so I can merge in Linus's tree first.

Andrew already fixed it:
http://marc.info/?l=linux-mips&m9593731808647&w=2

I have build tested sparc32 allnoconfig + defconfig.

I will repost my serie when this fix is in mainline. The updated serie will be on top of sparc-next.

Sam

#6 lore raw
In reply to Sam Ravnborg
Quoted 16 lines · David Miller

From: David Miller <[email protected]>
Date: Mon, 24 Jan 2011 16:11:32 -0800 (PST)

Quoted 13 lines

From: Sam Ravnborg <[email protected]>
Date: Sun, 23 Jan 2011 22:54:38 +0100

Quoted 9 lines

The patches survied my SPARCclassic config and defconfig. But allnoconfig bails out with an error.

This is because asm-generic/tlb.h require linux/pagemap.h. The include happended implicitly before.

Workaround is simple - see below.
I will try to get it fixed in asm-generic for benefit of all users.

Quoted 8 lines
Quoted 5 lines

Please get this fix in asm-generic and merged upstream, then repost your series and mention this dependency so I can merge in Linus's tree first.

Thanks.

BTW, I did review the patches and they do otherwise look perfectly fine to me.

Just realised that I did not give you credit for this review in the patch-set I just sent out.
Would you like me to add your "Acked-by" / "Reviewed-by" in future patches?

As you anyway sign-off the patches it may look a bit redundant. But then it would be documented that you did not blindly apply the patches.

Sam

maintainer
#7 lore raw
In reply to Sam Ravnborg

From: Sam Ravnborg <[email protected]>
Date: Sat, 29 Jan 2011 09:13:16 +0100

Quoted 1 line

As you anyway sign-off the patches it may look a bit redundant.

It is a bit redundant.

Quoted 2 lines

But then it would be documented that you did not blindly apply the patches.

If I blindly apply patches and sign off on them, I should be shot. :-)