Re: [PATCH 05/11] tracing: consolidate the TRACE_IRQFLAGS_SUPPORT symbol

2019-02-18 Thread Ley Foon Tan
On Fri, 2019-02-15 at 16:55 +0900, Masahiro Yamada wrote:
> +CC: Ley Foon Tan 
> +CC: nios2-...@lists.rocketboards.org
> 
> 
> On Thu, Feb 14, 2019 at 2:40 AM Christoph Hellwig  wrote:
> 
> > 
> > diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
> > index 715e6c09b4a5..3b50689007f5 100644
> > --- a/arch/nios2/Kconfig
> > +++ b/arch/nios2/Kconfig
> > @@ -20,6 +20,7 @@ config NIOS2
> > select OF_EARLY_FLATTREE
> > select SOC_BUS
> > select SPARSE_IRQ
> > +   select TRACE_IRQFLAGS_SUPPORT
> 
> This is a behavior change of nios2.
> 
> TRACE_IRQFLAGS_SUPPORT was previously 'n',
> and this commit is changing it to 'y'.
> 
> 
> 
> 
> Strangely, nios2 defines TRACE_IRQFLAGS_SUPPORT twice
> with different default values.
> 
> In Kconfig, the first one becomes effective.
> 
> In this case, 'def_bool n' in arch/nios2/Kconfig is used.
> 'def_bool y' in arch/nios2/Kconfig.debug is dead code.
> 
> 
> I think this select should be dropped
> to keep the current behavior,
> but I hope the NIOS2 maintainer will give us
> some comments just in case.
> 
Yes, please drop this patch to keep original behavior.
Thanks.

Regards
Ley Foon
> 
> 
> 
> > 
> > select USB_ARCH_HAS_HCD if USB_SUPPORT
> > select CPU_NO_EFFICIENT_FFS
> > select ARCH_DISCARD_MEMBLOCK
> > @@ -39,9 +40,6 @@ config NO_IOPORT_MAP
> >  config FPU
> > def_bool n
> > 
> > -config TRACE_IRQFLAGS_SUPPORT
> > -   def_bool n
> > -
> >  menu "Kernel features"
> > 
> >  source "kernel/Kconfig.hz"
> > diff --git a/arch/nios2/Kconfig.debug b/arch/nios2/Kconfig.debug
> > index f1da8a7b17ff..a8bc06e96ef5 100644
> > --- a/arch/nios2/Kconfig.debug
> > +++ b/arch/nios2/Kconfig.debug
> > @@ -1,8 +1,5 @@
> >  # SPDX-License-Identifier: GPL-2.0
> > 
> > -config TRACE_IRQFLAGS_SUPPORT
> > -   def_bool y
> > -
> >  config EARLY_PRINTK
> > bool "Activate early kernel debugging"
> > default y
> --
> Best Regards
> Masahiro Yamada
> 
> 
> 
> Confidentiality Notice.
> This message may contain information that is confidential or
> otherwise protected from disclosure. If you are not the intended
> recipient, you are hereby notified that any use, disclosure,
> dissemination, distribution, or copying of this message, or any
> attachments, is strictly prohibited. If you have received this
> message in error, please advise the sender by reply e-mail, and
> delete the message and any attachments. Thank you.


Re: [PATCH 05/11] tracing: consolidate the TRACE_IRQFLAGS_SUPPORT symbol

2019-02-14 Thread Masahiro Yamada
+CC: Ley Foon Tan 
+CC: nios2-...@lists.rocketboards.org


On Thu, Feb 14, 2019 at 2:40 AM Christoph Hellwig  wrote:

> diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
> index 715e6c09b4a5..3b50689007f5 100644
> --- a/arch/nios2/Kconfig
> +++ b/arch/nios2/Kconfig
> @@ -20,6 +20,7 @@ config NIOS2
> select OF_EARLY_FLATTREE
> select SOC_BUS
> select SPARSE_IRQ
> +   select TRACE_IRQFLAGS_SUPPORT


This is a behavior change of nios2.

TRACE_IRQFLAGS_SUPPORT was previously 'n',
and this commit is changing it to 'y'.




Strangely, nios2 defines TRACE_IRQFLAGS_SUPPORT twice
with different default values.

In Kconfig, the first one becomes effective.

In this case, 'def_bool n' in arch/nios2/Kconfig is used.
'def_bool y' in arch/nios2/Kconfig.debug is dead code.


I think this select should be dropped
to keep the current behavior,
but I hope the NIOS2 maintainer will give us
some comments just in case.




> select USB_ARCH_HAS_HCD if USB_SUPPORT
> select CPU_NO_EFFICIENT_FFS
> select ARCH_DISCARD_MEMBLOCK
> @@ -39,9 +40,6 @@ config NO_IOPORT_MAP
>  config FPU
> def_bool n
>
> -config TRACE_IRQFLAGS_SUPPORT
> -   def_bool n
> -
>  menu "Kernel features"
>
>  source "kernel/Kconfig.hz"
> diff --git a/arch/nios2/Kconfig.debug b/arch/nios2/Kconfig.debug
> index f1da8a7b17ff..a8bc06e96ef5 100644
> --- a/arch/nios2/Kconfig.debug
> +++ b/arch/nios2/Kconfig.debug
> @@ -1,8 +1,5 @@
>  # SPDX-License-Identifier: GPL-2.0
>
> -config TRACE_IRQFLAGS_SUPPORT
> -   def_bool y
> -
>  config EARLY_PRINTK
> bool "Activate early kernel debugging"
> default y

--
Best Regards
Masahiro Yamada


[PATCH 05/11] tracing: consolidate the TRACE_IRQFLAGS_SUPPORT symbol

