-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

HI:
  Yes. it works after remove "__attribute__((__packed__))"

#arm-angstrom-linux-gnueabi-objdump -d ./cpu/arm920t/s3c24x0/spi.o
  ....
  d0:   e59d2004        ldr     r2, [sp, #4]
  d4:   e3a0304f        mov     r3, #79 ; 0x4f
  d8:   e582300c        str     r3, [r2, #12]
  dc:   e59d2004        ldr     r2, [sp, #4]
  e0:   e3a03001        mov     r3, #1  ; 0x1
  e4:   e5823008        str     r3, [r2, #8]
  e8:   e59d2004        ldr     r2, [sp, #4]
  ec:   e283301e        add     r3, r3, #30     ; 0x1e
  f0:   e5823000        str     r3, [r2]
  f4:   e3a01000        mov     r1, #0  ; 0x0
  f8:   e2811001        add     r1, r1, #1      ; 0x1
  fc:   e59d2004        ldr     r2, [sp, #4]
 100:   e3a030ff        mov     r3, #255        ; 0xff

  I see the same problem, if use "__packed__" attribute,  GCC
will compile with byte-access code which may takes more
 instruction. Say, update a counter, and it can't keep it ATOMIC access,
may produce race, or data corrupt.

Werner Almesberger wrote:
> Dennis, if you remove that "__attribute__((__packed__))" from
> S3C24X0_SPI_CHANNEL in include/s3c24x0.h, does your original code work
> then ?
> 
> - Werner
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFItcV628unoHSQkyIRAjqhAJ9MCC+zoLyW9EliCTNxtSGxhrv3LwCfQYbX
2W2wtskl/xSDLC0CaFV+DUs=
=A23I
-----END PGP SIGNATURE-----

Reply via email to