From linkn.lin在gmail.com Tue Jun 1 09:45:58 2010 From: linkn.lin在gmail.com (Corey) Date: Tue, 1 Jun 2010 09:45:58 +0800 Subject: =?GB2312?B?x+u9zL+qxvRDT05GSUdfTkVUX05TzsrM4g==?= Message-ID: Kernel Guys! 在我的一个嵌入式中,2.6.28内核,开启CONFIG_NET_NS编译选项,发现内核启动初始化不成功了 请问,有谁知道这个选项是做什么用的啊?有哪些功能?怎么使用它? Corey From jiang.adam在gmail.com Tue Jun 1 10:26:54 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Tue, 1 Jun 2010 11:26:54 +0900 Subject: =?GB2312?B?UmU6INPQy62x4Ln9wLR1Y2xpYmMgsO/Dpr/swLS/tM/C?= In-Reply-To: References: <20100531072649.GA16335@rcwf64-moto-x42p> Message-ID: 2010/5/31 lei yang : >> Hi, >> >> uclibc我编译过不下50遍,你若是真的想解决问题,就应该把 >> INCLUDE PATH搞清楚。 >> >> # echo "int main() {}" > test.c >> # gcc -Wp,-v test.c >> > > > 谢谢仁兄的耐心。 > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test/args$ gcc -Wp,-v arg_test.c > ignoring nonexistent directory "/usr/local/include/i486-linux-gnu" > ignoring nonexistent directory > "/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/include" > ignoring nonexistent directory "/usr/include/i486-linux-gnu" > #include "..." search starts here: > #include <...> search starts here: > /usr/local/include > /usr/lib/gcc/i486-linux-gnu/4.2.3/include > /usr/include > End of search list. > > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test/args$ ls /usr/include 从这个结果来看,至少可以肯定你机器上的某一个gcc是没有问题的,应该是host的toolchain. 你在配置uclibc的时候有没有开启交叉编译选项?编译用的命令是 # make 还是 # make CROSS=xxx-linux- 如果你使用的是交叉编译方式的,用同样的参数确认一下gcc的include path. 如果你搞不清楚究竟用的哪个,可以用下面的命令看看到底在哪里出错了 # make UCLIBC_EXTRA_CFLAGS="-Wp,-v" /大头阿当 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From jiang.adam在gmail.com Tue Jun 1 10:34:51 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Tue, 1 Jun 2010 11:34:51 +0900 Subject: =?GB2312?B?UmU6ILnY09pJMkPNqNDFzsrM4g==?= In-Reply-To: References: Message-ID: 2010/5/31 刘阳 : > 大家好: > 我遇到一个问题特别郁闷: > I2C数据流结构:s+addr+r/w+ACK+data+ACK............... > 第一个ACK信号是正常的。说明可以和设备通信了。 > 第二个ACK信号没有,不知道是怎么回事。郁闷之激。 > 并且data 的最高位设置了停止位的。 > 请大家指点一下。 难道不应该是 s + addr + r/w + ACK + data + STOP + ACK + data + STOP? 如果你用的是Combined messages,那么同样在每一个group后面应该有STOP。 Data的最高位设置停止位的具体意思是什么?概念上是不是有点混淆了? 如果你用的是SMBus而不是pure i2c,那么应该看看你的通讯方式是不是在 SMBus规定的9种方式之中,但无论如何都应该有STOP出现才对。 /大头阿当 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From jiang.adam在gmail.com Tue Jun 1 10:43:08 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Tue, 1 Jun 2010 11:43:08 +0900 Subject: =?GB2312?B?UmU6IMfrvcy/qsb0Q09ORklHX05FVF9OU87KzOI=?= In-Reply-To: References: Message-ID: 2010/6/1 Corey : > Kernel Guys! > > 在我的一个嵌入式中,2.6.28内核,开启CONFIG_NET_NS编译选项,发现内核启动初始化不成功了 > > 请问,有谁知道这个选项是做什么用的啊?有哪些功能?怎么使用它? > See http://cateee.net/lkddb/web-lkddb/NET_NS.html -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From stdfreeman在gmail.com Tue Jun 1 10:43:04 2010 From: stdfreeman在gmail.com (Freeman) Date: Tue, 01 Jun 2010 10:43:04 +0800 Subject: =?UTF-8?Q?sk=5Fbuff=E4=B8=ADdata=5Flen=E5=92=8Clen?= Message-ID: <1275360184.2571.2.camel@king-laptop> struct sk_buff中定义了data_len和len,这两个len到底指哪一段的长度? 网上众说纷纭,很多书上也没解释清楚,现在越看越迷糊。 多谢! From xiyou.wangcong在gmail.com Tue Jun 1 10:52:48 2010 From: xiyou.wangcong在gmail.com (=?utf-8?Q?Am=C3=A9rico?= Wang) Date: Tue, 1 Jun 2010 10:52:48 +0800 Subject: =?utf-8?B?6K+35pWZ5byA5ZCvQ09ORklHX05F?= =?utf-8?B?VF9OU+mXrumimA==?= In-Reply-To: References: Message-ID: <20100601025248.GB5134@cr0.nay.redhat.com> On Tue, Jun 01, 2010 at 09:45:58AM +0800, Corey wrote: >Kernel Guys! > > 在我的一个嵌入式中,2.6.28内核,开启CONFIG_NET_NS编译选项,发现内核启动初始化不成功了 > >请问,有谁知道这个选项是做什么用的啊?有哪些功能?怎么使用它? > Name Space,container会使用它。 除了配置内核之外,你还需要用户空间的程序lxc。 如果你遇到错误应该及时向upstream报告你遇到的错误。 From jiang.adam在gmail.com Tue Jun 1 10:56:26 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Tue, 1 Jun 2010 11:56:26 +0900 Subject: =?ISO-2022-JP?B?UmU6IHNrX2J1ZmYbJEJDZhsoQmRhdGFfbGVuGyRCT0IbKEJsZW4=?= In-Reply-To: <1275360184.2571.2.camel@king-laptop> References: <1275360184.2571.2.camel@king-laptop> Message-ID: 2010/6/1 Freeman : > struct sk_buff中定义了data_len和len,这两个len到底指哪一段的长度? > > 网上众说纷纭,很多书上也没解释清楚,现在越看越迷糊。 file: include/linux/skbuff.h 252/** 253 * struct sk_buff - socket buffer 254 * @next: Next buffer in list 255 * @prev: Previous buffer in list 256 * @sk: Socket we are owned by 257 * @tstamp: Time we arrived 258 * @dev: Device we arrived on/are leaving by 259 * @transport_header: Transport layer header 260 * @network_header: Network layer header 261 * @mac_header: Link layer header 262 * @_skb_dst: destination entry 263 * @sp: the security path, used for xfrm 264 * @cb: Control buffer. Free for use by every layer. Put private vars here 265 * @len: Length of actual data 266 * @data_len: Data length 看注释。 len = 数据的实际长度 data_len = 包中规定的数据区域的长度 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From xiaosuo在gmail.com Tue Jun 1 11:00:46 2010 From: xiaosuo在gmail.com (Changli Gao) Date: Tue, 1 Jun 2010 11:00:46 +0800 Subject: =?GB2312?B?UmU6IHNrX2J1ZmbW0GRhdGFfbGVuus1sZW4=?= In-Reply-To: <1275360184.2571.2.camel@king-laptop> References: <1275360184.2571.2.camel@king-laptop> Message-ID: http://vger.kernel.org/~davem/skb.html The three length members are pretty straight-forward. The total number of bytes in the packet is 'len'. SKBs are composed of a linear data buffer, and optionally a set of 1 or more page buffers. If there are page buffers, the total number of bytes in the page buffer area is 'data_len'. Therefore the number of bytes in the linear buffer is 'skb->len - skb->data_len'. There is a shorthand function for this in 'skb_headlen()'. 2010/6/1 Freeman : > struct sk_buff中定义了data_len和len,这两个len到底指哪一段的长度? > > 网上众说纷纭,很多书上也没解释清楚,现在越看越迷糊。 > > 多谢! > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- Regards, Changli Gao(xiaosuo在gmail.com) From jiang.adam在gmail.com Tue Jun 1 11:28:10 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Tue, 1 Jun 2010 12:28:10 +0900 Subject: =?utf-8?B?c2tfYnVmZuS4rWRhdGFfbGVu5ZKM?= =?utf-8?Q?len?= In-Reply-To: References: <1275360184.2571.2.camel@king-laptop> Message-ID: <20100601032810.GA3896@rcwf64-moto-x42p> On Tue, Jun 01, 2010 at 11:00:46AM +0800, Changli Gao wrote: > http://vger.kernel.org/~davem/skb.html > > The three length members are pretty straight-forward. The total number > of bytes in the packet is 'len'. SKBs are composed of a linear data > buffer, and optionally a set of 1 or more page buffers. If there are > page buffers, the total number of bytes in the page buffer area is > 'data_len'. Therefore the number of bytes in the linear buffer is > 'skb->len - skb->data_len'. There is a shorthand function for this in > 'skb_headlen()'. > 这个够明确阿!赞! 因为sk_buff这个数据结构的设计是为了简化各层协议之间的数据拷贝,所以,这 里的len主要用来指示针对各个不同协议的数据结束的位置,比如,skb_push函数 改变的就是len的值。 Linear data buffer指的就是struct sk_buff本身这个数据吧?而page buffers指 的是skb_frag_t frags[]??这里有点晕,哪位可以说明一下? /大头阿当 > 2010/6/1 Freeman : > > struct sk_buff中定义了data_len和len,这两个len到底指哪一段的长度? > > > > 网上众说纷纭,很多书上也没解释清楚,现在越看越迷糊。 > > > > 多谢! > > > > _______________________________________________ > > Linux 内核开发中文邮件列表 > > Linux-kernel在zh-kernel.org > > http://zh-kernel.org/mailman/listinfo/linux-kernel > > Linux 内核开发中文社区: http://zh-kernel.org > > > > -- > Regards, > Changli Gao(xiaosuo在gmail.com) > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From nylzhaowei在gmail.com Tue Jun 1 11:41:02 2010 From: nylzhaowei在gmail.com (Godbach) Date: Tue, 1 Jun 2010 11:41:02 +0800 Subject: =?GB2312?B?UmU6IHNrX2J1ZmbW0GRhdGFfbGVuus1sZW4=?= In-Reply-To: <1275360184.2571.2.camel@king-laptop> References: <1275360184.2571.2.camel@king-laptop> Message-ID: 在 2010年6月1日 上午10:43,Freeman 写道: > struct sk_buff中定义了data_len和len,这两个len到底指哪一段的长度? > > 网上众说纷纭,很多书上也没解释清楚,现在越看越迷糊。 > > 多谢! > skb->len正如上面的回复,它在协议栈的各个层是变化的。 以IP层为例,进入了IP层,skb->len就是当前IP数据包的长度,包括IP头部和载荷。 同时,skb中还有一个链表用来搜集所有隶属于同一个IP数据包的分片包。这个功能有PRETOURING出的hook函数ip_conntrack_defrag实现。 因此,skb->data_len就代表了所有某个主skb上所有分片包的数据长度。 那么skb-len和skb->data_len相差的值也就是主skb上数据区的长度值。 可以使用skb->data_len是否为0来判断当前的这个skb是否实现是线性的,也就是数据缓冲区在内上是连续的。如果主skb上串的有分片包对应的skb, 那么skb->data_len就不为0. From jiang.adam在gmail.com Tue Jun 1 12:28:45 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Tue, 1 Jun 2010 13:28:45 +0900 Subject: =?utf-8?B?c2tfYnVmZuS4rWRhdGFfbGVu5ZKM?= =?utf-8?Q?len?= In-Reply-To: References: <1275360184.2571.2.camel@king-laptop> Message-ID: <20100601042845.GB3896@rcwf64-moto-x42p> On Tue, Jun 01, 2010 at 11:41:02AM +0800, Godbach wrote: > 在 2010年6月1日 上午10:43,Freeman 写道: > > struct sk_buff中定义了data_len和len,这两个len到底指哪一段的长度? > > > > 网上众说纷纭,很多书上也没解释清楚,现在越看越迷糊。 > > > > 多谢! > > > > skb->len正如上面的回复,它在协议栈的各个层是变化的。 > > 以IP层为例,进入了IP层,skb->len就是当前IP数据包的长度,包括IP头部和载荷。 > 同时,skb中还有一个链表用来搜集所有隶属于同一个IP数据包的分片包。这个功能有PRETOURING出的hook函数ip_conntrack_defrag实现。 > 因此,skb->data_len就代表了所有某个主skb上所有分片包的数据长度。 > 那么skb-len和skb->data_len相差的值也就是主skb上数据区的长度值。 > > 可以使用skb->data_len是否为0来判断当前的这个skb是否实现是线性的,也就是数据缓冲区在内上是连续的。如果主skb上串的有分片包对应的skb, > 那么skb->data_len就不为0. skb->data_len如果代表的是所有分片包的长度,那么它的最小值至少应该等于 skb->len,也就是只有一个分片包。这里为什么说skb->data_len为0的时候才说明 数据包在内存上是线性的? 求解。谢谢。 /大头阿当 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From nylzhaowei在gmail.com Tue Jun 1 13:05:44 2010 From: nylzhaowei在gmail.com (Godbach) Date: Tue, 1 Jun 2010 13:05:44 +0800 Subject: =?GB2312?B?UmU6IHNrX2J1ZmbW0GRhdGFfbGVuus1sZW4=?= In-Reply-To: <20100601042845.GB3896@rcwf64-moto-x42p> References: <1275360184.2571.2.camel@king-laptop> <20100601042845.GB3896@rcwf64-moto-x42p> Message-ID: 在 2010年6月1日 下午12:28,Adam Jiang 写道: > On Tue, Jun 01, 2010 at 11:41:02AM +0800, Godbach wrote: >> 在 2010年6月1日 上午10:43,Freeman 写道: >> > struct sk_buff中定义了data_len和len,这两个len到底指哪一段的长度? >> > >> > 网上众说纷纭,很多书上也没解释清楚,现在越看越迷糊。 >> > >> > 多谢! >> > >> >> skb->len正如上面的回复,它在协议栈的各个层是变化的。 >> >> 以IP层为例,进入了IP层,skb->len就是当前IP数据包的长度,包括IP头部和载荷。 >> 同时,skb中还有一个链表用来搜集所有隶属于同一个IP数据包的分片包。这个功能有PRETOURING出的hook函数ip_conntrack_defrag实现。 >> 因此,skb->data_len就代表了所有某个主skb上所有分片包的数据长度。 >> 那么skb-len和skb->data_len相差的值也就是主skb上数据区的长度值。 >> >> 可以使用skb->data_len是否为0来判断当前的这个skb是否实现是线性的,也就是数据缓冲区在内上是连续的。如果主skb上串的有分片包对应的skb, >> 那么skb->data_len就不为0. > > skb->data_len如果代表的是所有分片包的长度,那么它的最小值至少应该等于 > skb->len,也就是只有一个分片包。这里为什么说skb->data_len为0的时候才说明 > 数据包在内存上是线性的? > > 求解。谢谢。 skb->len = 主skb数据长度 + skb->data_len From figure1802在126.com Tue Jun 1 13:53:17 2010 From: figure1802在126.com (figo.zhang) Date: Tue, 1 Jun 2010 13:53:17 +0800 (CST) Subject: =?gbk?Q?TD=CA=D6=BB=FA=D0=BE=C6=AC=B9=AB=CB=BE?= =?gbk?Q?-_=B4=F3=CC=C6=C1=AA=D0=BE__=D5=D0?= =?gbk?Q?=C6=B8LINUX/Android=BF=AA=B7=A2=C8=CB=D4=B1?= In-Reply-To: References: <20100531072649.GA16335@rcwf64-moto-x42p> Message-ID: <6e297ccb.847f.128f2122ccb.Coremail.figure1802@126.com> TD手机芯片公司,大唐联芯 诚邀linux/android开发人员,负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 机会难得阿。 联系:figo1802在gmail.com或者zhangtianfei在leadcoretech.com 公司网址:www.leadcoretech.com 工作地点: 上海 工作性质: 全职 工作目的和性质: 负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 主要职责: 1. 熟悉相关芯片文档,结合具体情况,分析Android移植需要实现的功能和要求。 2. Android BSP包移植,实现UART,LCD, USB,FLASH等驱动。 3. 相关移植文档编写, 指导客户进行二次开发。 4. 完成相关工作详细设计以及测试规范。 所需资历: 1. 学历/所受培训:电子技术相关专业本科以上学历; 2. 3年以上Linux开发经验; 3. 有过在芯片裸板上面进行从零开始的Linux(Android)移植工作经验更佳。 4. 熟悉驱动开发流程, 有过重要驱动(UART, LCD, USB, FLASH等)的开发调试经验; 5. 熟悉ARM体系; 6. 熟悉下载工具开发流程,并有手机终端上面NOR & NAND下载开发经验者更佳。 7. 熟练使用各种硬件简单仪器仪表; 8. 具备分析、定位和解决常见软硬件问题的能力,有一定的疑难问题分析能力,能够构建完整的测试流程追查问题的根源,寻求解决方案; 9. 其它要求:学习能力强;有很强的理解分析能力,富于创新;良好的英语读、写能力;具有团队合作精神,敬业精神和良好的沟通能力。 From yanglei.fage在gmail.com Tue Jun 1 17:18:42 2010 From: yanglei.fage在gmail.com (lei yang) Date: Tue, 1 Jun 2010 17:18:42 +0800 Subject: =?GB2312?B?UmU6INPQy62x4Ln9wLR1Y2xpYmMgsO/Dpr/swLS/tM/C?= In-Reply-To: References: <20100531072649.GA16335@rcwf64-moto-x42p> Message-ID: 我目前还没有使用交叉编译,以后要用,先尝试的非交叉编译 lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test$ make UCLIBC_EXTRA_CFLAGS="-Wp,-v" TEST_LINK args/ arg_test arg_test.c:9:19: error: stdio.h: No such file or directory arg_test.c:10:20: error: stdlib.h: No such file or directory arg_test.c:11:20: error: unistd.h: No such file or directory arg_test.c: In function 'main': arg_test.c:16: error: '__environ' undeclared (first use in this function) arg_test.c:16: error: (Each undeclared identifier is reported only once arg_test.c:16: error: for each function it appears in.) arg_test.c:28: warning: incompatible implicit declaration of built-in function 'printf' arg_test.c:39: warning: incompatible implicit declaration of built-in function 'exit' make[1]: *** [arg_test] Error 1 make: *** [_dirrun_args] Error 2 Thanks Lei 2010/6/1 Adam Jiang > 2010/5/31 lei yang : > >> Hi, > >> > >> uclibc我编译过不下50遍,你若是真的想解决问题,就应该把 > >> INCLUDE PATH搞清楚。 > >> > >> # echo "int main() {}" > test.c > >> # gcc -Wp,-v test.c > >> > > > > > > 谢谢仁兄的耐心。 > > > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test/args$ gcc -Wp,-v > arg_test.c > > ignoring nonexistent directory "/usr/local/include/i486-linux-gnu" > > ignoring nonexistent directory > > "/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/include" > > ignoring nonexistent directory "/usr/include/i486-linux-gnu" > > #include "..." search starts here: > > #include <...> search starts here: > > /usr/local/include > > /usr/lib/gcc/i486-linux-gnu/4.2.3/include > > /usr/include > > End of search list. > > > > > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test/args$ ls /usr/include > > 从这个结果来看,至少可以肯定你机器上的某一个gcc是没有问题的,应该是host的toolchain. > 你在配置uclibc的时候有没有开启交叉编译选项?编译用的命令是 > > # make > > 还是 > > # make CROSS=xxx-linux- > > 如果你使用的是交叉编译方式的,用同样的参数确认一下gcc的include path. > 如果你搞不清楚究竟用的哪个,可以用下面的命令看看到底在哪里出错了 > > # make UCLIBC_EXTRA_CFLAGS="-Wp,-v" > > /大头阿当 > > -- > Adam Jiang > ----------------------------------- > e-mail:jiang.adam在gmail.com > http://www.adamjiang.com > ----------------------------------- > -- "We learn from failure, not from success!" From yanglei.fage在gmail.com Tue Jun 1 17:21:08 2010 From: yanglei.fage在gmail.com (lei yang) Date: Tue, 1 Jun 2010 17:21:08 +0800 Subject: =?GB2312?B?UmU6INPQy62x4Ln9wLR1Y2xpYmMgsO/Dpr/swLS/tM/C?= In-Reply-To: References: <20100531072649.GA16335@rcwf64-moto-x42p> Message-ID: 我试了好几台 机器都是这个效果 ubuntu redhat 上都试了,注意我是在test那个目录下make的 Lei 2010/6/1 lei yang > 我目前还没有使用交叉编译,以后要用,先尝试的非交叉编译 > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test$ make > UCLIBC_EXTRA_CFLAGS="-Wp,-v" > > TEST_LINK args/ arg_test > arg_test.c:9:19: error: stdio.h: No such file or directory > arg_test.c:10:20: error: stdlib.h: No such file or directory > arg_test.c:11:20: error: unistd.h: No such file or directory > arg_test.c: In function 'main': > arg_test.c:16: error: '__environ' undeclared (first use in this function) > arg_test.c:16: error: (Each undeclared identifier is reported only once > arg_test.c:16: error: for each function it appears in.) > arg_test.c:28: warning: incompatible implicit declaration of built-in > function 'printf' > arg_test.c:39: warning: incompatible implicit declaration of built-in > function 'exit' > make[1]: *** [arg_test] Error 1 > make: *** [_dirrun_args] Error 2 > > > > Thanks > Lei > > > > > 2010/6/1 Adam Jiang > > 2010/5/31 lei yang : >> >> Hi, >> >> >> >> uclibc我编译过不下50遍,你若是真的想解决问题,就应该把 >> >> INCLUDE PATH搞清楚。 >> >> >> >> # echo "int main() {}" > test.c >> >> # gcc -Wp,-v test.c >> >> >> > >> > >> > 谢谢仁兄的耐心。 >> > >> > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test/args$ gcc -Wp,-v >> arg_test.c >> > ignoring nonexistent directory "/usr/local/include/i486-linux-gnu" >> > ignoring nonexistent directory >> > "/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/include" >> > ignoring nonexistent directory "/usr/include/i486-linux-gnu" >> > #include "..." search starts here: >> > #include <...> search starts here: >> > /usr/local/include >> > /usr/lib/gcc/i486-linux-gnu/4.2.3/include >> > /usr/include >> > End of search list. >> > >> > >> > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test/args$ ls /usr/include >> >> 从这个结果来看,至少可以肯定你机器上的某一个gcc是没有问题的,应该是host的toolchain. >> 你在配置uclibc的时候有没有开启交叉编译选项?编译用的命令是 >> >> # make >> >> 还是 >> >> # make CROSS=xxx-linux- >> >> 如果你使用的是交叉编译方式的,用同样的参数确认一下gcc的include path. >> 如果你搞不清楚究竟用的哪个,可以用下面的命令看看到底在哪里出错了 >> >> # make UCLIBC_EXTRA_CFLAGS="-Wp,-v" >> >> /大头阿当 >> >> -- >> Adam Jiang >> ----------------------------------- >> e-mail:jiang.adam在gmail.com >> http://www.adamjiang.com >> ----------------------------------- >> > > > > -- > "We learn from failure, not from success!" > -- "We learn from failure, not from success!" From laschweinski在163.com Tue Jun 1 17:52:58 2010 From: laschweinski在163.com (vcccc) Date: Tue, 1 Jun 2010 17:52:58 +0800 (CST) Subject: =?gbk?B?09DDu8jL0LS5/XVzYrXEyvOx6sf9tq8=?= Message-ID: <1b392cf.131ff.128f2eda01c.Coremail.laschweinski@163.com> 我参看内核的/drivers/hid/usbmouse.c里的写了一个 probe 可以执行到 但是在 probe函数中我想usb_submit_urb(urb) 系统却不能执行我的处理urb的irq函数,有那位牛人可以解释下. 然后我在probe函数中建了一个cdev 希望通过open该cdev 达到submit urb的目的 但是却出现了空指针的一个异常,而且是在probe结束以后,不知道会不会是我传递的回调函数出现了什么错误, 但我查了很多遍都没有找出 有那位大牛有写过usb的鼠标驱动的?并且能正常运行的. From frank.hu在greenpacket.com Tue Jun 1 18:22:11 2010 From: frank.hu在greenpacket.com (frank.hu在greenpacket.com) Date: Tue, 1 Jun 2010 18:22:11 +0800 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: References: <20100531072649.GA16335@rcwf64-moto-x42p> Message-ID: <20100601102211.GB1223@gentoo> On Tue, Jun 01, 2010 at 05:18:42PM +0800, lei yang wrote: > 我目前还没有使用交叉编译,以后要用,先尝试的非交叉编译 > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test$ make > UCLIBC_EXTRA_CFLAGS="-Wp,-v" > TEST_LINK args/ arg_test > arg_test.c:9:19: error: stdio.h: No such file or directory > arg_test.c:10:20: error: stdlib.h: No such file or directory > arg_test.c:11:20: error: unistd.h: No such file or directory > arg_test.c: In function 'main': > arg_test.c:16: error: '__environ' undeclared (first use in this function) > arg_test.c:16: error: (Each undeclared identifier is reported only once > arg_test.c:16: error: for each function it appears in.) > arg_test.c:28: warning: incompatible implicit declaration of built-in > function 'printf' > arg_test.c:39: warning: incompatible implicit declaration of built-in > function 'exit' > make[1]: *** [arg_test] Error 1 > make: *** [_dirrun_args] Error 2 > /tmp/uClibc-0.9.30.1/test $ make -n | head make -C args run echo " "TEST_LINK args/ arg_test gcc -Wstrict-prototypes -Os -funit-at-a-time -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -Os -D_GNU_SOURCE -I../../test -nostdinc -I../../install_dir/usr/include -I/usr/lib/gcc/i686-pc-linux-gnu/4.4.2//include-fixed -I/usr/lib/gcc/i686-pc-linux-gnu/4.4.2/include -c arg_test.c -o arg_test.o gcc -s -static -B../../lib -Wl,-rpath,../../lib -Wl,-rpath-link,../../lib arg_test.o -o arg_test echo " "TEST_LINK args/ arg_test_glibc gcc -Wstrict-prototypes -Os -funit-at-a-time -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -Os -D_GNU_SOURCE -I../../test -c arg_test.c -o arg_test_glibc.o gcc -s -static arg_test_glibc.o -o arg_test_glibc echo " "TEST_EXEC args/ arg_test env -i ENVVAR=123 SOMETHING=sldajfasdf BLAHBLAH=" hi hi " ./arg_test a b c d e f g h > "arg_test.out" 2>&1 ; ret=$? ; expected_ret="" ; test -z "$expected_ret" && export expected_ret=0 ; if ! test $ret -eq $expected_ret ; then echo "ret == $ret ; expected_ret == $expected_ret" ; exit 1 ; fi true "arg_test.out" make: *** [_dirrun_args] 断开的管道 注意看 -I 以及 -nostdinc From alvin.cao在gmail.com Tue Jun 1 21:37:08 2010 From: alvin.cao在gmail.com (Alvin Cao) Date: Tue, 1 Jun 2010 21:37:08 +0800 Subject: =?UTF-8?B?5Lit5YW06YCa6K6v5pm66IO95omL5py66L2v5Lu26YOo6K+a6YKA5ZCE5L2NTGludXg=?= =?UTF-8?B?54ix5aW96ICF5Yqg55uf?= Message-ID: 各位好, 中兴通讯去年跻身世界前五大手机厂商,智能手机业务正经历高速发展时期,现招聘以下职位。 简历可以直接回复给我,也可以投递给下面的联系人,期待各位的加盟,呵呵。 1. 嵌入式Linux/Android/WindowsMobile平台驱动软件开发工程师/系统工程师(上海)若干 工作职责: 负责智能手机嵌入式linux/Android/WindowsMobile平台的驱动软件开发和系统设计 任职要求: ● 计算机或通讯、电子相关专业本科以上学历,本科毕业3年以上,硕士毕业2年以上 ● 2年及以上通信产品嵌入式驱动软件开发经验.精通底层驱动软件,有基于嵌入式linux/Android/WindowsMobile驱动软件开发经验尤佳,特别是启动引导,电源管理,wifi、蓝牙、音频,USB,TF卡、LCD,Camera,键盘,触摸屏, GPS驱动模块等 ● 有高通7x00平台开发经验优先考虑 ● 精通C/C++语言,有扎实的编程功底和编程经验 ● 具备一定的硬件知识 ● 具有良好的英语阅读能力和适当的表达能力 ● 敬业精神强,具有高度的责任心和优秀的工作态度 ● 良好的学习和交流沟通能力,以及具有良好的团队意识和合作精神 2. Android智能手机高级软件工程师(上海)若干 工作职责: ● 负责android平台软件框架的研究,设计和实现等工作 ● 负责android平台无线应用相关模块的设计和实现等工作 任职要求: ● 本科毕业3年以上,硕士毕业1年以上,2年以上工作经验; ● 熟悉嵌入式系统体系结构和开发流程,有基于嵌入式linux,android平台手机开发经验优先; ● 深入掌握C,C++,JAVA语言(面向对象设计),有扎实的编程功底和编程经验; ● 具有良好的英语阅读能力和的表达能力 ● 敬业精神强,具有高度的责任心和优秀的工作态度,良好的学习和交流沟通能力,以及具有良好的团队意识和合作精神 联系人:尹晖 yin.hui在zte.com.cn Best Regards, Alvin Cao From jiang.adam在gmail.com Tue Jun 1 22:03:25 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Tue, 1 Jun 2010 23:03:25 +0900 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: <20100601102211.GB1223@gentoo> References: <20100531072649.GA16335@rcwf64-moto-x42p> <20100601102211.GB1223@gentoo> Message-ID: <20100601140325.GA4023@capricorn-x61> On Tue, Jun 01, 2010 at 06:22:11PM +0800, frank.hu在greenpacket.com wrote: > On Tue, Jun 01, 2010 at 05:18:42PM +0800, lei yang wrote: > > 我目前还没有使用交叉编译,以后要用,先尝试的非交叉编译 > > > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test$ make > > UCLIBC_EXTRA_CFLAGS="-Wp,-v" > > TEST_LINK args/ arg_test > > arg_test.c:9:19: error: stdio.h: No such file or directory > > arg_test.c:10:20: error: stdlib.h: No such file or directory > > arg_test.c:11:20: error: unistd.h: No such file or directory > > arg_test.c: In function 'main': > > arg_test.c:16: error: '__environ' undeclared (first use in this function) > > arg_test.c:16: error: (Each undeclared identifier is reported only once > > arg_test.c:16: error: for each function it appears in.) > > arg_test.c:28: warning: incompatible implicit declaration of built-in > > function 'printf' > > arg_test.c:39: warning: incompatible implicit declaration of built-in > > function 'exit' > > make[1]: *** [arg_test] Error 1 > > make: *** [_dirrun_args] Error 2 > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head 兄弟你太强大了!为什吗不直接在topdir做 make test 而要直接跑到test里面去make? /大头阿当 > make -C args run > echo " "TEST_LINK args/ arg_test > gcc -Wstrict-prototypes -Os -funit-at-a-time -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -Os -D_GNU_SOURCE -I../../test -nostdinc -I../../install_dir/usr/include -I/usr/lib/gcc/i686-pc-linux-gnu/4.4.2//include-fixed -I/usr/lib/gcc/i686-pc-linux-gnu/4.4.2/include -c arg_test.c -o arg_test.o > gcc -s -static -B../../lib -Wl,-rpath,../../lib -Wl,-rpath-link,../../lib arg_test.o -o arg_test > echo " "TEST_LINK args/ arg_test_glibc > gcc -Wstrict-prototypes -Os -funit-at-a-time -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -Os -D_GNU_SOURCE -I../../test -c arg_test.c -o arg_test_glibc.o > gcc -s -static arg_test_glibc.o -o arg_test_glibc > echo " "TEST_EXEC args/ arg_test > env -i ENVVAR=123 SOMETHING=sldajfasdf BLAHBLAH=" hi hi " ./arg_test a b c d e f g h > "arg_test.out" 2>&1 ; ret=$? ; expected_ret="" ; test -z "$expected_ret" && export expected_ret=0 ; if ! test $ret -eq $expected_ret ; then echo "ret == $ret ; expected_ret == $expected_ret" ; exit 1 ; fi > true "arg_test.out" > make: *** [_dirrun_args] 断开的管道 > > > > > 注意看 -I 以及 -nostdinc > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From yanglei.fage在gmail.com Tue Jun 1 22:39:42 2010 From: yanglei.fage在gmail.com (lei yang) Date: Tue, 1 Jun 2010 22:39:42 +0800 Subject: =?GB2312?B?UmU6INPQy62x4Ln9wLR1Y2xpYmMgsO/Dpr/swLS/tM/C?= In-Reply-To: <20100601102211.GB1223@gentoo> References: <20100531072649.GA16335@rcwf64-moto-x42p> <20100601102211.GB1223@gentoo> Message-ID: 2010/6/1 > On Tue, Jun 01, 2010 at 05:18:42PM +0800, lei yang wrote: > > 我目前还没有使用交叉编译,以后要用,先尝试的非交叉编译 > > > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test$ make > > UCLIBC_EXTRA_CFLAGS="-Wp,-v" > > TEST_LINK args/ arg_test > > arg_test.c:9:19: error: stdio.h: No such file or directory > > arg_test.c:10:20: error: stdlib.h: No such file or directory > > arg_test.c:11:20: error: unistd.h: No such file or directory > > arg_test.c: In function 'main': > > arg_test.c:16: error: '__environ' undeclared (first use in this function) > > arg_test.c:16: error: (Each undeclared identifier is reported only once > > arg_test.c:16: error: for each function it appears in.) > > arg_test.c:28: warning: incompatible implicit declaration of built-in > > function 'printf' > > arg_test.c:39: warning: incompatible implicit declaration of built-in > > function 'exit' > > make[1]: *** [arg_test] Error 1 > > make: *** [_dirrun_args] Error 2 > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > make -C args run > echo " "TEST_LINK args/ arg_test > gcc -Wstrict-prototypes -Os -funit-at-a-time -fno-tree-loop-optimize > -fno-tree-dominator-opts -fno-strength-reduce -Os -D_GNU_SOURCE -I../../test > -nostdinc -I../../install_dir/usr/include > -I/usr/lib/gcc/i686-pc-linux-gnu/4.4.2//include-fixed > -I/usr/lib/gcc/i686-pc-linux-gnu/4.4.2/include -c arg_test.c -o arg_test.o > gcc -s -static -B../../lib -Wl,-rpath,../../lib -Wl,-rpath-link,../../lib > arg_test.o -o arg_test > echo " "TEST_LINK args/ arg_test_glibc > gcc -Wstrict-prototypes -Os -funit-at-a-time -fno-tree-loop-optimize > -fno-tree-dominator-opts -fno-strength-reduce -Os -D_GNU_SOURCE -I../../test > -c arg_test.c -o arg_test_glibc.o > gcc -s -static arg_test_glibc.o -o arg_test_glibc > echo " "TEST_EXEC args/ arg_test > env -i ENVVAR=123 SOMETHING=sldajfasdf BLAHBLAH=" hi hi " ./arg_test a b c > d e f g h > "arg_test.out" 2>&1 ; ret=$? ; expected_ret="" ; test -z > "$expected_ret" && export expected_ret=0 ; if ! test $ret -eq $expected_ret > ; then echo "ret == $ret ; expected_ret == $expected_ret" ; exit 1 ; fi > true "arg_test.out" > make: *** [_dirrun_args] 断开的管道 > > > > 两个问题: 1. make -n 是啥意思,我的make -n 没问题 怎么make -n |head 跟你遇到的一样 2..那我该怎么解决这个问题呢 > > 注意看 -I 以及 -nostdinc > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > -- "We learn from failure, not from success!" From frank.hu在greenpacket.com Wed Jun 2 09:44:24 2010 From: frank.hu在greenpacket.com (frank.hu在greenpacket.com) Date: Wed, 2 Jun 2010 09:44:24 +0800 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: <20100601140325.GA4023@capricorn-x61> References: <20100531072649.GA16335@rcwf64-moto-x42p> <20100601102211.GB1223@gentoo> <20100601140325.GA4023@capricorn-x61> Message-ID: <20100602014424.GB5186@gentoo> On Tue, Jun 01, 2010 at 10:03:25PM +0800, Adam Jiang wrote: > On Tue, Jun 01, 2010 at 06:22:11PM +0800, frank.hu在greenpacket.com wrote: > > On Tue, Jun 01, 2010 at 05:18:42PM +0800, lei yang wrote: > > > 我目前还没有使用交叉编译,以后要用,先尝试的非交叉编译 > > > > > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test$ make > > > UCLIBC_EXTRA_CFLAGS="-Wp,-v" > > > TEST_LINK args/ arg_test > > > arg_test.c:9:19: error: stdio.h: No such file or directory > > > arg_test.c:10:20: error: stdlib.h: No such file or directory > > > arg_test.c:11:20: error: unistd.h: No such file or directory > > > arg_test.c: In function 'main': > > > arg_test.c:16: error: '__environ' undeclared (first use in this function) > > > arg_test.c:16: error: (Each undeclared identifier is reported only once > > > arg_test.c:16: error: for each function it appears in.) > > > arg_test.c:28: warning: incompatible implicit declaration of built-in > > > function 'printf' > > > arg_test.c:39: warning: incompatible implicit declaration of built-in > > > function 'exit' > > > make[1]: *** [arg_test] Error 1 > > > make: *** [_dirrun_args] Error 2 > > > > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > > 兄弟你太强大了!为什吗不直接在topdir做 > > make test > > 而要直接跑到test里面去make? > 你是要说 make -C test 吧?其实没什么区别。 From jiang.adam在gmail.com Wed Jun 2 09:50:34 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 2 Jun 2010 10:50:34 +0900 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: <20100602014424.GB5186@gentoo> References: <20100531072649.GA16335@rcwf64-moto-x42p> <20100601102211.GB1223@gentoo> <20100601140325.GA4023@capricorn-x61> <20100602014424.GB5186@gentoo> Message-ID: <20100602015034.GA20037@rcwf64-moto-x42p> On Wed, Jun 02, 2010 at 09:44:24AM +0800, frank.hu在greenpacket.com wrote: > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > > > > 兄弟你太强大了!为什吗不直接在topdir做 > > > > make test > > > > 而要直接跑到test里面去make? > > > > 你是要说 make -C test 吧?其实没什么区别。 ......抱歉,这个讨论我不能再跟下去了,两位似乎根本不知道自己在干啥。 make test 没有-C,自己less topdir/Makefile看看吧。test/Makefile里面没有include顶层 目录中的makefile.in,缺少环境设置,这是你们都出错的原因。不要直接跑到 test下面去make,而要在顶层目录make test做对于uclibc的测试。 看uclibc的指南,google一下找找编译的步骤,稍微用心点就不会犯这样的低级错 误。而这个错误竟然被挂在这里好几天,我是服了。 /大头阿当 From hu.taoo在gmail.com Wed Jun 2 09:56:08 2010 From: hu.taoo在gmail.com (hu.taoo在gmail.com) Date: Wed, 2 Jun 2010 09:56:08 +0800 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: References: <20100531072649.GA16335@rcwf64-moto-x42p> <20100601102211.GB1223@gentoo> Message-ID: <20100602015608.GA5282@gentoo> On Tue, Jun 01, 2010 at 10:39:42PM +0800, lei yang wrote: > > > 2010/6/1 > > On Tue, Jun 01, 2010 at 05:18:42PM +0800, lei yang wrote: > > 我目前还没有使用交叉编译,以后要用,先尝试的非交叉编译 > > > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test$ make > > UCLIBC_EXTRA_CFLAGS="-Wp,-v" > > TEST_LINK args/ arg_test > > arg_test.c:9:19: error: stdio.h: No such file or directory > > arg_test.c:10:20: error: stdlib.h: No such file or directory > > arg_test.c:11:20: error: unistd.h: No such file or directory > > arg_test.c: In function 'main': > > arg_test.c:16: error: '__environ' undeclared (first use in this function) > > arg_test.c:16: error: (Each undeclared identifier is reported only once > > arg_test.c:16: error: for each function it appears in.) > > arg_test.c:28: warning: incompatible implicit declaration of built-in > > function 'printf' > > arg_test.c:39: warning: incompatible implicit declaration of built-in > > function 'exit' > > make[1]: *** [arg_test] Error 1 > > make: *** [_dirrun_args] Error 2 > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > make -C args run > echo " "TEST_LINK args/ arg_test > gcc -Wstrict-prototypes -Os -funit-at-a-time -fno-tree-loop-optimize > -fno-tree-dominator-opts -fno-strength-reduce -Os -D_GNU_SOURCE -I../../ > test -nostdinc -I../../install_dir/usr/include -I/usr/lib/gcc/ > i686-pc-linux-gnu/4.4.2//include-fixed -I/usr/lib/gcc/i686-pc-linux-gnu/ > 4.4.2/include -c arg_test.c -o arg_test.o > gcc -s -static -B../../lib -Wl,-rpath,../../lib -Wl,-rpath-link,../../lib > arg_test.o -o arg_test > echo " "TEST_LINK args/ arg_test_glibc > gcc -Wstrict-prototypes -Os -funit-at-a-time -fno-tree-loop-optimize > -fno-tree-dominator-opts -fno-strength-reduce -Os -D_GNU_SOURCE -I../../ > test -c arg_test.c -o arg_test_glibc.o > gcc -s -static arg_test_glibc.o -o arg_test_glibc > echo " "TEST_EXEC args/ arg_test > env -i ENVVAR=123 SOMETHING=sldajfasdf BLAHBLAH=" hi hi " ./arg_test a b c > d e f g h > "arg_test.out" 2>&1 ; ret=$? ; expected_ret="" ; test -z > "$expected_ret" && export expected_ret=0 ; if ! test $ret -eq $expected_ret > ; then echo "ret == $ret ; expected_ret == $expected_ret" ; exit 1 ; fi > true "arg_test.out" > make: *** [_dirrun_args] 断开的管道 > > > > > > > 两个问题: > > 1. make -n 是啥意思,我的make -n 没问题怎么make -n |head 跟你遇到的一样 -n 就是 make 并不真正执行命令,但是打印出要执行的命令及参数。 > 2..那我该怎么解决这个问题呢 > 我猜你没有编译 uClibc. test/Makefile 是 build against uClibc 的,从参数 -I../../install_dir/usr/include 可以知道 uClibc 是安装至 $(TOP_DIR)/install_dir 的。 如果你要用 host toolchain 编译 test, 可以修改 Makefile. > > > > 注意看 -I 以及 -nostdinc > From jiang.adam在gmail.com Wed Jun 2 09:59:21 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 2 Jun 2010 10:59:21 +0900 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: <20100602015608.GA5282@gentoo> References: <20100531072649.GA16335@rcwf64-moto-x42p> <20100601102211.GB1223@gentoo> <20100602015608.GA5282@gentoo> Message-ID: <20100602015921.GB20037@rcwf64-moto-x42p> On Wed, Jun 02, 2010 at 09:56:08AM +0800, hu.taoo在gmail.com wrote: > On Tue, Jun 01, 2010 at 10:39:42PM +0800, lei yang wrote: > > > > > > 2010/6/1 > > > > On Tue, Jun 01, 2010 at 05:18:42PM +0800, lei yang wrote: > > > 我目前还没有使用交叉编译,以后要用,先尝试的非交叉编译 > > > > > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test$ make > > > UCLIBC_EXTRA_CFLAGS="-Wp,-v" > > > TEST_LINK args/ arg_test > > > arg_test.c:9:19: error: stdio.h: No such file or directory > > > arg_test.c:10:20: error: stdlib.h: No such file or directory > > > arg_test.c:11:20: error: unistd.h: No such file or directory > > > arg_test.c: In function 'main': > > > arg_test.c:16: error: '__environ' undeclared (first use in this function) > > > arg_test.c:16: error: (Each undeclared identifier is reported only once > > > arg_test.c:16: error: for each function it appears in.) > > > arg_test.c:28: warning: incompatible implicit declaration of built-in > > > function 'printf' > > > arg_test.c:39: warning: incompatible implicit declaration of built-in > > > function 'exit' > > > make[1]: *** [arg_test] Error 1 > > > make: *** [_dirrun_args] Error 2 > > > > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > > make -C args run > > echo " "TEST_LINK args/ arg_test > > gcc -Wstrict-prototypes -Os -funit-at-a-time -fno-tree-loop-optimize > > -fno-tree-dominator-opts -fno-strength-reduce -Os -D_GNU_SOURCE -I../../ > > test -nostdinc -I../../install_dir/usr/include -I/usr/lib/gcc/ > > i686-pc-linux-gnu/4.4.2//include-fixed -I/usr/lib/gcc/i686-pc-linux-gnu/ > > 4.4.2/include -c arg_test.c -o arg_test.o > > gcc -s -static -B../../lib -Wl,-rpath,../../lib -Wl,-rpath-link,../../lib > > arg_test.o -o arg_test > > echo " "TEST_LINK args/ arg_test_glibc > > gcc -Wstrict-prototypes -Os -funit-at-a-time -fno-tree-loop-optimize > > -fno-tree-dominator-opts -fno-strength-reduce -Os -D_GNU_SOURCE -I../../ > > test -c arg_test.c -o arg_test_glibc.o > > gcc -s -static arg_test_glibc.o -o arg_test_glibc > > echo " "TEST_EXEC args/ arg_test > > env -i ENVVAR=123 SOMETHING=sldajfasdf BLAHBLAH=" hi hi " ./arg_test a b c > > d e f g h > "arg_test.out" 2>&1 ; ret=$? ; expected_ret="" ; test -z > > "$expected_ret" && export expected_ret=0 ; if ! test $ret -eq $expected_ret > > ; then echo "ret == $ret ; expected_ret == $expected_ret" ; exit 1 ; fi > > true "arg_test.out" > > make: *** [_dirrun_args] 断开的管道 > > > > > > > > > > > > > > 两个问题: > > > > 1. make -n 是啥意思,我的make -n 没问题怎么make -n |head 跟你遇到的一样 > > -n 就是 make 并不真正执行命令,但是打印出要执行的命令及参数。 > > > 2..那我该怎么解决这个问题呢 > > > > 我猜你没有编译 uClibc. test/Makefile 是 build against uClibc 的,从参数 > -I../../install_dir/usr/include 可以知道 uClibc 是安装至 > $(TOP_DIR)/install_dir 的。 > > 如果你要用 host toolchain 编译 test, 可以修改 Makefile. > uClibc的test做的就是对编译好的C library进行测试,这里“应该”没有理由build agains host c lib。 /大头阿当 > > > > > > > > 注意看 -I 以及 -nostdinc > > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From jiang.adam在gmail.com Wed Jun 2 10:12:01 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 2 Jun 2010 11:12:01 +0900 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: <20100602014424.GB5186@gentoo> References: <20100531072649.GA16335@rcwf64-moto-x42p> <20100601102211.GB1223@gentoo> <20100601140325.GA4023@capricorn-x61> <20100602014424.GB5186@gentoo> Message-ID: <20100602021201.GC20037@rcwf64-moto-x42p> On Wed, Jun 02, 2010 at 09:44:24AM +0800, frank.hu在greenpacket.com wrote: > On Tue, Jun 01, 2010 at 10:03:25PM +0800, Adam Jiang wrote: > > On Tue, Jun 01, 2010 at 06:22:11PM +0800, frank.hu在greenpacket.com wrote: > > > On Tue, Jun 01, 2010 at 05:18:42PM +0800, lei yang wrote: > > > > 我目前还没有使用交叉编译,以后要用,先尝试的非交叉编译 > > > > > > > > lyang0在lyang0:~/downloads/uClibc-0.9.30.3/test$ make > > > > UCLIBC_EXTRA_CFLAGS="-Wp,-v" > > > > TEST_LINK args/ arg_test > > > > arg_test.c:9:19: error: stdio.h: No such file or directory > > > > arg_test.c:10:20: error: stdlib.h: No such file or directory > > > > arg_test.c:11:20: error: unistd.h: No such file or directory > > > > arg_test.c: In function 'main': > > > > arg_test.c:16: error: '__environ' undeclared (first use in this function) > > > > arg_test.c:16: error: (Each undeclared identifier is reported only once > > > > arg_test.c:16: error: for each function it appears in.) > > > > arg_test.c:28: warning: incompatible implicit declaration of built-in > > > > function 'printf' > > > > arg_test.c:39: warning: incompatible implicit declaration of built-in > > > > function 'exit' > > > > make[1]: *** [arg_test] Error 1 > > > > make: *** [_dirrun_args] Error 2 > > > > > > > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > > > > 兄弟你太强大了!为什吗不直接在topdir做 > > > > make test > > > > 而要直接跑到test里面去make? > > > > 你是要说 make -C test 吧?其实没什么区别。 > _______________________________________________ 据我所知,你们现在使用的uClibc-0.9.30.3的test是稍有问题的,一个是在没有 配置DO_C99_MATH的时候,make test却会去测试MATH;另一个是,链接时缺少符号 __isnaxxx。这两个都是uClibc自身Makefile的问题,如果仅有这两个错,基本上 可以uClibc就是编译成功了。 推荐使用uClibc-0.9.29或者uClibc-0.9.31;uClibc-0.9.30基本就是残次品。如 果不是超小型设备,还是选用裁剪好的glibc,选择uClibc在开发后期会遇到一些 问题。特别是移植一些软件的时候,会非常烦人。 /大头阿当 > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From hu.taoo在gmail.com Wed Jun 2 10:27:03 2010 From: hu.taoo在gmail.com (hu.taoo在gmail.com) Date: Wed, 2 Jun 2010 10:27:03 +0800 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: <20100602015034.GA20037@rcwf64-moto-x42p> References: <20100531072649.GA16335@rcwf64-moto-x42p> <20100601102211.GB1223@gentoo> <20100601140325.GA4023@capricorn-x61> <20100602014424.GB5186@gentoo> <20100602015034.GA20037@rcwf64-moto-x42p> Message-ID: <20100602022703.GA5406@gentoo> On Wed, Jun 02, 2010 at 09:50:34AM +0800, Adam Jiang wrote: > On Wed, Jun 02, 2010 at 09:44:24AM +0800, frank.hu在greenpacket.com wrote: > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > > > > > > 兄弟你太强大了!为什吗不直接在topdir做 > > > > > > make test > > > > > > 而要直接跑到test里面去make? > > > > > > > 你是要说 make -C test 吧?其实没什么区别。 > > ......抱歉,这个讨论我不能再跟下去了,两位似乎根本不知道自己在干啥。 > > make test > > 没有-C,自己less topdir/Makefile看看吧。test/Makefile里面没有include顶层 > 目录中的makefile.in,缺少环境设置,这是你们都出错的原因。不要直接跑到 > test下面去make,而要在顶层目录make test做对于uclibc的测试。 > > 看uclibc的指南,google一下找找编译的步骤,稍微用心点就不会犯这样的低级错 > 误。而这个错误竟然被挂在这里好几天,我是服了。 > 好吧,我承认我没有编译 uClibc. 不过我想这正是 lei yang 出问题的原因。 当然如果我想编译 uClibc 的话早就编成功了。 From jiang.adam在gmail.com Wed Jun 2 10:29:33 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 2 Jun 2010 11:29:33 +0900 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: <20100602022703.GA5406@gentoo> References: <20100601102211.GB1223@gentoo> <20100601140325.GA4023@capricorn-x61> <20100602014424.GB5186@gentoo> <20100602015034.GA20037@rcwf64-moto-x42p> <20100602022703.GA5406@gentoo> Message-ID: <20100602022933.GD20037@rcwf64-moto-x42p> On Wed, Jun 02, 2010 at 10:27:03AM +0800, hu.taoo在gmail.com wrote: > On Wed, Jun 02, 2010 at 09:50:34AM +0800, Adam Jiang wrote: > > On Wed, Jun 02, 2010 at 09:44:24AM +0800, frank.hu在greenpacket.com wrote: > > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > > > > > > > > 兄弟你太强大了!为什吗不直接在topdir做 > > > > > > > > make test > > > > > > > > 而要直接跑到test里面去make? > > > > > > > > > > 你是要说 make -C test 吧?其实没什么区别。 > > > > ......抱歉,这个讨论我不能再跟下去了,两位似乎根本不知道自己在干啥。 > > > > make test > > > > 没有-C,自己less topdir/Makefile看看吧。test/Makefile里面没有include顶层 > > 目录中的makefile.in,缺少环境设置,这是你们都出错的原因。不要直接跑到 > > test下面去make,而要在顶层目录make test做对于uclibc的测试。 > > > > 看uclibc的指南,google一下找找编译的步骤,稍微用心点就不会犯这样的低级错 > > 误。而这个错误竟然被挂在这里好几天,我是服了。 > > > > 好吧,我承认我没有编译 uClibc. 不过我想这正是 lei yang 出问题的原因。 > 当然如果我想编译 uClibc 的话早就编成功了。 sorry, hu. 刚才说话有点着急。我相信你一定能搞得定。 /大头阿当 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From hu.taoo在gmail.com Wed Jun 2 10:57:28 2010 From: hu.taoo在gmail.com (hu.taoo在gmail.com) Date: Wed, 2 Jun 2010 10:57:28 +0800 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: <20100602022933.GD20037@rcwf64-moto-x42p> References: <20100601102211.GB1223@gentoo> <20100601140325.GA4023@capricorn-x61> <20100602014424.GB5186@gentoo> <20100602015034.GA20037@rcwf64-moto-x42p> <20100602022703.GA5406@gentoo> <20100602022933.GD20037@rcwf64-moto-x42p> Message-ID: <20100602025728.GB5406@gentoo> On Wed, Jun 02, 2010 at 10:29:33AM +0800, Adam Jiang wrote: > On Wed, Jun 02, 2010 at 10:27:03AM +0800, hu.taoo在gmail.com wrote: > > On Wed, Jun 02, 2010 at 09:50:34AM +0800, Adam Jiang wrote: > > > On Wed, Jun 02, 2010 at 09:44:24AM +0800, frank.hu在greenpacket.com wrote: > > > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > > > > > > > > > > 兄弟你太强大了!为什吗不直接在topdir做 > > > > > > > > > > make test > > > > > > > > > > 而要直接跑到test里面去make? > > > > > > > > > > > > > 你是要说 make -C test 吧?其实没什么区别。 > > > > > > ......抱歉,这个讨论我不能再跟下去了,两位似乎根本不知道自己在干啥。 > > > > > > make test > > > > > > 没有-C,自己less topdir/Makefile看看吧。test/Makefile里面没有include顶层 > > > 目录中的makefile.in,缺少环境设置,这是你们都出错的原因。不要直接跑到 > > > test下面去make,而要在顶层目录make test做对于uclibc的测试。 > > > > > > 看uclibc的指南,google一下找找编译的步骤,稍微用心点就不会犯这样的低级错 > > > 误。而这个错误竟然被挂在这里好几天,我是服了。 > > > > > > > 好吧,我承认我没有编译 uClibc. 不过我想这正是 lei yang 出问题的原因。 > > 当然如果我想编译 uClibc 的话早就编成功了。 > > sorry, hu. 刚才说话有点着急。我相信你一定能搞得定。 > 没事 :) From yanglei.fage在gmail.com Wed Jun 2 11:34:58 2010 From: yanglei.fage在gmail.com (lei yang) Date: Wed, 2 Jun 2010 11:34:58 +0800 Subject: =?GB2312?B?UmU6INPQy62x4Ln9wLR1Y2xpYmMgsO/Dpr/swLS/tM/C?= In-Reply-To: <20100602015034.GA20037@rcwf64-moto-x42p> References: <20100531072649.GA16335@rcwf64-moto-x42p> <20100601102211.GB1223@gentoo> <20100601140325.GA4023@capricorn-x61> <20100602014424.GB5186@gentoo> <20100602015034.GA20037@rcwf64-moto-x42p> Message-ID: 你编了50编, 你有一编把make test 编过没? Lei 2010/6/2 Adam Jiang > On Wed, Jun 02, 2010 at 09:44:24AM +0800, frank.hu在greenpacket.com wrote: > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > > > > > > 兄弟你太强大了!为什吗不直接在topdir做 > > > > > > make test > > > > > > 而要直接跑到test里面去make? > > > > > > > 你是要说 make -C test 吧?其实没什么区别。 > > ......抱歉,这个讨论我不能再跟下去了,两位似乎根本不知道自己在干啥。 > > make test > > 没有-C,自己less topdir/Makefile看看吧。test/Makefile里面没有include顶层 > 目录中的makefile.in,缺少环境设置,这是你们都出错的原因。不要直接跑到 > test下面去make,而要在顶层目录make test做对于uclibc的测试。 > > 看uclibc的指南,google一下找找编译的步骤,稍微用心点就不会犯这样的低级错 > 误。而这个错误竟然被挂在这里好几天,我是服了。 > > /大头阿当 > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > -- "We learn from failure, not from success!" From jiang.adam在gmail.com Wed Jun 2 11:38:43 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 2 Jun 2010 12:38:43 +0900 Subject: =?utf-8?B?5pyJ6LCB57yW6L+H5p2ldWNsaWJj?= =?utf-8?B?IOW4ruW/meW/q+adpeeci+S4iw==?= In-Reply-To: References: <20100601102211.GB1223@gentoo> <20100601140325.GA4023@capricorn-x61> <20100602014424.GB5186@gentoo> <20100602015034.GA20037@rcwf64-moto-x42p> Message-ID: <20100602033843.GE20037@rcwf64-moto-x42p> On Wed, Jun 02, 2010 at 11:34:58AM +0800, lei yang wrote: > 你编了50编, 你有一编把make test 编过没? > 说老实话,make test没做过几遍,但有编译通过的时候,需要修改工具连和 uclibc的测试代码。除非你确认问题是工具链带来的,那么必须调整工具链,如果 是测试代码本身,我一般选择睁一只眼闭一只眼。 /Adam > Lei > > > 2010/6/2 Adam Jiang > > > On Wed, Jun 02, 2010 at 09:44:24AM +0800, frank.hu在greenpacket.com wrote: > > > > > /tmp/uClibc-0.9.30.1/test $ make -n | head > > > > > > > > 兄弟你太强大了!为什吗不直接在topdir做 > > > > > > > > make test > > > > > > > > 而要直接跑到test里面去make? > > > > > > > > > > 你是要说 make -C test 吧?其实没什么区别。 > > > > ......抱歉,这个讨论我不能再跟下去了,两位似乎根本不知道自己在干啥。 > > > > make test > > > > 没有-C,自己less topdir/Makefile看看吧。test/Makefile里面没有include顶层 > > 目录中的makefile.in,缺少环境设置,这是你们都出错的原因。不要直接跑到 > > test下面去make,而要在顶层目录make test做对于uclibc的测试。 > > > > 看uclibc的指南,google一下找找编译的步骤,稍微用心点就不会犯这样的低级错 > > 误。而这个错误竟然被挂在这里好几天,我是服了。 > > > > /大头阿当 > > > > _______________________________________________ > > Linux 内核开发中文邮件列表 > > Linux-kernel在zh-kernel.org > > http://zh-kernel.org/mailman/listinfo/linux-kernel > > Linux 内核开发中文社区: http://zh-kernel.org > > > > > > -- > "We learn from failure, not from success!" From gejunly在sina.com Wed Jun 2 15:50:34 2010 From: gejunly在sina.com (gejunly) Date: Wed, 2 Jun 2010 15:50:34 +0800 Subject: =?gb2312?B?0KG13KOsw7DDwc7K0ru+5KOs08nT2ryxysI=?= Message-ID: <201006021550336567406@sina.com> 小弟,在此冒昧问一句,在邮件列表中有百度linux方面的工程师吗?由于急事,急需联系。谢谢~~ 2010-06-02 gejunly From peterlinux2010在gmail.com Wed Jun 2 16:59:43 2010 From: peterlinux2010在gmail.com (peter linux) Date: Wed, 2 Jun 2010 16:59:43 +0800 Subject: =?GB2312?B?W290XSBjb2RlLmdvb2dsZbXEtO69qMa9zKg=?= Message-ID: 不好意思,再在此列表中问个无关的话题,感觉这里面有经验的高手多点,谢谢。 请问code.google.com的项目管理WEB用的是什么平台搭建的?因为感觉在google上存放重要的东东还不如在自己的服务器上放心,想自己在公司的服务器上搭建个。 code.google可以很好的实现wiki+SVN的项目代码管理,感觉那个平台很好,可以发布文章和讨论等。 -- Best Regards, Peter Zhou From lkun.erlv在gmail.com Wed Jun 2 17:06:32 2010 From: lkun.erlv在gmail.com (Ling Kun) Date: Wed, 2 Jun 2010 17:06:32 +0800 Subject: =?GB2312?B?UmU6IFtvdF0gY29kZS5nb29nbGW1xLTuvajGvcyo?= In-Reply-To: References: Message-ID: 那你应该试试trac。Google的那一套估计很难搞到。 2010/6/2 peter linux : > 不好意思,再在此列表中问个无关的话题,感觉这里面有经验的高手多点,谢谢。 > > 请问code.google.com的项目管理WEB用的是什么平台搭建的?因为感觉在google上存放重要的东东还不如在自己的服务器上放心,想自己在公司的服务器上搭建个。 > > code.google可以很好的实现wiki+SVN的项目代码管理,感觉那个平台很好,可以发布文章和讨论等。 > > > -- > Best Regards, > Peter Zhou > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- http://www.lingcc.com From lzy.dev在gmail.com Wed Jun 2 19:51:56 2010 From: lzy.dev在gmail.com (=?UTF-8?B?5YiY55+l6KiA?=) Date: Wed, 2 Jun 2010 19:51:56 +0800 Subject: =?UTF-8?B?6K+35pWZa3RocmVhZOaXoOazlemAgOWHuueahOWFpemXqOmXrumimA==?= Message-ID: struct foo_thread_t { struct task_struct* thread; wait_queue_head_t wait_q; short stop_flag; /* others */ }; /* thread A call */ int start(struct foo_thread_t* foo_thread) { init_waitqueue_head(foo_thread->wait_q); foo_thread->stop_flag = 0; foo_thread->thread = kthread_run(thread_fun, foo_thread, "XXX"); } /* thread A call */ int stop(struct foo_thread_t* foo_thread) { vfq_qthread->stop_flag = 1; wake_up_interruptible(&foo_thread->wait_q); printk("stop: wake_up_interruptible.\n"); kthread_stop(foo_thread->thread); /* wait it exit */ printk("stop: kthread_stop.\n"); return 0; } /* thread A call */ int process(struct foo_thread_t* foo_thread) { /* push data to thread_fun to process */ wake_up_interruptible(&foo_thread->wait_q); return 0; } /* thread B */ static int thread_fun(void* arg) { struct foo_thread_t* foo_thread = (struct foo_thread_t*)arg; while (!kthread_should_stop()) { printk("thread running.\n"); if (wait_event_interruptible(foo_thread->wait_q, (!skb_queue_empty(&foo_thread->data_q)) && (!foo_thread->stop_flag))) { printk("wait_event_interruptible.\n"); continue; } if (foo_thread->stop_flag) { printk("thread stop at stop_flag check.\n"); break; } /* process code */ } return 0; } 请教大家一个入门问题,请指教: 线程A调用start创建线程B,B通过wait_event_interruptible等待A wake_up,A每次调用process唤醒B的wait_event_interruptible 现在问题是在线程A调用stop来准备使线程B退出时,线程B的wait_event_interruptible无法返回,也就时A stop方法的 wait_event_interruptible没有效果。 导致线程A阻塞在kthread_stop方法上。这时线程A和B都停了。 需要知道原因和解决办法,请揭示原因。能给个更好的调度代码sample更好。多谢!! 以上 From alvin.cao在gmail.com Wed Jun 2 20:00:56 2010 From: alvin.cao在gmail.com (Alvin Cao) Date: Wed, 2 Jun 2010 20:00:56 +0800 Subject: =?UTF-8?B?UmU6IOivt+aVmWt0aHJlYWTml6Dms5XpgIDlh7rnmoTlhaXpl6jpl67popg=?= In-Reply-To: References: Message-ID: event的逻辑有误吧。。。 (!skb_queue_empty(&foo_thread->data_q)) || (foo_thread->stop_flag))) Best Regards, Alvin Cao 2010/6/2 刘知言 : > struct foo_thread_t > { >        struct task_struct* thread; >        wait_queue_head_t wait_q; >        short stop_flag; > >        /* others */ > }; > > /* thread A call */ > int start(struct foo_thread_t* foo_thread) > { >        init_waitqueue_head(foo_thread->wait_q); >        foo_thread->stop_flag = 0; > >        foo_thread->thread = >                kthread_run(thread_fun, foo_thread, "XXX"); > } > > /* thread A call */ > int stop(struct foo_thread_t* foo_thread) > { >        vfq_qthread->stop_flag = 1; >        wake_up_interruptible(&foo_thread->wait_q); >        printk("stop: wake_up_interruptible.\n"); >        kthread_stop(foo_thread->thread);               /* wait it exit */ >        printk("stop: kthread_stop.\n"); > >        return 0; > } > > /* thread A call */ > int process(struct foo_thread_t* foo_thread) > { >        /* push data to thread_fun to process */ > >        wake_up_interruptible(&foo_thread->wait_q); > >        return 0; > } > > /* thread B */ > static int thread_fun(void* arg) > { >        struct foo_thread_t* foo_thread = >                        (struct foo_thread_t*)arg; > >        while (!kthread_should_stop()) >        { >                printk("thread running.\n"); > >                if (wait_event_interruptible(foo_thread->wait_q, >                                (!skb_queue_empty(&foo_thread->data_q)) && >                                (!foo_thread->stop_flag))) >                { >                        printk("wait_event_interruptible.\n"); >                        continue; >                } > >                if (foo_thread->stop_flag) >                { >                        printk("thread stop at stop_flag check.\n"); >                        break; >                } > >                /* process code */ >        } > >        return 0; > } > > > 请教大家一个入门问题,请指教: > > 线程A调用start创建线程B,B通过wait_event_interruptible等待A > wake_up,A每次调用process唤醒B的wait_event_interruptible > 现在问题是在线程A调用stop来准备使线程B退出时,线程B的wait_event_interruptible无法返回,也就时A > stop方法的 wait_event_interruptible没有效果。 > 导致线程A阻塞在kthread_stop方法上。这时线程A和B都停了。 > > 需要知道原因和解决办法,请揭示原因。能给个更好的调度代码sample更好。多谢!! > > 以上 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From jiang.adam在gmail.com Wed Jun 2 23:09:50 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Thu, 3 Jun 2010 00:09:50 +0900 Subject: =?utf-8?B?6K+35pWZa3RocmVhZOaXoOazlQ==?= =?utf-8?B?6YCA5Ye655qE5YWl6Zeo6Zeu6aKY?= In-Reply-To: References: Message-ID: <20100602150950.GA5125@capricorn-x61> On Wed, Jun 02, 2010 at 07:51:56PM +0800, 刘知言 wrote: > /* thread B */ > static int thread_fun(void* arg) > { > struct foo_thread_t* foo_thread = > (struct foo_thread_t*)arg; > > while (!kthread_should_stop()) > { > printk("thread running.\n"); > > if (wait_event_interruptible(foo_thread->wait_q, > (!skb_queue_empty(&foo_thread->data_q)) && > (!foo_thread->stop_flag))) Hi, 如果我的概念没错的话,wait_event_interruptible是用来block用户空间进程的 ,而不能用于kenel thread之间的同步。当模块运行到这里的时候,进程进入的 sleep,这是由B线程带来的结果,然后,进程只有被一个interrupt或者其他信号 将唤醒之后相应的kernel thread才能动吧。如果你需要线程A唤醒B的话,是不是 不能用这种方法?是否可以考虑使用信号量来同步? > 请教大家一个入门问题,请指教: > > 线程A调用start创建线程B,B通过wait_event_interruptible等待A > wake_up,A每次调用process唤醒B的wait_event_interruptible > 现在问题是在线程A调用stop来准备使线程B退出时,线程B的wait_event_interruptible无法返回,也就时A > stop方法的 wait_event_interruptible没有效果。 > 导致线程A阻塞在kthread_stop方法上。这时线程A和B都停了。 > > 需要知道原因和解决办法,请揭示原因。能给个更好的调度代码sample更好。多谢!! > > 以上 你懂日语么? /大头阿当 From lxgmail在msn.cn Wed Jun 2 23:38:13 2010 From: lxgmail在msn.cn (=?gb2312?B?wbrQobjV?=) Date: Wed, 2 Jun 2010 15:38:13 +0000 Subject: =?gb2312?B?zfi/qLbByv2+3crHts/P387KzOI=?= =?gb2312?B?o78=?= Message-ID: 如主题,在网卡接收FIFO(32位)中以每次四个字节读数据,如果读的前两个字节是 xx FF,也就是第二个字节是FF时就断线了(其实第一个中断到来时,接收FIFO中的前六个字节正是以太网帧的目的MAC地址,FF FF FF FF FF FF 一个ARP的广播包),此时网卡貌似软件复位了一样,寄存器都恢复默认值了, 必须硬件复位,才能重新正常运行;但是,如果我在接收函数处打上断点,单步读数据,没有问题,可以正确接收数据。觉得这个问题比较怪,像是CPU读数据的时序问题又像是网卡的哪个寄存器没有配置好,不知大家有没有遇到这种情况,或者是在读数据时断线的情况,应该从哪方面考虑呢? _________________________________________________________________ 一张照片的自白――Windows Live照片的可爱视频介绍 http://windowslivesky.spaces.live.com/blog/cns!5892B6048E2498BD!889.entry From jiang.adam在gmail.com Thu Jun 3 11:03:58 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Thu, 3 Jun 2010 12:03:58 +0900 Subject: =?utf-8?B?6K+35pWZa3RocmVhZOaXoOazlQ==?= =?utf-8?B?6YCA5Ye655qE5YWl6Zeo6Zeu6aKY?= In-Reply-To: References: Message-ID: <20100603030357.GA29288@rcwf64-moto-x42p> On Wed, Jun 02, 2010 at 07:51:56PM +0800, 刘知言 wrote: > struct foo_thread_t > { > struct task_struct* thread; > wait_queue_head_t wait_q; > short stop_flag; > > /* others */ > }; > > /* thread A call */ > int start(struct foo_thread_t* foo_thread) > { > init_waitqueue_head(foo_thread->wait_q); > foo_thread->stop_flag = 0; > > foo_thread->thread = > kthread_run(thread_fun, foo_thread, "XXX"); > } > > /* thread A call */ > int stop(struct foo_thread_t* foo_thread) > { > vfq_qthread->stop_flag = 1; > wake_up_interruptible(&foo_thread->wait_q); 这里改成 wake_up_all(&foo_thread->wait_q); > printk("stop: wake_up_interruptible.\n"); > kthread_stop(foo_thread->thread); /* wait it exit */ > printk("stop: kthread_stop.\n"); > > return 0; > } > > /* thread A call */ > int process(struct foo_thread_t* foo_thread) > { > /* push data to thread_fun to process */ > > wake_up_interruptible(&foo_thread->wait_q); > > return 0; > } > > /* thread B */ > static int thread_fun(void* arg) > { > struct foo_thread_t* foo_thread = > (struct foo_thread_t*)arg; > > while (!kthread_should_stop()) > { > printk("thread running.\n"); > > if (wait_event_interruptible(foo_thread->wait_q, > (!skb_queue_empty(&foo_thread->data_q)) && > (!foo_thread->stop_flag))) 这里的逻辑改成 while (1) { printk("thread running.\n"); wait_event_interruptible(foo_thread->wait_q, (kthread_should_stop() || (!skb_queue_empty(&foo_thread->data_q))) ); if (kthread_should_stop()) break; ... } stop_flag有可能引起错误,除非访问或者更新之前加锁,此外可能还需要memory barrier,让所有CPU可见。 非常想知道你这个问题的答案...... /大头阿当 From yong.zhang0在gmail.com Thu Jun 3 11:13:08 2010 From: yong.zhang0在gmail.com (Yong Zhang) Date: Thu, 3 Jun 2010 11:13:08 +0800 Subject: =?UTF-8?B?UmU6IOivt+aVmWt0aHJlYWTml6Dms5XpgIDlh7rnmoTlhaXpl6jpl67popg=?= In-Reply-To: References: Message-ID: 2010/6/2 刘知言 : > struct foo_thread_t > { >        struct task_struct* thread; >        wait_queue_head_t wait_q; >        short stop_flag; > >        /* others */ > }; > > /* thread A call */ > int start(struct foo_thread_t* foo_thread) > { >        init_waitqueue_head(foo_thread->wait_q); >        foo_thread->stop_flag = 0; > >        foo_thread->thread = >                kthread_run(thread_fun, foo_thread, "XXX"); > } > > /* thread A call */ > int stop(struct foo_thread_t* foo_thread) > { >        vfq_qthread->stop_flag = 1; >        wake_up_interruptible(&foo_thread->wait_q); >        printk("stop: wake_up_interruptible.\n"); >        kthread_stop(foo_thread->thread);               /* wait it exit */ >        printk("stop: kthread_stop.\n"); > >        return 0; > } > > /* thread A call */ > int process(struct foo_thread_t* foo_thread) > { >        /* push data to thread_fun to process */ > >        wake_up_interruptible(&foo_thread->wait_q); > >        return 0; > } > > /* thread B */ > static int thread_fun(void* arg) > { >        struct foo_thread_t* foo_thread = >                        (struct foo_thread_t*)arg; > >        while (!kthread_should_stop()) >        { >                printk("thread running.\n"); > >                if (wait_event_interruptible(foo_thread->wait_q, >                                (!skb_queue_empty(&foo_thread->data_q)) && >                                (!foo_thread->stop_flag))) >                { >                        printk("wait_event_interruptible.\n"); >                        continue; >                } > >                if (foo_thread->stop_flag) >                { >                        printk("thread stop at stop_flag check.\n"); >                        break; >                } > >                /* process code */ >        } > >        return 0; > } > > > 请教大家一个入门问题,请指教: > > 线程A调用start创建线程B,B通过wait_event_interruptible等待A > wake_up,A每次调用process唤醒B的wait_event_interruptible > 现在问题是在线程A调用stop来准备使线程B退出时,线程B的wait_event_interruptible无法返回,也就时A > stop方法的 wait_event_interruptible没有效果。 > 导致线程A阻塞在kthread_stop方法上。这时线程A和B都停了。 这个结论是怎么下的? 是通过print输出还是ps 看进程状态? > > 需要知道原因和解决办法,请揭示原因。能给个更好的调度代码sample更好。多谢!! > > 以上 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From dragonlinux在gmail.com Fri Jun 4 01:15:50 2010 From: dragonlinux在gmail.com (yao zhao) Date: Thu, 3 Jun 2010 13:15:50 -0400 Subject: omap3530 beagle board nand Message-ID: Hi, Is there anyone who has experience with omap3530 beagle board's nand driver? When read, is it using interrupt or waiting the wait pin to know command is finished? also the wait pin is fixed or you can change it? thanks, yao From elendil.wang在gmail.com Fri Jun 4 11:09:37 2010 From: elendil.wang在gmail.com (Elendil) Date: Fri, 4 Jun 2010 11:09:37 +0800 Subject: =?GB2312?B?UmU6IM34v6i2wcr9vt3Kx7bPz9/Oyszio78=?= In-Reply-To: References: Message-ID: 2010/6/2 梁小刚 > > 如主题,在网卡接收FIFO(32位)中以每次四个字节读数据,如果读的前两个字节是 xx > FF,也就是第二个字节是FF时就断线了(其实第一个中断到来时,接收FIFO中的前六个字节正是以太网帧的目的MAC地址,FF FF FF FF FF FF > 一个ARP的广播包),此时网卡貌似软件复位了一样,寄存器都恢复默认值了, > 必须硬件复位,才能重新正常运行;但是,如果我在接收函数处打上断点,单步读数据,没有问题,可以正确接收数据。觉得这个问题比较怪,像是CPU读数据的时序问题又像是网卡的哪个寄存器没有配置好,不知大家有没有遇到这种情况,或者是在读数据时断线的情况,应该从哪方面考虑呢? 1.你的网卡是什么呢?CPU呢?请告知环境,方便别人定位问题 2.你能确认第二个字节只有0xff就会断吗?有发送其他数据试过吗?如组播MAC,怀疑这不是根本原因,甚至和问题一点关系都没有 3.不知你用的驱动是哪个?你是中断或软中断打断点的?可以把断点换成delay试试看 4.你可以量量网卡复位引脚的信号,再就是换同样的网卡试试,另外看看供电方面的设计 From lxgmail在msn.cn Fri Jun 4 13:14:56 2010 From: lxgmail在msn.cn (=?gb2312?B?wbrQobjV?=) Date: Fri, 4 Jun 2010 05:14:56 +0000 Subject: =?gb2312?B?UkU6IM34v6i2wcr9vt3Kxw==?= =?gb2312?B?ts/P387KzOKjvw==?= In-Reply-To: References: , Message-ID: 不好意思阿,我补充一下,网卡是SMSC的LAN9220,CPU是ARM926EJ,OS用的是Nucleus, 但是只是用了它的核心调度,驱动大部分是自己写的,初始化部分参考了LINUX 的SMSC9210驱动,整个系统是在FPGA上跑。能确定第二个字节只有0xff就会断,如果把断点处换成delay它的确就不断了. Date: Fri, 4 Jun 2010 11:09:37 +0800 Subject: Re: 网卡读数据是断线问题? From: elendil.wang在gmail.com To: lxgmail在msn.cn CC: linux-kernel在zh-kernel.org 2010/6/2 梁小刚 如主题,在网卡接收FIFO(32位)中以每次四个字节读数据,如果读的前两个字节是 xx FF,也就是第二个字节是FF时就断线了(其实第一个中断到来时,接收FIFO中的前六个字节正是以太网帧的目的MAC地址,FF FF FF FF FF FF 一个ARP的广播包),此时网卡貌似软件复位了一样,寄存器都恢复默认值了, 必须硬件复位,才能重新正常运行;但是,如果我在接收函数处打上断点,单步读数据,没有问题,可以正确接收数据。觉得这个问题比较怪,像是CPU读数据的时序问题又像是网卡的哪个寄存器没有配置好,不知大家有没有遇到这种情况,或者是在读数据时断线的情况,应该从哪方面考虑呢? 1.你的网卡是什么呢?CPU呢?请告知环境,方便别人定位问题 2.你能确认第二个字节只有0xff就会断吗?有发送其他数据试过吗?如组播MAC,怀疑这不是根本原因,甚至和问题一点关系都没有 3.不知你用的驱动是哪个?你是中断或软中断打断点的?可以把断点换成delay试试看 4.你可以量量网卡复位引脚的信号,再就是换同样的网卡试试,另外看看供电方面的设计 _________________________________________________________________ 一张照片的自白――Windows Live照片的可爱视频介绍 http://windowslivesky.spaces.live.com/blog/cns!5892B6048E2498BD!889.entry From elendil.wang在gmail.com Fri Jun 4 13:46:57 2010 From: elendil.wang在gmail.com (Elendil) Date: Fri, 4 Jun 2010 13:46:57 +0800 Subject: =?GB2312?B?UmU6IM34v6i2wcr9vt3Kx7bPz9/Oyszio78=?= In-Reply-To: References: Message-ID: 2010/6/4 梁小刚 > 不好意思阿,我补充一下,网卡是SMSC的LAN9220,CPU是ARM926EJ,OS用的是Nucleus, > 但是只是用了它的核心调度,驱动大部分是自己写的,初始化部分参考了LINUX > 的SMSC9210驱动,整个系统是在FPGA上跑。能确定第二个字节只有0xff就会断,如果把断点处换成delay它的确就不断了 > 1.不用抱歉,我只是提醒下,^_^ 2.没用过Nucleus,和VX类似的吗?稍微看了下LAN9220的介绍,PCI-ETH控制器,对你 的环境也不熟悉,给你些建议,可能用不上,请斟酌: a.排除硬件问题,如果是产品化的话,替换法是个不错的选择 b.因为是PCI接口的,你可能需要确认下PCI通信是否有问题,PCI的配置、时钟啊,看看是否有error之类的 c.你的问题看起来象时序问题,如果有条件,检查下信号质量,特别是PCI的,可以在接收0xff时候抓下波形 d.虽然你可能做过,不过还是建议下咨询FAE可能会有效果 > ------------------------------ > Date: Fri, 4 Jun 2010 11:09:37 +0800 > Subject: Re: 网卡读数据是断线问题? > From: elendil.wang在gmail.com > To: lxgmail在msn.cn > CC: linux-kernel在zh-kernel.org > > > 2010/6/2 梁小刚 > > > 如主题,在网卡接收FIFO(32位)中以每次四个字节读数据,如果读的前两个字节是 xx > FF,也就是第二个字节是FF时就断线了(其实第一个中断到来时,接收FIFO中的前六个字节正是以太网帧的目的MAC地址,FF FF FF FF FF FF > 一个ARP的广播包),此时网卡貌似软件复位了一样,寄存器都恢复默认值了, > 必须硬件复位,才能重新正常运行;但是,如果我在接收函数处打上断点,单步读数据,没有问题,可以正确接收数据。觉得这个问题比较怪,像是CPU读数据的时序问题又像是网卡的哪个寄存器没有配置好,不知大家有没有遇到这种情况,或者是在读数据时断线的情况,应该从哪方面考虑呢? > > > 1.你的网卡是什么呢?CPU呢?请告知环境,方便别人定位问题 > 2.你能确认第二个字节只有0xff就会断吗?有发送其他数据试过吗?如组播MAC,怀疑这不是根本原因,甚至和问题一点关系都没有 > 3.不知你用的驱动是哪个?你是中断或软中断打断点的?可以把断点换成delay试试看 > 4.你可以量量网卡复位引脚的信号,再就是换同样的网卡试试,另外看看供电方面的设计 > > ------------------------------ > 使用Messenger保护盾V2,支持多账号登录! 现在就下载! > From hangbing0203在gmail.com Fri Jun 4 18:26:52 2010 From: hangbing0203在gmail.com (=?UTF-8?B?5YiY6Ziz?=) Date: Fri, 4 Jun 2010 18:26:52 +0800 Subject: =?UTF-8?B?5YWz5LqOYnV5Ym94IOS4gOS4qumdnuW4uOWlh+aAqueahOmXrumimA==?= Message-ID: 问题:今天移植qt 在文件系统一个qt实例程序menus,出现 "# chmod 777 menus # ./menus -/bin/sh: menus: not found " 我开始以为menus脚本, 执行cat menus 是一堆乱码,很明显不脚本。 我就换另一个test程序,就能执行。然后我马上换文件系统也能执行。 请各位大家指点一下这怎么回事,实在是有点郁闷。 From lzy.dev在gmail.com Fri Jun 4 20:30:02 2010 From: lzy.dev在gmail.com (=?UTF-8?B?5YiY55+l6KiA?=) Date: Fri, 4 Jun 2010 20:30:02 +0800 Subject: =?UTF-8?B?UmU6IOivt+aVmWt0aHJlYWTml6Dms5XpgIDlh7rnmoTlhaXpl6jpl67popg=?= In-Reply-To: References: Message-ID: Hi, all: 呵呵2楼正解。 (!skb_queue_empty(&foo_thread->data_q)) || (foo_thread->stop_flag))) 马虎了。之前单独回复Alvin Cao,忘记全部回复了。 @Yong Zhang: 我在rmmod时调用stop发生block。 @大头阿当 谢谢 2010/6/3 Yong Zhang : > 2010/6/2 刘知言 : >> struct foo_thread_t >> { >>        struct task_struct* thread; >>        wait_queue_head_t wait_q; >>        short stop_flag; >> >>        /* others */ >> }; >> >> /* thread A call */ >> int start(struct foo_thread_t* foo_thread) >> { >>        init_waitqueue_head(foo_thread->wait_q); >>        foo_thread->stop_flag = 0; >> >>        foo_thread->thread = >>                kthread_run(thread_fun, foo_thread, "XXX"); >> } >> >> /* thread A call */ >> int stop(struct foo_thread_t* foo_thread) >> { >>        vfq_qthread->stop_flag = 1; >>        wake_up_interruptible(&foo_thread->wait_q); >>        printk("stop: wake_up_interruptible.\n"); >>        kthread_stop(foo_thread->thread);               /* wait it exit */ >>        printk("stop: kthread_stop.\n"); >> >>        return 0; >> } >> >> /* thread A call */ >> int process(struct foo_thread_t* foo_thread) >> { >>        /* push data to thread_fun to process */ >> >>        wake_up_interruptible(&foo_thread->wait_q); >> >>        return 0; >> } >> >> /* thread B */ >> static int thread_fun(void* arg) >> { >>        struct foo_thread_t* foo_thread = >>                        (struct foo_thread_t*)arg; >> >>        while (!kthread_should_stop()) >>        { >>                printk("thread running.\n"); >> >>                if (wait_event_interruptible(foo_thread->wait_q, >>                                (!skb_queue_empty(&foo_thread->data_q)) && >>                                (!foo_thread->stop_flag))) >>                { >>                        printk("wait_event_interruptible.\n"); >>                        continue; >>                } >> >>                if (foo_thread->stop_flag) >>                { >>                        printk("thread stop at stop_flag check.\n"); >>                        break; >>                } >> >>                /* process code */ >>        } >> >>        return 0; >> } >> >> >> 请教大家一个入门问题,请指教: >> >> 线程A调用start创建线程B,B通过wait_event_interruptible等待A >> wake_up,A每次调用process唤醒B的wait_event_interruptible >> 现在问题是在线程A调用stop来准备使线程B退出时,线程B的wait_event_interruptible无法返回,也就时A >> stop方法的 wait_event_interruptible没有效果。 >> 导致线程A阻塞在kthread_stop方法上。这时线程A和B都停了。 > > 这个结论是怎么下的? 是通过print输出还是ps 看进程状态? > >> >> 需要知道原因和解决办法,请揭示原因。能给个更好的调度代码sample更好。多谢!! >> >> 以上 >> _______________________________________________ >> Linux 内核开发中文邮件列表 >> Linux-kernel在zh-kernel.org >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> Linux 内核开发中文社区: http://zh-kernel.org > From lxgmail在msn.cn Fri Jun 4 21:49:04 2010 From: lxgmail在msn.cn (=?gb2312?B?wbrQobjV?=) Date: Fri, 4 Jun 2010 13:49:04 +0000 Subject: =?gb2312?B?UkU6ILnY09pidXli?= =?gb2312?B?b3gg0ru49rfHs6PG5rnWtcQ=?= =?gb2312?B?zsrM4g==?= In-Reply-To: References: Message-ID: > Date: Fri, 4 Jun 2010 18:26:52 +0800 > Subject: 关于buybox 一个非常奇怪的问题 > From: hangbing0203在gmail.com > To: linux-kernel在zh-kernel.org > > 问题:今天移植qt 在文件系统一个qt实例程序menus,出现 > "# chmod 777 menus > # ./menus > -/bin/sh: menus: not found " > > 我开始以为menus脚本, 执行cat menus 是一堆乱码,很明显不脚本。 > 我就换另一个test程序,就能执行。然后我马上换文件系统也能执行。 > > 请各位大家指点一下这怎么回事,实在是有点郁闷。 > menu是不是没有在test所在的文件系统中,而是在你换的这个文件系统中呢 _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org _________________________________________________________________ SkyDrive电子画册,带你领略精彩照片,分享“美”时“美”刻! http://www.windowslive.cn/campaigns/e-magazine/ngmchina/?a=c From adam8157在gmail.com Fri Jun 4 22:10:01 2010 From: adam8157在gmail.com (Adam Lee) Date: Fri, 4 Jun 2010 22:10:01 +0800 Subject: =?utf-8?B?5YWz5LqOYnV5Ym94IOS4gOS4qg==?= =?utf-8?B?6Z2e5bi45aWH5oCq55qE6Zeu6aKY?= In-Reply-To: References: Message-ID: <20100604141001.GA1971@debian> On Fri, Jun 04, 2010 at 06:26:52PM +0800, 刘阳 wrote: > 问题:今天移植qt 在文件系统一个qt实例程序menus,出现 > "# chmod 777 menus > # ./menus > -/bin/sh: menus: not found " > > 我开始以为menus脚本, 执行cat menus 是一堆乱码,很明显不脚本。 > 我就换另一个test程序,就能执行。然后我马上换文件系统也能执行。 > > 请各位大家指点一下这怎么回事,实在是有点郁闷。 你确定这个menus是目标系统的架构么? 例如在ARM下尝试运行IA32的就会提示找不到. -- Regards, Adam Lee -------------------------------------------------- E-mail: adam8157在gmail.com Website: http://www.adam8157.info -------------------------------------------------- From lzy.dev在gmail.com Fri Jun 4 23:33:04 2010 From: lzy.dev在gmail.com (=?UTF-8?B?5YiY55+l6KiA?=) Date: Fri, 4 Jun 2010 23:33:04 +0800 Subject: HOWTO read and write raw device in kernel? Message-ID: HI, all: 请问有那位在kernel里读写过裸设备的么?查一些资料说和操作字符设备类似,只要注意对齐。 那位高人说明下,有写过的sample片段代码再好不过喽。谢谢! 以上 Liu Zhiyan From greatsnows在gmail.com Sat Jun 5 10:31:01 2010 From: greatsnows在gmail.com (=?UTF-8?B?5b6Q5byA?=) Date: Sat, 5 Jun 2010 10:31:01 +0800 Subject: =?UTF-8?B?UmU6IOWFs+S6jmJ1eWJveCDkuIDkuKrpnZ7luLjlpYfmgKrnmoTpl67popg=?= In-Reply-To: <20100604141001.GA1971@debian> References: <20100604141001.GA1971@debian> Message-ID: # file menus 看看什么结果 在 2010年6月4日 下午10:10,Adam Lee 写道: > On Fri, Jun 04, 2010 at 06:26:52PM +0800, 刘阳 wrote: > > 问题:今天移植qt 在文件系统一个qt实例程序menus,出现 > > "# chmod 777 menus > > # ./menus > > -/bin/sh: menus: not found " > > > > 我开始以为menus脚本, 执行cat menus 是一堆乱码,很明显不脚本。 > > 我就换另一个test程序,就能执行。然后我马上换文件系统也能执行。 > > > > 请各位大家指点一下这怎么回事,实在是有点郁闷。 > > 你确定这个menus是目标系统的架构么? > 例如在ARM下尝试运行IA32的就会提示找不到. > > -- > Regards, > Adam Lee > -------------------------------------------------- > E-mail: adam8157在gmail.com > Website: http://www.adam8157.info > -------------------------------------------------- > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > -- Aaron Xu From dongbiao.fang在gmail.com Sat Jun 5 11:28:22 2010 From: dongbiao.fang在gmail.com (dongbiao fang) Date: Sat, 5 Jun 2010 11:28:22 +0800 Subject: linux Time issues Message-ID: I found an interesting issues In windows system the time on 2010-5-1 ,it is Saturday But in Linux (Fedora 12 ) system , it is Sunday It make me very supprise , Also it is Sunday 2010-6-5 Saturday on Linux and On windows Xp , it is Saturday , it seams ,linux go ahead the real time, I check my timezone , it is local (beijing, I seletcted Shanghai ,Asia ....) and I checked My time now when I send the email , the linux system time is : Date Sat Jun 5 11:28:04 CTS 2010 what is the matter?? From helight在zhwen.org Sat Jun 5 12:49:22 2010 From: helight在zhwen.org (=?gbk?B?aGVsaWdodC54dQ==?=) Date: Sat, 5 Jun 2010 12:49:22 +0800 Subject: =?gbk?B?u9i4tKO6SE9XVE8gcmVhZCBhbmQgd3JpdGUgcmF3?= =?gbk?B?IGRldmljZSBpbiBrZXJuZWw/?= Message-ID: 发件人: "刘知言"; 发送时间: 2010年6月4日(星期五) 晚上11:33 收件人: "linux-kernel"; 主题: HOWTO read and write raw device in kernel? HI, all: 请问有那位在kernel里读写过裸设备的么?查一些资料说和操作字符设备类似,只要注意对齐。 那位高人说明下,有写过的sample片段代码再好不过喽。谢谢! ----------------------------------------------------------------- http://zhwen.org/?p=program 这里是我写的一些简单的练习代码,可以看看! 以上 Liu Zhiyan _______________________________________________ Linux 内核开发中文邮件列表 Linux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux 内核开发中文社区: http://zh-kernel.org From peilinpeilin2003在gmail.com Sun Jun 6 20:53:03 2010 From: peilinpeilin2003在gmail.com (wang wang) Date: Sun, 6 Jun 2010 20:53:03 +0800 Subject: =?GB2312?B?0MLK1rGotcA=?= Message-ID: 大家好: 我是新手,经朋友介绍,加入本邮件列表,以后请大家多多指教! From chengtao.linux在gmail.com Mon Jun 7 09:18:35 2010 From: chengtao.linux在gmail.com (t c) Date: Mon, 7 Jun 2010 09:18:35 +0800 Subject: =?GB2312?B?x+u9zLLiytTHtsjryr1saW51eCDE2rrLv8m/v9DUtcS3vbeo?= Message-ID: HI: 各位早上好。 请教各位是如何验证linux内核的可靠性的? linux移植到新的芯片上会引入许多bug,直接影响到整个项目的可靠性,靠上层应用程序员报bug这样的效率太低,请问各位有没有更好的方法来验证kernel的可靠性,如比像LTP这样的工具,或者别的什么方法。 多谢多谢 From qzhang.g在gmail.com Mon Jun 7 09:37:29 2010 From: qzhang.g在gmail.com (Alvin) Date: Mon, 7 Jun 2010 09:37:29 +0800 Subject: =?UTF-8?B?UmU6IOivt+aVmea1i+ivleW1jOWFpeW8j2xpbnV4IOWGheaguOWPr+mdoOaAp+eahOaWuQ==?= =?UTF-8?B?5rOV?= In-Reply-To: References: Message-ID: Run LTP first,但我觉得芯片引入的bug大部分会是芯片driver的问题,而不是kernel本身 2010/6/7 t c > HI: > 各位早上好。 > 请教各位是如何验证linux内核的可靠性的? > > linux移植到新的芯片上会引入许多bug,直接影响到整个项目的可靠性,靠上层应用程序员报bug这样的效率太低,请问各位有没有更好的方法来验证kernel的可靠性,如比像LTP这样的工具,或者别的什么方法。 > > > > 多谢多谢 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- ~Alvin From lww_idea在hotmail.com Mon Jun 7 09:41:29 2010 From: lww_idea在hotmail.com (LiLARRY) Date: Mon, 7 Jun 2010 09:41:29 +0800 Subject: =?gb2312?B?UkU6INDCytaxqLXA?= In-Reply-To: References: Message-ID: welcome > Date: Sun, 6 Jun 2010 20:53:03 +0800 > Subject: 新手报道 > From: peilinpeilin2003在gmail.com > To: linux-kernel在zh-kernel.org > > 大家好: > > 我是新手,经朋友介绍,加入本邮件列表,以后请大家多多指教! > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org _________________________________________________________________ 一张照片的自白――Windows Live照片的可爱视频介绍 http://windowslivesky.spaces.live.com/blog/cns!5892B6048E2498BD!889.entry From figure1802在126.com Mon Jun 7 09:51:39 2010 From: figure1802在126.com (figo.zhang) Date: Mon, 7 Jun 2010 09:51:39 +0800 (CST) Subject: =?gbk?Q?Re:TD=CA=D6=BB=FA=D0=BE=C6=AC?= =?gbk?Q?=B9=AB=CB=BE-_=B4=F3=CC=C6=C1=AA=D0=BE__?= =?gbk?Q?=D5=D0=C6=B8LINUX/Android=BF=AA=B7=A2=C8=CB=D4=B1?= In-Reply-To: <6e297ccb.847f.128f2122ccb.Coremail.figure1802@126.com> References: <6e297ccb.847f.128f2122ccb.Coremail.figure1802@126.com> <20100531072649.GA16335@rcwf64-moto-x42p> Message-ID: <413bafb9.2ecc.129101b1dfb.Coremail.figure1802@126.com> 我们专注于TD手机芯片的研发,芯片基于ARM处理器。我们部门是一个富有朝气的团队,专注于LINUX/Android底层开发。 在我们团队里,可以从一个新的芯片开始做起,从u-boot到kernel,再到andriod的middleware。如果你想对linux kernel和linux driver有深入研究或者很感兴趣,请发简历给我们; 如果你对android手机开发感兴趣,请加入我们; 团队成员工作气氛积极向上,不少人在linux内核社区也是活跃分子,为内核开发做贡献。如果你在寻找一个工作环境好而且能得到锻炼和发展的平 台,别犹豫,请加入我们! 请发简历到:figo1802在gmail.com 在2010-06-01 13:53:17,"figo.zhang" 写道: TD手机芯片公司,大唐联芯 诚邀linux/android开发人员,负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 机会难得阿。 联系:figo1802在gmail.com或者zhangtianfei在leadcoretech.com 公司网址:www.leadcoretech.com 工作地点: 上海 工作性质: 全职 工作目的和性质: 负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 主要职责: 1. 熟悉相关芯片文档,结合具体情况,分析Android移植需要实现的功能和要求。 2. Android BSP包移植,实现UART,LCD, USB,FLASH等驱动。 3. 相关移植文档编写, 指导客户进行二次开发。 4. 完成相关工作详细设计以及测试规范。 所需资历: 1. 学历/所受培训:电子技术相关专业本科以上学历; 2. 3年以上Linux开发经验; 3. 有过在芯片裸板上面进行从零开始的Linux(Android)移植工作经验更佳。 4. 熟悉驱动开发流程, 有过重要驱动(UART, LCD, USB, FLASH等)的开发调试经验; 5. 熟悉ARM体系; 6. 熟悉下载工具开发流程,并有手机终端上面NOR & NAND下载开发经验者更佳。 7. 熟练使用各种硬件简单仪器仪表; 8. 具备分析、定位和解决常见软硬件问题的能力,有一定的疑难问题分析能力,能够构建完整的测试流程追查问题的根源,寻求解决方案; 9. 其它要求:学习能力强;有很强的理解分析能力,富于创新;良好的英语读、写能力;具有团队合作精神,敬业精神和良好的沟通能力。 网易为中小企业免费提供企业邮箱(自主域名) From lww_idea在hotmail.com Mon Jun 7 09:53:55 2010 From: lww_idea在hotmail.com (LiLARRY) Date: Mon, 7 Jun 2010 09:53:55 +0800 Subject: =?gb2312?B?UkU6IFREyta7+tC+xqw=?= =?gb2312?B?uavLvi0gtPPMxsGq0L4gIA==?= =?gb2312?B?1dDGuExJTlVYL0Fu?= =?gb2312?B?ZHJvaWS/qreiyMvUsQ==?= In-Reply-To: <413bafb9.2ecc.129101b1dfb.Coremail.figure1802@126.com> References: <6e297ccb.847f.128f2122ccb.Coremail.figure1802@126.com>, , , <20100531072649.GA16335@rcwf64-moto-x42p>, , , <413bafb9.2ecc.129101b1dfb.Coremail.figure1802@126.com> Message-ID: How about Location in shanghai? Caohejing? > Date: Mon, 7 Jun 2010 09:51:39 +0800 > From: figure1802在126.com > To: figure1802在126.com > Subject: Re:TD手机芯片公司- 大唐联芯 招聘LINUX/Android开发人员 > CC: linux-kernel在zh-kernel.org > > 我们专注于TD手机芯片的研发,芯片基于ARM处理器。我们部门是一个富有朝气的团队,专注于LINUX/Android底层开发。 > > 在我们团队里,可以从一个新的芯片开始做起,从u-boot到kernel,再到andriod的middleware。如果你想对linux kernel和linux driver有深入研究或者很感兴趣,请发简历给我们; 如果你对android手机开发感兴趣,请加入我们; > > 团队成员工作气氛积极向上,不少人在linux内核社区也是活跃分子,为内核开发做贡献。如果你在寻找一个工作环境好而且能得到锻炼和发展的平 台,别犹豫,请加入我们! > > 请发简历到:figo1802在gmail.com > > > 在2010-06-01 13:53:17,"figo.zhang" 写道: > TD手机芯片公司,大唐联芯 诚邀linux/android开发人员,负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 机会难得阿。 > 联系:figo1802在gmail.com或者zhangtianfei在leadcoretech.com > 公司网址:www.leadcoretech.com > 工作地点: 上海 > 工作性质: 全职 > > 工作目的和性质: > > 负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 > > 主要职责: > > 1. 熟悉相关芯片文档,结合具体情况,分析Android移植需要实现的功能和要求。 > > 2. Android BSP包移植,实现UART,LCD, USB,FLASH等驱动。 > > 3. 相关移植文档编写, 指导客户进行二次开发。 > > 4. 完成相关工作详细设计以及测试规范。 > > > > 所需资历: > > 1. 学历/所受培训:电子技术相关专业本科以上学历; > > 2. 3年以上Linux开发经验; > > 3. 有过在芯片裸板上面进行从零开始的Linux(Android)移植工作经验更佳。 > > 4. 熟悉驱动开发流程, 有过重要驱动(UART, LCD, USB, FLASH等)的开发调试经验; > > 5. 熟悉ARM体系; > > 6. 熟悉下载工具开发流程,并有手机终端上面NOR & NAND下载开发经验者更佳。 > > 7. 熟练使用各种硬件简单仪器仪表; > > 8. 具备分析、定位和解决常见软硬件问题的能力,有一定的疑难问题分析能力,能够构建完整的测试流程追查问题的根源,寻求解决方案; > > 9. 其它要求:学习能力强;有很强的理解分析能力,富于创新;良好的英语读、写能力;具有团队合作精神,敬业精神和良好的沟通能力。 > > > > > > > > 网易为中小企业免费提供企业邮箱(自主域名) > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org _________________________________________________________________ MSN十年回馈,每位用户可免费获得价值25元的卡巴斯基反病毒软件2010激活码,快来领取! http://kaba.msn.com.cn/?k=1 From figure1802在126.com Mon Jun 7 09:59:58 2010 From: figure1802在126.com (figo.zhang) Date: Mon, 7 Jun 2010 09:59:58 +0800 (CST) Subject: =?gbk?Q?Re:RE:_TD=CA=D6?= =?gbk?Q?=BB=FA=D0=BE=C6=AC=B9=AB=CB=BE-_=B4=F3=CC=C6=C1=AA=D0=BE?= =?gbk?Q?__=D5=D0=C6=B8LINUX/Android=BF=AA=B7=A2=C8=CB=D4=B1?= In-Reply-To: References: <6e297ccb.847f.128f2122ccb.Coremail.figure1802@126.com>, , , <20100531072649.GA16335@rcwf64-moto-x42p>, , , <413bafb9.2ecc.129101b1dfb.Coremail.figure1802@126.com> Message-ID: <4442c841.32f5.1291022ba59.Coremail.figure1802@126.com> yes, 现在是在漕河径,离9号线漕河径地铁站很近。 在2010-06-07 09:53:55,LiLARRY 写道: How about Location in shanghai? Caohejing? > Date: Mon, 7 Jun 2010 09:51:39 +0800 > From: figure1802在126.com > To: figure1802在126.com > Subject: Re:TD手机芯片公司- 大唐联芯 招聘LINUX/Android开发人员 > CC: linux-kernel在zh-kernel.org > > 我们专注于TD手机芯片的研发,芯片基于ARM处理器。我们部门是一个富有朝气的团队,专注于LINUX/Android底层开发。 > > 在我们团队里,可以从一个新的芯片开始做起,从u-boot到kernel,再到andriod的middleware。如果你想对linux kernel和linux driver有深入研究或者很感兴趣,请发简历给我们; 如果你对android手机开发感兴趣,请加入我们; > > 团队成员工作气氛积极向上,不少人在linux内核社区也是活跃分子,为内核开发做贡献。如果你在寻找一个工作环境好而且能得到锻炼和发展的平 台,别犹豫,请加入我们! > > 请发简历到:figo1802在gmail.com > > > 在2010-06-01 13:53:17,"figo.zhang" 写道: > TD手机芯片公司,大唐联芯 诚邀linux/android开发人员,负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 机会难得阿。 > 联系:figo1802在gmail.com或者zhangtianfei在leadcoretech.com > 公司网址:www.leadcoretech.com > 工作地点: 上海 > 工作性质: 全职 > > 工作目的和性质: > > 负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 > > 主要职责: > > 1. 熟悉相关芯片文档,结合具体情况,分析Android移植需要实现的功能和要求。 > > 2. Android BSP包移植,实现UART,LCD, USB,FLASH等驱动。 > > 3. 相关移植文档编写, 指导客户进行二次开发。 > > 4. 完成相关工作详细设计以及测试规范。 > > > > 所需资历: > > 1. 学历/所受培训:电子技术相关专业本科以上学历; > > 2. 3年以上Linux开发经验; > > 3. 有过在芯片裸板上面进行从零开始的Linux(Android)移植工作经验更佳。 > > 4. 熟悉驱动开发流程, 有过重要驱动(UART, LCD, USB, FLASH等)的开发调试经验; > > 5. 熟悉ARM体系; > > 6. 熟悉下载工具开发流程,并有手机终端上面NOR & NAND下载开发经验者更佳。 > > 7. 熟练使用各种硬件简单仪器仪表; > > 8. 具备分析、定位和解决常见软硬件问题的能力,有一定的疑难问题分析能力,能够构建完整的测试流程追查问题的根源,寻求解决方案; > > 9. 其它要求:学习能力强;有很强的理解分析能力,富于创新;良好的英语读、写能力;具有团队合作精神,敬业精神和良好的沟通能力。 > > > > > > > > 网易为中小企业免费提供企业邮箱(自主域名) > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org 使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载! From lzsh0428在gmail.com Mon Jun 7 10:01:52 2010 From: lzsh0428在gmail.com (=?utf-8?B?bHpzaDA0Mjg=?=) Date: Mon, 7 Jun 2010 10:01:52 +0800 Subject: =?utf-8?B?UmU6IFJlOlJFOl9UROaJi+acuuiKr+eJh+WFrOWPuC1f5aSn5ZSQ6IGU6IqvX1/mi5vogZhMSU5VWC9BbmRyb2lk5byA5Y+R5Lq65ZGY?= References: , <6e297ccb.847f.128f2122ccb.Coremail.figure1802@126.com>, , , <20100531072649.GA16335@rcwf64-moto-x42p>, , , <413bafb9.2ecc.129101b1dfb.Coremail.figure1802@126.com>, <4442c841.32f5.1291022ba59.Coremail.figure1802@126.com> Message-ID: <201006071001494064715@gmail.com> 北京招人吗? 2010-06-07 lzsh0428 发件人: figo.zhang 发送时间: 2010-06-07 10:00:28 收件人: LiLARRY 抄送: linux-kernel 主题: Re:RE:_TD手机芯片公司-_大唐联芯__招聘LINUX/Android开发人员 yes, 现在是在漕河径,离9号线漕河径地铁站很近。 在2010-06-07 09:53:55,LiLARRY 写道: How about Location in shanghai? Caohejing? > Date: Mon, 7 Jun 2010 09:51:39 +0800 > From: figure1802在126.com > To: figure1802在126.com > Subject: Re:TD手机芯片公司- 大唐联芯 招聘LINUX/Android开发人员 > CC: linux-kernel在zh-kernel.org > > 我们专注于TD手机芯片的研发,芯片基于ARM处理器。我们部门是一个富有朝气的团队,专注于LINUX/Android底层开发。 > > 在我们团队里,可以从一个新的芯片开始做起,从u-boot到kernel,再到andriod的middleware。如果你想对linux kernel和linux driver有深入研究或者很感兴趣,请发简历给我们; 如果你对android手机开发感兴趣,请加入我们; > > 团队成员工作气氛积极向上,不少人在linux内核社区也是活跃分子,为内核开发做贡献。如果你在寻找一个工作环境好而且能得到锻炼和发展的平 台,别犹豫,请加入我们! > > 请发简历到:figo1802在gmail.com > > > 在2010-06-01 13:53:17,"figo.zhang" 写道: > TD手机芯片公司,大唐联芯 诚邀linux/android开发人员,负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 机会难得阿。 > 联系:figo1802在gmail.com或者zhangtianfei在leadcoretech.com > 公司网址:www.leadcoretech.com > 工作地点: 上海 > 工作性质: 全职 > > 工作目的和性质: > > 负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 > > 主要职责: > > 1. 熟悉相关芯片文档,结合具体情况,分析Android移植需要实现的功能和要求。 > > 2. Android BSP包移植,实现UART,LCD, USB,FLASH等驱动。 > > 3. 相关移植文档编写, 指导客户进行二次开发。 > > 4. 完成相关工作详细设计以及测试规范。 > > > > 所需资历: > > 1. 学历/所受培训:电子技术相关专业本科以上学历; > > 2. 3年以上Linux开发经验; > > 3. 有过在芯片裸板上面进行从零开始的Linux(Android)移植工作经验更佳。 > > 4. 熟悉驱动开发流程, 有过重要驱动(UART, LCD, USB, FLASH等)的开发调试经验; > > 5. 熟悉ARM体系; > > 6. 熟悉下载工具开发流程,并有手机终端上面NOR & NAND下载开发经验者更佳。 > > 7. 熟练使用各种硬件简单仪器仪表; > > 8. 具备分析、定位和解决常见软硬件问题的能力,有一定的疑难问题分析能力,能够构建完整的测试流程追查问题的根源,寻求解决方案; > > 9. 其它要求:学习能力强;有很强的理解分析能力,富于创新;良好的英语读、写能力;具有团队合作精神,敬业精神和良好的沟通能力。 > > > > > > > > 网易为中小企业免费提供企业邮箱(自主域名) > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org 使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载! _______________________________________________ Linux 内核开发中文邮件列表 Linux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux 内核开发中文社区: http://zh-kernel.org From figure1802在126.com Mon Jun 7 10:03:36 2010 From: figure1802在126.com (figo.zhang) Date: Mon, 7 Jun 2010 10:03:36 +0800 (CST) Subject: =?gbk?Q?Re:Re:_Re:RE:=5FTD=CA=D6=BB=FA=D0=BE=C6=AC=B9=AB=CB=BE-=5F?= =?gbk?Q?=B4=F3=CC=C6=C1=AA=D0=BE=5F=5F=D5=D0=C6=B8LINU?= =?gbk?Q?X/Android=BF=AA=B7=A2=C8=CB=D4=B1?= In-Reply-To: <201006071001494064715@gmail.com> References: <201006071001494064715@gmail.com> , <6e297ccb.847f.128f2122ccb.Coremail.figure1802@126.com>, , , <20100531072649.GA16335@rcwf64-moto-x42p>, , , <413bafb9.2ecc.129101b1dfb.Coremail.figure1802@126.com>, <4442c841.32f5.1291022ba59.Coremail.figure1802@126.com> Message-ID: <79f8d05b.3501.12910260e0a.Coremail.figure1802@126.com> 抱歉,目前只在上海。谢谢 在2010-06-07 10:01:52,lzsh0428 写道:  北京招人吗? 2010-06-07 lzsh0428 发件人: figo.zhang 发送时间: 2010-06-07 10:00:28 收件人: LiLARRY 抄送: linux-kernel 主题: Re:RE:_TD手机芯片公司-_大唐联芯__招聘LINUX/Android开发人员 yes, 现在是在漕河径,离9号线漕河径地铁站很近。 在2010-06-07 09:53:55,LiLARRY 写道: How about Location in shanghai? Caohejing? > Date: Mon, 7 Jun 2010 09:51:39 +0800 > From: figure1802在126.com > To: figure1802在126.com > Subject: Re:TD手机芯片公司- 大唐联芯 招聘LINUX/Android开发人员 > CC: linux-kernel在zh-kernel.org > > 我们专注于TD手机芯片的研发,芯片基于ARM处理器。我们部门是一个富有朝气的团队,专注于LINUX/Android底层开发。 > > 在我们团队里,可以从一个新的芯片开始做起,从u-boot到kernel,再到andriod的middleware。如果你想对linux kernel和linux driver有深入研究或者很感兴趣,请发简历给我们; 如果你对android手机开发感兴趣,请加入我们; > > 团队成员工作气氛积极向上,不少人在linux内核社区也是活跃分子,为内核开发做贡献。如果你在寻找一个工作环境好而且能得到锻炼和发展的平 台,别犹豫,请加入我们! > > 请发简历到:figo1802在gmail.com > > > 在2010-06-01 13:53:17,"figo.zhang" 写道: > TD手机芯片公司,大唐联芯 诚邀linux/android开发人员,负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 机会难得阿。 > 联系:figo1802在gmail.com或者zhangtianfei在leadcoretech.com > 公司网址:www.leadcoretech.com > 工作地点: 上海 > 工作性质: 全职 > > 工作目的和性质: > > 负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 > > 主要职责: > > 1. 熟悉相关芯片文档,结合具体情况,分析Android移植需要实现的功能和要求。 > > 2. Android BSP包移植,实现UART,LCD, USB,FLASH等驱动。 > > 3. 相关移植文档编写, 指导客户进行二次开发。 > > 4. 完成相关工作详细设计以及测试规范。 > > > > 所需资历: > > 1. 学历/所受培训:电子技术相关专业本科以上学历; > > 2. 3年以上Linux开发经验; > > 3. 有过在芯片裸板上面进行从零开始的Linux(Android)移植工作经验更佳。 > > 4. 熟悉驱动开发流程, 有过重要驱动(UART, LCD, USB, FLASH等)的开发调试经验; > > 5. 熟悉ARM体系; > > 6. 熟悉下载工具开发流程,并有手机终端上面NOR & NAND下载开发经验者更佳。 > > 7. 熟练使用各种硬件简单仪器仪表; > > 8. 具备分析、定位和解决常见软硬件问题的能力,有一定的疑难问题分析能力,能够构建完整的测试流程追查问题的根源,寻求解决方案; > > 9. 其它要求:学习能力强;有很强的理解分析能力,富于创新;良好的英语读、写能力;具有团队合作精神,敬业精神和良好的沟通能力。 > > > > > > > > 网易为中小企业免费提供企业邮箱(自主域名) > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org 使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载! _______________________________________________ Linux 内核开发中文邮件列表 Linux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux 内核开发中文社区: http://zh-kernel.org From peilinpeilin2003在gmail.com Mon Jun 7 10:06:09 2010 From: peilinpeilin2003在gmail.com (wang wang) Date: Mon, 7 Jun 2010 10:06:09 +0800 Subject: =?GB2312?B?x/O9zLnY09ogSkZGUzIgzsS8/s+1zbO1xM7KzOIh?= Message-ID: Hi Everyone : 大家早上好!我现在用的平台是 at91rm9200-dk 32M dram 8M norflash ,原来用的是 U-Boot + uImage + ramdisk(ext2) (Linux version 2.6.25) (gcc version 3.4.5) .现在想在系统里增加 1M的 JFFS2 文件系统,放在 norflash 后面的空间里,把jffs2 文件系统的首地址 0x10600000 映射到 /dev/mtdblock0 ,准备在系统启动后,mount -t jffs2 /dev/mtdblock0 /mnt/ . 这个增加的 JFFS2 文件系统是用来保存数据的(原来的ramdisk 不能保存数据)。 我现在已经在PC 上生成了 jffs2 文件系统的映像文件 rootfs.jffs2 (大小1M 可以在 PC 上挂载,并向里写入数据),且已经把他烧录到 norflash 的 0x10600000 开始的空间上。 但我不知道怎么把 0x10600000 映射到 /dev/mtdblock0 上,别人告诉我要修改 源码中的硬件驱动(注册)部分。但我不知道具体是那个文件,该怎么修改;还有 make menuconfig 中该怎么修改。 我是新手,还请老手赐教,不胜感激!!! Best Regard & Thanks ! Colin From lzsh0428在gmail.com Mon Jun 7 10:07:03 2010 From: lzsh0428在gmail.com (=?utf-8?B?bHpzaDA0Mjg=?=) Date: Mon, 7 Jun 2010 10:07:03 +0800 Subject: =?utf-8?B?UmU6IFJlOlJlOl9SZTpSRTpfVETmiYvmnLroiq/niYflhazlj7gtX+Wkp+WUkOiBlOiKr19f5oub6IGYTElOVVgvQW5kcm9pZOW8gOWPkeS6uuWRmA==?= References: <201006071001494064715@gmail.com>, , <6e297ccb.847f.128f2122ccb.Coremail.figure1802@126.com>, , , <20100531072649.GA16335@rcwf64-moto-x42p>, , , <413bafb9.2ecc.129101b1dfb.Coremail.figure1802@126.com>, <4442c841.32f5.1291022ba59.Coremail.figure1802@126.com>, <79f8d05b.3501.12910260e0a.Coremail.figure1802@126.com> Message-ID: <201006071007013285345@gmail.com> 呵呵,好的,有在北京招聘的话我就投下试试哦 2010-06-07 lzsh0428 发件人: figo.zhang 发送时间: 2010-06-07 10:03:42 收件人: lzsh0428 抄送: LiLARRY; linux-kernel 主题: Re:Re:_Re:RE:_TD手机芯片公司-_大唐联芯__招聘LINUX/Android开发人员 抱歉,目前只在上海。谢谢 在2010-06-07 10:01:52,lzsh0428 写道:  北京招人吗? 2010-06-07 lzsh0428 发件人: figo.zhang 发送时间: 2010-06-07 10:00:28 收件人: LiLARRY 抄送: linux-kernel 主题: Re:RE:_TD手机芯片公司-_大唐联芯__招聘LINUX/Android开发人员 yes, 现在是在漕河径,离9号线漕河径地铁站很近。 在2010-06-07 09:53:55,LiLARRY 写道: How about Location in shanghai? Caohejing? > Date: Mon, 7 Jun 2010 09:51:39 +0800 > From: figure1802在126.com > To: figure1802在126.com > Subject: Re:TD手机芯片公司- 大唐联芯 招聘LINUX/Android开发人员 > CC: linux-kernel在zh-kernel.org > > 我们专注于TD手机芯片的研发,芯片基于ARM处理器。我们部门是一个富有朝气的团队,专注于LINUX/Android底层开发。 > > 在我们团队里,可以从一个新的芯片开始做起,从u-boot到kernel,再到andriod的middleware。如果你想对linux kernel和linux driver有深入研究或者很感兴趣,请发简历给我们; 如果你对android手机开发感兴趣,请加入我们; > > 团队成员工作气氛积极向上,不少人在linux内核社区也是活跃分子,为内核开发做贡献。如果你在寻找一个工作环境好而且能得到锻炼和发展的平 台,别犹豫,请加入我们! > > 请发简历到:figo1802在gmail.com > > > 在2010-06-01 13:53:17,"figo.zhang" 写道: > TD手机芯片公司,大唐联芯 诚邀linux/android开发人员,负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 机会难得阿。 > 联系:figo1802在gmail.com或者zhangtianfei在leadcoretech.com > 公司网址:www.leadcoretech.com > 工作地点: 上海 > 工作性质: 全职 > > 工作目的和性质: > > 负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 > > 主要职责: > > 1. 熟悉相关芯片文档,结合具体情况,分析Android移植需要实现的功能和要求。 > > 2. Android BSP包移植,实现UART,LCD, USB,FLASH等驱动。 > > 3. 相关移植文档编写, 指导客户进行二次开发。 > > 4. 完成相关工作详细设计以及测试规范。 > > > > 所需资历: > > 1. 学历/所受培训:电子技术相关专业本科以上学历; > > 2. 3年以上Linux开发经验; > > 3. 有过在芯片裸板上面进行从零开始的Linux(Android)移植工作经验更佳。 > > 4. 熟悉驱动开发流程, 有过重要驱动(UART, LCD, USB, FLASH等)的开发调试经验; > > 5. 熟悉ARM体系; > > 6. 熟悉下载工具开发流程,并有手机终端上面NOR & NAND下载开发经验者更佳。 > > 7. 熟练使用各种硬件简单仪器仪表; > > 8. 具备分析、定位和解决常见软硬件问题的能力,有一定的疑难问题分析能力,能够构建完整的测试流程追查问题的根源,寻求解决方案; > > 9. 其它要求:学习能力强;有很强的理解分析能力,富于创新;良好的英语读、写能力;具有团队合作精神,敬业精神和良好的沟通能力。 > > > > > > > > 网易为中小企业免费提供企业邮箱(自主域名) > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org 使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载! _______________________________________________ Linux 内核开发中文邮件列表 Linux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux 内核开发中文社区: http://zh-kernel.org 网易为中小企业免费提供企业邮箱(自主域名) From 116544167在qq.com Mon Jun 7 10:13:32 2010 From: 116544167在qq.com (=?gbk?B?7MUvYWlxt+c=?=) Date: Mon, 7 Jun 2010 10:13:32 +0800 Subject: =?gbk?B?u9i4tKO6udjT2mJ1eWJveCDSu7j2t8ezo8bmudY=?= =?gbk?B?tcTOyszi?= Message-ID: 目标平台不匹配,重新编译下吧。 ------------------ 原始邮件 ------------------ 发件人: "刘阳"; 发送时间: 2010年6月4日(星期五) 晚上6:26 收件人: "linux-kernel"; 主题: 关于buybox 一个非常奇怪的问题 问题:今天移植qt 在文件系统一个qt实例程序menus,出现 "# chmod 777 menus # ./menus -/bin/sh: menus: not found " 我开始以为menus脚本, 执行cat menus 是一堆乱码,很明显不脚本。 我就换另一个test程序,就能执行。然后我马上换文件系统也能执行。 请各位大家指点一下这怎么回事,实在是有点郁闷。 _______________________________________________ Linux 内核开发中文邮件列表 Linux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux 内核开发中文社区: http://zh-kernel.org From yuxiaofei0920在gmail.com Mon Jun 7 14:00:57 2010 From: yuxiaofei0920在gmail.com (=?GB2312?B?0+DP/rfJ?=) Date: Mon, 7 Jun 2010 14:00:57 +0800 Subject: =?GB2312?B?c2tpZmYgTExDINXQxrg=?= Message-ID: 公司位于上海徐汇漕河泾,中美合资性质。公司详情可上网站www.skiff.com查询。有意向的可以发简历至xfyu在skiff.com .下面是BSP工程师的JD,对android应用程序有兴趣的也可以发简历给我-----说明一下,因为我自己是BSP部门的,但是AP部门也招人!欢迎有志之士加入我们! JD: Linux BSP 软件工程师 岗位职责: 1、基于Linux的设备驱动程序的编写与维护; 2、基于Linux的设备驱动测试程序的编写与维护; 3、基于Linux的设备驱动bug的调试; 4、基于Linux的设备驱动性能的优化; 5、编写设备驱动设计文档。 任职要求: 1.本科及以上学历,电子、通信类相关专业毕业,有3年以上工作经验; 2.有手机或电子书方面的工作经验优先; 3.熟悉Linux驱动架构,对IIC、SPI、I2S、UART、USB、SD卡等常用驱动调试有实战经验; 4.熟悉嵌入式Linux操作系统内存管理、进程调度等; 5.精通Linux C语言编程,并有良好的编程风格; 6.熟悉Android软件构架优先; 7.对多媒体、3G等知识面较广者优先; 8.有良好的沟通协调能力; From jiang.adam在gmail.com Mon Jun 7 14:20:00 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Mon, 7 Jun 2010 15:20:00 +0900 Subject: =?GB2312?B?UmU6IMfzvcy52NPaIEpGRlMyIM7EvP7Ptc2ztcTOysziIQ==?= In-Reply-To: References: Message-ID: 2010/6/7 wang wang : > Hi Everyone : > > 大家早上好!我现在用的平台是 at91rm9200-dk 32M dram 8M norflash ,原来用的是 U-Boot + > uImage + ramdisk(ext2) (Linux version 2.6.25) (gcc version 3.4.5) > .现在想在系统里增加 1M的 JFFS2 文件系统,放在 norflash 后面的空间里,把jffs2 文件系统的首地址 0x10600000 映射到 > /dev/mtdblock0 ,准备在系统启动后,mount -t jffs2 /dev/mtdblock0 /mnt/ . 这个增加的 > JFFS2 文件系统是用来保存数据的(原来的ramdisk 不能保存数据)。 > > 我现在已经在PC 上生成了 jffs2 文件系统的映像文件 rootfs.jffs2 (大小1M 可以在 PC > 上挂载,并向里写入数据),且已经把他烧录到 norflash 的 0x10600000 开始的空间上。 > 但我不知道怎么把 0x10600000 映射到 /dev/mtdblock0 上,别人告诉我要修改 > 源码中的硬件驱动(注册)部分。但我不知道具体是那个文件,该怎么修改;还有 make menuconfig 中该怎么修改。 Linux内核对mtd设备的支持包括两个部分,一层是统一的mtd设备Interface, 另一层是各个硬件的设备驱动。其中第二个部分通常需要自己编写。 一般的做法是,将mtd设备的硬件驱动放在 $LNX/drivers/mtd/maps/ 里面,然后还要为它写Makefile,并添加编译选项;如果你还没有做这些工作, 那么在make menuconfig中就找不到这些编译选项了。 Norflash的物理地址在platform加点之以后就是可以见得,你可以参照 $LNX/drivers/mtd/maps/ 里面的任何一起驱动写自己的驱动程序。 /大头阿当 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From jiang.adam在gmail.com Mon Jun 7 14:39:35 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Mon, 7 Jun 2010 15:39:35 +0900 Subject: =?GB2312?B?UmU6IMfzvcy52NPaIEpGRlMyIM7EvP7Ptc2ztcTOysziIQ==?= In-Reply-To: References: Message-ID: 2010/6/7 Adam Jiang : > 2010/6/7 wang wang : >> Hi Everyone : >> >> 大家早上好!我现在用的平台是 at91rm9200-dk 32M dram 8M norflash ,原来用的是 U-Boot + >> uImage + ramdisk(ext2) (Linux version 2.6.25) (gcc version 3.4.5) >> .现在想在系统里增加 1M的 JFFS2 文件系统,放在 norflash 后面的空间里,把jffs2 文件系统的首地址 0x10600000 映射到 >> /dev/mtdblock0 ,准备在系统启动后,mount -t jffs2 /dev/mtdblock0 /mnt/ . 这个增加的 >> JFFS2 文件系统是用来保存数据的(原来的ramdisk 不能保存数据)。 >> >> 我现在已经在PC 上生成了 jffs2 文件系统的映像文件 rootfs.jffs2 (大小1M 可以在 PC >> 上挂载,并向里写入数据),且已经把他烧录到 norflash 的 0x10600000 开始的空间上。 >> 但我不知道怎么把 0x10600000 映射到 /dev/mtdblock0 上,别人告诉我要修改 >> 源码中的硬件驱动(注册)部分。但我不知道具体是那个文件,该怎么修改;还有 make menuconfig 中该怎么修改。 > > Linux内核对mtd设备的支持包括两个部分,一层是统一的mtd设备Interface, > 另一层是各个硬件的设备驱动。其中第二个部分通常需要自己编写。 我写了一个很概括的例子,你可以看看 struct map_info foo_map = { name: "foo mapped flash" bankwidth: BUSWIDTH, read: foo_read, copy_from: foo_copy_from, write: foo_map_write, copy_to: foo_copy_to, }; static struct mtd_partition foo_partitions[] = { { name: "part1", offset: OFFSET_OF_PART1, size: SIZE_OF_PART1 }, { name: "part2", offset: OFFSET_OF_PART2, size: SIZE_OF_PART2 }, { name: "part4", offset: OFFSET_OF_PART3, size: SIZE_OF_PART3 }, }; init __init init_foo_map(void) { foo_map.size = flash_windows_size; foo_map.virt = ioremap( flash_window_addr, flash_window_size); foo_mtd = do_map_probe("xxx", &foo_map); ... add_mtd_partitions(foo_mtd, foo_partitions, numofpartitions); } 关键是map_info和mtd_partition两个数据结构和, do_map_probe,add_mtd_partitions两个函数。 具体的映射关系,需要你自己调整。 /大头阿当 > > 一般的做法是,将mtd设备的硬件驱动放在 > $LNX/drivers/mtd/maps/ > 里面,然后还要为它写Makefile,并添加编译选项;如果你还没有做这些工作, > 那么在make menuconfig中就找不到这些编译选项了。 > > Norflash的物理地址在platform加点之以后就是可以见得,你可以参照 > $LNX/drivers/mtd/maps/ > 里面的任何一起驱动写自己的驱动程序。 > > /大头阿当 > > -- > Adam Jiang > ----------------------------------- > e-mail:jiang.adam在gmail.com > http://www.adamjiang.com > ----------------------------------- > -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From parson.cheng在cybertan.com.tw Mon Jun 7 15:03:43 2010 From: parson.cheng在cybertan.com.tw (parson.cheng在cybertan.com.tw) Date: Mon, 7 Jun 2010 15:03:43 +0800 Subject: =?gb2312?B?a21hbGxvYyBvb3BzIM7KzOI=?= Message-ID: <5D262E80A3F72048BB3FBC976D724D91083C3EEA@CTMAIL03.cybertan.com.tw> ���������ֵ��⣡���ְ��� ���� �����untu Ŀ��̨��s3c2440 board GCC:4.3.3 Ŀ��̨linux�汾��2.6.30 NFS��غ��hell�ʾ���� #insmod gspi.ko #insmod gspi8xxx.ko Unable to handle kernel NULL pointer dereference at virtual address 00000004 pgd = c39fc000 [00000004] *pgd=339ea031, *pte=00000000, *ppte=00000000 Internal error: Oops: 817 [#1] Modules linked in: gspi8xxx(+) gspi CPU: 0 Not tainted (2.6.30.4-EmbedSky #14) PC is at wlan_add_card+0x6c/0x4b8 [gspi8xxx] LR is at get_page_from_freelist+0x3f8/0x520 pc : [] lr : [] psr: a0000013 sp : c39ede68 ip : 00000004 fp : c39ede8c r10: c03bd760 r9 : bf00815c r8 : c0036008 r7 : bf03f0b4 r6 : c39a13e0 r5 : c380d000 r4 : 00000000 r3 : 03a40000 r2 : c03e1018 r1 : 00000004 r0 : c3a40000 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: c000717f Table: 339fc000 DAC: 00000015 Process insmod (pid: 474, stack limit = 0xc39ec268) Stack: (0xc39ede68 to 0xc39ee000) de60: bf05efe8 001dffa8 00000000 c39ec000 c0036008 bf00815c de80: c39edea4 c39ede90 bf02cc00 bf008880 bf05eff4 001dffa8 c39edebc c39edea8 dea0: bf00006c bf02cbec 00062daa 001dffa8 c39eded4 c39edec0 bf02dc98 bf000010 dec0: 00062daa 001dffa8 c39edeec c39eded8 bf00818c bf02dc70 00062daa 001dffa8 dee0: c39edf7c c39edef0 c0035284 bf00816c c48804b8 c48803fa c3909fc0 c4890fe8 df00: 00000013 00000006 00000000 00000015 0000051f 00000002 00000002 c48807d8 df20: 00000015 00000015 c0097b74 00000000 00000000 00000000 00000000 00000000 df40: 00000000 00062daa 001dffa8 bf05eebc 00000000 00062daa 001dffa8 bf05eebc df60: 00000000 c0036008 c39ec000 00000000 c39edfa4 c39edf80 c006c290 c0035258 df80: c00947e4 c00946d8 00062daa 001dffd9 bec98f22 00000080 00000000 c39edfa8 dfa0: c0035e60 c006c20c 00062daa 001dffd9 40000008 00062daa 001dffa8 bec98f22 dfc0: 00062daa 001dffd9 bec98f22 00000080 00000000 00000004 00000000 bec98e34 dfe0: bec98c60 bec98c50 0002b9c0 00009310 20000010 40000008 00000000 00000000 Backtrace: [] (wlan_add_card+0x0/0x4b8 [gspi8xxx]) from [] (sbi_add_card+0x24/0x40 [gspi8xxx]) r9:bf00815c r8:c0036008 r7:c39ec000 r6:00000000 r5:001dffa8 r4:bf05efe8 [] (sbi_add_card+0x0/0x40 [gspi8xxx]) from [] (register_user+0x6c/0x80 [gspi]) r5:001dffa8 r4:bf05eff4 [] (register_user+0x0/0x80 [gspi]) from [] (sbi_register+0x38/0x7c [gspi8xxx]) r5:001dffa8 r4:00062daa [] (sbi_register+0x0/0x7c [gspi8xxx]) from [] (wlan_init_module+0x30/0x78 [gspi8xxx]) r5:001dffa8 r4:00062daa [] (wlan_init_module+0x0/0x78 [gspi8xxx]) from [] (do_one_initcall+0x3c/0x1bc) r5:001dffa8 r4:00062daa [] (do_one_initcall+0x0/0x1bc) from [] (sys_init_module+0x94/0x1a4) [] (sys_init_module+0x0/0x1a4) from [] (ret_fast_syscall+0x0/0x2c) r7:00000080 r6:bec98f22 r5:001dffd9 r4:00062daa Code: e3a01002 eb41bc5e e3a04000 e3500000 (e5840004) ---[ end trace 7d349648346b931a ]--- Segmentation fault ��������insmod gspi8xxx.koʱ����wlan_add_card��mallocʱ��ops�� static wlan_private * wlan_add_card(void *card) { struct net_device *dev = NULL; wlan_private *priv = NULL; ENTER(); /* probe the card */ if (sbi_probe_card(card) < 0) { PRINTM(MSG, "NO card found!\n"); return NULL; } /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } priv = dev->priv; /* allocate buffer for wlan_adapter */ if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) {//�������� PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); goto err_kmalloc; } /* init wlan_adapter */ memset(priv->adapter, 0, sizeof(wlan_adapter)); ���������������� } �����nsmod gspi.koʱҲ���malloc��ȴû���static int __init gspihost_module_init(void) { gspihost_info_t *gspiinfo; gspi_card_rec_p cardp; int ret; if (!(gspiinfo = gspihost_init())) { _ERROR("gspihost_init failed !!!\n"); return - ENODEV; } G_gspiinfo = gspiinfo; if (!(cardp = kmalloc(sizeof(io_card_rec_t), GFP_KERNEL))){//kmalloc����������������� printk(KERN_ERR "No memory for Card Record!!!\n"); ret = - ENOMEM; goto out; } memset(cardp, 0, sizeof(io_card_rec_t)); �������������������������������� } Best Regards, Parson ----------------------------------------------------------------------------- CyberTAN Technology, Inc. /���h�Ƽ������l�� No.1925,Nanle Road Songjiang Export Processing Zone Shanghai, China Tel: +86-21-61206688 ext.24646 Parson.cheng在cybertan.com.tw ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. From orphen.leiliu在gmail.com Mon Jun 7 15:08:44 2010 From: orphen.leiliu在gmail.com (Liu Lei) Date: Mon, 7 Jun 2010 15:08:44 +0800 Subject: =?GB2312?Q?Re:_kmalloc_oops_=CE=CA=CC=E2?= In-Reply-To: <5D262E80A3F72048BB3FBC976D724D91083C3EEA@CTMAIL03.cybertan.com.tw> References: <5D262E80A3F72048BB3FBC976D724D91083C3EEA@CTMAIL03.cybertan.com.tw> Message-ID: <6ECDC964-D617-47F0-8DF5-77C62F1B2A74@gmail.com> 在 2010-6-7,下午3:03, 写道: > 各位!最近碰到一个棘手的问题!请高手帮忙! > > 环境 > 编译主机:ubuntu > 目标平台:s3c2440 board > GCC:4.3.3 > 目标平台linux版本:2.6.30 > > > NFS挂载后,在shell提示符#下执行 > #insmod gspi.ko > #insmod gspi8xxx.ko > > Unable to handle kernel NULL pointer dereference at virtual address 00000004 > pgd = c39fc000 > [00000004] *pgd=339ea031, *pte=00000000, *ppte=00000000 > Internal error: Oops: 817 [#1] > Modules linked in: gspi8xxx(+) gspi > CPU: 0 Not tainted (2.6.30.4-EmbedSky #14) > PC is at wlan_add_card+0x6c/0x4b8 [gspi8xxx] > LR is at get_page_from_freelist+0x3f8/0x520 > pc : [] lr : [] psr: a0000013 > sp : c39ede68 ip : 00000004 fp : c39ede8c > r10: c03bd760 r9 : bf00815c r8 : c0036008 > r7 : bf03f0b4 r6 : c39a13e0 r5 : c380d000 r4 : 00000000 > r3 : 03a40000 r2 : c03e1018 r1 : 00000004 r0 : c3a40000 > Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user > Control: c000717f Table: 339fc000 DAC: 00000015 > Process insmod (pid: 474, stack limit = 0xc39ec268) > Stack: (0xc39ede68 to 0xc39ee000) > de60: bf05efe8 001dffa8 00000000 c39ec000 c0036008 bf00815c > de80: c39edea4 c39ede90 bf02cc00 bf008880 bf05eff4 001dffa8 c39edebc c39edea8 > dea0: bf00006c bf02cbec 00062daa 001dffa8 c39eded4 c39edec0 bf02dc98 bf000010 > dec0: 00062daa 001dffa8 c39edeec c39eded8 bf00818c bf02dc70 00062daa 001dffa8 > dee0: c39edf7c c39edef0 c0035284 bf00816c c48804b8 c48803fa c3909fc0 c4890fe8 > df00: 00000013 00000006 00000000 00000015 0000051f 00000002 00000002 c48807d8 > df20: 00000015 00000015 c0097b74 00000000 00000000 00000000 00000000 00000000 > df40: 00000000 00062daa 001dffa8 bf05eebc 00000000 00062daa 001dffa8 bf05eebc > df60: 00000000 c0036008 c39ec000 00000000 c39edfa4 c39edf80 c006c290 c0035258 > df80: c00947e4 c00946d8 00062daa 001dffd9 bec98f22 00000080 00000000 c39edfa8 > dfa0: c0035e60 c006c20c 00062daa 001dffd9 40000008 00062daa 001dffa8 bec98f22 > dfc0: 00062daa 001dffd9 bec98f22 00000080 00000000 00000004 00000000 bec98e34 > dfe0: bec98c60 bec98c50 0002b9c0 00009310 20000010 40000008 00000000 00000000 > Backtrace: > [] (wlan_add_card+0x0/0x4b8 [gspi8xxx]) from [] (sbi_add_card+0x24/0x40 [gspi8xxx]) > r9:bf00815c r8:c0036008 r7:c39ec000 r6:00000000 r5:001dffa8 > r4:bf05efe8 > [] (sbi_add_card+0x0/0x40 [gspi8xxx]) from [] (register_user+0x6c/0x80 [gspi]) > r5:001dffa8 r4:bf05eff4 > [] (register_user+0x0/0x80 [gspi]) from [] (sbi_register+0x38/0x7c [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (sbi_register+0x0/0x7c [gspi8xxx]) from [] (wlan_init_module+0x30/0x78 [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (wlan_init_module+0x0/0x78 [gspi8xxx]) from [] (do_one_initcall+0x3c/0x1bc) > r5:001dffa8 r4:00062daa > [] (do_one_initcall+0x0/0x1bc) from [] (sys_init_module+0x94/0x1a4) > [] (sys_init_module+0x0/0x1a4) from [] (ret_fast_syscall+0x0/0x2c) > r7:00000080 r6:bec98f22 r5:001dffd9 r4:00062daa > Code: e3a01002 eb41bc5e e3a04000 e3500000 (e5840004) > ---[ end trace 7d349648346b931a ]--- > Segmentation fault > > > > 我跟踪后发现是在insmod gspi8xxx.ko时在函数wlan_add_card调用kmalloc时出现oops错误 > static wlan_private * > wlan_add_card(void *card) > { > struct net_device *dev = NULL; > wlan_private *priv = NULL; > > ENTER(); > > /* probe the card */ > if (sbi_probe_card(card) < 0) { > PRINTM(MSG, "NO card found!\n"); > return NULL; > } > > /* Allocate an Ethernet device and register it */ > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > > priv = dev->priv; > > /* allocate buffer for wlan_adapter */ > if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) {//错误在这里发生 > PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); > goto err_kmalloc; > } > GFP_KERNEL标志着这次alloc可以被休眠。如果你这个函数wlan_add_card是在中断上下文里的话,应该设置为GFP_ATOMIC。 > /* init wlan_adapter */ > memset(priv->adapter, 0, sizeof(wlan_adapter)); > 。。。。。。。。 > } > > 可是在我insmod gspi.ko时也有调用kmalloc,却没有出错 > static int __init > gspihost_module_init(void) > { > gspihost_info_t *gspiinfo; > gspi_card_rec_p cardp; > int ret; > > if (!(gspiinfo = gspihost_init())) { > _ERROR("gspihost_init failed !!!\n"); > return - ENODEV; > } > > G_gspiinfo = gspiinfo; > > if (!(cardp = kmalloc(sizeof(io_card_rec_t), GFP_KERNEL))){//kmalloc第一在这里被调用没有发生错误 > printk(KERN_ERR "No memory for Card Record!!!\n"); > ret = - ENOMEM; > goto out; > } > > memset(cardp, 0, sizeof(io_card_rec_t)); > 。。。。。。。。。。。。。。。。 > } > > Best Regards, > > Parson > > ----------------------------------------------------------------------------- > > CyberTAN Technology, Inc. /建漢科技上海研發中心 > > No.1925,Nanle Road Songjiang Export Processing Zone Shanghai, China > > Tel: +86-21-61206688 ext.24646 > > Parson.cheng在cybertan.com.tw > > > > ==================================================================== > This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org 致 礼! ──────────────────────────── Liu Lei From yanglei.fage在gmail.com Mon Jun 7 15:16:26 2010 From: yanglei.fage在gmail.com (lei yang) Date: Mon, 7 Jun 2010 15:16:26 +0800 Subject: =?GB2312?B?1PXDtMjDzfi/qLmk1/fU2kRNQcSjyr0=?= Message-ID: 如题 -- "We learn from failure, not from success!" From jack_wang在usish.com Mon Jun 7 15:26:11 2010 From: jack_wang在usish.com (jack wang) Date: Mon, 7 Jun 2010 15:26:11 +0800 Subject: =?gb2312?B?tPC4tDoga21hbGxvYyBvb3BzIM7KzOI=?= In-Reply-To: <6ECDC964-D617-47F0-8DF5-77C62F1B2A74@gmail.com> References: <5D262E80A3F72048BB3FBC976D724D91083C3EEA@CTMAIL03.cybertan.com.tw> <6ECDC964-D617-47F0-8DF5-77C62F1B2A74@gmail.com> Message-ID: 在 2010-6-7,下午3:03, 写道: > 各位!最近碰到一个棘手的问题!请高手帮忙! > > 环境 > 编译主机:ubuntu > 目标平台:s3c2440 board > GCC:4.3.3 > 目标平台linux版本:2.6.30 > > > NFS挂载后,在shell提示符#下执行 > #insmod gspi.ko > #insmod gspi8xxx.ko > > Unable to handle kernel NULL pointer dereference at virtual address 00000004 > pgd = c39fc000 > [00000004] *pgd=339ea031, *pte=00000000, *ppte=00000000 > Internal error: Oops: 817 [#1] > Modules linked in: gspi8xxx(+) gspi > CPU: 0 Not tainted (2.6.30.4-EmbedSky #14) > PC is at wlan_add_card+0x6c/0x4b8 [gspi8xxx] > LR is at get_page_from_freelist+0x3f8/0x520 > pc : [] lr : [] psr: a0000013 > sp : c39ede68 ip : 00000004 fp : c39ede8c > r10: c03bd760 r9 : bf00815c r8 : c0036008 > r7 : bf03f0b4 r6 : c39a13e0 r5 : c380d000 r4 : 00000000 > r3 : 03a40000 r2 : c03e1018 r1 : 00000004 r0 : c3a40000 > Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user > Control: c000717f Table: 339fc000 DAC: 00000015 > Process insmod (pid: 474, stack limit = 0xc39ec268) > Stack: (0xc39ede68 to 0xc39ee000) > de60: bf05efe8 001dffa8 00000000 c39ec000 c0036008 bf00815c > de80: c39edea4 c39ede90 bf02cc00 bf008880 bf05eff4 001dffa8 c39edebc c39edea8 > dea0: bf00006c bf02cbec 00062daa 001dffa8 c39eded4 c39edec0 bf02dc98 bf000010 > dec0: 00062daa 001dffa8 c39edeec c39eded8 bf00818c bf02dc70 00062daa 001dffa8 > dee0: c39edf7c c39edef0 c0035284 bf00816c c48804b8 c48803fa c3909fc0 c4890fe8 > df00: 00000013 00000006 00000000 00000015 0000051f 00000002 00000002 c48807d8 > df20: 00000015 00000015 c0097b74 00000000 00000000 00000000 00000000 00000000 > df40: 00000000 00062daa 001dffa8 bf05eebc 00000000 00062daa 001dffa8 bf05eebc > df60: 00000000 c0036008 c39ec000 00000000 c39edfa4 c39edf80 c006c290 c0035258 > df80: c00947e4 c00946d8 00062daa 001dffd9 bec98f22 00000080 00000000 c39edfa8 > dfa0: c0035e60 c006c20c 00062daa 001dffd9 40000008 00062daa 001dffa8 bec98f22 > dfc0: 00062daa 001dffd9 bec98f22 00000080 00000000 00000004 00000000 bec98e34 > dfe0: bec98c60 bec98c50 0002b9c0 00009310 20000010 40000008 00000000 00000000 > Backtrace: > [] (wlan_add_card+0x0/0x4b8 [gspi8xxx]) from [] (sbi_add_card+0x24/0x40 [gspi8xxx]) > r9:bf00815c r8:c0036008 r7:c39ec000 r6:00000000 r5:001dffa8 > r4:bf05efe8 > [] (sbi_add_card+0x0/0x40 [gspi8xxx]) from [] (register_user+0x6c/0x80 [gspi]) > r5:001dffa8 r4:bf05eff4 > [] (register_user+0x0/0x80 [gspi]) from [] (sbi_register+0x38/0x7c [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (sbi_register+0x0/0x7c [gspi8xxx]) from [] (wlan_init_module+0x30/0x78 [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (wlan_init_module+0x0/0x78 [gspi8xxx]) from [] (do_one_initcall+0x3c/0x1bc) > r5:001dffa8 r4:00062daa > [] (do_one_initcall+0x0/0x1bc) from [] (sys_init_module+0x94/0x1a4) > [] (sys_init_module+0x0/0x1a4) from [] (ret_fast_syscall+0x0/0x2c) > r7:00000080 r6:bec98f22 r5:001dffd9 r4:00062daa > Code: e3a01002 eb41bc5e e3a04000 e3500000 (e5840004) > ---[ end trace 7d349648346b931a ]--- > Segmentation fault > > > > 我跟踪后发现是在insmod gspi8xxx.ko时在函数wlan_add_card调用kmalloc时出现 oops错误 > static wlan_private * > wlan_add_card(void *card) > { > struct net_device *dev = NULL; > wlan_private *priv = NULL; > > ENTER(); > > /* probe the card */ > if (sbi_probe_card(card) < 0) { > PRINTM(MSG, "NO card found!\n"); > return NULL; > } > > /* Allocate an Ethernet device and register it */ > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > > priv = dev->priv; > > /* allocate buffer for wlan_adapter */ > if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) {//错 误在这里发生 > PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); > goto err_kmalloc; > } > GFP_KERNEL标志着这次alloc可以被休眠。如果你这个函数wlan_add_card是在中断上下 文里的话,应该设置为GFP_ATOMIC。 > /* init wlan_adapter */ > memset(priv->adapter, 0, sizeof(wlan_adapter)); > 。。。。。。。。 > } > > 可是在我insmod gspi.ko时也有调用kmalloc,却没有出错 > static int __init > gspihost_module_init(void) > { > gspihost_info_t *gspiinfo; > gspi_card_rec_p cardp; > int ret; > > if (!(gspiinfo = gspihost_init())) { > _ERROR("gspihost_init failed !!!\n"); > return - ENODEV; > } > > G_gspiinfo = gspiinfo; > > if (!(cardp = kmalloc(sizeof(io_card_rec_t), GFP_KERNEL))){//kmalloc第一 在这里被调用没有发生错误 > printk(KERN_ERR "No memory for Card Record!!!\n"); > ret = - ENOMEM; > goto out; > } > > memset(cardp, 0, sizeof(io_card_rec_t)); > 。。。。。。。。。。。。。。。。 > } > [Jack]提示的是空指针解引用,应该不是GFP的原因吧。十有八九还是 priv = dev->priv; 这个priv的空间有分配么? From zhangxuesheng在dare-tech.com Mon Jun 7 15:36:40 2010 From: zhangxuesheng在dare-tech.com (Zhang Xuesheng) Date: Mon, 7 Jun 2010 15:36:40 +0800 Subject: =?gb2312?B?tPC4tDoga21hbGxvYyBvb3BzIM7KzOI=?= In-Reply-To: References: <5D262E80A3F72048BB3FBC976D724D91083C3EEA@CTMAIL03.cybertan.com.tw><6ECDC964-D617-47F0-8DF5-77C62F1B2A74@gmail.com> Message-ID: <012b01cb0614$2c665e50$3c0110ac@zhangxuesheng> 如果priv是一个指针的话,并且在代码中没有见到初始化,所以在使用priv->adapter 会产生crash. -----邮件原件----- 发件人: linux-kernel-bounces在zh-kernel.org [mailto:linux-kernel-bounces在zh-kernel.org] 代表 jack wang 发送时间: 2010年6月7日 15:26 收件人: 'Liu Lei'; parson.cheng在cybertan.com.tw 抄送: linux-kernel在zh-kernel.org 主题: 答复: kmalloc oops 问题 在 2010-6-7,下午3:03, 写道: > 各位!最近碰到一个棘手的问题!请高手帮忙! > > 环境 > 编译主机:ubuntu > 目标平台:s3c2440 board > GCC:4.3.3 > 目标平台linux版本:2.6.30 > > > NFS挂载后,在shell提示符#下执行 > #insmod gspi.ko > #insmod gspi8xxx.ko > > Unable to handle kernel NULL pointer dereference at virtual address 00000004 > pgd = c39fc000 > [00000004] *pgd=339ea031, *pte=00000000, *ppte=00000000 > Internal error: Oops: 817 [#1] > Modules linked in: gspi8xxx(+) gspi > CPU: 0 Not tainted (2.6.30.4-EmbedSky #14) > PC is at wlan_add_card+0x6c/0x4b8 [gspi8xxx] > LR is at get_page_from_freelist+0x3f8/0x520 > pc : [] lr : [] psr: a0000013 > sp : c39ede68 ip : 00000004 fp : c39ede8c > r10: c03bd760 r9 : bf00815c r8 : c0036008 > r7 : bf03f0b4 r6 : c39a13e0 r5 : c380d000 r4 : 00000000 > r3 : 03a40000 r2 : c03e1018 r1 : 00000004 r0 : c3a40000 > Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user > Control: c000717f Table: 339fc000 DAC: 00000015 > Process insmod (pid: 474, stack limit = 0xc39ec268) > Stack: (0xc39ede68 to 0xc39ee000) > de60: bf05efe8 001dffa8 00000000 c39ec000 c0036008 bf00815c > de80: c39edea4 c39ede90 bf02cc00 bf008880 bf05eff4 001dffa8 c39edebc c39edea8 > dea0: bf00006c bf02cbec 00062daa 001dffa8 c39eded4 c39edec0 bf02dc98 bf000010 > dec0: 00062daa 001dffa8 c39edeec c39eded8 bf00818c bf02dc70 00062daa 001dffa8 > dee0: c39edf7c c39edef0 c0035284 bf00816c c48804b8 c48803fa c3909fc0 c4890fe8 > df00: 00000013 00000006 00000000 00000015 0000051f 00000002 00000002 c48807d8 > df20: 00000015 00000015 c0097b74 00000000 00000000 00000000 00000000 00000000 > df40: 00000000 00062daa 001dffa8 bf05eebc 00000000 00062daa 001dffa8 bf05eebc > df60: 00000000 c0036008 c39ec000 00000000 c39edfa4 c39edf80 c006c290 c0035258 > df80: c00947e4 c00946d8 00062daa 001dffd9 bec98f22 00000080 00000000 c39edfa8 > dfa0: c0035e60 c006c20c 00062daa 001dffd9 40000008 00062daa 001dffa8 bec98f22 > dfc0: 00062daa 001dffd9 bec98f22 00000080 00000000 00000004 00000000 bec98e34 > dfe0: bec98c60 bec98c50 0002b9c0 00009310 20000010 40000008 00000000 00000000 > Backtrace: > [] (wlan_add_card+0x0/0x4b8 [gspi8xxx]) from [] (sbi_add_card+0x24/0x40 [gspi8xxx]) > r9:bf00815c r8:c0036008 r7:c39ec000 r6:00000000 r5:001dffa8 > r4:bf05efe8 > [] (sbi_add_card+0x0/0x40 [gspi8xxx]) from [] (register_user+0x6c/0x80 [gspi]) > r5:001dffa8 r4:bf05eff4 > [] (register_user+0x0/0x80 [gspi]) from [] (sbi_register+0x38/0x7c [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (sbi_register+0x0/0x7c [gspi8xxx]) from [] (wlan_init_module+0x30/0x78 [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (wlan_init_module+0x0/0x78 [gspi8xxx]) from [] (do_one_initcall+0x3c/0x1bc) > r5:001dffa8 r4:00062daa > [] (do_one_initcall+0x0/0x1bc) from [] (sys_init_module+0x94/0x1a4) > [] (sys_init_module+0x0/0x1a4) from [] (ret_fast_syscall+0x0/0x2c) > r7:00000080 r6:bec98f22 r5:001dffd9 r4:00062daa > Code: e3a01002 eb41bc5e e3a04000 e3500000 (e5840004) > ---[ end trace 7d349648346b931a ]--- > Segmentation fault > > > > 我跟踪后发现是在insmod gspi8xxx.ko时在函数wlan_add_card调用kmalloc时出现 oops错误 > static wlan_private * > wlan_add_card(void *card) > { > struct net_device *dev = NULL; > wlan_private *priv = NULL; > > ENTER(); > > /* probe the card */ > if (sbi_probe_card(card) < 0) { > PRINTM(MSG, "NO card found!\n"); > return NULL; > } > > /* Allocate an Ethernet device and register it */ > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > > priv = dev->priv; > > /* allocate buffer for wlan_adapter */ > if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) {//错 误在这里发生 > PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); > goto err_kmalloc; > } > GFP_KERNEL标志着这次alloc可以被休眠。如果你这个函数wlan_add_card是在中断上下 文里的话,应该设置为GFP_ATOMIC。 > /* init wlan_adapter */ > memset(priv->adapter, 0, sizeof(wlan_adapter)); > 。。。。。。。。 > } > > 可是在我insmod gspi.ko时也有调用kmalloc,却没有出错 > static int __init > gspihost_module_init(void) > { > gspihost_info_t *gspiinfo; > gspi_card_rec_p cardp; > int ret; > > if (!(gspiinfo = gspihost_init())) { > _ERROR("gspihost_init failed !!!\n"); > return - ENODEV; > } > > G_gspiinfo = gspiinfo; > > if (!(cardp = kmalloc(sizeof(io_card_rec_t), GFP_KERNEL))){//kmalloc第一 在这里被调用没有发生错误 > printk(KERN_ERR "No memory for Card Record!!!\n"); > ret = - ENOMEM; > goto out; > } > > memset(cardp, 0, sizeof(io_card_rec_t)); > 。。。。。。。。。。。。。。。。 > } > [Jack]提示的是空指针解引用,应该不是GFP的原因吧。十有八九还是 priv = dev->priv; 这个priv的空间有分配么? _______________________________________________ Linux 内核开发中文邮件列表 Linux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux 内核开发中文社区: http://zh-kernel.org From parson.cheng在cybertan.com.tw Mon Jun 7 15:53:41 2010 From: parson.cheng在cybertan.com.tw (parson.cheng在cybertan.com.tw) Date: Mon, 7 Jun 2010 15:53:41 +0800 Subject: =?gb2312?B?tPC4tDoga21hbGxvYyBvb3BzIM7KzOI=?= In-Reply-To: <012b01cb0614$2c665e50$3c0110ac@zhangxuesheng> Message-ID: <5D262E80A3F72048BB3FBC976D724D91083C3EEC@CTMAIL03.cybertan.com.tw> лл��İ��� �ṹ���� /** Private structure for the MV device */ struct _wlan_private { int open; wlan_adapter *adapter; wlan_dev_t wlan_dev; struct net_device_stats stats; struct iw_statistics wstats; #ifdef CONFIG_PROC_FS struct proc_dir_entry *proc_entry; struct proc_dir_entry *proc_dev; #endif /** thread to service interrupts */ wlan_thread MainThread; #ifdef REASSOCIATION /** thread to service mac events */ wlan_thread ReassocThread; #endif /* REASSOCIATION */ }; typedef struct _wlan_private wlan_private; Ȼ���� static wlan_private * wlan_add_card(void *card) { struct net_device *dev = NULL; wlan_private *priv = NULL;//������ ENTER(); /* probe the card */ if (sbi_probe_card(card) < 0) { PRINTM(MSG, "NO card found!\n"); return NULL; } /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } priv = dev->priv; /* allocate buffer for wlan_adapter */ if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) { PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); goto err_kmalloc; } �������������������������������� } [Jack]�ʾ��ǿ��������Ӧ�ò��GFP�����ɡ�ʮ��˾Ż�� priv = dev->priv; ���v�Ŀռ������ privӦ���� if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } ��� ���֮��˴��û���nit ethernet device failed! ������� ���i�����2.6.13 2.6.19 2.6.21 �֮�2.6.21֮ǰ�ĺܶ������û�������⣬����2.6.30�ͳ������ģ� ���û��ʵ���ĸ����ֻ���˽ӿں��(SPI�ӿ� Best Regards, Parson ----------------------------------------------------------------------------- CyberTAN Technology, Inc. /���h�Ƽ������l�� No.1925,Nanle Road Songjiang Export Processing Zone Shanghai, China Tel: +86-21-61206688 ext.24646 Parson.cheng在cybertan.com.tw -----���ԭ��----- �����: Zhang Xuesheng [mailto:zhangxuesheng在dare-tech.com] ���ʱ��2010�6�7� 15:37 ����: 'jack wang'; 'Liu Lei'; Parson Cheng �̹� (SH-24620) ���: linux-kernel在zh-kernel.org ��: �� kmalloc oops �� ����һ�������������û���ʼ�������ʹ�priv->adapter ���crash. -----���ԭ��----- �����: linux-kernel-bounces在zh-kernel.org [mailto:linux-kernel-bounces在zh-kernel.org] ��ack wang ���ʱ��2010�6�7� 15:26 ����: 'Liu Lei'; parson.cheng在cybertan.com.tw ���: linux-kernel在zh-kernel.org ��: �� kmalloc oops �� � 2010-6-7����3:03�� д��� > ���������ֵ��⣡���ְ��� > > ���� > �����untu > Ŀ��̨��s3c2440 board > GCC:4.3.3 > Ŀ��̨linux�汾��2.6.30 > > > NFS��غ��hell�ʾ���� > #insmod gspi.ko > #insmod gspi8xxx.ko > > Unable to handle kernel NULL pointer dereference at virtual address 00000004 > pgd = c39fc000 > [00000004] *pgd=339ea031, *pte=00000000, *ppte=00000000 Internal > error: Oops: 817 [#1] Modules linked in: gspi8xxx(+) gspi > CPU: 0 Not tainted (2.6.30.4-EmbedSky #14) > PC is at wlan_add_card+0x6c/0x4b8 [gspi8xxx] LR is at > get_page_from_freelist+0x3f8/0x520 > pc : [] lr : [] psr: a0000013 > sp : c39ede68 ip : 00000004 fp : c39ede8c > r10: c03bd760 r9 : bf00815c r8 : c0036008 > r7 : bf03f0b4 r6 : c39a13e0 r5 : c380d000 r4 : 00000000 > r3 : 03a40000 r2 : c03e1018 r1 : 00000004 r0 : c3a40000 > Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user > Control: c000717f Table: 339fc000 DAC: 00000015 Process insmod (pid: > 474, stack limit = 0xc39ec268) > Stack: (0xc39ede68 to 0xc39ee000) > de60: bf05efe8 001dffa8 00000000 c39ec000 c0036008 bf00815c > de80: c39edea4 c39ede90 bf02cc00 bf008880 bf05eff4 001dffa8 c39edebc c39edea8 > dea0: bf00006c bf02cbec 00062daa 001dffa8 c39eded4 c39edec0 bf02dc98 bf000010 > dec0: 00062daa 001dffa8 c39edeec c39eded8 bf00818c bf02dc70 00062daa 001dffa8 > dee0: c39edf7c c39edef0 c0035284 bf00816c c48804b8 c48803fa c3909fc0 c4890fe8 > df00: 00000013 00000006 00000000 00000015 0000051f 00000002 00000002 c48807d8 > df20: 00000015 00000015 c0097b74 00000000 00000000 00000000 00000000 00000000 > df40: 00000000 00062daa 001dffa8 bf05eebc 00000000 00062daa 001dffa8 bf05eebc > df60: 00000000 c0036008 c39ec000 00000000 c39edfa4 c39edf80 c006c290 c0035258 > df80: c00947e4 c00946d8 00062daa 001dffd9 bec98f22 00000080 00000000 c39edfa8 > dfa0: c0035e60 c006c20c 00062daa 001dffd9 40000008 00062daa 001dffa8 bec98f22 > dfc0: 00062daa 001dffd9 bec98f22 00000080 00000000 00000004 00000000 bec98e34 > dfe0: bec98c60 bec98c50 0002b9c0 00009310 20000010 40000008 00000000 00000000 > Backtrace: > [] (wlan_add_card+0x0/0x4b8 [gspi8xxx]) from [] (sbi_add_card+0x24/0x40 [gspi8xxx]) > r9:bf00815c r8:c0036008 r7:c39ec000 r6:00000000 r5:001dffa8 > r4:bf05efe8 > [] (sbi_add_card+0x0/0x40 [gspi8xxx]) from [] (register_user+0x6c/0x80 [gspi]) > r5:001dffa8 r4:bf05eff4 > [] (register_user+0x0/0x80 [gspi]) from [] (sbi_register+0x38/0x7c [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (sbi_register+0x0/0x7c [gspi8xxx]) from [] (wlan_init_module+0x30/0x78 [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (wlan_init_module+0x0/0x78 [gspi8xxx]) from [] (do_one_initcall+0x3c/0x1bc) > r5:001dffa8 r4:00062daa > [] (do_one_initcall+0x0/0x1bc) from [] (sys_init_module+0x94/0x1a4) > [] (sys_init_module+0x0/0x1a4) from [] (ret_fast_syscall+0x0/0x2c) > r7:00000080 r6:bec98f22 r5:001dffd9 r4:00062daa > Code: e3a01002 eb41bc5e e3a04000 e3500000 (e5840004) ---[ end trace > 7d349648346b931a ]--- Segmentation fault > > > > ��������insmod gspi8xxx.koʱ����wlan_add_card��mallocʱ��oops�� > static wlan_private * > wlan_add_card(void *card) > { > struct net_device *dev = NULL; > wlan_private *priv = NULL; > > ENTER(); > > /* probe the card */ > if (sbi_probe_card(card) < 0) { > PRINTM(MSG, "NO card found!\n"); > return NULL; > } > > /* Allocate an Ethernet device and register it */ > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > > priv = dev->priv; > > /* allocate buffer for wlan_adapter */ > if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) > {//������� > PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); > goto err_kmalloc; > } > GFP_KERNEL������lloc��Ա�����������add_card����������Ļ���Ӧ���ΪGFP_ATOMIC�� > /* init wlan_adapter */ > memset(priv->adapter, 0, sizeof(wlan_adapter)); > ���������������� > } > > �����nsmod gspi.koʱҲ���malloc��ȴû���> static int __init > gspihost_module_init(void) > { > gspihost_info_t *gspiinfo; > gspi_card_rec_p cardp; > int ret; > > if (!(gspiinfo = gspihost_init())) { > _ERROR("gspihost_init failed !!!\n"); > return - ENODEV; > } > > G_gspiinfo = gspiinfo; > > if (!(cardp = kmalloc(sizeof(io_card_rec_t), > GFP_KERNEL))){//kmalloc��� �������������� > printk(KERN_ERR "No memory for Card Record!!!\n"); > ret = - ENOMEM; > goto out; > } > > memset(cardp, 0, sizeof(io_card_rec_t)); > �������������������������������� > } > [Jack]�ʾ��ǿ��������Ӧ�ò��GFP�����ɡ�ʮ��˾Ż�� priv = dev->priv; ���v�Ŀռ������ _______________________________________________ Linux ��˿�����������inux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux ��˿��������� http://zh-kernel.org ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. From jack_wang在usish.com Mon Jun 7 16:06:44 2010 From: jack_wang在usish.com (jack wang) Date: Mon, 7 Jun 2010 16:06:44 +0800 Subject: =?gb2312?B?tPC4tDoga21hbGxvYyBvb3BzIM7KzOI=?= In-Reply-To: <5D262E80A3F72048BB3FBC976D724D91083C3EEC@CTMAIL03.cybertan.com.tw> References: <012b01cb0614$2c665e50$3c0110ac@zhangxuesheng> <5D262E80A3F72048BB3FBC976D724D91083C3EEC@CTMAIL03.cybertan.com.tw> Message-ID: лл��İ��� �ṹ���� /** Private structure for the MV device */ struct _wlan_private { int open; wlan_adapter *adapter; wlan_dev_t wlan_dev; struct net_device_stats stats; struct iw_statistics wstats; #ifdef CONFIG_PROC_FS struct proc_dir_entry *proc_entry; struct proc_dir_entry *proc_dev; #endif /** thread to service interrupts */ wlan_thread MainThread; #ifdef REASSOCIATION /** thread to service mac events */ wlan_thread ReassocThread; #endif /* REASSOCIATION */ }; typedef struct _wlan_private wlan_private; Ȼ���� static wlan_private * wlan_add_card(void *card) { struct net_device *dev = NULL; wlan_private *priv = NULL;//������ ENTER(); /* probe the card */ if (sbi_probe_card(card) < 0) { PRINTM(MSG, "NO card found!\n"); return NULL; } /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } priv = dev->priv; /* allocate buffer for wlan_adapter */ if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) { PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); goto err_kmalloc; } �������������������������������� } [Jack]�ʾ��ǿ��������Ӧ�ò��GFP�����ɡ�ʮ��˾Ż�� priv = dev->priv; ���v�Ŀռ������ privӦ���� if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } ��� ���֮��˴��û���nit ethernet device failed! [Jack]����Ƿ��t-device�ṹ�ѽ����տ��һ�2.6.33 ��et_device�ṹ ���û�priv�����ѽ���������privû������ԭ��� ������� ���i�����2.6.13 2.6.19 2.6.21 �֮�2.6.21֮ǰ�ĺܶ������û���� ���⣬����2.6.30�ͳ������ģ� ���û��ʵ���ĸ����ֻ���˽ӿں��(SPI�ӿ� Best Regards, Parson ---------------------------------------------------------------------------- - CyberTAN Technology, Inc. /���h�Ƽ������l�� No.1925,Nanle Road Songjiang Export Processing Zone Shanghai, China Tel: +86-21-61206688 ext.24646 Parson.cheng在cybertan.com.tw -----���ԭ��----- �����: Zhang Xuesheng [mailto:zhangxuesheng在dare-tech.com] ���ʱ��2010�6�7� 15:37 ����: 'jack wang'; 'Liu Lei'; Parson Cheng �̹� (SH-24620) ���: linux-kernel在zh-kernel.org ��: �� kmalloc oops �� ����һ�������������û���ʼ�������ʹ�priv->adapter ���crash. -----���ԭ��----- �����: linux-kernel-bounces在zh-kernel.org [mailto:linux-kernel-bounces在zh-kernel.org] ��ack wang ���ʱ��2010�6�7� 15:26 ����: 'Liu Lei'; parson.cheng在cybertan.com.tw ���: linux-kernel在zh-kernel.org ��: �� kmalloc oops �� � 2010-6-7����3:03�� д��� > ���������ֵ��⣡���ְ��� > > ���� > �����untu > Ŀ��̨��s3c2440 board > GCC:4.3.3 > Ŀ��̨linux�汾��2.6.30 > > > NFS��غ��hell�ʾ���� > #insmod gspi.ko > #insmod gspi8xxx.ko > > Unable to handle kernel NULL pointer dereference at virtual address 00000004 > pgd = c39fc000 > [00000004] *pgd=339ea031, *pte=00000000, *ppte=00000000 Internal > error: Oops: 817 [#1] Modules linked in: gspi8xxx(+) gspi > CPU: 0 Not tainted (2.6.30.4-EmbedSky #14) > PC is at wlan_add_card+0x6c/0x4b8 [gspi8xxx] LR is at > get_page_from_freelist+0x3f8/0x520 > pc : [] lr : [] psr: a0000013 > sp : c39ede68 ip : 00000004 fp : c39ede8c > r10: c03bd760 r9 : bf00815c r8 : c0036008 > r7 : bf03f0b4 r6 : c39a13e0 r5 : c380d000 r4 : 00000000 > r3 : 03a40000 r2 : c03e1018 r1 : 00000004 r0 : c3a40000 > Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user > Control: c000717f Table: 339fc000 DAC: 00000015 Process insmod (pid: > 474, stack limit = 0xc39ec268) > Stack: (0xc39ede68 to 0xc39ee000) > de60: bf05efe8 001dffa8 00000000 c39ec000 c0036008 bf00815c > de80: c39edea4 c39ede90 bf02cc00 bf008880 bf05eff4 001dffa8 c39edebc c39edea8 > dea0: bf00006c bf02cbec 00062daa 001dffa8 c39eded4 c39edec0 bf02dc98 bf000010 > dec0: 00062daa 001dffa8 c39edeec c39eded8 bf00818c bf02dc70 00062daa 001dffa8 > dee0: c39edf7c c39edef0 c0035284 bf00816c c48804b8 c48803fa c3909fc0 c4890fe8 > df00: 00000013 00000006 00000000 00000015 0000051f 00000002 00000002 c48807d8 > df20: 00000015 00000015 c0097b74 00000000 00000000 00000000 00000000 00000000 > df40: 00000000 00062daa 001dffa8 bf05eebc 00000000 00062daa 001dffa8 bf05eebc > df60: 00000000 c0036008 c39ec000 00000000 c39edfa4 c39edf80 c006c290 c0035258 > df80: c00947e4 c00946d8 00062daa 001dffd9 bec98f22 00000080 00000000 c39edfa8 > dfa0: c0035e60 c006c20c 00062daa 001dffd9 40000008 00062daa 001dffa8 bec98f22 > dfc0: 00062daa 001dffd9 bec98f22 00000080 00000000 00000004 00000000 bec98e34 > dfe0: bec98c60 bec98c50 0002b9c0 00009310 20000010 40000008 00000000 00000000 > Backtrace: > [] (wlan_add_card+0x0/0x4b8 [gspi8xxx]) from [] (sbi_add_card+0x24/0x40 [gspi8xxx]) > r9:bf00815c r8:c0036008 r7:c39ec000 r6:00000000 r5:001dffa8 > r4:bf05efe8 > [] (sbi_add_card+0x0/0x40 [gspi8xxx]) from [] (register_user+0x6c/0x80 [gspi]) > r5:001dffa8 r4:bf05eff4 > [] (register_user+0x0/0x80 [gspi]) from [] (sbi_register+0x38/0x7c [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (sbi_register+0x0/0x7c [gspi8xxx]) from [] (wlan_init_module+0x30/0x78 [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (wlan_init_module+0x0/0x78 [gspi8xxx]) from [] (do_one_initcall+0x3c/0x1bc) > r5:001dffa8 r4:00062daa > [] (do_one_initcall+0x0/0x1bc) from [] (sys_init_module+0x94/0x1a4) > [] (sys_init_module+0x0/0x1a4) from [] (ret_fast_syscall+0x0/0x2c) > r7:00000080 r6:bec98f22 r5:001dffd9 r4:00062daa > Code: e3a01002 eb41bc5e e3a04000 e3500000 (e5840004) ---[ end trace > 7d349648346b931a ]--- Segmentation fault > > > > ��������insmod gspi8xxx.koʱ����wlan_add_card��mallocʱ��oops�� > static wlan_private * > wlan_add_card(void *card) > { > struct net_device *dev = NULL; > wlan_private *priv = NULL; > > ENTER(); > > /* probe the card */ > if (sbi_probe_card(card) < 0) { > PRINTM(MSG, "NO card found!\n"); > return NULL; > } > > /* Allocate an Ethernet device and register it */ > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > > priv = dev->priv; > > /* allocate buffer for wlan_adapter */ > if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) > {//������� > PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); > goto err_kmalloc; > } > GFP_KERNEL������lloc��Ա�����������add_card����������Ļ���Ӧ���ΪGFP_ATOMIC�� > /* init wlan_adapter */ > memset(priv->adapter, 0, sizeof(wlan_adapter)); > ���������������� > } > > �����nsmod gspi.koʱҲ���malloc��ȴû���> static int __init > gspihost_module_init(void) > { > gspihost_info_t *gspiinfo; > gspi_card_rec_p cardp; > int ret; > > if (!(gspiinfo = gspihost_init())) { > _ERROR("gspihost_init failed !!!\n"); > return - ENODEV; > } > > G_gspiinfo = gspiinfo; > > if (!(cardp = kmalloc(sizeof(io_card_rec_t), > GFP_KERNEL))){//kmalloc��� �������������� > printk(KERN_ERR "No memory for Card Record!!!\n"); > ret = - ENOMEM; > goto out; > } > > memset(cardp, 0, sizeof(io_card_rec_t)); > �������������������������������� > } > [Jack]�ʾ��ǿ��������Ӧ�ò��GFP�����ɡ�ʮ��˾Ż�� priv = dev->priv; ���v�Ŀռ������ _______________________________________________ Linux ��˿�����������inux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux ��˿��������� http://zh-kernel.org ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. From jiang.adam在gmail.com Mon Jun 7 16:14:20 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Mon, 7 Jun 2010 17:14:20 +0900 Subject: =?GB2312?B?UmU6ILTwuLQ6IGttYWxsb2Mgb29wcyDOyszi?= In-Reply-To: References: <012b01cb0614$2c665e50$3c0110ac@zhangxuesheng> <5D262E80A3F72048BB3FBC976D724D91083C3EEC@CTMAIL03.cybertan.com.tw> Message-ID: 2010/6/7 jack wang : > priv应该是在 > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > 分配的 > 我在这之后加了打印语句没有出现Init ethernet device failed! > [Jack]你这个只是分配net-device结构体呀,我刚看了一下2.6.33 的net_device结构 > 体里面没有priv成员变量呀,谨慎怀疑还是priv没有分配内存的原因。 有90%的可能性是正解。 /大头阿当 From parson.cheng在cybertan.com.tw Mon Jun 7 16:15:10 2010 From: parson.cheng在cybertan.com.tw (parson.cheng在cybertan.com.tw) Date: Mon, 7 Jun 2010 16:15:10 +0800 Subject: =?gb2312?B?tPC4tDoga21hbGxvYyBvb3BzIM7KzOI=?= In-Reply-To: Message-ID: <5D262E80A3F72048BB3FBC976D724D91083C3EED@CTMAIL03.cybertan.com.tw> [Jack]�ʾ��ǿ��������Ӧ�ò��GFP�����ɡ�ʮ��˾Ż�� priv = dev->priv; ���v�Ŀռ������ privӦ���� if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } ��� ���֮��˴��û���nit ethernet device failed! [Jack]����Ƿ��t-device�ṹ�ѽ����տ��һ�2.6.33 ��et_device�ṹ ���û�priv�����ѽ���������privû������ԭ��� �Ǻǣ� ������� ��net_device�ṹ������riv��������� �ʵ���ԭ��ij��ml_privҲ�ͬ��Ĵ��� Best Regards, Parson ----------------------------------------------------------------------------- CyberTAN Technology, Inc. /���h�Ƽ������l�� No.1925,Nanle Road Songjiang Export Processing Zone Shanghai, China Tel: +86-21-61206688 ext.24646 Parson.cheng在cybertan.com.tw -----���ԭ��----- �����: jack wang [mailto:jack_wang在usish.com] ���ʱ��2010�6�7� 16:07 ����: Parson Cheng �̹� (SH-24620); zhangxuesheng在dare-tech.com; orphen.leiliu在gmail.com ���: linux-kernel在zh-kernel.org ��: �� kmalloc oops �� лл��İ��� �ṹ���� /** Private structure for the MV device */ struct _wlan_private { int open; wlan_adapter *adapter; wlan_dev_t wlan_dev; struct net_device_stats stats; struct iw_statistics wstats; #ifdef CONFIG_PROC_FS struct proc_dir_entry *proc_entry; struct proc_dir_entry *proc_dev; #endif /** thread to service interrupts */ wlan_thread MainThread; #ifdef REASSOCIATION /** thread to service mac events */ wlan_thread ReassocThread; #endif /* REASSOCIATION */ }; typedef struct _wlan_private wlan_private; Ȼ���� static wlan_private * wlan_add_card(void *card) { struct net_device *dev = NULL; wlan_private *priv = NULL;//������ ENTER(); /* probe the card */ if (sbi_probe_card(card) < 0) { PRINTM(MSG, "NO card found!\n"); return NULL; } /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } priv = dev->priv; /* allocate buffer for wlan_adapter */ if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) { PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); goto err_kmalloc; } �������������������������������� } [Jack]�ʾ��ǿ��������Ӧ�ò��GFP�����ɡ�ʮ��˾Ż�� priv = dev->priv; ���v�Ŀռ������ privӦ���� if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } ��� ���֮��˴��û���nit ethernet device failed! [Jack]����Ƿ��t-device�ṹ�ѽ����տ��һ�2.6.33 ��et_device�ṹ ���û�priv�����ѽ���������privû������ԭ��� ������� ���i�����2.6.13 2.6.19 2.6.21 �֮�2.6.21֮ǰ�ĺܶ������û���� ���⣬����2.6.30�ͳ������ģ� ���û��ʵ���ĸ����ֻ���˽ӿں��(SPI�ӿ� Best Regards, Parson ---------------------------------------------------------------------------- - CyberTAN Technology, Inc. /���h�Ƽ������l�� No.1925,Nanle Road Songjiang Export Processing Zone Shanghai, China Tel: +86-21-61206688 ext.24646 Parson.cheng在cybertan.com.tw -----���ԭ��----- �����: Zhang Xuesheng [mailto:zhangxuesheng在dare-tech.com] ���ʱ��2010�6�7� 15:37 ����: 'jack wang'; 'Liu Lei'; Parson Cheng �̹� (SH-24620) ���: linux-kernel在zh-kernel.org ��: �� kmalloc oops �� ����һ�������������û���ʼ�������ʹ�priv->adapter ���crash. -----���ԭ��----- �����: linux-kernel-bounces在zh-kernel.org [mailto:linux-kernel-bounces在zh-kernel.org] ��ack wang ���ʱ��2010�6�7� 15:26 ����: 'Liu Lei'; parson.cheng在cybertan.com.tw ���: linux-kernel在zh-kernel.org ��: �� kmalloc oops �� � 2010-6-7����3:03�� д��� > ���������ֵ��⣡���ְ��� > > ���� > �����untu > Ŀ��̨��s3c2440 board > GCC:4.3.3 > Ŀ��̨linux�汾��2.6.30 > > > NFS��غ��hell�ʾ���� > #insmod gspi.ko > #insmod gspi8xxx.ko > > Unable to handle kernel NULL pointer dereference at virtual address 00000004 > pgd = c39fc000 > [00000004] *pgd=339ea031, *pte=00000000, *ppte=00000000 Internal > error: Oops: 817 [#1] Modules linked in: gspi8xxx(+) gspi > CPU: 0 Not tainted (2.6.30.4-EmbedSky #14) > PC is at wlan_add_card+0x6c/0x4b8 [gspi8xxx] LR is at > get_page_from_freelist+0x3f8/0x520 > pc : [] lr : [] psr: a0000013 > sp : c39ede68 ip : 00000004 fp : c39ede8c > r10: c03bd760 r9 : bf00815c r8 : c0036008 > r7 : bf03f0b4 r6 : c39a13e0 r5 : c380d000 r4 : 00000000 > r3 : 03a40000 r2 : c03e1018 r1 : 00000004 r0 : c3a40000 > Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user > Control: c000717f Table: 339fc000 DAC: 00000015 Process insmod (pid: > 474, stack limit = 0xc39ec268) > Stack: (0xc39ede68 to 0xc39ee000) > de60: bf05efe8 001dffa8 00000000 c39ec000 c0036008 bf00815c > de80: c39edea4 c39ede90 bf02cc00 bf008880 bf05eff4 001dffa8 c39edebc c39edea8 > dea0: bf00006c bf02cbec 00062daa 001dffa8 c39eded4 c39edec0 bf02dc98 bf000010 > dec0: 00062daa 001dffa8 c39edeec c39eded8 bf00818c bf02dc70 00062daa 001dffa8 > dee0: c39edf7c c39edef0 c0035284 bf00816c c48804b8 c48803fa c3909fc0 c4890fe8 > df00: 00000013 00000006 00000000 00000015 0000051f 00000002 00000002 c48807d8 > df20: 00000015 00000015 c0097b74 00000000 00000000 00000000 00000000 00000000 > df40: 00000000 00062daa 001dffa8 bf05eebc 00000000 00062daa 001dffa8 bf05eebc > df60: 00000000 c0036008 c39ec000 00000000 c39edfa4 c39edf80 c006c290 c0035258 > df80: c00947e4 c00946d8 00062daa 001dffd9 bec98f22 00000080 00000000 c39edfa8 > dfa0: c0035e60 c006c20c 00062daa 001dffd9 40000008 00062daa 001dffa8 bec98f22 > dfc0: 00062daa 001dffd9 bec98f22 00000080 00000000 00000004 00000000 bec98e34 > dfe0: bec98c60 bec98c50 0002b9c0 00009310 20000010 40000008 00000000 00000000 > Backtrace: > [] (wlan_add_card+0x0/0x4b8 [gspi8xxx]) from [] (sbi_add_card+0x24/0x40 [gspi8xxx]) > r9:bf00815c r8:c0036008 r7:c39ec000 r6:00000000 r5:001dffa8 > r4:bf05efe8 > [] (sbi_add_card+0x0/0x40 [gspi8xxx]) from [] (register_user+0x6c/0x80 [gspi]) > r5:001dffa8 r4:bf05eff4 > [] (register_user+0x0/0x80 [gspi]) from [] (sbi_register+0x38/0x7c [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (sbi_register+0x0/0x7c [gspi8xxx]) from [] (wlan_init_module+0x30/0x78 [gspi8xxx]) > r5:001dffa8 r4:00062daa > [] (wlan_init_module+0x0/0x78 [gspi8xxx]) from [] (do_one_initcall+0x3c/0x1bc) > r5:001dffa8 r4:00062daa > [] (do_one_initcall+0x0/0x1bc) from [] (sys_init_module+0x94/0x1a4) > [] (sys_init_module+0x0/0x1a4) from [] (ret_fast_syscall+0x0/0x2c) > r7:00000080 r6:bec98f22 r5:001dffd9 r4:00062daa > Code: e3a01002 eb41bc5e e3a04000 e3500000 (e5840004) ---[ end trace > 7d349648346b931a ]--- Segmentation fault > > > > ��������insmod gspi8xxx.koʱ����wlan_add_card��mallocʱ��oops�� > static wlan_private * > wlan_add_card(void *card) > { > struct net_device *dev = NULL; > wlan_private *priv = NULL; > > ENTER(); > > /* probe the card */ > if (sbi_probe_card(card) < 0) { > PRINTM(MSG, "NO card found!\n"); > return NULL; > } > > /* Allocate an Ethernet device and register it */ > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > > priv = dev->priv; > > /* allocate buffer for wlan_adapter */ > if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) > {//������� > PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); > goto err_kmalloc; > } > GFP_KERNEL������lloc��Ա�����������add_card����������Ļ���Ӧ���ΪGFP_ATOMIC�� > /* init wlan_adapter */ > memset(priv->adapter, 0, sizeof(wlan_adapter)); > ���������������� > } > > �����nsmod gspi.koʱҲ���malloc��ȴû���> static int __init > gspihost_module_init(void) > { > gspihost_info_t *gspiinfo; > gspi_card_rec_p cardp; > int ret; > > if (!(gspiinfo = gspihost_init())) { > _ERROR("gspihost_init failed !!!\n"); > return - ENODEV; > } > > G_gspiinfo = gspiinfo; > > if (!(cardp = kmalloc(sizeof(io_card_rec_t), > GFP_KERNEL))){//kmalloc��� �������������� > printk(KERN_ERR "No memory for Card Record!!!\n"); > ret = - ENOMEM; > goto out; > } > > memset(cardp, 0, sizeof(io_card_rec_t)); > �������������������������������� > } > [Jack]�ʾ��ǿ��������Ӧ�ò��GFP�����ɡ�ʮ��˾Ż�� priv = dev->priv; ���v�Ŀռ������ _______________________________________________ Linux ��˿�����������inux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux ��˿��������� http://zh-kernel.org ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. From jiang.adam在gmail.com Mon Jun 7 16:26:46 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Mon, 7 Jun 2010 17:26:46 +0900 Subject: =?GB2312?B?UmU6ILTwuLQ6IGttYWxsb2Mgb29wcyDOyszi?= In-Reply-To: <5D262E80A3F72048BB3FBC976D724D91083C3EED@CTMAIL03.cybertan.com.tw> References: <5D262E80A3F72048BB3FBC976D724D91083C3EED@CTMAIL03.cybertan.com.tw> Message-ID: 2010/6/7 : > [Jack]提示的是空指针解引用,应该不是GFP的原因吧。十有八九还是 > priv = dev->priv; 这个priv的空间有分配么? > > priv应该是在 > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > 分配的 > 我在这之后加了打印语句没有出现Init ethernet device failed! > [Jack]你这个只是分配net-device结构体呀,我刚看了一下2.6.33 的net_device结构 > 体里面没有priv成员变量呀,谨慎怀疑还是priv没有分配内存的原因。 > > > 呵呵! > 忘了告诉您! > 我在net_device结构体中添加了priv成员!!! > 其实我用它原来的成员ml_priv也是同样的错误! struct net_device *dev = NULL; wlan_private *priv = NULL;//初始化在此 /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { 因为没有看到你的源码,这里我只是猜测。 sizeof()给的是struct wlan_private的大小,然后,你想通过alloc_etherdev得到一个 struct net_device? 这个地方有点奇怪啊...... /大头阿当 From parson.cheng在cybertan.com.tw Mon Jun 7 16:40:02 2010 From: parson.cheng在cybertan.com.tw (parson.cheng在cybertan.com.tw) Date: Mon, 7 Jun 2010 16:40:02 +0800 Subject: =?gb2312?B?tPC4tDogtPC4tDoga21hbGxvYyBvb3BzIM7KzOI=?= In-Reply-To: Message-ID: <5D262E80A3F72048BB3FBC976D724D91083C3EF0@CTMAIL03.cybertan.com.tw> 2010/6/7 : > [Jack]提示的是空指针解引用,应该不是GFP的原因吧。十有八九还是 > priv = dev->priv; 这个priv的空间有分配么? > > priv应该是在 > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > 分配的 > 我在这之后加了打印语句没有出现Init ethernet device failed! > [Jack]你这个只是分配net-device结构体呀,我刚看了一下2.6.33 的net_device结构 > 体里面没有priv成员变量呀,谨慎怀疑还是priv没有分配内存的原因。 > > > 呵呵! > 忘了告诉您! > 我在net_device结构体中添加了priv成员!!! > 其实我用它原来的成员ml_priv也是同样的错误! struct net_device *dev = NULL; wlan_private *priv = NULL;//初始化在此 /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { 因为没有看到你的源码,这里我只是猜测。 sizeof()给的是struct wlan_private的大小,然后,你想通过alloc_etherdev得到一个 struct net_device? 这个地方有点奇怪啊...... /大头阿当 wlan_add_card(void *card) { struct net_device *dev = NULL; wlan_private *priv = NULL;//初始化在此 ENTER(); /* probe the card */ if (sbi_probe_card(card) < 0) { PRINTM(MSG, "NO card found!\n"); return NULL; } /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } priv = dev->priv; /* allocate buffer for wlan_adapter */ if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) { PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); goto err_kmalloc; } 。。。。。。。。。。。。。。。。 } alloc_etherdev(sizeof(wlan_private)只是想kernel申请一个sizeof(wlan_private)大小的空间,并向kernel注册net_device的一个私有设备, 申请到后把这个地址赋给dev(因为struct net_device *dev = NULL;) ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. From parson.cheng在cybertan.com.tw Mon Jun 7 17:01:17 2010 From: parson.cheng在cybertan.com.tw (parson.cheng在cybertan.com.tw) Date: Mon, 7 Jun 2010 17:01:17 +0800 Subject: =?gb2312?B?tPC4tDogtPC4tDoga21hbGxvYyBvb3BzIM7KzOI=?= In-Reply-To: <5D262E80A3F72048BB3FBC976D724D91083C3EF0@CTMAIL03.cybertan.com.tw> Message-ID: <5D262E80A3F72048BB3FBC976D724D91083C3EF2@CTMAIL03.cybertan.com.tw> 各位: 我刚才比较了一下alloc_etherdev这个函数 在2.6.30里面做了很大的改动,我现在很怀疑是它来了的问题, 但是 > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } 可以正常执行下来!!! Best Regards, Parson -----邮件原件----- 发件人: Parson Cheng 程光淼 (SH-24620) 发送时间: 2010年6月7日 16:40 收件人: 'Adam Jiang' 抄送: jack_wang在usish.com; zhangxuesheng在dare-tech.com; orphen.leiliu在gmail.com; linux-kernel在zh-kernel.org 主题: 答复: 答复: kmalloc oops 问题 2010/6/7 : > [Jack]提示的是空指针解引用,应该不是GFP的原因吧。十有八九还是 > priv = dev->priv; 这个priv的空间有分配么? > > priv应该是在 > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > 分配的 > 我在这之后加了打印语句没有出现Init ethernet device failed! > [Jack]你这个只是分配net-device结构体呀,我刚看了一下2.6.33 的net_device结构 > 体里面没有priv成员变量呀,谨慎怀疑还是priv没有分配内存的原因。 > > > 呵呵! > 忘了告诉您! > 我在net_device结构体中添加了priv成员!!! > 其实我用它原来的成员ml_priv也是同样的错误! struct net_device *dev = NULL; wlan_private *priv = NULL;//初始化在此 /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { 因为没有看到你的源码,这里我只是猜测。 sizeof()给的是struct wlan_private的大小,然后,你想通过alloc_etherdev得到一个 struct net_device? 这个地方有点奇怪啊...... /大头阿当 wlan_add_card(void *card) { struct net_device *dev = NULL; wlan_private *priv = NULL;//初始化在此 ENTER(); /* probe the card */ if (sbi_probe_card(card) < 0) { PRINTM(MSG, "NO card found!\n"); return NULL; } /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } priv = dev->priv; /* allocate buffer for wlan_adapter */ if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) { PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); goto err_kmalloc; } 。。。。。。。。。。。。。。。。 } alloc_etherdev(sizeof(wlan_private)只是想kernel申请一个sizeof(wlan_private)大小的空间,并向kernel注册net_device的一个私有设备, 申请到后把这个地址赋给dev(因为struct net_device *dev = NULL;) ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. From jiang.adam在gmail.com Mon Jun 7 17:03:28 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Mon, 7 Jun 2010 18:03:28 +0900 Subject: =?GB2312?B?UmU6ILTwuLQ6IGttYWxsb2Mgb29wcyDOyszi?= In-Reply-To: <5D262E80A3F72048BB3FBC976D724D91083C3EED@CTMAIL03.cybertan.com.tw> References: <5D262E80A3F72048BB3FBC976D724D91083C3EED@CTMAIL03.cybertan.com.tw> Message-ID: 2010/6/7 : > [Jack]提示的是空指针解引用,应该不是GFP的原因吧。十有八九还是 > priv = dev->priv; 这个priv的空间有分配么? > > priv应该是在 > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > 分配的 > 我在这之后加了打印语句没有出现Init ethernet device failed! > [Jack]你这个只是分配net-device结构体呀,我刚看了一下2.6.33 的net_device结构 > 体里面没有priv成员变量呀,谨慎怀疑还是priv没有分配内存的原因。 > > > 呵呵! > 忘了告诉您! > 我在net_device结构体中添加了priv成员!!! > 其实我用它原来的成员ml_priv也是同样的错误! > 那么,/net/core/dev.c中alloc_netdev_mq里面对priv是怎么处理的? -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From jiang.adam在gmail.com Mon Jun 7 17:06:35 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Mon, 7 Jun 2010 18:06:35 +0900 Subject: =?GB2312?B?UmU6ILTwuLQ6ILTwuLQ6IGttYWxsb2Mgb29wcyDOyszi?= In-Reply-To: <5D262E80A3F72048BB3FBC976D724D91083C3EF2@CTMAIL03.cybertan.com.tw> References: <5D262E80A3F72048BB3FBC976D724D91083C3EF0@CTMAIL03.cybertan.com.tw> <5D262E80A3F72048BB3FBC976D724D91083C3EF2@CTMAIL03.cybertan.com.tw> Message-ID: 2010/6/7 : > 各位: > 我刚才比较了一下alloc_etherdev这个函数 > 在2.6.30里面做了很大的改动,我现在很怀疑是它来了的问题, > 但是 >> if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { >> PRINTM(MSG, "Init ethernet device failed!\n"); >> return NULL; >> } > 可以正常执行下来!!! ↑ 即使这样也不能代表priv的初始化没有问题,因为,如果你没有为它得到内存空间, 它自然自始至终都是空指针。但你用dev->priv引用的时候,它有可能还没有准备好。 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From yanglei.fage在gmail.com Mon Jun 7 17:11:39 2010 From: yanglei.fage在gmail.com (lei yang) Date: Mon, 7 Jun 2010 17:11:39 +0800 Subject: =?GB2312?B?UmU6INT1w7TIw834v6i5pNf31NpETUHEo8q9?= In-Reply-To: References: Message-ID: 有没有个kernel config 让他打开或者,什么工具让他打开,或者他是在网络负载比较大的时候自动打开 2010/6/7 chengtao > 那要看网卡驱动是怎么写的 > > 在 2010年6月7日 下午3:16,lei yang 写道: > > 如题 > > > > -- > > "We learn from failure, not from success!" > > _______________________________________________ > > Linux 内核开发中文邮件列表 > > Linux-kernel在zh-kernel.org > > http://zh-kernel.org/mailman/listinfo/linux-kernel > > Linux 内核开发中文社区: http://zh-kernel.org > -- "We learn from failure, not from success!" From parson.cheng在cybertan.com.tw Mon Jun 7 17:12:52 2010 From: parson.cheng在cybertan.com.tw (parson.cheng在cybertan.com.tw) Date: Mon, 7 Jun 2010 17:12:52 +0800 Subject: =?gb2312?B?tPC4tDogtPC4tDoga21hbGxvYyBvb3BzIM7KzOI=?= In-Reply-To: Message-ID: <5D262E80A3F72048BB3FBC976D724D91083C3EF4@CTMAIL03.cybertan.com.tw> -----���ԭ��----- �����: Adam Jiang [mailto:jiang.adam在gmail.com] ���ʱ��2010�6�7� 17:03 ����: Parson Cheng �̹� (SH-24620) ���: jack_wang在usish.com; zhangxuesheng在dare-tech.com; orphen.leiliu在gmail.com; linux-kernel在zh-kernel.org ��: Re: �� kmalloc oops �� 2010/6/7 : > [Jack]�ʾ��ǿ��������Ӧ�ò��GFP�����ɡ�ʮ��˾Ż�� > priv = dev->priv; ���v�Ŀռ������ > > privӦ����> if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > ��� > ���֮��˴��û���nit ethernet device failed! > [Jack]����Ƿ��t-device�ṹ�ѽ����տ��һ�2.6.33 ��et_device�ṹ > ���û�priv�����ѽ���������privû������ԭ��� > > > �Ǻǣ� > ������� > ��net_device�ṹ������riv��������� > �ʵ���ԭ��ij��ml_privҲ�ͬ��Ĵ��� > �ô��/net/core/dev.c�alloc_netdev_mq����riv��ô����ģ� -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- ��������alloc_netdev_mq���������������kmalloc���� Best Regards, Parson ----------------------------------------------------------------------------- CyberTAN Technology, Inc. /���h�Ƽ������l�� No.1925,Nanle Road Songjiang Export Processing Zone Shanghai, China Tel: +86-21-61206688 ext.24646 Parson.cheng在cybertan.com.tw ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. From jiang.adam在gmail.com Mon Jun 7 17:25:45 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Mon, 7 Jun 2010 18:25:45 +0900 Subject: =?GB2312?B?UmU6INT1w7TIw834v6i5pNf31NpETUHEo8q9?= In-Reply-To: References: Message-ID: 2010/6/7 lei yang : > 有没有个kernel config 让他打开或者,什么工具让他打开, > 或者他是在网络负载比较大的时候自动打开 你这个命题比较笼统,似乎大家都没弄明白你想表达什么意思。 网卡如果是PCI设备,或者接续在PCI总线上,一般都是用dma方式 传送数据的(难道现在还有PIO方式的网卡么?) 据我所知没有所谓的打开或者关闭方法。 /大头阿当 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From parson.cheng在cybertan.com.tw Mon Jun 7 17:39:38 2010 From: parson.cheng在cybertan.com.tw (parson.cheng在cybertan.com.tw) Date: Mon, 7 Jun 2010 17:39:38 +0800 Subject: =?gb2312?B?tPC4tDogtPC4tDoga21hbGxvYyBvb3BzIM7KzOI=?= In-Reply-To: <5D262E80A3F72048BB3FBC976D724D91083C3EF4@CTMAIL03.cybertan.com.tw> Message-ID: <5D262E80A3F72048BB3FBC976D724D91083C3EF6@CTMAIL03.cybertan.com.tw> -----邮件原件----- 发件人: Parson Cheng 程光淼 (SH-24620) 发送时间: 2010年6月7日 17:13 收件人: 'Adam Jiang' 抄送: jack_wang在usish.com; zhangxuesheng在dare-tech.com; orphen.leiliu在gmail.com; linux-kernel在zh-kernel.org 主题: 答复: 答复: kmalloc oops 问题 2010/6/7 : > [Jack]提示的是空指针解引用,应该不是GFP的原因吧。十有八九还是 > priv = dev->priv; 这个priv的空间有分配么? > > priv应该是在 > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > 分配的 > 我在这之后加了打印语句没有出现Init ethernet device failed! > [Jack]你这个只是分配net-device结构体呀,我刚看了一下2.6.33 的net_device结构 > 体里面没有priv成员变量呀,谨慎怀疑还是priv没有分配内存的原因。 > > > 呵呵! > 忘了告诉您! > 我在net_device结构体中添加了priv成员!!! > 其实我用它原来的成员ml_priv也是同样的错误! > 那么,/net/core/dev.c中alloc_netdev_mq里面对priv是怎么处理的? -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- 我现在还在看alloc_netdev_mq,估计是这里的原因,而不是kmalloc的原因 Best Regards, Parson 各位: 我比较了2.6.30和2.6.19 alloc_etherdev这个函数的区别, 2.6.19 alloc_etherdev //net\ethernet\eth.c alloc_netdev //net/core/dev.c struct net_device *alloc_netdev(int sizeof_priv, const char *name, void (*setup)(struct net_device *)) { void *p; struct net_device *dev; int alloc_size; BUG_ON(strlen(name) >= sizeof(dev->name)); /* ensure 32-byte alignment of both the device and private area */ alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST; alloc_size += sizeof_priv + NETDEV_ALIGN_CONST; p = kzalloc(alloc_size, GFP_KERNEL); if (!p) { printk(KERN_ERR "alloc_netdev: Unable to allocate device.\n"); return NULL; } dev = (struct net_device *) (((long)p + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST); dev->padded = (char *)dev - (char *)p; if (sizeof_priv) dev->priv = netdev_priv(dev);//@@@@@@@@@@问题好像出在此@@@@@@@@@@@ setup(dev); strcpy(dev->name, name); return dev; } 2.6.30 alloc_etherdev //include/linux/etherdevice.h alloc_etherdev_mq //net/ethernet/eth.c alloc_netdev_mq //net/core/dev.c struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, void (*setup)(struct net_device *), unsigned int queue_count) { struct netdev_queue *tx; struct net_device *dev; size_t alloc_size; void *p; BUG_ON(strlen(name) >= sizeof(dev->name)); alloc_size = sizeof(struct net_device); if (sizeof_priv) { /* ensure 32-byte alignment of private area */ alloc_size = (alloc_size + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST; alloc_size += sizeof_priv; } /* ensure 32-byte alignment of whole construct */ alloc_size += NETDEV_ALIGN_CONST; p = kzalloc(alloc_size, GFP_KERNEL); if (!p) { printk(KERN_ERR "alloc_netdev: Unable to allocate device.\n"); return NULL; } tx = kcalloc(queue_count, sizeof(struct netdev_queue), GFP_KERNEL); if (!tx) { printk(KERN_ERR "alloc_netdev: Unable to allocate " "tx qdiscs.\n"); kfree(p); return NULL; } dev = (struct net_device *) (((long)p + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST); dev->padded = (char *)dev - (char *)p; dev_net_set(dev, &init_net); dev->_tx = tx; dev->num_tx_queues = queue_count; dev->real_num_tx_queues = queue_count; dev->gso_max_size = GSO_MAX_SIZE; netdev_init_queues(dev); INIT_LIST_HEAD(&dev->napi_list); setup(dev); strcpy(dev->name, name); return dev; } 在2.6.30中alloc_netdev_mq没有像2.6.19那样做下面的事情 dev->priv = netdev_priv(dev); // 'Adam Jiang' 说的对 ################################################################ 所以在2.6.30中 /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } 在这中间要调用dev->priv = netdev_priv(dev); /////////这是我的初步想法,待验证后报告各位 priv = dev->priv; /* allocate buffer for wlan_adapter */ if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) { PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); goto err_kmalloc; } Best Regards, Parson ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. From jiuxian_chu在foxmail.com Mon Jun 7 19:09:50 2010 From: jiuxian_chu在foxmail.com (=?gbk?B?uLvC+szD?=) Date: Mon, 7 Jun 2010 19:09:50 +0800 Subject: =?gbk?B?udjT2nN5c3RlbSgiY2QgLi4vIikgus1jaGRpcigp?= Message-ID: 各位: 我在Windows下执行下面的函数,路径怎么也切换不过来。 我的本意是到e:目录下执行md5sum,因为在cmd下md5sum必须与文件在同一个目录下。 但是无论用system 还是 chdir ,都无法把路径切换过去。 不知道哪里有错误,请各位帮忙看一下。 #include #include #include main() { char temp[128] = {0}; sprintf(temp, "CD e:"); system(temp); chdir("e:"); printf("%s\n",temp); system("dir > 1.txt"); system("md5sum 1.jpg"); } From adam8157在gmail.com Mon Jun 7 19:12:17 2010 From: adam8157在gmail.com (Adam Lee) Date: Mon, 7 Jun 2010 19:12:17 +0800 Subject: =?utf-8?B?5YWz5LqOc3lzdGVtKCJjZCAuLi8i?= =?utf-8?B?KSDlkoxjaGRpcigp?= In-Reply-To: References: Message-ID: <20100607111217.GA9368@debian> On Mon, Jun 07, 2010 at 07:09:50PM +0800, 富满堂 wrote: > char temp[128] = {0}; > sprintf(temp, "CD e:"); > system(temp); win下进入别的分区不用cd, 直接e:, 回车. -- Regards, Adam Lee -------------------------------------------------- E-mail: adam8157在gmail.com Website: http://www.adam8157.info -------------------------------------------------- From jiuxian_chu在foxmail.com Mon Jun 7 19:13:12 2010 From: jiuxian_chu在foxmail.com (=?gbk?B?uLvC+szD?=) Date: Mon, 7 Jun 2010 19:13:12 +0800 Subject: =?gbk?B?udjT2nN5c3RlbSgiY2QgLi4vIikgus1jaGRpcigp?= Message-ID: 各位: 我在Windows下执行下面的函数,路径怎么也切换不过来。 我的本意是到e:目录下执行md5sum,因为在cmd下md5sum必须与文件在同一个目录下。 但是无论用system 还是 chdir ,都无法把路径切换过去。 不知道哪里有错误,请各位帮忙看一下。 #include #include #include main() { char temp[128] = {0}; sprintf(temp, "CD /D e:"); system(temp); chdir("e:"); printf("%s\n",temp); system("dir > 1.txt"); system("md5sum 1.jpg"); } From killbug2004在gmail.com Mon Jun 7 19:45:07 2010 From: killbug2004在gmail.com (=?GB2312?B?t+W72MK316o=?=) Date: Mon, 7 Jun 2010 19:45:07 +0800 Subject: =?GB2312?B?UmU6IMfrvcyy4srUx7bI68q9bGludXggxNq6y7/Jv7/Q1LXEt70=?= =?GB2312?B?t6g=?= In-Reply-To: References: Message-ID: 谁能介绍一下LTP移植到arm下的经验 弄了很久都没有成功 新手见谅...... 在 2010年6月7日 上午9:37,Alvin 写道: > Run LTP first,但我觉得芯片引入的bug大部分会是芯片driver的问题,而不是kernel本身 > > 2010/6/7 t c > > > HI: > > 各位早上好。 > > 请教各位是如何验证linux内核的可靠性的? > > > > > linux移植到新的芯片上会引入许多bug,直接影响到整个项目的可靠性,靠上层应用程序员报bug这样的效率太低,请问各位有没有更好的方法来验证kernel的可靠性,如比像LTP这样的工具,或者别的什么方法。 > > > > > > > > 多谢多谢 > > _______________________________________________ > > Linux 内核开发中文邮件列表 > > Linux-kernel在zh-kernel.org > > http://zh-kernel.org/mailman/listinfo/linux-kernel > > Linux 内核开发中文社区: http://zh-kernel.org > > > > > -- > > ~Alvin > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > From mojiaxian在ceiec-electric.com Mon Jun 7 19:47:19 2010 From: mojiaxian在ceiec-electric.com (mjxian) Date: Mon, 07 Jun 2010 19:47:19 +0800 Subject: =?GB2312?B?udjT2nN5c3RlbSgiY2QgLi4vIikgus1jaGRpcigp?= In-Reply-To: References: Message-ID: <4C0CDC47.8040309@ceiec-electric.com> 于 2010-6-7 19:09, 富满堂 在来信中写道: > 各位: > 我在Windows下执行下面的函数, 大哥,这里是 Linux 内核邮件列表 From linkn.lin在gmail.com Mon Jun 7 21:39:27 2010 From: linkn.lin在gmail.com (Corey) Date: Mon, 7 Jun 2010 21:39:27 +0800 Subject: =?utf-8?Q?=E7=AD=94=E5=A4=8D:_=E5=85=B3=E4=BA=8Esystem=28=22cd_../=22=29_?= =?utf-8?Q?=E5=92=8Cchdir=28=29?= In-Reply-To: References: Message-ID: <4c0cf6ae.13838d0a.2931.ffffe823@mx.google.com> 需要设置环境变量的参数. -----邮件原件----- 发件人: linux-kernel-bounces在zh-kernel.org [mailto:linux-kernel-bounces在zh-kernel.org] 代表 富满堂 发送时间: 2010年6月7日 19:13 收件人: linux-kernel 主题: 关于system("cd ../") 和chdir() 各位: 我在Windows下执行下面的函数,路径怎么也切换不过来。 我的本意是到e:目录下执行md5sum,因为在cmd下md5sum必须与文件在同一个目录下。 但是无论用system 还是 chdir ,都无法把路径切换过去。 不知道哪里有错误,请各位帮忙看一下。 #include #include #include main() { char temp[128] = {0}; sprintf(temp, "CD /D e:"); system(temp); chdir("e:"); printf("%s\n",temp); system("dir > 1.txt"); system("md5sum 1.jpg"); } _______________________________________________ Linux 内核开发中文邮件列表 Linux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux 内核开发中文社区: http://zh-kernel.org From tshshrk在gmail.com Mon Jun 7 21:52:58 2010 From: tshshrk在gmail.com (Xiaocheng Li) Date: Mon, 7 Jun 2010 21:52:58 +0800 Subject: Hello everyone! Message-ID: <001901cb0648$bf7ec7c0$3e7c5740$@gmail.com> From lxgmail在msn.cn Mon Jun 7 22:21:22 2010 From: lxgmail在msn.cn (=?gb2312?B?wbrQobjV?=) Date: Mon, 7 Jun 2010 14:21:22 +0000 Subject: =?gb2312?B?UkU6IM34v6i2wcr9vt3Kxw==?= =?gb2312?B?ts/P387KzOKjvw==?= In-Reply-To: References: , , , Message-ID: 感谢你的回复,问题今天找到了,根据LAN在读 0xFF 掉线时,用示波器抓到的Reset脚的波形不正常,想到可能是干扰问题,之后在Reset脚添加电容即解决了问题。 Date: Fri, 4 Jun 2010 13:46:57 +0800 Subject: Re: 网卡读数据是断线问题? From: elendil.wang在gmail.com To: lxgmail在msn.cn CC: linux-kernel在zh-kernel.org 2010/6/4 梁小刚 不好意思阿,我补充一下,网卡是SMSC的LAN9220,CPU是ARM926EJ,OS用的是Nucleus, 但是只是用了它的核心调度,驱动大部分是自己写的,初始化部分参考了LINUX 的SMSC9210驱动,整个系统是在FPGA上跑。能确定第二个字节只有0xff就会断,如果把断点处换成delay它的确就不断了 1.不用抱歉,我只是提醒下,^_^ 2.没用过Nucleus,和VX类似的吗?稍微看了下LAN9220的介绍,PCI-ETH控制器,对你 的环境也不熟悉,给你些建议,可能用不上,请斟酌: a.排除硬件问题,如果是产品化的话,替换法是个不错的选择 b.因为是PCI接口的,你可能需要确认下PCI通信是否有问题,PCI的配置、时钟啊,看看是否有error之类的 c.你的问题看起来象时序问题,如果有条件,检查下信号质量,特别是PCI的,可以在接收0xff时候抓下波形 d.虽然你可能做过,不过还是建议下咨询FAE可能会有效果 Date: Fri, 4 Jun 2010 11:09:37 +0800 Subject: Re: 网卡读数据是断线问题? From: elendil.wang在gmail.com To: lxgmail在msn.cn CC: linux-kernel在zh-kernel.org 2010/6/2 梁小刚 如主题,在网卡接收FIFO(32位)中以每次四个字节读数据,如果读的前两个字节是 xx FF,也就是第二个字节是FF时就断线了(其实第一个中断到来时,接收FIFO中的前六个字节正是以太网帧的目的MAC地址,FF FF FF FF FF FF 一个ARP的广播包),此时网卡貌似软件复位了一样,寄存器都恢复默认值了, 必须硬件复位,才能重新正常运行;但是,如果我在接收函数处打上断点,单步读数据,没有问题,可以正确接收数据。觉得这个问题比较怪,像是CPU读数据的时序问题又像是网卡的哪个寄存器没有配置好,不知大家有没有遇到这种情况,或者是在读数据时断线的情况,应该从哪方面考虑呢? 1.你的网卡是什么呢?CPU呢?请告知环境,方便别人定位问题 2.你能确认第二个字节只有0xff就会断吗?有发送其他数据试过吗?如组播MAC,怀疑这不是根本原因,甚至和问题一点关系都没有 3.不知你用的驱动是哪个?你是中断或软中断打断点的?可以把断点换成delay试试看 4.你可以量量网卡复位引脚的信号,再就是换同样的网卡试试,另外看看供电方面的设计 使用Messenger保护盾V2,支持多账号登录! 现在就下载! _________________________________________________________________ 约会说不清地方?来试试微软地图最新msn互动功能! http://ditu.live.com/?form=TL&swm=1 From qzhang.g在gmail.com Mon Jun 7 23:58:38 2010 From: qzhang.g在gmail.com (Alvin) Date: Mon, 7 Jun 2010 23:58:38 +0800 Subject: =?UTF-8?B?UmU6IOivt+aVmea1i+ivleW1jOWFpeW8j2xpbnV4IOWGheaguOWPr+mdoOaAp+eahOaWuQ==?= =?UTF-8?B?5rOV?= In-Reply-To: References: Message-ID: $LTP/kernel 里面的程序大部分都能编译,把你的toolchain设定对,如source一些环境变量比如CROSS_COMPILE等等就行了,或者直接修改下$LTP/Makefile, 2010/6/7 峰回路转 > 谁能介绍一下LTP移植到arm下的经验 弄了很久都没有成功 新手见谅...... > > 在 2010年6月7日 上午9:37,Alvin 写道: > >> Run LTP first,但我觉得芯片引入的bug大部分会是芯片driver的问题,而不是kernel本身 >> >> >> 2010/6/7 t c >> >> > HI: >> > 各位早上好。 >> > 请教各位是如何验证linux内核的可靠性的? >> > >> > >> linux移植到新的芯片上会引入许多bug,直接影响到整个项目的可靠性,靠上层应用程序员报bug这样的效率太低,请问各位有没有更好的方法来验证kernel的可靠性,如比像LTP这样的工具,或者别的什么方法。 >> > >> > >> > >> > 多谢多谢 >> > _______________________________________________ >> > Linux 内核开发中文邮件列表 >> > Linux-kernel在zh-kernel.org >> > http://zh-kernel.org/mailman/listinfo/linux-kernel >> > Linux 内核开发中文社区: http://zh-kernel.org >> >> >> >> >> -- >> >> ~Alvin >> _______________________________________________ >> Linux 内核开发中文邮件列表 >> Linux-kernel在zh-kernel.org >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> Linux 内核开发中文社区: http://zh-kernel.org >> > > -- ~Alvin From qzhang.g在gmail.com Tue Jun 8 00:03:41 2010 From: qzhang.g在gmail.com (Alvin) Date: Tue, 8 Jun 2010 00:03:41 +0800 Subject: =?UTF-8?B?UmU6IOWFs+S6jnN5c3RlbSgiY2QgLi4vIikg5ZKMY2hkaXIoKQ==?= In-Reply-To: <4C0CDC47.8040309@ceiec-electric.com> References: <4C0CDC47.8040309@ceiec-electric.com> Message-ID: 2010/6/7 mjxian > 于 2010-6-7 19:09, 富满堂 在来信中写道: > > 各位: > > 我在Windows下执行下面的函数, > 大哥,这里是 Linux 内核邮件列表 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > chdir("e:"); 看起来此api在windows不用这种字串啊,要用win就找纯正点的api -- ~Alvin From parson.cheng在cybertan.com.tw Tue Jun 8 08:18:03 2010 From: parson.cheng在cybertan.com.tw (parson.cheng在cybertan.com.tw) Date: Tue, 8 Jun 2010 08:18:03 +0800 Subject: =?gb2312?B?tPC4tDogtPC4tDoga21hbGxvYyBvb3BzIM7KzOI=?= In-Reply-To: <5D262E80A3F72048BB3FBC976D724D91083C3EF6@CTMAIL03.cybertan.com.tw> Message-ID: <5D262E80A3F72048BB3FBC976D724D91083C3EF9@CTMAIL03.cybertan.com.tw> -----邮件原件----- 发件人: Parson Cheng 程光淼 (SH-24620) 发送时间: 2010年6月7日 17:13 收件人: 'Adam Jiang' 抄送: jack_wang在usish.com; zhangxuesheng在dare-tech.com; orphen.leiliu在gmail.com; linux-kernel在zh-kernel.org 主题: 答复: 答复: kmalloc oops 问题 2010/6/7 : > [Jack]提示的是空指针解引用,应该不是GFP的原因吧。十有八九还是 > priv = dev->priv; 这个priv的空间有分配么? > > priv应该是在 > if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { > PRINTM(MSG, "Init ethernet device failed!\n"); > return NULL; > } > 分配的 > 我在这之后加了打印语句没有出现Init ethernet device failed! > [Jack]你这个只是分配net-device结构体呀,我刚看了一下2.6.33 的net_device结构 > 体里面没有priv成员变量呀,谨慎怀疑还是priv没有分配内存的原因。 > > > 呵呵! > 忘了告诉您! > 我在net_device结构体中添加了priv成员!!! > 其实我用它原来的成员ml_priv也是同样的错误! > 那么,/net/core/dev.c中alloc_netdev_mq里面对priv是怎么处理的? -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- 我现在还在看alloc_netdev_mq,估计是这里的原因,而不是kmalloc的原因 Best Regards, Parson 各位: 我比较了2.6.30和2.6.19 alloc_etherdev这个函数的区别, 2.6.19 alloc_etherdev //net\ethernet\eth.c alloc_netdev //net/core/dev.c struct net_device *alloc_netdev(int sizeof_priv, const char *name, void (*setup)(struct net_device *)) { void *p; struct net_device *dev; int alloc_size; BUG_ON(strlen(name) >= sizeof(dev->name)); /* ensure 32-byte alignment of both the device and private area */ alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST; alloc_size += sizeof_priv + NETDEV_ALIGN_CONST; p = kzalloc(alloc_size, GFP_KERNEL); if (!p) { printk(KERN_ERR "alloc_netdev: Unable to allocate device.\n"); return NULL; } dev = (struct net_device *) (((long)p + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST); dev->padded = (char *)dev - (char *)p; if (sizeof_priv) dev->priv = netdev_priv(dev);//@@@@@@@@@@问题好像出在此@@@@@@@@@@@ setup(dev); strcpy(dev->name, name); return dev; } 2.6.30 alloc_etherdev //include/linux/etherdevice.h alloc_etherdev_mq //net/ethernet/eth.c alloc_netdev_mq //net/core/dev.c struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, void (*setup)(struct net_device *), unsigned int queue_count) { struct netdev_queue *tx; struct net_device *dev; size_t alloc_size; void *p; BUG_ON(strlen(name) >= sizeof(dev->name)); alloc_size = sizeof(struct net_device); if (sizeof_priv) { /* ensure 32-byte alignment of private area */ alloc_size = (alloc_size + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST; alloc_size += sizeof_priv; } /* ensure 32-byte alignment of whole construct */ alloc_size += NETDEV_ALIGN_CONST; p = kzalloc(alloc_size, GFP_KERNEL); if (!p) { printk(KERN_ERR "alloc_netdev: Unable to allocate device.\n"); return NULL; } tx = kcalloc(queue_count, sizeof(struct netdev_queue), GFP_KERNEL); if (!tx) { printk(KERN_ERR "alloc_netdev: Unable to allocate " "tx qdiscs.\n"); kfree(p); return NULL; } dev = (struct net_device *) (((long)p + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST); dev->padded = (char *)dev - (char *)p; dev_net_set(dev, &init_net); dev->_tx = tx; dev->num_tx_queues = queue_count; dev->real_num_tx_queues = queue_count; dev->gso_max_size = GSO_MAX_SIZE; netdev_init_queues(dev); INIT_LIST_HEAD(&dev->napi_list); setup(dev); strcpy(dev->name, name); return dev; } 在2.6.30中alloc_netdev_mq没有像2.6.19那样做下面的事情 dev->priv = netdev_priv(dev); // 'Adam Jiang' 说的对 ################################################################ 所以在2.6.30中 /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } 在这中间要调用dev->priv = netdev_priv(dev); /////////这是我的初步想法,待验证后报告各位 priv = dev->priv; /* allocate buffer for wlan_adapter */ if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) { PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); goto err_kmalloc; } Best Regards, Parson ================================接昨天========================================== 各位: 昨天说到我的初步想法,今天报告大家我的验证结果 /* Allocate an Ethernet device and register it */ if (!(dev = alloc_etherdev(sizeof(wlan_private)))) { PRINTM(MSG, "Init ethernet device failed!\n"); return NULL; } dev->priv = netdev_priv(dev); /////////在这里添加这条语句就OK priv = dev->priv; /* allocate buffer for wlan_adapter */ if (!(priv->adapter = kmalloc(sizeof(wlan_adapter), GFP_KERNEL))) { PRINTM(MSG, "Allocate buffer for wlan_adapter failed!\n"); goto err_kmalloc; } 最后谢谢各位的热心帮助! Best Regards, from Parson ----------------------------------- e-mail:parson.cheng在cybertan.com.tw ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. From eclair4android在gmail.com Tue Jun 8 11:36:33 2010 From: eclair4android在gmail.com (=?utf-8?B?ZWNsYWlyNGFuZHJvaWQ=?=) Date: Tue, 8 Jun 2010 11:36:33 +0800 Subject: =?utf-8?B?6K+35pWZ5aaC5L2V5Zyo5a6a5pe25Zmo5ZON5bqU5Ye95pWw5Lit6LCD55So5pyJbWlnaHRfc2xlZXDosIPnlKjnmoTlh73mlbA=?= References: Message-ID: <201006081136281096692@gmail.com> 大家好! 我在定时器响应函数中调用如下函数: cancel_delayed_work_sync(&ear_adc_cal_work); 运行时提示出现core dump,显示信息: BUG: sleeping function called from invalid context at kernel/workqueue.c:440 请教如何在定时器响应函数中调用有might_sleep调用的函数 2010-06-08 eclair4android From chengtao.linux在gmail.com Tue Jun 8 11:59:33 2010 From: chengtao.linux在gmail.com (chengtao) Date: Tue, 8 Jun 2010 11:59:33 +0800 Subject: =?GB2312?B?UmU6IMfrvczI57rO1Nq2qMqxxvfP7NOmuq/K/dbQtffTw9PQ?= =?GB2312?B?bWlnaHRfc2xlZXC199PDtcS6r8r9?= In-Reply-To: <201006081136281096692@gmail.com> References: <201006081136281096692@gmail.com> Message-ID: HI: 有很多系统的定时器是在中断场境中实现的,没有进程上下文,这样的情况下可以用udelay 等,但这些sleep操作会影响系统性能,建议修改设计用带定进功能的工作队列吧。 在 2010年6月8日 上午11:36,eclair4android 写道: > 大家好! > 我在定时器响应函数中调用如下函数: > cancel_delayed_work_sync(&ear_adc_cal_work); > 运行时提示出现core dump,显示信息: > BUG: sleeping function called from invalid context at kernel/workqueue.c:440 > > 请教如何在定时器响应函数中调用有might_sleep调用的函数 > > 2010-06-08 > > > > eclair4android > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From jiang.adam在gmail.com Tue Jun 8 14:50:13 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Tue, 8 Jun 2010 15:50:13 +0900 Subject: =?GB2312?B?UmU6IMfzvcy52NPaIEpGRlMyIM7EvP7Ptc2ztcTOysziIQ==?= In-Reply-To: References: Message-ID: 2010/6/8 wang wang : > 您好: > 您以前的邮件告诉我在 > $LNX/drivers/mtd/maps/ > 这个路径下添加一个 nor flash的驱动文件(我们暂时把这个文教叫做 nor_flash_drivers.c),仿照 > $LNX/drivers/mtd/maps/ > 路径下其他的驱动文件去编写。 > 这个做法是正确的。 > 不好意思,我没有弄明白你问的问题。上文中"这个文件"指的是驱动程序源码本身, > 还是Makefile或者Kconfig? > > 上文中"这个文件"指 nor_flash_drivers.c 也就是我现在板上的 8M 的 nor flash 的驱动文件。 > 我把 nor_flash_drivers.c 加入到 Makefile 和 Kconfig 中进行配置和编译 应该是可以做到。 > 但是 nor_flash_drivers.c 这个文件和其他文件的依赖关系联系,这个我弄不明白。 > ( > 因为我看见 在 Kconfig 中 有 > config MTD_CFI_FLAGADM > tristate "CFI Flash device mapping on FlagaDM" > depends on 8xx && MTD_CFI > help > Mapping for the Flaga digital module. If you don't have one, ignore > this setting. > 这样的内容,说明 MTD_CFI_FLAGADM 依赖于 8xx && MTD_CFI > ) 你问到的这个问题是关于Linux kernel自身编译系统的问题,事实上, Kconfig仅仅是提供编译选项和对于选项的说明。 你上面给的这个例子就是编译选项CONFIG_MTD_CFI_FLAGADM依赖于另外两个 编译选项,它的意思是,你需要使用该选项时,必须让其他两个选项也有效。 help下面的是说明文字。 你需要将新驱动的编译选项添加到这里,但是仅仅这样做是不够的, 因为它并没有将你写好的驱动程序添加到编译过程中。 接着,你需要修改Makefile。我举个例子: Kconfig ______________________ config FOO_MTD_FLASH tristate "Foo mtd device driver" depends on MTD_CFI help This enable the support to foo nor flash device on XXX board. ______________________ Makefile ______________________ obj-$(CONFIG_FOO_MTD_FLASH) += foo_nor_flash.c ______________________ 至于,Kconfig里面的依赖关系,你需要自己弄清楚,一般来说, 这个依赖指定特定的体系结构arch,子系统的general选项,还有其他需要的编译选项。 > 还有这个驱动在内核中什么地方调用,怎么调用; > 以及 我的 8M 的 nor flash 上 0x10600000 这个地址开始的 1M 的数据块 怎么映射到 /dev/mtdblock1这个块设备上 。 通过在驱动程序中指定这个该"块"的物理地址和大小从而让Linux找到这段存储器。 物理地址与CPU体系结构有关,所以你还得做一些转换。 然后,就像我昨天给的例子那样,使用ioremap函数将这段物理内存拉入内核的虚拟地址空间内。 这样就完成了映射。 /大头阿当 > 上面是我的问题,请您帮忙看看。 > > 谢谢您!!! > > Thanks & Bestregards ! > Colin > -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From sanweidaying在gmail.com Tue Jun 8 17:40:35 2010 From: sanweidaying在gmail.com (=?GB2312?B?wfXW3Ma9?=) Date: Tue, 8 Jun 2010 17:40:35 +0800 Subject: =?GB2312?B?uuojZGVmaW5lIGNwdV9ycShjcHUpyOe6zsq508Mgx/O+yKOho6GjoQ==?= Message-ID: 大家好,下午在linux-2.6.33上做一个系统调用,要用到cpu的运行队列rq。 内核中有这要一段宏: #define cpu_rq(cpu) (&per_cpu(runqueues, (cpu))) #define task_rq(p) cpu_rq(task_cpu(p)) 可以通过cpu_rq找到cpu对应的rq 可是我在写一个测试文件后编译时出现这样的错误:(头文件应该都有的) kernel/test_get_rq.c:33: error: ‘per_cpu__runqueues’ undeclared (first use in this function) 不知道宏cpu_rq如何使用,请高手赐教!!! 我的test_get_rq.c内容如下: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define cpu_rq(cpu) (&per_cpu(runqueues, (cpu))) #define task_rq(p) cpu_rq(task_cpu(p)) int sys_test_print_rq(struct task_struct *p) { struct rq *test_rq; struct cfs_rq *cfs; int cpu; cpu = task_cpu(p); test_rq = cpu_rq(cpu); printk(KERN_INFO "rq.nr_runing is %lu\n",test_rq->nr_running); printk(KERN_INFO "rq.nr_uninterruptible is %lu\n",test_rq->nr_uninterruptible); printk(KERN_INFO "rq.nr_load_updates is %lu\n",test_rq->nr_load_updates); printk(KERN_INFO "rq.rq_cpu_time is %lu\n",test_rq->rq_cpu_time); printk(KERN_INFO "rq.yld_count is %u\n",test_rq->yld_count); printk(KERN_INFO "rq.sched_switch is %u\n",test_rq->sched_switch); printk(KERN_INFO "rq.sched_goidle is %u\n",test_rq->sched_goidle); printk(KERN_INFO "rq.ttwu_count is %u\n",test_rq->ttwu_count); printk(KERN_INFO "rq.ttwu_local is %u\n",test_rq->ttwu_local); printk(KERN_INFO "rq.bkl_count is %u\n",test_rq->bkl_count); cfs = &(test_rq->cfs); return 0; } From xiyou.wangcong在gmail.com Tue Jun 8 17:57:10 2010 From: xiyou.wangcong在gmail.com (=?utf-8?Q?Am=C3=A9rico?= Wang) Date: Tue, 8 Jun 2010 17:57:10 +0800 Subject: =?utf-8?B?5a6PI2RlZmluZSBjcHVfcnEoY3B1?= =?utf-8?B?KeWmguS9leS9v+eUqCDmsYLmlZHvvIHvvIHvvIE=?= In-Reply-To: References: Message-ID: <20100608095710.GD7110@cr0.nay.redhat.com> On Tue, Jun 08, 2010 at 05:40:35PM +0800, 刘周平 wrote: >大家好,下午在linux-2.6.33上做一个系统调用,要用到cpu的运行队列rq。 >内核中有这要一段宏: >#define cpu_rq(cpu) (&per_cpu(runqueues, (cpu))) >#define task_rq(p) cpu_rq(task_cpu(p)) >可以通过cpu_rq找到cpu对应的rq > >可是我在写一个测试文件后编译时出现这样的错误:(头文件应该都有的) >kernel/test_get_rq.c:33: error: ‘per_cpu__runqueues’ undeclared (first use >in this function) per_cpu__runqueues在kernel/sched.c中定义,是static的。 From sanweidaying在gmail.com Tue Jun 8 19:33:09 2010 From: sanweidaying在gmail.com (=?GB2312?B?wfXW3Ma9?=) Date: Tue, 8 Jun 2010 19:33:09 +0800 Subject: =?GB2312?B?UmU6ILrqI2RlZmluZSBjcHVfcnEoY3B1Kcjnus7KudPDIMfzvsijoaOh?= =?GB2312?B?o6E=?= In-Reply-To: <20100608095710.GD7110@cr0.nay.redhat.com> References: <20100608095710.GD7110@cr0.nay.redhat.com> Message-ID: 在 2010年6月8日 下午5:57,Américo Wang 写道: > On Tue, Jun 08, 2010 at 05:40:35PM +0800, 刘周平 wrote: > >大家好,下午在linux-2.6.33上做一个系统调用,要用到cpu的运行队列rq。 > >内核中有这要一段宏: > >#define cpu_rq(cpu) (&per_cpu(runqueues, (cpu))) > >#define task_rq(p) cpu_rq(task_cpu(p)) > >可以通过cpu_rq找到cpu对应的rq > > > >可是我在写一个测试文件后编译时出现这样的错误:(头文件应该都有的) > >kernel/test_get_rq.c:33: error: ‘per_cpu__runqueues’ undeclared (first use > >in this function) > > > per_cpu__runqueues在kernel/sched.c中定义,是static的。 > 我在sched.c中没找到,他是通过宏拼接的,还是在sched.c文件中直接定义的? From jiang.adam在gmail.com Tue Jun 8 19:39:26 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Tue, 8 Jun 2010 20:39:26 +0900 Subject: =?GB2312?B?yOe6ztew1NjE2rrLxKO/6bXEt/u6xbHt?= Message-ID: Hello, 使用gdb做remote调试时,如何装载内核模块的符号表? 在我的环境中调试scsi_mod模块时,发生如下错误, .... (gdb) disassemble scsi_get_command No symbol table is loaded. Use the "file" command. 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, 但是错误依旧存在。 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 符号可以正常的disas。 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 包含了符号和符号的位置。 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? 谢谢。 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From hanpfei在gmail.com Tue Jun 8 22:31:56 2010 From: hanpfei在gmail.com (pfei han) Date: Tue, 8 Jun 2010 22:31:56 +0800 Subject: =?GB2312?B?QVJNIExpbnV4u+Ox4NPv0dTW0LXE0rvQqbf7usU=?= Message-ID: 在读ARM Linux中断部分的代码的时候感觉有很多符号让人很困惑啊,还请大虾们帮忙解释下了。谢谢了啊! 在arch/arm/kernel/entry-armv.S中 宏svc_entry的定义中: UNWIND(.fnstart ) UNWIND(.save {r0 - pc} ) 符号.fnstart是做什么用的啊? 还有下面的.save符号,这个符号实际完成对寄存器的保存吗?还是仅仅祈祷一个注释的作用啊? From unbutun在sohu.com Tue Jun 8 22:45:06 2010 From: unbutun在sohu.com (Gavin) Date: Tue, 8 Jun 2010 22:45:06 +0800 Subject: =?gb2312?B?tPO80rrDo6zLrbbUc2x1YsDvtcRvcmRlcrXEvMbL47HIvc+2rqOs1ri149K7z8I=?= Message-ID: <201006082245047033963@sohu.com> Hi, 如题,在研究slub,但是对那个slab_order 和calculate_order没太搞懂是怎么算的? 谁知道,指点指点。 谢谢了 Regards, Gavin 2010-06-08 Happy everyday ! From raise.sail在gmail.com Wed Jun 9 09:13:21 2010 From: raise.sail在gmail.com (Li Yu) Date: Wed, 09 Jun 2010 09:13:21 +0800 Subject: =?UTF-8?B?5aaC5L2V6KOF6L295YaF5qC45qih5Z2X55qE56ym5Y+36KGo?= In-Reply-To: References: Message-ID: <4C0EEAB1.9030806@gmail.com> 于 2010年06月08日 19:39, Adam Jiang 写道: > Hello, > > 使用gdb做remote调试时,如何装载内核模块的符号表? > 在我的环境中调试scsi_mod模块时,发生如下错误, > > .... > (gdb) disassemble scsi_get_command > No symbol table is loaded. Use the "file" command. > > 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, > 但是错误依旧存在。 > > 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 > 符号可以正常的disas。 > > 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 > 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 > 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 > 包含了符号和符号的位置。 > 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? > 如果我记得没错,可以这样: gdb> add-symbol-file scsi_mod.ko VADDR VADDR可以通过grep scsi_mod.ko /proc/modules获得。 > 谢谢。 > From onlyflyer在gmail.com Wed Jun 9 09:56:27 2010 From: onlyflyer在gmail.com (Liu Hui) Date: Wed, 9 Jun 2010 09:56:27 +0800 Subject: =?UTF-8?B?UmU6IOWkp+WutuWlve+8jOiwgeWvuXNsdWLph4znmoRvcmRlcueahOiuoeeul+avlOi+gw==?= =?UTF-8?B?5oeC77yM5oyH54K55LiA5LiL?= In-Reply-To: <201006082245047033963@sohu.com> References: <201006082245047033963@sohu.com> Message-ID: offset应该跟cache line的大小有关吧。着色区的大小就是color * color_offset, 这样能保证同一对象区不同slab上的obj能在cache中的映射能错开。 在 2010年6月8日 下午10:45,Gavin 写道: > Hi, > > > 如题,在研究slub,但是对那个slab_order 和calculate_order没太搞懂是怎么算的? > > > 谁知道,指点指点。 > > > 谢谢了 > > > > Regards, > > Gavin > > 2010-06-08 > > > > Happy everyday ! > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- Thanks & Best Regards Liu Hui -- From onlyflyer在gmail.com Wed Jun 9 10:26:39 2010 From: onlyflyer在gmail.com (Liu Hui) Date: Wed, 9 Jun 2010 10:26:39 +0800 Subject: =?UTF-8?B?UmU6IOWkp+WutuWlve+8jOiwgeWvuXNsdWLph4znmoRvcmRlcueahOiuoeeul+avlOi+gw==?= =?UTF-8?B?5oeC77yM5oyH54K55LiA5LiL?= In-Reply-To: References: <201006082245047033963@sohu.com> Message-ID: Sorry,看错了,把order看成offset了。 在 2010年6月9日 上午9:56,Liu Hui 写道: > offset应该跟cache line的大小有关吧。着色区的大小就是color * color_offset, > 这样能保证同一对象区不同slab上的obj能在cache中的映射能错开。 > > > 在 2010年6月8日 下午10:45,Gavin 写道: > > Hi, >> >> >> 如题,在研究slub,但是对那个slab_order 和calculate_order没太搞懂是怎么算的? >> >> >> 谁知道,指点指点。 >> >> >> 谢谢了 >> >> >> >> Regards, >> >> Gavin >> >> 2010-06-08 >> >> >> >> Happy everyday ! >> _______________________________________________ >> Linux 内核开发中文邮件列表 >> Linux-kernel在zh-kernel.org >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> Linux 内核开发中文社区: http://zh-kernel.org > > > > > -- > Thanks & Best Regards > Liu Hui > -- > -- Thanks & Best Regards Liu Hui -- From yaanhyy在gmail.com Wed Jun 9 10:33:44 2010 From: yaanhyy在gmail.com (yy Hong) Date: Wed, 9 Jun 2010 10:33:44 +0800 Subject: =?GB2312?B?RndkOiDI57rO17DU2MTausvEo7/ptcS3+7rFse0=?= In-Reply-To: References: Message-ID: ---------- 已转发邮件 ---------- 发件人: yy Hong 日期: 2010年6月9日 上午10:32 主题: Re: 如何装载内核模块的符号表 收件人: Adam Jiang 请问你的kgdb是如何搭建的?你是针对什么平台进行调试? 我用kgdb调试ppc架构的板子。链接时不时会出现: Ignoring packet error, continuing... Ignoring packet error, continuing... Ignoring packet error, continuing... Malformed response to offset query, timeout 有时进到了调试环境,单步时还是会报上边的错,不能继续进行调试。现在特别郁闷 在 2010年6月8日 下午7:39,Adam Jiang 写道: Hello, > > 使用gdb做remote调试时,如何装载内核模块的符号表? > 在我的环境中调试scsi_mod模块时,发生如下错误, > > .... > (gdb) disassemble scsi_get_command > No symbol table is loaded. Use the "file" command. > > 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, > 但是错误依旧存在。 > > 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 > 符号可以正常的disas。 > > 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 > 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 > 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 > 包含了符号和符号的位置。 > 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? > > 谢谢。 > > -- > Adam Jiang > ----------------------------------- > e-mail:jiang.adam在gmail.com > http://www.adamjiang.com > ----------------------------------- > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > From wen_kernel在163.com Wed Jun 9 10:37:05 2010 From: wen_kernel在163.com (=?utf-8?B?V2VueHk=?=) Date: Wed, 9 Jun 2010 10:37:05 +0800 Subject: =?utf-8?B?UmU6IEZ3ZDog5aaC5L2V6KOF6L295YaF5qC45qih5Z2X55qE56ym5Y+36KGo?= References: , , Message-ID: <201006091037050787988@163.com> >---------- 已转发邮件 ---------- >发件人: yy Hong >日期: 2010年6月9日 上午10:32 >主题: Re: 如何装载内核模块的符号表 >收件人: Adam Jiang > > >请问你的kgdb是如何搭建的?你是针对什么平台进行调试? >我用kgdb调试ppc架构的板子。链接时不时会出现: >Ignoring packet error, continuing... > >Ignoring packet error, continuing... > >Ignoring packet error, continuing... > > >Malformed response to offset query, timeout >有时进到了调试环境,单步时还是会报上边的错,不能继续进行调试。现在特别郁闷 > >在 2010年6月8日 下午7:39,Adam Jiang 写道: > >Hello, >> >> 使用gdb做remote调试时,如何装载内核模块的符号表? >> 在我的环境中调试scsi_mod模块时,发生如下错误, >> >> .... >> (gdb) disassemble scsi_get_command >> No symbol table is loaded. Use the "file" command. >> >> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, >> 但是错误依旧存在。 >> >> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 >> 符号可以正常的disas。 >> >> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 >> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 >> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 >> 包含了符号和符号的位置。 >> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? >> >> 谢谢。 >> >> -- >> Adam Jiang >> ----------------------------------- >> e-mail:jiang.adam在gmail.com >> http://www.adamjiang.com >> ----------------------------------- >> _______________________________________________ >> Linux 内核开发中文邮件列表 >> Linux-kernel在zh-kernel.org >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> Linux 内核开发中文社区: http://zh-kernel.org >> >_______________________________________________ >Linux 内核开发中文邮件列表 >Linux-kernel在zh-kernel.org >http://zh-kernel.org/mailman/listinfo/linux-kernel >Linux 内核开发中文社区: http://zh-kernel.org Hi, yy Hong 要排除网络故障! Best regards. Wenxy. 2010-06-09,10:36:39 Email: wen_kernel在163.com Blog: http://blog.csdn.net/wenxy1 From yaanhyy在gmail.com Wed Jun 9 11:09:10 2010 From: yaanhyy在gmail.com (yy Hong) Date: Wed, 9 Jun 2010 11:09:10 +0800 Subject: =?GB2312?B?UmU6IEZ3ZDogyOe6ztew1NjE2rrLxKO/6bXEt/u6xbHt?= In-Reply-To: <201006091037050787988@163.com> References: <201006091037050787988@163.com> Message-ID: Hi wen_kernel: 我是用的serial接口调试。使用kgdboc配置。关键现在感觉是调试不稳定,有时可以链接上,有时连接不上。并且即使连接上,在进入modules中设置的断点后,单步时,又会失去链接,出现: Ignoring packet error, continuing... Ignoring packet error, continuing... Ignoring packet error, continuing... Malformed response to offset query, timeout 不知道是哪里的原因,之前使用另外一台服务器做位调试主机,suse发行版似乎不出现的。 现在换了一个主机,使用dedora。不知道是不是主机的问题? 在 2010年6月9日 上午10:37,Wenxy 写道: > >---------- 已转发邮件 ---------- > >发件人: yy Hong > >日期: 2010年6月9日 上午10:32 > >主题: Re: 如何装载内核模块的符号表 > >收件人: Adam Jiang > > > > > >请问你的kgdb是如何搭建的?你是针对什么平台进行调试? > >我用kgdb调试ppc架构的板子。链接时不时会出现: > >Ignoring packet error, continuing... > > > >Ignoring packet error, continuing... > > > >Ignoring packet error, continuing... > > > > > >Malformed response to offset query, timeout > >有时进到了调试环境,单步时还是会报上边的错,不能继续进行调试。现在特别郁闷 > > > >在 2010年6月8日 下午7:39,Adam Jiang 写道: > > > >Hello, > >> > >> 使用gdb做remote调试时,如何装载内核模块的符号表? > >> 在我的环境中调试scsi_mod模块时,发生如下错误, > >> > >> .... > >> (gdb) disassemble scsi_get_command > >> No symbol table is loaded. Use the "file" command. > >> > >> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, > >> 但是错误依旧存在。 > >> > >> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 > >> 符号可以正常的disas。 > >> > >> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 > >> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 > >> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 > >> 包含了符号和符号的位置。 > >> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? > >> > >> 谢谢。 > >> > >> -- > >> Adam Jiang > >> ----------------------------------- > >> e-mail:jiang.adam在gmail.com < > e-mail%3Ajiang.adam在gmail.com > > >> http://www.adamjiang.com > >> ----------------------------------- > >> _______________________________________________ > >> Linux 内核开发中文邮件列表 > >> Linux-kernel在zh-kernel.org > >> http://zh-kernel.org/mailman/listinfo/linux-kernel > >> Linux 内核开发中文社区: http://zh-kernel.org > >> > >_______________________________________________ > >Linux 内核开发中文邮件列表 > >Linux-kernel在zh-kernel.org > >http://zh-kernel.org/mailman/listinfo/linux-kernel > >Linux 内核开发中文社区: http://zh-kernel.org > > Hi, yy Hong > 要排除网络故障! > > Best regards. > Wenxy. > 2010-06-09,10:36:39 > Email: wen_kernel在163.com > Blog: http://blog.csdn.net/wenxy1 > From wen_kernel在163.com Wed Jun 9 11:12:26 2010 From: wen_kernel在163.com (Wenxy) Date: Wed, 9 Jun 2010 11:12:26 +0800 Subject: =?gb2312?B?UmU6IFJlOiBGd2Q6IMjnus7XsNTYxNq6y8Sjv+m1xLf7usWx7Q==?= References: , , , <201006091037050787988@163.com>, Message-ID: <201006091112256877010@163.com> >Hi wen_kernel: > >我是用的serial接口调试。使用kgdboc配置。关键现在感觉是调试不稳定,有时可以链接上,有时连接不上。并且即使连接上,在进入modules中设置的断点后,单步时,又会失去链接,出现: >Ignoring packet error, continuing... >Ignoring packet error, continuing... >Ignoring packet error, continuing... >Malformed response to offset query, timeout >不知道是哪里的原因,之前使用另外一台服务器做位调试主机,suse发行版似乎不出现的。 >现在换了一个主机,使用dedora。不知道是不是主机的问题? >在 2010年6月9日 上午10:37,Wenxy 写道: > >> >---------- 已转发邮件 ---------- >> >发件人: yy Hong >> >日期: 2010年6月9日 上午10:32 >> >主题: Re: 如何装载内核模块的符号表 >> >收件人: Adam Jiang >> > >> > >> >请问你的kgdb是如何搭建的?你是针对什么平台进行调试? >> >我用kgdb调试ppc架构的板子。链接时不时会出现: >> >Ignoring packet error, continuing... >> > >> >Ignoring packet error, continuing... >> > >> >Ignoring packet error, continuing... >> > >> > >> >Malformed response to offset query, timeout >> >有时进到了调试环境,单步时还是会报上边的错,不能继续进行调试。现在特别郁闷 >> > >> >在 2010年6月8日 下午7:39,Adam Jiang 写道: >> > >> >Hello, >> >> >> >> 使用gdb做remote调试时,如何装载内核模块的符号表? >> >> 在我的环境中调试scsi_mod模块时,发生如下错误, >> >> >> >> .... >> >> (gdb) disassemble scsi_get_command >> >> No symbol table is loaded. Use the "file" command. >> >> >> >> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, >> >> 但是错误依旧存在。 >> >> >> >> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 >> >> 符号可以正常的disas。 >> >> >> >> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 >> >> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 >> >> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 >> >> 包含了符号和符号的位置。 >> >> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? >> >> >> >> 谢谢。 >> >> >> >> -- >> >> Adam Jiang >> >> ----------------------------------- >> >> e-mail:jiang.adam在gmail.com < >> e-mail%3Ajiang.adam在gmail.com > >> >> http://www.adamjiang.com >> >> ----------------------------------- >> >> _______________________________________________ >> >> Linux 内核开发中文邮件列表 >> >> Linux-kernel在zh-kernel.org >> >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> >> Linux 内核开发中文社区: http://zh-kernel.org >> >> >> >_______________________________________________ >> >Linux 内核开发中文邮件列表 >> >Linux-kernel在zh-kernel.org >> >http://zh-kernel.org/mailman/listinfo/linux-kernel >> >Linux 内核开发中文社区: http://zh-kernel.org >> >> Hi, yy Hong >> 要排除网络故障! >> >> Best regards. >> Wenxy. >> 2010-06-09,10:36:39 >> Email: wen_kernel在163.com >> Blog: http://blog.csdn.net/wenxy1 >> Hi, yy Hong 这种现象,只能用排除法来做! Best regards. Wenxy. 2010-06-09,11:12:04 Email: wen_kernel在163.com Blog: http://blog.csdn.net/wenxy1 From yaanhyy在gmail.com Wed Jun 9 11:26:44 2010 From: yaanhyy在gmail.com (yy Hong) Date: Wed, 9 Jun 2010 11:26:44 +0800 Subject: =?GB2312?B?UmU6IFJlOiBGd2Q6IMjnus7XsNTYxNq6y8Sjv+m1xLf7usWx7Q==?= In-Reply-To: <201006091112256877010@163.com> References: <201006091037050787988@163.com> <201006091112256877010@163.com> Message-ID: ok,有机会我再试试。 在 2010年6月9日 上午11:12,Wenxy 写道: > >Hi wen_kernel: > > > > >我是用的serial接口调试。使用kgdboc配置。关键现在感觉是调试不稳定,有时可以链接上,有时连接不上。并且即使连接上,在进入modules中设置的断点后,单步时,又会失去链接,出现: > >Ignoring packet error, continuing... > >Ignoring packet error, continuing... > >Ignoring packet error, continuing... > >Malformed response to offset query, timeout > >不知道是哪里的原因,之前使用另外一台服务器做位调试主机,suse发行版似乎不出现的。 > >现在换了一个主机,使用dedora。不知道是不是主机的问题? > >在 2010年6月9日 上午10:37,Wenxy 写道: > > > >> >---------- 已转发邮件 ---------- > >> >发件人: yy Hong > >> >日期: 2010年6月9日 上午10:32 > >> >主题: Re: 如何装载内核模块的符号表 > >> >收件人: Adam Jiang > >> > > >> > > >> >请问你的kgdb是如何搭建的?你是针对什么平台进行调试? > >> >我用kgdb调试ppc架构的板子。链接时不时会出现: > >> >Ignoring packet error, continuing... > >> > > >> >Ignoring packet error, continuing... > >> > > >> >Ignoring packet error, continuing... > >> > > >> > > >> >Malformed response to offset query, timeout > >> >有时进到了调试环境,单步时还是会报上边的错,不能继续进行调试。现在特别郁闷 > >> > > >> >在 2010年6月8日 下午7:39,Adam Jiang 写道: > >> > > >> >Hello, > >> >> > >> >> 使用gdb做remote调试时,如何装载内核模块的符号表? > >> >> 在我的环境中调试scsi_mod模块时,发生如下错误, > >> >> > >> >> .... > >> >> (gdb) disassemble scsi_get_command > >> >> No symbol table is loaded. Use the "file" command. > >> >> > >> >> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, > >> >> 但是错误依旧存在。 > >> >> > >> >> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 > >> >> 符号可以正常的disas。 > >> >> > >> >> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 > >> >> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 > >> >> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 > >> >> 包含了符号和符号的位置。 > >> >> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? > >> >> > >> >> 谢谢。 > >> >> > >> >> -- > >> >> Adam Jiang > >> >> ----------------------------------- > >> >> e-mail:jiang.adam在gmail.com < > e-mail%3Ajiang.adam在gmail.com > < > >> e-mail%3Ajiang.adam在gmail.com < > e-mail%253Ajiang.adam在gmail.com >> > >> >> http://www.adamjiang.com > >> >> ----------------------------------- > >> >> _______________________________________________ > >> >> Linux 内核开发中文邮件列表 > >> >> Linux-kernel在zh-kernel.org > >> >> http://zh-kernel.org/mailman/listinfo/linux-kernel > >> >> Linux 内核开发中文社区: http://zh-kernel.org > >> >> > >> >_______________________________________________ > >> >Linux 内核开发中文邮件列表 > >> >Linux-kernel在zh-kernel.org > >> >http://zh-kernel.org/mailman/listinfo/linux-kernel > >> >Linux 内核开发中文社区: http://zh-kernel.org > >> > >> Hi, yy Hong > >> 要排除网络故障! > >> > >> Best regards. > >> Wenxy. > >> 2010-06-09,10:36:39 > >> Email: wen_kernel在163.com > >> Blog: http://blog.csdn.net/wenxy1 > >> > > Hi, yy Hong > 这种现象,只能用排除法来做! > > Best regards. > Wenxy. > 2010-06-09,11:12:04 > Email: wen_kernel在163.com > Blog: http://blog.csdn.net/wenxy1 > From chengtao.linux在gmail.com Wed Jun 9 12:07:04 2010 From: chengtao.linux在gmail.com (chengtao) Date: Wed, 9 Jun 2010 12:07:04 +0800 Subject: =?GB2312?B?yOe6ztDeuMTKudPDu6fU2mFuZHJvaWQgz8LTtdPQcm9vdMioz94=?= Message-ID: HI: 我想在android的文件系统中运行一些第三方的C的应用程序,可总是遇到权限问题,文件系统没有读写执行权限,pipe有能创建 ,我看了一下android的init和init.rc超变态,和以往用的都不一样。 怎样修改可以生成一个img使用户有root权限? 另外 sdcard是在那里被 mount上的。 From xiyou.wangcong在gmail.com Wed Jun 9 12:32:23 2010 From: xiyou.wangcong在gmail.com (=?utf-8?Q?Am=C3=A9rico?= Wang) Date: Wed, 9 Jun 2010 12:32:23 +0800 Subject: =?utf-8?B?5a6PI2RlZmluZSBjcHVfcnEoY3B1?= =?utf-8?B?KeWmguS9leS9v+eUqCDmsYLmlZHvvIHvvIHvvIE=?= In-Reply-To: References: <20100608095710.GD7110@cr0.nay.redhat.com> Message-ID: <20100609043223.GC5457@cr0.nay.redhat.com> On Tue, Jun 08, 2010 at 07:33:09PM +0800, 刘周平 wrote: >在 2010年6月8日 下午5:57,Américo Wang 写道: > >> On Tue, Jun 08, 2010 at 05:40:35PM +0800, 刘周平 wrote: >> >大家好,下午在linux-2.6.33上做一个系统调用,要用到cpu的运行队列rq。 >> >内核中有这要一段宏: >> >#define cpu_rq(cpu) (&per_cpu(runqueues, (cpu))) >> >#define task_rq(p) cpu_rq(task_cpu(p)) >> >可以通过cpu_rq找到cpu对应的rq >> > >> >可是我在写一个测试文件后编译时出现这样的错误:(头文件应该都有的) >> >kernel/test_get_rq.c:33: error: ‘per_cpu__runqueues’ undeclared (first use >> >in this function) >> >> >> per_cpu__runqueues在kernel/sched.c中定义,是static的。 >> >我在sched.c中没找到,他是通过宏拼接的,还是在sched.c文件中直接定义的? % grep runqueues -n kernel/sched.c From jiang.adam在gmail.com Wed Jun 9 12:32:00 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 9 Jun 2010 13:32:00 +0900 Subject: =?GB2312?B?UmU6IMjnus7XsNTYxNq6y8Sjv+m1xLf7usWx7Q==?= In-Reply-To: <4C0EEAB1.9030806@gmail.com> References: <4C0EEAB1.9030806@gmail.com> Message-ID: 2010/6/9 Li Yu : > 于 2010年06月08日 19:39, Adam Jiang 写道: >> Hello, >> >> 使用gdb做remote调试时,如何装载内核模块的符号表? >> 在我的环境中调试scsi_mod模块时,发生如下错误, >> >> .... >> (gdb) disassemble scsi_get_command >> No symbol table is loaded. Use the "file" command. >> >> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, >> 但是错误依旧存在。 >> >> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 >> 符号可以正常的disas。 >> >> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 >> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 >> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 >> 包含了符号和符号的位置。 >> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? >> > > 如果我记得没错,可以这样: > > gdb> add-symbol-file scsi_mod.ko VADDR > > VADDR可以通过grep scsi_mod.ko /proc/modules获得。 > Hi, Li Yu. 非常感谢你的回复! 我刚才在实际调试环境中试验了一下,这个方法似乎时对的,唯一有一点点小小的问题就是 lsmod | grep scsi_mod 得到的是这样一个值: / # lsmod | grep scsi scsi_mod 84000 4 sg,libata,usb_storage,sd_mod, Live 0xc017e000 最后一列给出的地址是相对于现在KERNEL的虚拟地址的OFFSET,所以,在gdb中指定这个 地址并不能正确的dump出来符号的内容。需要计算一下实际的虚拟地址才行。我遇到了这样 一个错误: (gdb) disassemble scsi_get_command Dump of assembler code for function scsi_get_command: 0xc017edb8 : Cannot access memory at address 0xc017edb8 这个虚拟地址应该怎样计算? /大头阿当 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From xiyou.wangcong在gmail.com Wed Jun 9 12:42:10 2010 From: xiyou.wangcong在gmail.com (=?utf-8?Q?Am=C3=A9rico?= Wang) Date: Wed, 9 Jun 2010 12:42:10 +0800 Subject: =?utf-8?B?5aaC5L2V6KOF6L295YaF5qC45qih?= =?utf-8?B?5Z2X55qE56ym5Y+36KGo?= In-Reply-To: References: <4C0EEAB1.9030806@gmail.com> Message-ID: <20100609044210.GD5457@cr0.nay.redhat.com> On Wed, Jun 09, 2010 at 01:32:00PM +0900, Adam Jiang wrote: >2010/6/9 Li Yu : >> 于 2010年06月08日 19:39, Adam Jiang 写道: >>> Hello, >>> >>> 使用gdb做remote调试时,如何装载内核模块的符号表? >>> 在我的环境中调试scsi_mod模块时,发生如下错误, >>> >>> .... >>> (gdb) disassemble scsi_get_command >>> No symbol table is loaded. Use the "file" command. >>> >>> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, >>> 但是错误依旧存在。 >>> >>> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 >>> 符号可以正常的disas。 >>> >>> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 >>> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 >>> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 >>> 包含了符号和符号的位置。 >>> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? >>> >> >> 如果我记得没错,可以这样: >> >> gdb> add-symbol-file scsi_mod.ko VADDR >> >> VADDR可以通过grep scsi_mod.ko /proc/modules获得。 >> > >Hi, Li Yu. > >非常感谢你的回复! > >我刚才在实际调试环境中试验了一下,这个方法似乎时对的,唯一有一点点小小的问题就是 >lsmod | grep scsi_mod 得到的是这样一个值: > >/ # lsmod | grep scsi >scsi_mod 84000 4 sg,libata,usb_storage,sd_mod, Live 0xc017e000 > >最后一列给出的地址是相对于现在KERNEL的虚拟地址的OFFSET,所以,在gdb中指定这个 >地址并不能正确的dump出来符号的内容。需要计算一下实际的虚拟地址才行。我遇到了这样 >一个错误: > >(gdb) disassemble scsi_get_command >Dump of assembler code for function scsi_get_command: >0xc017edb8 : Cannot access memory at >address 0xc017edb8 > >这个虚拟地址应该怎样计算? > 试试 /sys/module/scsi_mod/sections/.text From jiang.adam在gmail.com Wed Jun 9 12:44:11 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 9 Jun 2010 13:44:11 +0900 Subject: =?GB2312?B?UmU6IMjnus7XsNTYxNq6y8Sjv+m1xLf7usWx7Q==?= In-Reply-To: <20100609044210.GD5457@cr0.nay.redhat.com> References: <4C0EEAB1.9030806@gmail.com> <20100609044210.GD5457@cr0.nay.redhat.com> Message-ID: 2010/6/9 Américo Wang : > On Wed, Jun 09, 2010 at 01:32:00PM +0900, Adam Jiang wrote: >>2010/6/9 Li Yu : >>> 于 2010年06月08日 19:39, Adam Jiang 写道: >>>> Hello, >>>> >>>> 使用gdb做remote调试时,如何装载内核模块的符号表? >>>> 在我的环境中调试scsi_mod模块时,发生如下错误, >>>> >>>> .... >>>> (gdb) disassemble scsi_get_command >>>> No symbol table is loaded. Use the "file" command. >>>> >>>> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, >>>> 但是错误依旧存在。 >>>> >>>> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 >>>> 符号可以正常的disas。 >>>> >>>> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 >>>> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 >>>> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 >>>> 包含了符号和符号的位置。 >>>> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? >>>> >>> >>> 如果我记得没错,可以这样: >>> >>> gdb> add-symbol-file scsi_mod.ko VADDR >>> >>> VADDR可以通过grep scsi_mod.ko /proc/modules获得。 >>> >> >>Hi, Li Yu. >> >>非常感谢你的回复! >> >>我刚才在实际调试环境中试验了一下,这个方法似乎时对的,唯一有一点点小小的问题就是 >>lsmod | grep scsi_mod 得到的是这样一个值: >> >>/ # lsmod | grep scsi >>scsi_mod 84000 4 sg,libata,usb_storage,sd_mod, Live 0xc017e000 >> >>最后一列给出的地址是相对于现在KERNEL的虚拟地址的OFFSET,所以,在gdb中指定这个 >>地址并不能正确的dump出来符号的内容。需要计算一下实际的虚拟地址才行。我遇到了这样 >>一个错误: >> >>(gdb) disassemble scsi_get_command >>Dump of assembler code for function scsi_get_command: >>0xc017edb8 : Cannot access memory at >>address 0xc017edb8 >> >>这个虚拟地址应该怎样计算? >> > > 试试 /sys/module/scsi_mod/sections/.text > 谢谢 Wang. cat /sys/module/scsi_mod/sections/.text 得到的数值和lsmod最后一列一致,看上去时一个offset。 disas还是不成功。 /大头阿当 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From jiang.adam在gmail.com Wed Jun 9 13:02:21 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 9 Jun 2010 14:02:21 +0900 Subject: =?GB2312?B?UmU6IMjnus7XsNTYxNq6y8Sjv+m1xLf7usWx7Q==?= In-Reply-To: <4C0EEAB1.9030806@gmail.com> References: <4C0EEAB1.9030806@gmail.com> Message-ID: 2010/6/9 Li Yu : > 于 2010年06月08日 19:39, Adam Jiang 写道: >> Hello, >> >> 使用gdb做remote调试时,如何装载内核模块的符号表? >> 在我的环境中调试scsi_mod模块时,发生如下错误, >> >> .... >> (gdb) disassemble scsi_get_command >> No symbol table is loaded. Use the "file" command. >> >> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, >> 但是错误依旧存在。 >> >> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 >> 符号可以正常的disas。 >> >> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 >> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 >> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 >> 包含了符号和符号的位置。 >> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? >> > > 如果我记得没错,可以这样: > > gdb> add-symbol-file scsi_mod.ko VADDR > > VADDR可以通过grep scsi_mod.ko /proc/modules获得。 > OK,我找到方法了。 gdb vmlinux ...... add-symbol-file /lib/modules/.../scsi_mod.ko 0xc017e000 -s .data 0xc0191c60 -s .bss 0xc0192600 ...... disas scsi_get_command 其中,必须把.text,.data,.bss等各段的具体位置告诉gdb才行,这些地址都可以采用Americo Wang教的方法 cat /proc/modules/scsi_mod/.text 等得到的。 问题解决,谢谢各位。 /大头阿当 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From yaanhyy在gmail.com Wed Jun 9 13:06:12 2010 From: yaanhyy在gmail.com (yy Hong) Date: Wed, 9 Jun 2010 13:06:12 +0800 Subject: =?GB2312?B?UmU6IMjnus7XsNTYxNq6y8Sjv+m1xLf7usWx7Q==?= In-Reply-To: References: <4C0EEAB1.9030806@gmail.com> Message-ID: Adam: 你是在什么平台上调试?x86?mips?arm?power? 在 2010年6月9日 下午1:02,Adam Jiang 写道: > 2010/6/9 Li Yu : > > 于 2010年06月08日 19:39, Adam Jiang 写道: > >> Hello, > >> > >> 使用gdb做remote调试时,如何装载内核模块的符号表? > >> 在我的环境中调试scsi_mod模块时,发生如下错误, > >> > >> .... > >> (gdb) disassemble scsi_get_command > >> No symbol table is loaded. Use the "file" command. > >> > >> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, > >> 但是错误依旧存在。 > >> > >> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 > >> 符号可以正常的disas。 > >> > >> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 > >> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 > >> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 > >> 包含了符号和符号的位置。 > >> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? > >> > > > > 如果我记得没错,可以这样: > > > > gdb> add-symbol-file scsi_mod.ko VADDR > > > > VADDR可以通过grep scsi_mod.ko /proc/modules获得。 > > > > OK,我找到方法了。 > > gdb vmlinux > ...... > add-symbol-file /lib/modules/.../scsi_mod.ko 0xc017e000 -s .data > 0xc0191c60 -s .bss 0xc0192600 > ...... > > disas scsi_get_command > > 其中,必须把.text,.data,.bss等各段的具体位置告诉gdb才行,这些地址都可以采用Americo Wang教的方法 > cat /proc/modules/scsi_mod/.text 等得到的。 > > 问题解决,谢谢各位。 > > /大头阿当 > > > -- > Adam Jiang > ----------------------------------- > e-mail:jiang.adam在gmail.com > http://www.adamjiang.com > ----------------------------------- > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > From jiang.adam在gmail.com Wed Jun 9 13:20:04 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 9 Jun 2010 14:20:04 +0900 Subject: =?GB2312?B?UmU6IMjnus7XsNTYxNq6y8Sjv+m1xLf7usWx7Q==?= In-Reply-To: References: <4C0EEAB1.9030806@gmail.com> Message-ID: 2010/6/9 yy Hong : > Adam: > 你是在什么平台上调试?x86?mips?arm?power? Hi, Hong 我在mips上做调试的。用serial接续。 /Adam > > 在 2010年6月9日 下午1:02,Adam Jiang 写道: >> >> 2010/6/9 Li Yu : >> > 于 2010年06月08日 19:39, Adam Jiang 写道: >> >> Hello, >> >> >> >> 使用gdb做remote调试时,如何装载内核模块的符号表? >> >> 在我的环境中调试scsi_mod模块时,发生如下错误, >> >> >> >> .... >> >> (gdb) disassemble scsi_get_command >> >> No symbol table is loaded. Use the "file" command. >> >> >> >> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, >> >> 但是错误依旧存在。 >> >> >> >> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 >> >> 符号可以正常的disas。 >> >> >> >> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 >> >> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 >> >> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 >> >> 包含了符号和符号的位置。 >> >> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? >> >> >> > >> > 如果我记得没错,可以这样: >> > >> > gdb> add-symbol-file scsi_mod.ko VADDR >> > >> > VADDR可以通过grep scsi_mod.ko /proc/modules获得。 >> > >> >> OK,我找到方法了。 >> >> gdb vmlinux >> ...... >> add-symbol-file /lib/modules/.../scsi_mod.ko 0xc017e000 -s .data >> 0xc0191c60 -s .bss 0xc0192600 >> ...... >> >> disas scsi_get_command >> >> 其中,必须把.text,.data,.bss等各段的具体位置告诉gdb才行,这些地址都可以采用Americo Wang教的方法 >> cat /proc/modules/scsi_mod/.text 等得到的。 >> >> 问题解决,谢谢各位。 >> >> /大头阿当 >> >> >> -- >> Adam Jiang >> ----------------------------------- >> e-mail:jiang.adam在gmail.com >> http://www.adamjiang.com >> ----------------------------------- >> _______________________________________________ >> Linux 内核开发中文邮件列表 >> Linux-kernel在zh-kernel.org >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> Linux 内核开发中文社区: http://zh-kernel.org > -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From jiang.adam在gmail.com Wed Jun 9 14:01:36 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 9 Jun 2010 15:01:36 +0900 Subject: =?GB2312?B?UmU6IMjnus7XsNTYxNq6y8Sjv+m1xLf7usWx7Q==?= In-Reply-To: References: <4C0EEAB1.9030806@gmail.com> Message-ID: 2010/6/9 Adam Jiang : > 2010/6/9 Li Yu : >> 于 2010年06月08日 19:39, Adam Jiang 写道: >>> Hello, >>> >>> 使用gdb做remote调试时,如何装载内核模块的符号表? >>> 在我的环境中调试scsi_mod模块时,发生如下错误, >>> >>> .... >>> (gdb) disassemble scsi_get_command >>> No symbol table is loaded. Use the "file" command. >>> >>> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, >>> 但是错误依旧存在。 >>> >>> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 >>> 符号可以正常的disas。 >>> >>> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 >>> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 >>> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 >>> 包含了符号和符号的位置。 >>> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? >>> >> >> 如果我记得没错,可以这样: >> >> gdb> add-symbol-file scsi_mod.ko VADDR >> >> VADDR可以通过grep scsi_mod.ko /proc/modules获得。 >> > > OK,我找到方法了。 > > gdb vmlinux > ...... > add-symbol-file /lib/modules/.../scsi_mod.ko 0xc017e000 -s .data > 0xc0191c60 -s .bss 0xc0192600 > ...... > > disas scsi_get_command > > 其中,必须把.text,.data,.bss等各段的具体位置告诉gdb才行,这些地址都可以采用Americo Wang教的方法 > cat /proc/modules/scsi_mod/.text 等得到的。 > 将elf的每个段的地址逐一加入gdb挺烦人,所以,我写了一个脚本做这个事。 它可以输出一个命令字串,拷贝粘贴到gdb命令行,或者重定向到文件, 然后source这个文件都可以。贴到这里跟大家分享一下。 _________________________________________ #!/bin/sh # file: disas_helper.sh # author: jiang.adam在gmail.com # revision: 2010-06-09 if [ $# != 2 ]; then echo "$0 objfile modname" exit 1 fi if [ ! -f $1 ]; then echo "cannot find objfile '$1'" exit 1 fi if [ ! -d /sys/module/$2/sections ]; then echo "cannot find module sections '$2'" exit 1 fi modname=$2 add_sect() { addr=`cat /sys/module/$modname/sections/$1` if [ $1 == ".text" ]; then echo "$addr" else echo "-s $1 $addr" fi } add_all_sect() { for i in `ls -a /sys/module/$modname/sections/.[abcdefghijklmnopqrstuvwxyz]*`; do if [ `basename $i` != ".text" ]; then add_sect `basename $i`; fi done; } echo "add-symbol-file $1" `add_sect .text` `add_all_the_other_sect` _________________________________________ /大头阿当 -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From wjp在oppo.com Wed Jun 9 14:03:03 2010 From: wjp在oppo.com (wjp) Date: Wed, 9 Jun 2010 14:03:03 +0800 Subject: =?utf-8?B?UmU6IOWmguS9leS/ruaUueS9v+eUqOaIt+WcqGFuZHJvaWQg5LiL5oul5pyJcg==?= =?utf-8?B?b2905p2D6ZmQ?= References: Message-ID: <007701cb0799$6c273290$8c7210ac@LocalHost> flash和sdcard 是在vold里面mount和unmount的,底层驱动通过socket发消息给vold,在vold里面执行mount,然后再发消息给上层。 ----- Original Message ----- From: "chengtao" To: Sent: Wednesday, June 09, 2010 12:07 PM Subject: 如何修改使用户在android 下拥有root权限 > HI: > 我想在android的文件系统中运行一些第三方的C的应用程序,可总是遇到权限问题,文件系统没有读写执行权限,pipe有能创建 > ,我看了一下android的init和init.rc超变态,和以往用的都不一样。 > 怎样修改可以生成一个img使用户有root权限? > 另外 sdcard是在那里被 mount上的。 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From eclair4android在gmail.com Wed Jun 9 14:46:03 2010 From: eclair4android在gmail.com (=?utf-8?B?ZWNsYWlyNGFuZHJvaWQ=?=) Date: Wed, 9 Jun 2010 14:46:03 +0800 Subject: =?utf-8?B?6K+35pWZaTJjX21hc3Rlcl9zZW5k5Ye66ZSZ55qE6Zeu6aKY?= References: Message-ID: <201006091446014217109@gmail.com> hi,大家好! 我调用i2c_master_send传送两个字节到设备上,用如下代码: buf[0] = addr; buf[1] = data; ret = i2c_master_send(client, buf, 2); ret返回值有时为-111,有时为-6... 请问应该怎么排错? From killbug2004在gmail.com Wed Jun 9 16:53:57 2010 From: killbug2004在gmail.com (=?GB2312?B?t+W72MK316o=?=) Date: Wed, 9 Jun 2010 16:53:57 +0800 Subject: =?GB2312?B?UmU6IMjnus7Q3rjEyrnTw7un1NphbmRyb2lkIM/C07XT0HJvb3TIqA==?= =?GB2312?B?z94=?= In-Reply-To: <007701cb0799$6c273290$8c7210ac@LocalHost> References: <007701cb0799$6c273290$8c7210ac@LocalHost> Message-ID: vold里面的volmgr_vfat.c rc = mount(devpath, vol->mount_point, "vfat", flags, "utf8,uid=1000,gid=1015,fmask=702,dmask=702,shortname=mixed"); 这里的fmask和dmask是权限掩码,我也碰到过权限问题,现在我把权限都打开,fmask和dmask都设置为0 这样应该不安去,但是没找到别的方法 在 2010年6月9日 下午2:03,wjp 写道: > flash和sdcard > 是在vold里面mount和unmount的,底层驱动通过socket发消息给vold,在vold里面执行mount,然后再发消息给上层。 > ----- Original Message ----- > From: "chengtao" > To: > Sent: Wednesday, June 09, 2010 12:07 PM > Subject: 如何修改使用户在android 下拥有root权限 > > > > HI: > > 我想在android的文件系统中运行一些第三方的C的应用程序,可总是遇到权限问题,文件系统没有读写执行权限,pipe有能创建 > > ,我看了一下android的init和init.rc超变态,和以往用的都不一样。 > > 怎样修改可以生成一个img使用户有root权限? > > 另外 sdcard是在那里被 mount上的。 > > _______________________________________________ > > Linux 内核开发中文邮件列表 > > Linux-kernel在zh-kernel.org > > http://zh-kernel.org/mailman/listinfo/linux-kernel > > Linux 内核开发中文社区: http://zh-kernel.org > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > From killbug2004在gmail.com Wed Jun 9 17:12:05 2010 From: killbug2004在gmail.com (=?GB2312?B?t+W72MK316o=?=) Date: Wed, 9 Jun 2010 17:12:05 +0800 Subject: =?GB2312?B?UmU6IMfrvcyy4srUx7bI68q9bGludXggxNq6y7/Jv7/Q1LXEt70=?= =?GB2312?B?t6g=?= In-Reply-To: References: Message-ID: 自己试过很多次,手动修改过config.h,编译出来的还是有问题,能否介绍一下在android下编译的步骤方法 另外发现bionic中的c库是和toolchain不同,有些方面有限制 在 2010年6月7日 下午11:58,Alvin 写道: > $LTP/kernel > 里面的程序大部分都能编译,把你的toolchain设定对,如source一些环境变量比如CROSS_COMPILE等等就行了,或者直接修改下$LTP/Makefile, > > 2010/6/7 峰回路转 > > 谁能介绍一下LTP移植到arm下的经验 弄了很久都没有成功 新手见谅...... >> >> 在 2010年6月7日 上午9:37,Alvin 写道: >> >>> Run LTP first,但我觉得芯片引入的bug大部分会是芯片driver的问题,而不是kernel本身 >>> >>> >>> 2010/6/7 t c >>> >>> > HI: >>> > 各位早上好。 >>> > 请教各位是如何验证linux内核的可靠性的? >>> > >>> > >>> linux移植到新的芯片上会引入许多bug,直接影响到整个项目的可靠性,靠上层应用程序员报bug这样的效率太低,请问各位有没有更好的方法来验证kernel的可靠性,如比像LTP这样的工具,或者别的什么方法。 >>> > >>> > >>> > >>> > 多谢多谢 >>> > _______________________________________________ >>> > Linux 内核开发中文邮件列表 >>> > Linux-kernel在zh-kernel.org >>> > http://zh-kernel.org/mailman/listinfo/linux-kernel >>> > Linux 内核开发中文社区: http://zh-kernel.org >>> >>> >>> >>> >>> -- >>> >>> ~Alvin >>> _______________________________________________ >>> Linux 内核开发中文邮件列表 >>> Linux-kernel在zh-kernel.org >>> http://zh-kernel.org/mailman/listinfo/linux-kernel >>> Linux 内核开发中文社区: http://zh-kernel.org >>> >> >> > > > -- > > ~Alvin > From jiang.adam在gmail.com Wed Jun 9 17:17:28 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 9 Jun 2010 18:17:28 +0900 Subject: =?GB2312?B?UmU6IMfrvcyy4srUx7bI68q9bGludXggxNq6y7/Jv7/Q1LXEt70=?= =?GB2312?B?t6g=?= In-Reply-To: References: Message-ID: 2010/6/9 峰回路转 : > 自己试过很多次,手动修改过config.h,编译出来的还是有问题,能否介绍一下在android下编译的步骤方法 > 另外发现bionic中的c库是和toolchain不同,有些方面有限制 bionic是从bsd上面port过来的,其中还做了很多很多优化和裁剪, 比如ipc机制中没有完全支持semaphore等等,基本上已经不能和 GNU/Linux系统相提并论,bionic是完全不同的东西。 如果要将LTP移植到android,估计会有很大的难度。 /大头阿当 > > 在 2010年6月7日 下午11:58,Alvin 写道: > >> $LTP/kernel >> 里面的程序大部分都能编译,把你的toolchain设定对,如source一些环境变量比如CROSS_COMPILE等等就行了,或者直接修改下$LTP/Makefile, >> >> 2010/6/7 峰回路转 >> >> 谁能介绍一下LTP移植到arm下的经验 弄了很久都没有成功 新手见谅...... >>> >>> 在 2010年6月7日 上午9:37,Alvin 写道: >>> >>>> Run LTP first,但我觉得芯片引入的bug大部分会是芯片driver的问题,而不是kernel本身 >>>> >>>> >>>> 2010/6/7 t c >>>> >>>> > HI: >>>> > 各位早上好。 >>>> > 请教各位是如何验证linux内核的可靠性的? >>>> > >>>> > >>>> linux移植到新的芯片上会引入许多bug,直接影响到整个项目的可靠性,靠上层应用程序员报bug这样的效率太低,请问各位有没有更好的方法来验证kernel的可靠性,如比像LTP这样的工具,或者别的什么方法。 >>>> > >>>> > >>>> > >>>> > 多谢多谢 >>>> > _______________________________________________ >>>> > Linux 内核开发中文邮件列表 >>>> > Linux-kernel在zh-kernel.org >>>> > http://zh-kernel.org/mailman/listinfo/linux-kernel >>>> > Linux 内核开发中文社区: http://zh-kernel.org >>>> >>>> >>>> >>>> >>>> -- >>>> >>>> ~Alvin >>>> _______________________________________________ >>>> Linux 内核开发中文邮件列表 >>>> Linux-kernel在zh-kernel.org >>>> http://zh-kernel.org/mailman/listinfo/linux-kernel >>>> Linux 内核开发中文社区: http://zh-kernel.org >>>> >>> >>> >> >> >> -- >> >> ~Alvin >> > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From qzhang.g在gmail.com Wed Jun 9 18:15:46 2010 From: qzhang.g在gmail.com (Alvin) Date: Wed, 9 Jun 2010 18:15:46 +0800 Subject: =?UTF-8?B?UmU6IOivt+aVmea1i+ivleW1jOWFpeW8j2xpbnV4IOWGheaguOWPr+mdoOaAp+eahOaWuQ==?= =?UTF-8?B?5rOV?= In-Reply-To: References: Message-ID: 移到android?没经验,不是太了解,感觉在android界面上对原生C支持太……,搞得比较难 2010/6/9 峰回路转 > 自己试过很多次,手动修改过config.h,编译出来的还是有问题,能否介绍一下在android下编译的步骤方法 > 另外发现bionic中的c库是和toolchain不同,有些方面有限制 > > 在 2010年6月7日 下午11:58,Alvin 写道: > > $LTP/kernel >> 里面的程序大部分都能编译,把你的toolchain设定对,如source一些环境变量比如CROSS_COMPILE等等就行了,或者直接修改下$LTP/Makefile, >> >> 2010/6/7 峰回路转 >> >> 谁能介绍一下LTP移植到arm下的经验 弄了很久都没有成功 新手见谅...... >>> >>> 在 2010年6月7日 上午9:37,Alvin 写道: >>> >>>> Run LTP first,但我觉得芯片引入的bug大部分会是芯片driver的问题,而不是kernel本身 >>>> >>>> >>>> 2010/6/7 t c >>>> >>>> > HI: >>>> > 各位早上好。 >>>> > 请教各位是如何验证linux内核的可靠性的? >>>> > >>>> > >>>> linux移植到新的芯片上会引入许多bug,直接影响到整个项目的可靠性,靠上层应用程序员报bug这样的效率太低,请问各位有没有更好的方法来验证kernel的可靠性,如比像LTP这样的工具,或者别的什么方法。 >>>> > >>>> > >>>> > >>>> > 多谢多谢 >>>> > _______________________________________________ >>>> > Linux 内核开发中文邮件列表 >>>> > Linux-kernel在zh-kernel.org >>>> > http://zh-kernel.org/mailman/listinfo/linux-kernel >>>> > Linux 内核开发中文社区: http://zh-kernel.org >>>> >>>> >>>> >>>> >>>> -- >>>> >>>> ~Alvin >>>> _______________________________________________ >>>> Linux 内核开发中文邮件列表 >>>> Linux-kernel在zh-kernel.org >>>> http://zh-kernel.org/mailman/listinfo/linux-kernel >>>> Linux 内核开发中文社区: http://zh-kernel.org >>>> >>> >>> >> >> >> -- >> >> ~Alvin >> > > -- ~Alvin From jiang.adam在gmail.com Wed Jun 9 20:32:05 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 9 Jun 2010 21:32:05 +0900 Subject: =?GB2312?B?UmU6IEZ3ZDogyOe6ztew1NjE2rrLxKO/6bXEt/u6xbHt?= In-Reply-To: References: <201006091037050787988@163.com> Message-ID: 2010/6/9 yy Hong : > Hi wen_kernel: > > 我是用的serial接口调试。使用kgdboc配置。关键现在感觉是调试不稳定,有时可以链接上,有时连接不上。并且即使连接上,在进入modules中设置的断点后,单步时,又会失去链接,出现: > Ignoring packet error, continuing... > Ignoring packet error, continuing... > Ignoring packet error, continuing... > Malformed response to offset query, timeout > 不知道是哪里的原因,之前使用另外一台服务器做位调试主机,suse发行版似乎不出现的。 > 现在换了一个主机,使用dedora。不知道是不是主机的问题? 这个错误应该与开发主机无关,而仅仅是串口设置的问题,最常见的就是target和host上面的速度不一致, 你试试用下面的命令调整一下串口的速度,然后重启gdb再试验 $ sudo stty ispeed 115200 ospeed 115200 < /dev/ttyUSB0 我这里用的是115200。你看看代码,然后在试验以下别的速度。 希望这个有帮助。 /大头阿当 > 在 2010年6月9日 上午10:37,Wenxy 写道: > >> >---------- 已转发邮件 ---------- >> >发件人: yy Hong >> >日期: 2010年6月9日 上午10:32 >> >主题: Re: 如何装载内核模块的符号表 >> >收件人: Adam Jiang >> > >> > >> >请问你的kgdb是如何搭建的?你是针对什么平台进行调试? >> >我用kgdb调试ppc架构的板子。链接时不时会出现: >> >Ignoring packet error, continuing... >> > >> >Ignoring packet error, continuing... >> > >> >Ignoring packet error, continuing... >> > >> > >> >Malformed response to offset query, timeout >> >有时进到了调试环境,单步时还是会报上边的错,不能继续进行调试。现在特别郁闷 >> > >> >在 2010年6月8日 下午7:39,Adam Jiang 写道: >> > >> >Hello, >> >> >> >> 使用gdb做remote调试时,如何装载内核模块的符号表? >> >> 在我的环境中调试scsi_mod模块时,发生如下错误, >> >> >> >> .... >> >> (gdb) disassemble scsi_get_command >> >> No symbol table is loaded. Use the "file" command. >> >> >> >> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, >> >> 但是错误依旧存在。 >> >> >> >> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 >> >> 符号可以正常的disas。 >> >> >> >> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 >> >> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 >> >> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 >> >> 包含了符号和符号的位置。 >> >> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? >> >> >> >> 谢谢。 >> >> >> >> -- >> >> Adam Jiang >> >> ----------------------------------- >> >> e-mail:jiang.adam在gmail.com < >> e-mail%3Ajiang.adam在gmail.com > >> >> http://www.adamjiang.com >> >> ----------------------------------- >> >> _______________________________________________ >> >> Linux 内核开发中文邮件列表 >> >> Linux-kernel在zh-kernel.org >> >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> >> Linux 内核开发中文社区: http://zh-kernel.org >> >> >> >_______________________________________________ >> >Linux 内核开发中文邮件列表 >> >Linux-kernel在zh-kernel.org >> >http://zh-kernel.org/mailman/listinfo/linux-kernel >> >Linux 内核开发中文社区: http://zh-kernel.org >> >> Hi, yy Hong >> 要排除网络故障! >> >> Best regards. >> Wenxy. >> 2010-06-09,10:36:39 >> Email: wen_kernel在163.com >> Blog: http://blog.csdn.net/wenxy1 >> > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From jiang.adam在gmail.com Wed Jun 9 20:45:19 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Wed, 9 Jun 2010 21:45:19 +0900 Subject: =?GB2312?B?UmU6IEZ3ZDogyOe6ztew1NjE2rrLxKO/6bXEt/u6xbHt?= In-Reply-To: References: <201006091037050787988@163.com> Message-ID: 2010/6/9 yy Hong : > Hi wen_kernel: > > 我是用的serial接口调试。使用kgdboc配置。关键现在感觉是调试不稳定,有时可以链接上,有时连接不上。并且即使连接上,在进入modules中设置的断点后,单步时,又会失去链接,出现: > Ignoring packet error, continuing... > Ignoring packet error, continuing... > Ignoring packet error, continuing... > Malformed response to offset query, timeout > 不知道是哪里的原因,之前使用另外一台服务器做位调试主机,suse发行版似乎不出现的。 > 现在换了一个主机,使用dedora。不知道是不是主机的问题? > 在 2010年6月9日 上午10:37,Wenxy 写道: > >> >---------- 已转发邮件 ---------- >> >发件人: yy Hong >> >日期: 2010年6月9日 上午10:32 >> >主题: Re: 如何装载内核模块的符号表 >> >收件人: Adam Jiang >> > >> > >> >请问你的kgdb是如何搭建的?你是针对什么平台进行调试? >> >我用kgdb调试ppc架构的板子。链接时不时会出现: >> >Ignoring packet error, continuing... >> > >> >Ignoring packet error, continuing... >> > >> >Ignoring packet error, continuing... >> > >> > >> >Malformed response to offset query, timeout >> >有时进到了调试环境,单步时还是会报上边的错,不能继续进行调试。现在特别郁闷 刚才google了一下这个问题,看来还有其他可能引起错误,其中一个就是gdb的remote debug协议在target和host两端不匹配引起的。简而言之,就是gdb版本造成的错误。 你可以使用下面的命令确认究竟是不是版本错误引起的,比如 gdb vmlinux ...... (gdb) set debug remote 1 (gdb) target remote /dev/ttyUSB0 这样你可以看到通讯状况,输出结果如下 `/home/rcwf64/workspace/Bug5968/kernel/stblinux-2.6.18/vmlinux' has changed; re-reading symbols. Remote debugging using /dev/ttyUSB0 Sending packet: $qSupported#37...Ack Packet received: qSupported Packet qSupported (supported-packets) is supported ...... 或者 gdb vmlinux ...... (gdb) set debug serial 1 (gdb) target remote /dev/ttyUSB0 都可以看到具体的通讯状况。 /大头阿当 >> > >> >在 2010年6月8日 下午7:39,Adam Jiang 写道: >> > >> >Hello, >> >> >> >> 使用gdb做remote调试时,如何装载内核模块的符号表? >> >> 在我的环境中调试scsi_mod模块时,发生如下错误, >> >> >> >> .... >> >> (gdb) disassemble scsi_get_command >> >> No symbol table is loaded. Use the "file" command. >> >> >> >> 这个符号在scsi_mod.ko文件之中,我用file命令装载了这个文件, >> >> 但是错误依旧存在。 >> >> >> >> 此外,我使用gdb vmlinux启动remote调试的,被包含在这个文件中的 >> >> 符号可以正常的disas。 >> >> >> >> 因为我使用的image文件并不由我自己控制,而是自动编译的结果,所以 >> >> 我不能给编译过程增加-g选项,这时这个问题似乎变得有点难搞。 >> >> 但是,我可以拿到System.map和Module.symvers文件,这两个文件似乎 >> >> 包含了符号和符号的位置。 >> >> 调试时,应该如何运用这两个文件?大家有没有遇到过此类情况? >> >> >> >> 谢谢。 >> >> >> >> -- >> >> Adam Jiang >> >> ----------------------------------- >> >> e-mail:jiang.adam在gmail.com < >> e-mail%3Ajiang.adam在gmail.com > >> >> http://www.adamjiang.com >> >> ----------------------------------- >> >> _______________________________________________ >> >> Linux 内核开发中文邮件列表 >> >> Linux-kernel在zh-kernel.org >> >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> >> Linux 内核开发中文社区: http://zh-kernel.org >> >> >> >_______________________________________________ >> >Linux 内核开发中文邮件列表 >> >Linux-kernel在zh-kernel.org >> >http://zh-kernel.org/mailman/listinfo/linux-kernel >> >Linux 内核开发中文社区: http://zh-kernel.org >> >> Hi, yy Hong >> 要排除网络故障! >> >> Best regards. >> Wenxy. >> 2010-06-09,10:36:39 >> Email: wen_kernel在163.com >> Blog: http://blog.csdn.net/wenxy1 >> > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From unbutun在sohu.com Wed Jun 9 22:15:23 2010 From: unbutun在sohu.com (=?utf-8?B?R2F2aW4=?=) Date: Wed, 9 Jun 2010 22:15:23 +0800 Subject: =?utf-8?B?UmU6IFJlOiDlpKflrrblpb3vvIzosIHlr7lzbHVi6YeM55qEb3JkZXLnmoTorqHnrpfmr5TovoPmh4LvvIzmjIfngrnkuIDkuIs=?= References: <201006082245047033963@sohu.com>, , Message-ID: <201006092215225157031@sohu.com> 呵呵,你说的可能是slab,我想问的是slub,slab我不是很懂,所以也没法和你说的联系起来。 不过,谢谢你的回复了。 Regards, Gavin 2010-06-09 Happy everyday ! 发件人: Liu Hui 发送时间: 2010-06-09 10:26:45 收件人: Gavin 抄送: linux-kernel 主题: Re: 大家好,谁对slub里的order的计算比较懂,指点一下 Sorry,看错了,把order看成offset了。 在 2010年6月9日 上午9:56,Liu Hui 写道: offset应该跟cache line的大小有关吧。着色区的大小就是color * color_offset, 这样能保证同一对象区不同slab上的obj能在cache中的映射能错开。 在 2010年6月8日 下午10:45,Gavin 写道: Hi, 如题,在研究slub,但是对那个slab_order 和calculate_order没太搞懂是怎么算的? 谁知道,指点指点。 谢谢了 Regards, Gavin 2010-06-08 Happy everyday ! _______________________________________________ Linux 内核开发中文邮件列表 Linux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux 内核开发中文社区: http://zh-kernel.org -- Thanks & Best Regards Liu Hui -- -- Thanks & Best Regards Liu Hui -- From necofang在gmail.com Wed Jun 9 23:24:18 2010 From: necofang在gmail.com (Neco.F) Date: Wed, 9 Jun 2010 23:24:18 +0800 Subject: =?UTF-8?B?UmU6IHJhdyBzb2NrZXTkuIrlpITnkIZpY21w55qE55aR6Zeu?= In-Reply-To: <4BECB048.8090907@nec-as.nec.com.cn> References: <4BECB048.8090907@nec-as.nec.com.cn> Message-ID: 接收到icmp报文后,你需要使用你的request的icmp报文信息对接收到的echo报文进行过滤,从而确定是否是你需要的icmp报文。 在 2010年5月14日 上午10:07,wanglh 写道: > 我的应用程序创建了一个raw socket处理icmp, > 流程很简单: > socket_create((PF_INET,SOCK_RAW,IPPROTO_ICMP,sock);) > send echo_request > recv echo_reply > > 在2台机器网络正常的情况下,server1的应用程序只会收到来自server2的 > echo_reply, > 哪怕我从server3不停的ping server1,也不会收到echo request。 > 感觉是os不会把echo request提交给应用程序。 > > 但是当我把server2断了,然后从server3上ping server1, > server1的应用程序就会接受到我ping的那个echo request, > 以及其他很多怪异的icmp包,比如源目标ip都是server1的,等等 > > 请问为什么会出现这种情况。 > > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From yanglei.fage在gmail.com Wed Jun 9 23:28:30 2010 From: yanglei.fage在gmail.com (lei yang) Date: Wed, 9 Jun 2010 23:28:30 +0800 Subject: =?GB2312?B?0ruw47Suv9q2vNans9ZETUHDtA==?= Message-ID: 一般的串口都支持DMA么,要是支持的话怎么打开DMA呢 From zhang.zhilong在gmail.com Thu Jun 10 10:13:16 2010 From: zhang.zhilong在gmail.com (Zhilong zhang) Date: Thu, 10 Jun 2010 10:13:16 +0800 Subject: =?GB2312?B?vavJ6LG41/azybTy06HJqMPozajQxcj91ta5psTco6zQ6A==?= =?GB2312?B?0qq9q8f9tq/X9rPJY29tcG9zaXRlIGRldmljZSCjrLWrysfT9rW9zsrM4g==?= Message-ID: 将设备做成打印扫描通信三种功能,需要将驱动做成composite device ,但是遇到问题,只能配置两种接口。给第三种接口的端口进行配置时就会出错。 内核启动时提示: prnscncomm init prnscncomm bind autoconfig printer. autoconfig channel. chl_in_ep autoconfig channel. chl_out_ep autoconfig scanner. g_prnscn: can't autoconfigure on at91_udc 不知道是什么原因? 谢谢。 接口定义: static struct usb_interface_descriptor printer_intf_desc = { .bLength = sizeof printer_intf_desc, .bDescriptorType = USB_DT_INTERFACE, //.bInterfaceNumber = PRINTER_INTERFACE, .bNumEndpoints = 2, .bInterfaceClass = USB_CLASS_PRINTER, .bInterfaceSubClass = 1, /* Printer Sub-Class */ .bInterfaceProtocol = 2, /* Bi-Directional */ //.iInterface = 0 }; static struct usb_endpoint_descriptor fs_prn_ep_in_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_BULK, }; static struct usb_endpoint_descriptor fs_prn_ep_out_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_OUT, .bmAttributes = USB_ENDPOINT_XFER_BULK, }; static struct usb_interface_descriptor scanner_intf_desc = { .bLength = sizeof scanner_intf_desc, .bDescriptorType = USB_DT_INTERFACE, .bInterfaceNumber = SCANNER_INTERFACE, .bNumEndpoints = 3, .bInterfaceClass = USB_CLASS_VENDOR_SPEC, .bInterfaceSubClass = 0, /* Printer Sub-Class */ .bInterfaceProtocol = 0xff, /* Ventor */ //.iInterface = 4 }; static struct usb_endpoint_descriptor fs_scan_ep_in_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_BULK, }; static struct usb_endpoint_descriptor fs_scan_ep_out_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_OUT, .bmAttributes = USB_ENDPOINT_XFER_BULK, }; static struct usb_endpoint_descriptor fs_scan_ep_int_in_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = __constant_cpu_to_le16(1), .bInterval = 0x10, }; static struct usb_interface_descriptor channel_intf_desc = { .bLength = sizeof channel_intf_desc, .bDescriptorType = USB_DT_INTERFACE, .bInterfaceNumber = PRINTER_INTERFACE, .bNumEndpoints = 2, .bInterfaceClass = USB_CLASS_VENDOR_SPEC,//USB_CLASS_PRINTER,20080522 //.bInterfaceSubClass = 1, /* Printer Sub-Class */ //.bInterfaceProtocol = 2, /* Bi-Directional */ .iInterface = 0 }; static struct usb_endpoint_descriptor fs_channel_ep_in_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_BULK }; static struct usb_endpoint_descriptor fs_channel_ep_out_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_OUT, .bmAttributes = USB_ENDPOINT_XFER_BULK }; 下面是捆绑函数 static int __init prnscncomm_bind(struct usb_composite_dev *cdev) { int gcnum; struct usb_gadget *gadget = cdev->gadget; int id; size_t len; int status; //u32 i; //struct usb_request *req; printk(KERN_ERR "prnscncomm bind\n"); /* FIXME -- this is device-wide stuff, not config-wide */ /* allocate string descriptor numbers */ id = usb_composite_string_id(cdev); if (id < 0) return id; strings[STRING_MANUFACTURER_IDX].id = id; device_desc.iManufacturer = id; id = usb_composite_string_id(cdev); if (id < 0) return id; strings[STRING_PRODUCT_IDX].id = id; device_desc.iProduct = id; id = usb_composite_string_id(cdev); if (id < 0) return id; strings[STRING_SERIAL_IDX].id = id; device_desc.iSerialNumber = id; /* * config-wide stuff: */ cdev->bmAttributes = USB_CONFIG_ATT_SELFPOWER; cdev->bMaxPower = 1; /* 2 mA, minimal */ if (idVendor) { if (!idProduct) { dev_err (&gadget->dev, "idVendor needs idProduct!\n"); return -ENODEV; } device_desc.idVendor = cpu_to_le16(idVendor); device_desc.idProduct = cpu_to_le16(idProduct); if (bcdDevice) device_desc.bcdDevice = cpu_to_le16(bcdDevice); } if (iManufacturer) strlcpy (manufacturer, iManufacturer, sizeof manufacturer); if (iProduct) strlcpy (product_desc, iProduct, sizeof product_desc); if (iSerialNum) strlcpy (serial_num, iSerialNum, sizeof serial_num); if (iPNPstring) { strlcpy (&pnp_string[2], iPNPstring, (sizeof pnp_string)-2); } len = strlen (pnp_string); pnp_string[0] = (len >> 8) & 0xFF; pnp_string[1] = len & 0xFF; usb_gadget_class = class_create(THIS_MODULE, "usb_gadget"); if (IS_ERR(usb_gadget_class)) { status = PTR_ERR(usb_gadget_class); ERROR (dev, "unable to create usb_gadget class %d\n", status); return status; } status = alloc_chrdev_region (&g_print_devno, 0, 1, "USB printer gadget"); if (status) { ERROR (dev, "alloc_chrdev_region %d\n", status); class_destroy(usb_gadget_class); return status; } status = alloc_chrdev_region (&g_scan_devno, 0, 1, "USB scanner gadget"); if (status) { ERROR (dev, "alloc_chrdev_region %d\n", status); device_destroy(usb_gadget_class, g_print_devno); class_destroy(usb_gadget_class); return status; } status = alloc_chrdev_region (&g_channel_devno, 0, 1, "USB channel gadget"); if (status) { ERROR (dev, "alloc_chrdev_region %d\n", status); device_destroy(usb_gadget_class, g_channel_devno); // ?? class_destroy(usb_gadget_class); return status; } /* Bulk-only drivers like this one SHOULD be able to * autoconfigure on any sane usb controller driver, * but there may also be important quirks to address. * * In this case we don't do much per-function setup since it's * all done here ... we do *NOT* intend to ever combine this * "vendor-specific" driver with a class driver. */ usb_ep_autoconfig_reset (gadget); printk (KERN_INFO "autoconfig printer.\n"); prn_in_ep = usb_ep_autoconfig(gadget, &fs_prn_ep_in_desc); if (!prn_in_ep) { autoconf_fail: printk (KERN_ERR "%s: can't autoconfigure on %s\n", shortname, gadget->name); return -ENODEV; } prn_in_ep->driver_data = cdev; /* claim */ prn_out_ep = usb_ep_autoconfig(gadget, &fs_prn_ep_out_desc); if (!prn_out_ep) goto autoconf_fail; /* autoconf is done; from now on we'll use the "it's allocated" * flag as "it's activated" */ prn_out_ep->driver_data = cdev; printk (KERN_INFO "autoconfig channel. chl_in_ep\n"); chl_in_ep = usb_ep_autoconfig(gadget, &fs_channel_ep_in_desc); if (!chl_in_ep) { goto autoconf_fail; } chl_in_ep->driver_data = cdev; printk (KERN_INFO "autoconfig channel. chl_out_ep\n"); chl_out_ep = usb_ep_autoconfig(gadget, &fs_channel_ep_out_desc); if(!chl_out_ep) goto autoconf_fail; chl_out_ep->driver_data = cdev; // 第三种设备功能 #if 1 printk (KERN_INFO "autoconfig scanner.\n"); scn_in_ep = usb_ep_autoconfig(gadget, &fs_scan_ep_in_desc); if (!scn_in_ep) goto autoconf_fail; /* autoconf is done; from now on we'll use the "it's allocated" * flag as "it's activated" */ scn_in_ep->driver_data = cdev; scn_out_ep = usb_ep_autoconfig(gadget, &fs_scan_ep_out_desc); if (!scn_out_ep) goto autoconf_fail; /* autoconf is done; from now on we'll use the "it's allocated" * flag as "it's activated" */ scn_out_ep->driver_data = cdev; scn_int_ep = usb_ep_autoconfig(gadget, &fs_scan_ep_int_in_desc); if (!scn_int_ep) goto autoconf_fail; /* autoconf is done; from now on we'll use the "it's allocated" * flag as "it's activated" */ scn_int_ep->driver_data = cdev; #endif ...... } -- Zhang Zhilong From zwyyao在gmail.com Thu Jun 10 14:23:13 2010 From: zwyyao在gmail.com (=?GB2312?B?0qrSqg==?=) Date: Thu, 10 Jun 2010 14:23:13 +0800 Subject: =?GB2312?B?Y29uc29sZSDSyc7K?= Message-ID: 大家好,我在学习linux的控制台架构(不知道这样说合适不合适,我是一个新手),有个疑问,希望大家指点一下。 请问"console_cmdline[]" "register_console()" 和 "add_preferred_console()"是什么关系呀。 我知道console_cmdline在start_kernel()-》parse_args-》unknown_bootoption-》obsolete_checksetup()会把命令行传进来的“console=”添加到console_comdline[]数组中的。 我问的有点乱,主要是linux是如何来分析参数的,怎么有的要调用parse_early_param(),有的要调用unknown_bootoption()。 谢谢大家了。 From chengtao.linux在gmail.com Thu Jun 10 15:03:17 2010 From: chengtao.linux在gmail.com (chengtao) Date: Thu, 10 Jun 2010 15:03:17 +0800 Subject: =?GB2312?B?UmU6IGNvbnNvbGUg0snOyg==?= In-Reply-To: References: Message-ID: 你说的是解析bootload的启动命行吗,这个主要是为了向后兼容。 在 2010年6月10日 下午2:23,要要 写道: > 大家好,我在学习linux的控制台架构(不知道这样说合适不合适,我是一个新手),有个疑问,希望大家指点一下。 > 请问"console_cmdline[]" "register_console()" 和 > "add_preferred_console()"是什么关系呀。 > > 我知道console_cmdline在start_kernel()-》parse_args-》unknown_bootoption-》obsolete_checksetup()会把命令行传进来的"console="添加到console_comdline[]数组中的。 > > 我问的有点乱,主要是linux是如何来分析参数的,怎么有的要调用parse_early_param(),有的要调用unknown_bootoption()。 > > 谢谢大家了。 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From zhang.zhilong在gmail.com Thu Jun 10 16:06:01 2010 From: zhang.zhilong在gmail.com (Zhilong zhang) Date: Thu, 10 Jun 2010 16:06:01 +0800 Subject: =?GB2312?B?UmU6IL2ryeixuNf2s8m08tOhyajD6M2o0MXI/dbWuabE3KOs?= =?GB2312?B?0OjSqr2rx/22r9f2s8ljb21wb3NpdGUgZGV2aWNlIKOstavKx9P2tb3Oyszi?= In-Reply-To: References: Message-ID: 在 2010年6月10日 上午10:13,Zhilong zhang 写道: > 将设备做成打印扫描通信三种功能,需要将驱动做成composite device > ,但是遇到问题,只能配置两种接口。给第三种接口的端口进行配置时就会出错。 > > 内核启动时提示: > prnscncomm init > prnscncomm bind > autoconfig printer. > autoconfig channel. chl_in_ep > autoconfig channel. chl_out_ep > autoconfig scanner. > g_prnscn: can't autoconfigure on at91_udc > 不知道是什么原因? > 谢谢。 > > 接口定义: > static struct usb_interface_descriptor printer_intf_desc = { > .bLength = sizeof printer_intf_desc, > .bDescriptorType = USB_DT_INTERFACE, > //.bInterfaceNumber = PRINTER_INTERFACE, > .bNumEndpoints = 2, > .bInterfaceClass = USB_CLASS_PRINTER, > .bInterfaceSubClass = 1, /* Printer Sub-Class */ > .bInterfaceProtocol = 2, /* Bi-Directional */ > //.iInterface = 0 > }; > static struct usb_endpoint_descriptor fs_prn_ep_in_desc = { > .bLength = USB_DT_ENDPOINT_SIZE, > .bDescriptorType = USB_DT_ENDPOINT, > .bEndpointAddress = USB_DIR_IN, > .bmAttributes = USB_ENDPOINT_XFER_BULK, > }; > static struct usb_endpoint_descriptor fs_prn_ep_out_desc = { > .bLength = USB_DT_ENDPOINT_SIZE, > .bDescriptorType = USB_DT_ENDPOINT, > .bEndpointAddress = USB_DIR_OUT, > .bmAttributes = USB_ENDPOINT_XFER_BULK, > }; > static struct usb_interface_descriptor scanner_intf_desc = { > .bLength = sizeof scanner_intf_desc, > .bDescriptorType = USB_DT_INTERFACE, > .bInterfaceNumber = SCANNER_INTERFACE, > .bNumEndpoints = 3, > .bInterfaceClass = USB_CLASS_VENDOR_SPEC, > .bInterfaceSubClass = 0, /* Printer Sub-Class */ > .bInterfaceProtocol = 0xff, /* Ventor */ > //.iInterface = 4 > }; > static struct usb_endpoint_descriptor fs_scan_ep_in_desc = { > .bLength = USB_DT_ENDPOINT_SIZE, > .bDescriptorType = USB_DT_ENDPOINT, > .bEndpointAddress = USB_DIR_IN, > .bmAttributes = USB_ENDPOINT_XFER_BULK, > }; > static struct usb_endpoint_descriptor fs_scan_ep_out_desc = { > .bLength = USB_DT_ENDPOINT_SIZE, > .bDescriptorType = USB_DT_ENDPOINT, > .bEndpointAddress = USB_DIR_OUT, > .bmAttributes = USB_ENDPOINT_XFER_BULK, > }; > static struct usb_endpoint_descriptor fs_scan_ep_int_in_desc = { > .bLength = USB_DT_ENDPOINT_SIZE, > .bDescriptorType = USB_DT_ENDPOINT, > .bEndpointAddress = USB_DIR_IN, > .bmAttributes = USB_ENDPOINT_XFER_INT, > .wMaxPacketSize = __constant_cpu_to_le16(1), > .bInterval = 0x10, > }; > static struct usb_interface_descriptor channel_intf_desc = { > .bLength = sizeof channel_intf_desc, > .bDescriptorType = USB_DT_INTERFACE, > .bInterfaceNumber = PRINTER_INTERFACE, > .bNumEndpoints = 2, > .bInterfaceClass = USB_CLASS_VENDOR_SPEC,//USB_CLASS_PRINTER,20080522 > //.bInterfaceSubClass = 1, /* Printer Sub-Class */ > //.bInterfaceProtocol = 2, /* Bi-Directional */ > .iInterface = 0 > }; > static struct usb_endpoint_descriptor fs_channel_ep_in_desc = { > .bLength = USB_DT_ENDPOINT_SIZE, > .bDescriptorType = USB_DT_ENDPOINT, > .bEndpointAddress = USB_DIR_IN, > .bmAttributes = USB_ENDPOINT_XFER_BULK > }; > static struct usb_endpoint_descriptor fs_channel_ep_out_desc = { > .bLength = USB_DT_ENDPOINT_SIZE, > .bDescriptorType = USB_DT_ENDPOINT, > .bEndpointAddress = USB_DIR_OUT, > .bmAttributes = USB_ENDPOINT_XFER_BULK > }; > > 下面是捆绑函数 > > static int __init prnscncomm_bind(struct usb_composite_dev *cdev) > { > int gcnum; > struct usb_gadget *gadget = cdev->gadget; > int id; > size_t len; > int status; > //u32 i; > //struct usb_request *req; > > > printk(KERN_ERR "prnscncomm bind\n"); > /* FIXME -- this is device-wide stuff, not config-wide */ > > /* allocate string descriptor numbers */ > id = usb_composite_string_id(cdev); > if (id < 0) > return id; > strings[STRING_MANUFACTURER_IDX].id = id; > device_desc.iManufacturer = id; > > id = usb_composite_string_id(cdev); > if (id < 0) > return id; > strings[STRING_PRODUCT_IDX].id = id; > device_desc.iProduct = id; > > id = usb_composite_string_id(cdev); > if (id < 0) > return id; > strings[STRING_SERIAL_IDX].id = id; > device_desc.iSerialNumber = id; > > /* > * config-wide stuff: > */ > cdev->bmAttributes = USB_CONFIG_ATT_SELFPOWER; > cdev->bMaxPower = 1; /* 2 mA, minimal */ > > if (idVendor) { > if (!idProduct) { > dev_err (&gadget->dev, "idVendor needs idProduct!\n"); > return -ENODEV; > } > device_desc.idVendor = cpu_to_le16(idVendor); > device_desc.idProduct = cpu_to_le16(idProduct); > if (bcdDevice) > device_desc.bcdDevice = cpu_to_le16(bcdDevice); > } > if (iManufacturer) > strlcpy (manufacturer, iManufacturer, sizeof manufacturer); > if (iProduct) > strlcpy (product_desc, iProduct, sizeof product_desc); > if (iSerialNum) > strlcpy (serial_num, iSerialNum, sizeof serial_num); > if (iPNPstring) { > strlcpy (&pnp_string[2], iPNPstring, (sizeof pnp_string)-2); > } > > len = strlen (pnp_string); > pnp_string[0] = (len >> 8) & 0xFF; > pnp_string[1] = len & 0xFF; > > usb_gadget_class = class_create(THIS_MODULE, "usb_gadget"); > if (IS_ERR(usb_gadget_class)) { > status = PTR_ERR(usb_gadget_class); > ERROR (dev, "unable to create usb_gadget class %d\n", status); > return status; > } > > status = alloc_chrdev_region (&g_print_devno, 0, 1, > "USB printer gadget"); > if (status) { > ERROR (dev, "alloc_chrdev_region %d\n", status); > class_destroy(usb_gadget_class); > return status; > } > > status = alloc_chrdev_region (&g_scan_devno, 0, 1, > "USB scanner gadget"); > if (status) { > ERROR (dev, "alloc_chrdev_region %d\n", status); > device_destroy(usb_gadget_class, g_print_devno); > class_destroy(usb_gadget_class); > return status; > } > > status = alloc_chrdev_region (&g_channel_devno, 0, 1, > "USB channel gadget"); > if (status) { > ERROR (dev, "alloc_chrdev_region %d\n", status); > device_destroy(usb_gadget_class, g_channel_devno); // ?? > class_destroy(usb_gadget_class); > return status; > } > > /* Bulk-only drivers like this one SHOULD be able to > * autoconfigure on any sane usb controller driver, > * but there may also be important quirks to address. > * > * In this case we don't do much per-function setup since it's > * all done here ... we do *NOT* intend to ever combine this > * "vendor-specific" driver with a class driver. > */ > usb_ep_autoconfig_reset (gadget); > > printk (KERN_INFO "autoconfig printer.\n"); > prn_in_ep = usb_ep_autoconfig(gadget, &fs_prn_ep_in_desc); > if (!prn_in_ep) { > autoconf_fail: > printk (KERN_ERR "%s: can't autoconfigure on %s\n", > shortname, gadget->name); > return -ENODEV; > } > > prn_in_ep->driver_data = cdev; /* claim */ > > prn_out_ep = usb_ep_autoconfig(gadget, &fs_prn_ep_out_desc); > if (!prn_out_ep) > goto autoconf_fail; > > /* autoconf is done; from now on we'll use the "it's allocated" > * flag as "it's activated" > */ > prn_out_ep->driver_data = cdev; > > > printk (KERN_INFO "autoconfig channel. chl_in_ep\n"); > chl_in_ep = usb_ep_autoconfig(gadget, &fs_channel_ep_in_desc); > if (!chl_in_ep) { > goto autoconf_fail; > } > chl_in_ep->driver_data = cdev; > > printk (KERN_INFO "autoconfig channel. chl_out_ep\n"); > chl_out_ep = usb_ep_autoconfig(gadget, &fs_channel_ep_out_desc); > if(!chl_out_ep) goto autoconf_fail; > chl_out_ep->driver_data = cdev; > > // 第三种设备功能 > #if 1 > printk (KERN_INFO "autoconfig scanner.\n"); > scn_in_ep = usb_ep_autoconfig(gadget, &fs_scan_ep_in_desc); > if (!scn_in_ep) > goto autoconf_fail; > > /* autoconf is done; from now on we'll use the "it's allocated" > * flag as "it's activated" > */ > scn_in_ep->driver_data = cdev; > > scn_out_ep = usb_ep_autoconfig(gadget, &fs_scan_ep_out_desc); > if (!scn_out_ep) > goto autoconf_fail; > > /* autoconf is done; from now on we'll use the "it's allocated" > * flag as "it's activated" > */ > scn_out_ep->driver_data = cdev; > > scn_int_ep = usb_ep_autoconfig(gadget, &fs_scan_ep_int_in_desc); > if (!scn_int_ep) > goto autoconf_fail; > > /* autoconf is done; from now on we'll use the "it's allocated" > * flag as "it's activated" > */ > scn_int_ep->driver_data = cdev; > #endif > ...... > } > > -- > Zhang Zhilong > 不知道windows是根据什么字段来给组合设备的每个功能分别安装驱动的? -- Zhang Zhilong From chengtao.linux在gmail.com Fri Jun 11 14:11:41 2010 From: chengtao.linux在gmail.com (chengtao) Date: Fri, 11 Jun 2010 14:11:41 +0800 Subject: =?GB2312?B?UmU6IFJlOlJlOl9SZTpSRTpfVETK1rv60L7GrLmry74tX7TzzMbBqtC+?= =?GB2312?B?X1/V0Ma4TElOVVgvQW5kcm9pZL+qt6LIy9Sx?= In-Reply-To: <201006071007013285345@gmail.com> References: <201006071001494064715@gmail.com> <6e297ccb.847f.128f2122ccb.Coremail.figure1802@126.com> <20100531072649.GA16335@rcwf64-moto-x42p> <413bafb9.2ecc.129101b1dfb.Coremail.figure1802@126.com> <4442c841.32f5.1291022ba59.Coremail.figure1802@126.com> <79f8d05b.3501.12910260e0a.Coremail.figure1802@126.com> <201006071007013285345@gmail.com> Message-ID: HI: 请问,你们的arena平台还在继续搞吗,怎么一点消息也没有了。是不是全转android了。 在 2010年6月7日 上午10:07,lzsh0428 写道: > 呵呵,好的,有在北京招聘的话我就投下试试哦 > > > 2010-06-07 > > > > lzsh0428 > > > > 发件人: figo.zhang > 发送时间: 2010-06-07  10:03:42 > 收件人: lzsh0428 > 抄送: LiLARRY; linux-kernel > 主题: Re:Re:_Re:RE:_TD手机芯片公司-_大唐联芯__招聘LINUX/Android开发人员 > > 抱歉,目前只在上海。谢谢 > > > 在2010-06-07 10:01:52,lzsh0428 写道: > >  > 北京招人吗? > > > 2010-06-07 > > > > lzsh0428 > > > > 发件人: figo.zhang > 发送时间: 2010-06-07  10:00:28 > 收件人: LiLARRY > 抄送: linux-kernel > 主题: Re:RE:_TD手机芯片公司-_大唐联芯__招聘LINUX/Android开发人员 > yes,  现在是在漕河径,离9号线漕河径地铁站很近。 > 在2010-06-07 09:53:55,LiLARRY 写道: > How about Location in shanghai? Caohejing? > > >> Date: Mon, 7 Jun 2010 09:51:39 +0800 >> From: figure1802在126.com >> To: figure1802在126.com >> Subject: Re:TD手机芯片公司- 大唐联芯 招聘LINUX/Android开发人员 >> CC: linux-kernel在zh-kernel.org >> >> 我们专注于TD手机芯片的研发,芯片基于ARM处理器。我们部门是一个富有朝气的团队,专注于LINUX/Android底层开发。 >> >> 在我们团队里,可以从一个新的芯片开始做起,从u-boot到kernel,再到andriod的middleware。如果你想对linux kernel和linux driver有深入研究或者很感兴趣,请发简历给我们; 如果你对android手机开发感兴趣,请加入我们; >> >> 团队成员工作气氛积极向上,不少人在linux内核社区也是活跃分子,为内核开发做贡献。如果你在寻找一个工作环境好而且能得到锻炼和发展的平 台,别犹豫,请加入我们! >> >> 请发简历到:figo1802在gmail.com >> >> >> 在2010-06-01 13:53:17,"figo.zhang" 写道: >> TD手机芯片公司,大唐联芯 诚邀linux/android开发人员,负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 机会难得阿。 >> 联系:figo1802在gmail.com或者zhangtianfei在leadcoretech.com >> 公司网址:www.leadcoretech.com >> 工作地点: 上海 >> 工作性质: 全职 >> >> 工作目的和性质: >> >> 负责全新芯片上面Android,Linux移植、驱动开发以及相关问题的定位解决。 >> >> 主要职责: >> >> 1. 熟悉相关芯片文档,结合具体情况,分析Android移植需要实现的功能和要求。 >> >> 2. Android BSP包移植,实现UART,LCD, USB,FLASH等驱动。 >> >> 3. 相关移植文档编写, 指导客户进行二次开发。 >> >> 4. 完成相关工作详细设计以及测试规范。 >> >> >> >> 所需资历: >> >> 1. 学历/所受培训:电子技术相关专业本科以上学历; >> >> 2. 3年以上Linux开发经验; >> >> 3. 有过在芯片裸板上面进行从零开始的Linux(Android)移植工作经验更佳。 >> >> 4. 熟悉驱动开发流程, 有过重要驱动(UART, LCD, USB, FLASH等)的开发调试经验; >> >> 5. 熟悉ARM体系; >> >> 6. 熟悉下载工具开发流程,并有手机终端上面NOR & NAND下载开发经验者更佳。 >> >> 7. 熟练使用各种硬件简单仪器仪表; >> >> 8. 具备分析、定位和解决常见软硬件问题的能力,有一定的疑难问题分析能力,能够构建完整的测试流程追查问题的根源,寻求解决方案; >> >> 9. 其它要求:学习能力强;有很强的理解分析能力,富于创新;良好的英语读、写能力;具有团队合作精神,敬业精神和良好的沟通能力。 >> >> >> >> >> >> >> >> 网易为中小企业免费提供企业邮箱(自主域名) >> _______________________________________________ >> Linux 内核开发中文邮件列表 >> Linux-kernel在zh-kernel.org >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> Linux 内核开发中文社区: http://zh-kernel.org > 使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载! > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > > > > > 网易为中小企业免费提供企业邮箱(自主域名) > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From easebone在gmail.com Fri Jun 11 14:19:38 2010 From: easebone在gmail.com (Luke) Date: Fri, 11 Jun 2010 14:19:38 +0800 Subject: =?GB2312?B?VS1Cb290us1LZXJuZWzT0LnYTkFORLXETVREt9bH+LXE0MXPotLUxMQ=?= =?GB2312?B?uPbOqte8?= Message-ID: 正在用友善之臂的2440开发板作开发,有关MTD分区的问题,不是很清楚。 有关NAND的分区信息,看起来有两个来源,一个来自于U-Boot,另一个来自于smdk设备初始化时在内核源码写死。 来源:U-Boot 在U-Boot中,用户能够设置U-Boot环境变量mtdparts,用来规定NAND的分区。如: mtdids=nand0=nandflash0 mtdparts=mtdparts=nandflash0:2m在0(kernel),8m(jffs2),-(yaffs) partition=nand0,0 U-Boot应该是将这些环境变量作为参数传给Kernel(?),Kernel应该能够对这些参数进行处理,如在内核代码drivers/mtd/cmdlinepart.c中,能够对环境变量所设置的分区信息进行处理。 来源:内核源码 在mtd的nand驱动代码drivers/mtd/nand/s3c2410.c中,对于nand的platform_driver,其probe函数s3c24xx_nand_probe()最终能够对nand进行分区,其中的分区信息来自于arch/arm/plat-s3c24xx/common-smdk.c中定义的smdk_default_nand_part[],因为NAND的默认分区在smdk_mach_init()时就作为该machine的nand初始化就确定了。 那么,实际中的分区到底用哪个? -- Regards, Luke From kjbmail在gmail.com Fri Jun 11 14:29:50 2010 From: kjbmail在gmail.com (Jianbin Kang) Date: Fri, 11 Jun 2010 14:29:50 +0800 Subject: =?GB2312?B?UmU6IFUtQm9vdLrNS2VybmVs09C52E5BTkS1xE1URLfWx/i1xNDFz6I=?= =?GB2312?B?0tTExLj2zqrXvA==?= In-Reply-To: References: Message-ID: 在 2010年6月11日 下午2:19,Luke 写道: > 正在用友善之臂的2440开发板作开发,有关MTD分区的问题,不是很清楚。 > 有关NAND的分区信息,看起来有两个来源,一个来自于U-Boot,另一个来自于smdk设备初始化时在内核源码写死。 > 来源:U-Boot > 在U-Boot中,用户能够设置U-Boot环境变量mtdparts,用来规定NAND的分区。如: > mtdids=nand0=nandflash0 > mtdparts=mtdparts=nandflash0:2m在0(kernel),8m(jffs2),-(yaffs) > partition=nand0,0 > U-Boot应该是将这些环境变量作为参数传给Kernel(?),Kernel应该能够对这些参数进行处理,如在内核代码drivers/mtd/cmdlinepart.c中,能够对环境变量所设置的分区信息进行处理。 > > 来源:内核源码 > 在mtd的nand驱动代码drivers/mtd/nand/s3c2410.c中,对于nand的platform_driver,其probe函数s3c24xx_nand_probe()最终能够对nand进行分区,其中的分区信息来自于arch/arm/plat-s3c24xx/common-smdk.c中定义的smdk_default_nand_part[],因为NAND的默认分区在smdk_mach_init()时就作为该machine的nand初始化就确定了。 > > 那么,实际中的分区到底用哪个? > 我在mini2440上测试是,如果选中了命令行支持,u-boot的参数会覆盖内核定义的 From been2100在163.com Fri Jun 11 18:37:34 2010 From: been2100在163.com (=?gbk?B?uLbR4LHz?=) Date: Fri, 11 Jun 2010 18:37:34 +0800 (CST) Subject: =?gbk?Q?=CA=B9=D3=C3=CE=CA=CC=E2?= Message-ID: <150458b.7f60.12926960c2a.Coremail.been2100@163.com> 使用了头文件就会出现如下编译错误: In file included from test.c:4 error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘in_port_t’ /usr/include/netinet/in.h:93: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘in_port_t’ /usr/include/netinet/in.h:137: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘in_addr_t’ /usr/include/netinet/in.h:140: error: expected specifier-qualifier-list before ‘in_addr_t’ /usr/include/netinet/in.h:198: error: expected specifier-qualifier-list before ‘uint8_t’ /usr/include/netinet/in.h:224: error: expected specifier-qualifier-list before ‘in_port_t’ /usr/include/netinet/in.h:238: error: expected specifier-qualifier-list before ‘in_port_t’ In file included from test.c:4: /usr/include/netinet/in.h:361: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ntohl’ /usr/include/netinet/in.h:362: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ntohs’ /usr/include/netinet/in.h:364: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘htonl’ /usr/include/netinet/in.h:366: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘htons’ From been2100在163.com Fri Jun 11 19:35:02 2010 From: been2100在163.com (=?utf-8?B?5LuY54eV5paM?=) Date: Fri, 11 Jun 2010 19:35:02 +0800 (CST) Subject: =?utf-8?Q?Re:=E4=BD=BF=E7=94=A8=E9=97=AE=E9=A2=98?= In-Reply-To: <150458b.7f60.12926960c2a.Coremail.been2100@163.com> References: <150458b.7f60.12926960c2a.Coremail.been2100@163.com> Message-ID: <79668053.da25.12926caa9dd.Coremail.been2100@163.com> 搞定了原来是 libc6-dev的问题

在2010-06-11 18:37:34,"付燕斌" 写道: >使用了头文件就会出现如下编译错误: >In file included from test.c:4 >error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘in_port_t’ >/usr/include/netinet/in.h:93: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘in_port_t’ >/usr/include/netinet/in.h:137: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘in_addr_t’ >/usr/include/netinet/in.h:140: error: expected specifier-qualifier-list before ‘in_addr_t’ >/usr/include/netinet/in.h:198: error: expected specifier-qualifier-list before ‘uint8_t’ >/usr/include/netinet/in.h:224: error: expected specifier-qualifier-list before ‘in_port_t’ >/usr/include/netinet/in.h:238: error: expected specifier-qualifier-list before ‘in_port_t’ >In file included from test.c:4: >/usr/include/netinet/in.h:361: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ntohl’ >/usr/include/netinet/in.h:362: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ntohs’ >/usr/include/netinet/in.h:364: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘htonl’ >/usr/include/netinet/in.h:366: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘htons’ >_______________________________________________ >Linux 内核开发中文邮件列表 >Linux-kernel在zh-kernel.org >http://zh-kernel.org/mailman/listinfo/linux-kernel >Linux 内核开发中文社区: http://zh-kernel.org From zwyyao在gmail.com Sat Jun 12 09:54:51 2010 From: zwyyao在gmail.com (=?GB2312?B?0qrSqg==?=) Date: Sat, 12 Jun 2010 09:54:51 +0800 Subject: register_console Message-ID: HI,大家好,register_console这个函数很奇怪,从函数代码看,不是每次注册一个struct console 都能成功,比如:如果命令行没有“console=A”这样的形式, 并且在其他地方未调用add_preferred_console时,console_cmdline[] 数组就为空。那么只有第一次调用register_console的console才会被添加到console_drivers这个链表中的,之后的注册都不会成功,除非在register_console函数外指定flag | CON_ENABLED。 大家说这是为什么呢? From qzhang.g在gmail.com Sat Jun 12 18:30:48 2010 From: qzhang.g在gmail.com (Alvin) Date: Sat, 12 Jun 2010 18:30:48 +0800 Subject: =?UTF-8?B?6K+35pWZ5LiA5Liqc3RydWN0IGlub2RlX29wZXJhdGlvbnPph4zpnaLnmoTlh73mlbA=?= =?UTF-8?B?5oyH6ZKIcGVybWlzc2lvbuWmguS9leS9v+eUqA==?= Message-ID: 我看的是2.6.31代码,include/linux/fs.h中, struct inode_operations { ... int (*permission) (struct inode *, int); ... } permission指针的第二个参数是怎么用的?或者告诉我在哪里可以找到用法 原来的kernel是这么用,op是进程访问该device node时是r, w, 还是x操作。 /* * This function decides whether to allow an operation * (return zero) or not allow it (return a non-zero * which indicates why it is not allowed). * * The operation can be one of the following values: * 0 - Execute (run the "file" - meaningless in our case) * 2 - Write (input to the kernel module) * 4 - Read (output from the kernel module) * * This is the real function that checks file * permissions. The permissions returned by ls -l are * for referece only, and can be overridden here. */ static int module_permission(struct inode *inode, int op) { /* * We allow everybody to read from our module, but * only root (uid 0) may write to it */ if (op == 4 || (op == 2 && current->euid == 0)) return 0; /* * If it's anything else, access is denied */ return -EACCES; } 但在2.6.31里面失效了,每次都是返回-EACCES -- ~Alvin From yanglei.fage在gmail.com Sat Jun 12 21:23:00 2010 From: yanglei.fage在gmail.com (lei yang) Date: Sat, 12 Jun 2010 21:23:00 +0800 Subject: =?GB2312?B?1PXDtNaqtcDSu7j2dXNiyeixuLXEyrnTwyDKx7fx1OyzycHL?= =?GB2312?B?xNq05tC5wrY=?= Message-ID: 如题 From yanglei.fage在gmail.com Sat Jun 12 22:34:14 2010 From: yanglei.fage在gmail.com (lei yang) Date: Sat, 12 Jun 2010 22:34:14 +0800 Subject: =?GB2312?B?z9bU2nVzYrXEx/22r8rHsrvKx7a8ssnTw2J1bGvEo8q9sKGjrA==?= =?GB2312?B?0qrKx7K7ysfT0Mbky/u1xMSjyr3DtA==?= Message-ID: 如题 From joshsystem在gmail.com Sun Jun 13 00:04:07 2010 From: joshsystem在gmail.com (Josh Zhao) Date: Sun, 13 Jun 2010 00:04:07 +0800 Subject: =?GB2312?B?UmU6IM/W1Np1c2K1xMf9tq/Kx7K7yse2vLLJ08NidWxrxKPKvQ==?= =?GB2312?B?sKGjrNKqyseyu8rH09DG5Mv7tcTEo8q9w7Q=?= In-Reply-To: References: Message-ID: 供4种模式,你看看协议。 在 2010年6月12日 下午10:34,lei yang 写道: > 如题 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From hellohello008在163.com Sun Jun 13 08:49:49 2010 From: hellohello008在163.com (hellohello) Date: Sun, 13 Jun 2010 08:49:49 +0800 Subject: =?gb2312?B?Rnc6ILLLxPGjrcfrvcy52NPatK6/2tbVtsvU2rTy06Gz9mxvZ2luOrrzy8A=?= =?gb2312?B?tfS1xM7KzOKho7yxo6E=?= Message-ID: <07f901cb0a92$5434cac0$591dbcc0@sfdomain.com> 2.6.25的内核跑起来了,但切换到应用部分时出了问题, 内核执行到 kernel_execve /sbin/init 后串口打印出 (none) login: 然后串口终端就死掉了。 1)现象1: 我在/etc/rc.d/rcS 文件的末尾加入调试信息: echo "run rc.local start" ##if [ -x /etc/rc.d/rc.local ] ##then ## /etc/rc.d/rc.local $mode ##fi echo "run rc.local end" 显示结果: kernel_execve /sbin/init run rc.local start run rc.local end (none) login: 这里串口终端死掉 2)现象2: 我在/etc/rc.d/rcS 文件的末尾加入调试信息: echo "run rc.local start" echo "run rc.local start" ##if [ -x /etc/rc.d/rc.local ] ##then ## /etc/rc.d/rc.local $mode ##fi echo "run rc.local end" 显示结果: kernel_execve /sbin/init run rc.local start run rc.local start 大约过了4秒,才打印出下面的login (none) login: 这里串口终端死掉 即使将注释部分打开,现象一样,好像与我将调试的echo语句放在哪个地方没有关系,每次就只能打印出2行调试信息,然后就打印出 (none) login: 串口终端死掉。 只不过像现象2中会等4秒左右才出(none) login: 有谁遇到过,帮解释一下吧。 或者指个路,我来细查查。 ---。。。? From lewis_amu在126.com Sun Jun 13 09:35:42 2010 From: lewis_amu在126.com (lewis) Date: Sun, 13 Jun 2010 09:35:42 +0800 Subject: =?gb2312?B?TGludXjJz9PQwODLxk1TRE61xM7EtbXDtKO/?= Message-ID: <201006130935412651552@126.com> 最近写内核驱动,写的都快吐了。 2010-06-13 lewis From lewis_amu在126.com Sun Jun 13 10:33:42 2010 From: lewis_amu在126.com (lewis) Date: Sun, 13 Jun 2010 10:33:42 +0800 Subject: =?gb2312?B?udjT2mxpbnV4xNq6y7qvyv2y6b+0oaM=?= Message-ID: <201006131033422817672@126.com> 可以直接在源码目录里面看到内核提供了那些可以使用的内核函数么? 2010-06-13 lewis From chenlong828在gmail.com Sun Jun 13 10:37:16 2010 From: chenlong828在gmail.com (ChenLong) Date: Sun, 13 Jun 2010 10:37:16 +0800 Subject: =?utf-8?B?562U5aSNOiBMaW51eOS4iuacieexu+S8vE1TRE7nmoTmlofmoaPkuYjvvJ8=?= In-Reply-To: <201006130935412651552@126.com> References: <201006130935412651552@126.com> Message-ID: <001301cb0aa1$61693b90$243bb2b0$@com> 没有,看内核代码吧,函数就哪么写,多写写就熟悉了,具体原因,参考Documention/stable_api_nosense.txt :) -----邮件原件----- 发件人: linux-kernel-bounces在zh-kernel.org [mailto:linux-kernel-bounces在zh-kernel.org] 代表 lewis 发送时间: 2010年6月13日 9:36 收件人: linux-kernel 主题: Linux上有类似MSDN的文档么? 最近写内核驱动,写的都快吐了。 2010-06-13 lewis _______________________________________________ Linux 内核开发中文邮件列表 Linux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux 内核开发中文社区: http://zh-kernel.org From yanglei.fage在gmail.com Mon Jun 14 01:57:10 2010 From: yanglei.fage在gmail.com (lei yang) Date: Mon, 14 Jun 2010 01:57:10 +0800 Subject: =?GB2312?B?1PXDtLLFxNzIw7Dl19O1xLi61NixyL3PtPMgyMPG5LL6yfo=?= =?GB2312?B?vt6088r9xL+1xNbQts/E2A==?= Message-ID: 如题 From jiang.adam在gmail.com Mon Jun 14 10:23:13 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Mon, 14 Jun 2010 11:23:13 +0900 Subject: =?GB2312?B?UmU6IMfrvczSu7j2c3RydWN0IGlub2RlX29wZXJhdGlvbnPA78PmtcS6rw==?= =?GB2312?B?yv3WuNXrcGVybWlzc2lvbsjnus7KudPD?= In-Reply-To: References: Message-ID: 2010/6/12 Alvin : > 我看的是2.6.31代码,include/linux/fs.h中, > struct inode_operations { > ... > int (*permission) (struct inode *, int); > ... > } > > permission指针的第二个参数是怎么用的?或者告诉我在哪里可以找到用法 permission主要是文件系统用来支持Posix ACL(Access control List)的。 > > 原来的kernel是这么用,op是进程访问该device node时是r, w, 还是x操作。 > /* > * This function decides whether to allow an operation > * (return zero) or not allow it (return a non-zero > * which indicates why it is not allowed). > * > * The operation can be one of the following values: > * 0 - Execute (run the "file" - meaningless in our case) > * 2 - Write (input to the kernel module) > * 4 - Read (output from the kernel module) > * > * This is the real function that checks file > * permissions. The permissions returned by ls -l are > * for referece only, and can be overridden here. > */ > static int module_permission(struct inode *inode, int op) > { > /* > * We allow everybody to read from our module, but > * only root (uid 0) may write to it > */ > if (op == 4 || (op == 2 && current->euid == 0)) > return 0; > > /* > * If it's anything else, access is denied > */ > return -EACCES; > } > > 但在2.6.31里面失效了,每次都是返回-EACCES > 没有看明白上面这个函数怎么使用了inode结构体中的permission, 能不能说的再明白点? /大头阿当 > -- > > ~Alvin > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From qujianning在gmail.com Mon Jun 14 12:11:52 2010 From: qujianning在gmail.com (Qu Jianning) Date: Mon, 14 Jun 2010 12:11:52 +0800 Subject: =?GB2312?B?UmU6INT1w7SyxcTcyMOw5dfTtcS4utTYsci9z7TzIMjDxuQ=?= =?GB2312?B?svrJ+r7etPPK/cS/tcTW0LbPxNg=?= In-Reply-To: References: Message-ID: 来一个1ns的定时器? 2010/6/14 lei yang > 如题 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From xiyou.wangcong在gmail.com Tue Jun 15 13:01:40 2010 From: xiyou.wangcong在gmail.com (=?utf-8?Q?Am=C3=A9rico?= Wang) Date: Tue, 15 Jun 2010 13:01:40 +0800 Subject: =?utf-8?B?TGludXjkuIrmnInnsbvkvLxNU0RO?= =?utf-8?B?55qE5paH5qGj5LmI77yf?= In-Reply-To: <201006130935412651552@126.com> References: <201006130935412651552@126.com> Message-ID: <20100615050140.GA5583@cr0.nay.redhat.com> make htmldocs From cellslab在gmail.com Tue Jun 15 14:35:17 2010 From: cellslab在gmail.com (=?GB2312?B?wfXLvMG8?=) Date: Tue, 15 Jun 2010 14:35:17 +0800 Subject: =?GB2312?B?udjT2iBza19idWZmILeiy83K/b7dsPwgyOe6zta4tqjN+L+o?= Message-ID: 如题 内核版本2.6.32 函数 skb_dst_set 是用来指定发包的 dst_entry 的, dst_entry 和网卡的关系是怎样的? 怎样设置才能指定网卡发送 sk_buff? 谢谢 From yanglei.fage在gmail.com Thu Jun 17 00:04:30 2010 From: yanglei.fage在gmail.com (lei yang) Date: Thu, 17 Jun 2010 00:04:30 +0800 Subject: =?GB2312?B?1PXDtLj4zfi/qDFHILXEdHJhZmZpYyDE2A==?= Message-ID: 如题 From hellohello008在163.com Thu Jun 17 13:22:58 2010 From: hellohello008在163.com (hellohello) Date: Thu, 17 Jun 2010 13:22:58 +0800 Subject: =?gb2312?B?UmU6IEZ3OiCyy8Txo63H673MudjT2rSuv9rW1bbL1Nq08tOhs/Zsbw==?= =?gb2312?B?Z2luOrrzy8C19LXEzsrM4qGjvLGjoQ==?= Message-ID: <017901cb0ddd$2617f970$591dbcc0@sfdomain.com> 继续试验,结果发现在打印出login:后, 在执行到read(0, &c, 1) 时就会死掉。 在这之间,如果连续打印字符,不加sleep的话,打印到40多个字符就立即 死掉了,但加上sleep能一直打印下去,直到调用read(0, &c, 1)后才会死掉。 是否能说明是TTY驱动配合方面的问题?那下一步我就只能花时间从头看看串口、tty代码了。 具体试验代码如下: gettty.c 的 get_logname函数内: do_prompt(op, tp); sleep(1); for (j=1;j<50;j++) { fprintf(stdout,"log2name:%d\n", j);;fflush(stdout); sleep(1);//这里不加sleep,连续打印40多个字符时就死掉了,加上sleep能一直打印下去。 } for (bp = logname, cp->eol = 0; cp->eol == 0; /* void */ ) { fprintf(stdout,"log4name:\n");;fflush(stdout); sleep(1);//死在这里,后面的都打印不了了。 if (read(0, &c, 1) < 1) { fprintf(stdout,"readerr:%d\n", errno);fflush(stdout); sleep(3); if (errno == EINTR || errno == EIO) exit(0); error("%s: read: %m", op->tty); } fprintf(stdout,"read:%d\n", c);fflush(stdout); sleep(3); ... } >> >> >>> 在 2010年6月13日 上午8:49,hellohello 写道: >>>> >>>> >>>> >>>> 2.6.25的内核跑起来了,但切换到应用部分时出了问题, >>>> >>>> 内核执行到 kernel_execve /sbin/init 后串口打印出 >>>> (none) login: >>>> 然后串口终端就死掉了。 >>>> >>>> >>>> >>>> 1)现象1: >>>> 我在/etc/rc.d/rcS 文件的末尾加入调试信息: >>>> echo "run rc.local start" >>>> ##if [ -x /etc/rc.d/rc.local ] >>>> ##then >>>> ## /etc/rc.d/rc.local $mode >>>> ##fi >>>> echo "run rc.local end" >>>> >>>> 显示结果: >>>> kernel_execve /sbin/init >>>> run rc.local start >>>> run rc.local end >>>> (none) login: >>>> 这里串口终端死掉 >>>> >>>> >>>> >>>> 2)现象2: >>>> 我在/etc/rc.d/rcS 文件的末尾加入调试信息: >>>> echo "run rc.local start" >>>> echo "run rc.local start" >>>> ##if [ -x /etc/rc.d/rc.local ] >>>> ##then >>>> ## /etc/rc.d/rc.local $mode >>>> ##fi >>>> echo "run rc.local end" >>>> >>>> 显示结果: >>>> kernel_execve /sbin/init >>>> run rc.local start >>>> run rc.local start >>>> 大约过了4秒,才打印出下面的login >>>> (none) login: >>>> 这里串口终端死掉 >>>> >>>> >>>> 即使将注释部分打开,现象一样,好像与我将调试的echo语句放在哪个地方没有关系,每次就只能打印出2行调试信息,然后就打印出 >>>> (none) login: 串口终端死掉。 >>>> 只不过像现象2中会等4秒左右才出(none) login: >>>> >>>> >>>> 有谁遇到过,帮解释一下吧。 >>>> >>>> 或者指个路,我来细查查。 >>>> >>>> ---。。。? >>>> _______________________________________________ >>>> Linux 内核开发中文邮件列表 >>>> Linux-kernel在zh-kernel.org >>>> http://zh-kernel.org/mailman/listinfo/linux-kernel >>>> Linux 内核开发中文社区: http://zh-kernel.org >>> > From hellohello008在163.com Thu Jun 17 14:51:24 2010 From: hellohello008在163.com (hellohello) Date: Thu, 17 Jun 2010 14:51:24 +0800 Subject: =?gb2312?B?Rnc6IEZ3OiCyy8Txo63H673MudjT2rSuv9rW1bbL1Nq08tOhs/Zsbw==?= =?gb2312?B?Z2luOrrzy8C19LXEzsrM4qGjvLGjoQ==?= Message-ID: <01ab01cb0de9$8154a3e0$591dbcc0@sfdomain.com> 继续试验,结果发现在打印出login:后, 在执行到read(0, &c, 1) 时就会死掉。 在这之间,如果连续打印字符,不加sleep的话,打印到40多个字符就立即 死掉了,但加上sleep能一直打印下去,直到调用read(0, &c, 1)后才会死掉。 是否能说明是TTY驱动配合方面的问题?那下一步我就只能花时间从头看看串口、tty代码了。 具体试验代码如下: gettty.c 的 get_logname函数内: do_prompt(op, tp); sleep(1); for (j=1;j<50;j++) { fprintf(stdout,"log2name:%d\n", j);;fflush(stdout); sleep(1);//这里不加sleep,连续打印40多个字符时就死掉了,加上sleep能一直打印下去。 } for (bp = logname, cp->eol = 0; cp->eol == 0; /* void */ ) { fprintf(stdout,"log4name:\n");;fflush(stdout); sleep(1);//死在这里,后面的都打印不了了。 if (read(0, &c, 1) < 1) { fprintf(stdout,"readerr:%d\n", errno);fflush(stdout); sleep(3); if (errno == EINTR || errno == EIO) exit(0); error("%s: read: %m", op->tty); } fprintf(stdout,"read:%d\n", c);fflush(stdout); sleep(3); ... } >> >> >>> 在 2010年6月13日 上午8:49,hellohello 写道: >>>> >>>> >>>> >>>> 2.6.25的内核跑起来了,但切换到应用部分时出了问题, >>>> >>>> 内核执行到 kernel_execve /sbin/init 后串口打印出 >>>> (none) login: >>>> 然后串口终端就死掉了。 >>>> >>>> >>>> >>>> 1)现象1: >>>> 我在/etc/rc.d/rcS 文件的末尾加入调试信息: >>>> echo "run rc.local start" >>>> ##if [ -x /etc/rc.d/rc.local ] >>>> ##then >>>> ## /etc/rc.d/rc.local $mode >>>> ##fi >>>> echo "run rc.local end" >>>> >>>> 显示结果: >>>> kernel_execve /sbin/init >>>> run rc.local start >>>> run rc.local end >>>> (none) login: >>>> 这里串口终端死掉 >>>> >>>> >>>> >>>> 2)现象2: >>>> 我在/etc/rc.d/rcS 文件的末尾加入调试信息: >>>> echo "run rc.local start" >>>> echo "run rc.local start" >>>> ##if [ -x /etc/rc.d/rc.local ] >>>> ##then >>>> ## /etc/rc.d/rc.local $mode >>>> ##fi >>>> echo "run rc.local end" >>>> >>>> 显示结果: >>>> kernel_execve /sbin/init >>>> run rc.local start >>>> run rc.local start >>>> 大约过了4秒,才打印出下面的login >>>> (none) login: >>>> 这里串口终端死掉 >>>> >>>> >>>> 即使将注释部分打开,现象一样,好像与我将调试的echo语句放在哪个地方没有关系,每次就只能打印出2行调试信息,然后就打印出 >>>> (none) login: 串口终端死掉。 >>>> 只不过像现象2中会等4秒左右才出(none) login: >>>> >>>> >>>> 有谁遇到过,帮解释一下吧。 >>>> >>>> 或者指个路,我来细查查。 >>>> >>>> ---。。。? >>>> _______________________________________________ >>>> Linux 内核开发中文邮件列表 >>>> Linux-kernel在zh-kernel.org >>>> http://zh-kernel.org/mailman/listinfo/linux-kernel >>>> Linux 内核开发中文社区: http://zh-kernel.org >>> > From neverforget_2002在163.com Thu Jun 17 16:43:14 2010 From: neverforget_2002在163.com (=?gbk?B?tN7A2g==?=) Date: Thu, 17 Jun 2010 16:43:14 +0800 (CST) Subject: =?gbk?B?x/PW+qOsYXJtLWxpbnV4xNq6y9bQyrnTw7ihtePTw8vjzsrM4qGj?= Message-ID: <42e6bc9c.b326.129451385f3.Coremail.neverforget_2002@163.com> 大家好,我在做一个项目需要在linux内核中添加一个算法模块,开发平台是pxa270芯片+arm-linux2.6.9 ,使用arm-linux-gcc3.4.6编译。编译内核时出现大量错误,摘取如下: RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:106: undefined reference to `__divsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:107: undefined reference to `__divsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__mulsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__divsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__extendsfdf2' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__adddf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__fixdfsi' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:112: undefined reference to `__floatsisf' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:115: undefined reference to `__mulsf3' 。。。。。。 分析后发现可能是因为PXA270不支持浮点运算导致。但我在编译器加了-msoft-float选项,并且内核配置了NWPFE项。 但现在问题依然存在。麻烦大家帮忙指点,万分感谢!!! From openspace.wang在gmail.com Fri Jun 18 07:56:31 2010 From: openspace.wang在gmail.com (Ryan Wang) Date: Fri, 18 Jun 2010 07:56:31 +0800 Subject: =?GB2312?B?yOe6zsi3tqi4+cXMy/nKudPDtcTH/bav?= Message-ID: 如何确定root文件系统所在磁盘所使用的驱动呢? 有什么命令可用吗? 谢谢~ From hellohello008在163.com Fri Jun 18 08:58:18 2010 From: hellohello008在163.com (hellohello) Date: Fri, 18 Jun 2010 08:58:18 +0800 Subject: =?gb2312?B?Rnc6IEZ3OiCyy8Txo63H673MudjT2rSuv9rW1bbL1Nq08tOhs/Zsbw==?= =?gb2312?B?Z2luOrrzy8C19LXEzsrM4qGjvLGjoQ==?= Message-ID: <024f01cb0e81$575501f0$591dbcc0@sfdomain.com> 邮箱还是列表出了问题?这几天收不到列表邮件 继续试验,结果发现在打印出login:后, 在执行到read(0, &c, 1) 时就会死掉。 在这之间,如果连续打印字符,不加sleep的话,打印到40多个字符就立即 死掉了,但加上sleep能一直打印下去,直到调用read(0, &c, 1)后才会死掉。 是否能说明是TTY驱动配合方面的问题?那下一步我就只能花时间从头看看串口、tty代码了。 具体试验代码如下: gettty.c 的 get_logname函数内: do_prompt(op, tp); sleep(1); for (j=1;j<50;j++) { fprintf(stdout,"log2name:%d\n", j);;fflush(stdout); sleep(1);//这里不加sleep,连续打印40多个字符时就死掉了,加上sleep能一直打印下去。 } for (bp = logname, cp->eol = 0; cp->eol == 0; /* void */ ) { fprintf(stdout,"log4name:\n");;fflush(stdout); sleep(1);//死在这里,后面的都打印不了了。 if (read(0, &c, 1) < 1) { fprintf(stdout,"readerr:%d\n", errno);fflush(stdout); sleep(3); if (errno == EINTR || errno == EIO) exit(0); error("%s: read: %m", op->tty); } fprintf(stdout,"read:%d\n", c);fflush(stdout); sleep(3); ... } >> >> >>> 在 2010年6月13日 上午8:49,hellohello 写道: >>>> >>>> >>>> >>>> 2.6.25的内核跑起来了,但切换到应用部分时出了问题, >>>> >>>> 内核执行到 kernel_execve /sbin/init 后串口打印出 >>>> (none) login: >>>> 然后串口终端就死掉了。 >>>> >>>> >>>> >>>> 1)现象1: >>>> 我在/etc/rc.d/rcS 文件的末尾加入调试信息: >>>> echo "run rc.local start" >>>> ##if [ -x /etc/rc.d/rc.local ] >>>> ##then >>>> ## /etc/rc.d/rc.local $mode >>>> ##fi >>>> echo "run rc.local end" >>>> >>>> 显示结果: >>>> kernel_execve /sbin/init >>>> run rc.local start >>>> run rc.local end >>>> (none) login: >>>> 这里串口终端死掉 >>>> >>>> >>>> >>>> 2)现象2: >>>> 我在/etc/rc.d/rcS 文件的末尾加入调试信息: >>>> echo "run rc.local start" >>>> echo "run rc.local start" >>>> ##if [ -x /etc/rc.d/rc.local ] >>>> ##then >>>> ## /etc/rc.d/rc.local $mode >>>> ##fi >>>> echo "run rc.local end" >>>> >>>> 显示结果: >>>> kernel_execve /sbin/init >>>> run rc.local start >>>> run rc.local start >>>> 大约过了4秒,才打印出下面的login >>>> (none) login: >>>> 这里串口终端死掉 >>>> >>>> >>>> 即使将注释部分打开,现象一样,好像与我将调试的echo语句放在哪个地方没有关系,每次就只能打印出2行调试信息,然后就打印出 >>>> (none) login: 串口终端死掉。 >>>> 只不过像现象2中会等4秒左右才出(none) login: >>>> >>>> >>>> 有谁遇到过,帮解释一下吧。 >>>> >>>> 或者指个路,我来细查查。 >>>> >>>> ---。。。? >>>> _______________________________________________ >>>> Linux 内核开发中文邮件列表 >>>> Linux-kernel在zh-kernel.org >>>> http://zh-kernel.org/mailman/listinfo/linux-kernel >>>> Linux 内核开发中文社区: http://zh-kernel.org >>> > From neverforget_2002在163.com Fri Jun 18 15:06:16 2010 From: neverforget_2002在163.com (=?gbk?B?tN7A2g==?=) Date: Fri, 18 Jun 2010 15:06:16 +0800 (CST) Subject: =?gbk?B?x/PW+qOsYXJtLWxpbnV4xNq6y9bQyrnTw7ihtePTw8vjzsrM4qGj?= Message-ID: <11a65e9.f59f.12949e11bc1.Coremail.neverforget_2002@163.com> 大家好,我在做一个项目需要在linux内核中添加一个算法模块,开发平台是pxa270芯片+arm-linux2.6.9 ,使用arm-linux-gcc3.4.6编译。编译内核时出现大量错误,摘取如下: RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:106: undefined reference to `__divsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:107: undefined reference to `__divsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__mulsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__divsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__extendsfdf2' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__adddf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__fixdfsi' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:112: undefined reference to `__floatsisf' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:115: undefined reference to `__mulsf3' 。。。。。。 分析后发现可能是因为PXA270不支持浮点运算导致。但我在编译器加了-msoft-float选项,并且内核配置了NWPFE项。 但现在问题依然存在。麻烦大家帮忙指点,万分感谢!!! From shaobei.guo在gmail.com Mon Jun 21 14:22:48 2010 From: shaobei.guo在gmail.com (Shaobei Guo) Date: Mon, 21 Jun 2010 14:22:48 +0800 Subject: =?GB2312?B?UmU6INK7sOO0rr/atrzWp7PWRE1Bw7Q=?= In-Reply-To: References: Message-ID: 2010/6/9 lei yang > 一般的串口都支持DMA么,要是支持的话怎么打开DMA呢 > 一般串口不支持DMA,除非是工业使用要求较高性能的串口驱动;看你平台上的选项,如果支持DMA,应该在menuconfig里有对应的选项。这是平台相关的。 -- Thanks, Shaobei From shaobei.guo在gmail.com Mon Jun 21 14:24:47 2010 From: shaobei.guo在gmail.com (Shaobei Guo) Date: Mon, 21 Jun 2010 14:24:47 +0800 Subject: =?GB2312?B?UmU6ILnY09psaW51eMTausu6r8r9sum/tKGj?= In-Reply-To: <201006131033422817672@126.com> References: <201006131033422817672@126.com> Message-ID: 2010/6/13 lewis > 可以直接在源码目录里面看到内核提供了那些可以使用的内核函数么? > > http://lwn.net/Articles/2.6-kernel-api/ -- Thanks, Shaobei From zylthinking在gmail.com Mon Jun 21 14:55:50 2010 From: zylthinking在gmail.com (=?GB2312?B?1dTT7sH6?=) Date: Mon, 21 Jun 2010 14:55:50 +0800 Subject: =?GB2312?B?suLK1NK7z8I=?= Message-ID: 似乎很久收不到邮件了 From jiuxian_chu在foxmail.com Mon Jun 21 17:58:37 2010 From: jiuxian_chu在foxmail.com (=?gbk?B?uLvC+szD?=) Date: Mon, 21 Jun 2010 17:58:37 +0800 Subject: =?gbk?B?09C52Gluc21vZLXEzsrM4g==?= Message-ID: hi,大家好 我今天insmod一个模块产生如下错误,百思不得其解,请高手帮忙看看这些打印信息是什么意思。 谢谢。 [root在localhost home]# insmod g_***.ko [ 27.092663] ------------[ cut here ]------------ [ 27.092691] kernel BUG at net/core/dev.c:4795! [ 27.092700] invalid opcode: 0000 [#1] PREEMPT SMP [ 27.092713] last sysfs file: /sys/devices/pci0000:00/uevent [ 27.092721] Modules linked in: g_nokia(+) [ 27.092735] [ 27.092745] Pid: 657, comm: insmod Not tainted 2.6.33.2 #3 / [ 27.092755] EIP: 0060:[] EFLAGS: 00010206 CPU: 1 [ 27.092780] EIP is at rollback_registered_many+0x2b9/0x310 [ 27.092788] EAX: 00000003 EBX: da59d800 ECX: d92c6000 EDX: d92c7e74 [ 27.092796] ESI: d92c7e30 EDI: cf532ec0 EBP: d92c7e60 ESP: d92c7e3c [ 27.092805] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 27.092815] Process insmod (pid: 657, ti=d92c6000 task=d9185490 task.ti=d92c6000) [ 27.092823] Stack: [ 27.092828] c0c5d6f4 c0c5d6e0 d9185490 d92c7e74 22222222 22222222 da59d800 00000000 [ 27.092851] <0> cf532ec0 d92c7e84 c0715d0f d92c7e7c c0878085 c0720d3f da59d844 da59d844 [ 27.092875] <0> da59d800 dc006e08 d92c7e90 c0715d74 cf532ee4 d92c7e98 e9d2f32d d92c7ee0 [ 27.092901] Call Trace: [ 27.092916] [] ? unregister_netdevice_queue+0x5f/0xb0 [ 27.092929] [] ? mutex_lock_nested+0x35/0x40 [ 27.092941] [] ? rtnl_lock+0xf/0x20 [ 27.092951] [] ? unregister_netdev+0x14/0x20 [ 27.092977] [] ? nokia_unbind+0xd/0x21 [g_nokia] [ 27.092995] [] ? composite_unbind+0xf8/0x210 [g_nokia] [ 27.093007] [] ? rtnl_unlock+0x8/0x10 [ 27.093024] [] ? composite_bind+0x307/0x318 [g_nokia] [ 27.093038] [] ? usb_gadget_register_driver+0x94/0x1a0 [ 27.093049] [] ? usb_gadget_register_driver+0x99/0x1a0 [ 27.093064] [] ? __blocking_notifier_call_chain+0x4d/0x60 [ 27.093081] [] ? nokia_init+0x0/0xf [g_nokia] [ 27.093098] [] ? usb_composite_register+0x49/0x58 [g_nokia] [ 27.093115] [] ? nokia_init+0xd/0xf [g_nokia] [ 27.093127] [] ? do_one_initcall+0x23/0x170 [ 27.093138] [] ? blocking_notifier_call_chain+0x1a/0x20 [ 27.093151] [] ? sys_init_module+0xb3/0x220 [ 27.093164] [] ? sys_close+0x70/0xc0 [ 27.093175] [] ? sysenter_do_call+0x12/0x31 [ 27.093182] Code: c3 90 89 44 24 04 c7 04 24 3c 9d b8 c0 e8 5c 07 16 00 e9 3f ff ff ff ba dc 12 00 00 b8 67 42 b8 c0 e8 4c 6b a2 ff e9 6d ff ff ff <0f> 0b eb fe 8d 76 00 c7 44 24 08 e6 00 00 00 c7 44 24 04 67 42 [ 27.093334] EIP: [] rollback_registered_many+0x2b9/0x310 SS:ESP 0068:d92c7e3c [ 27.093363] ---[ end trace 407b3abc7f737788 ]--- Segmentation fault From zhang.zhilong在gmail.com Tue Jun 22 12:56:28 2010 From: zhang.zhilong在gmail.com (Zhilong zhang) Date: Tue, 22 Jun 2010 12:56:28 +0800 Subject: =?GB2312?B?UmU6IL2ryeixuNf2s8m08tOhyajD6M2o0MXI/dbWuabE3KOs?= =?GB2312?B?0OjSqr2rx/22r9f2s8ljb21wb3NpdGUgZGV2aWNlIKOstavKx9P2tb3Oyszi?= In-Reply-To: References: Message-ID: 在 2010年6月10日 下午4:06,Zhilong zhang 写道: > > > 在 2010年6月10日 上午10:13,Zhilong zhang 写道: > > 将设备做成打印扫描通信三种功能,需要将驱动做成composite device >> ,但是遇到问题,只能配置两种接口。给第三种接口的端口进行配置时就会出错。 >> >> 内核启动时提示: >> prnscncomm init >> prnscncomm bind >> autoconfig printer. >> autoconfig channel. chl_in_ep >> autoconfig channel. chl_out_ep >> autoconfig scanner. >> g_prnscn: can't autoconfigure on at91_udc >> 不知道是什么原因? >> 谢谢。 >> >> 接口定义: >> static struct usb_interface_descriptor printer_intf_desc = { >> .bLength = sizeof printer_intf_desc, >> .bDescriptorType = USB_DT_INTERFACE, >> //.bInterfaceNumber = PRINTER_INTERFACE, >> .bNumEndpoints = 2, >> .bInterfaceClass = USB_CLASS_PRINTER, >> .bInterfaceSubClass = 1, /* Printer Sub-Class */ >> .bInterfaceProtocol = 2, /* Bi-Directional */ >> //.iInterface = 0 >> }; >> static struct usb_endpoint_descriptor fs_prn_ep_in_desc = { >> .bLength = USB_DT_ENDPOINT_SIZE, >> .bDescriptorType = USB_DT_ENDPOINT, >> .bEndpointAddress = USB_DIR_IN, >> .bmAttributes = USB_ENDPOINT_XFER_BULK, >> }; >> static struct usb_endpoint_descriptor fs_prn_ep_out_desc = { >> .bLength = USB_DT_ENDPOINT_SIZE, >> .bDescriptorType = USB_DT_ENDPOINT, >> .bEndpointAddress = USB_DIR_OUT, >> .bmAttributes = USB_ENDPOINT_XFER_BULK, >> }; >> static struct usb_interface_descriptor scanner_intf_desc = { >> .bLength = sizeof scanner_intf_desc, >> .bDescriptorType = USB_DT_INTERFACE, >> .bInterfaceNumber = SCANNER_INTERFACE, >> .bNumEndpoints = 3, >> .bInterfaceClass = USB_CLASS_VENDOR_SPEC, >> .bInterfaceSubClass = 0, /* Printer Sub-Class */ >> .bInterfaceProtocol = 0xff, /* Ventor */ >> //.iInterface = 4 >> }; >> static struct usb_endpoint_descriptor fs_scan_ep_in_desc = { >> .bLength = USB_DT_ENDPOINT_SIZE, >> .bDescriptorType = USB_DT_ENDPOINT, >> .bEndpointAddress = USB_DIR_IN, >> .bmAttributes = USB_ENDPOINT_XFER_BULK, >> }; >> static struct usb_endpoint_descriptor fs_scan_ep_out_desc = { >> .bLength = USB_DT_ENDPOINT_SIZE, >> .bDescriptorType = USB_DT_ENDPOINT, >> .bEndpointAddress = USB_DIR_OUT, >> .bmAttributes = USB_ENDPOINT_XFER_BULK, >> }; >> static struct usb_endpoint_descriptor fs_scan_ep_int_in_desc = { >> .bLength = USB_DT_ENDPOINT_SIZE, >> .bDescriptorType = USB_DT_ENDPOINT, >> .bEndpointAddress = USB_DIR_IN, >> .bmAttributes = USB_ENDPOINT_XFER_INT, >> .wMaxPacketSize = __constant_cpu_to_le16(1), >> .bInterval = 0x10, >> }; >> static struct usb_interface_descriptor channel_intf_desc = { >> .bLength = sizeof channel_intf_desc, >> .bDescriptorType = USB_DT_INTERFACE, >> .bInterfaceNumber = PRINTER_INTERFACE, >> .bNumEndpoints = 2, >> .bInterfaceClass = USB_CLASS_VENDOR_SPEC,//USB_CLASS_PRINTER,20080522 >> //.bInterfaceSubClass = 1, /* Printer Sub-Class */ >> //.bInterfaceProtocol = 2, /* Bi-Directional */ >> .iInterface = 0 >> }; >> static struct usb_endpoint_descriptor fs_channel_ep_in_desc = { >> .bLength = USB_DT_ENDPOINT_SIZE, >> .bDescriptorType = USB_DT_ENDPOINT, >> .bEndpointAddress = USB_DIR_IN, >> .bmAttributes = USB_ENDPOINT_XFER_BULK >> }; >> static struct usb_endpoint_descriptor fs_channel_ep_out_desc = { >> .bLength = USB_DT_ENDPOINT_SIZE, >> .bDescriptorType = USB_DT_ENDPOINT, >> .bEndpointAddress = USB_DIR_OUT, >> .bmAttributes = USB_ENDPOINT_XFER_BULK >> }; >> >> 下面是捆绑函数 >> >> static int __init prnscncomm_bind(struct usb_composite_dev *cdev) >> { >> int gcnum; >> struct usb_gadget *gadget = cdev->gadget; >> int id; >> size_t len; >> int status; >> //u32 i; >> //struct usb_request *req; >> >> >> printk(KERN_ERR "prnscncomm bind\n"); >> /* FIXME -- this is device-wide stuff, not config-wide */ >> >> /* allocate string descriptor numbers */ >> id = usb_composite_string_id(cdev); >> if (id < 0) >> return id; >> strings[STRING_MANUFACTURER_IDX].id = id; >> device_desc.iManufacturer = id; >> >> id = usb_composite_string_id(cdev); >> if (id < 0) >> return id; >> strings[STRING_PRODUCT_IDX].id = id; >> device_desc.iProduct = id; >> >> id = usb_composite_string_id(cdev); >> if (id < 0) >> return id; >> strings[STRING_SERIAL_IDX].id = id; >> device_desc.iSerialNumber = id; >> >> /* >> * config-wide stuff: >> */ >> cdev->bmAttributes = USB_CONFIG_ATT_SELFPOWER; >> cdev->bMaxPower = 1; /* 2 mA, minimal */ >> >> if (idVendor) { >> if (!idProduct) { >> dev_err (&gadget->dev, "idVendor needs idProduct!\n"); >> return -ENODEV; >> } >> device_desc.idVendor = cpu_to_le16(idVendor); >> device_desc.idProduct = cpu_to_le16(idProduct); >> if (bcdDevice) >> device_desc.bcdDevice = cpu_to_le16(bcdDevice); >> } >> if (iManufacturer) >> strlcpy (manufacturer, iManufacturer, sizeof manufacturer); >> if (iProduct) >> strlcpy (product_desc, iProduct, sizeof product_desc); >> if (iSerialNum) >> strlcpy (serial_num, iSerialNum, sizeof serial_num); >> if (iPNPstring) { >> strlcpy (&pnp_string[2], iPNPstring, (sizeof pnp_string)-2); >> } >> >> len = strlen (pnp_string); >> pnp_string[0] = (len >> 8) & 0xFF; >> pnp_string[1] = len & 0xFF; >> >> usb_gadget_class = class_create(THIS_MODULE, "usb_gadget"); >> if (IS_ERR(usb_gadget_class)) { >> status = PTR_ERR(usb_gadget_class); >> ERROR (dev, "unable to create usb_gadget class %d\n", status); >> return status; >> } >> >> status = alloc_chrdev_region (&g_print_devno, 0, 1, >> "USB printer gadget"); >> if (status) { >> ERROR (dev, "alloc_chrdev_region %d\n", status); >> class_destroy(usb_gadget_class); >> return status; >> } >> >> status = alloc_chrdev_region (&g_scan_devno, 0, 1, >> "USB scanner gadget"); >> if (status) { >> ERROR (dev, "alloc_chrdev_region %d\n", status); >> device_destroy(usb_gadget_class, g_print_devno); >> class_destroy(usb_gadget_class); >> return status; >> } >> >> status = alloc_chrdev_region (&g_channel_devno, 0, 1, >> "USB channel gadget"); >> if (status) { >> ERROR (dev, "alloc_chrdev_region %d\n", status); >> device_destroy(usb_gadget_class, g_channel_devno); // ?? >> class_destroy(usb_gadget_class); >> return status; >> } >> >> /* Bulk-only drivers like this one SHOULD be able to >> * autoconfigure on any sane usb controller driver, >> * but there may also be important quirks to address. >> * >> * In this case we don't do much per-function setup since it's >> * all done here ... we do *NOT* intend to ever combine this >> * "vendor-specific" driver with a class driver. >> */ >> usb_ep_autoconfig_reset (gadget); >> >> printk (KERN_INFO "autoconfig printer.\n"); >> prn_in_ep = usb_ep_autoconfig(gadget, &fs_prn_ep_in_desc); >> if (!prn_in_ep) { >> autoconf_fail: >> printk (KERN_ERR "%s: can't autoconfigure on %s\n", >> shortname, gadget->name); >> return -ENODEV; >> } >> >> prn_in_ep->driver_data = cdev; /* claim */ >> >> prn_out_ep = usb_ep_autoconfig(gadget, &fs_prn_ep_out_desc); >> if (!prn_out_ep) >> goto autoconf_fail; >> >> /* autoconf is done; from now on we'll use the "it's allocated" >> * flag as "it's activated" >> */ >> prn_out_ep->driver_data = cdev; >> >> >> printk (KERN_INFO "autoconfig channel. chl_in_ep\n"); >> chl_in_ep = usb_ep_autoconfig(gadget, &fs_channel_ep_in_desc); >> if (!chl_in_ep) { >> goto autoconf_fail; >> } >> chl_in_ep->driver_data = cdev; >> >> printk (KERN_INFO "autoconfig channel. chl_out_ep\n"); >> chl_out_ep = usb_ep_autoconfig(gadget, &fs_channel_ep_out_desc); >> if(!chl_out_ep) goto autoconf_fail; >> chl_out_ep->driver_data = cdev; >> >> // 第三种设备功能 >> #if 1 >> printk (KERN_INFO "autoconfig scanner.\n"); >> scn_in_ep = usb_ep_autoconfig(gadget, &fs_scan_ep_in_desc); >> if (!scn_in_ep) >> goto autoconf_fail; >> >> /* autoconf is done; from now on we'll use the "it's allocated" >> * flag as "it's activated" >> */ >> scn_in_ep->driver_data = cdev; >> >> scn_out_ep = usb_ep_autoconfig(gadget, &fs_scan_ep_out_desc); >> if (!scn_out_ep) >> goto autoconf_fail; >> >> /* autoconf is done; from now on we'll use the "it's allocated" >> * flag as "it's activated" >> */ >> scn_out_ep->driver_data = cdev; >> >> scn_int_ep = usb_ep_autoconfig(gadget, &fs_scan_ep_int_in_desc); >> if (!scn_int_ep) >> goto autoconf_fail; >> >> /* autoconf is done; from now on we'll use the "it's allocated" >> * flag as "it's activated" >> */ >> scn_int_ep->driver_data = cdev; >> #endif >> ...... >> } >> >> -- >> Zhang Zhilong >> > > > 不知道windows是根据什么字段来给组合设备的每个功能分别安装驱动的? > > > -- > Zhang Zhilong > 好多天了,还是无解。 翻了ATSAM9263的datasheet,发现它的UDP只提供6个endpoid,2个blank。不是很理解那里面的意思,是否意味着在该mcu上只能同时做两种usbgadget功能? 哪位大虾能帮助一下,谢谢了~~~~~ -- Zhang Zhilong From chenlong828在gmail.com Tue Jun 22 14:28:31 2010 From: chenlong828在gmail.com (ChenLong) Date: Tue, 22 Jun 2010 14:28:31 +0800 Subject: =?gb2312?B?1PXDtNfuvfy2vMO708q8/sHLo78=?= Message-ID: <001701cb11d4$2804e720$780eb560$@com> From qzhang.g在gmail.com Tue Jun 22 20:34:10 2010 From: qzhang.g在gmail.com (Alvin) Date: Tue, 22 Jun 2010 20:34:10 +0800 Subject: =?UTF-8?B?UmU6IOivt+aVmeS4gOS4qnN0cnVjdCBpbm9kZV9vcGVyYXRpb25z6YeM6Z2i55qE5Ye9?= =?UTF-8?B?5pWw5oyH6ZKIcGVybWlzc2lvbuWmguS9leS9v+eUqA==?= In-Reply-To: References: Message-ID: 2010/6/14 Adam Jiang > 2010/6/12 Alvin : > > 我看的是2.6.31代码,include/linux/fs.h中, > > struct inode_operations { > > ... > > int (*permission) (struct inode *, int); > > ... > > } > > > > permission指针的第二个参数是怎么用的?或者告诉我在哪里可以找到用法 > > permission主要是文件系统用来支持Posix ACL(Access control List)的。 > > > > > 原来的kernel是这么用,op是进程访问该device node时是r, w, 还是x操作。 > > /* > > * This function decides whether to allow an operation > > * (return zero) or not allow it (return a non-zero > > * which indicates why it is not allowed). > > * > > * The operation can be one of the following values: > > * 0 - Execute (run the "file" - meaningless in our case) > > * 2 - Write (input to the kernel module) > > * 4 - Read (output from the kernel module) > > * > > * This is the real function that checks file > > * permissions. The permissions returned by ls -l are > > * for referece only, and can be overridden here. > > */ > > static int module_permission(struct inode *inode, int op) > > { > > /* > > * We allow everybody to read from our module, but > > * only root (uid 0) may write to it > > */ > > if (op == 4 || (op == 2 && current->euid == 0)) > > return 0; > > > > /* > > * If it's anything else, access is denied > > */ > > return -EACCES; > > } > > > > 但在2.6.31里面失效了,每次都是返回-EACCES > > > > 没有看明白上面这个函数怎么使用了inode结构体中的permission, > 能不能说的再明白点? > > 这个函数没有使用struct inode里面的东西,只是判断第2个参数。 module_permission()函数是struct inode_operations里面的成员int (*permission) (struct inode *, int); 就是搞不懂这第2个参数的用法,新的内核好像变了 > /大头阿当 > > > -- > > > > ~Alvin > > _______________________________________________ > > Linux 内核开发中文邮件列表 > > Linux-kernel在zh-kernel.org > > http://zh-kernel.org/mailman/listinfo/linux-kernel > > Linux 内核开发中文社区: http://zh-kernel.org > > > > -- > Adam Jiang > ----------------------------------- > e-mail:jiang.adam在gmail.com > http://www.adamjiang.com > ----------------------------------- > -- ~Alvin From deng8bing在yahoo.com.cn Wed Jun 23 11:08:33 2010 From: deng8bing在yahoo.com.cn (bing deng) Date: Wed, 23 Jun 2010 11:08:33 +0800 (CST) Subject: =?utf-8?B?5pyA6L+R5rKh5pyJ5pS25Yiw5pyJ6YKu5Lu257uE55qE6YKu5Lu25ZGi?= Message-ID: <566445.24061.qm@web15604.mail.cnb.yahoo.com> 大家好,     最近没有收到有邮件组的邮件呢?是没有人讨论了吗? 祝     万事如意 From neverforget_2002在163.com Wed Jun 23 17:00:38 2010 From: neverforget_2002在163.com (CL2) Date: Wed, 23 Jun 2010 17:00:38 +0800 Subject: =?UTF-8?B?5oCO5LmI5aW95LmF6YO95rKh5pyJ5Y+X5Yiw6YKu5Lu25YiX6KGo5Y+R5p2l55qE6YKu5Lu277yf?= Message-ID: <1925572032.290100.1277283635044.JavaMail.neverforget_2002@163.com> 如题,大家收到了么? 2010-06-23 CL2 From houanzhou在gmail.com Wed Jun 23 22:07:09 2010 From: houanzhou在gmail.com (anzhou hou) Date: Wed, 23 Jun 2010 22:07:09 +0800 Subject: =?GB2312?B?udjT2tPKvP7B0LHtzsrM4g==?= Message-ID: 请问为什么在我订阅邮件列表1个月后就收不到来自邮件列表的任何邮件?谢谢! From 2004.zhang在gmail.com Thu Jun 24 17:37:36 2010 From: 2004.zhang在gmail.com (Bob Zhang) Date: Thu, 24 Jun 2010 17:37:36 +0800 Subject: =?GB2312?B?YnVnIMfz1vqjuiBpYTY0ILv6xvdwb3dlciBvZmYgyqew3KOsb3PP1Mq+?= =?GB2312?B?0tG+rbPJuaajrCC1q8rHtefUtMO709C52LHVo6y7s9LJysdBQ1BJtcRi?= =?GB2312?B?dWc=?= Message-ID: 我的环境是ia64机器(hp的rx2860),kernel是2.6.27.19-5 (sles11 ia64版本的kernel) 现在这个bug 不能必现 , 大概 关5次机 , 能出现 1到2次吧。 非常明显的bug。 现在主要是跟 这个函数: acpi_enter_sleep_state() 函数, 同时也在对照ACPI 4.0a 的spec。 感觉acpi_enter_sleep_state()的实现有点怪异。 。。。。。。。。 if (sleep_state > ACPI_STATE_S3) { //谁能解释一下这里???????????????????? /* * We wanted to sleep > S3, but it didn't happen (by virtue of the * fact that we are still executing!) * * Wait ten seconds, then try again. This is to get S4/S5 to work on * all machines. * * We wait so long to allow chipsets that poll this reg very slowly to * still read the right value. Ideally, this block would go * away entirely. */ acpi_os_stall(10000000); status = acpi_hw_register_write(ACPI_REGISTER_PM1_CONTROL, sleep_enable_reg_info-> access_bit_mask); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } } /* Wait until we enter sleep state */ //谁能再解释一下这里????????????????????为什么要等。 do { status = acpi_get_register_unlocked(ACPI_BITREG_WAKE_STATUS, &in_value); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* Spin until we wake */ } while (!in_value); return_ACPI_STATUS(AE_OK); 对这段代码我有个疑问。 代码最后, 要陷入在一个死循环中:知道 WAKE_STATUS的返回值是1 ,就退出。 可是通过查spec , 关于关机:spec是大概这样描述的: The logic is controlled via two bit fields: Sleep Enable (SLP_EN) and Sleep Type (SLP_TYPx). The type of sleep state desired is programmed into the SLP_TYPx field and upon assertion of the SLP_EN the hardware will sequence the system into the defined sleeping state. OSPM gets values for the SLP_TYPx field from the \_Sx objects defined in the static definition block. If the object is missing OSPM assumes the hardware does not support that sleeping state. Prior to entering the desired sleeping state, OSPM will read the designated \_Sx object and place this value in the SLP_TYP field. Additionally ACPI defines a fail-safe Off protocol called the “power button override,” which allows the user to initiate an Off sequence in the case where the system software is no longer able to recover the system (the system has hung). ACPI defines that this sequence be initiated by the user pressing the power button for over 4 seconds, at which point the hardware unconditionally sequences the system to the Off state. This logic is represented by the PWRBTN_OR signal coming into the sleep logic. ========== 特别的疑问关于wake status Wake status The wake status bit is used to determine when the sleeping state has been completed. For more information, see the description of the WAK_STS and WAK_EN bits of the PM1x fixed register block in section 4.7.3.1, “PM1 Event Grouping.” 15 WAK_STS This bit is set when the system is in the sleeping state and an enabled wake event occurs. Upon setting this bit system will transition to the working state. This bit is set by hardware and can only be cleared by software writing a “1” to this bit position. 这样看起来,他的意思是 当系统处于sleeping state 并且发声了一个唤醒事件 , WAK_STS ,硬件会自动把它置1 ,所以, 一旦这个bit是1 ,就说明 系统处于 S0(工作状态了)。 那么按照上面的while循环, 只有 in_value ==1的情况 才能break , 系统进入关机。 这不就与上面的描述矛盾了吗? From 2004.zhang在gmail.com Thu Jun 24 17:44:09 2010 From: 2004.zhang在gmail.com (Bob Zhang) Date: Thu, 24 Jun 2010 17:44:09 +0800 Subject: =?GB2312?B?UmU6IGJ1ZyDH89b6o7ogaWE2NCC7+sb3cG93ZXIgb2ZmIMqnsNyjrG9z?= =?GB2312?B?z9TKvtLRvq2zybmmo6wgtavKx7Xn1LTDu9PQudix1aOsu7PSycrHQUM=?= =?GB2312?B?UEm1xGJ1Zw==?= In-Reply-To: References: Message-ID: 大家帮我想想, 到底什么情况才会是电源无法关闭呢? 现在看起来, 我感觉还是acpi的代码hang住了。 可是printk到最后已经无法起作用了。无法精确调试。 现在我知道的流程是: linux把 ACPI置位 , BMC会一直check ACPI , 一旦发现ACPI置位了, 就关闭电源。 如果有没有PCIE的设备, 会导致系统电源无法关闭吗? 我觉得不太会, 因为之前已经调用了driver 的shutdown函数, 所有的设备都已经停止了, 就算没有停止, acpi要断电, 设备还阻止的了嘛 ? 除非firmware 有 判断, 当设备硬件没有off的时候, 整个系统电源就不能断电。 打个比方, 比如学校的宿舍要断电 ,总要实现说一声 ,“熄灯了,大家做好准备”, 大家默默的响应(脱衣服,睡觉了), 看大家都没有动静了, 管理员一拉闸 ,如果学生有特殊情况, 是不是要闹一闹啊(比如世界杯来了) , 这样就阻止了学校断电呢? From 2004.zhang在gmail.com Thu Jun 24 18:52:40 2010 From: 2004.zhang在gmail.com (Bob Zhang) Date: Thu, 24 Jun 2010 18:52:40 +0800 Subject: =?GB2312?B?UmU6IGJ1ZyDH89b6o7ogaWE2NCC7+sb3cG93ZXIgb2ZmIMqnsNyjrG9z?= =?GB2312?B?z9TKvtLRvq2zybmmo6wgtavKx7Xn1LTDu9PQudix1aOsu7PSycrHQUM=?= =?GB2312?B?UEm1xGJ1Zw==?= In-Reply-To: References: Message-ID: 我的启动信息如下: - - - - - - - - - - Prior Console Output - - - - - - - - - - no defined CONFIG_XEN AND CONFIG_X86 will into acpi_hw_register_write() hwregs-0597 [E000000183DC0000] [03] hw_register_write : ----Entry 1,1,2,0 5400006349E10000 0000000000000000 EVN_BOOT_START *********************************************************** * ROM Version : 00.44 * ROM Date : Sun May 16 18:19:10 PDT 2010 *********************************************************** 1,1,2,0 3400083749E10000 000000000002000C EVN_BOOT_CELL_JOINED_PD - - - - - - - - - - - - Live Console - - - - - - - - - - - - 1,0,2,0 340000B109E10000 0000003C0205000C EVN_MEM_DISCOVERY 1,1,2,0 340000B149E10000 0000007C0205000C EVN_MEM_DISCOVERY 1,0,2,0 Start memory test ...... 0/100 ....... 1,0,2,0 Memory test progress.... 33/100 ....... 1,0,2,0 Memory test progress.... 66/100 ....... 1,0,2,0 Memory test progress.... 100/100 1,0,2,0 1400002609E10000 000000000006000C EVN_BOOT_CPU_LATE_TEST_START 1,0,3,0 140000260DE10000 000000000006000C EVN_BOOT_CPU_LATE_TEST_START 1,1,2,0 1400002649E10000 000000000006000C EVN_BOOT_CPU_LATE_TEST_START 1,1,3,0 140000264DE10000 000000000006000C EVN_BOOT_CPU_LATE_TEST_START 1,0,3,1 140000260FE10000 000000000006000C EVN_BOOT_CPU_LATE_TEST_START 1,1,2,1 140000264BE10000 000000000006000C EVN_BOOT_CPU_LATE_TEST_START 1,1,3,1 140000264FE10000 000000000006000C EVN_BOOT_CPU_LATE_TEST_START 1,0,2,1 140000260BE10000 000000000006000C EVN_BOOT_CPU_LATE_TEST_START 1,0,2,0 5400020709E10000 000000000011000C EVN_EFI_START Press Ctrl-C now to bypass loading option ROM UEFI drivers. 1,0,2,0 3400008109E10000 000000000007000C EVN_IO_DISCOVERY_START 1,0,2,0 5400020B09E10000 0000000000000006 EVN_EFI_LAUNCH_BOOT_MANAGER (C) Copyright 1996-2010 Hewlett-Packard Development Company, L.P. Note, menu interfaces might only display on the primary console device. The current primary console device is: Serial PcieRoot(0x30304352)/Pci(0x1C,0x5)/Pci(0x0,0x5) The primary console can be changed via the 'conconfig' UEFI shell command. Press: ENTER - Start boot entry execution B / b - Launch Boot Manager (menu interface) D / d - Launch Device Manager (menu interface) M / m - Launch Boot Maintenance Manager (menu interface) S / s - Launch UEFI Shell (command line interface) I / i - Launch iLO Setup Tool (command line interface) *** User input can now be provided *** Automatic boot entry execution will start in 7 second(s). Automatic boot entry execution will start in 6 second(s). Automatic boot entry execution will start in 5 second(s). Automatic boot entry execution will start in 4 second(s). Automatic boot entry execution will start in 3 second(s). Automatic boot entry execution will start in 2 second(s). Automatic boot entry execution will start in 1 second(s). HP Smart Array P410i Controller (version 2.99) 1 Logical Drive Booting SUSE Linux Enterprise Server 11 ELILO boot: Uncompressing Linux... |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|done Loading file initrd-2.6.27.19-5-bobdebug...|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\done Initializing cgroup subsys cpuset Initializing cgroup subsys cpu Linux version 2.6.27.19-5-bobdebug (geeko在buildhost) (gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux) ) #10 SMP Tue Jun 22 20:34:36 MDT 2010 EFI v2.10 by HP: SALsystab=0x2ffffca18 ACPI 2.0=0x3b492014 HCDP=0x2ffff9698 SMBIOS=0x3b442000 booting generic kernel on platform dig PCDP: v3 at 0x2ffff9698 Early serial console at I/O port 0x2320 (options '115200n8') console [uart8250] enabled ACPI: RSDP 3B492014, 0024 (r2 HP ) ACPI: XSDT 3B492580, 00F4 (r1 HP RX2800-2 1 1000013) ACPI: FACP 3B48C000, 00F4 (r3 HP RX2800-2 1 HP 1) ACPI: DSDT 3B474000, 9C40 (r2 HP RX2800-2 8 INTL 20061109) ACPI: FACS 3B48E000, 0040 ACPI: APIC 3B490000, 010C (r1 HP RX2800-2 1 HP 1) ACPI: SPCR 3B48A000, 0050 (r1 HP RX2800-2 1 HP 1) ACPI: SRAT 3B488000, 01F8 (r2 HP RX2800-2 1 HP 1) ACPI: SLIT 3B486000, 0035 (r1 HP RX2800-2 1 HP 1) ACPI: CPEP 3B484000, 0034 (r1 HP RX2800-2 1 HP 1) ACPI: SPMI 3B482000, 0041 (r5 HP RX2800-2 1 HP 1) ACPI: HPET 3B480000, 0038 (r1 HP RX2800-2 1 HP 1) ACPI: DMAR 3B47E000, 009C (r1 HP RX2800-2 1 HP 1) ACPI: SSDT 3B472000, 00E2 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B470000, 0030 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B46E000, 14E9 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B46C000, 0092 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B46A000, 0092 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B468000, 0092 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B466000, 00E6 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B464000, 0035 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B462000, 0080 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B460000, 0547 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B45E000, 03C6 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B45C000, 03C6 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B45A000, 03C6 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B458000, 00A4 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B456000, 0276 (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B454000, 00BE (r2 HP RX2800-2 7 INTL 20061109) ACPI: SSDT 3B452000, 0036 (r2 HP RX2800-2 7 INTL 20061109) ACPI: Local APIC address c0000000fee00000 Number of logical nodes in system = 2 Number of memory chunks in system = 4 SMP: Allowing 16 CPUs, 8 hotplug CPUs Reserving 256MB of memory at 128MB for crashkernel (System RAM: 8071MB) Initial ramdisk at: 0xe0000002f1653000 (11134189 bytes) SAL 3.20: HP Kauai version 3.1 SAL: AP wakeup using external interrupt vector 0xf0 ACPI: Local APIC address c0000000fee00000 GSI 20 (level, low) -> CPU 0 (0x0400) vector 48 8 CPUs available, 16 CPUs total MCA related initialization done Virtual mem_map starts at 0xa07fffffff400000 Zone PFN ranges: DMA 0x00000100 -> 0x00010000 Normal 0x00010000 -> 0x00030000 Movable zone start PFN for each node early_node_map[48] active PFN ranges 0: 0x00000100 -> 0x00003b44 0: 0x00003b4a -> 0x00003b64 0: 0x00003c94 -> 0x00003cc3 0: 0x00003cc6 -> 0x00003cf5 0: 0x00003cf8 -> 0x00003d28 0: 0x00003d2b -> 0x00003d5a 0: 0x00003d6d -> 0x00003d9c 0: 0x00003da0 -> 0x00003dcf 0: 0x00003dd2 -> 0x00003e01 0: 0x00003e04 -> 0x00003e33 0: 0x00003e47 -> 0x00003e76 0: 0x00003e79 -> 0x00003ea8 0: 0x00003eab -> 0x00003edb 0: 0x00003eee -> 0x00003f1d 0: 0x00003f20 -> 0x00003f4f 0: 0x00003f53 -> 0x00003f82 0: 0x00003f85 -> 0x00003fb4 0: 0x00003fc7 -> 0x00003ff8 0: 0x00003ffa -> 0x00003fff 0: 0x00014000 -> 0x0001ffff 1: 0x00020000 -> 0x0002f2ae 1: 0x0002f6af -> 0x0002f6b4 1: 0x0002f6b5 -> 0x0002f6b9 1: 0x0002f6c3 -> 0x0002f6cb 1: 0x0002f6d5 -> 0x0002f6dd 1: 0x0002f6e7 -> 0x0002f6ef 1: 0x0002f6f9 -> 0x0002f719 1: 0x0002f71a -> 0x0002f71b 1: 0x0002f723 -> 0x0002f72a 1: 0x0002f72b -> 0x0002f7a5 1: 0x0002f7a7 -> 0x0002f7a8 1: 0x0002f7aa -> 0x0002f7b9 1: 0x0002f7bd -> 0x0002f7c4 1: 0x0002f80a -> 0x0002f80b 1: 0x0002f80f -> 0x0002f817 1: 0x0002f818 -> 0x0002fd37 1: 0x0002fd9a -> 0x0002fd9d 1: 0x0002fda3 -> 0x0002fda4 1: 0x0002fdab -> 0x0002fdfb 1: 0x0002fdfd -> 0x0002fdfe 1: 0x0002fe01 -> 0x0002fe04 1: 0x0002fe07 -> 0x0002fe0c 1: 0x0002fe0d -> 0x0002fe12 1: 0x0002fe13 -> 0x0002fe1a 1: 0x0002fe1b -> 0x0002fe28 1: 0x0002fe29 -> 0x0002fe5b 1: 0x0002fe5c -> 0x0002fe8c 1: 0x0002fe8d -> 0x0002fffe Built 2 zonelists in Zone order, mobility grouping on. Total pages: 128911 Policy zone: Normal Kernel command line: BOOT_IMAGE=scsi0:\efi\SuSE\vmlinuz-2.6.27.19-5-bobdebug root=/dev/disk/by-id/cciss-3600508b1001037383941424344453500-part4 splash=silent crashkernel=512M-:256M acpi.debug_layer=0x2 acpi.debug_level=0xffffffff PID hash table entries: 4096 (order: 12, 32768 bytes) Console: colour VGA+ 80x25 Placing software IO TLB between 0x18000000 - 0x1c000000 Memory: 7876992k/7954688k available (7146k code, 385728k reserved, 10200k data, 2112k init) Calibrating delay loop... 3186.68 BogoMIPS (lpj=6373376) kdb version 4.4 by Keith Owens, Scott Lurndal. Copyright SGI, All Rights Reserved kdb_cmd[0]: defcmd archkdb "" "First line arch debugging" kdb_cmd[7]: defcmd archkdbcpu "" "archkdb with only tasks on cpus" kdb_cmd[14]: defcmd archkdbshort "" "archkdb with less detailed backtrace" kdb_cmd[21]: defcmd archkdbcommon "" "Common arch debugging" Security Framework initialized AppArmor: AppArmor initialized Dentry cache hash table entries: 1048576 (order: 7, 8388608 bytes) Inode-cache hash table entries: 524288 (order: 6, 4194304 bytes) Mount-cache hash table entries: 4096 Initializing cgroup subsys ns Initializing cgroup subsys cpuacct Initializing cgroup subsys memory Initializing cgroup subsys devices Initializing cgroup subsys freezer ACPI: Core revision 20080609 **** Context Switch from TID 0 to TID A000000100B20000 **** hwacpi-0164 [A000000100B20000] [02] hw_get_mode : ----Entry hwacpi-0171 [A000000100B20000] [02] hw_get_mode : ----Exit- 0000000000000001 hwacpi-0164 [A000000100B20000] [03] hw_get_mode : ----Entry hwacpi-0171 [A000000100B20000] [03] hw_get_mode : ----Exit- 0000000000000001 Boot processor id 0x0/0x400 Fixed BSP b0 value from CPU 1 CPU 1: synchronized ITC with CPU 0 (last diff 0 cycles, maxerr 92 cycles) CPU 2: synchronized ITC with CPU 0 (last diff 1 cycles, maxerr 609 cycles) CPU 3: synchronized ITC with CPU 0 (last diff 0 cycles, maxerr 611 cycles) CPU 4: synchronized ITC with CPU 0 (last diff 0 cycles, maxerr 750 cycles) CPU 5: synchronized ITC with CPU 0 (last diff -27 cycles, maxerr 749 cycles) CPU 6: synchronized ITC with CPU 0 (last diff -12 cycles, maxerr 762 cycles) CPU 7: synchronized ITC with CPU 0 (last diff -27 cycles, maxerr 748 cycles) Brought up 8 CPUs Total of 8 processors activated (25493.50 BogoMIPS). net_namespace: 1936 bytes DMI 2.4 present. NET: Registered protocol family 16 ACPI: bus type pci registered perfmon: version 2.82 perfmon: CPU hotplug support enabled **** Context Switch from TID A000000100B20000 to TID E000000180CE0000 **** hwregs-0331 [E000000180CE0000] [03] set_register : ----Entry 00000008 hwregs-0481 [E000000180CE0000] [04] hw_register_read : ----Entry hwregs-0785 [E000000180CE0000] [04] hw_low_level_read : Read: 00004100 width 16 from 0000000000000402 (SystemIO) hwregs-0563 [E000000180CE0000] [04] hw_register_read : ----Exit- AE_OK hwregs-0597 [E000000180CE0000] [04] hw_register_write : ----Entry hwregs-0854 [E000000180CE0000] [04] hw_low_level_write : Wrote: 00004100 width 16 to 0000000000000402 (SystemIO) hwregs-0717 [E000000180CE0000] [04] hw_register_write : ----Exit- AE_OK hwregs-0456 [E000000180CE0000] [03] set_register : Set bits: 00000000 actual 00000000 register 2 hwregs-0457 [E000000180CE0000] [03] set_register : ----Exit- AE_OK hwregs-0331 [E000000180CE0000] [03] set_register : ----Entry 00000009 hwregs-0481 [E000000180CE0000] [04] hw_register_read : ----Entry hwregs-0785 [E000000180CE0000] [04] hw_low_level_read : Read: 00004100 width 16 from 0000000000000402 (SystemIO) hwregs-0563 [E000000180CE0000] [04] hw_register_read : ----Exit- AE_OK hwregs-0597 [E000000180CE0000] [04] hw_register_write : ----Entry hwregs-0854 [E000000180CE0000] [04] hw_low_level_write : Wrote: 00004100 width 16 to 0000000000000402 (SystemIO) hwregs-0717 [E000000180CE0000] [04] hw_register_write : ----Exit- AE_OK hwregs-0456 [E000000180CE0000] [03] set_register : Set bits: 00000000 actual 00000000 register 2 hwregs-0457 [E000000180CE0000] [03] set_register : ----Exit- AE_OK hwregs-0331 [E000000180CE0000] [03] set_register : ----Entry 0000000A hwregs-0481 [E000000180CE0000] [04] hw_register_read : ----Entry hwregs-0785 [E000000180CE0000] [04] hw_low_level_read : Read: 00004100 width 16 from 0000000000000402 (SystemIO) hwregs-0563 [E000000180CE0000] [04] hw_register_read : ----Exit- AE_OK hwregs-0597 [E000000180CE0000] [04] hw_register_write : ----Entry hwregs-0854 [E000000180CE0000] [04] hw_low_level_write : Wrote: 00004000 width 16 to 0000000000000402 (SystemIO) hwregs-0717 [E000000180CE0000] [04] hw_register_write : ----Exit- AE_OK hwregs-0456 [E000000180CE0000] [03] set_register : Set bits: 00000000 actual 00000000 register 2 hwregs-0457 [E000000180CE0000] [03] set_register : ----Exit- AE_OK hwregs-0331 [E000000180CE0000] [03] set_register : ----Entry 0000000B hwregs-0481 [E000000180CE0000] [04] hw_register_read : ----Entry hwregs-0785 [E000000180CE0000] [04] hw_low_level_read : Read: 00004000 width 16 from 0000000000000402 (SystemIO) hwregs-0563 [E000000180CE0000] [04] hw_register_read : ----Exit- AE_OK hwregs-0597 [E000000180CE0000] [04] hw_register_write : ----Entry hwregs-0854 [E000000180CE0000] [04] hw_low_level_write : Wrote: 00004000 width 16 to 0000000000000402 (SystemIO) hwregs-0717 [E000000180CE0000] [04] hw_register_write : ----Exit- AE_OK hwregs-0456 [E000000180CE0000] [03] set_register : Set bits: 00000000 actual 00000000 register 2 hwregs-0457 [E000000180CE0000] [03] set_register : ----Exit- AE_OK hwregs-0331 [E000000180CE0000] [03] set_register : ----Entry 0000000C hwregs-0481 [E000000180CE0000] [04] hw_register_read : ----Entry hwregs-0785 [E000000180CE0000] [04] hw_low_level_read : Read: 00004000 width 16 from 0000000000000402 (SystemIO) hwregs-0563 [E000000180CE0000] [04] hw_register_read : ----Exit- AE_OK hwregs-0597 [E000000180CE0000] [04] hw_register_write : ----Entry hwregs-0854 [E000000180CE0000] [04] hw_low_level_write : Wrote: 00004000 width 16 to 0000000000000402 (SystemIO) hwregs-0717 [E000000180CE0000] [04] hw_register_write : ----Exit- AE_OK hwregs-0456 [E000000180CE0000] [03] set_register : Set bits: 00000000 actual 00000000 register 2 hwregs-0457 [E000000180CE0000] [03] set_register : ----Exit- AE_OK hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 00000000 width 8 to 0000000000000428 (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 000000FF width 8 to 0000000000000420 (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 00000000 width 8 to 0000000000000429 (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 000000FF width 8 to 0000000000000421 (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 00000000 width 8 to 000000000000042A (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 000000FF width 8 to 0000000000000422 (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 00000000 width 8 to 000000000000042B (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 000000FF width 8 to 0000000000000423 (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 00000000 width 8 to 000000000000042C (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 000000FF width 8 to 0000000000000424 (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 00000000 width 8 to 000000000000042D (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 000000FF width 8 to 0000000000000425 (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 00000000 width 8 to 000000000000042E (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 000000FF width 8 to 0000000000000426 (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 00000000 width 8 to 000000000000042F (SystemIO) hwregs-0854 [E000000180CE0000] [05] hw_low_level_write : Wrote: 000000FF width 8 to 0000000000000427 (SystemIO) hwregs-0331 [E000000180CE0000] [06] set_register : ----Entry 00000002 hwregs-0481 [E000000180CE0000] [07] hw_register_read : ----Entry hwregs-0785 [E000000180CE0000] [07] hw_low_level_read : Read: 00000011 width 16 from 0000000000000400 (SystemIO) hwregs-0563 [E000000180CE0000] [07] hw_register_read : ----Exit- AE_OK hwregs-0597 [E000000180CE0000] [07] hw_register_write : ----Entry hwregs-0481 [E000000180CE0000] [08] hw_register_read : ----Entry hwregs-0785 [E000000180CE0000] [08] hw_low_level_read : Read: 00000011 width 16 from 0000000000000400 (SystemIO) hwregs-0563 [E000000180CE0000] [08] hw_register_read : ----Exit- AE_OK hwregs-0854 [E000000180CE0000] [07] hw_low_level_write : Wrote: 00000020 width 16 to 0000000000000400 (SystemIO) hwregs-0717 [E000000180CE0000] [07] hw_register_write : ----Exit- AE_OK hwregs-0456 [E000000180CE0000] [06] set_register : Set bits: 00000020 actual 00000000 register 1 hwregs-0457 [E000000180CE0000] [06] set_register : ----Exit- AE_OK hwregs-0331 [E000000180CE0000] [06] set_register : ----Entry 00000009 hwregs-0481 [E000000180CE0000] [07] hw_register_read : ----Entry hwregs-0785 [E000000180CE0000] [07] hw_low_level_read : Read: 00004000 width 16 from 0000000000000402 (SystemIO) hwregs-0563 [E000000180CE0000] [07] hw_register_read : ----Exit- AE_OK hwregs-0597 [E000000180CE0000] [07] hw_register_write : ----Entry hwregs-0854 [E000000180CE0000] [07] hw_low_level_write : Wrote: 00004020 width 16 to 0000000000000402 (SystemIO) hwregs-0717 [E000000180CE0000] [07] hw_register_write : ----Exit- AE_OK hwregs-0456 [E000000180CE0000] [06] set_register : Set bits: 00000001 actual 00000001 register 2 hwregs-0457 [E000000180CE0000] [06] set_register : ----Exit- AE_OK hwregs-0267 [E000000180CE0000] [06] get_register_unlocked : ----Entry hwregs-0481 [E000000180CE0000] [07] hw_register_read : ----Entry hwregs-0785 [E000000180CE0000] [07] hw_low_level_read : Read: 00004020 width 16 from 0000000000000402 (SystemIO) hwregs-0563 [E000000180CE0000] [07] hw_register_read : ----Exit- AE_OK hwregs-0293 [E000000180CE0000] [06] get_register_unlocked : Read value 00000001 register 2 hwregs-0296 [E000000180CE0000] [06] get_register_unlocked : ----Exit- AE_OK ACPI: Interpreter enabled ACPI: (supports S0 hwregs-0125 [E000000180CE0000] [01] get_sleep_type_data : ----Entry hwregs-0218 [E000000180CE0000] [01] get_sleep_type_data : ----Exit- AE_OK S5bobdebug: into function(acpi_sleep_init) , in file (drivers/acpi/sleep/main.c) , line (660) pm_power_off_prepare assign to be acpi_power_off_prepare() ) ACPI: Using IOSAPIC for interrupt routing ACPI: PCI Root Bridge [RCX0] (0000:00) pci 0000:00:01.0: PME# supported from D0 D3hot D3cold pci 0000:00:01.0: PME# disabled pci 0000:00:07.0: PME# supported from D0 D3hot D3cold pci 0000:00:07.0: PME# disabled pci 0000:00:08.0: PME# supported from D0 D3hot D3cold pci 0000:00:08.0: PME# disabled pci 0000:00:09.0: PME# supported from D0 D3hot D3cold pci 0000:00:09.0: PME# disabled pci 0000:00:13.0: PME# supported from D0 D3hot D3cold pci 0000:00:13.0: PME# disabled pci 0000:00:1a.7: PME# supported from D0 D3hot D3cold pci 0000:00:1a.7: PME# disabled pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold pci 0000:00:1c.0: PME# disabled pci 0000:00:1c.2: PME# supported from D0 D3hot D3cold pci 0000:00:1c.2: PME# disabled pci 0000:00:1c.5: PME# supported from D0 D3hot D3cold pci 0000:00:1c.5: PME# disabled pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold pci 0000:00:1d.7: PME# disabled pci 0000:00:1f.2: PME# supported from D3hot pci 0000:00:1f.2: PME# disabled pci 0000:01:00.0: PME# supported from D0 pci 0000:01:00.0: PME# disabled pci 0000:05:00.0: PME# supported from D0 D3hot D3cold pci 0000:05:00.0: PME# disabled pci 0000:05:00.1: PME# supported from D0 D3hot D3cold pci 0000:05:00.1: PME# disabled pci 0000:06:00.0: PME# supported from D0 D3hot D3cold pci 0000:06:00.0: PME# disabled pci 0000:06:00.1: PME# supported from D0 D3hot D3cold pci 0000:06:00.1: PME# disabled pci 0000:07:00.2: PME# supported from D0 D3hot D3cold pci 0000:07:00.2: PME# disabled pci 0000:00:1e.0: transparent bridge bob debug: acpi_debug_init() entry is not null entry of acpi_system_read_debug() not null Linux Plug and Play Support v0.97 (c) Adam Belay pnp: PnP ACPI init ACPI: bus type pnp registered GSI 3 (level, low) -> CPU 1 (0x0500) vector 49 GSI 17 (level, low) -> CPU 2 (0x0600) vector 50 GSI 2 (level, low) -> CPU 3 (0x0700) vector 51 GSI 8 (level, low) -> CPU 4 (0x1400) vector 52 GSI 11 (level, low) -> CPU 5 (0x1500) vector 53 GSI 12 (level, low) -> CPU 6 (0x1600) vector 54 pnp: PnP ACPI: found 6 devices ACPI: ACPI bus type pnp unregistered AppArmor: AppArmor Filesystem Enabled NET: Registered protocol family 2 IP route cache hash table entries: 65536 (order: 3, 524288 bytes) TCP established hash table entries: 262144 (order: 6, 4194304 bytes) TCP bind hash table entries: 65536 (order: 4, 1048576 bytes) TCP: Hash tables configured (established 262144 bind 65536) TCP reno registered NET: Registered protocol family 1 Unpacking initramfs... done Freeing initrd memory: 10816kB freed PAL Information Facility v0.5 Please use IA-32 EL for executing IA-32 binaries perfmon: added sampling format default-old audit: initializing netlink socket (disabled) type=2000 audit(1277270224.808:1): initialized HugeTLB registered 256 MB page size, pre-allocated 0 pages VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 8192 (order 0, 65536 bytes) msgmni has been set to 3851 Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253) io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) perfmon: added sampling format default GSI 28 (level, low) -> CPU 7 (0x1700) vector 55 pcieport-driver 0000:00:01.0: PCI INT A -> GSI 28 (level, low) -> IRQ 55 pcieport-driver 0000:00:01.0: found MSI capability GSI 30 (level, low) -> CPU 0 (0x0400) vector 57 pcieport-driver 0000:00:07.0: PCI INT A -> GSI 30 (level, low) -> IRQ 57 pcieport-driver 0000:00:07.0: found MSI capability GSI 31 (level, low) -> CPU 1 (0x0500) vector 59 pcieport-driver 0000:00:08.0: PCI INT A -> GSI 31 (level, low) -> IRQ 59 pcieport-driver 0000:00:08.0: found MSI capability GSI 32 (level, low) -> CPU 2 (0x0600) vector 61 pcieport-driver 0000:00:09.0: PCI INT A -> GSI 32 (level, low) -> IRQ 61 pcieport-driver 0000:00:09.0: found MSI capability GSI 16 (level, low) -> CPU 3 (0x0700) vector 63 pcieport-driver 0000:00:1c.0: PCI INT A -> GSI 16 (level, low) -> IRQ 63 pcieport-driver 0000:00:1c.0: found MSI capability GSI 18 (level, low) -> CPU 4 (0x1400) vector 65 pcieport-driver 0000:00:1c.2: PCI INT C -> GSI 18 (level, low) -> IRQ 65 pcieport-driver 0000:00:1c.2: found MSI capability pcieport-driver 0000:00:1c.5: PCI INT B -> GSI 17 (level, low) -> IRQ 50 pcieport-driver 0000:00:1c.5: found MSI capability hpet0: at MMIO 0xfed00000, IRQs 51, 52, 53, 54 hpet0: 4 64-bit timers, 14318180 Hz EFI Time Services Driver v0.4 Serial: 8250/16550 driver4 ports, IRQ sharing enabled 00:03: ttyS0 at I/O 0x2f8 (irq = 49) is a 16550A serial 0000:07:00.5: PCI INT A -> GSI 17 (level, low) -> IRQ 50 0000:07:00.5: ttyS1 at I/O 0x2320 (irq = 50) is a 16550A console handover: boot [uart8250] -> real [ttyS1] mice: PS/2 mouse device common for all mice EFI Variables Facility v0.08 2004-May-17 TCP cubic registered registered taskstats version 1 Freeing unused kernel memory: 2112kB freed doing fast boot SCSI subsystem initialized HP CISS Driver (v 3.6.20) cciss 0000:01:00.0: PCI INT A -> GSI 28 (level, low) -> IRQ 55 cciss0: <0x323a> at PCI 0000:01:00.0 IRQ 70 using DAC blocks= 143305920 block_size= 512 heads=255, sectors=32, cylinders=17562 blocks= 143305920 block_size= 512 heads=255, sectors=32, cylinders=17562 cciss/c0d0: p1 p2 p3 p4 processor ACPI_CPU:00: registered as cooling_device0 processor ACPI_CPU:01: registered as cooling_device1 processor ACPI_CPU:02: registered as cooling_device2 processor ACPI_CPU:03: registered as cooling_device3 processor ACPI_CPU:04: registered as cooling_device4 processor ACPI_CPU:05: registered as cooling_device5 processor ACPI_CPU:06: registered as cooling_device6 processor ACPI_CPU:07: registered as cooling_device7 ACPI: No dock devices found. ahci 0000:00:1f.2: PCI INT C -> GSI 18 (level, low) -> IRQ 65 ahci 0000:00:1f.2: AHCI 0001.0200 32 slots 6 ports 3 Gbps 0x3f impl SATA mode ahci 0000:00:1f.2: flags: 64bit ncq sntf pm led clo pio slum part ems scsi0 : ahci scsi1 : ahci scsi2 : ahci scsi3 : ahci scsi4 : ahci scsi5 : ahci ata1: SATA max UDMA/133 abar m2048在0x58801000 port 0x58801100 irq 72 ata2: SATA max UDMA/133 abar m2048在0x58801000 port 0x58801180 irq 72 ata3: SATA max UDMA/133 abar m2048在0x58801000 port 0x58801200 irq 72 ata4: SATA max UDMA/133 abar m2048在0x58801000 port 0x58801280 irq 72 ata5: SATA max UDMA/133 abar m2048在0x58801000 port 0x58801300 irq 72 ata6: SATA max UDMA/133 abar m2048在0x58801000 port 0x58801380 irq 72 ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata1.00: ATAPI: Optiarc DVD RW AD-7561S, AH51, max UDMA/100 ata1.00: configured for UDMA/100 ata2: SATA link down (SStatus 0 SControl 300) ata3: SATA link down (SStatus 0 SControl 300) ata4: SATA link down (SStatus 0 SControl 300) ata5: SATA link down (SStatus 0 SControl 300) ata6: SATA link down (SStatus 0 SControl 300) scsi 0:0:0:0: CD-ROM Optiarc DVD RW AD-7561S AH51 PQ: 0 ANSI: 5 GSI 19 (level, low) -> CPU 5 (0x1500) vector 73 ata_piix 0000:00:1f.5: PCI INT D -> GSI 19 (level, low) -> IRQ 73 ata_piix 0000:00:1f.5: MAP [ P0 -- P1 -- ] scsi6 : ata_piix scsi7 : ata_piix ata7: SATA max UDMA/133 cmd 0x60c8 ctl 0x60e4 bmdma 0x60b0 irq 73 ata8: SATA max UDMA/133 cmd 0x60c0 ctl 0x60e0 bmdma 0x60b8 irq 73 ata7: SATA link down (SStatus 0 SControl 300) ata8: SATA link down (SStatus 0 SControl 300) Uniform Multi-Platform E-IDE driver Creating device nodes with udev udevd version 128 started usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb ehci_hcd 0000:00:1a.7: PCI INT D -> GSI 19 (level, low) -> IRQ 73 ehci_hcd 0000:00:1a.7: EHCI Host Controller ehci_hcd 0000:00:1a.7: new USB bus registered, assigned bus number 1 ehci_hcd 0000:00:1a.7: debug port 1 ehci_hcd 0000:00:1a.7: irq 73, io mem 0x58803000 ehci_hcd 0000:00:1a.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 2 ports detected usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: EHCI Host Controller usb usb1: Manufacturer: Linux 2.6.27.19-5-bobdebug ehci_hcd usb usb1: SerialNumber: 0000:00:1a.7 ehci_hcd 0000:00:1d.7: PCI INT D -> GSI 19 (level, low) -> IRQ 73 ehci_hcd 0000:00:1d.7: EHCI Host Controller ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 2 ehci_hcd 0000:00:1d.7: debug port 1 ehci_hcd 0000:00:1d.7: irq 73, io mem 0x58802000 ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 5 ports detected usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb2: Product: EHCI Host Controller usb usb2: Manufacturer: Linux 2.6.27.19-5-bobdebug ehci_hcd usb usb2: SerialNumber: 0000:00:1d.7 USB Universal Host Controller Interface driver v3.0 uhci_hcd 0000:00:1a.0: PCI INT A -> GSI 16 (level, low) -> IRQ 63 uhci_hcd 0000:00:1a.0: UHCI Host Controller uhci_hcd 0000:00:1a.0: new USB bus registered, assigned bus number 3 uhci_hcd 0000:00:1a.0: irq 63, io base 0x00006080 usb usb3: configuration #1 chosen from 1 choice hub 3-0:1.0: USB hub found hub 3-0:1.0: 2 ports detected usb usb3: New USB device found, idVendor=1d6b, idProduct=0001 usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb3: Product: UHCI Host Controller usb usb3: Manufacturer: Linux 2.6.27.19-5-bobdebug uhci_hcd usb usb3: SerialNumber: 0000:00:1a.0 uhci_hcd 0000:00:1d.0: PCI INT C -> GSI 18 (level, low) -> IRQ 65 uhci_hcd 0000:00:1d.0: UHCI Host Controller uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 4 uhci_hcd 0000:00:1d.0: irq 65, io base 0x00006060 usb usb4: configuration #1 chosen from 1 choice hub 4-0:1.0: USB hub found hub 4-0:1.0: 2 ports detected usb usb4: New USB device found, idVendor=1d6b, idProduct=0001 usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb4: Product: UHCI Host Controller usb usb4: Manufacturer: Linux 2.6.27.19-5-bobdebug uhci_hcd usb usb4: SerialNumber: 0000:00:1d.0 uhci_hcd 0000:00:1d.1: PCI INT C -> GSI 18 (level, low) -> IRQ 65 uhci_hcd 0000:00:1d.1: UHCI Host Controller uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 5 uhci_hcd 0000:00:1d.1: irq 65, io base 0x00006040 usb usb5: configuration #1 chosen from 1 choice hub 5-0:1.0: USB hub found hub 5-0:1.0: 2 ports detected usb usb5: New USB device found, idVendor=1d6b, idProduct=0001 usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb5: Product: UHCI Host Controller usb usb5: Manufacturer: Linux 2.6.27.19-5-bobdebug uhci_hcd usb usb5: SerialNumber: 0000:00:1d.1 uhci_hcd 0000:00:1d.2: PCI INT A -> GSI 16 (level, low) -> IRQ 63 uhci_hcd 0000:00:1d.2: UHCI Host Controller uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 6 uhci_hcd 0000:00:1d.2: irq 63, io base 0x00006020 usb usb6: configuration #1 chosen from 1 choice hub 6-0:1.0: USB hub found hub 6-0:1.0: 2 ports detected usb usb6: New USB device found, idVendor=1d6b, idProduct=0001 usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb6: Product: UHCI Host Controller usb usb6: Manufacturer: Linux 2.6.27.19-5-bobdebug uhci_hcd usb usb6: SerialNumber: 0000:00:1d.2 uhci_hcd 0000:07:00.4: PCI INT B -> GSI 18 (level, low) -> IRQ 65 uhci_hcd 0000:07:00.4: UHCI Host Controller uhci_hcd 0000:07:00.4: new USB bus registered, assigned bus number 7 uhci_hcd 0000:07:00.4: port count misdetected? forcing to 2 ports uhci_hcd 0000:07:00.4: irq 65, io base 0x00002300 usb usb7: configuration #1 chosen from 1 choice hub 7-0:1.0: USB hub found hub 7-0:1.0: 2 ports detected usb usb7: New USB device found, idVendor=1d6b, idProduct=0001 usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb7: Product: UHCI Host Controller usb usb7: Manufacturer: Linux 2.6.27.19-5-bobdebug uhci_hcd usb usb7: SerialNumber: 0000:07:00.4 Boot logging started on /dev/ttyS1(/dev/console) at Wed Jun 23 05:17:12 2010 Waiting for device /dev/disk/by-id/cciss-3600508b1001037383941424344453500-part4 to appear: ok fsck 1.41.1 (01-Sep-2008) [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/disk/by-id/cciss-3600508b1001037383941424344453500-part4 /dev/disk/by-id/cciss-3600508b1001037383941424344453500-part4: clean, 345317/4292608 files, 4328090/17156032 blocks fsck succeeded. Mounting root device read-write. Mounting root /dev/disk/by-id/cciss-3600508b1001037383941424344453500-part4 mount -o rw,acl,user_xattr -t ext3 /dev/disk/by-id/cciss-3600508b1001037383941424344453500-part4 /root kjournald starting. Commit interval 5 seconds EXT3 FS on cciss/c0d0p4, internal journal EXT3-fs: mounted filesystem with ordered data mode. JBD: barrier-based sync failed on cciss/c0d0p4 - disabling barriers uhci_hcd 0000:07:00.4: Controller not stopped yet! mount: can't find /root/proc in /etc/fstab or /etc/mtab INIT: version 2.86 booting System Boot Control: Running /etc/init.d/boot Mounting procfs at /proc done Mounting sysfs at /sys done Mounting debugfs at /sys/kernel/debug done Remounting tmpfs at /dev done Initializing /dev done Mounting devpts at /dev/pts done Boot logging started on /dev/ttyS1(/dev/console (deleted)) at Tue Jun 22 23:17:14 2010 Starting udevd: udevd version 128 started done Loading drivers, configuring devices: **** Context Switch from TID E000000180CE0000 to TID E00000028D070000 **** hwregs-0331 [E00000028D070000] [03] set_register : ----Entry 00000003 hwregs-0481 [E00000028D070000] [04] hw_register_read : ----Entry hwregs-0785 [E00000028D070000] [04] hw_low_level_read : Read: 00000011 width 16 from 0000000000000400 (SystemIO) hwregs-0563 [E00000028D070000] [04] hw_register_read : ----Exit- AE_OK hwregs-0597 [E00000028D070000] [04] hw_register_write : ----Entry hwregs-0481 [E00000028D070000] [05] hw_register_read : ----Entry hwregs-0785 [E00000028D070000] [05] hw_low_level_read : Read: 00000011 width 16 from 0000000000000400 (SystemIO) hwregs-0563 [E00000028D070000] [05] hw_register_read : ----Exit- AE_OK hwregs-0854 [E00000028D070000] [04] hw_low_level_write : Wrote: 00000100 width 16 to 0000000000000400 (SystemIO) hwregs-0717 [E00000028D070000] [04] hw_register_write : ----Exit- AE_OK hwregs-0456 [E00000028D070000] [03] set_register : Set bits: 00000100 actual 00000000 register 1 hwregs-0457 [E00000028D070000] [03] set_register : ----Exit- AE_OK hwregs-0331 [E00000028D070000] [03] set_register : ----Entry 0000000A hwregs-0481 [E00000028D070000] [04] hw_register_read : ----Entry hwregs-0785 [E00000028D070000] [04] hw_low_level_read : Read: 00004020 width 16 from 0000000000000402 (SystemIO) hwregs-0563 [E00000028D070000] [04] hw_register_read : ----Exit- AE_OK hwregs-0597 [E00000028D070000] [04] hw_register_write : ----Entry hwregs-0854 [E00000028D070000] [04] hw_low_level_write : Wrote: 00004120 width 16 to 0000000000000402 (SystemIO) hwregs-0717 [E00000028D070000] [04] hw_register_write : ----Exit- AE_OK hwregs-0456 [E00000028D070000] [03] set_register : Set bits: 00000001 actual 00000001 register 2 hwregs-0457 [E00000028D070000] [03] set_register : ----Exit- AE_OK hwregs-0267 [E00000028D070000] [03] get_register_unlocked : ----Entry hwregs-0481 [E00000028D070000] [04] hw_register_read : ----Entry hwregs-0785 [E00000028D070000] [04] hw_low_level_read : Read: 00004120 width 16 from 0000000000000402 (SystemIO) hwregs-0563 [E00000028D070000] [04] hw_register_read : ----Exit- AE_OK hwregs-0293 [E00000028D070000] [03] get_register_unlocked : Read value 00000001 register 2 hwregs-0296 [E00000028D070000] [03] get_register_unlocked : ----Exit- AE_OK input: Power Button (FF) as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 ACPI: Power Button (FF) [PWRF] Intel(R) Gigabit Ethernet Network Driver - version 1.2.45-k2 Copyright (c) 2008 Intel Corporation. igb 0000:05:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 63 sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray Uniform CD-ROM driver Revision: 3.20 sr 0:0:0:0: Attached scsi generic sg0 type 5 igb 0000:05:00.0: Intel(R) Gigabit Ethernet Network Connection igb 0000:05:00.0: eth0: (PCIe:2.5Gb/s:unknown) 00:23:7d:44:7e:70 igb 0000:05:00.0: eth0: PBA No: 1010ff-0ff igb 0000:05:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s) igb 0000:05:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 50 igb 0000:05:00.1: Intel(R) Gigabit Ethernet Network Connection igb 0000:05:00.1: eth1: (PCIe:2.5Gb/s:unknown) 00:23:7d:44:7e:71 igb 0000:05:00.1: eth1: PBA No: 1010ff-0ff igb 0000:05:00.1: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s) igb 0000:06:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 65 igb 0000:06:00.0: Intel(R) Gigabit Ethernet Network Connection igb 0000:06:00.0: eth2: (PCIe:2.5Gb/s:unknown) 00:23:7d:44:8e:38 igb 0000:06:00.0: eth2: PBA No: 1010ff-0ff igb 0000:06:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s) igb 0000:06:00.1: PCI INT B -> GSI 19 (level, low) -> IRQ 73 igb 0000:06:00.1: Intel(R) Gigabit Ethernet Network Connection igb 0000:06:00.1: eth3: (PCIe:2.5Gb/s:unknown) 00:23:7d:44:8e:39 igb 0000:06:00.1: eth3: PBA No: 1010ff-0ff igb 0000:06:00.1: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s) done Loading required kernel modules doneActivating swap-devices in /etc/fstab... Adding 2106432k swap on /dev/cciss/c0d0p2. Priority:-1 extents:1 across:2106432k doneSetting up the hardware clock done Activating device mapper... device-mapper: uevent: version 1.0.3 device-mapper: ioctl: 4.14.0-ioctl (2008-04-23) initialised: dm-devel在redhat.com done Checking file systems... fsck 1.41.1 (01-Sep-2008) Checking all file systems. done done Mounting local file systems... /proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) debugfs on /sys/kernel/debug type debugfs (rw) udev on /dev type tmpfs (rw) loop: module loaded devpts on /dev/pts type devpts (rw,mode=0620,gid=5) /dev/cciss/c0d0p1 on /boot/efi type vfat (rw) doneActivating remaining swap-devices in /etc/fstab... doneSetting current sysctl status from /etc/sysctl.conf done Enabling syn flood protection done Disabling IP forwarding done done Turning quota on Checking quotas. This may take some time. done Starting ia32el done fuse init (API version 7.9) Loading fuse module done Mounting fuse control filesystem done JBD: barrier-based sync failed on cciss/c0d0p4 - disabling barriers Creating /var/log/boot.msg donetype=1505 audit(1277270240.032:2): operation="profile_load" name="/bin/ping" name2="default" pid=2020 type=1505 audit(1277270240.124:3): operation="profile_load" name="/sbin/klogd" name2="default" pid=2072 Setting up hostname 'linux-rru8' done Setting up loopback interface lo lo IP address: 127.0.0.1/8 IP address: 127.0.0.2/8 done type=1505 audit(1277270240.256:4): operation="profile_load" name="/sbin/syslog-ng" name2="default" pid=2082 type=1505 audit(1277270240.400:5): operation="profile_load" name="/sbin/syslogd" name2="default" pid=2103 type=1505 audit(1277270240.544:6): operation="profile_load" name="/usr/sbin/avahi-daemon" name2="default" pid=2104 Loading kdump Invalid kernel image: /boot/vmlinuz-2.6.27.19-5-bobdebug skipped Mounting securityfs on /sys/kernel/security done Loading AppArmor profiles type=1505 audit(1277270240.680:7): operation="profile_load" name="/usr/sbin/identd" name2="default" pid=2105 type=1505 audit(1277270240.824:8): operation="profile_load" name="/usr/sbin/mdnsd" name2="default" pid=2107 type=1505 audit(1277270240.968:9): operation="profile_load" name="/usr/sbin/nscd" name2="default" pid=2108 type=1505 audit(1277270241.156:10): operation="profile_load" name="/usr/sbin/ntpd" name2="default" pid=2109 type=1505 audit(1277270241.280:11): operation="profile_load" name="/usr/sbin/traceroute" name2="default" pid=2110 done System Boot Control: The system has been set up Skipped features: boot.cycle boot.kdump System Boot Control: Running /etc/init.d/boot.local done INIT: Entering runlevel: 3 Boot logging started on /dev/ttyS1(/dev/console) at Tue Jun 22 23:17:21 2010 Master Resource Control: previous runlevel: N, switching to runlevel: 3 Initializing random number generator done Starting salinfo daemon done acpid: starting up Starting acpid done acpid: 2 rules loaded Starting syslog services done Starting D-Bus daemon done ipmi message handler version 39.2 IPMI System Interface driver. ipmi_si: Trying ACPI-specified bt state machine at mem address 0xef88c000, slave address 0x0, irq 17 acpi-cpufreq: CPU0 - ACPI performance management activated. acpi-cpufreq: CPU1 - ACPI performance management activated. acpi-cpufreq: CPU2 - ACPI performance management activated. acpi-cpufreq: CPU3 - ACPI performance management activated. acpi-cpufreq: CPU4 - ACPI performance management activated. acpi-cpufreq: CPU5 - ACPI performance management activated. acpi-cpufreq: CPU6 - ACPI performance management activated. acpi-cpufreq: CPU7 - ACPI performance management activated. igb 0000:05:00.0: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX NET: Registered protocol family 17 ipmi_si: ipmi_si unable to claim interrupt 17, running polled IPMI BT: req2rsp=6 secs retries=2 ipmi: Found new BMC (man_id: 0x00000b, prod_id: 0x8203, dev_id: 0x33) IPMI bt interface initialized Loading CPUFreq modules done Starting HAL daemon done ipmi device interface Setting up (localfs) network interfaces: lo lo IP address: 127.0.0.1/8 IP address: 127.0.0.2/8 done eth0 device: Intel Corporation 82575EB Gigabit Network Connection (rev 02) eth0 Starting DHCP4 client. eth0 IP address: 10.100.6.72/9 (sentosapp0) done eth1 device: Intel Corporation 82575EB Gigabit Network Connection (rev 02) No configuration found for eth1 unused eth2 device: Intel Corporation 82575EB Gigabit Network Connection (rev 02) No configuration found for eth2 unused eth3 device: Intel Corporation 82575EB Gigabit Network Connection (rev 02) No configuration found for eth3 unusedSetting up service (localfs) network . . . . . . . . . . done Mount CIFS File Systems unused Starting rpcbind done Starting auditd done Not starting NFS client services - no NFS found in /etc/fstab: unused Start HP IPMI caching daemon 'hpipmid': done Start HP RAS daemon 'hprasd': done Loading console font lat9w-16.psfu -m trivial G0:loadable doneLoading keymap assuming iso-8859-15 euro Loading /usr/share/kbd/keymaps/i386/qwerty/us.map.gz doneLoading compose table latin1.add done Start Unicode mode doneStarting irqbalance done Starting Name Service Cache Daemon done Starting cupsd done Starting smartd unused Starting SSH daemon done Setting up (remotefs) network interfaces: Setting up service (remotefs) network . . . . . . . . . . done Starting INET services. (xinetd) done Starting mail service (Postfix) done Starting CRON daemon done Master Resource Control: runlevel 3 has been reached Skipped services in runlevel 3: smbfs nfs smartd splash Welcome to SUSE Linux Enterprise Server 11 (ia64) - Kernel 2.6.27.19-5-bobdebug (console). sentosapp0 login: root Password: From kongjianjun在gmail.com Fri Jun 25 06:35:05 2010 From: kongjianjun在gmail.com (Amos Kong) Date: Fri, 25 Jun 2010 06:35:05 +0800 Subject: =?GB2312?B?UmU6ILnY09rTyrz+wdCx7c7KzOI=?= In-Reply-To: References: Message-ID: 2010/6/23 anzhou hou : > 请问为什么在我订阅邮件列表1个月后就收不到来自邮件列表的任何邮件?谢谢! 要不试一下,直接在这里订阅? https://groups.google.com/group/zh-kernel/subscribe 好像只能设置订阅汇总邮件 From me在kaio.net Fri Jun 25 08:34:05 2010 From: me在kaio.net (Caius 'kaio' Chance) Date: Fri, 25 Jun 2010 10:34:05 +1000 Subject: =?UTF-8?B?UmU6IOaAjuS5iOWlveS5hemDveayoeacieWPl+WIsOmCruS7tuWIl+ihqOWPkeadpeeahA==?= =?UTF-8?B?6YKu5Lu277yf?= In-Reply-To: <1925572032.290100.1277283635044.JavaMail.neverforget_2002@163.com> References: <1925572032.290100.1277283635044.JavaMail.neverforget_2002@163.com> Message-ID: 2010/6/23 CL2 > 如题,大家收到了么? > > I received this morning 20+ emails at once. -- Caius 'kaio' Chance / かいお From sinyer在gmail.com Fri Jun 25 08:43:56 2010 From: sinyer在gmail.com (sinyer在gmail.com) Date: Fri, 25 Jun 2010 08:43:56 +0800 (CST) Subject: =?utf-8?B?UmU6UmU6IOaAjuS5iOWlveS5hemDveayoQ==?= =?utf-8?B?5pyJ5Y+X5Yiw6YKu5Lu25YiX6KGo5Y+R5p2l55qE6YKu5Lu277yf?= In-Reply-To: References: <1925572032.290100.1277283635044.JavaMail.neverforget_2002@163.com> Message-ID: <2cdec8de.1252.1296c8f952f.Coremail.lisan04@163.com> 我也一样 >2010/6/23 CL2 > >> 如题,大家收到了么? >> >> >I received this morning 20+ emails at once. > >-- >Caius 'kaio' Chance / かいお >_______________________________________________ >Linux 内核开发中文邮件列表 >Linux-kernel在zh-kernel.org >http://zh-kernel.org/mailman/listinfo/linux-kernel >Linux 内核开发中文社区: http://zh-kernel.org From linux-kernel在rigui.org Fri Jun 25 09:31:15 2010 From: linux-kernel在rigui.org (kernel linux) Date: Fri, 25 Jun 2010 09:31:15 +0800 Subject: =?GB2312?B?UmU6IFJlOiDU9cO0usO+w7a8w7vT0Mrctb3Tyrz+wdCx7bei?= =?GB2312?B?wLS1xNPKvP6jvw==?= In-Reply-To: <2cdec8de.1252.1296c8f952f.Coremail.lisan04@163.com> References: <1925572032.290100.1277283635044.JavaMail.neverforget_2002@163.com> <2cdec8de.1252.1296c8f952f.Coremail.lisan04@163.com> Message-ID: 是不是邮件有问题呀。 还是? 在 2010年6月25日 上午8:43, 写道: > 我也一样 > >2010/6/23 CL2 > > > >> 如题,大家收到了么? > >> > >> > >I received this morning 20+ emails at once. > > > >-- > >Caius 'kaio' Chance / かいお > >_______________________________________________ > >Linux 内核开发中文邮件列表 > >Linux-kernel在zh-kernel.org > >http://zh-kernel.org/mailman/listinfo/linux-kernel > >Linux 内核开发中文社区: http://zh-kernel.org > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > From linux-kernel在rigui.org Fri Jun 25 09:34:35 2010 From: linux-kernel在rigui.org (kernel linux) Date: Fri, 25 Jun 2010 09:34:35 +0800 Subject: =?GB2312?B?udjT2rvYtfe6r8r9tcTP1sq1?= Message-ID: hi all. 我这几天正在学习回调函数,谁有一个这个方面的小例子, 帮助理解。 谢谢~ From helight在zhwen.org Fri Jun 25 09:32:53 2010 From: helight在zhwen.org (helight) Date: Fri, 25 Jun 2010 09:32:53 +0800 Subject: =?UTF-8?B?5pyJ5YWzaW5zbW9k55qE6Zeu6aKY?= In-Reply-To: References: Message-ID: <4C240745.3060504@zhwen.org> 富满堂 wrote: > hi,大家好 > 我今天insmod一个模块产生如下错误,百思不得其解,请高手帮忙看看这些打印信息是什么意思。 > 谢谢。 > [root在localhost home]# insmod g_***.ko > [ 27.092663] ------------[ cut here ]------------ > [ 27.092691] kernel BUG at net/core/dev.c:4795! > [ 27.092700] invalid opcode: 0000 [#1] PREEMPT SMP > [ 27.092713] last sysfs file: /sys/devices/pci0000:00/uevent > [ 27.092721] Modules linked in: g_nokia(+) > [ 27.092735] > [ 27.092745] Pid: 657, comm: insmod Not tainted 2.6.33.2 #3 / > [ 27.092755] EIP: 0060:[] EFLAGS: 00010206 CPU: 1 > [ 27.092780] EIP is at rollback_registered_many+0x2b9/0x310 > [ 27.092788] EAX: 00000003 EBX: da59d800 ECX: d92c6000 EDX: d92c7e74 > [ 27.092796] ESI: d92c7e30 EDI: cf532ec0 EBP: d92c7e60 ESP: d92c7e3c > [ 27.092805] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 > [ 27.092815] Process insmod (pid: 657, ti=d92c6000 task=d9185490 task.ti=d92c6000) > [ 27.092823] Stack: > [ 27.092828] c0c5d6f4 c0c5d6e0 d9185490 d92c7e74 22222222 22222222 da59d800 00000000 > [ 27.092851] <0> cf532ec0 d92c7e84 c0715d0f d92c7e7c c0878085 c0720d3f da59d844 da59d844 > [ 27.092875] <0> da59d800 dc006e08 d92c7e90 c0715d74 cf532ee4 d92c7e98 e9d2f32d d92c7ee0 > [ 27.092901] Call Trace: > [ 27.092916] [] ? unregister_netdevice_queue+0x5f/0xb0 > [ 27.092929] [] ? mutex_lock_nested+0x35/0x40 > [ 27.092941] [] ? rtnl_lock+0xf/0x20 > [ 27.092951] [] ? unregister_netdev+0x14/0x20 > [ 27.092977] [] ? nokia_unbind+0xd/0x21 [g_nokia] > [ 27.092995] [] ? composite_unbind+0xf8/0x210 [g_nokia] > [ 27.093007] [] ? rtnl_unlock+0x8/0x10 > [ 27.093024] [] ? composite_bind+0x307/0x318 [g_nokia] > [ 27.093038] [] ? usb_gadget_register_driver+0x94/0x1a0 > [ 27.093049] [] ? usb_gadget_register_driver+0x99/0x1a0 > [ 27.093064] [] ? __blocking_notifier_call_chain+0x4d/0x60 > [ 27.093081] [] ? nokia_init+0x0/0xf [g_nokia] > [ 27.093098] [] ? usb_composite_register+0x49/0x58 [g_nokia] > [ 27.093115] [] ? nokia_init+0xd/0xf [g_nokia] > [ 27.093127] [] ? do_one_initcall+0x23/0x170 > [ 27.093138] [] ? blocking_notifier_call_chain+0x1a/0x20 > [ 27.093151] [] ? sys_init_module+0xb3/0x220 > [ 27.093164] [] ? sys_close+0x70/0xc0 > [ 27.093175] [] ? sysenter_do_call+0x12/0x31 > [ 27.093182] Code: c3 90 89 44 24 04 c7 04 24 3c 9d b8 c0 e8 5c 07 16 00 e9 3f ff ff ff ba dc 12 00 00 b8 67 42 b8 c0 e8 4c 6b a2 > ff e9 6d ff ff ff <0f> 0b eb fe 8d 76 00 c7 44 24 08 e6 00 00 00 c7 44 24 04 67 42 > [ 27.093334] EIP: [] rollback_registered_many+0x2b9/0x310 SS:ESP 0068:d92c7e3c > [ 27.093363] ---[ end trace 407b3abc7f737788 ]--- > Segmentation fault 这种错误一般是你的指针处理没有处理好!出现使用非法越界! 你可以跟踪调试一下,把这个语句先定位出来! [root在localhost home]# insmod g_***.ko 你这个***是什么意思啊 g_nokia > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- ------------------ Zhenwen Xu - Open and Free Home Page: http://zhwen.org My Studio: http://dim4.cn From adam8157在gmail.com Fri Jun 25 09:49:21 2010 From: adam8157在gmail.com (Adam Lee) Date: Fri, 25 Jun 2010 09:49:21 +0800 Subject: =?UTF-8?B?UmU6IOWFs+S6juWbnuiwg+WHveaVsOeahOeOsOWung==?= In-Reply-To: References: Message-ID: 2010/6/25 kernel linux : >   我这几天正在学习回调函数,谁有一个这个方面的小例子, signal()就是. 顺便插句嘴, 几乎所有的中文搜索结果都把回调函数解释的无比晦涩. 其实简单点说就是, 回调函数的一部分要由你自己提供的函数来实现. -- Regards, Adam Lee -------------------------------------------------- E-mail: adam8157在gmail.com Website: http://www.adam8157.info -------------------------------------------------- From helight在zhwen.org Fri Jun 25 09:53:31 2010 From: helight在zhwen.org (helight) Date: Fri, 25 Jun 2010 09:53:31 +0800 Subject: =?UTF-8?B?5YWz5LqO5Zue6LCD5Ye95pWw55qE546w5a6e?= In-Reply-To: References: Message-ID: <4C240C1B.6060405@zhwen.org> kernel linux wrote: > hi all. > 我这几天正在学习回调函数,谁有一个这个方面的小例子, > 帮助理解。 > 谢谢~ http://zhwen.org/coding/mytasklet.c > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- ------------------ Zhenwen Xu - Open and Free Home Page: http://zhwen.org My Studio: http://dim4.cn From helight在zhwen.org Fri Jun 25 09:57:32 2010 From: helight在zhwen.org (helight) Date: Fri, 25 Jun 2010 09:57:32 +0800 Subject: =?UTF-8?B?5rGC5Yqp77yMYXJtLWxpbnV45YaF5qC45Lit5L2/55So5rWu54K5?= =?UTF-8?B?55So566X6Zeu6aKY44CC?= In-Reply-To: <11a65e9.f59f.12949e11bc1.Coremail.neverforget_2002@163.com> References: <11a65e9.f59f.12949e11bc1.Coremail.neverforget_2002@163.com> Message-ID: <4C240D0C.2040302@zhwen.org> 崔磊 wrote: > 大家好,我在做一个项目需要在linux内核中添加一个算法模块,开发平台是pxa270芯片+arm-linux2.6.9 ,使用arm-linux-gcc3.4.6编译。编译内核时出现大量错误,摘取如下: > > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:106: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:107: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__mulsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__extendsfdf2' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__adddf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__fixdfsi' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:112: undefined reference to `__floatsisf' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:115: undefined reference to `__mulsf3' > 。。。。。。 > > 分析后发现可能是因为PXA270不支持浮点运算导致。但我在编译器加了-msoft-float选项,并且内核配置了NWPFE项。 > 但现在问题依然存在。麻烦大家帮忙指点,万分感谢!!! > 根据LineInterpolation.c所引用的头文件和__divsf3这些符号,grep一下你的内核源码找 找是属于那个模块的,应该是这个模块没有编译出来,找到后再编译项中选择,然后再编译 内核,再编译你的模块! > > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- ------------------ Zhenwen Xu - Open and Free Home Page: http://zhwen.org My Studio: http://dim4.cn From xiyou.wangcong在gmail.com Fri Jun 25 10:53:01 2010 From: xiyou.wangcong在gmail.com (=?utf-8?Q?Am=C3=A9rico?= Wang) Date: Fri, 25 Jun 2010 10:53:01 +0800 Subject: =?utf-8?B?5pyJ5YWzaW5zbW9k55qE6Zeu6aKY?= In-Reply-To: References: Message-ID: <20100625025301.GA5189@cr0.nay.redhat.com> On Mon, Jun 21, 2010 at 05:58:37PM +0800, 富满堂 wrote: >hi,大家好 > 我今天insmod一个模块产生如下错误,百思不得其解,请高手帮忙看看这些打印信息是什么意思。 > 谢谢。 > [root在localhost home]# insmod g_***.ko >[ 27.092663] ------------[ cut here ]------------ >[ 27.092691] kernel BUG at net/core/dev.c:4795! 触发了一个BUG_ON(),在net/core/dev.c的第4795行。 最新的tree中不是对应这一行,但应该是附近的,所以应该是rollback_register_many() 中的BUG_ON(dev_boot_phase);,它的意思是你不应该在启动时调用这个函数。 >[ 27.092700] invalid opcode: 0000 [#1] PREEMPT SMP >[ 27.092713] last sysfs file: /sys/devices/pci0000:00/uevent >[ 27.092721] Modules linked in: g_nokia(+) >[ 27.092735] >[ 27.092745] Pid: 657, comm: insmod Not tainted 2.6.33.2 #3 / >[ 27.092755] EIP: 0060:[] EFLAGS: 00010206 CPU: 1 >[ 27.092780] EIP is at rollback_registered_many+0x2b9/0x310 >[ 27.092788] EAX: 00000003 EBX: da59d800 ECX: d92c6000 EDX: d92c7e74 >[ 27.092796] ESI: d92c7e30 EDI: cf532ec0 EBP: d92c7e60 ESP: d92c7e3c >[ 27.092805] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 >[ 27.092815] Process insmod (pid: 657, ti=d92c6000 task=d9185490 task.ti=d92c6000) >[ 27.092823] Stack: >[ 27.092828] c0c5d6f4 c0c5d6e0 d9185490 d92c7e74 22222222 22222222 da59d800 00000000 >[ 27.092851] <0> cf532ec0 d92c7e84 c0715d0f d92c7e7c c0878085 c0720d3f da59d844 da59d844 >[ 27.092875] <0> da59d800 dc006e08 d92c7e90 c0715d74 cf532ee4 d92c7e98 e9d2f32d d92c7ee0 >[ 27.092901] Call Trace: >[ 27.092916] [] ? unregister_netdevice_queue+0x5f/0xb0 >[ 27.092929] [] ? mutex_lock_nested+0x35/0x40 >[ 27.092941] [] ? rtnl_lock+0xf/0x20 >[ 27.092951] [] ? unregister_netdev+0x14/0x20 >[ 27.092977] [] ? nokia_unbind+0xd/0x21 [g_nokia] >[ 27.092995] [] ? composite_unbind+0xf8/0x210 [g_nokia] >[ 27.093007] [] ? rtnl_unlock+0x8/0x10 >[ 27.093024] [] ? composite_bind+0x307/0x318 [g_nokia] >[ 27.093038] [] ? usb_gadget_register_driver+0x94/0x1a0 >[ 27.093049] [] ? usb_gadget_register_driver+0x99/0x1a0 >[ 27.093064] [] ? __blocking_notifier_call_chain+0x4d/0x60 >[ 27.093081] [] ? nokia_init+0x0/0xf [g_nokia] >[ 27.093098] [] ? usb_composite_register+0x49/0x58 [g_nokia] >[ 27.093115] [] ? nokia_init+0xd/0xf [g_nokia] >[ 27.093127] [] ? do_one_initcall+0x23/0x170 >[ 27.093138] [] ? blocking_notifier_call_chain+0x1a/0x20 >[ 27.093151] [] ? sys_init_module+0xb3/0x220 >[ 27.093164] [] ? sys_close+0x70/0xc0 >[ 27.093175] [] ? sysenter_do_call+0x12/0x31 >[ 27.093182] Code: c3 90 89 44 24 04 c7 04 24 3c 9d b8 c0 e8 5c 07 16 00 e9 3f ff ff ff ba dc 12 00 00 b8 67 42 b8 c0 e8 4c 6b a2 > ff e9 6d ff ff ff <0f> 0b eb fe 8d 76 00 c7 44 24 08 e6 00 00 00 c7 44 24 04 67 42 >[ 27.093334] EIP: [] rollback_registered_many+0x2b9/0x310 SS:ESP 0068:d92c7e3c >[ 27.093363] ---[ end trace 407b3abc7f737788 ]--- 但你这个call trace不是在boot阶段出现的,而只是一个普通的module_init。。。 从调用composite_unbind()来看应该是composite_bind()中某个地方出错。 From neverforget_2002在163.com Fri Jun 25 10:50:24 2010 From: neverforget_2002在163.com (CL2) Date: Fri, 25 Jun 2010 10:50:24 +0800 Subject: =?UTF-8?B?UmXvvJpSZTog5rGC5Yqp77yMYXJtLWxpbnV45YaF5qC45Lit5L2/55So5rWu54K555So566X6Zeu6aKY44CC?= Message-ID: <765076041.8323.1277434226467.JavaMail.neverforget_2002@163.com> 2010-06-25 CL2 发件人: "CL2" 发送时间: 2010-06-25 10:09 主 题: 回复: Re: 求助,arm-linux内核中使用浮点用算问题。 收件人: "helight" __divsf3这个符号是一句除法代码汇编后生成的,这个符号在libgcc.a中定义。我在makefile中加入了-lgcc,编译后问题依旧。加入了-lm后产生新的错误:说tmp.vmlinux1用的是硬浮点而当前连接的*.o文件是用软浮点。 另:求arm-linux-gcc4.0以上版本的下载地址 2010-06-25 CL2 发件人: helight 发送时间: 2010-06-25 09:59 主 题: Re: 求助,arm-linux内核中使用浮点用算问题。 收件人: 崔磊 抄 送: linux-kernel在zh-kernel.org 崔磊 wrote: > 大家好,我在做一个项目需要在linux内核中添加一个算法模块,开发平台是pxa270芯片+arm-linux2.6.9 ,使用arm-linux-gcc3.4.6编译。编译内核时出现大量错误,摘取如下: > > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:106: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:107: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__mulsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__extendsfdf2' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__adddf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__fixdfsi' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:112: undefined reference to `__floatsisf' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:115: undefined reference to `__mulsf3' > 。。。。。。 > > 分析后发现可能是因为PXA270不支持浮点运算导致。但我在编译器加了-msoft-float选项,并且内核配置了NWPFE项。 > 但现在问题依然存在。麻烦大家帮忙指点,万分感谢!!! > 根据LineInterpolation.c所引用的头文件和__divsf3这些符号,grep一下你的内核源码找 找是属于那个模块的,应该是这个模块没有编译出来,找到后再编译项中选择,然后再编译 内核,再编译你的模块! > > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- ------------------ Zhenwen Xu - Open and Free Home Page: http://zhwen.org My Studio: http://dim4.cn From neverforget_2002在163.com Fri Jun 25 11:17:48 2010 From: neverforget_2002在163.com (CL2) Date: Fri, 25 Jun 2010 11:17:48 +0800 Subject: =?UTF-8?B?5Zue5aSNOiAgUmU6IOaxguWKqe+8jGFybS1saW51eOWGheaguOS4reS9v+eUqOa1rueCueeUqOeul+mXrumimOOAgg==?= Message-ID: <590801310.10051.1277435869187.JavaMail.neverforget_2002@163.com> 你好,CFLAS加入-mfpu=vfp后编译报错,说是无效选项。 另:我将编译器升级到arm-none-linux-gnueabi-gcc4.4.1,编译报错: cc1: error: unrecognized command line option "-mapcs-32" cc1: error: unrecognized command line option "-mshort-load-bytes" 2010-06-25 CL2 发件人: liang yu 发送时间: 2010-06-24 21:05 主 题: Re: 求助,arm-linux内核中使用浮点用算问题。 收件人: 崔磊 2010/6/17 崔磊 大家好,我在做一个项目需要在linux内核中添加一个算法模块,开发平台是pxa270芯片+arm-linux2.6.9 ,使用arm-linux-gcc3.4.6编译。编译内核时出现大量错误,摘取如下: RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:106: undefined reference to `__divsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:107: undefined reference to `__divsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__mulsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__divsf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__extendsfdf2' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__adddf3' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__fixdfsi' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:112: undefined reference to `__floatsisf' RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:115: undefined reference to `__mulsf3' 。。。。。。 分析后发现可能是因为PXA270不支持浮点运算导致。但我在编译器加了-msoft-float选项,并且内核配置了NWPFE项。 但现在问题依然存在。麻烦大家帮忙指点,万分感谢!!! _______________________________________________ Linux 内核开发中文邮件列表 Linux-kernel在zh-kernel.org http://zh-kernel.org/mailman/listinfo/linux-kernel Linux 内核开发中文社区: http://zh-kernel.org 试试 -mfpu=vfp From zoleooo在hotmail.com Fri Jun 25 11:21:15 2010 From: zoleooo在hotmail.com (zhangleo) Date: Fri, 25 Jun 2010 03:21:15 +0000 Subject: =?gb2312?B?UkU6ILvYuLQ6ICBS?= =?gb2312?B?ZTogx/PW+qOsYXJtLQ==?= =?gb2312?B?bGludXjE2rrL1tDKudPD?= =?gb2312?B?uKG149PDy+POyszioaM=?= In-Reply-To: <590801310.10051.1277435869187.JavaMail.neverforget_2002@163.com> References: <590801310.10051.1277435869187.JavaMail.neverforget_2002@163.com> Message-ID: linux内核不支持浮点计算,为什么要在内核中加入浮点运算呢 > Date: Fri, 25 Jun 2010 11:17:48 +0800 > From: neverforget_2002在163.com > To: iamyuliang在gmail.com > Subject: 回复: Re: 求助,arm-linux内核中使用浮点用算问题。 > CC: linux-kernel在zh-kernel.org > > 你好,CFLAS加入-mfpu=vfp后编译报错,说是无效选项。 > 另:我将编译器升级到arm-none-linux-gnueabi-gcc4.4.1,编译报错: > cc1: error: unrecognized command line option "-mapcs-32" > cc1: error: unrecognized command line option "-mshort-load-bytes" > > 2010-06-25 > > > > CL2 > > > > 发件人: liang yu > 发送时间: 2010-06-24 21:05 > 主 题: Re: 求助,arm-linux内核中使用浮点用算问题。 > 收件人: 崔磊 > > > > > > > 2010/6/17 崔磊 > > 大家好,我在做一个项目需要在linux内核中添加一个算法模块,开发平台是pxa270芯片+arm-linux2.6.9 ,使用arm-linux-gcc3.4.6编译。编译内核时出现大量错误,摘取如下: > > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:106: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:107: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__mulsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__extendsfdf2' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__adddf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__fixdfsi' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:112: undefined reference to `__floatsisf' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:115: undefined reference to `__mulsf3' > 。。。。。。 > > 分析后发现可能是因为PXA270不支持浮点运算导致。但我在编译器加了-msoft-float选项,并且内核配置了NWPFE项。 > 但现在问题依然存在。麻烦大家帮忙指点,万分感谢!!! > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > 试试 -mfpu=vfp > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org _________________________________________________________________ 想知道明天天气如何?必应告诉你! http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5&form=MICHJ2 From zoleooo在hotmail.com Fri Jun 25 11:32:24 2010 From: zoleooo在hotmail.com (zhangleo) Date: Fri, 25 Jun 2010 03:32:24 +0000 Subject: =?gb2312?B?UkU6INPQudhpbnNt?= =?gb2312?B?b2S1xM7KzOI=?= In-Reply-To: References: Message-ID: [ 27.092691] kernel BUG at net/core/dev.c:4795! [ 27.092700] invalid opcode: 0000 [#1] PREEMPT SMP [ 27.092713] last sysfs file: /sys/devices/pci0000:00/uevent [ 27.092721] Modules linked in: g_nokia(+) 看着像内核模块在调用函数指针时,指针为空 > From: jiuxian_chu在foxmail.com > To: linux-kernel在zh-kernel.org > Subject: 有关insmod的问题 > Date: Mon, 21 Jun 2010 17:58:37 +0800 > > hi,大家好 > 我今天insmod一个模块产生如下错误,百思不得其解,请高手帮忙看看这些打印信息是什么意思。 > 谢谢。 > [root在localhost home]# insmod g_***.ko > [ 27.092663] ------------[ cut here ]------------ > [ 27.092691] kernel BUG at net/core/dev.c:4795! > [ 27.092700] invalid opcode: 0000 [#1] PREEMPT SMP > [ 27.092713] last sysfs file: /sys/devices/pci0000:00/uevent > [ 27.092721] Modules linked in: g_nokia(+) > [ 27.092735] > [ 27.092745] Pid: 657, comm: insmod Not tainted 2.6.33.2 #3 / > [ 27.092755] EIP: 0060:[] EFLAGS: 00010206 CPU: 1 > [ 27.092780] EIP is at rollback_registered_many+0x2b9/0x310 > [ 27.092788] EAX: 00000003 EBX: da59d800 ECX: d92c6000 EDX: d92c7e74 > [ 27.092796] ESI: d92c7e30 EDI: cf532ec0 EBP: d92c7e60 ESP: d92c7e3c > [ 27.092805] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 > [ 27.092815] Process insmod (pid: 657, ti=d92c6000 task=d9185490 task.ti=d92c6000) > [ 27.092823] Stack: > [ 27.092828] c0c5d6f4 c0c5d6e0 d9185490 d92c7e74 22222222 22222222 da59d800 00000000 > [ 27.092851] <0> cf532ec0 d92c7e84 c0715d0f d92c7e7c c0878085 c0720d3f da59d844 da59d844 > [ 27.092875] <0> da59d800 dc006e08 d92c7e90 c0715d74 cf532ee4 d92c7e98 e9d2f32d d92c7ee0 > [ 27.092901] Call Trace: > [ 27.092916] [] ? unregister_netdevice_queue+0x5f/0xb0 > [ 27.092929] [] ? mutex_lock_nested+0x35/0x40 > [ 27.092941] [] ? rtnl_lock+0xf/0x20 > [ 27.092951] [] ? unregister_netdev+0x14/0x20 > [ 27.092977] [] ? nokia_unbind+0xd/0x21 [g_nokia] > [ 27.092995] [] ? composite_unbind+0xf8/0x210 [g_nokia] > [ 27.093007] [] ? rtnl_unlock+0x8/0x10 > [ 27.093024] [] ? composite_bind+0x307/0x318 [g_nokia] > [ 27.093038] [] ? usb_gadget_register_driver+0x94/0x1a0 > [ 27.093049] [] ? usb_gadget_register_driver+0x99/0x1a0 > [ 27.093064] [] ? __blocking_notifier_call_chain+0x4d/0x60 > [ 27.093081] [] ? nokia_init+0x0/0xf [g_nokia] > [ 27.093098] [] ? usb_composite_register+0x49/0x58 [g_nokia] > [ 27.093115] [] ? nokia_init+0xd/0xf [g_nokia] > [ 27.093127] [] ? do_one_initcall+0x23/0x170 > [ 27.093138] [] ? blocking_notifier_call_chain+0x1a/0x20 > [ 27.093151] [] ? sys_init_module+0xb3/0x220 > [ 27.093164] [] ? sys_close+0x70/0xc0 > [ 27.093175] [] ? sysenter_do_call+0x12/0x31 > [ 27.093182] Code: c3 90 89 44 24 04 c7 04 24 3c 9d b8 c0 e8 5c 07 16 00 e9 3f ff ff ff ba dc 12 00 00 b8 67 42 b8 c0 e8 4c 6b a2 > ff e9 6d ff ff ff <0f> 0b eb fe 8d 76 00 c7 44 24 08 e6 00 00 00 c7 44 24 04 67 42 > [ 27.093334] EIP: [] rollback_registered_many+0x2b9/0x310 SS:ESP 0068:d92c7e3c > [ 27.093363] ---[ end trace 407b3abc7f737788 ]--- > Segmentation fault > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org _________________________________________________________________ 想知道明天天气如何?必应告诉你! http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5&form=MICHJ2 From zoleooo在hotmail.com Fri Jun 25 11:33:22 2010 From: zoleooo在hotmail.com (zhangleo) Date: Fri, 25 Jun 2010 03:33:22 +0000 Subject: =?gb2312?B?UkU6ILnY09psaW51?= =?gb2312?B?eMTausu6r8r9sum/tKGj?= In-Reply-To: References: <201006131033422817672@126.com>, Message-ID: cat /proc/kallsyms > Date: Mon, 21 Jun 2010 14:24:47 +0800 > Subject: Re: 关于linux内核函数查看。 > From: shaobei.guo在gmail.com > To: lewis_amu在126.com > CC: linux-kernel在zh-kernel.org > > 2010/6/13 lewis > > > 可以直接在源码目录里面看到内核提供了那些可以使用的内核函数么? > > > > > http://lwn.net/Articles/2.6-kernel-api/ > > -- > Thanks, > Shaobei > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org _________________________________________________________________ 一张照片的自白――Windows Live照片的可爱视频介绍 http://windowslivesky.spaces.live.com/blog/cns!5892B6048E2498BD!889.entry From zoleooo在hotmail.com Fri Jun 25 11:35:57 2010 From: zoleooo在hotmail.com (zhangleo) Date: Fri, 25 Jun 2010 03:35:57 +0000 Subject: =?gb2312?B?UkU6ILnY09ogc2tf?= =?gb2312?B?YnVmZiC3osvNyv2+3bD8?= =?gb2312?B?IMjnus7WuLaozfi/qA==?= In-Reply-To: References: Message-ID: 这个是要查路由表决定的 > Date: Tue, 15 Jun 2010 14:35:17 +0800 > Subject: 关于 sk_buff 发送数据包 如何指定网卡 > From: cellslab在gmail.com > To: Linux-kernel在zh-kernel.org > > 如题 > 内核版本2.6.32 > 函数 skb_dst_set 是用来指定发包的 dst_entry 的, > dst_entry 和网卡的关系是怎样的? > 怎样设置才能指定网卡发送 sk_buff? > > 谢谢 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org _________________________________________________________________ 约会说不清地方?来试试微软地图最新msn互动功能! http://ditu.live.com/?form=TL&swm=1 From neverforget_2002在163.com Fri Jun 25 11:38:21 2010 From: neverforget_2002在163.com (CL2) Date: Fri, 25 Jun 2010 11:38:21 +0800 Subject: =?UTF-8?B?5Zue5aSNOiAgUkU6IOWbnuWkjTogIFJlOiDmsYLliqnvvIxhcm0tbGludXjlhoXmoLjkuK3kvb/nlKjmta7ngrnnlKjnrpfpl67popjjgII=?= Message-ID: <1966936665.10410.1277437103335.JavaMail.neverforget_2002@163.com> 因为我用的系统是公司自己开发的实时linux,其中加入了一个实时内核,他和linux内核同处于内核域,而我要加入的算法模块必须和实时核写到一起才能被实时调度,所以导致了这种要在linux内核编译时遇到浮点运算的情况。 2010-06-25 CL2 发件人: zhangleo 发送时间: 2010-06-25 11:21 主 题: RE: 回复: Re: 求助,arm-linux内核中使用浮点用算问题。 收件人: , 抄 送: linux内核不支持浮点计算,为什么要在内核中加入浮点运算呢 > Date: Fri, 25 Jun 2010 11:17:48 +0800 > From: neverforget_2002在163.com > To: iamyuliang在gmail.com > Subject: 回复: Re: 求助,arm-linux内核中使用浮点用算问题。 > CC: linux-kernel在zh-kernel.org > > 你好,CFLAS加入-mfpu=vfp后编译报错,说是无效选项。 > 另:我将编译器升级到arm-none-linux-gnueabi-gcc4.4.1,编译报错: > cc1: error: unrecognized command line option "-mapcs-32" > cc1: error: unrecognized command line option "-mshort-load-bytes" > > 2010-06-25 > > > > CL2 > > > > 发件人: liang yu > 发送时间: 2010-06-24 21:05 > 主 题: Re: 求助,arm-linux内核中使用浮点用算问题。 > 收件人: 崔磊 > > > > > > > 2010/6/17 崔磊 > > 大家好,我在做一个项目需要在linux内核中添加一个算法模块,开发平台是pxa270芯片+arm-linux2.6.9 ,使用arm-linux-gcc3.4.6编译。编译内核时出现大量错误,摘取如下: > > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:106: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:107: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__mulsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__divsf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__extendsfdf2' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__adddf3' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__fixdfsi' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:112: undefined reference to `__floatsisf' > RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:115: undefined reference to `__mulsf3' > 。。。。。。 > > 分析后发现可能是因为PXA270不支持浮点运算导致。但我在编译器加了-msoft-float选项,并且内核配置了NWPFE项。 > 但现在问题依然存在。麻烦大家帮忙指点,万分感谢!!! > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > 试试 -mfpu=vfp > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org 搜索本应是彩色的,快来体验新一代搜索引擎-必应,精美图片每天换哦! 立即试用! From linux-kernel在rigui.org Fri Jun 25 11:59:55 2010 From: linux-kernel在rigui.org (kernel linux) Date: Fri, 25 Jun 2010 11:59:55 +0800 Subject: =?GB2312?B?UmU6ILnY09q72LX3uq/K/bXEz9bKtQ==?= In-Reply-To: References: Message-ID: 在 2010年6月25日 上午9:48,Adam Lee 写道: > signal()就是. > > 顺便插句嘴, 几乎所有的中文搜索结果都把回调函数解释的无比晦涩. 其实简单点说就是, 回调函数的一部分要由你自己提供的函数来实现. > 就是呀。很难理解,把问题复杂化。有没有相关的好文章或书。介绍 下了。 Thanks. > 2010/6/25 kernel linux : > > hi all. > > 我这几天正在学习回调函数,谁有一个这个方面的小例子, > > 帮助理解。 > > 谢谢~ > > _______________________________________________ > > Linux 内核开发中文邮件列表 > > Linux-kernel在zh-kernel.org > > http://zh-kernel.org/mailman/listinfo/linux-kernel > > Linux 内核开发中文社区: http://zh-kernel.org > > > > -- > Regards, > Adam Lee > -------------------------------------------------- > E-mail: adam8157在gmail.com > Website: http://www.adam8157.info > -------------------------------------------------- > From linux-kernel在rigui.org Fri Jun 25 12:03:37 2010 From: linux-kernel在rigui.org (kernel linux) Date: Fri, 25 Jun 2010 12:03:37 +0800 Subject: =?GB2312?B?UmU6ILnY09q72LX3uq/K/bXEz9bKtQ==?= In-Reply-To: <4C240C1B.6060405@zhwen.org> References: <4C240C1B.6060405@zhwen.org> Message-ID: Thanks。 把程序贴来出和大家一起分享: http://zhwen.org/coding/mytasklet.c ================= #include #include #include #include #include #include static int mycount = 0; static long mytime = 0; static int irq; static char *interface; module_param(interface,charp,0644); module_param(irq,int,0644); static struct tasklet_struct mytasklet; static void mylet(unsigned long data) { printk("mylet begin\n"); if(mycount==0) mytime=jiffies; if (mycount < 10) { mytime=jiffies-mytime; printk("Interrupt number %d --time %ld \n",irq,mytime); mytime=jiffies; } mycount++; return; } static irqreturn_t myinterrupt(int intno,void *dev_id) { tasklet_schedule(&mytasklet); return IRQ_NONE; } static int __init myirqtest_init(void) { static unsigned data=0; printk ("My module worked!\n"); tasklet_init(&mytasklet, mylet, data); //if (request_irq(irq,&myinterrupt,SA_SHIRQ,interface,&irq)) //for 2.6.22 if (request_irq(irq,&myinterrupt,IRQF_SHARED,interface,&irq)) //for 2.2.24 { printk(KERN_ERR "myirqtest: cannot register IRQ %d\n", irq); free_irq(irq,&irq); return -EIO; } printk("%s Request on IRQ %d succeeded\n",interface,irq); return 0; } static void __exit myirqtest_exit(void) { printk ("Unloading my module.\n"); tasklet_kill(&mytasklet); free_irq(irq,&irq); printk("Freeing IRQ %d\n", irq); return; } module_init(myirqtest_init); module_exit(myirqtest_exit); MODULE_LICENSE("GPL"); 在 2010年6月25日 上午9:53,helight 写道: > kernel linux wrote: > >> hi all. >> 我这几天正在学习回调函数,谁有一个这个方面的小例子, >> 帮助理解。 >> 谢谢~ >> > > http://zhwen.org/coding/mytasklet.c > > > _______________________________________________ >> Linux 内核开发中文邮件列表 >> Linux-kernel在zh-kernel.org >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> Linux 内核开发中文社区: http://zh-kernel.org >> > > > -- > ------------------ > Zhenwen Xu - Open and Free > Home Page: http://zhwen.org > My Studio: http://dim4.cn > From gong.liheng在gmail.com Fri Jun 25 12:04:09 2010 From: gong.liheng在gmail.com (Gong Liheng) Date: Fri, 25 Jun 2010 12:04:09 +0800 Subject: =?GB2312?B?xNq6y8jnus7KudPDyeixuLrFo78=?= Message-ID: 小弟最近在读内核驱动相关代码,在学习设备号的概念时,很多资料都提到这么一句话:内核通过设备号来指定正确的驱动程序给设备文件。请问这个“指定”的过程是在内核代码的哪个部分实现的?小弟追踪了很久,百思不得其解。 小弟初来乍到,提问有不当之处还请高手们多多指教 From zoleooo在hotmail.com Fri Jun 25 12:10:29 2010 From: zoleooo在hotmail.com (zhangleo) Date: Fri, 25 Jun 2010 04:10:29 +0000 Subject: =?gb2312?B?UkU6IMTausvI57rOyrnTww==?= =?gb2312?B?yeixuLrFo78=?= In-Reply-To: References: Message-ID: crw-rw-rw- 1 root root 1, 3 2009-10-27 22:20 /dev/null 每个设备文件都有对应的主设备号和子设备号,内核根据这个来定位到驱动程序和设备 > Date: Fri, 25 Jun 2010 12:04:09 +0800 > Subject: 内核如何使用设备号? > From: gong.liheng在gmail.com > To: linux-kernel在zh-kernel.org > > 小弟最近在读内核驱动相关代码,在学习设备号的概念时,很多资料都提到这么一句话:内核通过设备号来指定正确的驱动程序给设备文件。请问这个“指定”的过程是在内核代码的哪个部分实现的?小弟追踪了很久,百思不得其解。 > 小弟初来乍到,提问有不当之处还请高手们多多指教 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org _________________________________________________________________ 约会说不清地方?来试试微软地图最新msn互动功能! http://ditu.live.com/?form=TL&swm=1 From gong.liheng在gmail.com Fri Jun 25 12:29:56 2010 From: gong.liheng在gmail.com (Gong Liheng) Date: Fri, 25 Jun 2010 12:29:56 +0800 Subject: =?GB2312?B?UmU6IFJFOiDE2rrLyOe6zsq508PJ6LG4usWjvw==?= In-Reply-To: References: Message-ID: 谢谢您的回复。我想问的是这个“指定”的过程是在内核的哪部分代码实现的?也就是说,内核是如何通过设备号来定位到驱动程序的? On Jun 25, 2010 12:11 PM, "zhangleo" wrote: crw-rw-rw- 1 root root 1, 3 2009-10-27 22:20 /dev/null 每个设备文件都有对应的主设备号和子设备号,内核根据这个来定位到驱动程序和设备 > Date: Fri, 25 Jun 2010 12:04:09 +0800 > Subject: 内核如何使用设备号? > From: gong.liheng在gmail.com > To: linux-kernel在zh-kernel.org > > 小弟最近在读内核驱动相关代码,在学习设备号的概念时,很多资料都提到这么一句话:内核通过设备号来指定正确的驱动程序给设备文件。请问这个“指定”的过程是在内核代码的哪个部分实现的?小弟追踪了很... > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org ------------------------------ 更多热辣资讯尽在新版MSN首页! 立刻访问! From zoleooo在hotmail.com Fri Jun 25 12:36:59 2010 From: zoleooo在hotmail.com (zhangleo) Date: Fri, 25 Jun 2010 04:36:59 +0000 Subject: =?gb2312?B?UkU6IMTausvI57rOyrnTww==?= =?gb2312?B?yeixuLrFo78=?= In-Reply-To: References: , , Message-ID: /include/linux/major.h看一下就知道了,相关的东西可以给你提供一个思路,linux的实现很多是register形式。根据这个顺藤摸瓜。。。 Date: Fri, 25 Jun 2010 12:29:56 +0800 Subject: Re: RE: 内核如何使用设备号? From: gong.liheng在gmail.com To: zoleooo在hotmail.com CC: linux-kernel在zh-kernel.org 谢谢您的回复。我想问的是这个“指定”的过程是在内核的哪部分代码实现的?也就是说,内核是如何通过设备号来定位到驱动程序的? On Jun 25, 2010 12:11 PM, "zhangleo" wrote: crw-rw-rw- 1 root root 1, 3 2009-10-27 22:20 /dev/null 每个设备文件都有对应的主设备号和子设备号,内核根据这个来定位到驱动程序和设备 > Date: Fri, 25 Jun 2010 12:04:09 +0800 > Subject: 内核如何使用设备号? > From: gong.liheng在gmail.com > To: linux-kernel在zh-kernel.org > > 小弟最近在读内核驱动相关代码,在学习设备号的概念时,很多资料都提到这么一句话:内核通过设备号来指定正确的驱动程序给设备文件。请问这个“指定”的过程是在内核代码的哪个部分实现的?小弟追踪了很... > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org 更多热辣资讯尽在新版MSN首页! 立刻访问! _________________________________________________________________ 想知道明天天气如何?必应告诉你! http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5&form=MICHJ2 From gong.liheng在gmail.com Fri Jun 25 12:50:00 2010 From: gong.liheng在gmail.com (Gong Liheng) Date: Fri, 25 Jun 2010 12:50:00 +0800 Subject: =?GB2312?B?UmU6IFJFOiDE2rrLyOe6zsq508PJ6LG4usWjvw==?= In-Reply-To: References: Message-ID: 再次感谢您耐心的回复。我把问题更具体化些: 比如我cat /dev里面的一个special file,这个cat 动作会最终引起内核去“读”相应的设备,那么,内核是如何根据所谓的设备号来找到这个相应的设备的呢。相关代码我没有找到,只找到vfs层的一些文件读写操作函数 On Jun 25, 2010 12:37 PM, "zhangleo" wrote: /include/linux/major.h看一下就知道了,相关的东西可以给你提供一个思路,linux的实现很多是register形式。根据这个顺藤摸瓜。。。 ------------------------------ Date: Fri, 25 Jun 2010 12:29:56 +0800 Subject: Re: RE: 内核如何使用设备号? From: gong.liheng在gmail.com To: zoleooo在hotmail.com CC: linux-kernel在zh-kernel.org 谢谢您的回复。我想问的是这个“指定”的过程是在内核的哪部分代码实现的?也就是说,内核是如何通过设备号来定位到驱动程序的? > > On Jun 25, 2010 12:11 PM, "zhangl... ------------------------------ 搜索本应是彩色的,快来体验新一代搜索引擎-必应,精美图片每天换哦! 立即试用! From wen_kernel在163.com Fri Jun 25 13:00:27 2010 From: wen_kernel在163.com (=?utf-8?B?V2VueHk=?=) Date: Fri, 25 Jun 2010 13:00:27 +0800 Subject: =?utf-8?B?UmU6IFJlOiBSRTog5YaF5qC45aaC5L2V5L2/55So6K6+5aSH5Y+377yf?= References: , , , , , Message-ID: <201006251300234213384@163.com> >再次感谢您耐心的回复。我把问题更具体化些: 比如我cat /dev里面的一个special file,这个cat >动作会最终引起内核去“读”相应的设备,那么,内核是如何根据所谓的设备号来找到这个相应的设备的呢。相关代码我没有找到,只找到vfs层的一些文件读写操作函数 > >On Jun 25, 2010 12:37 PM, "zhangleo" wrote: > >/include/linux/major.h看一下就知道了,相关的东西可以给你提供一个思路,linux的实现很多是register形式。根据这个顺藤摸瓜。。。 > >------------------------------ >Date: Fri, 25 Jun 2010 12:29:56 +0800 >Subject: Re: RE: 内核如何使用设备号? > >From: gong.liheng在gmail.com >To: zoleooo在hotmail.com >CC: linux-kernel在zh-kernel.org > >谢谢您的回复。我想问的是这个“指定”的过程是在内核的哪部分代码实现的?也就是说,内核是如何通过设备号来定位到驱动程序的? > > On Jun 25, >2010 12:11 PM, "zhangl... >------------------------------ >搜索本应是彩色的,快来体验新一代搜索引擎-必应,精美图片每天换哦! 立即试用! >_______________________________________________ >Linux 内核开发中文邮件列表 >Linux-kernel在zh-kernel.org >http://zh-kernel.org/mailman/listinfo/linux-kernel >Linux 内核开发中文社区: http://zh-kernel.org Hi, Gong Liheng 推荐你看《LDD》第三版的字符设备驱动这一章节, 驱动的init()接口里,注册了设备,proc入口,devfs, 与VFS的i结点相关联。仔细看,结合scull驱动代码看。 Best regards. Wenxy. 2010-06-25,12:58:47 Email: wen_kernel在163.com Blog: http://blog.csdn.net/wenxy1 From zoleooo在hotmail.com Fri Jun 25 13:42:54 2010 From: zoleooo在hotmail.com (zhangleo) Date: Fri, 25 Jun 2010 05:42:54 +0000 Subject: =?gb2312?B?UkU6IMTausvI57rOyrnTww==?= =?gb2312?B?yeixuLrFo78=?= In-Reply-To: References: , , , , , Message-ID: 这个要看一下代码了open和read。 在open时,如果文件类型是设备文件,就会读取major和minor。 Date: Fri, 25 Jun 2010 12:50:00 +0800 Subject: Re: RE: 内核如何使用设备号? From: gong.liheng在gmail.com To: zoleooo在hotmail.com CC: linux-kernel在zh-kernel.org 再次感谢您耐心的回复。我把问题更具体化些: 比如我cat /dev里面的一个special file,这个cat 动作会最终引起内核去“读”相应的设备,那么,内核是如何根据所谓的设备号来找到这个相应的设备的呢。相关代码我没有找到,只找到vfs层的一些文件读写操作函数 On Jun 25, 2010 12:37 PM, "zhangleo" wrote: /include/linux/major.h看一下就知道了,相关的东西可以给你提供一个思路,linux的实现很多是register形式。根据这个顺藤摸瓜。。。 Date: Fri, 25 Jun 2010 12:29:56 +0800 Subject: Re: RE: 内核如何使用设备号? From: gong.liheng在gmail.com To: zoleooo在hotmail.com CC: linux-kernel在zh-kernel.org 谢谢您的回复。我想问的是这个“指定”的过程是在内核的哪部分代码实现的?也就是说,内核是如何通过设备号来定位到驱动程序的? > > On Jun 25, 2010 12:11 PM, "zhangl... 搜索本应是彩色的,快来体验新一代搜索引擎-必应,精美图片每天换哦! 立即试用! _________________________________________________________________ SkyDrive电子画册,带你领略精彩照片,分享“美”时“美”刻! http://www.windowslive.cn/campaigns/e-magazine/ngmchina/?a=c From cellslab在gmail.com Fri Jun 25 13:58:52 2010 From: cellslab在gmail.com (=?GB2312?B?wfXLvMG8?=) Date: Fri, 25 Jun 2010 13:58:52 +0800 Subject: =?GB2312?B?UmU6ILnY09ogc2tfYnVmZiC3osvNyv2+3bD8IMjnus7WuLaozfg=?= =?GB2312?B?v6g=?= In-Reply-To: References: Message-ID: 问题解决了 用dev_queue_xmit 直接就可以发出去 From zboole在gmail.com Fri Jun 25 14:07:41 2010 From: zboole在gmail.com (Benjamin Zhang) Date: Fri, 25 Jun 2010 14:07:41 +0800 Subject: =?GB2312?B?UmU6IFJlOiDU9cO0usO+w7a8w7vT0Mrctb3Tyrz+wdCx7bei?= =?GB2312?B?wLS1xNPKvP6jvw==?= In-Reply-To: References: <1925572032.290100.1277283635044.JavaMail.neverforget_2002@163.com> <2cdec8de.1252.1296c8f952f.Coremail.lisan04@163.com> Message-ID: 我也好久没收到了,今天忽然来了一堆,还以为一直潜水是被踢出来了。 在 2010年6月25日 上午9:31,kernel linux 写道: > 是不是邮件有问题呀。 > 还是? > > 在 2010年6月25日 上午8:43, 写道: > > > 我也一样 > > >2010/6/23 CL2 > > > > > >> 如题,大家收到了么? > > >> > > >> > > >I received this morning 20+ emails at once. > > > > > >-- > > >Caius 'kaio' Chance / かいお > > >_______________________________________________ > > >Linux 内核开发中文邮件列表 > > >Linux-kernel在zh-kernel.org > > >http://zh-kernel.org/mailman/listinfo/linux-kernel > > >Linux 内核开发中文社区: http://zh-kernel.org > > > > _______________________________________________ > > Linux 内核开发中文邮件列表 > > Linux-kernel在zh-kernel.org > > http://zh-kernel.org/mailman/listinfo/linux-kernel > > Linux 内核开发中文社区: http://zh-kernel.org > > > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > From parson.cheng在cybertan.com.tw Fri Jun 25 14:12:33 2010 From: parson.cheng在cybertan.com.tw (parson.cheng在cybertan.com.tw) Date: Fri, 25 Jun 2010 14:12:33 +0800 Subject: =?gb2312?B?aW5zbW9kIGdfKioqLmtvIM7KzOLMvczW?= Message-ID: <5D262E80A3F72048BB3FBC976D724D91083C3F02@CTMAIL03.cybertan.com.tw> hi :chu 问题解决了吗? [ 27.092700] invalid opcode: 0000 [#1] PREEMPT SMP 从这里看,好像是多处理器问题,你有两个CPU吗? Best Regards, Parson ----------------------------------------------------------------------------- Parson.cheng在cybertan.com.tw ==================================================================== This e-mail transmission originated at CyberTAN Technology, Inc., and may contain privileged or confidential information that is the property of CyberTAN and protected by law from disclosure.If you are not an intended recipient of this transmission and you received it in error, please inform the sender by reply e-mail and destroy this and all other copies of this transmission to which you have access. Thank you. From abutter.gao在gmail.com Fri Jun 25 18:49:19 2010 From: abutter.gao在gmail.com (Gao Ya'nan) Date: Fri, 25 Jun 2010 18:49:19 +0800 Subject: =?GB2312?B?UmU6IFJFOiC72Li0OiBSZTogx/PW+qOsYXJtLWxpbnV4xNq6y9bQyrk=?= =?GB2312?B?08O4obXj08PL487KzOKhow==?= In-Reply-To: <1966936665.10410.1277437103335.JavaMail.neverforget_2002@163.com> References: <1966936665.10410.1277437103335.JavaMail.neverforget_2002@163.com> Message-ID: 在内核里面使用浮点个人以为是条死胡同,在 linuxforum 里面已经回答过了,为什么不愿意尝试一下其他的办法再说呢? 在 2010年6月25日 上午11:38,CL2 写道: > 因为我用的系统是公司自己开发的实时linux,其中加入了一个实时内核,他和linux内核同处于内核域,而我要加入的算法模块必须和实时核写到一起才能被实时调度,所以导致了这种要在linux内核编译时遇到浮点运算的情况。 > > 2010-06-25 > > > > CL2 > > > > 发件人: zhangleo > 发送时间: 2010-06-25 11:21 > 主 题: RE: 回复: Re: 求助,arm-linux内核中使用浮点用算问题。 > 收件人: , > 抄 送: > > > > > > linux内核不支持浮点计算,为什么要在内核中加入浮点运算呢 > >> Date: Fri, 25 Jun 2010 11:17:48 +0800 >> From: neverforget_2002在163.com >> To: iamyuliang在gmail.com >> Subject: 回复: Re: 求助,arm-linux内核中使用浮点用算问题。 >> CC: linux-kernel在zh-kernel.org >> >> 你好,CFLAS加入-mfpu=vfp后编译报错,说是无效选项。 >> 另:我将编译器升级到arm-none-linux-gnueabi-gcc4.4.1,编译报错: >> cc1: error: unrecognized command line option "-mapcs-32" >> cc1: error: unrecognized command line option "-mshort-load-bytes" >> >> 2010-06-25 >> >> >> >> CL2 >> >> >> >> 发件人: liang yu >> 发送时间: 2010-06-24 21:05 >> 主 题: Re: 求助,arm-linux内核中使用浮点用算问题。 >> 收件人: 崔磊 >> >> >> >> >> >> >> 2010/6/17 崔磊 >> >> 大家好,我在做一个项目需要在linux内核中添加一个算法模块,开发平台是pxa270芯片+arm-linux2.6.9 ,使用arm-linux-gcc3.4.6编译。编译内核时出现大量错误,摘取如下: >> >> RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:106: undefined reference to `__divsf3' >> RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:107: undefined reference to `__divsf3' >> RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__mulsf3' >> RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__divsf3' >> RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__extendsfdf2' >> RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__adddf3' >> RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:108: undefined reference to `__fixdfsi' >> RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:112: undefined reference to `__floatsisf' >> RobotController/robAlgorithm/lineInterpolation/LineInterpolation.c:115: undefined reference to `__mulsf3' >> 。。。。。。 >> >> 分析后发现可能是因为PXA270不支持浮点运算导致。但我在编译器加了-msoft-float选项,并且内核配置了NWPFE项。 >> 但现在问题依然存在。麻烦大家帮忙指点,万分感谢!!! >> >> _______________________________________________ >> Linux 内核开发中文邮件列表 >> Linux-kernel在zh-kernel.org >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> Linux 内核开发中文社区: http://zh-kernel.org >> 试试 -mfpu=vfp >> _______________________________________________ >> Linux 内核开发中文邮件列表 >> Linux-kernel在zh-kernel.org >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> Linux 内核开发中文社区: http://zh-kernel.org > > > > 搜索本应是彩色的,快来体验新一代搜索引擎-必应,精美图片每天换哦! 立即试用! > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From B13201在freescale.com Fri Jun 25 18:55:25 2010 From: B13201在freescale.com (Liu Yu-B13201) Date: Fri, 25 Jun 2010 18:55:25 +0800 Subject: =?utf-8?B?UkU6IFJFOiDlm57lpI06ICBSZTog5rGC5Yqp77yMYXJtLWxpbnV45YaF5qC45Lit?= =?utf-8?B?5L2/55So5rWu54K555So566X6Zeu6aKY44CC?= In-Reply-To: <1966936665.10410.1277437103335.JavaMail.neverforget_2002@163.com> References: <1966936665.10410.1277437103335.JavaMail.neverforget_2002@163.com> Message-ID: 试试用嵌入汇编替代运算符? Btw 我没试过。。 > -----Original Message----- > From: linux-kernel-bounces在zh-kernel.org > [mailto:linux-kernel-bounces在zh-kernel.org] On Behalf Of CL2 > Sent: Friday, June 25, 2010 11:38 AM > To: zhangleo > Cc: linux-kernel在zh-kernel.org > Subject: 回复: RE: 回复: Re: 求助,arm-linux内核中使用浮点用算问题。 > > 因为我用的系统是公司自己开发的实时linux,其中加入了一个实时内核,他和linux内核同处于内核域,而我要加入的算法模块必 > 须和实时核写到一起才能被实时调度,所以导致了这种要在linux内核编译时遇到浮点运算的情况。 > > 2010-06-25 > > > > CL2 > > > > 发件人: zhangleo > 发送时间: 2010-06-25 11:21 > 主 题: RE: 回复: Re: 求助,arm-linux内核中使用浮点用算问题。 > 收件人: , > 抄 送: > > > > > > linux内核不支持浮点计算,为什么要在内核中加入浮点运算呢 > > > Date: Fri, 25 Jun 2010 11:17:48 +0800 > > From: neverforget_2002在163.com > > To: iamyuliang在gmail.com > > Subject: 回复: Re: 求助,arm-linux内核中使用浮点用算问题。 > > CC: linux-kernel在zh-kernel.org > > > > 你好,CFLAS加入-mfpu=vfp后编译报错,说是无效选项。 > > 另:我将编译器升级到arm-none-linux-gnueabi-gcc4.4.1,编译报错: > > cc1: error: unrecognized command line option "-mapcs-32" > > cc1: error: unrecognized command line option "-mshort-load-bytes" > > > > 2010-06-25 > > > > > > > > CL2 > > > > > > > > 发件人: liang yu > > 发送时间: 2010-06-24 21:05 > > 主 题: Re: 求助,arm-linux内核中使用浮点用算问题。 > > 收件人: 崔磊 > > > > > > > > > > > > > > 2010/6/17 崔磊 > > > > 大家好,我在做一个项目需要在linux内核中添加一个算法模块,开发平台是pxa270芯片+arm-linux2.6.9 > ,使用arm-linux-gcc3.4.6编译。编译内核时出现大量错误,摘取如下: > > > > > RobotController/robAlgorithm/lineInterpolation/LineInterpolati > on.c:106: undefined reference to `__divsf3' > > > RobotController/robAlgorithm/lineInterpolation/LineInterpolati > on.c:107: undefined reference to `__divsf3' > > > RobotController/robAlgorithm/lineInterpolation/LineInterpolati > on.c:108: undefined reference to `__mulsf3' > > > RobotController/robAlgorithm/lineInterpolation/LineInterpolati > on.c:108: undefined reference to `__divsf3' > > > RobotController/robAlgorithm/lineInterpolation/LineInterpolati > on.c:108: undefined reference to `__extendsfdf2' > > > RobotController/robAlgorithm/lineInterpolation/LineInterpolati > on.c:108: undefined reference to `__adddf3' > > > RobotController/robAlgorithm/lineInterpolation/LineInterpolati > on.c:108: undefined reference to `__fixdfsi' > > > RobotController/robAlgorithm/lineInterpolation/LineInterpolati > on.c:112: undefined reference to `__floatsisf' > > > RobotController/robAlgorithm/lineInterpolation/LineInterpolati > on.c:115: undefined reference to `__mulsf3' > > 。。。。。。 > > > > 分析后发现可能是因为PXA270不支持浮点运算导致。但我在编译器加了-msoft-float选项,并且内核配置了NWPFE项。 > > 但现在问题依然存在。麻烦大家帮忙指点,万分感谢!!! > > > > _______________________________________________ > > Linux 内核开发中文邮件列表 > > Linux-kernel在zh-kernel.org > > http://zh-kernel.org/mailman/listinfo/linux-kernel > > Linux 内核开发中文社区: http://zh-kernel.org > > 试试 -mfpu=vfp > > _______________________________________________ > > Linux 内核开发中文邮件列表 > > Linux-kernel在zh-kernel.org > > http://zh-kernel.org/mailman/listinfo/linux-kernel > > Linux 内核开发中文社区: http://zh-kernel.org > > > > 搜索本应是彩色的,快来体验新一代搜索引擎-必应,精美图片每天换哦! 立即试用! > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org > From chengtao.linux在gmail.com Fri Jun 25 20:52:45 2010 From: chengtao.linux在gmail.com (chengtao) Date: Fri, 25 Jun 2010 20:52:45 +0800 Subject: =?GB2312?B?UmU6ILnY09ogc2tfYnVmZiC3osvNyv2+3bD8IMjnus7WuLaozfg=?= =?GB2312?B?v6g=?= In-Reply-To: References: Message-ID: 内核协议栈有bug,多网卡路由有问题 ,fix它不难,所以开源的大牛都不屑解决这个问题 。 在 2010年6月25日 下午1:58,刘思良 写道: > 问题解决了 用dev_queue_xmit 直接就可以发出去 > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org From jiang.adam在gmail.com Fri Jun 25 21:20:20 2010 From: jiang.adam在gmail.com (Adam Jiang) Date: Fri, 25 Jun 2010 22:20:20 +0900 Subject: =?GB2312?B?UmU6ILnY09ogc2tfYnVmZiC3osvNyv2+3bD8IMjnus7WuLaozfg=?= =?GB2312?B?v6g=?= In-Reply-To: References: Message-ID: 2010/6/25 chengtao : > 内核协议栈有bug,多网卡路由有问题 ,fix它不难,所以开源的大牛都不屑解决这个问题 。 可以具体说一下情况么?我不是大牛,很愿意干些脏活解决这个问题。 /大头阿当 > > > > 在 2010年6月25日 下午1:58,刘思良 写道: >> 问题解决了 用dev_queue_xmit 直接就可以发出去 >> _______________________________________________ >> Linux 内核开发中文邮件列表 >> Linux-kernel在zh-kernel.org >> http://zh-kernel.org/mailman/listinfo/linux-kernel >> Linux 内核开发中文社区: http://zh-kernel.org > _______________________________________________ > Linux 内核开发中文邮件列表 > Linux-kernel在zh-kernel.org > http://zh-kernel.org/mailman/listinfo/linux-kernel > Linux 内核开发中文社区: http://zh-kernel.org -- Adam Jiang ----------------------------------- e-mail:jiang.adam在gmail.com http://www.adamjiang.com ----------------------------------- From cellslab在gmail.com Fri Jun 25 23:20:24 2010 From: cellslab在gmail.com (=?GB2312?B?wfXLvMG8?=) Date: Fri, 25 Jun 2010 23:20:24 +0800 Subject: =?GB2312?B?UmU6ILnY09ogc2tfYnVmZiC3osvNyv2+3bD8IMjnus7WuLaozfg=?= =?GB2312?B?v6g=?= In-Reply-To: References: Message-ID: 我不是用路由解决的 用的是 更底层的函数 直接发送 skb From cellslab在gmail.com Fri Jun 25 23:22:35 2010 From: cellslab在gmail.com (=?GB2312?B?wfXLvMG8?=) Date: Fri, 25 Jun 2010 23:22:35 +0800 Subject: =?GB2312?B?UmU6ILnY09ogc2tfYnVmZiC3osvNyv2+3bD8IMjnus7WuLaozfg=?= =?GB2312?B?v6g=?= In-Reply-To: References: Message-ID: 另外有人知道 如何根据ip地址 查找对应的mac么 我找到组播的 ip 和 mac 的映射算法,但是单播如何查找对方mac呢 From kongjianjun在gmail.com Sat Jun 26 12:58:50 2010 From: kongjianjun在gmail.com (Amos Kong) Date: Sat, 26 Jun 2010 12:58:50 +0800 Subject: =?GB2312?B?UmU6ILnY09ogc2tfYnVmZiC3osvNyv2+3bD8IMjnus7WuLaozfg=?= =?GB2312?B?v6g=?= In-Reply-To: References: Message-ID: 2010/6/25 刘思良 : > 另外有人知道 如何根据ip地址 查找对应的mac么 > 我找到组播的 ip 和 mac 的映射算法,但是单播如何查找对方mac呢 arp -a tcpdump From yetiboy1230在gmail.com Sat Jun 26 14:59:52 2010 From: yetiboy1230在gmail.com (Liu Yuan) Date: Sat, 26 Jun 2010 14:59:52 +0800 Subject: =?UTF-8?B?UmU6IOWGheaguOWmguS9leS9v+eUqOiuvuWkh+WPt++8nw==?= In-Reply-To: References: Message-ID: