All of lore.kernel.org
 help / color / mirror / Atom feed
From: "wang lianwei" <lianwei.wang@gmail.com>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: jdike@addtoit.com
Subject: [uml-devel] patch for iomem uses
Date: Mon, 6 Mar 2006 11:25:37 +0800	[thread overview]
Message-ID: <39134b110603051925y6f6176ffw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1487 bytes --]

1. linux/arch/um/kernel/physmem.c

    the find_iomem function will case endless loop if you use two or more
iomem to launch the UML kernel.

    diff -urN linux-2.6.10/arch/um/kernel/physmem.c linux-2.6.10-src
/arch/um/kernel/physmem.c
    --- linux-2.6.10/arch/um/kernel/physmem.c 2004-12-25 05:35:01.000000000+0800
    +++ linux-2.6.10-src/arch/um/kernel/physmem.c 2006-02-21 13:22:
43.000000000 +0800
    @@ -275,7 +275,7 @@
      highmem_len = highmem_pages * sizeof(struct page);

      total_pages = phys_pages + iomem_pages + highmem_pages;
    - total_len = phys_len + iomem_pages + highmem_len;
    + total_len = phys_len + iomem_len + highmem_len;

      if(kmalloc_ok){
       map = kmalloc(total_len, GFP_KERNEL);
    @@ -435,6 +435,7 @@
        *len_out = region->size;
        return(region->virt);
       }
    +  region = region->next;
      }

      return(0);


2. /arch/um/kernel/mem_user.c

diff -urN linux-2.6.10/arch/um/kernel/mem_user.c linux-2.6.10-src
/arch/um/kernel/mem_user.c
--- linux-2.6.10/arch/um/kernel/mem_user.c 2004-12-25 05:34:57.000000000+0800
+++ linux-2.6.10-src/arch/um/kernel/mem_user.c 2006-02-21
16:17:39.000000000+0800
@@ -191,7 +191,7 @@
   goto out_close;
  }

- size = (buf.ust_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1);
+ size = (buf.ust_size + UM_KERN_PAGE_SIZE - 1 ) & ~(UM_KERN_PAGE_SIZE - 1);

  *new = ((struct iomem_region) { .next  = iomem_regions,
      .driver  = driver,

[-- Attachment #2: Type: text/html, Size: 2357 bytes --]

             reply	other threads:[~2006-03-06  3:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-06  3:25 wang lianwei [this message]
2006-03-06  3:53 ` [uml-devel] patch for iomem uses Jeff Dike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39134b110603051925y6f6176ffw@mail.gmail.com \
    --to=lianwei.wang@gmail.com \
    --cc=jdike@addtoit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.