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

2010-08-18 Thread Philippe De Muyter
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 p...@macqel.be
---
 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;
 }
-- 
1.6.3.3

___
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


[uClinux-dev] nommu vm_get_page_prot and framebuffer drivers in 2.6.36-rc1

2010-08-18 Thread Mike Frysinger
the recent commit c07fbfd17e614a76b194f371c5331e21e6cffb54 added a
call to vm_get_page_prot() in drivers/video/fbmem.c.  but this
function doesnt exist for nommu.  so obviously we get:
ERROR: vm_get_page_prot [drivers/video/fb.ko] undefined!

looking a bit through mm/, i guess we should stub this out to 0 ?
#define vm_page_prot(x) 0
-mike
___
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 : Fix strace support for 68328/68360

2010-08-18 Thread Greg Ungerer


Hi Philippe,

Philippe De Muyter wrote:

m68knommu : Fix strace support for 68328/68360

strace enabled is marked using the `flags' field of the `thread_info' struct.
68360 version of entry.S did test a wrong bit in a wrong structure
(task_struct).
68328 version of entry.S did test the right bit in the right structure,
but wrongly, because the `flags' field is 32 bit wide, while the used
assembler insn (btst) only accesses a 8 bit byte in memory.

Fix both using code already used in the coldfire version of entry.S

Signed-off-by: Philippe De Muyter p...@macqel.be


Thanks. I add that to the m68knommu git tree.

Regards
Greg




---
diff --git a/arch/m68knommu/platform/68328/entry.S 
b/arch/m68knommu/platform/68328/entry.S
index 9d80d2c..74229f7 100644
--- a/arch/m68knommu/platform/68328/entry.S
+++ b/arch/m68knommu/platform/68328/entry.S
@@ -80,7 +80,7 @@ ENTRY(system_call)
movel   %sp,%d1 /* get thread_info pointer */
andl#-THREAD_SIZE,%d1
movel   %d1,%a2
-   btst#TIF_SYSCALL_TRACE,%a2@(TI_FLAGS)
+   btst#(TIF_SYSCALL_TRACE%8),%a2@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
jne do_trace
cmpl#NR_syscalls,%d0
jcc badsys
diff --git a/arch/m68knommu/platform/68360/entry.S 
b/arch/m68knommu/platform/68360/entry.S
index 6d3460a..d5ad408 100644
--- a/arch/m68knommu/platform/68360/entry.S
+++ b/arch/m68knommu/platform/68360/entry.S
@@ -71,7 +71,12 @@ ENTRY(system_call)
jbsrset_esp0
addql   #4,%sp
 
-	btst	#PF_TRACESYS_BIT,%a2@(TASK_FLAGS+PF_TRACESYS_OFF)

+   movel   %sp@(PT_OFF_ORIG_D0),%d0
+
+   movel   %sp,%d1 /* get thread_info pointer */
+   andl#-THREAD_SIZE,%d1
+   movel   %d1,%a2
+   btst#(TIF_SYSCALL_TRACE%8),%a2@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
jne do_trace
cmpl#NR_syscalls,%d0
jcc badsys



--

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