Re: [uClinux-dev] [PATCH] m68k{nommu} : Remove unused DEFINE's from asm-offsets.c

2010-08-29 Thread Greg Ungerer

Geert Uytterhoeven wrote:

On Fri, Aug 27, 2010 at 08:08, Greg Ungerer  wrote:

Philippe De Muyter wrote:

m68k{nommu}/asm-offsets.c define many constants which are not used
anymore anywhere; remove IRQ_DEVID, IRQ_HANDLER, IRQ_NEXT, STAT_IRQ,
TASK_ACTIVE_MM, TASK_BLOCKED, TASK_FLAGS, TASK_PTRACE, TASK_STATE,
TASK_THREAD_INFO, TI_CPU, TI_EXECDOMAIN and TI_TASK.

Signed-off-by: Philippe De Muyter 

I have no problem with the m68knommu part. I can push that into
the m68knommu git tree. Or if the m68k guys are happy I can put
the whole thing there?


The m68k part is fine, too.

Acked-by: Geert Uytterhoeven 


Thanks Geert. I have pushed this into the m68knommu git tree.

Regards
Greg






---
 arch/m68k/kernel/asm-offsets.c  |   12 
 arch/m68knommu/kernel/asm-offsets.c |9 -
 2 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/arch/m68k/kernel/asm-offsets.c
b/arch/m68k/kernel/asm-offsets.c
index 73e5e58..78e59b8 100644
--- a/arch/m68k/kernel/asm-offsets.c
+++ b/arch/m68k/kernel/asm-offsets.c
@@ -22,13 +22,9 @@
 int main(void)
 {
   /* offsets into the task struct */
-   DEFINE(TASK_STATE, offsetof(struct task_struct, state));
-   DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
-   DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
   DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
   DEFINE(TASK_INFO, offsetof(struct task_struct, thread.info));
   DEFINE(TASK_MM, offsetof(struct task_struct, mm));
-   DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
 #ifdef CONFIG_MMU
   DEFINE(TASK_TINFO, offsetof(struct task_struct, thread.info));
 #endif
@@ -64,14 +60,6 @@ int main(void)
   /* bitfields are a bit difficult */
   DEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, pc) + 4);
 -  /* offsets into the irq_handler struct */
-   DEFINE(IRQ_HANDLER, offsetof(struct irq_node, handler));
-   DEFINE(IRQ_DEVID, offsetof(struct irq_node, dev_id));
-   DEFINE(IRQ_NEXT, offsetof(struct irq_node, next));
-
-   /* offsets into the kernel_stat struct */
-   DEFINE(STAT_IRQ, offsetof(struct kernel_stat, irqs));
-
   /* offsets into the irq_cpustat_t struct */
   DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t,
__softirq_pending));
 diff --git a/arch/m68knommu/kernel/asm-offsets.c
b/arch/m68knommu/kernel/asm-offsets.c
index 9a8876f..eca508c 100644
--- a/arch/m68knommu/kernel/asm-offsets.c
+++ b/arch/m68knommu/kernel/asm-offsets.c
@@ -21,14 +21,8 @@
 int main(void)
 {
   /* offsets into the task struct */
-   DEFINE(TASK_STATE, offsetof(struct task_struct, state));
-   DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
-   DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
-   DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
   DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
-   DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack));
   DEFINE(TASK_MM, offsetof(struct task_struct, mm));
-   DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
   /* offsets into the irq_cpustat_t struct */
   DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t,
__softirq_pending));
@@ -77,11 +71,8 @@ int main(void)
   DEFINE(THREAD_SIZE, THREAD_SIZE);
   /* Offsets in thread_info structure */
-   DEFINE(TI_TASK, offsetof(struct thread_info, task));
-   DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
   DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
   DEFINE(TI_PREEMPTCOUNT, offsetof(struct thread_info,
preempt_count));
-   DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
   return 0;
 }


Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds




--

Greg Ungerer  --  Principal EngineerEMAIL: g...@snapgear.com
SnapGear Group, McAfee  PHONE:   +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, AustraliaWEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] [PATCH] m68knommu: add support for Coldfire MCF547x/MCF548x interrupt controller.

2010-08-29 Thread Greg Ungerer


Hi Philippe,

Philippe De Muyter wrote:

On Fri, Aug 27, 2010 at 04:22:13PM +1000, Greg Ungerer wrote:

Hi Philippe,

Philippe De Muyter wrote:

The Coldfire MCF547x/MCF548x have the same interrupt controller than
the MCF528x, e.g., but only one, not two as in the MCF528x.  Modify
intc-2.c to support only one interrupt controller if MCFICM_INTC1 is
not defined.
Signed-off-by: Philippe De Muyter 
---
 arch/m68knommu/platform/coldfire/intc-2.c |   30 
+++-

 1 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/arch/m68knommu/platform/coldfire/intc-2.c 
b/arch/m68knommu/platform/coldfire/intc-2.c

index a0c72ec..060ff7b 100644
--- a/arch/m68knommu/platform/coldfire/intc-2.c
+++ b/arch/m68knommu/platform/coldfire/intc-2.c
@@ -1,9 +1,11 @@
 /*
  * intc-2.c
  *
- * General interrupt controller code for the many ColdFire version 2 
cores

- * that use the two region INTC interrupt controller. This includes the
- * 523x family, 5270, 5271, 5274, 5275, and the 528x families.
+ * General interrupt controller code for the many ColdFire cores that use
+ * interrupt controllers with 63 interrupt sources, organized as 56 
fully-

+ * programmable + 7 fixed-level interrupt sources. This includes the 523x
+ * family, the 5270, 5271, 5274, 5275, and the 528x family which have two 
such
+ * controllers, and the 547x and 548x families which have only one of 
them.

  *
  * (C) Copyright 2009, Greg Ungerer 
  *
@@ -27,17 +29,27 @@
  * We don't really care so much what they are, we don't rely on the
  * tranditional priority interrupt scheme of the m68k/ColdFire.
  */
-static u8 intc_intpri = 0x36;
+static u8 intc_intpri = 066;

   ^^^
Why change this to octal?


Because it reflects the organisation of the ICRn registers :
2 bits unused
3 bits for level
3 bits for priority in level

Do you want me to add a comment ?


I think we should leave it the way it was :-)

Irrespective of encoding most headers use hex to define bit fields.
Grepping through arch/m68k/include/asm the only exception to this
is termbits.h - and that is completely historical.

Regards
Greg




Greg Ungerer  --  Principal EngineerEMAIL: g...@snapgear.com
SnapGear Group, McAfee  PHONE:   +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, AustraliaWEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev