Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1271085

Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu barrier

From Vineet Gupta <Vineet.Gupta1@synopsys.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu barrier
Date 2015-11-17 12:20 +0100
Message-ID <qvMsO-4ho-3@gated-at.bofh.it> (permalink)
References <qpEeC-3hu-3@gated-at.bofh.it> <qvMsO-4ho-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Saturday 07 November 2015 04:22 PM, Noam Camus wrote:
> From: Tal Zilcer <talz@ezchip.com>
> 
> 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 <noamc@ezchip.com>
> ---
>  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"
>  	);
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu  barrier Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 12:20 +0100
  Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu  barrier Peter Zijlstra <peterz@infradead.org> - 2015-11-17 12:30 +0100
    Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu  barrier Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 12:40 +0100
      Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu  barrier Peter Zijlstra <peterz@infradead.org> - 2015-11-17 13:30 +0100
        Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu  barrier Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 13:40 +0100
          Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu  barrier Peter Zijlstra <peterz@infradead.org> - 2015-11-17 13:50 +0100
            Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu  barrier Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-17 14:40 +0100
              Re: [PATCH v2 18/19] ARC: [plat-eznps] replace sync with proper cpu  barrier Peter Zijlstra <peterz@infradead.org> - 2015-11-17 15:00 +0100

csiph-web