All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Will Deacon <will.deacon@arm.com>,
	Jason Baron <jbaron@akamai.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	clang-built-linux@googlegroups.com
Subject: Re: [PATCH 09/10] arm64: select DYNAMIC_DEBUG_RELATIVE_POINTERS
Date: Fri, 26 Apr 2019 11:39:12 +0200	[thread overview]
Message-ID: <CAK8P3a1by1-ZF2NoTdGbxv+AJu92d3Sp5L08BhLCA+0PNS8s2Q@mail.gmail.com> (raw)
In-Reply-To: <20190409212517.7321-10-linux@rasmusvillemoes.dk>

On Tue, Apr 9, 2019 at 11:26 PM Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:
>
> Similar to GENERIC_BUG_RELATIVE_POINTERS, one can now relativize the
> four const char* members of struct _ddebug, thus saving 16 bytes per
> instance (one for each pr_debug(), dev_debug() etc. in a
> CONFIG_DYNAMIC_DEBUG kernel). The asm-generic implementation seems to
> work out-of-the-box, though this is only compile-tested.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

This causes a build regression when compiling with clang,
see http://staging-storage.kernelci.org/next-clang/master/next-20190424/arm64/allmodconfig/clang-8/build.log

../init/initramfs.c:477:3: error: invalid operand in inline asm:
'.ifndef __UNIQUE_ID_ddebug18.pushsection __verbose,"aw".type
__UNIQUE_ID_ddebug18, STT_OBJECT.size __UNIQUE_ID_ddebug18,
${5:c}1:__UNIQUE_ID_ddebug18: .int ${0:c} - 1b /*
_ddebug::modname_disp */ .int ${1:c} - 1b /* _ddebug::function_disp */
.int ${2:c} - 1b /* _ddebug::filename_disp */ .int ${3:c} - 1b /*
_ddebug::format_disp */ .int ${4:c}      /* _ddebug::flags_lineno */
.org 1b+${5:c}.popsection.set __UNIQUE_ID_ddebug18.ddebug.once,
${6:c}.elseif __UNIQUE_ID_ddebug18.ddebug.once - ${6:c}.line 477 -
1.error "'__UNIQUE_ID_ddebug18' used as _ddebug identifier more than
once".endif'
                pr_debug("Detected %s compressed data\n", compress_name);
                ^
