在mm/filemap.c中有一個__grab_cache_page函數,此函數同樣引起VDSP編譯器錯誤:
../../mm/filemap.c
At end of source: : internal error: Uncaught exception Assertion failed raised
at ../../../bril/optimiser/dominators.c:910 (in pass
cleanup_scalar_stores_nonopt during compilation of
___grab_cache_page). Please submit a bug report with this message,
the command line used, type of machine and the output of the
compiler when you add -ED -v to the command line. Please also send
us the pre-processed file that is generated by the -ED option (the
file generated is named <original_filename>.i)
1 catastrophic error detected in the compilation of "../../mm/filemap.c".
Compilation aborted.
cc3089: fatal error: Compilation failed
看看這個函數的代碼:
/*
* If the page was newly created, increment its refcount and add it to the
* caller's lru-buffering pagevec. This function is specifically for
* generic_file_write().
*/
static inline struct page *
__grab_cache_page(struct address_space *mapping, unsigned long index,
struct page **cached_page, struct pagevec *lru_pvec)
{
int err;
struct page *page;
repeat:
page = find_lock_page(mapping, index);
if (!page) {
if (!*cached_page) {
*cached_page = page_cache_alloc(mapping);
if (!*cached_page)
return NULL;
}
err = add_to_page_cache(*cached_page, mapping,
index, GFP_KERNEL);
if (err == -EEXIST)
goto repeat;
if (err == 0) {
page = *cached_page;
page_cache_get(page);
if (!pagevec_add(lru_pvec, page))
__pagevec_lru_add(lru_pvec);
*cached_page = NULL;
}
}
return page;
}
有了上次的經驗,可以肯定問題發生在
*cached_page = page_cache_alloc(mapping);
將之修改為:
*cached_page = __alloc_pages(mapping_gfp_mask(mapping), 0,
NODE_DATA(0)->node_zonelists + gfp_zone(mapping_gfp_mask(mapping)));
搞定!
uclinux-2008R1-RC8(bf561)到VDSP5的移植(62)
uclinux-2008R1-RC8(bf561)到VDSP5的移植(60):current_text_addr
uclinux-2008R1-RC8(bf561)到VDSP5的移植(58)
uclinux-2008R1-RC8(bf561)到VDSP5的移植(57)
uclinux-2008R1-RC8(bf561)到VDSP5的移植(46):raw_rwlock_t
uclinux-2008R1-RC8(bf561)到VDSP5的移植(45):__delay