qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 706e94: hw/ppc/sam460ex: Drop use of ppcuic_i


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 706e94: hw/ppc/sam460ex: Drop use of ppcuic_init()
Date: Tue, 19 Jan 2021 02:17:23 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 706e944206d70659229a486385120326bca77695
      
https://github.com/qemu/qemu/commit/706e944206d70659229a486385120326bca77695
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/sam460ex.c

  Log Message:
  -----------
  hw/ppc/sam460ex: Drop use of ppcuic_init()

Switch the sam460ex board to directly creating and configuring the
UIC, rather than doing it via the old ppcuic_init() helper function.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210108171212.16500-2-peter.maydell@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 7980822342834dcc77d3cb8ea0dfd2b2d42e90a5
      
https://github.com/qemu/qemu/commit/7980822342834dcc77d3cb8ea0dfd2b2d42e90a5
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/ppc405.h
    M hw/ppc/ppc405_uc.c

  Log Message:
  -----------
  hw/ppc: Delete unused ppc405cr_init() code

The function ppc405cr_init() has apparently been unused since it was
added in commit 8ecc7913525ecb in 2007.

Remove this dead code, so we don't have to convert it away from using
ppcuic_init().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210108171212.16500-3-peter.maydell@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 37dc4b5f7c5ef7300b3a1e2bc298db9edb0efdc5
      
https://github.com/qemu/qemu/commit/37dc4b5f7c5ef7300b3a1e2bc298db9edb0efdc5
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/intc/ppc-uic.c

  Log Message:
  -----------
  hw/intc/ppc-uic: Make default dcr-base 0xc0, not 0x30

In commit 34d0831f38fd8 the ppc-uic device was added, with a dcr-base
property. The intention was that the default value of dcr-base should be
the one that most of our boards need, so that in the common case they
don't need to specify a property value.

All QEMU boards with a UIC use a dcr-base of 0xc0, with the exception of
sam460ex which has four UICs and so puts them at 0xc0, 0xd0, 0xe0, 0xf0.
So 0xc0 is the obvious right choice for the default dcr-base.

The board code conversions in commits 0270d74ef88623505 (bamboo) and
c5ac9dc64fa552a6 (virtex_ml507) assumed that default was 0xc0. Unfortunately
the actual default in 34d0831f38fd8 was 0x30, by mistake, so the
bamboo and virtex_ml507 boards were broken as they were converted
away from ppcuic_init() (which always specifies the dcr_base property
value explicitly).

Set the default dcr-base to 0xc0 as was intended, fixing bamboo and
virtex_ml507.

Fixes: 34d0831f38fd8
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Suggested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210111213007.7381-1-peter.maydell@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 71c3c44bc3e4b516efc868b05237aabefbf20fa8
      
https://github.com/qemu/qemu/commit/71c3c44bc3e4b516efc868b05237aabefbf20fa8
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/ppc405.h
    M hw/ppc/ppc405_boards.c
    M hw/ppc/ppc405_uc.c

  Log Message:
  -----------
  hw/ppc/ppc405_uc: Drop use of ppcuic_init()

Switch the ppc405_uc boards to directly creating and configuring the
UIC, rather than doing it via the old ppcuic_init() helper function.

We retain the API feature of ppc405ep_init() where it passes back
something allowing the callers to wire up devices to the UIC if
they need to, even though neither of the callsites currently makes
use of this ability -- instead of passing back the qemu_irq array
we pass back the UIC DeviceState.

This fixes a trivial Coverity-detected memory leak where
we were leaking the array of IRQs returned by ppcuic_init().

Fixes: Coverity CID 1421922
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210108171212.16500-4-peter.maydell@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: f7c4acf572ee0219550ca895d1e09c7d9a8f4f79
      
https://github.com/qemu/qemu/commit/f7c4acf572ee0219550ca895d1e09c7d9a8f4f79
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/ppc4xx_devs.c
    M include/hw/intc/ppc-uic.h
    M include/hw/ppc/ppc4xx.h

  Log Message:
  -----------
  hw/ppc: Remove unused ppcuic_init()

Now we've converted all the callsites to directly create the QOM UIC
device themselves, the ppcuic_init() function is unused and can be
removed. The enum defining PPCUIC symbolic constants can be moved
to the ppc-uic.h header where it more naturally belongs.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-Id: <20210108171212.16500-5-peter.maydell@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: fb6d04c075e4379ef93a7ba903e224e377da72b9
      
