From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752122AbbKQLNJ (ORCPT ); Tue, 17 Nov 2015 06:13:09 -0500 Received: from smtprelay.synopsys.com ([198.182.47.9]:35178 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbbKQLNH (ORCPT ); Tue, 17 Nov 2015 06:13:07 -0500 Subject: Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu barrier To: Noam Camus , References: <1446297327-16298-1-git-send-email-noamc@ezchip.com> <1446893557-29748-19-git-send-email-noamc@ezchip.com> CC: , , , , Peter Zijlstra Newsgroups: gmane.linux.kernel.arc From: Vineet Gupta Message-ID: <564B0BB1.8080709@synopsys.com> Date: Tue, 17 Nov 2015 16:42:49 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1446893557-29748-19-git-send-email-noamc@ezchip.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.12.197.182] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 07 November 2015 04:22 PM, Noam Camus wrote: > From: Tal Zilcer > > In SMT system like we have the generic "sync" is not working with > HW threads. The replacement is "schd.rw" instruction that is served > as cpu barrier for HW threads. As discussed in v2 of this patch, SYNC or some such in __switch_to is completely superfluous. We don't need this patch, you may instead wanna submit a patch which removes the sync. Also please do that in assembler version of this file as well ! > Signed-off-by: Noam Camus > --- > arch/arc/kernel/ctx_sw.c | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/arch/arc/kernel/ctx_sw.c b/arch/arc/kernel/ctx_sw.c > index 92e2e82..2a2f50e 100644 > --- a/arch/arc/kernel/ctx_sw.c > +++ b/arch/arc/kernel/ctx_sw.c > @@ -61,7 +61,11 @@ __switch_to(struct task_struct *prev_task, struct task_struct *next_task) > "st sp, [r24] \n\t" > #endif > > +#ifdef CONFIG_EZNPS_MTM_EXT > + ".word %5 \n\t" > +#else > "sync \n\t" > +#endif > > /* > * setup _current_task with incoming tsk. > @@ -122,6 +126,9 @@ __switch_to(struct task_struct *prev_task, struct task_struct *next_task) > #ifdef CONFIG_ARC_PLAT_EZNPS > , "i"(CTOP_AUX_LOGIC_GLOBAL_ID) > #endif > +#ifdef CONFIG_EZNPS_MTM_EXT > + , "i"(CTOP_INST_SCHD_RW) > +#endif > : "blink" > ); > >