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 160776 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]
linux-2.6-ioremap-initial-support.patch
linux-2.6-ioremap-initial-support.patch (text/plain), 3.48 KB, created by
Jarod Wilson
on 2007-08-06 22:28:58 UTC
(
hide
)
Description:
linux-2.6-ioremap-initial-support.patch
Filename:
MIME Type:
Creator:
Jarod Wilson
Created:
2007-08-06 22:28:58 UTC
Size:
3.48 KB
patch
obsolete
>diff -Naurp linux-2.6.18.ia64.orig/include/linux/io.h linux-2.6.18.ia64/include/linux/io.h >--- linux-2.6.18.ia64.orig/include/linux/io.h 2007-08-06 13:31:33.000000000 -0400 >+++ linux-2.6.18.ia64/include/linux/io.h 2007-08-06 13:33:45.000000000 -0400 >@@ -19,6 +19,7 @@ > #define _LINUX_IO_H > > #include <asm/io.h> >+#include <asm/page.h> > > struct device; > >@@ -51,4 +52,7 @@ void __iomem * devm_ioremap_nocache(stru > unsigned long size); > void devm_iounmap(struct device *dev, void __iomem *addr); > >+int ioremap_page_range(unsigned long addr, unsigned long end, >+ unsigned long phys_addr, pgprot_t prot); >+ > #endif /* _LINUX_IO_H */ >diff -Naurp linux-2.6.18.ia64.orig/lib/ioremap.c linux-2.6.18.ia64/lib/ioremap.c >--- linux-2.6.18.ia64.orig/lib/ioremap.c 1969-12-31 19:00:00.000000000 -0500 >+++ linux-2.6.18.ia64/lib/ioremap.c 2007-08-06 13:32:22.000000000 -0400 >@@ -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; >+} >diff -Naurp linux-2.6.18.ia64.orig/lib/Makefile linux-2.6.18.ia64/lib/Makefile >--- linux-2.6.18.ia64.orig/lib/Makefile 2007-08-06 13:31:37.000000000 -0400 >+++ linux-2.6.18.ia64/lib/Makefile 2007-08-06 13:32:22.000000000 -0400 >@@ -7,6 +7,7 @@ lib-y := errno.o ctype.o string.o vsprin > 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