drm/gma500: Give MMU code it's own header file
Subsystems (3)
Patrik Jakobsson
maintainerPATCH 3/16 drm/gma500: Give MMU code it's own header file
Signed-off-by Patrik Jakobsson <[email protected]>
--- drivers/gpu/drm/gma500/mmu.c | 45 +------------------ drivers/gpu/drm/gma500/mmu.h | 93 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/gma500/psb_drv.h | 45 +------------------ 3 files changed, 95 insertions(+), 88 deletions(-) create mode 100644 drivers/gpu/drm/gma500/mmu.h
drivers/gpu/drm/gma500/mmu.c +1 -44
@@ -18,6 +18,7 @@#include <drm/drmP.h> #include "psb_drv.h" #include "psb_reg.h" +#include "mmu.h" /* * Code for the SGX MMU:
@@ -47,50 +48,6 @@* but on average it should be fast. */ -struct psb_mmu_driver { -/* protects driver- and pd structures. Always take in read mode -* before taking the page table spinlock. -*/ -struct rw_semaphore sem; - -/* protects page tables, directory tables and pt tables. -* and pt structures. -*/ -spinlock_t lock; - -atomic_t needs_tlbflush; -atomic_t *msvdx_mmu_invaldc; -struct psb_mmu_pd *default_pd; -uint32_t bif_ctrl; -int has_clflush; -int clflush_add; -unsigned long clflush_mask; - -struct drm_device *dev; -}; - -struct psb_mmu_pd ; - -struct psb_mmu_pt { -struct psb_mmu_pd *pd; -uint32_t index; -uint32_t count; -struct page *p; -uint32_t *v; -}; - -struct psb_mmu_pd { -struct psb_mmu_driver *driver; -int hw_context; -struct psb_mmu_pt **tables; -struct page *p; -struct page *dummy_pt; -struct page *dummy_page; -uint32_t pd_mask; -uint32_t invalid_pde; -uint32_t invalid_pte; -}; -static inline uint32_t psb_mmu_pt_index (uint32_t offset) {return (offset >>PSB_PTE_SHIFT ) &0x3FF ;
drivers/gpu/drm/gma500/mmu.h new file +93 -0
93 lines not on this page · raw message
drivers/gpu/drm/gma500/psb_drv.h +1 -44
63 lines not on this page · raw message
Signature · 1 line
1.8.1.2