Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH][MIPS] move i8259 functions to include/asm-mips/i8259.h
@ 2007-09-12 14:23 Yoichi Yuasa
  2007-09-12 15:33 ` Atsushi Nemoto
  0 siblings, 1 reply; 7+ messages in thread
From: Yoichi Yuasa @ 2007-09-12 14:23 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips

Move i8259 functions to include/asm-mips/i8259.h

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/kernel/i8259.c mips/arch/mips/kernel/i8259.c
--- mips-orig/arch/mips/kernel/i8259.c	2007-09-12 14:37:15.447287000 +0900
+++ mips/arch/mips/kernel/i8259.c	2007-09-12 14:26:42.007699500 +0900
@@ -31,7 +31,10 @@
 static int i8259A_auto_eoi = -1;
 DEFINE_SPINLOCK(i8259A_lock);
 /* some platforms call this... */
-void mask_and_ack_8259A(unsigned int);
+static void disable_8259A_irq(unsigned int irq);
+static void enable_8259A_irq(unsigned int irq);
+static void mask_and_ack_8259A(unsigned int irq);
+static void init_8259A(int auto_eoi);
 
 static struct irq_chip i8259A_chip = {
 	.name		= "XT-PIC",
@@ -53,7 +56,7 @@ static unsigned int cached_irq_mask = 0x
 #define cached_master_mask	(cached_irq_mask)
 #define cached_slave_mask	(cached_irq_mask >> 8)
 
-void disable_8259A_irq(unsigned int irq)
+static void disable_8259A_irq(unsigned int irq)
 {
 	unsigned int mask;
 	unsigned long flags;
@@ -69,7 +72,7 @@ void disable_8259A_irq(unsigned int irq)
 	spin_unlock_irqrestore(&i8259A_lock, flags);
 }
 
-void enable_8259A_irq(unsigned int irq)
+static void enable_8259A_irq(unsigned int irq)
 {
 	unsigned int mask;
 	unsigned long flags;
@@ -139,7 +142,7 @@ static inline int i8259A_irq_real(unsign
  * first, _then_ send the EOI, and the order of EOI
  * to the two 8259s is important!
  */
-void mask_and_ack_8259A(unsigned int irq)
+static void mask_and_ack_8259A(unsigned int irq)
 {
 	unsigned int irqmask;
 	unsigned long flags;
@@ -256,7 +259,7 @@ static int __init i8259A_init_sysfs(void
 
 device_initcall(i8259A_init_sysfs);
 
-void init_8259A(int auto_eoi)
+static void init_8259A(int auto_eoi)
 {
 	unsigned long flags;
 
diff -pruN -X mips/Documentation/dontdiff mips-orig/include/asm-mips/hw_irq.h mips/include/asm-mips/hw_irq.h
--- mips-orig/include/asm-mips/hw_irq.h	2007-09-12 14:37:15.459287750 +0900
+++ mips/include/asm-mips/hw_irq.h	2007-09-12 14:26:01.485167000 +0900
@@ -8,15 +8,8 @@
 #ifndef __ASM_HW_IRQ_H
 #define __ASM_HW_IRQ_H
 
-#include <linux/profile.h>
 #include <asm/atomic.h>
 
-extern void disable_8259A_irq(unsigned int irq);
-extern void enable_8259A_irq(unsigned int irq);
-extern int i8259A_irq_pending(unsigned int irq);
-extern void make_8259A_irq(unsigned int irq);
-extern void init_8259A(int aeoi);
-
 extern atomic_t irq_err_count;
 
 /*
diff -pruN -X mips/Documentation/dontdiff mips-orig/include/asm-mips/i8259.h mips/include/asm-mips/i8259.h
--- mips-orig/include/asm-mips/i8259.h	2007-09-12 14:37:15.475288750 +0900
+++ mips/include/asm-mips/i8259.h	2007-09-12 14:26:01.485167000 +0900
@@ -37,9 +37,8 @@
 
 extern spinlock_t i8259A_lock;
 
-extern void init_8259A(int auto_eoi);
-extern void enable_8259A_irq(unsigned int irq);
-extern void disable_8259A_irq(unsigned int irq);
+extern int i8259A_irq_pending(unsigned int irq);
+extern void make_8259A_irq(unsigned int irq);
 
 extern void init_i8259_irqs(void);
 

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

* Re: [PATCH][MIPS] move i8259 functions to include/asm-mips/i8259.h
  2007-09-12 14:23 [PATCH][MIPS] move i8259 functions to include/asm-mips/i8259.h Yoichi Yuasa
@ 2007-09-12 15:33 ` Atsushi Nemoto
  2007-09-13  2:04   ` Yoichi Yuasa
  0 siblings, 1 reply; 7+ messages in thread
From: Atsushi Nemoto @ 2007-09-12 15:33 UTC (permalink / raw)
  To: yoichi_yuasa; +Cc: ralf, linux-mips

On Wed, 12 Sep 2007 23:23:33 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
> --- mips-orig/arch/mips/kernel/i8259.c	2007-09-12 14:37:15.447287000 +0900
> +++ mips/arch/mips/kernel/i8259.c	2007-09-12 14:26:42.007699500 +0900
> @@ -31,7 +31,10 @@
>  static int i8259A_auto_eoi = -1;
>  DEFINE_SPINLOCK(i8259A_lock);
>  /* some platforms call this... */
> -void mask_and_ack_8259A(unsigned int);
> +static void disable_8259A_irq(unsigned int irq);
> +static void enable_8259A_irq(unsigned int irq);
> +static void mask_and_ack_8259A(unsigned int irq);
> +static void init_8259A(int auto_eoi);
>  
>  static struct irq_chip i8259A_chip = {
>  	.name		= "XT-PIC",

Please drop a comment in this part too.  The comment was there just
because we had to drop "static" from mask_and_ack_8259A() at that
time.

---
Atsushi Nemoto

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

* [PATCH][MIPS] move i8259 functions to include/asm-mips/i8259.h
  2007-09-12 15:33 ` Atsushi Nemoto
@ 2007-09-13  2:04   ` Yoichi Yuasa
  2007-09-13  2:29     ` Atsushi Nemoto
  2007-09-13 12:10     ` [PATCH][MIPS] move i8259 functions to include/asm-mips/i8259.h Ralf Baechle
  0 siblings, 2 replies; 7+ messages in thread
From: Yoichi Yuasa @ 2007-09-13  2:04 UTC (permalink / raw)
  To: Atsushi Nemoto, Ralf Baechle; +Cc: yoichi_yuasa, linux-mips

On Thu, 13 Sep 2007 00:33:19 +0900 (JST)
Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:

> 
> Please drop a comment in this part too.  The comment was there just
> because we had to drop "static" from mask_and_ack_8259A() at that
> time.

Thank you for your comment.
The patch was updated.

Yoichi

---

Move i8259 functions to include/asm-mips/i8259.h

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/kernel/i8259.c mips/arch/mips/kernel/i8259.c
--- mips-orig/arch/mips/kernel/i8259.c	2007-09-13 10:41:51.547222000 +0900
+++ mips/arch/mips/kernel/i8259.c	2007-09-13 10:40:21.973624000 +0900
@@ -30,8 +30,10 @@
 
 static int i8259A_auto_eoi = -1;
 DEFINE_SPINLOCK(i8259A_lock);
-/* some platforms call this... */
-void mask_and_ack_8259A(unsigned int);
+static void disable_8259A_irq(unsigned int irq);
+static void enable_8259A_irq(unsigned int irq);
+static void mask_and_ack_8259A(unsigned int irq);
+static void init_8259A(int auto_eoi);
 
 static struct irq_chip i8259A_chip = {
 	.name		= "XT-PIC",
@@ -53,7 +55,7 @@ static unsigned int cached_irq_mask = 0x
 #define cached_master_mask	(cached_irq_mask)
 #define cached_slave_mask	(cached_irq_mask >> 8)
 
-void disable_8259A_irq(unsigned int irq)
+static void disable_8259A_irq(unsigned int irq)
 {
 	unsigned int mask;
 	unsigned long flags;
@@ -69,7 +71,7 @@ void disable_8259A_irq(unsigned int irq)
 	spin_unlock_irqrestore(&i8259A_lock, flags);
 }
 
-void enable_8259A_irq(unsigned int irq)
+static void enable_8259A_irq(unsigned int irq)
 {
 	unsigned int mask;
 	unsigned long flags;
@@ -139,7 +141,7 @@ static inline int i8259A_irq_real(unsign
  * first, _then_ send the EOI, and the order of EOI
  * to the two 8259s is important!
  */
-void mask_and_ack_8259A(unsigned int irq)
+static void mask_and_ack_8259A(unsigned int irq)
 {
 	unsigned int irqmask;
 	unsigned long flags;
@@ -256,7 +258,7 @@ static int __init i8259A_init_sysfs(void
 
 device_initcall(i8259A_init_sysfs);
 
-void init_8259A(int auto_eoi)
+static void init_8259A(int auto_eoi)
 {
 	unsigned long flags;
 
diff -pruN -X mips/Documentation/dontdiff mips-orig/include/asm-mips/hw_irq.h mips/include/asm-mips/hw_irq.h
--- mips-orig/include/asm-mips/hw_irq.h	2007-09-13 10:41:51.559222750 +0900
+++ mips/include/asm-mips/hw_irq.h	2007-09-13 10:39:56.480030750 +0900
@@ -8,15 +8,8 @@
 #ifndef __ASM_HW_IRQ_H
 #define __ASM_HW_IRQ_H
 
-#include <linux/profile.h>
 #include <asm/atomic.h>
 
-extern void disable_8259A_irq(unsigned int irq);
-extern void enable_8259A_irq(unsigned int irq);
-extern int i8259A_irq_pending(unsigned int irq);
-extern void make_8259A_irq(unsigned int irq);
-extern void init_8259A(int aeoi);
-
 extern atomic_t irq_err_count;
 
 /*
diff -pruN -X mips/Documentation/dontdiff mips-orig/include/asm-mips/i8259.h mips/include/asm-mips/i8259.h
--- mips-orig/include/asm-mips/i8259.h	2007-09-13 10:41:51.575223750 +0900
+++ mips/include/asm-mips/i8259.h	2007-09-13 10:39:56.480030750 +0900
@@ -37,9 +37,8 @@
 
 extern spinlock_t i8259A_lock;
 
-extern void init_8259A(int auto_eoi);
-extern void enable_8259A_irq(unsigned int irq);
-extern void disable_8259A_irq(unsigned int irq);
+extern int i8259A_irq_pending(unsigned int irq);
+extern void make_8259A_irq(unsigned int irq);
 
 extern void init_i8259_irqs(void);
 

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

* Re: [PATCH][MIPS] move i8259 functions to include/asm-mips/i8259.h
  2007-09-13  2:04   ` Yoichi Yuasa
