All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollisb@us.ibm.com>
To: Jerone Young <jyoung5@us.ibm.com>
Cc: kvm-devel@lists.sourceforge.net, kvm-ppc-devel@lists.sourceforge.net
Subject: Re: [kvm-ppc-devel] [PATCH] Fix undefined refrence
Date: Wed, 19 Mar 2008 17:39:34 +0000	[thread overview]
Message-ID: <1205948374.11366.27.camel@basalt> (raw)
In-Reply-To: <782ef2276af9ca360e25.1205942780@thinkpad.austin.ibm.com>

On Wed, 2008-03-19 at 11:06 -0500, Jerone Young wrote:
> # HG changeset patch
> # User Jerone Young <jyoung5@us.ibm.com>
> # Date 1205942671 18000
> # Branch merge
> # Node ID 782ef2276af9ca360e25e07ec5ac0ec387428397
> # Parent  972f62b6acae693c388d7b05d3a9ba7ef26ab4a0
> Fix undefined refrence of qemu_system_device_hot_add for non x86 archs
> 
> This patch fixes it so that functions that depend on
> qemu_system_device_hot_add() are only compiled for x86 archs.
> 
> Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
> 
> diff --git a/qemu/hw/device-hotplug.c b/qemu/hw/device-hotplug.c
> --- a/qemu/hw/device-hotplug.c
> +++ b/qemu/hw/device-hotplug.c
> @@ -140,6 +140,7 @@ static PCIDevice *qemu_system_hot_add_st
>      return opaque;
>  }
> 
> +#if defined(TARGET_I386) || defined(TARGET_X86_64)
>  void device_hot_add(int pcibus, const char *type, const char *opts)
>  {
>      PCIDevice *dev = NULL;
> @@ -171,6 +172,7 @@ void device_hot_remove(int pcibus, int s
> 
>      qemu_system_device_hot_add(pcibus, slot, 0);
>  }
> +#endif
> 
>  static void destroy_nic(int slot)
>  {
> diff --git a/qemu/monitor.c b/qemu/monitor.c
> --- a/qemu/monitor.c
> +++ b/qemu/monitor.c
> @@ -1359,6 +1359,7 @@ static term_cmd_t term_cmds[] = {
>      { "migrate_set_speed", "s", do_migrate_set_speed,
>        "value", "set maximum speed (in bytes) for migrations" },
>      { "cpu_set", "is", do_cpu_set_nr, "cpu [online|offline]", "change cpu state" },
> +#if defined(TARGET_I386) || defined(TARGET_X86_64)
>      { "drive_add", "iss", drive_hot_add, "pcibus pcidevfn [file=file][,if=type][,bus=n]\n"
>                                          "[,unit=m][,media=d][index=i]\n"
>                                          "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
> @@ -1366,6 +1367,7 @@ static term_cmd_t term_cmds[] = {
>                                          "add drive to PCI storage controller" },
>      { "pci_add", "iss", device_hot_add, "bus nic|storage [[vlan=n][,macaddr­dr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },
>      { "pci_del", "ii", device_hot_remove, "bus slot-number", "hot remove PCI device" },
> +#endif
>      { NULL, NULL, },
>  };

Why would we build any of this code? This whole file should be disabled
at the Makefile level (with a configure patch to ifdef in monitor.c).

-- 
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/
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

WARNING: multiple messages have this Message-ID (diff)
From: Hollis Blanchard <hollisb@us.ibm.com>
To: Jerone Young <jyoung5@us.ibm.com>
Cc: kvm-devel@lists.sourceforge.net, kvm-ppc-devel@lists.sourceforge.net
Subject: Re: [kvm-ppc-devel] [PATCH] Fix undefined refrence of	qemu_system_device_hot_add for non	x86 archs
Date: Wed, 19 Mar 2008 12:39:34 -0500	[thread overview]
Message-ID: <1205948374.11366.27.camel@basalt> (raw)
In-Reply-To: <782ef2276af9ca360e25.1205942780@thinkpad.austin.ibm.com>

On Wed, 2008-03-19 at 11:06 -0500, Jerone Young wrote:
> # HG changeset patch
> # User Jerone Young <jyoung5@us.ibm.com>
> # Date 1205942671 18000
> # Branch merge
> # Node ID 782ef2276af9ca360e25e07ec5ac0ec387428397
> # Parent  972f62b6acae693c388d7b05d3a9ba7ef26ab4a0
> Fix undefined refrence of qemu_system_device_hot_add for non x86 archs
> 
> This patch fixes it so that functions that depend on
> qemu_system_device_hot_add() are only compiled for x86 archs.
> 
> Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
> 
> diff --git a/qemu/hw/device-hotplug.c b/qemu/hw/device-hotplug.c
> --- a/qemu/hw/device-hotplug.c
> +++ b/qemu/hw/device-hotplug.c
> @@ -140,6 +140,7 @@ static PCIDevice *qemu_system_hot_add_st
>      return opaque;
>  }
> 
> +#if defined(TARGET_I386) || defined(TARGET_X86_64)
>  void device_hot_add(int pcibus, const char *type, const char *opts)
>  {
>      PCIDevice *dev = NULL;
> @@ -171,6 +172,7 @@ void device_hot_remove(int pcibus, int s
> 
>      qemu_system_device_hot_add(pcibus, slot, 0);
>  }
> +#endif
> 
>  static void destroy_nic(int slot)
>  {
> diff --git a/qemu/monitor.c b/qemu/monitor.c
> --- a/qemu/monitor.c
> +++ b/qemu/monitor.c
> @@ -1359,6 +1359,7 @@ static term_cmd_t term_cmds[] = {
>      { "migrate_set_speed", "s", do_migrate_set_speed,
>        "value", "set maximum speed (in bytes) for migrations" },
>      { "cpu_set", "is", do_cpu_set_nr, "cpu [online|offline]", "change cpu state" },
> +#if defined(TARGET_I386) || defined(TARGET_X86_64)
>      { "drive_add", "iss", drive_hot_add, "pcibus pcidevfn [file=file][,if=type][,bus=n]\n"
>                                          "[,unit=m][,media=d][index=i]\n"
>                                          "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
> @@ -1366,6 +1367,7 @@ static term_cmd_t term_cmds[] = {
>                                          "add drive to PCI storage controller" },
>      { "pci_add", "iss", device_hot_add, "bus nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },
>      { "pci_del", "ii", device_hot_remove, "bus slot-number", "hot remove PCI device" },
> +#endif
>      { NULL, NULL, },
>  };

Why would we build any of this code? This whole file should be disabled
at the Makefile level (with a configure patch to ifdef in monitor.c).

-- 
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-19 17:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-19 16:06 [kvm-ppc-devel] [PATCH] Fix undefined refrence of Jerone Young
2008-03-19 16:06 ` [PATCH] Fix undefined refrence of qemu_system_device_hot_add for non x86 archs Jerone Young
2008-03-19 17:39 ` Hollis Blanchard [this message]
2008-03-19 17:39   ` [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=1205948374.11366.27.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 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.