Re: [uClinux-dev] kernel module and static

2007-05-03 Thread Michael Broughton
That MULS.L instruction is definitely wrong. The source effective 
address mode specified, is not supported in the longword variant of MULS.


Is it just me, or does that whole disassembly look strange?

Mike



Wolfgang Reissnegger wrote:

OK,

so it seems like the:
   2a:4c39 0800  mulsl 0 init_module,%d0
instruction is causing your illegal instruction trap.

I would suspect that the CPU you are running does not support 
multiplication instructions? You can look into the gcc man page to 
find out if there are any options you can pass to the compiler to 
generate instructions for your particular model.


Wolfgang

Stéphane wrote:

Hi

Ok I do that:
/opt/m68k-uclinux-tools-20060615/bin/m68k-uclinux-objdump -D xx.o


ucAsserv.o: file format elf32-m68k

Disassembly of section .text:

 init_module:
   0:4e56   linkw %fp,#0
   4:42b9   clrl 0 init_module
   a:42b9   clrl 0 init_module
  10:42b9   clrl 0 init_module
  16:4879   pea 0 init_module
  1c:4eb9   jsr 0 init_module
  22:588f   addql #4,%sp
  24:2039   movel 0 init_module,%d0
  2a:4c39 0800  mulsl 0 init_module,%d0
  30:
  32:23c0   movel %d0,0 init_module
  38:4879   pea 0 init_module
  3e:4eb9   jsr 0 init_module
  44:588f   addql #4,%sp
  46:4280   clrl %d0
  48:6000 0002  braw 4c init_module+0x4c
  4c:4e5e   unlk %fp
  4e:4e75   rts

0050 cleanup_module:
  50:4e56   linkw %fp,#0
  54:4e5e   unlk %fp
  56:4e75   rts
Disassembly of section .bss:

 global_right_encoder:
   0:   orib #0,%d0

0004 global_left_encoder:
   4:   orib #0,%d0

0008 VitL:
   8:   orib #0,%d0
Disassembly of section .modinfo:

 __module_kernel_version:
   0:6b65   bmis 67 cleanup_module+0x17
   2:726e   moveq #110,%d1
   4:656c   bcss 72 cleanup_module+0x22
   6:5f76 6572 7369 subqw #7,%fp@(73696f6e)@(3d32)
   c:6f6e 3d32
  10:2e34 2e33  movel %a4@(0033,%d2:l:8),%d7
  14:312d 7563  movew %a5@(30051),[EMAIL PROTECTED]
  18:302d 414e  movew %a5@(16718),%d0
  1c:492d 3130  chkl %a5@(12592),%d4
...

0021 __module_author:
  21:6175   bsrs 98 cleanup_module+0x48
  23:7468   moveq #104,%d2
  25:6f72   bles 99 cleanup_module+0x49
  27:3d53 7465  movew %a3@,%fp@(29797)
  2b:7068   moveq #104,%d0
  2d:616e   bsrs 9d cleanup_module+0x4d
  2f:6520   bcss 51 cleanup_module+0x1
  31:4765   043545
  33:726d   moveq #109,%d1
  35:6169   bsrs a0 cleanup_module+0x50
  37:6e00 6c69  bgtw 6ca2 cleanup_module+0x6c52

0039 __module_license:
  39:6c69   bges a4 cleanup_module+0x54
  3b:6365   blss a2 cleanup_module+0x52
  3d:6e73   bgts b2 cleanup_module+0x62
  3f:653d   bcss 7e cleanup_module+0x2e
  41:4750   043520
  43:Address 0x0045 is out of bounds.

Disassembly of section .rodata:

 .rodata:
   0:3c36 3e42  movew %fp@(0042,%d3:l:8),%d6
   4:7567   mvsw [EMAIL PROTECTED],%d2
   6:3a0a   movew %a2,%d5
   8:003c 363e  orib #62,%ccr
   c:4e65   movel %a5,%usp
   e:7665   moveq #101,%d3
  10:7220   moveq #32,%d1
  12:5265   addqw #1,[EMAIL PROTECTED]
  14:6163   bsrs 79 cleanup_module+0x29
  16:680a   bvcs 22 __module_author+0x1
...
Disassembly of section .comment:

 .comment:
   0:0047 4343  oriw #17219,%d7
   4:3a20   movew [EMAIL PROTECTED],%d5
   6:2847   moveal %d7,%a4
   8:4e55 2920  linkw %a5,#10528
   c:322e 3935  movew %fp@(14645),%d1
  10:2e33 2032  movel %a3@(0032,%d2:w),%d7
  14:3030 3130 3331 movew %a0@(33313520,%d3:w),%d0
  1a:3520
  1c:2872 656c 6561 moveal %a2@(6561)@(),%a4
  22:7365   mvsw [EMAIL PROTECTED],%d1
  24:2928 436f  movel %a0@(17263),[EMAIL PROTECTED]
  28:6c64   bges 8e .comment+0x8e
  2a:4669 7265  notw %a1@(29285)
  2e:2070 6174 6368 moveal %a0@(63686573)@(),%a0
  34:6573
  36:202d 2032  movel %a5@(8242),%d0
  3a:3030 3130 3331 movew %a0@(33313820,%d3:w),%d0
  40:3820
  42:6672   bnes b6 cleanup_module+0x66
  44:6f6d   bles b3 cleanup_module+0x63
  46: 

Re: [uClinux-dev] [PATCH] fec : drop xmit packets when link down

2007-03-26 Thread Michael Broughton

Hi Philippe,

If the link goes down, netif_tx_disable() should be called. Then you 
wouldn't have to worry about your hard_start_xmit function being called 
when the link is known to be down.


Mike



Philippe De Muyter wrote:

Hi Greg,

Currently, when the link is down, we make the kernel save the message to xmit
and try again later.  This is bad, because we eat up memory and, when
the link comes back, we send old messages.  Change that : when the link
is down, pretend the message is sent, but discard it.

Signed-off-by: Philippe De Muyter [EMAIL PROTECTED]

diff -r f8b279fd0eab drivers/net/fec.c
--- a/drivers/net/fec.c Mon Mar 19 20:20:56 2007 -0700
+++ b/drivers/net/fec.c Mon Mar 26 18:02:37 2007 +0200
@@ -316,7 +316,8 @@ fec_enet_start_xmit(struct sk_buff *skb,
 
 	if (!fep-link) {

/* Link is down or autonegotiation is in progress. */
-   return 1;
+   dev_kfree_skb(skb);
+   return 0;
}
 
 	/* Fill in a Tx ring entry */

___
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 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