From: Heiko Carstens Date: Fri, 31 Jan 2025 15:11:38 +0000 (+0100) Subject: s390/mm: Remove have_store_indication static key X-Git-Tag: v6.15-rc1~113^2~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb5bbcdcc3eabd8e9061eac7c3223e3de640adfa;p=thirdparty%2Fkernel%2Flinux.git s390/mm: Remove have_store_indication static key Whenever test_facility() is used with a constant facility number the generated code is identical to a static branch. Remove the extra initcall and static_branch_enable() handling for have_store_indication, and use test_facility() directly. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 9b681f74dccc1..9c9d7840cb578 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -46,16 +45,6 @@ #include #include "../kernel/entry.h" -static DEFINE_STATIC_KEY_FALSE(have_store_indication); - -static int __init fault_init(void) -{ - if (test_facility(75)) - static_branch_enable(&have_store_indication); - return 0; -} -early_initcall(fault_init); - /* * Find out which address space caused the exception. */ @@ -81,7 +70,7 @@ static __always_inline bool fault_is_write(struct pt_regs *regs) { union teid teid = { .val = regs->int_parm_long }; - if (static_branch_likely(&have_store_indication)) + if (test_facility(75)) return teid.fsi == TEID_FSI_STORE; return false; }