aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-06-28s390/qdio: get rid of register asmHeiko Carstens2-41/+46
Reviewed-by: Benjamin Block <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/ioasm: use symbolic names for asm operandsHeiko Carstens1-15/+15
Change remaining inline assemblies to also use symbolic names for operands, use "Q" constraint when possible, and use "+" modifier so that an operand needs to be specified only once. Acked-by: Peter Oberparleiter <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/ioasm: get rid of register asmHeiko Carstens1-53/+60
Acked-by: Peter Oberparleiter <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/cmf: get rid of register asmHeiko Carstens1-6/+7
Acked-by: Peter Oberparleiter <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/lib,string: get rid of register asmHeiko Carstens1-56/+75
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/lib,uaccess: get rid of register asmHeiko Carstens1-10/+15
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/string: get rid of register asmHeiko Carstens1-24/+35
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/cmpxchg: use register pair instead of register asmHeiko Carstens2-33/+38
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/mm,pages-states: get rid of register asmHeiko Carstens1-6/+6
There is no reason to use fixed registers for the essa instruction. Therefore remove the register asm construct. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/lib,xor: get rid of register asmHeiko Carstens1-4/+1
Looking at the generate code this was just a micro-optimization. However given that as many register asm constructs as possible will be removed from s390 code, remove this one as well. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/timex: get rid of register asmHeiko Carstens1-10/+16
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/hypfs: use register pair instead of register asmHeiko Carstens1-7/+6
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/zcrypt: Switch to flexible array memberKees Cook1-3/+3
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading/writing across neighboring array fields. Switch from zero-element arrays to flexible arrays so the compiler will perform appropriate bounds checking, avoiding these future warnings: In function '__fortify_memcpy', inlined from 'cca_sec2protkey' at drivers/s390/crypto/zcrypt_ccamisc.c:645:2: ./include/linux/fortify-string.h:244:4: error: call to '__write_overflow_field' declared with attribute error: detected write beyond size of field (1st parameter) In function '__fortify_memcpy', inlined from 'cca_clr2seckey' at drivers/s390/crypto/zcrypt_ccamisc.c:568:3: ./include/linux/fortify-string.h:246:4: error: call to '__read_overflow2_field' declared with attribute error: detected read beyond size of field (2nd parameter) In function '__fortify_memcpy', inlined from 'cca_genseckey' at drivers/s390/crypto/zcrypt_ccamisc.c:429:2: ./include/linux/fortify-string.h:246:4: error: call to '__read_overflow2_field' declared with attribute error: detected read beyond size of field (2nd parameter) Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/speculation: Use statically initialized const for instructionsKees Cook1-1/+2
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid confusing the checks when using a static const source. Move the static const array into a variable so the compiler can perform appropriate bounds checking. Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28virtio/s390: get rid of open-coded kvm hypercallHeiko Carstens1-26/+4
do_kvm_notify() and __do_kvm_notify() are an (exact) open-coded variant of kvm_hypercall3(). Therefore simply make use of kvm_hypercall3(), and get rid of duplicated code. Signed-off-by: Heiko Carstens <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Reviewed-by: Halil Pasic <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28s390/pci: add zpci_set_irq()/zpci_clear_irq()Niklas Schnelle2-11/+42
Pull the directed vs floating IRQ check into common zpci_set_irq()/zpci_clear_irq() functions and expose them for the rest of the zPCI subsystem. Furthermore we add a zdev flag bit to easily check if IRQs are registered. This is needed for use in resetting a zPCI function. Reviewed-by: Matthew Rosato <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-28scripts/min-tool-version.sh: Raise minimum clang version to 13.0.0 for s390Nathan Chancellor1-1/+6
clang versions prior to the current development version of 13.0.0 cannot compile s390 after commit 3abbdfde5a65 ("s390/bitops: use register pair instead of register asm") and the s390 maintainers do not intend to work around this in the kernel. Codify this in scripts/min-tool-version.sh similar to arm64 with GCC 5.1.0 so that there are no reports of broken builds. [[email protected]: breaking compatibility with older clang compilers is intended to finally make use of a feature which allows the compiler to allocate even/odd register pairs. This is possible since a very long time with gcc, but only since llvm-project commit d058262b1471 ("[SystemZ] Support i128 inline asm operands.") with clang. Using that feature allows to get rid of error prone register asm statements, of which the above named kernel commit is only the first of a larger not yet complete series.] Reported-by: Naresh Kamboju <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Acked-by: Nick Desaulniers <[email protected]> Acked-by: Masahiro Yamada <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/ipl: use register pair instead of register asmHeiko Carstens1-6/+8
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/mem_detect: fix tprot() program check new psw handlingHeiko Carstens1-11/+17
The tprot() inline asm temporarily changes the program check new psw to redirect a potential program check on the diag instruction. Restoring of the program check new psw is done in C code behind the inline asm. This can be problematic, especially if the function is inlined, since the compiler can reorder instructions in such a way that a different instruction, which may result in a program check, might be executed before the program check new psw has been restored. To avoid such a scenario move restoring into the inline asm. For consistency reasons move also saving of the original program check new psw into the inline asm. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/mem_detect: use register pair instead of register asmHeiko Carstens1-15/+19
...and slightly cleanup the inline asm. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/mem_detect: fix diag260() program check new psw handlingHeiko Carstens1-8/+11
The __diag260() inline asm temporarily changes the program check new psw to redirect a potential program check on the diag instruction. Restoring of the program check new psw is done in C code behind the inline asm. This can be problematic, especially if the function is inlined, since the compiler can reorder instructions in such a way that a different instruction, which may result in a program check, might be executed before the program check new psw has been restored. To avoid such a scenario move restoring into the inline asm. For consistency reasons move also saving of the original program check new psw into the inline asm. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/facility: get rid of register asmHeiko Carstens1-5/+7
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/uaccess: get rid of register asmHeiko Carstens1-19/+17
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/sysinfo: get rid of register asmHeiko Carstens1-8/+11
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/pgtable: use register pair instead of register asmHeiko Carstens1-17/+13
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/ipl_parm: use register pair instead of register asmHeiko Carstens1-12/+14
...and slightly cleanup the inline asm. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/ipl_parm: fix program check new psw handlingHeiko Carstens1-8/+11
The __diag308() inline asm temporarily changes the program check new psw to redirect a potential program check on the diag instruction. Restoring of the program check new psw is done in C code behind the inline asm. This can be problematic, especially if the function is inlined, since the compiler can reorder instructions in such a way that a different instruction, which may result in a program check, might be executed before the program check new psw has been restored. To avoid such a scenario move restoring into the inline asm. For consistency reasons move also saving of the original program check new psw into the inline asm. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/pci: use register pair instead of register asmNiklas Schnelle2-45/+34
Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/hvc_iucv: Remove power management supportJulian Wiedmann1-51/+0
Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove the hvc_iucv_driver, but keep the device struct around so that it can continue to provide the hvc_iucv_dev_attr_groups attributes. Signed-off-by: Julian Wiedmann <[email protected]> Acked-by: Peter Oberparleiter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/boot: add zstd supportDimitri John Ledkov3-0/+11
Enable ztsd support in s390/boot, to enable booting with zstd compressed kernel when configured with CONFIG_KERNEL_ZSTD=y. BOOT_HEAP_SIZE is defined to 0x30000 in this case. Actual decompressor memory usage with allyesconfig is currently 0x26150. BugLink: https://bugs.launchpad.net/bugs/1931725 Signed-off-by: Dimitri John Ledkov <[email protected]> cc: Heiko Carstens <[email protected]> cc: Vasily Gorbik <[email protected]> cc: Christian Borntraeger <[email protected]> cc: [email protected] Link: https://lore.kernel.org/r/[email protected] [gor: added BOOT_HEAP_SIZE for zstd] Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/decompressor: correct BOOT_HEAP_SIZE conditionVasily Gorbik1-1/+1
Currently BOOT_HEAP_SIZE is always defined as 0x400000 due to bogus condition. Use CONFIG_KERNEL_BZIP2 instead of CONFIG_HAVE_KERNEL_BZIP2 to correct that. BOOT_HEAP_SIZE of 0x10000 is still good enough for every decompressor algorithm but bzip2. Actual decompressor memory usage with allyesconfig is the following: gzip 0xbc28 bzip2 0x379518 xz 0x7410 lzma 0x3e6c lzo 0 lz4 0 Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/sclp: convert list_for_each to entry variantZou Wei1-3/+1
convert list_for_each() to list_for_each_entry() where applicable. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Zou Wei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/cpcmd: use register pair instead of register asmHeiko Carstens1-20/+22
Remove register asm usage from diag8_noresponse() since it wasn't needed at all. There is no requirement for even/odd register pairs for diag 0x8. For diag_response() use register pairs to fulfill the rx+1 and ry+1 requirements as required if a response buffer is specified. Also change the inline asm to return the condition code of the diagnose instruction and do the conditional handling of response length calculation in C. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/sigp: use register pair instead of register asmHeiko Carstens1-6/+8
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/sthyi: use register pair instead of register asmHeiko Carstens1-7/+6
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/maccess: use register pair instead of register asmHeiko Carstens1-10/+9
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/checksum: use register pair instead of register asmHeiko Carstens1-4/+6
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/diag: use register pair instead of register asmHeiko Carstens1-6/+5
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/page: use register pair instead of register asmHeiko Carstens1-6/+9
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/smp: use register pair instead of register asmHeiko Carstens1-11/+11
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/bitops: use register pair instead of register asmHeiko Carstens1-5/+5
Get rid of register asm statement and use a register pair. This allows the compiler to allocate registers on its own. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390: introduce register pair unionHeiko Carstens1-0/+19
Introduce a register pair union, which is supposed to be used for inline assemblies where instructions require parameters in even/odd numbered register pairs. This is more or less the same register pair construct which was available for 31 bit builds which was removed with commit 5a79859ae0f3 ("s390: remove 31 bit support"). Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/vmlogrdr: Remove power management supportPeter Oberparleiter1-24/+0
Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover vmlogrdr-related power management code. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/sclp: Remove sclp base power management supportPeter Oberparleiter3-187/+1
Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover sclp base-related power management code. Note that we keep the registration of the sclp platform driver since it is used to externalize non-PM related attributes in sysfs. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/sclp: Remove quiesce power management supportPeter Oberparleiter1-34/+3
Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover sclp quiesce-related power management code. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/sclp: Remove memory hotplug power management supportPeter Oberparleiter1-34/+0
Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover sclp memory hotplug-related power management code. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/sclp: Remove vt220 power management supportPeter Oberparleiter1-49/+3
Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover sclp vt220-related power management code. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/sclp: Remove console power management supportPeter Oberparleiter3-63/+3
Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover sclp console-related power management code. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/monwriter: Remove power management supportPeter Oberparleiter1-89/+1
Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover monwriter-related power management code. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
2021-06-18s390/monreader: Remove power management supportPeter Oberparleiter1-122/+3
Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover monreader-related power management code. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>