https://github.com/qemu/qemu/commit/fb6d04c075e4379ef93a7ba903e224e377da72b9
  Author: BALATON Zoltan <balaton@eik.bme.hu>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/Kconfig

  Log Message:
  -----------
  Revert "sam460ex: Remove FDT_PPC dependency from KConfig"

This reverts commit 038da2adf that was mistakenly added, this
dependency is still needed to get libfdt dependencies even if fdt.o is
not needed by sam460ex.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: 
<15a9fa72eed4f02bdbeaef206803d5e22260e2de.1610143658.git.balaton@eik.bme.hu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: dbc2758921dac90c97453d601c717fb1a5768fd5
      
https://github.com/qemu/qemu/commit/dbc2758921dac90c97453d601c717fb1a5768fd5
  Author: BALATON Zoltan <balaton@eik.bme.hu>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/Kconfig

  Log Message:
  -----------
  Revert "ppc4xx: Move common dependency on serial to common option"

This reverts commit e6d5106786 which was added mistakenly. While this
change works it was suggested during review that keeping dependencies
explicit for each board may be better than listing them in a common
option so keep the previous version and revert this change.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: 
<8c65807fc7dc1c4c4f6320f2fd6409a3091c88ff.1610143658.git.balaton@eik.bme.hu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: f17969db719ef563d2f7a1b62ea5dd5087ad774a
      
https://github.com/qemu/qemu/commit/f17969db719ef563d2f7a1b62ea5dd5087ad774a
  Author: BALATON Zoltan <balaton@eik.bme.hu>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/sam460ex.c

  Log Message:
  -----------
  sam460ex: Use type cast macro instead of simple cast

Use the PCI_BUS type cast macro to convert result of qdev_get_child_bus().
Also remove the check for NULL afterwards which should not be needed
because sysbus_create_simple() uses error_abort and we create the PCI
host object here that's expected to have a PCI bus so this shouldn't
fail. Even if it would fail that would be due to a programmer error so
an error message is not necessary.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: 
<a4dc55b56eed3ce899b7bf9835b980a114c52598.1610143658.git.balaton@eik.bme.hu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 73598c75df0585e039825e642adede21912dabc7
      
https://github.com/qemu/qemu/commit/73598c75df0585e039825e642adede21912dabc7
  Author: Greg Kurz <groug@kaod.org>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/spapr.c
    M hw/ppc/spapr_events.c
    M hw/ppc/spapr_ovec.c
    M include/hw/ppc/spapr.h
    M include/hw/ppc/spapr_ovec.h

  Log Message:
  -----------
  spapr: Improve handling of memory unplug with old guests

Since commit 1e8b5b1aa16b ("spapr: Allow memory unplug to always succeed")
trying to unplug memory from a guest that doesn't support it (eg. rhel6)
no longer generates an error like it used to. Instead, it leaves the
memory around : only a subsequent reboot or manual use of drmgr within
the guest can complete the hot-unplug sequence. A flag was added to
SpaprMachineClass so that this new behavior only applies to the default
machine type.

We can do better. CAS processes all pending hot-unplug requests. This
means that we don't really care about what the guest supports if
the hot-unplug request happens before CAS.

All guests that we care for, even old ones, set enough bits in OV5
that lead to a non-empty bitmap in spapr->ov5_cas. Use that as a
heuristic to decide if CAS has already occured or not.

Always accept unplug requests that happen before CAS since CAS will
process them. Restore the previous behavior of rejecting them after
CAS when we know that the guest doesn't support memory hot-unplug.

This behavior is suitable for all machine types : this allows to
drop the pre_6_0_memory_unplug flag.

Fixes: 1e8b5b1aa16b ("spapr: Allow memory unplug to always succeed")
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <161012708715.801107.11418801796987916516.stgit@bahia.lan>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: bb51f2fae746a79164a4da2a5b58b64ae7defb0b
      
https://github.com/qemu/qemu/commit/bb51f2fae746a79164a4da2a5b58b64ae7defb0b
  Author: Daniel Henrique Barboza <danielhb413@gmail.com>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M include/hw/ppc/spapr.h

  Log Message:
  -----------
  spapr.h: fix trailing whitespace in phb_placement

