Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-09 Thread Suzuki K Poulose

On 07/02/18 21:03, Kim Phillips wrote:

Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
replicator naming") changed the Kconfig symbol name from
QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
was being set in my juno build script, which left the new symbol unset,
causing the following unexpected grief:

  # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
  
  sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
  mmap size 528384B
  AUX area mmap length 4194304
  perf event ring buffer mmapped per cpu
  failed to mmap AUX area
  failed to mmap with 12 (Cannot allocate memory)

Make it default y to help not surprise unsuspecting users.


I think the best way to address this issue is to set the proper errno when
we fail to build a path, say -ENODEV, that could give us a better clue
on what is going wrong. Have you checked the dmesg to see if it complains
about "build path" failure ?

Cheers
Suzuki


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-09 Thread Suzuki K Poulose

On 07/02/18 21:03, Kim Phillips wrote:

Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
replicator naming") changed the Kconfig symbol name from
QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
was being set in my juno build script, which left the new symbol unset,
causing the following unexpected grief:

  # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
  
  sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
  mmap size 528384B
  AUX area mmap length 4194304
  perf event ring buffer mmapped per cpu
  failed to mmap AUX area
  failed to mmap with 12 (Cannot allocate memory)

Make it default y to help not surprise unsuspecting users.


I think the best way to address this issue is to set the proper errno when
we fail to build a path, say -ENODEV, that could give us a better clue
on what is going wrong. Have you checked the dmesg to see if it complains
about "build path" failure ?

Cheers
Suzuki


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Kim Phillips
On Thu, 8 Feb 2018 11:53:44 -0800
Randy Dunlap  wrote:

> On 02/08/2018 11:23 AM, Kim Phillips wrote:
> > On Thu, 8 Feb 2018 16:13:16 +
> > Robin Murphy  wrote:
> > 
> >> On 07/02/18 21:03, Kim Phillips wrote:
> >>> Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
> >>> replicator naming") changed the Kconfig symbol name from
> >>> QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
> >>> was being set in my juno build script, which left the new symbol unset,
> >>> causing the following unexpected grief:
> >>>
> >>>   # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
> >>>   
> >>>   sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
> >>>   mmap size 528384B
> >>>   AUX area mmap length 4194304
> >>>   perf event ring buffer mmapped per cpu
> >>>   failed to mmap AUX area
> >>>   failed to mmap with 12 (Cannot allocate memory)
> >>>
> >>> Make it default y to help not surprise unsuspecting users.
> >>
> >> How many users are there relying on your Juno build script? :P
> > 
> > This shouldn't be that uncommon for coresight users:
> > 
> > make defconfig
> > scripts/config -e CONFIG_CORESIGHT
> > scripts/config -e CONFIG_CORESIGHT_LINK_AND_SINK_TMC
> > scripts/config -e CONFIG_CORESIGHT_SINK_TPIU
> > scripts/config -e CONFIG_CORESIGHT_SINK_ETBV10
> > scripts/config -e CONFIG_CORESIGHT_LINKS_AND_SINKS
> > scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM3X
> > scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM4X
> > #scripts/config -e CONFIG_CORESIGHT_QCOM_REPLICATOR
> > scripts/config -e CONFIG_CORESIGHT_DYNAMIC_REPLICATOR
> > scripts/config -e CONFIG_CORESIGHT_STM
> > scripts/config -e CONFIG_CORESIGHT_CPU_DEBUG
> > 
> > FWIW, Mathieu - who helped me track the cannot allocate memory problem
> > down to this config symbol - has also benn caught by this issue.
> > 
> >>> Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable 
> >>> replicator naming")
> >>
> >> Before that commit, CORESIGHT_QCOM_REPLICATOR was not "default y", nor 
> >> selected by any in-tree configs, so whatever the problem may be this is 
> >> clearly not the correct fix.
> > 
> > Well, there's only one defconfig for arm64.  I don't know why it
> > doesn't set CORESIGHT, but you're right, this is taking the build fix
> > one step further to facilitate user coresight configuration.  I can
> > change the patch to make the change to the arm64 defconfig, but I still
> > believe CORESIGHT_DYNAMIC_REPLICATOR should be default=y, and the
> > defconfig just set CORESIGHT.
> > 
> >>> Cc: Mathieu Poirier 
> >>> Cc: Suzuki K Poulose 
> >>> Signed-off-by: Kim Phillips 
> >>> ---
> >>>   drivers/hwtracing/coresight/Kconfig | 1 +
> >>>   1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/drivers/hwtracing/coresight/Kconfig 
> >>> b/drivers/hwtracing/coresight/Kconfig
> >>> index ef9cb3c164e1..b94bbd95efa6 100644
> >>> --- a/drivers/hwtracing/coresight/Kconfig
> >>> +++ b/drivers/hwtracing/coresight/Kconfig
> >>> @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
> >>>   config CORESIGHT_DYNAMIC_REPLICATOR
> >>>   bool "CoreSight Programmable Replicator driver"
> >>>   depends on CORESIGHT_LINKS_AND_SINKS
> >>> + default y
> >>
> >> CORESIGHT_LINKS_AND_SINKS is "default n" (as indeed is CORESIGHT), and 
> >> not selected by any defconfigs, so in general this doesn't really help 
> >> anyway.
> > 
> > Yeah, CORESIGHT_LINKS_AND_SINKS should probably be default y too.
> 
> Are they required for system operation?  If not, they should not default to y.

They're not required for general purpose system operation: they're
protected by an if CORESIGHT.  All the other CORESIGHT symbols select
CORESIGHT_LINKS_AND_SINKS except CORESIGHT_CPU_DEBUG, which doesn't
need to be protected by the if CORESIGHT.

> and if they are required, it seems odd that they are in drivers/hwtracing/.

Right, they are required for tracing using the Coresight subsystem, not
general purpose system operation, so they can be 'default y' under 'if
CORESIGHT' protection.

