From patchwork Fri May 11 15:04:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 135541 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp986622lji; Fri, 11 May 2018 08:05:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpO2SXp9XLx9DZX90ZIKZ8h7qwEFbnr83bLk0UMCuiyXbftyQsfDCoUlwnUHAcTOpzq3TIv X-Received: by 2002:a17:902:9304:: with SMTP id bc4-v6mr5855233plb.189.1526051120063; Fri, 11 May 2018 08:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526051120; cv=none; d=google.com; s=arc-20160816; b=uXtlBKY4mjVLZH/wAV1mI8DMwJ07F2Il7f/kZ5Q4wGQBSYIQMydfOzVUId3jrkeIEN zzZNdmrlPpUuyo176WN9TJcFUY5weCQZZRQ8DTVkDoV76HYYUa+uO7pt6RQuYmmd1vii WVzeuBaOwPhCoHP7YG7Axo/uS1FohtVQyFUKoGJprYmKk8Jy3PpkgMvQocUaLig+wTKx 1AiCckQ4C6LnRBoyOiU/DaSFXXzPuyNaL0WkB4Byrb5dSomobVKthR2EmPoY62NpG8Xd S0KjUD3yWaZYDNl7t+84J8U6Cc9X4UvA4NFn7mKCyq5/HazAF0LLcn5aLqN9bLPtuywZ Pg4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6rxR0qBdGZDekMWaBhm6EwAVdW503mIhO75YEdKPdng=; b=0ax8vXmNp6URH576gNjZhZtQ3t8mB2Q8KNnqqp3KixgNIBmpyz4ZSkY0q9y+jBVwuk NoR4r3BEAUgwCfYJhO/YDMw7ZORKrCCtbnmLm2OMnSNoLNHuaxqOEJVC9LH95D/jP+pW MzvxNR73JGs9XgFLNIY4EZs6lxZJkrv48nOUbEWokdsPADVRb1N5Bo+RKdKA/ZOZs51X 3fignZ1n3lbueDbLTYrFbYFgge7sKsTV9l5AcunqcXbAjPN8mP1Y90pnUDJCJSxHXmDc qGkG4wGRX10iU6Y9xtaflA6XwkXhxChpwQRnJzDNyFmfxtDknBG1kCXOBpbDv/BdYrsI MQ8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1-v6si2688526pgv.161.2018.05.11.08.05.19; Fri, 11 May 2018 08:05:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753387AbeEKPFP (ORCPT + 29 others); Fri, 11 May 2018 11:05:15 -0400 Received: from foss.arm.com ([217.140.101.70]:43110 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753145AbeEKPFN (ORCPT ); Fri, 11 May 2018 11:05:13 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 809BF1596; Fri, 11 May 2018 08:05:12 -0700 (PDT) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 916143F23C; Fri, 11 May 2018 08:05:10 -0700 (PDT) From: Dave Martin To: linux-kernel@vger.kernel.org Cc: Ralf Baechle , James Hogan , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , "David S. Miller" , Ingo Molnar , Peter Zijlstra , Steven Rostedt , Oleg Nesterov , linux-arch@vger.kernel.org Subject: [PATCH REPOST 0/5] Simplify setting thread flags to a particular value Date: Fri, 11 May 2018 16:04:59 +0100 Message-Id: <1526051104-15995-1-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are a number of bits of code sprinkled around the kernel to set a thread flag if a certain condition is true, and clear it otherwise. This series ports relevant bits of code to use the new update_thread_flag() helpers implemented in [2]. Note: This is a repost of a previous RFC [1]. Part of patch 1, and all of patch 4 of that series have been split out and reviewed separately ([2], [3] respectively). I currently expect them to merge via Marc's KVM tree. The remainder of the patches from [1] are reposted here. Patch 1 ports some core code that to use the update_thread_flag() helpers. The remaining patches port relevant bits of arch code. Build-tested on the affected architectures; some context switch stress testing done on arm64, which exercises a few call sites for the new helpers. Comments welcome. Cheers ---Dave [1] [RFC PATCH 0/6] Simplify setting thread flags to a particular value https://lkml.org/lkml/2018/4/19/225 [2] [PATCH v7 01/16] thread_info: Add update_thread_flag() helpers http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/576596.html [3] [PATCH v7 02/16] arm64: Use update{,_tsk}_thread_flag() http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/576597.html Dave Martin (5): thread_info: Port core code to use update_thread_flag() helpers ARM: Use update_thread_flag() MIPS: Use update{,_tsk}_thread_flag() powerpc: Use update_thread_flag() sparc: Use update_thread_flag() arch/arm/kernel/elf.c | 9 +++------ arch/mips/kernel/elf.c | 10 ++-------- arch/mips/kernel/process.c | 15 ++++++--------- arch/mips/kernel/ptrace.c | 5 +---- arch/mips/kernel/syscall.c | 10 ++-------- arch/powerpc/include/asm/elf.h | 10 ++-------- arch/sparc/include/asm/elf_64.h | 5 +---- include/trace/syscall.h | 6 ++---- kernel/ptrace.c | 13 +++++-------- 9 files changed, 24 insertions(+), 59 deletions(-) -- 2.1.4