../include/linux/printk.h:336:2: note: expanded from macro 'pr_debug'
        dynamic_pr_debug(fmt, ##__VA_ARGS__)
        ^
../include/linux/dynamic_debug.h:158:2: note: expanded from macro
'dynamic_pr_debug'
        _dynamic_func_call(fmt, __dynamic_pr_debug,             \
        ^
../include/linux/dynamic_debug.h:148:2: note: expanded from macro
'_dynamic_func_call'
        __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
        ^
../include/linux/dynamic_debug.h:128:2: note: expanded from macro
'__dynamic_func_call'
        DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt);         \
        ^
../include/asm-generic/dynamic_debug.h:92:15: note: expanded from
macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
        asm volatile(".ifndef " __stringify(name) "\n"                  \
                     ^

I assume the same thing happens on the other architectures as well.

        Arnd

> ---
>  arch/arm64/Kconfig            | 1 +
>  arch/arm64/include/asm/Kbuild | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 7e34b9eba5de..d0871d523d5d 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -83,6 +83,7 @@ config ARM64
>         select CRC32
>         select DCACHE_WORD_ACCESS
>         select DMA_DIRECT_REMAP
> +       select DYNAMIC_DEBUG_RELATIVE_POINTERS
>         select EDAC_SUPPORT
>         select FRAME_POINTER
>         select GENERIC_ALLOCATOR
> diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild
> index 1e17ea5c372b..1ead0d645686 100644
> --- a/arch/arm64/include/asm/Kbuild
> +++ b/arch/arm64/include/asm/Kbuild
> @@ -3,6 +3,7 @@ generic-y += delay.h
>  generic-y += div64.h
>  generic-y += dma.h
>  generic-y += dma-contiguous.h
> +generic-y += dynamic_debug.h
>  generic-y += early_ioremap.h
>  generic-y += emergency-restart.h
>  generic-y += hw_irq.h
> --
> 2.20.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Will Deacon <will.deacon@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	clang-built-linux@googlegroups.com,
	Jason Baron <jbaron@akamai.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 09/10] arm64: select DYNAMIC_DEBUG_RELATIVE_POINTERS
Date: Fri, 26 Apr 2019 11:39:12 +0200	[thread overview]
Message-ID: <CAK8P3a1by1-ZF2NoTdGbxv+AJu92d3Sp5L08BhLCA+0PNS8s2Q@mail.gmail.com> (raw)
In-Reply-To: <20190409212517.7321-10-linux@rasmusvillemoes.dk>

On Tue, Apr 9, 2019 at 11:26 PM Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:
>
> Similar to GENERIC_BUG_RELATIVE_POINTERS, one can now relativize the
> four const char* members of struct _ddebug, thus saving 16 bytes per
> instance (one for each pr_debug(), dev_debug() etc. in a
> CONFIG_DYNAMIC_DEBUG kernel). The asm-generic implementation seems to
> work out-of-the-box, though this is only compile-tested.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

This causes a build regression when compiling with clang,
see http://staging-storage.kernelci.org/next-clang/master/next-20190424/arm64/allmodconfig/clang-8/build.log

../init/initramfs.c:477:3: error: invalid operand in inline asm:
'.ifndef __UNIQUE_ID_ddebug18.pushsection __verbose,"aw".type
__UNIQUE_ID_ddebug18, STT_OBJECT.size __UNIQUE_ID_ddebug18,
${5:c}1:__UNIQUE_ID_ddebug18: .int ${0:c} - 1b /*
_ddebug::modname_disp */ .int ${1:c} - 1b /* _ddebug::function_disp */
.int ${2:c} - 1b /* _ddebug::filename_disp */ .int ${3:c} - 1b /*
_ddebug::format_disp */ .int ${4:c}      /* _ddebug::flags_lineno */
.org 1b+${5:c}.popsection.set __UNIQUE_ID_ddebug18.ddebug.once,
${6:c}.elseif __UNIQUE_ID_ddebug18.ddebug.once - ${6:c}.line 477 -
1.error "'__UNIQUE_ID_ddebug18' used as _ddebug identifier more than
once".endif'
                pr_debug("Detected %s compressed data\n", compress_name);
                ^
../include/linux/printk.h:336:2: note: expanded from macro 'pr_debug'
        dynamic_pr_debug(fmt, ##__VA_ARGS__)
        ^
../include/linux/dynamic_debug.h:158:2: note: expanded from macro
'dynamic_pr_debug'
        _dynamic_func_call(fmt, __dynamic_pr_debug,             \
        ^
../include/linux/dynamic_debug.h:148:2: note: expanded from macro
'_dynamic_func_call'
        __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
        ^
../include/linux/dynamic_debug.h:128:2: note: expanded from macro
'__dynamic_func_call'
        DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt);         \
        ^
../include/asm-generic/dynamic_debug.h:92:15: note: expanded from
macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
        asm volatile(".ifndef " __stringify(name) "\n"                  \
                     ^

I assume the same thing happens on the other architectures as well.

        Arnd

> ---
>  arch/arm64/Kconfig            | 1 +
>  arch/arm64/include/asm/Kbuild | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 7e34b9eba5de..d0871d523d5d 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -83,6 +83,7 @@ config ARM64
>         select CRC32
>         select DCACHE_WORD_ACCESS
>         select DMA_DIRECT_REMAP
> +       select DYNAMIC_DEBUG_RELATIVE_POINTERS
>         select EDAC_SUPPORT
>         select FRAME_POINTER
>         select GENERIC_ALLOCATOR
> diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild
> index 1e17ea5c372b..1ead0d645686 100644
> --- a/arch/arm64/include/asm/Kbuild
> +++ b/arch/arm64/include/asm/Kbuild
> @@ -3,6 +3,7 @@ generic-y += delay.h
>  generic-y += div64.h
>  generic-y += dma.h
>  generic-y += dma-contiguous.h
> +generic-y += dynamic_debug.h
>  generic-y += early_ioremap.h
>  generic-y += emergency-restart.h
>  generic-y += hw_irq.h
> --
> 2.20.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-04-26  9:39 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 21:25 [PATCH 00/10] implement DYNAMIC_DEBUG_RELATIVE_POINTERS Rasmus Villemoes
2019-04-09 21:25 ` Rasmus Villemoes
2019-04-09 21:25 ` Rasmus Villemoes
2019-04-09 21:25 ` [PATCH 01/10] linux/device.h: use unique identifier for each struct _ddebug Rasmus Villemoes
2019-04-09 21:25 ` [PATCH 02/10] linux/net.h: " Rasmus Villemoes
2019-04-09 21:25 ` [PATCH 03/10] linux/printk.h: " Rasmus Villemoes
2019-04-09 21:25 ` [PATCH 04/10] dynamic_debug: introduce accessors for string members of " Rasmus Villemoes
2019-04-09 21:25 ` [PATCH 05/10] dynamic_debug: drop use of bitfields in " Rasmus Villemoes
2019-04-09 21:25 ` [PATCH 06/10] dynamic_debug: introduce CONFIG_DYNAMIC_DEBUG_RELATIVE_POINTERS Rasmus Villemoes
2019-04-09 21:25 ` [PATCH 07/10] dynamic_debug: add asm-generic implementation for DYNAMIC_DEBUG_RELATIVE_POINTERS Rasmus Villemoes
2019-04-09 21:25   ` Rasmus Villemoes
2019-04-09 21:25   ` Rasmus Villemoes
2019-04-09 21:25 ` [PATCH 08/10] x86-64: select DYNAMIC_DEBUG_RELATIVE_POINTERS Rasmus Villemoes
2019-04-10  7:31   ` Ingo Molnar
2019-04-09 21:25 ` [PATCH 09/10] arm64: " Rasmus Villemoes
2019-04-09 21:25   ` Rasmus Villemoes
2019-04-26  9:39   ` Arnd Bergmann [this message]
2019-04-26  9:39     ` Arnd Bergmann
2019-04-26 10:05     ` Rasmus Villemoes
2019-04-26 10:05       ` Rasmus Villemoes
2019-04-26 13:00       ` Nathan Chancellor
2019-04-26 13:00         ` Nathan Chancellor
2019-04-26 19:06         ` [PATCH 11/10] arm64: unbreak DYNAMIC_DEBUG=y build with clang Rasmus Villemoes
2019-04-26 19:06           ` Rasmus Villemoes
2019-04-26 19:06           ` [PATCH 12/10] powerpc: " Rasmus Villemoes
2019-04-26 19:06             ` Rasmus Villemoes
2019-04-29 17:34             ` Nick Desaulniers
2019-04-29 17:34               ` Nick Desaulniers
2019-04-26 19:27           ` [PATCH 11/10] arm64: " Rasmus Villemoes
2019-04-26 19:27             ` Rasmus Villemoes
2019-04-26 21:58             ` Konstantin Ryabitsev
2019-04-26 21:58               ` Konstantin Ryabitsev
2019-04-26 22:07             ` Konstantin Ryabitsev
2019-04-26 22:07               ` Konstantin Ryabitsev
2019-04-29 17:32           ` Nick Desaulniers
2019-04-29 17:32             ` Nick Desaulniers
2019-04-30 18:22             ` Nick Desaulniers
2019-04-30 18:22               ` Nick Desaulniers
2019-05-02  8:57               ` Rasmus Villemoes
2019-05-02  8:57                 ` Rasmus Villemoes
2019-04-09 21:25 ` [PATCH 10/10] powerpc: select DYNAMIC_DEBUG_RELATIVE_POINTERS for PPC64 Rasmus Villemoes
2019-04-09 21:25   ` Rasmus Villemoes
2019-04-23 15:37   ` Christophe Leroy
2019-04-23 19:36     ` Andrew Morton
2019-04-23 19:36       ` Andrew Morton
2019-04-24  6:46       ` Rasmus Villemoes
2019-04-24  6:46         ` Rasmus Villemoes
2019-05-06  6:48 ` [PATCH 00/10] implement DYNAMIC_DEBUG_RELATIVE_POINTERS Rasmus Villemoes
2019-05-06  6:48   ` Rasmus Villemoes
2019-05-06  6:48   ` Rasmus Villemoes
2019-05-06  7:05   ` Ingo Molnar
2019-05-06  7:05     ` Ingo Molnar
2019-05-06  7:05     ` Ingo Molnar
2019-05-06  7:34     ` Rasmus Villemoes
2019-05-06  7:34       ` Rasmus Villemoes
2019-05-06  7:34       ` Rasmus Villemoes
2019-05-06  7:48       ` Ingo Molnar
2019-05-06  7:48         ` Ingo Molnar
2019-05-06  7:48         ` Ingo Molnar
2019-05-06 14:48       ` Segher Boessenkool
2019-05-06 14:48         ` Segher Boessenkool
2019-05-06 14:48         ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK8P3a1by1-ZF2NoTdGbxv+AJu92d3Sp5L08BhLCA+0PNS8s2Q@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jbaron@akamai.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.