Kim


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Kim Phillips
On Thu, 8 Feb 2018 11:53:44 -0800
Randy Dunlap  wrote:

> On 02/08/2018 11:23 AM, Kim Phillips wrote:
> > On Thu, 8 Feb 2018 16:13:16 +
> > Robin Murphy  wrote:
> > 
> >> On 07/02/18 21:03, Kim Phillips wrote:
> >>> Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
> >>> replicator naming") changed the Kconfig symbol name from
> >>> QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
> >>> was being set in my juno build script, which left the new symbol unset,
> >>> causing the following unexpected grief:
> >>>
> >>>   # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
> >>>   
> >>>   sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
> >>>   mmap size 528384B
> >>>   AUX area mmap length 4194304
> >>>   perf event ring buffer mmapped per cpu
> >>>   failed to mmap AUX area
> >>>   failed to mmap with 12 (Cannot allocate memory)
> >>>
> >>> Make it default y to help not surprise unsuspecting users.
> >>
> >> How many users are there relying on your Juno build script? :P
> > 
> > This shouldn't be that uncommon for coresight users:
> > 
> > make defconfig
> > scripts/config -e CONFIG_CORESIGHT
> > scripts/config -e CONFIG_CORESIGHT_LINK_AND_SINK_TMC
> > scripts/config -e CONFIG_CORESIGHT_SINK_TPIU
> > scripts/config -e CONFIG_CORESIGHT_SINK_ETBV10
> > scripts/config -e CONFIG_CORESIGHT_LINKS_AND_SINKS
> > scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM3X
> > scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM4X
> > #scripts/config -e CONFIG_CORESIGHT_QCOM_REPLICATOR
> > scripts/config -e CONFIG_CORESIGHT_DYNAMIC_REPLICATOR
> > scripts/config -e CONFIG_CORESIGHT_STM
> > scripts/config -e CONFIG_CORESIGHT_CPU_DEBUG
> > 
> > FWIW, Mathieu - who helped me track the cannot allocate memory problem
> > down to this config symbol - has also benn caught by this issue.
> > 
> >>> Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable 
> >>> replicator naming")
> >>
> >> Before that commit, CORESIGHT_QCOM_REPLICATOR was not "default y", nor 
> >> selected by any in-tree configs, so whatever the problem may be this is 
> >> clearly not the correct fix.
> > 
> > Well, there's only one defconfig for arm64.  I don't know why it
> > doesn't set CORESIGHT, but you're right, this is taking the build fix
> > one step further to facilitate user coresight configuration.  I can
> > change the patch to make the change to the arm64 defconfig, but I still
> > believe CORESIGHT_DYNAMIC_REPLICATOR should be default=y, and the
> > defconfig just set CORESIGHT.
> > 
> >>> Cc: Mathieu Poirier 
> >>> Cc: Suzuki K Poulose 
> >>> Signed-off-by: Kim Phillips 
> >>> ---
> >>>   drivers/hwtracing/coresight/Kconfig | 1 +
> >>>   1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/drivers/hwtracing/coresight/Kconfig 
> >>> b/drivers/hwtracing/coresight/Kconfig
> >>> index ef9cb3c164e1..b94bbd95efa6 100644
> >>> --- a/drivers/hwtracing/coresight/Kconfig
> >>> +++ b/drivers/hwtracing/coresight/Kconfig
> >>> @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
> >>>   config CORESIGHT_DYNAMIC_REPLICATOR
> >>>   bool "CoreSight Programmable Replicator driver"
> >>>   depends on CORESIGHT_LINKS_AND_SINKS
> >>> + default y
> >>
> >> CORESIGHT_LINKS_AND_SINKS is "default n" (as indeed is CORESIGHT), and 
> >> not selected by any defconfigs, so in general this doesn't really help 
> >> anyway.
> > 
> > Yeah, CORESIGHT_LINKS_AND_SINKS should probably be default y too.
> 
> Are they required for system operation?  If not, they should not default to y.

They're not required for general purpose system operation: they're
protected by an if CORESIGHT.  All the other CORESIGHT symbols select
CORESIGHT_LINKS_AND_SINKS except CORESIGHT_CPU_DEBUG, which doesn't
need to be protected by the if CORESIGHT.

> and if they are required, it seems odd that they are in drivers/hwtracing/.

Right, they are required for tracing using the Coresight subsystem, not
general purpose system operation, so they can be 'default y' under 'if
CORESIGHT' protection.

