linux/arch/s390
Niklas Schnelle ba764dd703 s390/pci: refactor zpci_create_device()
Currently zpci_create_device() is only called in clp_add_pci_device()
which allocates the memory for the struct zpci_dev being created. There
is little separation of concerns as only both functions together can
create a zpci_dev and the only CLP specific code in
clp_add_pci_device() is a call to clp_query_pci_fn().

Improve this by removing clp_add_pci_device() and refactor
zpci_create_device() such that it alone creates and initializes the
zpci_dev given the FID and Function Handle. For this we need to make
clp_query_pci_fn() non-static. While at it remove the function handle
parameter since we can just take that from the zpci_dev. Also move
adding to the zpci_list to after the zdev has been fully created which
eliminates a window where a partially initialized zdev can be found by
get_zdev_by_fid().

Acked-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2021-02-09 15:57:04 +01:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot kasan, x86, s390: update undef CONFIG_KASAN 2020-12-22 12:55:08 -08:00
configs s390: convert to generic entry 2021-01-19 12:29:26 +01:00
crypto s390/crypto: improve retry logic in case of master key change 2021-01-27 13:00:48 +01:00
hypfs fs_parse: fold fs_parameter_desc/fs_parameter_spec 2020-02-07 14:48:37 -05:00
include s390/pci: refactor zpci_create_device() 2021-02-09 15:57:04 +01:00
kernel s390: add missing include to arch/s390/kernel/signal.c 2021-01-27 13:00:47 +01:00
kvm s390: convert to generic entry 2021-01-19 12:29:26 +01:00
lib s390: convert to generic entry 2021-01-19 12:29:26 +01:00
mm s390: convert to generic entry 2021-01-19 12:29:26 +01:00
net s390/bpf: Fix multiple tail calls 2020-09-14 18:21:31 -07:00
oprofile s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
pci s390/pci: refactor zpci_create_device() 2021-02-09 15:57:04 +01:00
purgatory - Add support for the hugetlb_cma command line option to allocate gigantic 2020-12-14 16:22:26 -08:00
tools .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kbuild s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
Kconfig s390: convert to generic entry 2021-01-19 12:29:26 +01:00
Kconfig.debug s390: convert to generic entry 2021-01-19 12:29:26 +01:00
Makefile s390/decompressor: add stacktrace support 2020-11-20 19:19:11 +01:00