public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollisb@us.ibm.com>
To: Jerone Young <jyoung5@us.ibm.com>
Cc: kvm-ppc-devel@lists.sourceforge.net, kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-ppc-devel] [PATCH 7 of 7] Add ability to specify ram on	command line for bamboo	board model
Date: Wed, 12 Mar 2008 21:23:26 -0500	[thread overview]
Message-ID: <1205375006.9736.8.camel@basalt> (raw)
In-Reply-To: <8b1dd3609551efefbd66.1205297446@thinkpad.austin.ibm.com>

On Tue, 2008-03-11 at 23:50 -0500, Jerone Young wrote:
> # HG changeset patch
> # User Jerone Young <jyoung5@us.ibm.com>
> # Date 1205296680 18000
> # Branch merge
> # Node ID 8b1dd3609551efefbd6633ac6fe4caa3a6cbe5e9
> # Parent  3a891d8fada96166089b5796f3241087d4aae50f
> Add ability to specify ram on command line for bamboo board model
> 
> This patch adds the ability to now specify ram sizes on the command line.
> Due to the nature of the code there are restictions on exactly how
> much ram and the multiple that the size must match.
> 
> Signed-off-by: Jerone Young <jyoung5@us.ibm.com>

NAK, this is both brittle and overcomplicated. Try translating the
following Python to C:

ram = 144
reg = [0, 0, 0, 0]
sizes = (256, 128, 64, 32, 16, 8)

for i in range(len(reg)):
        for size in sizes:
                if ram / size:
                        reg[i] = size
                        ram -= size
                        break

if ram:
        print "warning: %d left over" % ram
print reg

-- 
Hollis Blanchard
IBM Linux Technology Center


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  reply	other threads:[~2008-03-13  2:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12  4:50 [PATCH 0 of 7] PowerPC kvm-userspace patches Jerone Young
2008-03-12  4:50 ` [PATCH 1 of 7] Add libfdt to KVM userspace Jerone Young
2008-03-13  2:25   ` [kvm-ppc-devel] " Hollis Blanchard
2008-03-12  4:50 ` [PATCH 2 of 7] Add libfdt support to qemu Jerone Young
2008-03-12  4:50 ` [PATCH 3 of 7] Create new load_uboot() & gunzip support to uboot loader in Qemu Jerone Young
2008-03-13  2:36   ` [kvm-ppc-devel] " Hollis Blanchard
2008-03-13 20:09     ` Jerone Young
2008-03-12  4:50 ` [PATCH 4 of 7] Add PPC 440EP bamboo board device tree source & binary into qemu Jerone Young
2008-03-13  2:42   ` [kvm-ppc-devel] " Hollis Blanchard
2008-03-13 20:24     ` Jerone Young
2008-03-12  4:50 ` [PATCH 5 of 7] Add dynamic device tree manipulation & change uboot loader for PPC bamboo board model Jerone Young
2008-03-13  2:53   ` [kvm-ppc-devel] " Hollis Blanchard
2008-03-13 22:27     ` Jerone Young
2008-03-12  4:50 ` [PATCH 6 of 7] Modify PPC bamboo & ppc440 board models Jerone Young
2008-03-12  4:50 ` [PATCH 7 of 7] Add ability to specify ram on command line for bamboo board model Jerone Young
2008-03-13  2:23   ` Hollis Blanchard [this message]
2008-03-13  2:55 ` [kvm-ppc-devel] [PATCH 0 of 7] PowerPC kvm-userspace patches Hollis Blanchard
  -- strict thread matches above, loose matches on Subject: below --
2008-03-14 17:09 [PATCH 7 of 7] Add ability to specify ram on command line for bamboo board model Jerone Young
2008-03-14 19:16 ` [kvm-ppc-devel] " Hollis Blanchard
2008-03-14 20:07   ` Jerone Young
2008-03-18 20:06 Jerone Young
2008-03-18 21:03 ` [kvm-ppc-devel] " Hollis Blanchard
2008-03-18 21:17   ` Jerone Young
2008-03-19 14:45 Jerone Young
2008-03-19 17:55 ` [kvm-ppc-devel] " Hollis Blanchard

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=1205375006.9736.8.camel@basalt \
    --to=hollisb@us.ibm.com \
    --cc=jyoung5@us.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=kvm-ppc-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox