~ubuntu-branches/ubuntu/wily/linux-ti-omap4/wily

« back to all changes in this revision

Viewing changes to arch/arm/mm/flush.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2013-07-11 18:35:20 UTC
  • Revision ID: package-import@ubuntu.com-20130711183520-htnf1x4y5r11hndr
Tags: 3.5.0-229.42
* Release Tracking Bug
  - LP: #1199276

[ Paolo Pisati ]

* [Config] CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set

Show diffs side-by-side

added added

removed removed

Lines of Context:
299
299
EXPORT_SYMBOL(flush_dcache_page);
300
300
 
301
301
/*
 
302
 * Ensure cache coherency for the kernel mapping of this page. We can
 
303
 * assume that the page is pinned via kmap.
 
304
 *
 
305
 * If the page only exists in the page cache and there are no user
 
306
 * space mappings, this is a no-op since the page was already marked
 
307
 * dirty at creation.  Otherwise, we need to flush the dirty kernel
 
308
 * cache lines directly.
 
309
 */
 
310
void flush_kernel_dcache_page(struct page *page)
 
311
{
 
312
        if (cache_is_vivt() || cache_is_vipt_aliasing()) {
 
313
                struct address_space *mapping;
 
314
 
 
315
                mapping = page_mapping(page);
 
316
 
 
317
                if (!mapping || mapping_mapped(mapping)) {
 
318
                        void *addr;
 
319
 
 
320
                        addr = page_address(page);
 
321
                        /*
 
322
                         * kmap_atomic() doesn't set the page virtual
 
323
                         * address for highmem pages, and
 
324
                         * kunmap_atomic() takes care of cache
 
325
                         * flushing already.
 
326
                         */
 
327
                        if (!IS_ENABLED(CONFIG_HIGHMEM) || addr)
 
328
                                __cpuc_flush_dcache_area(addr, PAGE_SIZE);
 
329
                }
 
330
        }
 
331
}
 
332
EXPORT_SYMBOL(flush_kernel_dcache_page);
 
333
 
 
334
/*
302
335
 * Flush an anonymous page so that users of get_user_pages()
303
336
 * can safely access the data.  The expected sequence is:
304
337
 *