Uclinux-2008r1-rc8 (bf561) to VDSP5 transplantation (in): __grab_cache_page

Source: Internet
Author: User

There is a __grab_cache_page function in mm/filemap.c that also causes the VDSP compiler error:

../../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

Look at the code for this function:

/*
* If The page is newly created, increment its refcount and add it to the
* caller ' s lru-buffering pagevec. This function are 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;
}

With the last experience, you can be sure that the problem occurs in

*cached_page = page_cache_alloc (mapping);

Modify it to:

*cached_page = __alloc_pages(mapping_gfp_mask(mapping), 0,
NODE_DATA(0)->node_zonelists + gfp_zone(mapping_gfp_mask(mapping)));

Get!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.