* Andi Kleen <ak@suse.de> wrote:please send a fuller bugreport - all these problems on your testbox might be interrelated. Jan's patch is undone in a later part of the series so it's a bisection artifact. I've fixed that up. Ingo -------------------> Subject: x86: fix 64-bit ioremap() From: From: Jan Beulich <jbeulich@novell.com> ioremap() should set G agreed. That should not really matter because ioremap_change_attr()->c_p_a is only called when flags is != 0 and that means it is already different from PAGE_KERNEL. There's one Jan pointed out: iounmap does not subtract the guard page size so it ends up resetting one page too much. That is probably what causes your problem. But again you should be passing in G in the first place. Additionally I found it necessary to fix ioremap_64.c's use of change_page_attr_addr(): [ mingo@elte.hu: fixed coding style errors ] Signed-off-by: Ingo Molnar <mingo@elte.hu> --- arch/x86/mm/ioremap_64.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) Index: linux-x86.q/arch/x86/mm/ioremap_64.c =================================================================== --- linux-x86.q.orig/arch/x86/mm/ioremap_64.c +++ linux-x86.q/arch/x86/mm/ioremap_64.c @@ -45,10 +45,12 @@ ioremap_change_attr(unsigned long phys_a unsigned long vaddr = (unsigned long) __va(phys_addr); /* - * Must use a address here and not struct page because the phys addr - * can be a in hole between nodes and not have an memmap entry. + * Must use an address here and not struct page because the + * phys addr can be a in hole between nodes and not have an + * memmap entry: */ - err = change_page_attr_addr(vaddr,npages,__pgprot(__PAGE_KERNEL|flags)); + err = change_page_attr_addr(vaddr, npages, + MAKE_GLOBAL(__PAGE_KERNEL|flags)); if (!err) global_flush_tlb(); } @@ -181,7 +183,7 @@ void iounmap(volatile void __iomem *addr /* Reset the direct mapping. Can block */ if (p->flags >> 20) - ioremap_change_attr(p->phys_addr, p->size, 0); + ioremap_change_attr(p->phys_addr, get_vm_area_size(p), 0); /* Finally remove it */ o = remove_vm_area((void *)addr); --
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Linux 2.6.25-rc4 |
| Greg KH | Linux 2.6.25.10 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Ilpo Järvinen | Re: Strange Application bug, race in MSG_PEEK complaints (was: Bug#513695: fetchma... |