Kim


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Randy Dunlap
On 02/08/2018 11:23 AM, Kim Phillips wrote:
> On Thu, 8 Feb 2018 16:13:16 +
> Robin Murphy  wrote:
> 
>> On 07/02/18 21:03, Kim Phillips wrote:
>>> Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
>>> replicator naming") changed the Kconfig symbol name from
>>> QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
>>> was being set in my juno build script, which left the new symbol unset,
>>> causing the following unexpected grief:
>>>
>>>   # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
>>>   
>>>   sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
>>>   mmap size 528384B
>>>   AUX area mmap length 4194304
>>>   perf event ring buffer mmapped per cpu
>>>   failed to mmap AUX area
>>>   failed to mmap with 12 (Cannot allocate memory)
>>>
>>> Make it default y to help not surprise unsuspecting users.
>>
>> How many users are there relying on your Juno build script? :P
> 
> This shouldn't be that uncommon for coresight users:
> 
> make defconfig
> scripts/config -e CONFIG_CORESIGHT
> scripts/config -e CONFIG_CORESIGHT_LINK_AND_SINK_TMC
> scripts/config -e CONFIG_CORESIGHT_SINK_TPIU
> scripts/config -e CONFIG_CORESIGHT_SINK_ETBV10
> scripts/config -e CONFIG_CORESIGHT_LINKS_AND_SINKS
> scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM3X
> scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM4X
> #scripts/config -e CONFIG_CORESIGHT_QCOM_REPLICATOR
> scripts/config -e CONFIG_CORESIGHT_DYNAMIC_REPLICATOR
> scripts/config -e CONFIG_CORESIGHT_STM
> scripts/config -e CONFIG_CORESIGHT_CPU_DEBUG
> 
> FWIW, Mathieu - who helped me track the cannot allocate memory problem
> down to this config symbol - has also benn caught by this issue.
> 
>>> Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
>>> naming")
>>
>> Before that commit, CORESIGHT_QCOM_REPLICATOR was not "default y", nor 
>> selected by any in-tree configs, so whatever the problem may be this is 
>> clearly not the correct fix.
> 
> Well, there's only one defconfig for arm64.  I don't know why it
> doesn't set CORESIGHT, but you're right, this is taking the build fix
> one step further to facilitate user coresight configuration.  I can
> change the patch to make the change to the arm64 defconfig, but I still
> believe CORESIGHT_DYNAMIC_REPLICATOR should be default=y, and the
> defconfig just set CORESIGHT.
> 
>>> Cc: Mathieu Poirier 
>>> Cc: Suzuki K Poulose 
>>> Signed-off-by: Kim Phillips 
>>> ---
>>>   drivers/hwtracing/coresight/Kconfig | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/hwtracing/coresight/Kconfig 
>>> b/drivers/hwtracing/coresight/Kconfig
>>> index ef9cb3c164e1..b94bbd95efa6 100644
>>> --- a/drivers/hwtracing/coresight/Kconfig
>>> +++ b/drivers/hwtracing/coresight/Kconfig
>>> @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
>>>   config CORESIGHT_DYNAMIC_REPLICATOR
>>> bool "CoreSight Programmable Replicator driver"
>>> depends on CORESIGHT_LINKS_AND_SINKS
>>> +   default y
>>
>> CORESIGHT_LINKS_AND_SINKS is "default n" (as indeed is CORESIGHT), and 
>> not selected by any defconfigs, so in general this doesn't really help 
>> anyway.
> 
> Yeah, CORESIGHT_LINKS_AND_SINKS should probably be default y too.

Are they required for system operation?  If not, they should not default to y.

and if they are required, it seems odd that they are in drivers/hwtracing/.


-- 
~Randy


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Randy Dunlap
On 02/08/2018 11:23 AM, Kim Phillips wrote:
> On Thu, 8 Feb 2018 16:13:16 +
> Robin Murphy  wrote:
> 
>> On 07/02/18 21:03, Kim Phillips wrote:
>>> Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
>>> replicator naming") changed the Kconfig symbol name from
>>> QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
>>> was being set in my juno build script, which left the new symbol unset,
>>> causing the following unexpected grief:
>>>
>>>   # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
>>>   
>>>   sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
>>>   mmap size 528384B
>>>   AUX area mmap length 4194304
>>>   perf event ring buffer mmapped per cpu
>>>   failed to mmap AUX area
>>>   failed to mmap with 12 (Cannot allocate memory)
>>>
>>> Make it default y to help not surprise unsuspecting users.
>>
>> How many users are there relying on your Juno build script? :P
> 
> This shouldn't be that uncommon for coresight users:
> 
> make defconfig
> scripts/config -e CONFIG_CORESIGHT
> scripts/config -e CONFIG_CORESIGHT_LINK_AND_SINK_TMC
> scripts/config -e CONFIG_CORESIGHT_SINK_TPIU
> scripts/config -e CONFIG_CORESIGHT_SINK_ETBV10
> scripts/config -e CONFIG_CORESIGHT_LINKS_AND_SINKS
> scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM3X
> scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM4X
> #scripts/config -e CONFIG_CORESIGHT_QCOM_REPLICATOR
> scripts/config -e CONFIG_CORESIGHT_DYNAMIC_REPLICATOR
> scripts/config -e CONFIG_CORESIGHT_STM
> scripts/config -e CONFIG_CORESIGHT_CPU_DEBUG
> 
> FWIW, Mathieu - who helped me track the cannot allocate memory problem
> down to this config symbol - has also benn caught by this issue.
> 
>>> Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
>>> naming")
>>
>> Before that commit, CORESIGHT_QCOM_REPLICATOR was not "default y", nor 
>> selected by any in-tree configs, so whatever the problem may be this is 
>> clearly not the correct fix.
> 
> Well, there's only one defconfig for arm64.  I don't know why it
> doesn't set CORESIGHT, but you're right, this is taking the build fix
> one step further to facilitate user coresight configuration.  I can
> change the patch to make the change to the arm64 defconfig, but I still
> believe CORESIGHT_DYNAMIC_REPLICATOR should be default=y, and the
> defconfig just set CORESIGHT.
> 
>>> Cc: Mathieu Poirier 
>>> Cc: Suzuki K Poulose 
>>> Signed-off-by: Kim Phillips 
>>> ---
>>>   drivers/hwtracing/coresight/Kconfig | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/hwtracing/coresight/Kconfig 
>>> b/drivers/hwtracing/coresight/Kconfig
>>> index ef9cb3c164e1..b94bbd95efa6 100644
>>> --- a/drivers/hwtracing/coresight/Kconfig
>>> +++ b/drivers/hwtracing/coresight/Kconfig
>>> @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
>>>   config CORESIGHT_DYNAMIC_REPLICATOR
>>> bool "CoreSight Programmable Replicator driver"
>>> depends on CORESIGHT_LINKS_AND_SINKS
>>> +   default y
>>
>> CORESIGHT_LINKS_AND_SINKS is "default n" (as indeed is CORESIGHT), and 
>> not selected by any defconfigs, so in general this doesn't really help 
>> anyway.
> 
> Yeah, CORESIGHT_LINKS_AND_SINKS should probably be default y too.

Are they required for system operation?  If not, they should not default to y.

and if they are required, it seems odd that they are in drivers/hwtracing/.


-- 
~Randy


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Kim Phillips
On Thu, 8 Feb 2018 16:13:16 +
Robin Murphy  wrote:

