uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(59):current_text_addr

rev 0.1

快乐虾

http://blog.csdn.net/lights_joy/

lights@hb165.com

本文适用于

ADI bf561 DSP

优视BF561EVB开发板

uclinux-2008r1.5-rc3(smp patch)

Visual DSP++ 5.0(update 5)

欢迎转载,但请保留作者信息

include/asm/processor.h中有这样一个定义:

/*

* Default implementation of macro that returns current

* instruction pointer ("program counter").

*/

#define current_text_addr() ({ __label__ _l; _l: &&_l;})

它的作用就是取当前PC的值,但是这行语句在VDSP下会引起一个错误:

..\..\security\commoncap.c

"..\..\include\linux/skbuff.h", line 897: cc1454: error: taking the address of a label is not a supported feature skb_over_panic(skb, len, current_text_addr());

^

"..\..\include\linux/skbuff.h", line 922: cc1454: error: taking the address of a label is not a supported feature skb_under_panic(skb, len, current_text_addr());

^

2 errors detected in the compilation of "..\..\security\commoncap.c".

cc3089: fatal error: Compilation failed

Tool failed with exit/exception code: 1.

Build was unsuccessful.

对其做如下修改:

static inline unsigned long current_text_addr(void)

{

unsigned long pc;

__asm__ __volatile__("%0 = rets;\n\t":"=d"(pc));

return pc;

}

1 参考资料

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(54)MEM_SDRAM_BANKx(2009-2-1)

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(55)CONFIG_FLAT_NODE_MEM_MAP(2009-02-03)

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(56)L1 data memory overflow(2009-02-03)

uclinux-2008R1.5-RC3(bf561)VDSP5移植(57)bsz(2009-2-3)

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(58)_cplb_mgr(2009-2-3)

若您对本文有兴趣,可到http://www.bfin-tools.org/bbs/viewthread.php?tid=13&extra=参与讨论。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值