@ 2007-09-13  2:29     ` Atsushi Nemoto
  2007-09-13  4:13       ` [PATCH][MIPS] add #include <linux/profile.h> to arch/mips/kernel/time.c Yoichi Yuasa
  2007-09-13 12:10     ` [PATCH][MIPS] move i8259 functions to include/asm-mips/i8259.h Ralf Baechle
  1 sibling, 1 reply; 7+ messages in thread
From: Atsushi Nemoto @ 2007-09-13  2:29 UTC (permalink / raw)
  To: yoichi_yuasa; +Cc: ralf, linux-mips

On Thu, 13 Sep 2007 11:04:04 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
> diff -pruN -X mips/Documentation/dontdiff mips-orig/include/asm-mips/hw_irq.h mips/include/asm-mips/hw_irq.h
> --- mips-orig/include/asm-mips/hw_irq.h	2007-09-13 10:41:51.559222750 +0900
> +++ mips/include/asm-mips/hw_irq.h	2007-09-13 10:39:56.480030750 +0900
> @@ -8,15 +8,8 @@
>  #ifndef __ASM_HW_IRQ_H
>  #define __ASM_HW_IRQ_H
>  
> -#include <linux/profile.h>
>  #include <asm/atomic.h>

This breaks some build.  

linux/arch/mips/kernel/time.c:142: error: implicit declaration of function 'profile_tick'

Proper fix would be including profile.h from time.c, but this is
irrelevant to i8259, so should be a separate patch.

Other parts looks good to me.  Thanks.
---
Atsushi Nemoto

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

* [PATCH][MIPS] add #include <linux/profile.h> to arch/mips/kernel/time.c
  2007-09-13  2:29     ` Atsushi Nemoto
@ 2007-09-13  4:13       ` Yoichi Yuasa
  2007-09-13 11:29         ` Ralf Baechle
  0 siblings, 1 reply; 7+ messages in thread
From: Yoichi Yuasa @ 2007-09-13  4:13 UTC (permalink / raw)
  To: Atsushi Nemoto, Ralf Baechle; +Cc: yoichi_yuasa, linux-mips

On Thu, 13 Sep 2007 11:29:17 +0900 (JST)
Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:

> On Thu, 13 Sep 2007 11:04:04 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
> > diff -pruN -X mips/Documentation/dontdiff mips-orig/include/asm-mips/hw_irq.h mips/include/asm-mips/hw_irq.h
> > --- mips-orig/include/asm-mips/hw_irq.h	2007-09-13 10:41:51.559222750 +0900
> > +++ mips/include/asm-mips/hw_irq.h	2007-09-13 10:39:56.480030750 +0900
> > @@ -8,15 +8,8 @@
> >  #ifndef __ASM_HW_IRQ_H
> >  #define __ASM_HW_IRQ_H
> >  
> > -#include <linux/profile.h>
> >  #include <asm/atomic.h>
> 
> This breaks some build.  
> 
> linux/arch/mips/kernel/time.c:142: error: implicit declaration of function 'profile_tick'
> 
> Proper fix would be including profile.h from time.c, but this is
> irrelevant to i8259, so should be a separate patch.