This whitespace was messing with lots of diffs if you happen
to use an editor that eliminates trailing whitespaces on file
save.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20210114180628.1675603-2-danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: eb72b639886001c19d91b34840641bdd2f46646d
      
https://github.com/qemu/qemu/commit/eb72b639886001c19d91b34840641bdd2f46646d
  Author: Daniel Henrique Barboza <danielhb413@gmail.com>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/spapr_hcall.c
    M include/hw/ppc/spapr.h

  Log Message:
  -----------
  spapr_hcall.c: make do_client_architecture_support static

The function is called only inside spapr_hcall.c.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20210114180628.1675603-3-danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 7058904738106112a936b7438e29a1f252039644
      
https://github.com/qemu/qemu/commit/7058904738106112a936b7438e29a1f252039644
  Author: Daniel Henrique Barboza <danielhb413@gmail.com>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/spapr_rtas.c

  Log Message:
  -----------
  spapr_rtas.c: fix identation of rtas_ibm_suspend_me() args

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20210114180628.1675603-5-danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 2a05350e90ba09b6f42f5cff81f4aa7580a998be
      
https://github.com/qemu/qemu/commit/2a05350e90ba09b6f42f5cff81f4aa7580a998be
  Author: Daniel Henrique Barboza <danielhb413@gmail.com>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/ppc/spapr_cpu_core.c

  Log Message:
  -----------
  spapr_cpu_core.c: use g_auto* in spapr_create_vcpu()

Use g_autoptr() with Object and g_autofree with the string to
avoid the need of a cleanup path.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20210114180628.1675603-6-danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: c114af1639d26cbcbc06132bae95f9906206ded3
      
https://github.com/qemu/qemu/commit/c114af1639d26cbcbc06132bae95f9906206ded3
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M hw/intc/ppc-uic.c
    M hw/ppc/Kconfig
    M hw/ppc/ppc405.h
    M hw/ppc/ppc405_boards.c
    M hw/ppc/ppc405_uc.c
    M hw/ppc/ppc4xx_devs.c
    M hw/ppc/sam460ex.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_cpu_core.c
    M hw/ppc/spapr_events.c
    M hw/ppc/spapr_hcall.c
    M hw/ppc/spapr_ovec.c
    M hw/ppc/spapr_rtas.c
    M include/hw/intc/ppc-uic.h
    M include/hw/ppc/ppc4xx.h
    M include/hw/ppc/spapr.h
    M include/hw/ppc/spapr_ovec.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.0-20210119' 
into staging

ppc patch queue 2021-01-19

Next pull request for qemu-6.0.  Not a huge amount here, but it does
have some important fixes from Greg Kurz.  Includes:

 * A number of minor cleanups from Daniel Barboza (preliminaries for
   some hotplug changes that are still under review)
 * Improved handling of memory hotplug from Greg Kurz
 * A number of fixes for sam460ex and other 440 based platforms from
   Zolan Balaton
 * Some fixes for the QOMification of the PPC 4xx UIC interrupt
   controller from Peter Maydell

# gpg: Signature made Tue 19 Jan 2021 06:22:45 GMT
# gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" 
[full]
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" 
[unknown]
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dg-gitlab/tags/ppc-for-6.0-20210119:
  spapr_cpu_core.c: use g_auto* in spapr_create_vcpu()
  spapr_rtas.c: fix identation of rtas_ibm_suspend_me() args
  spapr_hcall.c: make do_client_architecture_support static
  spapr.h: fix trailing whitespace in phb_placement
  spapr: Improve handling of memory unplug with old guests
  sam460ex: Use type cast macro instead of simple cast
  Revert "ppc4xx: Move common dependency on serial to common option"
  Revert "sam460ex: Remove FDT_PPC dependency from KConfig"
  hw/ppc: Remove unused ppcuic_init()
  hw/ppc/ppc405_uc: Drop use of ppcuic_init()
  hw/intc/ppc-uic: Make default dcr-base 0xc0, not 0x30
  hw/ppc: Delete unused ppc405cr_init() code
  hw/ppc/sam460ex: Drop use of ppcuic_init()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/e43d564fa3a0...c114af1639d2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]