From patchwork Tue May 28 10:48:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 10964719 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5223076 for ; Tue, 28 May 2019 10:49:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 435091FE82 for ; Tue, 28 May 2019 10:49:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37E452844E; Tue, 28 May 2019 10:49:43 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9480282EC for ; Tue, 28 May 2019 10:49:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbfE1Ktd (ORCPT ); Tue, 28 May 2019 06:49:33 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54958 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726638AbfE1Ktc (ORCPT ); Tue, 28 May 2019 06:49:32 -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 94B0B341; Tue, 28 May 2019 03:49:32 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7C3DF3F59C; Tue, 28 May 2019 03:49:31 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Cc: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Subject: [PATCH RESEND 6/7] sh: entry: Remove unneeded need_resched() loop Date: Tue, 28 May 2019 11:48:47 +0100 Message-Id: <20190528104848.13160-7-valentin.schneider@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190528104848.13160-1-valentin.schneider@arm.com> References: <20190528104848.13160-1-valentin.schneider@arm.com> MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the enabling and disabling of IRQs within preempt_schedule_irq() is contained in a need_resched() loop, we don't need the outer arch code loop. Signed-off-by: Valentin Schneider Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org --- arch/sh/kernel/entry-common.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S index d31f66e82ce5..65a105de52a0 100644 --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S @@ -93,7 +93,7 @@ ENTRY(resume_kernel) mov.l @(TI_PRE_COUNT,r8), r0 ! current_thread_info->preempt_count tst r0, r0 bf noresched -need_resched: + mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags tst #_TIF_NEED_RESCHED, r0 ! need_resched set? bt noresched @@ -107,8 +107,6 @@ need_resched: mov.l 1f, r0 jsr @r0 ! call preempt_schedule_irq nop - bra need_resched - nop noresched: bra __restore_all From patchwork Tue May 28 10:48:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 10964717 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 447D776 for ; Tue, 28 May 2019 10:49:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3606827C2D for ; Tue, 28 May 2019 10:49:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A138282E8; Tue, 28 May 2019 10:49:38 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA8C02838B for ; Tue, 28 May 2019 10:49:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726903AbfE1Ktf (ORCPT ); Tue, 28 May 2019 06:49:35 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54966 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726896AbfE1Ktf (ORCPT ); Tue, 28 May 2019 06:49:35 -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 BBBA415AD; Tue, 28 May 2019 03:49:34 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9F5CA3F59C; Tue, 28 May 2019 03:49:33 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Cc: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Subject: [PATCH RESEND 7/7] sh64: entry: Remove unneeded need_resched() loop Date: Tue, 28 May 2019 11:48:48 +0100 Message-Id: <20190528104848.13160-8-valentin.schneider@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190528104848.13160-1-valentin.schneider@arm.com> References: <20190528104848.13160-1-valentin.schneider@arm.com> MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the enabling and disabling of IRQs within preempt_schedule_irq() is contained in a need_resched() loop, we don't need the outer arch code loop. Signed-off-by: Valentin Schneider Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org --- arch/sh/kernel/cpu/sh5/entry.S | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/sh/kernel/cpu/sh5/entry.S b/arch/sh/kernel/cpu/sh5/entry.S index de68ffdfffbf..40e6d9a7a6a2 100644 --- a/arch/sh/kernel/cpu/sh5/entry.S +++ b/arch/sh/kernel/cpu/sh5/entry.S @@ -897,7 +897,6 @@ resume_kernel: ld.l r6, TI_PRE_COUNT, r7 beq/u r7, ZERO, tr0 -need_resched: ld.l r6, TI_FLAGS, r7 movi (1 << TIF_NEED_RESCHED), r8 and r8, r7, r8 @@ -911,9 +910,7 @@ need_resched: ori r7, 1, r7 ptabs r7, tr1 blink tr1, LINK - - pta need_resched, tr1 - blink tr1, ZERO + blink tr0, ZERO #endif .global ret_from_syscall