I found a patch for it in my patch queue.
 
> Other parts looks good to me.  Thanks.

Add #include <linux/profile.h> to arch/mips/kernel/time.c
It refer to CPU_PROFILING.

arch/mips/kernel/time.c: In function 'local_timer_interrupt':
arch/mips/kernel/time.c:142: error: implicit declaration of function 'profile_tick'
arch/mips/kernel/time.c:142: error: 'CPU_PROFILING' undeclared (first use in this function)
arch/mips/kernel/time.c:142: error: (Each undeclared identifier is reported only once
arch/mips/kernel/time.c:142: error: for each function it appears in.)

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/kernel/time.c mips/arch/mips/kernel/time.c
--- mips-orig/arch/mips/kernel/time.c	2007-09-12 11:10:18.577854500 +0900
+++ mips/arch/mips/kernel/time.c	2007-09-12 14:15:48.490857250 +0900
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/param.h>
+#include <linux/profile.h>
 #include <linux/time.h>
 #include <linux/timex.h>
 #include <linux/smp.h>

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

* Re: [PATCH][MIPS] add #include <linux/profile.h> to arch/mips/kernel/time.c
  2007-09-13  4:13       ` [PATCH][MIPS] add #include <linux/profile.h> to arch/mips/kernel/time.c Yoichi Yuasa
@ 2007-09-13 11:29         ` Ralf Baechle
  0 siblings, 0 replies; 7+ messages in thread
From: Ralf Baechle @ 2007-09-13 11:29 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: Atsushi Nemoto, linux-mips

On Thu, Sep 13, 2007 at 01:13:28PM +0900, Yoichi Yuasa wrote:

> > linux/arch/mips/kernel/time.c:142: error: implicit declaration of function 'profile_tick'
> > 
> > Proper fix would be including profile.h from time.c, but this is
> > irrelevant to i8259, so should be a separate patch.
> 
> I found a patch for it in my patch queue.
>  
> > Other parts looks good to me.  Thanks.
> 
> Add #include <linux/profile.h> to arch/mips/kernel/time.c
> It refer to CPU_PROFILING.
> 
> arch/mips/kernel/time.c: In function 'local_timer_interrupt':
> arch/mips/kernel/time.c:142: error: implicit declaration of function 'profile_tick'
> arch/mips/kernel/time.c:142: error: 'CPU_PROFILING' undeclared (first use in this function)
> arch/mips/kernel/time.c:142: error: (Each undeclared identifier is reported only once
> arch/mips/kernel/time.c:142: error: for each function it appears in.)
> 
> Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

Thanks, applied.

  Ralf

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

* Re: [PATCH][MIPS] move i8259 functions to include/asm-mips/i8259.h
  2007-09-13  2:04   ` Yoichi Yuasa
  2007-09-13  2:29     ` Atsushi Nemoto
@ 2007-09-13 12:10     ` Ralf Baechle
  1 sibling, 0 replies; 7+ messages in thread
From: Ralf Baechle @ 2007-09-13 12:10 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: Atsushi Nemoto, linux-mips

On Thu, Sep 13, 2007 at 11:04:04AM +0900, Yoichi Yuasa wrote:

> On Thu, 13 Sep 2007 00:33:19 +0900 (JST)
> Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> 
> > 
> > Please drop a comment in this part too.  The comment was there just
> > because we had to drop "static" from mask_and_ack_8259A() at that
> > time.
> 
> Thank you for your comment.
> The patch was updated.

Okay, queued for 2.6.24.  Thanks,

  Ralf

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

end of thread, other threads:[~2007-09-13 12:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-12 14:23 [PATCH][MIPS] move i8259 functions to include/asm-mips/i8259.h Yoichi Yuasa
2007-09-12 15:33 ` Atsushi Nemoto
2007-09-13  2:04   ` Yoichi Yuasa
2007-09-13  2:29     ` Atsushi Nemoto
2007-09-13  4:13       ` [PATCH][MIPS] add #include <linux/profile.h> to arch/mips/kernel/time.c Yoichi Yuasa
2007-09-13 11:29         ` Ralf Baechle
2007-09-13 12:10     ` [PATCH][MIPS] move i8259 functions to include/asm-mips/i8259.h Ralf Baechle

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