> On 07/02/18 21:03, Kim Phillips wrote:
> > Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
> > replicator naming") changed the Kconfig symbol name from
> > QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
> > was being set in my juno build script, which left the new symbol unset,
> > causing the following unexpected grief:
> > 
> >   # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
> >   
> >   sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
> >   mmap size 528384B
> >   AUX area mmap length 4194304
> >   perf event ring buffer mmapped per cpu
> >   failed to mmap AUX area
> >   failed to mmap with 12 (Cannot allocate memory)
> > 
> > Make it default y to help not surprise unsuspecting users.
> 
> How many users are there relying on your Juno build script? :P

This shouldn't be that uncommon for coresight users:

make defconfig
scripts/config -e CONFIG_CORESIGHT
scripts/config -e CONFIG_CORESIGHT_LINK_AND_SINK_TMC
scripts/config -e CONFIG_CORESIGHT_SINK_TPIU
scripts/config -e CONFIG_CORESIGHT_SINK_ETBV10
scripts/config -e CONFIG_CORESIGHT_LINKS_AND_SINKS
scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM3X
scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM4X
#scripts/config -e CONFIG_CORESIGHT_QCOM_REPLICATOR
scripts/config -e CONFIG_CORESIGHT_DYNAMIC_REPLICATOR
scripts/config -e CONFIG_CORESIGHT_STM
scripts/config -e CONFIG_CORESIGHT_CPU_DEBUG

FWIW, Mathieu - who helped me track the cannot allocate memory problem
down to this config symbol - has also benn caught by this issue.

> > Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
> > naming")
> 
> Before that commit, CORESIGHT_QCOM_REPLICATOR was not "default y", nor 
> selected by any in-tree configs, so whatever the problem may be this is 
> clearly not the correct fix.

Well, there's only one defconfig for arm64.  I don't know why it
doesn't set CORESIGHT, but you're right, this is taking the build fix
one step further to facilitate user coresight configuration.  I can
change the patch to make the change to the arm64 defconfig, but I still
believe CORESIGHT_DYNAMIC_REPLICATOR should be default=y, and the
defconfig just set CORESIGHT.

> > Cc: Mathieu Poirier 
> > Cc: Suzuki K Poulose 
> > Signed-off-by: Kim Phillips 
> > ---
> >   drivers/hwtracing/coresight/Kconfig | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/hwtracing/coresight/Kconfig 
> > b/drivers/hwtracing/coresight/Kconfig
> > index ef9cb3c164e1..b94bbd95efa6 100644
> > --- a/drivers/hwtracing/coresight/Kconfig
> > +++ b/drivers/hwtracing/coresight/Kconfig
> > @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
> >   config CORESIGHT_DYNAMIC_REPLICATOR
> > bool "CoreSight Programmable Replicator driver"
> > depends on CORESIGHT_LINKS_AND_SINKS
> > +   default y
> 
> CORESIGHT_LINKS_AND_SINKS is "default n" (as indeed is CORESIGHT), and 
> not selected by any defconfigs, so in general this doesn't really help 
> anyway.

Yeah, CORESIGHT_LINKS_AND_SINKS should probably be default y too.

Kim


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Kim Phillips
On Thu, 8 Feb 2018 16:13:16 +
Robin Murphy  wrote:

> On 07/02/18 21:03, Kim Phillips wrote:
> > Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
> > replicator naming") changed the Kconfig symbol name from
> > QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
> > was being set in my juno build script, which left the new symbol unset,
> > causing the following unexpected grief:
> > 
> >   # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
> >   
> >   sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
> >   mmap size 528384B
> >   AUX area mmap length 4194304
> >   perf event ring buffer mmapped per cpu
> >   failed to mmap AUX area
> >   failed to mmap with 12 (Cannot allocate memory)
> > 
> > Make it default y to help not surprise unsuspecting users.
> 
> How many users are there relying on your Juno build script? :P

This shouldn't be that uncommon for coresight users:

make defconfig
scripts/config -e CONFIG_CORESIGHT
scripts/config -e CONFIG_CORESIGHT_LINK_AND_SINK_TMC
scripts/config -e CONFIG_CORESIGHT_SINK_TPIU
scripts/config -e CONFIG_CORESIGHT_SINK_ETBV10
scripts/config -e CONFIG_CORESIGHT_LINKS_AND_SINKS
scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM3X
scripts/config -e CONFIG_CORESIGHT_SOURCE_ETM4X
#scripts/config -e CONFIG_CORESIGHT_QCOM_REPLICATOR
scripts/config -e CONFIG_CORESIGHT_DYNAMIC_REPLICATOR
scripts/config -e CONFIG_CORESIGHT_STM
scripts/config -e CONFIG_CORESIGHT_CPU_DEBUG

FWIW, Mathieu - who helped me track the cannot allocate memory problem
down to this config symbol - has also benn caught by this issue.

> > Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
> > naming")
> 
> Before that commit, CORESIGHT_QCOM_REPLICATOR was not "default y", nor 
> selected by any in-tree configs, so whatever the problem may be this is 
> clearly not the correct fix.

Well, there's only one defconfig for arm64.  I don't know why it
doesn't set CORESIGHT, but you're right, this is taking the build fix
one step further to facilitate user coresight configuration.  I can
change the patch to make the change to the arm64 defconfig, but I still
believe CORESIGHT_DYNAMIC_REPLICATOR should be default=y, and the
defconfig just set CORESIGHT.

> > Cc: Mathieu Poirier 
> > Cc: Suzuki K Poulose 
> > Signed-off-by: Kim Phillips 
> > ---
> >   drivers/hwtracing/coresight/Kconfig | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/hwtracing/coresight/Kconfig 
> > b/drivers/hwtracing/coresight/Kconfig
> > index ef9cb3c164e1..b94bbd95efa6 100644
> > --- a/drivers/hwtracing/coresight/Kconfig
> > +++ b/drivers/hwtracing/coresight/Kconfig
> > @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
> >   config CORESIGHT_DYNAMIC_REPLICATOR
> > bool "CoreSight Programmable Replicator driver"
> > depends on CORESIGHT_LINKS_AND_SINKS
> > +   default y
> 
> CORESIGHT_LINKS_AND_SINKS is "default n" (as indeed is CORESIGHT), and 
> not selected by any defconfigs, so in general this doesn't really help 
> anyway.

