Re: [問題] 編譯driver的錯誤 SA_INTERRUPT
※ 引述《longrider (龍騎士2)》之銘言:
: 我在編譯 driver 時, 發生了幾個錯誤
: error: 'SA_INTERRUPT' undeclared (first use in this function)
: error: 'SA_SHIRQ' undeclared (first use in this function)
謝謝 james732, 新的問題出現了
mmap.c: In function 'si_vmanopage':
mmap.c:113: error: 'NOPAGE_SIGBUS' undeclared (first use in this function)
mmap.c:113: error: (Each undeclared identifier is reported only once
mmap.c:113: error: for each function it appears in.)
mmap.c: At top level:
mmap.c:146: error: unknown field 'nopage' specified in initializer
mmap.c:147: warning: initialization from incompatible pointer type
mmap.c: In function 'si_alloc_memory':
mmap.c:321: warning: unused variable 'flags'
新的是 'NOPAGE_SIGBUS' undeclared
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.115.34.47
→
06/17 20:06, , 1F
06/17 20:06, 1F
→
06/17 20:33, , 2F
06/17 20:33, 2F
我放棄了
根據 http://tinyurl.com/2fypeo3
nopage is deleted from structure vm_operations_struct in mm.h
due to kernel update.
Delete nopage related part in simple.c and update mmap test scripts.
Should be fix now.
然後追到 mm.h
struct vm_operations_struct {
void (*open)(struct vm_area_struct * area);
void (*close)(struct vm_area_struct * area);
int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
這已經從原本一個參數變成兩個參數了.
所以也不能純粹把 nopage 改成 fault 就好
小弟放棄了, 謝謝大家
※ 編輯: longrider 來自: 140.115.34.47 (06/17 21:14)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):