Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 154633 Details for
Bug 240006
mmap of VGA frame buffer causes MCA on ia64
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
ioremap patch
ioremap (text/plain), 3.47 KB, created by
Martin Poole
on 2007-05-14 10:55:35 UTC
(
hide
)
Description:
ioremap patch
Filename:
MIME Type:
Creator:
Martin Poole
Created:
2007-05-14 10:55:35 UTC
Size:
3.47 KB
patch
obsolete
>Index: linux-2.6.18.ia64/include/linux/io.h >=================================================================== >--- linux-2.6.18.ia64.orig/include/linux/io.h 2006-09-19 21:42:06.000000000 -0600 >+++ linux-2.6.18.ia64/include/linux/io.h 2007-03-23 06:52:39.000000000 -0600 >@@ -19,8 +19,12 @@ > #define _LINUX_IO_H > > #include <asm/io.h> >+#include <asm/page.h> > > void __iowrite32_copy(void __iomem *to, const void *from, size_t count); > void __iowrite64_copy(void __iomem *to, const void *from, size_t count); > >+int ioremap_page_range(unsigned long addr, unsigned long end, >+ unsigned long phys_addr, pgprot_t prot); >+ > #endif /* _LINUX_IO_H */ >Index: linux-2.6.18.ia64/lib/ioremap.c >=================================================================== >--- /dev/null 1970-01-01 00:00:00.000000000 +0000 >+++ linux-2.6.18.ia64/lib/ioremap.c 2007-03-23 06:51:44.000000000 -0600 >@@ -0,0 +1,91 @@ >+/* >+ * Re-map IO memory to kernel address space so that we can access it. >+ * This is needed for high PCI addresses that aren't mapped in the >+ * 640k-1MB IO memory area on PC's >+ * >+ * (C) Copyright 1995 1996 Linus Torvalds >+ */ >+#include <linux/vmalloc.h> >+#include <linux/mm.h> >+ >+#include <asm/cacheflush.h> >+#include <asm/pgtable.h> >+ >+static int ioremap_pte_range(pmd_t *pmd, unsigned long addr, >+ unsigned long end, unsigned long phys_addr, pgprot_t prot) >+{ >+ pte_t *pte; >+ unsigned long pfn; >+ >+ pfn = phys_addr >> PAGE_SHIFT; >+ pte = pte_alloc_kernel(pmd, addr); >+ if (!pte) >+ return -ENOMEM; >+ do { >+ BUG_ON(!pte_none(*pte)); >+ set_pte_at(&init_mm, addr, pte, pfn_pte(pfn, prot)); >+ pfn++; >+ } while (pte++, addr += PAGE_SIZE, addr != end); >+ return 0; >+} >+ >+static inline int ioremap_pmd_range(pud_t *pud, unsigned long addr, >+ unsigned long end, unsigned long phys_addr, pgprot_t prot) >+{ >+ pmd_t *pmd; >+ unsigned long next; >+ >+ phys_addr -= addr; >+ pmd = pmd_alloc(&init_mm, pud, addr); >+ if (!pmd) >+ return -ENOMEM; >+ do { >+ next = pmd_addr_end(addr, end); >+ if (ioremap_pte_range(pmd, addr, next, phys_addr + addr, prot)) >+ return -ENOMEM; >+ } while (pmd++, addr = next, addr != end); >+ return 0; >+} >+ >+static inline int ioremap_pud_range(pgd_t *pgd, unsigned long addr, >+ unsigned long end, unsigned long phys_addr, pgprot_t prot) >+{ >+ pud_t *pud; >+ unsigned long next; >+ >+ phys_addr -= addr; >+ pud = pud_alloc(&init_mm, pgd, addr); >+ if (!pud) >+ return -ENOMEM; >+ do { >+ next = pud_addr_end(addr, end); >+ if (ioremap_pmd_range(pud, addr, next, phys_addr + addr, prot)) >+ return -ENOMEM; >+ } while (pud++, addr = next, addr != end); >+ return 0; >+} >+ >+int ioremap_page_range(unsigned long addr, >+ unsigned long end, unsigned long phys_addr, pgprot_t prot) >+{ >+ pgd_t *pgd; >+ unsigned long start; >+ unsigned long next; >+ int err; >+ >+ BUG_ON(addr >= end); >+ >+ start = addr; >+ phys_addr -= addr; >+ pgd = pgd_offset_k(addr); >+ do { >+ next = pgd_addr_end(addr, end); >+ err = ioremap_pud_range(pgd, addr, next, phys_addr+addr, prot); >+ if (err) >+ break; >+ } while (pgd++, addr = next, addr != end); >+ >+ flush_cache_vmap(start, end); >+ >+ return err; >+} >Index: linux-2.6.18.ia64/lib/Makefile >=================================================================== >--- linux-2.6.18.ia64.orig/lib/Makefile 2007-03-23 05:18:34.000000000 -0600 >+++ linux-2.6.18.ia64/lib/Makefile 2007-03-23 06:54:47.000000000 -0600 >@@ -7,6 +7,7 @@ > idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ > sha1.o > >+lib-$(CONFIG_MMU) += ioremap.o > lib-$(CONFIG_SMP) += cpumask.o > > lib-y += kobject.o kref.o kobject_uevent.o klist.o
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 240006
:
154633
|
154634
|
154635
|
154636
|
154637
|
160776
|
160777
|
160778
|
160779
|
160780
|
160812
|
161671
|
162020