Re: [PATCHv2] coresight: etm4x: Fix etm4_count race by moving cpuhp callbacks to init

2020-07-28 Thread Sai Prakash Ranjan
Hi Mike, On 2020-07-29 01:46, Mike Leach wrote: Hi Sai, On Tue, 28 Jul 2020 at 08:51, Sai Prakash Ranjan wrote: etm4_count keeps track of number of ETMv4 registered and on some systems, a race is observed on etm4_count variable which can lead to multiple calls to cpuhp_setup_state_nocalls_

Re: [PATCHv2] coresight: etm4x: Fix etm4_count race by moving cpuhp callbacks to init

2020-07-28 Thread Mike Leach
Hi Sai, On Tue, 28 Jul 2020 at 08:51, Sai Prakash Ranjan wrote: > > etm4_count keeps track of number of ETMv4 registered and on some systems, > a race is observed on etm4_count variable which can lead to multiple calls > to cpuhp_setup_state_nocalls_cpuslocked(). This function internally calls >

Re: [PATCHv2] coresight: etm4x: Fix etm4_count race by moving cpuhp callbacks to init

2020-07-28 Thread Sai Prakash Ranjan
On 2020-07-28 13:59, Stephen Boyd wrote: Quoting Sai Prakash Ranjan (2020-07-28 00:51:02) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 6d7d2169bfb2..adb71987a1e3 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/

Re: [PATCHv2] coresight: etm4x: Fix etm4_count race by moving cpuhp callbacks to init

2020-07-28 Thread Stephen Boyd
Quoting Sai Prakash Ranjan (2020-07-28 00:51:02) > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c > b/drivers/hwtracing/coresight/coresight-etm4x.c > index 6d7d2169bfb2..adb71987a1e3 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x.c > +++ b/drivers/hwtracing/coresight/coresi

[PATCHv2] coresight: etm4x: Fix etm4_count race by moving cpuhp callbacks to init

2020-07-28 Thread Sai Prakash Ranjan
etm4_count keeps track of number of ETMv4 registered and on some systems, a race is observed on etm4_count variable which can lead to multiple calls to cpuhp_setup_state_nocalls_cpuslocked(). This function internally calls cpuhp_store_callbacks() which prevents multiple registrations of callbacks f