2019-02-13 Thread Christoph Hellwig
Add one definition to kernel/trace/Kconfig and let the architectures
select if it supported.

Signed-off-by: Christoph Hellwig 
---
 arch/arc/Kconfig  | 4 +---
 arch/arm/Kconfig  | 5 +
 arch/arm64/Kconfig| 4 +---
 arch/csky/Kconfig | 4 +---
 arch/hexagon/Kconfig  | 4 +---
 arch/microblaze/Kconfig   | 1 +
 arch/microblaze/Kconfig.debug | 2 --
 arch/mips/Kconfig | 1 +
 arch/mips/Kconfig.debug   | 4 
 arch/nds32/Kconfig| 4 +---
 arch/nios2/Kconfig| 4 +---
 arch/nios2/Kconfig.debug  | 3 ---
 arch/openrisc/Kconfig | 4 +---
 arch/parisc/Kconfig   | 1 +
 arch/parisc/Kconfig.debug | 2 --
 arch/powerpc/Kconfig  | 5 +
 arch/riscv/Kconfig| 4 +---
 arch/s390/Kconfig | 1 +
 arch/s390/Kconfig.debug   | 3 ---
 arch/sh/Kconfig   | 1 +
 arch/sh/Kconfig.debug | 3 ---
 arch/sparc/Kconfig| 1 +
 arch/sparc/Kconfig.debug  | 4 
 arch/um/Kconfig   | 5 +
 arch/x86/Kconfig  | 1 +
 arch/x86/Kconfig.debug| 3 ---
 arch/xtensa/Kconfig   | 4 +---
 kernel/trace/Kconfig  | 3 +++
 28 files changed, 22 insertions(+), 63 deletions(-)

diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index e8e3776fc5fa..065fbd55dcc4 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -49,13 +49,11 @@ config ARC
select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING
select STACKTRACE_SUPPORT
select STACKTRACE
+   select TRACE_IRQFLAGS_SUPPORT
 
 config ARCH_HAS_CACHE_LINE_SIZE
def_bool y
 
-config TRACE_IRQFLAGS_SUPPORT
-   def_bool y
-
 config LOCKDEP_SUPPORT
def_bool y
 
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 68a891f3ffa0..1995e1b24506 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -111,6 +111,7 @@ config ARM
select RWSEM_XCHGADD_ALGORITHM
select STACKTRACE_SUPPORT
select SYS_SUPPORTS_APM_EMULATION
+   select TRACE_IRQFLAGS_SUPPORT if !CPU_V7M
# Above selects are sorted alphabetically; please add new ones
# according to that.  Thanks.
help
@@ -170,10 +171,6 @@ config LOCKDEP_SUPPORT
bool
default y
 
-config TRACE_IRQFLAGS_SUPPORT
-   bool
-   default !CPU_V7M
-
 config ARCH_HAS_ILOG2_U32
bool
 
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index a6a0bb868369..ecbe481ce064 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -176,6 +176,7 @@ config ARM64
select SWIOTLB
select SYSCTL_EXCEPTION_TRACE
select THREAD_INFO_IN_TASK
+   select TRACE_IRQFLAGS_SUPPORT
help
  ARM 64-bit (AArch64) Linux support.
 
@@ -234,9 +235,6 @@ config ILLEGAL_POINTER_VALUE
 config LOCKDEP_SUPPORT
def_bool y
 
-config TRACE_IRQFLAGS_SUPPORT
-   def_bool y
-
 config GENERIC_BUG
def_bool y
depends on BUG
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index 90279a11fcf7..3c3de7ac95bf 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -46,6 +46,7 @@ config CSKY
select PERF_USE_VMALLOC if CPU_CK610
select RTC_LIB
select TIMER_OF
+   select TRACE_IRQFLAGS_SUPPORT
select USB_ARCH_HAS_EHCI
select USB_ARCH_HAS_OHCI
 
@@ -99,9 +100,6 @@ config STACKTRACE_SUPPORT
 config TIME_LOW_RES
def_bool y
 
-config TRACE_IRQFLAGS_SUPPORT
-   def_bool y
-
 config CPU_TLB_SIZE
int
default "128"   if (CPU_CK610 || CPU_CK807 || CPU_CK810)
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 615693b62ea0..b6c3111ec5f9 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -33,6 +33,7 @@ config HEXAGON
select MODULES_USE_ELF_RELA
select GENERIC_CPU_DEVICES
select RWSEM_XCHGADD_ALGORITHM
+   select TRACE_IRQFLAGS_SUPPORT
---help---
  Qualcomm Hexagon is a processor architecture designed for high
  performance and low power across a wide variety of applications.
@@ -54,9 +55,6 @@ config EARLY_PRINTK
 config MMU
def_bool y
 
-config TRACE_IRQFLAGS_SUPPORT
-   def_bool y
-
 config GENERIC_CSUM
def_bool y
 
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index ecccf8651caa..238f8b410331 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -38,6 +38,7 @@ config MICROBLAZE
select PCI_DOMAINS_GENERIC if PCI
select PCI_SYSCALL if PCI
select STACKTRACE_SUPPORT
+   select TRACE_IRQFLAGS_SUPPORT
select TRACING_SUPPORT
select VIRT_TO_BUS
select CPU_NO_EFFICIENT_FFS
diff --git a/arch/microblaze/Kconfig.debug b/arch/microblaze/Kconfig.debug
index dc2e3c45e8a2..617df4f48a5d 100644
--- a/arch/microblaze/Kconfig.debug
+++ b/arch/microblaze/Kconfig.debug
@@ -1,5 +1,3 @@
 # For a description of the syntax of this configuration file,
 # see