Yeah, CORESIGHT_LINKS_AND_SINKS should probably be default y too.

Kim


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Kim Phillips
On Thu, 8 Feb 2018 18:01:21 +
Suzuki K Poulose  wrote:

> On 08/02/18 17:22, Kim Phillips wrote:
> > On Thu, 8 Feb 2018 08:59:30 -0700
> > Mathieu Poirier  wrote:
> > 
> >> On 7 February 2018 at 14:03, Kim Phillips  wrote:
> >>> Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
> >>> replicator naming") changed the Kconfig symbol name from
> >>> QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
> >>> was being set in my juno build script, which left the new symbol unset,
> >>> causing the following unexpected grief:
> >>>
> >>>   # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
> >>>   
> >>>   sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
> >>>   mmap size 528384B
> >>>   AUX area mmap length 4194304
> >>>   perf event ring buffer mmapped per cpu
> >>>   failed to mmap AUX area
> >>>   failed to mmap with 12 (Cannot allocate memory)
> >>>
> >>> Make it default y to help not surprise unsuspecting users.
> >>>
> >>> Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable 
> >>> replicator naming")
> >>> Cc: Mathieu Poirier 
> >>> Cc: Suzuki K Poulose 
> >>> Signed-off-by: Kim Phillips 
> >>> ---
> >>>   drivers/hwtracing/coresight/Kconfig | 1 +
> >>>   1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/drivers/hwtracing/coresight/Kconfig 
> >>> b/drivers/hwtracing/coresight/Kconfig
> >>> index ef9cb3c164e1..b94bbd95efa6 100644
> >>> --- a/drivers/hwtracing/coresight/Kconfig
> >>> +++ b/drivers/hwtracing/coresight/Kconfig
> >>> @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
> >>>   config CORESIGHT_DYNAMIC_REPLICATOR
> >>>  bool "CoreSight Programmable Replicator driver"
> >>>  depends on CORESIGHT_LINKS_AND_SINKS
> >>> +   default y
> >>>  help
> >>>This enables support for dynamic CoreSight replicator link 
> >>> driver.
> >>>The programmable ATB replicator allows independent filtering 
> >>> of the
> >>
> >> As I said before don't see why it needs to be treated differently than 
> >> other CS
> >> blocks
> > 
> > I don't think it does either, but this one is special since it recently
> > underwent a rename, which breaks its users that were setting the old
> > name in their config builds.  The default y keeps it set in those
> > cases, thereby discontinuing any such regression.
> 
> I don't think the kernel CONFIG symbols are part of the kernel ABI. So,
> unfortunately the users have to take care of making sure they select what
> they need.

Right, sorry, I wan't referring to a kernel ABI regression :)  Think of
it as just trying to make Coresight easier to configure, and in this
particular case, given Coresight Kconfig symbol name volatility.

Kim


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Kim Phillips
On Thu, 8 Feb 2018 18:01:21 +
Suzuki K Poulose  wrote:

> On 08/02/18 17:22, Kim Phillips wrote:
> > On Thu, 8 Feb 2018 08:59:30 -0700
> > Mathieu Poirier  wrote:
> > 
> >> On 7 February 2018 at 14:03, Kim Phillips  wrote:
> >>> Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
> >>> replicator naming") changed the Kconfig symbol name from
> >>> QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
> >>> was being set in my juno build script, which left the new symbol unset,
> >>> causing the following unexpected grief:
> >>>
> >>>   # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
> >>>   
> >>>   sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
> >>>   mmap size 528384B
> >>>   AUX area mmap length 4194304
> >>>   perf event ring buffer mmapped per cpu
> >>>   failed to mmap AUX area
> >>>   failed to mmap with 12 (Cannot allocate memory)
> >>>
> >>> Make it default y to help not surprise unsuspecting users.
> >>>
> >>> Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable 
> >>> replicator naming")
> >>> Cc: Mathieu Poirier 
> >>> Cc: Suzuki K Poulose 
> >>> Signed-off-by: Kim Phillips 
> >>> ---
> >>>   drivers/hwtracing/coresight/Kconfig | 1 +
> >>>   1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/drivers/hwtracing/coresight/Kconfig 
> >>> b/drivers/hwtracing/coresight/Kconfig
> >>> index ef9cb3c164e1..b94bbd95efa6 100644
> >>> --- a/drivers/hwtracing/coresight/Kconfig
> >>> +++ b/drivers/hwtracing/coresight/Kconfig
> >>> @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
> >>>   config CORESIGHT_DYNAMIC_REPLICATOR
> >>>  bool "CoreSight Programmable Replicator driver"
> >>>  depends on CORESIGHT_LINKS_AND_SINKS
> >>> +   default y
> >>>  help
> >>>This enables support for dynamic CoreSight replicator link 
> >>> driver.
> >>>The programmable ATB replicator allows independent filtering 
> >>> of the
> >>
> >> As I said before don't see why it needs to be treated differently than 
> >> other CS
> >> blocks
> > 
> > I don't think it does either, but this one is special since it recently
> > underwent a rename, which breaks its users that were setting the old
> > name in their config builds.  The default y keeps it set in those
> > cases, thereby discontinuing any such regression.
> 
> I don't think the kernel CONFIG symbols are part of the kernel ABI. So,
> unfortunately the users have to take care of making sure they select what
> they need.

Right, sorry, I wan't referring to a kernel ABI regression :)  Think of
it as just trying to make Coresight easier to configure, and in this
particular case, given Coresight Kconfig symbol name volatility.

Kim


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Suzuki K Poulose

On 08/02/18 17:22, Kim Phillips wrote:

On Thu, 8 Feb 2018 08:59:30 -0700
Mathieu Poirier  wrote:


On 7 February 2018 at 14:03, Kim Phillips  wrote:

Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
replicator naming") changed the Kconfig symbol name from
QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
was being set in my juno build script, which left the new symbol unset,
causing the following unexpected grief:

  # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
  
  sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
  mmap size 528384B
  AUX area mmap length 4194304
  perf event ring buffer mmapped per cpu
  failed to mmap AUX area
  failed to mmap with 12 (Cannot allocate memory)

Make it default y to help not surprise unsuspecting users.

Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
naming")
Cc: Mathieu Poirier 
Cc: Suzuki K Poulose 
Signed-off-by: Kim Phillips 
---
  drivers/hwtracing/coresight/Kconfig | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/hwtracing/coresight/Kconfig 
b/drivers/hwtracing/coresight/Kconfig
index ef9cb3c164e1..b94bbd95efa6 100644
--- a/drivers/hwtracing/coresight/Kconfig
+++ b/drivers/hwtracing/coresight/Kconfig
@@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
  config CORESIGHT_DYNAMIC_REPLICATOR
 bool "CoreSight Programmable Replicator driver"
 depends on CORESIGHT_LINKS_AND_SINKS
+   default y
 help
   This enables support for dynamic CoreSight replicator link driver.
   The programmable ATB replicator allows independent filtering of the


As I said before don't see why it needs to be treated differently than other CS
blocks


I don't think it does either, but this one is special since it recently
underwent a rename, which breaks its users that were setting the old
name in their config builds.  The default y keeps it set in those
cases, thereby discontinuing any such regression.


I don't think the kernel CONFIG symbols are part of the kernel ABI. So,
unfortunately the users have to take care of making sure they select what
they need.

Suzuki


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Suzuki K Poulose

On 08/02/18 17:22, Kim Phillips wrote:

On Thu, 8 Feb 2018 08:59:30 -0700
Mathieu Poirier  wrote:


On 7 February 2018 at 14:03, Kim Phillips  wrote:

Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
replicator naming") changed the Kconfig symbol name from
QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
was being set in my juno build script, which left the new symbol unset,
causing the following unexpected grief:

  # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
  
  sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
  mmap size 528384B
  AUX area mmap length 4194304
  perf event ring buffer mmapped per cpu
  failed to mmap AUX area
  failed to mmap with 12 (Cannot allocate memory)

Make it default y to help not surprise unsuspecting users.

Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
naming")
Cc: Mathieu Poirier 
Cc: Suzuki K Poulose 
Signed-off-by: Kim Phillips 
---
  drivers/hwtracing/coresight/Kconfig | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/hwtracing/coresight/Kconfig 
b/drivers/hwtracing/coresight/Kconfig
index ef9cb3c164e1..b94bbd95efa6 100644
--- a/drivers/hwtracing/coresight/Kconfig
+++ b/drivers/hwtracing/coresight/Kconfig
@@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
  config CORESIGHT_DYNAMIC_REPLICATOR
 bool "CoreSight Programmable Replicator driver"
 depends on CORESIGHT_LINKS_AND_SINKS
+   default y
 help
   This enables support for dynamic CoreSight replicator link driver.
   The programmable ATB replicator allows independent filtering of the


As I said before don't see why it needs to be treated differently than other CS
blocks


I don't think it does either, but this one is special since it recently
underwent a rename, which breaks its users that were setting the old
name in their config builds.  The default y keeps it set in those
cases, thereby discontinuing any such regression.


I don't think the kernel CONFIG symbols are part of the kernel ABI. So,
unfortunately the users have to take care of making sure they select what
they need.

Suzuki


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Kim Phillips
On Thu, 8 Feb 2018 08:59:30 -0700
Mathieu Poirier  wrote:

> On 7 February 2018 at 14:03, Kim Phillips  wrote:
> > Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
> > replicator naming") changed the Kconfig symbol name from
> > QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
> > was being set in my juno build script, which left the new symbol unset,
> > causing the following unexpected grief:
> >
> >  # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
> >  
> >  sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
> >  mmap size 528384B
> >  AUX area mmap length 4194304
> >  perf event ring buffer mmapped per cpu
> >  failed to mmap AUX area
> >  failed to mmap with 12 (Cannot allocate memory)
> >
> > Make it default y to help not surprise unsuspecting users.
> >
> > Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
> > naming")
> > Cc: Mathieu Poirier 
> > Cc: Suzuki K Poulose 
> > Signed-off-by: Kim Phillips 
> > ---
> >  drivers/hwtracing/coresight/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/hwtracing/coresight/Kconfig 
> > b/drivers/hwtracing/coresight/Kconfig
> > index ef9cb3c164e1..b94bbd95efa6 100644
> > --- a/drivers/hwtracing/coresight/Kconfig
> > +++ b/drivers/hwtracing/coresight/Kconfig
> > @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
> >  config CORESIGHT_DYNAMIC_REPLICATOR
> > bool "CoreSight Programmable Replicator driver"
> > depends on CORESIGHT_LINKS_AND_SINKS
> > +   default y
> > help
> >   This enables support for dynamic CoreSight replicator link driver.
> >   The programmable ATB replicator allows independent filtering of 
> > the
> 
> As I said before don't see why it needs to be treated differently than other 
> CS
> blocks

I don't think it does either, but this one is special since it recently
underwent a rename, which breaks its users that were setting the old
name in their config builds.  The default y keeps it set in those
cases, thereby discontinuing any such regression.

> - intelligent replicators show up on the AMBA bus and need to
> be declared in the DT.  As such people are expected to enable the proper
> option.

The driver should only run given a replicator in the device tree; if
that's not the case, then that's another problem, and orthogonal to
this one.

