* It is ok on linux ,but not ok on mips_linux as my expection!
@ 2003-09-16 9:31 Guangxing Zhang
2003-09-16 9:31 ` Guangxing Zhang
0 siblings, 1 reply; 3+ messages in thread
From: Guangxing Zhang @ 2003-09-16 9:31 UTC (permalink / raw)
To: Fuxin Zhang; +Cc: linux-mips
Hi,
Inspired by your advice , I have changed the method of preventing the module
from being unloaded while "intrpt_routine" is still in the task queue.Now it can freely
"insmod" and "rmmod" in my linux(2.4.18-3,not on mips) at any time.But unfortunatlly,
When I port it to mips_linux, it get some errors as you can see in my mail to
linux-mips@linux-mips.org . It confuses me .Why? And what should I MUST pay attention to
or what should I MUST learn if I I want to implement schedualing a function to be called
on every timer interrupt.
Thank you again and eagering your enthusiastic again!
======= 2003-09-16 13:17:00 WROTE:=======
>Guangxing Zhang wrote:
>
>>Hi, Fuxin Zhang
>>
>>
>>
>>>for any warnings. BTW, I don't the method you used to cleanup is safe,
>>>there maybe a task queued but not executed at the time you
>>>'rmmod',doesn't it?
>>>
>>>
>>Yes ,in http://www.faqs.org/docs/kernel/x1145.html#AEN1201 , it mentions the
>>situation as you said.And just to overcoming it ,it use the sleep_on().But as you
>>see, now it can not "rmmod" correctly and my linux will broke.
>>
>>As a newbie to kernel module ,I am not sure why and not know how to scheduale a
>>function to be called on every timer interrupt or every seconds in kernle module.
>>Eagering your help!
>>
>>
>>>>interrupt
>>>>
>>>>
>
>Most ethernet adapter driver(e.g. drivers/net/eepro100.c) use timer,you
>can check them for examples.
>
>
>Have you check the sleep_on and wakeup routine's argument type? They
>should be wait_queue_head_t *
>for recent kernels?
= = = = = = = = = = = = = = = = = = = =
Guangxing Zhang
guangxing@ict.ac.cn
2003-09-16
^ permalink raw reply [flat|nested] 3+ messages in thread
* It is ok on linux ,but not ok on mips_linux as my expection!
2003-09-16 9:31 Guangxing Zhang
@ 2003-09-16 9:31 ` Guangxing Zhang
0 siblings, 0 replies; 3+ messages in thread
From: Guangxing Zhang @ 2003-09-16 9:31 UTC (permalink / raw)
To: Fuxin Zhang; +Cc: linux-mips
Hi,
Inspired by your advice , I have changed the method of preventing the module
from being unloaded while "intrpt_routine" is still in the task queue.Now it can freely
"insmod" and "rmmod" in my linux(2.4.18-3,not on mips) at any time.But unfortunatlly,
When I port it to mips_linux, it get some errors as you can see in my mail to
linux-mips@linux-mips.org . It confuses me .Why? And what should I MUST pay attention to
or what should I MUST learn if I I want to implement schedualing a function to be called
on every timer interrupt.
Thank you again and eagering your enthusiastic again!
======= 2003-09-16 13:17:00 WROTE:=======
>Guangxing Zhang wrote:
>
>>Hi, Fuxin Zhang
>>
>>
>>
>>>for any warnings. BTW, I don't the method you used to cleanup is safe,
>>>there maybe a task queued but not executed at the time you
>>>'rmmod',doesn't it?
>>>
>>>
>>Yes ,in http://www.faqs.org/docs/kernel/x1145.html#AEN1201 , it mentions the
>>situation as you said.And just to overcoming it ,it use the sleep_on().But as you
>>see, now it can not "rmmod" correctly and my linux will broke.
>>
>>As a newbie to kernel module ,I am not sure why and not know how to scheduale a
>>function to be called on every timer interrupt or every seconds in kernle module.
>>Eagering your help!
>>
>>
>>>>interrupt
>>>>
>>>>
>
>Most ethernet adapter driver(e.g. drivers/net/eepro100.c) use timer,you
>can check them for examples.
>
>
>Have you check the sleep_on and wakeup routine's argument type? They
>should be wait_queue_head_t *
>for recent kernels?
= = = = = = = = = = = = = = = = = = = =
Guangxing Zhang
guangxing@ict.ac.cn
2003-09-16
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: It is ok on linux ,but not ok on mips_linux as my expection!
@ 2003-09-16 10:15 Fuxin Zhang
0 siblings, 0 replies; 3+ messages in thread
From: Fuxin Zhang @ 2003-09-16 10:15 UTC (permalink / raw)
To: Guangxing Zhang; +Cc: linux-mips@linux-mips.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030; format=flowed, Size: 2679 bytes --]
To compile a module on mips,some compiler flags are required. An example:
CFLAGS=
"-I /usr/local/src/linux-mips/include/asm/gcc -D__KERNEL__
-I/usr/local/src/linux-mips/include
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common
-G 0 -mno-abicalls -fno-pic -mcpu=r4600 -mips2 -Wa,--trap -pipe
-DMODULE -mlong-calls"
And you may have know that there are 2 different world of mips: big
endian and little endian. When
using cross compiler,you should choose the correct toolchain(often
mipsel-xxx vs. mips-xxx).
But these normally lead to other errors, so again check for your kernel
version about task queue data
structures. (Does your toolchain's kernel headers consistent with the
one running on mips?)
Guangxing Zhang wrote:
>Hi,
>
> Inspired by your advice , I have changed the method of preventing the module
>from being unloaded while "intrpt_routine" is still in the task queue.Now it can freely
>"insmod" and "rmmod" in my linux(2.4.18-3,not on mips) at any time.But unfortunatlly,
>When I port it to mips_linux, it get some errors as you can see in my mail to
>linux-mips@linux-mips.org . It confuses me .Why? And what should I MUST pay attention to
>or what should I MUST learn if I I want to implement schedualing a function to be called
>on every timer interrupt.
>
> Thank you again and eagering your enthusiastic again!
>
>
>======= 2003-09-16 13:17:00 WROTE£º=======
>
>
>
>>Guangxing Zhang wrote:
>>
>>
>>
>>>Hi, Fuxin Zhang
>>>
>>>
>>>
>>>
>>>
>>>>for any warnings. BTW, I don't the method you used to cleanup is safe,
>>>>there maybe a task queued but not executed at the time you
>>>>'rmmod',doesn't it?
>>>>
>>>>
>>>>
>>>>
>>>Yes ,in http://www.faqs.org/docs/kernel/x1145.html#AEN1201 , it mentions the
>>>situation as you said.And just to overcoming it ,it use the sleep_on().But as you
>>>see, now it can not "rmmod" correctly and my linux will broke.
>>>
>>>As a newbie to kernel module ,I am not sure why and not know how to scheduale a
>>>function to be called on every timer interrupt or every seconds in kernle module.
>>>Eagering your help!
>>>
>>>
>>>
>>>
>>>>>interrupt
>>>>>
>>>>>
>>>>>
>>>>>
>>Most ethernet adapter driver(e.g. drivers/net/eepro100.c) use timer,you
>>can check them for examples.
>>
>>
>>Have you check the sleep_on and wakeup routine's argument type? They
>>should be wait_queue_head_t *
>>for recent kernels?
>>
>>
>
>= = = = = = = = = = = = = = = = = = = =
>
>
>
>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Guangxing Zhang
>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡guangxing@ict.ac.cn
>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2003-09-16
>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-09-16 10:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-16 10:15 It is ok on linux ,but not ok on mips_linux as my expection! Fuxin Zhang
-- strict thread matches above, loose matches on Subject: below --
2003-09-16 9:31 Guangxing Zhang
2003-09-16 9:31 ` Guangxing Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox