Originally posted by rolz
View Post
Code:
--- modules/fglrx/firegl_public.c 2007-10-31 12:23:44.000000000 +1100 +++ modules/fglrx/firegl_public.c.orig 2007-10-27 12:42:40.000000000 +1000 @@ -2486,24 +2486,10 @@ kunmap((struct page*) page_addr); } -#ifndef ptep_test_and_clear_dirty -#define ptep_test_and_clear_dirty(__vma, __address, __ptep) \ -({ \ - pte_t __pte = *__ptep; \ - int r = 1; \ - if (!pte_dirty(__pte)) \ - r = 0; \ - else \ - set_pte_at((__vma)->vm_mm, (__address), (__ptep), \ - pte_mkclean(__pte)); \ - r; \ -}) -#endif - #ifndef ptep_clear_flush_dirty #define ptep_clear_flush_dirty(__vma, __address, __ptep) \ ({ \ - int __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep); \ + int __dirty = ptep_test_and_clear_dirty(__ptep); \ if (__dirty) \ flush_tlb_page(__vma, __address); \ __dirty; \ @@ -3534,9 +3520,6 @@ return buf; } -static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; } -static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; } - static char *__ke_pte_phys_addr_str(pte_t pte, char *buf, __ke_dma_addr_t* phys_address) { @@ -3552,7 +3535,7 @@ pte_present (pte) ? 'p' : '-', pte_read (pte) ? 'r' : '-', pte_write (pte) ? 'w' : '-', - pte_user (pte) ? 'x' : '-', + pte_exec (pte) ? 'x' : '-', pte_dirty (pte) ? 'd' : '-', pte_young (pte) ? 'a' : '-'); } @@ -5453,7 +5436,7 @@ /** \brief Type definition of the structure describing Slab Cache object */ typedef struct tag_kasSlabCache_t { - struct kmem_cache* cache; /* OS slab cache object */ + kmem_cache_t* cache; /* OS slab cache object */ spinlock_t lock; /* OS spinlock object protecting the cache */ unsigned int routine_type; /* Type of routine the cache might be accessed from */ char name[14]; /* Cache object name (kernel 2.4 restricts its length to 19 chars) */ @@ -5499,7 +5482,7 @@ DBG_TRACE("creating slab object '%s'", slabcache_obj->name); if ((slabcache_obj->cache = - kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL ))) + kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL, NULL))) { ret = 1; }
Leave a comment: