From patchwork Tue Oct 4 06:33:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1685769 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=E+k6oED2; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MhSbt35wVz1ypH for ; Tue, 4 Oct 2022 17:34:34 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MhSbt2KMbz3drV for ; Tue, 4 Oct 2022 17:34:34 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=E+k6oED2; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::52b; helo=mail-pg1-x52b.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=E+k6oED2; dkim-atps=neutral Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4MhSZV466Lz2ysx for ; Tue, 4 Oct 2022 17:33:22 +1100 (AEDT) Received: by mail-pg1-x52b.google.com with SMTP id q9so11895945pgq.8 for ; Mon, 03 Oct 2022 23:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=ZvcMhQpEZO9ee2aRch+2vlMv6P4c3RHu4CJhPHMSUzo=; b=E+k6oED2rM2GQxsyClMWAkVjxdNWQn+fJKYOY2EFEeChfXXJ/T/sBt+kxPa2ctZJz8 NjJ64rQKzS9yhW1M05Q3Pv2n3s3Si/LAGG5tQZ5b8jzA179Ie4raQkLEVIhQqropXYN2 OWWCXLp8Wu0O6vJGeaw89+QwsRc+rd6Iil2pr+/Nl/GNig/G01d+PZ2iSZ92rIuqeVyw uyojTPp5kSbqkoKWBMDrkDMW9jJ/tWZsk3l5gWRSAYlS14JmKHEb4fjb35NSbXhY3n5n GYbSS22fCRzsJn679RnvMNgXdBeThrv3OA5l7WJbFxP7HAjKLBr0bj4IaoAywGkhlh7/ GQWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=ZvcMhQpEZO9ee2aRch+2vlMv6P4c3RHu4CJhPHMSUzo=; b=vEcyGI9l0btGLlvzZzcqeuRqS3jcIovTdhdSGEnbDlc+Uc3w79cN9q5D6KlPreqxlb pNiKthgI4//dOArcAvm8AJ8CaoLiz9moji0XT+bbbX38Ll++eoAYDx7wpeYgqm9W3g/n Z0FTQT6pBDWdlZv2bYvjhFSa+uNRNKeOpvs/oFUcworC0PAyJ5ZbW1naUJiipMfFp4Ap rbj4fOsudCQW53XBGSR3Fv6kinTxwXFvAzyv8vTehPPQB9eV3AC4zmhRkZ98o0B6XCIA U6BCHEi3tDtNwpiZGWtwOXAYlB8y8Zud1Q6ElQnwJr+//h4PJJZVwrESg8WbTmuBRl6d 0Qgw== X-Gm-Message-State: ACrzQf2uz5CAkgfXlrEl4/HXFYMWMawXMZGs5BChWbB0uPJbeozfCguX omNxeTcMtotrJpHkTBNVrvB73/PF2Xc= X-Google-Smtp-Source: AMsMyM53jBr5anE4bYo6urBjBdwABP6uyf+JXgQveX/M9jXznbeKKyd0qpXnIAPMum6b+kvpiLLtgA== X-Received: by 2002:a62:190e:0:b0:561:a818:41bb with SMTP id 14-20020a62190e000000b00561a81841bbmr4945736pfz.50.1664865199882; Mon, 03 Oct 2022 23:33:19 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (123-243-1-173.tpgi.com.au. [123.243.1.173]) by smtp.gmail.com with ESMTPSA id s17-20020aa78bd1000000b0056160437e88sm3701782pfd.20.2022.10.03.23.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 23:33:18 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH 1/3] powerpc/32: Implement HAVE_CONTEXT_TRACKING_USER support Date: Tue, 4 Oct 2022 16:33:04 +1000 Message-Id: <20221004063306.511154-2-npiggin@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221004063306.511154-1-npiggin@gmail.com> References: <20221004063306.511154-1-npiggin@gmail.com> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Context tracking involves tracking user, kernel, guest switches. This enables existing context tracking code for interrupt entry on 32-bit. KVM and interrupt exit already has context tracking calls. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/interrupt.h | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 81c9f895d690..f667279ec74c 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -204,7 +204,7 @@ config PPC select HAVE_ARCH_SECCOMP_FILTER select HAVE_ARCH_TRACEHOOK select HAVE_ASM_MODVERSIONS - select HAVE_CONTEXT_TRACKING_USER if PPC64 + select HAVE_CONTEXT_TRACKING_USER select HAVE_C_RECORDMCOUNT select HAVE_DEBUG_KMEMLEAK select HAVE_DEBUG_STACKOVERFLOW diff --git a/arch/powerpc/include/asm/interrupt.h b/arch/powerpc/include/asm/interrupt.h index 4745bb9998bd..8860a246d51a 100644 --- a/arch/powerpc/include/asm/interrupt.h +++ b/arch/powerpc/include/asm/interrupt.h @@ -85,6 +85,8 @@ do { \ (user_mode(regs) || (TRAP(regs) != INTERRUPT_PROGRAM))) \ BUG_ON(cond); \ } while (0) +#else +#define INT_SOFT_MASK_BUG_ON(regs, cond) #endif #ifdef CONFIG_PPC_BOOK3S_64 @@ -152,19 +154,8 @@ static inline void booke_restore_dbcr0(void) static inline void interrupt_enter_prepare(struct pt_regs *regs) { #ifdef CONFIG_PPC32 - if (!arch_irq_disabled_regs(regs)) - trace_hardirqs_off(); - - if (user_mode(regs)) - kuap_lock(); - else - kuap_save_and_lock(regs); - - if (user_mode(regs)) - account_cpu_user_entry(); -#endif - -#ifdef CONFIG_PPC64 + bool trace_enable = !arch_irq_disabled_regs(regs); +#else bool trace_enable = false; if (IS_ENABLED(CONFIG_TRACE_IRQFLAGS)) { @@ -188,8 +179,9 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs) } else { __hard_RI_enable(); } + /* Only call trace_hardirqs_off when RI=1, it can cause SLB faults */ +#endif - /* Do this when RI=1 because it can cause SLB faults */ if (trace_enable) trace_hardirqs_off(); @@ -215,7 +207,6 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs) } INT_SOFT_MASK_BUG_ON(regs, !arch_irq_disabled_regs(regs) && !(regs->msr & MSR_EE)); -#endif booke_restore_dbcr0(); } From patchwork Tue Oct 4 06:33:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1685770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=lwtBnAl7; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MhScv2vJcz1yqn for ; Tue, 4 Oct 2022 17:35:27 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MhSct5MgCz3dqf for ; Tue, 4 Oct 2022 17:35:26 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=lwtBnAl7; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::52a; helo=mail-pg1-x52a.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=lwtBnAl7; dkim-atps=neutral Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4MhSZY3cjGz2ysx for ; Tue, 4 Oct 2022 17:33:25 +1100 (AEDT) Received: by mail-pg1-x52a.google.com with SMTP id 2so6338465pgl.7 for ; Mon, 03 Oct 2022 23:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=zFKmwZATkvUZrvny3kxh1DBoY3Qz6msxoC1UQ3esBlE=; b=lwtBnAl7OZqMUl7Ijx04t1wowNs0MwcWv807mpIhFjo6PRWLdtqr6yXScdVMsUkpBz Cp5xL6U9iO6bqLMBXuyBz6FgtXVgkiuWTZOtg9Ij4tdxsGuwpN/CrJVCg2L/y11SAAz+ uiGctmACZO4WDdEGNDB2vLV5Kq0/ihqutBwUfbxKxd/ZdiAqcBEVD5H3CKBLcMRn54b2 auYpGCWtIAgV4bWrBgQjBxokQ7rRxpORwCelNQM0AqdFixwkax45KAkjofJ45Ggvg4QT 6wyjCTsXtP18TKd4v1QjZmRGH7dRXAbfSeb843+tbjazRM3GAgVLEOYsBbWVnk7iRz/U V7Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=zFKmwZATkvUZrvny3kxh1DBoY3Qz6msxoC1UQ3esBlE=; b=FHT0PPr5kAyd8VNCvVsPjY/j627DSeAwa4VUulaNxT0yR6TZK/qvy0U1mK7LET0mq9 n5u1BeIGJ2CwbCbyk+sfnRyNrvkA2vEtTY8lmwMY8cZzGVhDC/awvfT82Mf+KMJBKzVn vMPNJzwMaPhBxOSneIw5z27pAVSMW1hHr15aq0nrXrJ9nEDYMTDtMQ7z/4ziYpyWz+4j g6c5Dru4AdsE/Iw29kziSd2ZdU+Rzh8CRwNhNjZSUYkSN1woj3V+dQG8LJ8YM2I+xGUx GjkKRb5JVCBDYlGtCOJ10SccFyZLthkwATMrmew/2Kvl2p6UKpbNlAIknsGquIUS2Ch9 eIfQ== X-Gm-Message-State: ACrzQf3gitcs51v/G50PsdSsnatVdnQm7v7qcdUo2UWPo+R/mIslt8hr nVaZ47wX1b+7TcO7lpijilZyub1S+24= X-Google-Smtp-Source: AMsMyM4oSliLXaGVVCXS54plj8a0Hu5ea4aBIUfT7TufXobjBXGas26+pIReiDXRttwvsZVAm+74NA== X-Received: by 2002:a62:6347:0:b0:531:c5a7:b209 with SMTP id x68-20020a626347000000b00531c5a7b209mr26151068pfb.60.1664865203181; Mon, 03 Oct 2022 23:33:23 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (123-243-1-173.tpgi.com.au. [123.243.1.173]) by smtp.gmail.com with ESMTPSA id s17-20020aa78bd1000000b0056160437e88sm3701782pfd.20.2022.10.03.23.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 23:33:22 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH 2/3] powerpc: remove the last remnants of cputime_t Date: Tue, 4 Oct 2022 16:33:05 +1000 Message-Id: <20221004063306.511154-3-npiggin@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221004063306.511154-1-npiggin@gmail.com> References: <20221004063306.511154-1-npiggin@gmail.com> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" cputime_t is no longer, converted to u64. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/cputime.h | 17 +---------------- arch/powerpc/kernel/time.c | 23 ++--------------------- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h index 431ae2343022..4961fb38e438 100644 --- a/arch/powerpc/include/asm/cputime.h +++ b/arch/powerpc/include/asm/cputime.h @@ -21,23 +21,8 @@ #include #include -typedef u64 __nocast cputime_t; -typedef u64 __nocast cputime64_t; - -#define cmpxchg_cputime(ptr, old, new) cmpxchg(ptr, old, new) - #ifdef __KERNEL__ -/* - * Convert cputime <-> microseconds - */ -extern u64 __cputime_usec_factor; - -static inline unsigned long cputime_to_usecs(const cputime_t ct) -{ - return mulhdu((__force u64) ct, __cputime_usec_factor); -} - -#define cputime_to_nsecs(cputime) tb_to_ns((__force u64)cputime) +#define cputime_to_nsecs(cputime) tb_to_ns(cputime) /* * PPC64 uses PACA which is task independent for storing accounting data while diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index a2ab397065c6..d68de3618741 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -130,7 +130,7 @@ unsigned long tb_ticks_per_jiffy; unsigned long tb_ticks_per_usec = 100; /* sane default */ EXPORT_SYMBOL(tb_ticks_per_usec); unsigned long tb_ticks_per_sec; -EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime_t conversions */ +EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime conversions */ DEFINE_SPINLOCK(rtc_lock); EXPORT_SYMBOL_GPL(rtc_lock); @@ -150,21 +150,6 @@ EXPORT_SYMBOL_GPL(ppc_tb_freq); bool tb_invalid; #ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE -/* - * Factor for converting from cputime_t (timebase ticks) to - * microseconds. This is stored as 0.64 fixed-point binary fraction. - */ -u64 __cputime_usec_factor; -EXPORT_SYMBOL(__cputime_usec_factor); - -static void calc_cputime_factors(void) -{ - struct div_result res; - - div128_by_32(1000000, 0, tb_ticks_per_sec, &res); - __cputime_usec_factor = res.result_low; -} - /* * Read the SPURR on systems that have it, otherwise the PURR, * or if that doesn't exist return the timebase value passed in. @@ -369,10 +354,7 @@ void vtime_flush(struct task_struct *tsk) acct->hardirq_time = 0; acct->softirq_time = 0; } - -#else /* ! CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */ -#define calc_cputime_factors() -#endif +#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */ void __delay(unsigned long loops) { @@ -914,7 +896,6 @@ void __init time_init(void) tb_ticks_per_jiffy = ppc_tb_freq / HZ; tb_ticks_per_sec = ppc_tb_freq; tb_ticks_per_usec = ppc_tb_freq / 1000000; - calc_cputime_factors(); /* * Compute scale factor for sched_clock. From patchwork Tue Oct 4 06:33:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1685771 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=apjnRLGM; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MhSdv3Z89z1yqn for ; Tue, 4 Oct 2022 17:36:19 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MhSdv32ktz3cfX for ; Tue, 4 Oct 2022 17:36:19 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=apjnRLGM; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::42a; helo=mail-pf1-x42a.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=apjnRLGM; dkim-atps=neutral Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4MhSZd5yqbz3bjd for ; Tue, 4 Oct 2022 17:33:29 +1100 (AEDT) Received: by mail-pf1-x42a.google.com with SMTP id d10so12335770pfh.6 for ; Mon, 03 Oct 2022 23:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=Z2WK+wlDbtY/C0uGfFoDk9EIHilR5NLBt+oI60VmnUQ=; b=apjnRLGMPZL8pBtCKL095i7yoKKQVhaqXtX6qC/Xd2jKkrBDxM3H84Gkxb0WKHBZVV MDSIC2epEkJ6WJLkhtRIdzB56iLpn4+2ILZPXKHNsJ5n18KZJ1bodjKc6aNgcTK8K9hY G650urgoW056ehs6I25AIbfvKGPguCINYEHGRD4zYG3oC4CFmKC+VDU+nBpxfW7JutVD z9wP3qcNPB4JDk0gPsLfSLSNi6N7a5tDR30SsNiIU/0p2Rn06Rl3/p+SnPjphg+mvehV ro+HnKuvsYUZLm3GHU9jt2RKj2PIHnIs/mF9L2c0p1kH9Hri1Kcf8z9xTBb4g5KGzHjU 0qWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=Z2WK+wlDbtY/C0uGfFoDk9EIHilR5NLBt+oI60VmnUQ=; b=kRLkbPz/I1fOKOSBRyggtFb6lu4fi1KFUnmSvDXwTlQiZnQRFtO6KRExNDsxEAezXn vRJnp5nHOqmV3gNg4Em/D1Ke1PMMeowZfd7YHeBM0hZ64nlgsKWNyyWiYYPe8pvIp8Cq CioymsQkg8SqJoIwCmA9Inh/AgKJ+HVQDYDWfFOLuuXCFsX9no5YkWr+r/4AGxWSphTO AK3i4CDoKGVtCn/xWqlZCtJ6sj8K8XGuhNLUzlLeQxpiyK5SElQHgKkZC8yWZSyGF582 kzD4bAhH+S+E+HHeE0F1aNcln1GBGPqopKT95mdGPDhjo8ozT/WQZZICS8k/cJBXGJwQ Is3Q== X-Gm-Message-State: ACrzQf2L7fUg6QlB+DhilLPp3PxPaKqLvLx7WSfehOhP+zN5I9IEyHjn M8oxxMLGmc9/HwFF664YTxJbJQJZzu4= X-Google-Smtp-Source: AMsMyM7CJBZHT64mLwlP3q7AMio8FRpN4kA/992lfSLMx6EXkWvS7pHXOHP9EIM/3a+qdcFMCVE04w== X-Received: by 2002:a63:b545:0:b0:43c:2ad9:b00 with SMTP id u5-20020a63b545000000b0043c2ad90b00mr21923516pgo.535.1664865207032; Mon, 03 Oct 2022 23:33:27 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (123-243-1-173.tpgi.com.au. [123.243.1.173]) by smtp.gmail.com with ESMTPSA id s17-20020aa78bd1000000b0056160437e88sm3701782pfd.20.2022.10.03.23.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 23:33:26 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH 3/3] Remove HAVE_VIRT_CPU_ACCOUNTING_GEN option Date: Tue, 4 Oct 2022 16:33:06 +1000 Message-Id: <20221004063306.511154-4-npiggin@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221004063306.511154-1-npiggin@gmail.com> References: <20221004063306.511154-1-npiggin@gmail.com> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Kevin Hilman , Frederic Weisbecker , Nicholas Piggin Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This option was created in commit 554b0004d0ec4 ("vtime: Add HAVE_VIRT_CPU_ACCOUNTING_GEN Kconfig") for architectures to indicate they support the 64-bit cputime_t required for VIRT_CPU_ACCOUNTING_GEN. The cputime_t type has since been removed, so this doesn't have any meaning. Remove it. Cc: linux-arch@vger.kernel.org Cc: Kevin Hilman Cc: Frederic Weisbecker Signed-off-by: Nicholas Piggin --- arch/Kconfig | 11 ----------- arch/arm/Kconfig | 1 - arch/csky/Kconfig | 1 - arch/loongarch/Kconfig | 1 - arch/mips/Kconfig | 1 - arch/xtensa/Kconfig | 1 - init/Kconfig | 1 - kernel/time/Kconfig | 2 -- 8 files changed, 19 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 5dbf11a5ba4e..54c73e22c526 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -829,17 +829,6 @@ config HAVE_VIRT_CPU_ACCOUNTING_IDLE config ARCH_HAS_SCALED_CPUTIME bool -config HAVE_VIRT_CPU_ACCOUNTING_GEN - bool - default y if 64BIT - help - With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. - Before enabling this option, arch code must be audited - to ensure there are no races in concurrent read/write of - cputime_t. For example, reading/writing 64-bit cputime_t on - some 32-bit arches may require multiple accesses, so proper - locking is needed to protect against concurrent accesses. - config HAVE_IRQ_TIME_ACCOUNTING bool help diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 87badeae3181..47f3a23564e8 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -119,7 +119,6 @@ config ARM select HAVE_STACKPROTECTOR select HAVE_SYSCALL_TRACEPOINTS select HAVE_UID16 - select HAVE_VIRT_CPU_ACCOUNTING_GEN select IRQ_FORCED_THREADING select MODULES_USE_ELF_REL select NEED_DMA_MAP_STATE diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig index 3cbc2dc62baf..8102d0d3f3b3 100644 --- a/arch/csky/Kconfig +++ b/arch/csky/Kconfig @@ -72,7 +72,6 @@ config CSKY select HAVE_ARCH_MMAP_RND_BITS select HAVE_ARCH_SECCOMP_FILTER select HAVE_CONTEXT_TRACKING_USER - select HAVE_VIRT_CPU_ACCOUNTING_GEN select HAVE_DEBUG_BUGVERBOSE select HAVE_DEBUG_KMEMLEAK select HAVE_DYNAMIC_FTRACE diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index 26aeb1408e56..201b5d4e5c25 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -97,7 +97,6 @@ config LOONGARCH select HAVE_SETUP_PER_CPU_AREA if NUMA select HAVE_SYSCALL_TRACEPOINTS select HAVE_TIF_NOHZ - select HAVE_VIRT_CPU_ACCOUNTING_GEN if !SMP select IRQ_FORCED_THREADING select IRQ_LOONGARCH_CPU select MMU_GATHER_MERGE_VMAS if MMU diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index ec21f8999249..f67291d8e09c 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -90,7 +90,6 @@ config MIPS select HAVE_SPARSE_SYSCALL_NR select HAVE_STACKPROTECTOR select HAVE_SYSCALL_TRACEPOINTS - select HAVE_VIRT_CPU_ACCOUNTING_GEN if 64BIT || !SMP select IRQ_FORCED_THREADING select ISA if EISA select MODULES_USE_ELF_REL if MODULES diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 12ac277282ba..18053fe9ec38 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -47,7 +47,6 @@ config XTENSA select HAVE_PERF_EVENTS select HAVE_STACKPROTECTOR select HAVE_SYSCALL_TRACEPOINTS - select HAVE_VIRT_CPU_ACCOUNTING_GEN select IRQ_DOMAIN select MODULES_USE_ELF_RELA select PERF_USE_VMALLOC diff --git a/init/Kconfig b/init/Kconfig index 94ce5a46a802..bb6d7f0d80fe 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -490,7 +490,6 @@ config VIRT_CPU_ACCOUNTING_NATIVE config VIRT_CPU_ACCOUNTING_GEN bool "Full dynticks CPU time accounting" depends on HAVE_CONTEXT_TRACKING_USER - depends on HAVE_VIRT_CPU_ACCOUNTING_GEN depends on GENERIC_CLOCKEVENTS select VIRT_CPU_ACCOUNTING select CONTEXT_TRACKING_USER diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index a41753be1a2b..ed480ba6cf35 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig @@ -121,8 +121,6 @@ config NO_HZ_FULL # We need at least one periodic CPU for timekeeping depends on SMP depends on HAVE_CONTEXT_TRACKING_USER - # VIRT_CPU_ACCOUNTING_GEN dependency - depends on HAVE_VIRT_CPU_ACCOUNTING_GEN select NO_HZ_COMMON select RCU_NOCB_CPU select VIRT_CPU_ACCOUNTING_GEN