summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2009-02-14 22:22:39 +0200
committerPekka Paalanen <pq@iki.fi>2009-02-16 20:45:16 +0200
commit0054e14793e585ec0d8e95e3d7b82cbf1a684af8 (patch)
treeb9bf1d71fa59791f8325f53a04da65d05b518c4a /linux-core
parente32aa6226fe98d8342647acf34decd3699eff5e4 (diff)
drm_compat: remove kmap_atomic_prot_pfn()
This function is unused, and yet creates build problems: the symbol init_mm is not exported by the latest -rc kernels and I don't believe it ever will be. Even CONFIG_UNUSED_SYMBOLS does not provide it anymore. If this function is needed in the future, it needs to be reinvented in any case. So remove it. Signed-off-by: Pekka Paalanen <pq@iki.fi>
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_compat.c29
-rw-r--r--linux-core/drm_compat.h21
2 files changed, 0 insertions, 50 deletions
diff --git a/linux-core/drm_compat.c b/linux-core/drm_compat.c
index c4ebc2fa..67baac5e 100644
--- a/linux-core/drm_compat.c
+++ b/linux-core/drm_compat.c
@@ -730,35 +730,6 @@ void *idr_replace(struct idr *idp, void *ptr, int id)
EXPORT_SYMBOL(idr_replace);
#endif
-#if defined(DRM_KMAP_ATOMIC_PROT_PFN)
-#define drm_kmap_get_fixmap_pte(vaddr) \
- pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), vaddr), (vaddr)), (vaddr))
-
-void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type,
- pgprot_t protection)
-{
- enum fixed_addresses idx;
- unsigned long vaddr;
- static pte_t *km_pte;
- static int initialized = 0;
-
- if (unlikely(!initialized)) {
- km_pte = drm_kmap_get_fixmap_pte(__fix_to_virt(FIX_KMAP_BEGIN));
- initialized = 1;
- }
-
- pagefault_disable();
- idx = type + KM_TYPE_NR*smp_processor_id();
- vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
- set_pte(km_pte-idx, pfn_pte(pfn, protection));
-
- return (void*) vaddr;
-}
-
-EXPORT_SYMBOL(kmap_atomic_prot_pfn);
-
-#endif
-
#ifdef DRM_FULL_MM_COMPAT
#ifdef DRM_NO_FAULT
unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma,
diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h
index 4ae4ba6d..a5673563 100644
--- a/linux-core/drm_compat.h
+++ b/linux-core/drm_compat.h
@@ -338,27 +338,6 @@ typedef _Bool bool;
#endif
-#if (defined(CONFIG_X86) && defined(CONFIG_X86_32) && defined(CONFIG_HIGHMEM))
-/*
- * pgd_offset_k() is a macro that uses the symbol init_mm,
- * check that it is available.
- */
-# if ((LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) || \
- defined(CONFIG_UNUSED_SYMBOLS))
-#define DRM_KMAP_ATOMIC_PROT_PFN
-extern void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type,
- pgprot_t protection);
-# else
-#warning "init_mm is not available on this kernel!"
-static inline void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type,
- pgprot_t protection)
-{
- /* stub */
- return NULL;
-}
-# endif /* no init_mm */
-#endif
-
#if !defined(flush_agp_mappings)
#define flush_agp_mappings() do {} while(0)
#endif