的參考在Linux內核中,compiler.h,我發現__iomem
我在哪裏可以找到gcc的擴展屬性
# define __iomem __attribute__((noderef, address_space(2)))
定義然後我知道__attribute__(())
是GCC的擴展。 但我不能在GCC.GNU.Org
我只找到address_space延伸屬性在manual page of sparse
的參考在Linux內核中,compiler.h,我發現__iomem
我在哪裏可以找到gcc的擴展屬性
# define __iomem __attribute__((noderef, address_space(2)))
定義然後我知道__attribute__(())
是GCC的擴展。 但我不能在GCC.GNU.Org
我只找到address_space延伸屬性在manual page of sparse
「的#define IOMEM __attribute((noderef,address_space(2 )))「
瀏覽互聯網,我可以找到以下細節:
‘IOMEM’是指兩個不同的東西:這意味着稀疏應該抱怨 如果指針永遠取消引用(這是一個」 nodere f「指針),並且它位於」地址空間2「中,而不是普通地址空間(0)。
這address_space(2)或address_space(0)意思是,這對使用差異內核空間和用戶空間或IOMEM比如CPU環0到環3
更多的細節你可以通過下面的鏈接: -
What is the use of __iomem in linux while writing device drivers?
我知道'__iomem'的含義,我的問題是我在哪裏可以找到'noderef'和'addresss_space()'的引用,I檢查gcc.gnu.org,我無法找到。 – Divlaker
這些東西真的取決於操作系統本身的定義。 –
有點谷歌搜索導致(論壇發佈這個)[https://www.linuxquestions.org/questions/linux-kernel-70/what-does-\_\_attribute\_\_-noderef-address_space- 2-mean-4175493101-print /] – Tordek
https://lkml.org/lkml/2004/9/12/249 – alk