s390x/pci: optimize calling s390_get_phb()
commita975a24aed372ba665a8b159e4cd14b6e105a296
authorYi Min Zhao <zyimin@linux.vnet.ibm.com>
Wed, 23 Nov 2016 03:08:29 +0000 (23 11:08 +0800)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Fri, 20 Jan 2017 09:01:59 +0000 (20 10:01 +0100)
treee9828610ce5f8784bc16ef04517c985c53b36e4e
parente70377dfa4bbc2e101066ca35675bed4129c5a8c
s390x/pci: optimize calling s390_get_phb()

A function may recursively call device search functions or may call
serveral different device search function. Passing the S390pciState to
search functions as an argument instead of looking up it inside the
search functions lowers the number of calling s390_get_phb().

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/s390-pci-bus.c
hw/s390x/s390-pci-bus.h
hw/s390x/s390-pci-inst.c
target/s390x/kvm.c