Kim


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Kim Phillips
On Thu, 8 Feb 2018 08:59:30 -0700
Mathieu Poirier  wrote:

> On 7 February 2018 at 14:03, Kim Phillips  wrote:
> > Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
> > replicator naming") changed the Kconfig symbol name from
> > QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
> > was being set in my juno build script, which left the new symbol unset,
> > causing the following unexpected grief:
> >
> >  # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
> >  
> >  sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
> >  mmap size 528384B
> >  AUX area mmap length 4194304
> >  perf event ring buffer mmapped per cpu
> >  failed to mmap AUX area
> >  failed to mmap with 12 (Cannot allocate memory)
> >
> > Make it default y to help not surprise unsuspecting users.
> >
> > Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
> > naming")
> > Cc: Mathieu Poirier 
> > Cc: Suzuki K Poulose 
> > Signed-off-by: Kim Phillips 
> > ---
> >  drivers/hwtracing/coresight/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/hwtracing/coresight/Kconfig 
> > b/drivers/hwtracing/coresight/Kconfig
> > index ef9cb3c164e1..b94bbd95efa6 100644
> > --- a/drivers/hwtracing/coresight/Kconfig
> > +++ b/drivers/hwtracing/coresight/Kconfig
> > @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
> >  config CORESIGHT_DYNAMIC_REPLICATOR
> > bool "CoreSight Programmable Replicator driver"
> > depends on CORESIGHT_LINKS_AND_SINKS
> > +   default y
> > help
> >   This enables support for dynamic CoreSight replicator link driver.
> >   The programmable ATB replicator allows independent filtering of 
> > the
> 
> As I said before don't see why it needs to be treated differently than other 
> CS
> blocks

I don't think it does either, but this one is special since it recently
underwent a rename, which breaks its users that were setting the old
name in their config builds.  The default y keeps it set in those
cases, thereby discontinuing any such regression.

> - intelligent replicators show up on the AMBA bus and need to
> be declared in the DT.  As such people are expected to enable the proper
> option.

The driver should only run given a replicator in the device tree; if
that's not the case, then that's another problem, and orthogonal to
this one.

Kim


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Robin Murphy

On 07/02/18 21:03, Kim Phillips wrote:

Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
replicator naming") changed the Kconfig symbol name from
QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
was being set in my juno build script, which left the new symbol unset,
causing the following unexpected grief:

  # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
  
  sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
  mmap size 528384B
  AUX area mmap length 4194304
  perf event ring buffer mmapped per cpu
  failed to mmap AUX area
  failed to mmap with 12 (Cannot allocate memory)

Make it default y to help not surprise unsuspecting users.


How many users are there relying on your Juno build script? :P


Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
naming")


Before that commit, CORESIGHT_QCOM_REPLICATOR was not "default y", nor 
selected by any in-tree configs, so whatever the problem may be this is 
clearly not the correct fix.



Cc: Mathieu Poirier 
Cc: Suzuki K Poulose 
Signed-off-by: Kim Phillips 
---
  drivers/hwtracing/coresight/Kconfig | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/hwtracing/coresight/Kconfig 
b/drivers/hwtracing/coresight/Kconfig
index ef9cb3c164e1..b94bbd95efa6 100644
--- a/drivers/hwtracing/coresight/Kconfig
+++ b/drivers/hwtracing/coresight/Kconfig
@@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
  config CORESIGHT_DYNAMIC_REPLICATOR
bool "CoreSight Programmable Replicator driver"
depends on CORESIGHT_LINKS_AND_SINKS
+   default y


CORESIGHT_LINKS_AND_SINKS is "default n" (as indeed is CORESIGHT), and 
not selected by any defconfigs, so in general this doesn't really help 
anyway.


Robin.


help
  This enables support for dynamic CoreSight replicator link driver.
  The programmable ATB replicator allows independent filtering of the



Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Robin Murphy

On 07/02/18 21:03, Kim Phillips wrote:

Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
replicator naming") changed the Kconfig symbol name from
QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
was being set in my juno build script, which left the new symbol unset,
causing the following unexpected grief:

  # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
  
  sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
  mmap size 528384B
  AUX area mmap length 4194304
  perf event ring buffer mmapped per cpu
  failed to mmap AUX area
  failed to mmap with 12 (Cannot allocate memory)

Make it default y to help not surprise unsuspecting users.


How many users are there relying on your Juno build script? :P


Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
naming")


Before that commit, CORESIGHT_QCOM_REPLICATOR was not "default y", nor 
selected by any in-tree configs, so whatever the problem may be this is 
clearly not the correct fix.



Cc: Mathieu Poirier 
Cc: Suzuki K Poulose 
Signed-off-by: Kim Phillips 
---
  drivers/hwtracing/coresight/Kconfig | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/hwtracing/coresight/Kconfig 
b/drivers/hwtracing/coresight/Kconfig
index ef9cb3c164e1..b94bbd95efa6 100644
--- a/drivers/hwtracing/coresight/Kconfig
+++ b/drivers/hwtracing/coresight/Kconfig
@@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
  config CORESIGHT_DYNAMIC_REPLICATOR
bool "CoreSight Programmable Replicator driver"
depends on CORESIGHT_LINKS_AND_SINKS
+   default y


CORESIGHT_LINKS_AND_SINKS is "default n" (as indeed is CORESIGHT), and 
not selected by any defconfigs, so in general this doesn't really help 
anyway.


Robin.


