1*b86cbe23SFrançois Tigeot /* 2*b86cbe23SFrançois Tigeot * Copyright (c) 2015 François Tigeot 3*b86cbe23SFrançois Tigeot * All rights reserved. 4*b86cbe23SFrançois Tigeot * 5*b86cbe23SFrançois Tigeot * Redistribution and use in source and binary forms, with or without 6*b86cbe23SFrançois Tigeot * modification, are permitted provided that the following conditions 7*b86cbe23SFrançois Tigeot * are met: 8*b86cbe23SFrançois Tigeot * 1. Redistributions of source code must retain the above copyright 9*b86cbe23SFrançois Tigeot * notice unmodified, this list of conditions, and the following 10*b86cbe23SFrançois Tigeot * disclaimer. 11*b86cbe23SFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright 12*b86cbe23SFrançois Tigeot * notice, this list of conditions and the following disclaimer in the 13*b86cbe23SFrançois Tigeot * documentation and/or other materials provided with the distribution. 14*b86cbe23SFrançois Tigeot * 15*b86cbe23SFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16*b86cbe23SFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17*b86cbe23SFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18*b86cbe23SFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19*b86cbe23SFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20*b86cbe23SFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21*b86cbe23SFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22*b86cbe23SFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23*b86cbe23SFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24*b86cbe23SFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*b86cbe23SFrançois Tigeot */ 26*b86cbe23SFrançois Tigeot 27*b86cbe23SFrançois Tigeot #ifndef _ASM_CACHEFLUSH_H_ 28*b86cbe23SFrançois Tigeot #define _ASM_CACHEFLUSH_H_ 29*b86cbe23SFrançois Tigeot 30*b86cbe23SFrançois Tigeot static inline int set_pages_uc(struct vm_page *page, int num_pages) 31*b86cbe23SFrançois Tigeot { 32*b86cbe23SFrançois Tigeot pmap_change_attr(PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page)), 33*b86cbe23SFrançois Tigeot num_pages << PAGE_SHIFT, PAT_UNCACHED); 34*b86cbe23SFrançois Tigeot 35*b86cbe23SFrançois Tigeot return 0; 36*b86cbe23SFrançois Tigeot } 37*b86cbe23SFrançois Tigeot 38*b86cbe23SFrançois Tigeot #endif /* _ASM_CACHEFLUSH_H_ */ 39