From patchwork Wed Aug 9 12:05:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 9890467 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0C06660363 for ; Wed, 9 Aug 2017 12:07:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB29928A5A for ; Wed, 9 Aug 2017 12:07:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFD8428A71; Wed, 9 Aug 2017 12:07:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70A4128A5A for ; Wed, 9 Aug 2017 12:07:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=i7Yd8N/QMIzJljVdErWdJl8GYcN0O/CycGrzGS33D6g=; b=QHVAkML+ncuLgCcNRcp9V8XHrv 0HZZTc7H2HJ1Hmyx3T5Q1Uyaj9YUyaHLhJxcP1I9mqI9NjgMmlaYRUGlvWvFYEtC0tDC7/o7A1fJL afbES43vhm2S6LSi/Xc31L0xnGkdD4gDZZ9TleL1an6nO4D4kG/MxCztzdFqzA0Tj4alDd+FFqCvB emYF1Y5EotEtT+WhJev28/MCVF8ToSasjUdTTTDEFIiLG1ubSR72xNK30+Rf/YJuZNWxveLQCpOHk yo31SbwZngcYperdgFnIUsxGEsY9qK+cDVlkpJ8VCkz70JcMykSEpv1XwiJwAgZGiaEQxd8ZofkqZ xXJyZOjA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dfPlq-0005uC-SF; Wed, 09 Aug 2017 12:07:30 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dfPl3-0005Gc-B7 for linux-arm-kernel@bombadil.infradead.org; Wed, 09 Aug 2017 12:06:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3Gx19Yfy24jl5l7hSpz44gojBqaJvlhj0D2vx9lXhlk=; b=NtvyDD8kKkG9UbIV3E2bim1Zm Qm02hm/QhOh6WmsYty7aAMs5LQMhbBgob9Orv7THst5W9Fdo3VlSc+zEiD3zf6byL9p5bhrGAo6Iw xOdDvgC6B4SyElxs/nw/pMygZ5KsgCykcltHkR1Cz4NzBhcb38KWGFy3og1RxUTdD680SYS8eyANI DnCVv2P2JaAyGFIE7DFTRbleZrRLwWfOXn/eoLVsGimiUwuJctv9gQcia+6jArfvTjppyitOvzyBV WfvN9uilxWhwXY+rGDDWUdViYSprQEFn1XQOaPjL8ZapNIlRhnSJ+H/ohEg263XAywDiyDIu+uXNJ Jt2GrIJUw==; Received: from foss.arm.com ([217.140.101.70]) by merlin.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dfPl1-0004PI-HX for linux-arm-kernel@lists.infradead.org; Wed, 09 Aug 2017 12:06:40 +0000 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 9E66A164F; Wed, 9 Aug 2017 05:06:22 -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 EC7553F540; Wed, 9 Aug 2017 05:06:20 -0700 (PDT) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 05/27] arm64: fpsimd: Simplify uses of {set, clear}_ti_thread_flag() Date: Wed, 9 Aug 2017 13:05:11 +0100 Message-Id: <1502280338-23002-6-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1502280338-23002-1-git-send-email-Dave.Martin@arm.com> References: <1502280338-23002-1-git-send-email-Dave.Martin@arm.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, libc-alpha@sourceware.org, Ard Biesheuvel , Szabolcs Nagy , Catalin Marinas , Will Deacon , Richard Sandiford , kvmarm@lists.cs.columbia.edu MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The existing FPSIMD context switch code contains a couple of instances of {set,clear}_ti_thread(task_thread_info(task)). Since there are thread flag manipulators that operate directly on task_struct, this verbosity isn't strictly needed. For consistency, this patch simplifies the affected calls. This should have no impact on behaviour. Signed-off-by: Dave Martin Acked-by: Ard Biesheuvel Reviewed-by: Alex Bennée --- arch/arm64/kernel/fpsimd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 138fcfa..9c1f268e 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -159,11 +159,9 @@ void fpsimd_thread_switch(struct task_struct *next) if (__this_cpu_read(fpsimd_last_state) == st && st->cpu == smp_processor_id()) - clear_ti_thread_flag(task_thread_info(next), - TIF_FOREIGN_FPSTATE); + clear_tsk_thread_flag(next, TIF_FOREIGN_FPSTATE); else - set_ti_thread_flag(task_thread_info(next), - TIF_FOREIGN_FPSTATE); + set_tsk_thread_flag(next, TIF_FOREIGN_FPSTATE); } }