From nobody Sat Oct 4 22:35:27 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C281522A4EE for ; Tue, 12 Aug 2025 13:10:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755004217; cv=none; b=Ew9sF5NwF0bpUG+UJdBEWgQzm96l9wNSd2rCjAj0PJPEwlxPGakKcDEzw4llSYsoSxxBOiKpYWBHEnQz1yHZd4qjMhngPj2hFKxLz7FlK2gincCQhoRPDerBh83tzUfzjpRZE4HwHi7LlxaNXj8cNhBpzSeJLiwJi+GSek/FBAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755004217; c=relaxed/simple; bh=HulXGtK9t1UOBMxWRSXUEDrM4rB5fu+55UMFmTdtKxs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=P9Mil0zXjNyqwdd+Ds7I+pVIvKCuzfbZcYZmTIm3I3dC+IcjYD//oLG58C2wJkufEHBoq/SwSLqQCtUjFSVQtr3kEEE+yqigRfIMiriTqMz7KPSlGxBPMVHW31HlpGrKdSDLUwSjUDyhKQbT8Wvze7wka8pMFQ9HrxMHAGOzZw4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=HsmruELT; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HsmruELT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1755004214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SMz5O7u0akvXjVncCick/hCZpGXIHb0iYHhbJTqmUJE=; b=HsmruELTgCJxaejzf+aaj4tJljQIoP9IhPmKv9S1V5x8pdwN+O8Y2BfriFoqdU26EKD10x jTI9ENZFvCWlvJEdG00j+kpt3GJGmxu1426FujSzX4hApvTfMEQDSsrmAL7g8jXJomX047 OAZ/jWjhONR6KdyPH+30bfcN96LxOls= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-365-087PP938PFqZR3S46zQ-3g-1; Tue, 12 Aug 2025 09:10:10 -0400 X-MC-Unique: 087PP938PFqZR3S46zQ-3g-1 X-Mimecast-MFC-AGG-ID: 087PP938PFqZR3S46zQ-3g_1755004207 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1F303180034D; Tue, 12 Aug 2025 13:10:07 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.112.156]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 499F41955F16; Tue, 12 Aug 2025 13:09:56 +0000 (UTC) From: Baoquan He To: linux-mm@kvack.org Cc: snovitoll@gmail.com, ryabinin.a.a@gmail.com, christophe.leroy@csgroup.eu, hca@linux.ibm.com, andreyknvl@gmail.com, akpm@linux-foundation.org, chenhuacai@loongson.cn, davidgow@google.com, glider@google.com, dvyukov@google.com, alexghiti@rivosinc.com, kasan-dev@googlegroups.com, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, agordeev@linux.ibm.com, Baoquan He Subject: [PATCH 2/4] arch/powerpc: remove kasan_arch_is_ready() Date: Tue, 12 Aug 2025 21:09:31 +0800 Message-ID: <20250812130933.71593-3-bhe@redhat.com> In-Reply-To: <20250812130933.71593-1-bhe@redhat.com> References: <20250812130933.71593-1-bhe@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Content-Type: text/plain; charset="utf-8" From: Sabyrzhan Tasbolatov With the help of static key kasan_flag_enabled, kasan_arch_is_ready() is not needed any more. So reomve the unneeded kasan_arch_is_ready() and the relevant codes. Signed-off-by: Sabyrzhan Tasbolatov Signed-off-by: Baoquan He --- arch/powerpc/include/asm/kasan.h | 13 ------------- arch/powerpc/mm/kasan/init_book3s_64.c | 4 ---- 2 files changed, 17 deletions(-) diff --git a/arch/powerpc/include/asm/kasan.h b/arch/powerpc/include/asm/ka= san.h index b5bbb94c51f6..73466d3ff302 100644 --- a/arch/powerpc/include/asm/kasan.h +++ b/arch/powerpc/include/asm/kasan.h @@ -53,19 +53,6 @@ #endif =20 #ifdef CONFIG_KASAN -#ifdef CONFIG_PPC_BOOK3S_64 -DECLARE_STATIC_KEY_FALSE(powerpc_kasan_enabled_key); - -static __always_inline bool kasan_arch_is_ready(void) -{ - if (static_branch_likely(&powerpc_kasan_enabled_key)) - return true; - return false; -} - -#define kasan_arch_is_ready kasan_arch_is_ready -#endif - void kasan_early_init(void); void kasan_mmu_init(void); void kasan_init(void); diff --git a/arch/powerpc/mm/kasan/init_book3s_64.c b/arch/powerpc/mm/kasan= /init_book3s_64.c index 9c5cf2354c8b..c1b78a9cd0a9 100644 --- a/arch/powerpc/mm/kasan/init_book3s_64.c +++ b/arch/powerpc/mm/kasan/init_book3s_64.c @@ -19,8 +19,6 @@ #include #include =20 -DEFINE_STATIC_KEY_FALSE(powerpc_kasan_enabled_key); - static void __init kasan_init_phys_region(void *start, void *end) { unsigned long k_start, k_end, k_cur; @@ -95,8 +93,6 @@ void __init kasan_init(void) */ memset(kasan_early_shadow_page, 0, PAGE_SIZE); =20 - static_branch_inc(&powerpc_kasan_enabled_key); - /* KASAN is now initialized, enable it. */ static_branch_enable(&kasan_flag_enabled); =20 --=20 2.41.0