help
  This enables support for dynamic CoreSight replicator link driver.
  The programmable ATB replicator allows independent filtering of the



Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Mathieu Poirier
On 7 February 2018 at 14:03, Kim Phillips  wrote:
> Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
> replicator naming") changed the Kconfig symbol name from
> QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
> was being set in my juno build script, which left the new symbol unset,
> causing the following unexpected grief:
>
>  # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
>  
>  sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
>  mmap size 528384B
>  AUX area mmap length 4194304
>  perf event ring buffer mmapped per cpu
>  failed to mmap AUX area
>  failed to mmap with 12 (Cannot allocate memory)
>
> Make it default y to help not surprise unsuspecting users.
>
> Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
> naming")
> Cc: Mathieu Poirier 
> Cc: Suzuki K Poulose 
> Signed-off-by: Kim Phillips 
> ---
>  drivers/hwtracing/coresight/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hwtracing/coresight/Kconfig 
> b/drivers/hwtracing/coresight/Kconfig
> index ef9cb3c164e1..b94bbd95efa6 100644
> --- a/drivers/hwtracing/coresight/Kconfig
> +++ b/drivers/hwtracing/coresight/Kconfig
> @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
>  config CORESIGHT_DYNAMIC_REPLICATOR
> bool "CoreSight Programmable Replicator driver"
> depends on CORESIGHT_LINKS_AND_SINKS
> +   default y
> help
>   This enables support for dynamic CoreSight replicator link driver.
>   The programmable ATB replicator allows independent filtering of the

As I said before don't see why it needs to be treated differently than other CS
blocks - intelligent replicators show up on the AMBA bus and need to
be declared in the DT.  As such people are expected to enable the proper
option.

Mathieu

> --
> 2.16.1
>


Re: [PATCH] coresight replicator: set default y after Kconfig rename

2018-02-08 Thread Mathieu Poirier
On 7 February 2018 at 14:03, Kim Phillips  wrote:
> Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
> replicator naming") changed the Kconfig symbol name from
> QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
> was being set in my juno build script, which left the new symbol unset,
> causing the following unexpected grief:
>
>  # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
>  
>  sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
>  mmap size 528384B
>  AUX area mmap length 4194304
>  perf event ring buffer mmapped per cpu
>  failed to mmap AUX area
>  failed to mmap with 12 (Cannot allocate memory)
>
> Make it default y to help not surprise unsuspecting users.
>
> Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
> naming")
> Cc: Mathieu Poirier 
> Cc: Suzuki K Poulose 
> Signed-off-by: Kim Phillips 
> ---
>  drivers/hwtracing/coresight/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hwtracing/coresight/Kconfig 
> b/drivers/hwtracing/coresight/Kconfig
> index ef9cb3c164e1..b94bbd95efa6 100644
> --- a/drivers/hwtracing/coresight/Kconfig
> +++ b/drivers/hwtracing/coresight/Kconfig
> @@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
>  config CORESIGHT_DYNAMIC_REPLICATOR
> bool "CoreSight Programmable Replicator driver"
> depends on CORESIGHT_LINKS_AND_SINKS
> +   default y
> help
>   This enables support for dynamic CoreSight replicator link driver.
>   The programmable ATB replicator allows independent filtering of the

As I said before don't see why it needs to be treated differently than other CS
blocks - intelligent replicators show up on the AMBA bus and need to
be declared in the DT.  As such people are expected to enable the proper
option.

Mathieu

> --
> 2.16.1
>


[PATCH] coresight replicator: set default y after Kconfig rename

2018-02-07 Thread Kim Phillips
Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
replicator naming") changed the Kconfig symbol name from
QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
was being set in my juno build script, which left the new symbol unset,
causing the following unexpected grief:

 # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
 
 sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
 mmap size 528384B
 AUX area mmap length 4194304
 perf event ring buffer mmapped per cpu
 failed to mmap AUX area
 failed to mmap with 12 (Cannot allocate memory)

Make it default y to help not surprise unsuspecting users.

Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
naming")
Cc: Mathieu Poirier 
Cc: Suzuki K Poulose 
Signed-off-by: Kim Phillips 
---
 drivers/hwtracing/coresight/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hwtracing/coresight/Kconfig 
b/drivers/hwtracing/coresight/Kconfig
index ef9cb3c164e1..b94bbd95efa6 100644
--- a/drivers/hwtracing/coresight/Kconfig
+++ b/drivers/hwtracing/coresight/Kconfig
@@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
 config CORESIGHT_DYNAMIC_REPLICATOR
bool "CoreSight Programmable Replicator driver"
depends on CORESIGHT_LINKS_AND_SINKS
+   default y
help
  This enables support for dynamic CoreSight replicator link driver.
  The programmable ATB replicator allows independent filtering of the
-- 
2.16.1



[PATCH] coresight replicator: set default y after Kconfig rename

2018-02-07 Thread Kim Phillips
Commit 1c8859848dbb ("coresight replicator: Cleanup programmable
replicator naming") changed the Kconfig symbol name from
QCOM_REPLICATOR, which, whilst not in the single arm64 defconfig,
was being set in my juno build script, which left the new symbol unset,
causing the following unexpected grief:

 # ./perf record -vvv -C 0 -e cs_etm/@2007.etr/ --per-thread true
 
 sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
 mmap size 528384B
 AUX area mmap length 4194304
 perf event ring buffer mmapped per cpu
 failed to mmap AUX area
 failed to mmap with 12 (Cannot allocate memory)

Make it default y to help not surprise unsuspecting users.

Fixes: 1c8859848dbb ("coresight replicator: Cleanup programmable replicator 
naming")
Cc: Mathieu Poirier 
Cc: Suzuki K Poulose 
Signed-off-by: Kim Phillips 
---
 drivers/hwtracing/coresight/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hwtracing/coresight/Kconfig 
b/drivers/hwtracing/coresight/Kconfig
index ef9cb3c164e1..b94bbd95efa6 100644
--- a/drivers/hwtracing/coresight/Kconfig
+++ b/drivers/hwtracing/coresight/Kconfig
@@ -73,6 +73,7 @@ config CORESIGHT_SOURCE_ETM4X
 config CORESIGHT_DYNAMIC_REPLICATOR
bool "CoreSight Programmable Replicator driver"
depends on CORESIGHT_LINKS_AND_SINKS
+   default y
help
  This enables support for dynamic CoreSight replicator link driver.
  The programmable ATB replicator allows independent filtering of the
-- 
2.16.1