All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Gao Xiang <xiang@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Sascha Hauer <kernel@pengutronix.de>
Subject: Re: [RFC PATCH 3/3] decompress/keepalive.h: add config option for toggling a set of bits
Date: Thu, 24 Oct 2019 14:17:15 +0200	[thread overview]
Message-ID: <CACRpkdYpnX0JMT9tG8AYhRQiXo90GJoF_J8c6f+KoWKvZmyj-g@mail.gmail.com> (raw)
In-Reply-To: <20191017114906.30302-4-linux@rasmusvillemoes.dk>

On Thu, Oct 17, 2019 at 1:49 PM Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:

> +config DECOMPRESS_KEEPALIVE_TOGGLE_REG
> +       hex "Address of register to modify while decompressing"
> +       help
> +         Set this to a physical address of a 32-bit memory word to
> +         modify while decompressing.
> +
> +config DECOMPRESS_KEEPALIVE_TOGGLE_MASK
> +       hex "Bit mask to toggle while decompressing"
> +       help
> +         The register selected above will periodically be xor'ed with
> +         this value during decompression.

I would not allow users to store these vital hex values in their
defconfig and other unsafe places. Instead follow the pattern from
arch/arm/Kconfig.debug for storing the DEBUG_UART_PHYS:

config DEBUG_UART_PHYS
        hex "Physical base address of debug UART"
        default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0
        default 0x01c28000 if DEBUG_SUNXI_UART0
        default 0x01c28400 if DEBUG_SUNXI_UART1
....
i.e. make sure to provide the right default values. We probably
need at least one example for others to follow.

Maybe this is your plan, I don't know, wanted to point it out
anyways.

Yours,
Linus Walleij

WARNING: multiple messages have this Message-ID (diff)
From: Linus Walleij <linus.walleij@linaro.org>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Sascha Hauer <kernel@pengutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Gao Xiang <xiang@kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH 3/3] decompress/keepalive.h: add config option for toggling a set of bits
Date: Thu, 24 Oct 2019 14:17:15 +0200	[thread overview]
Message-ID: <CACRpkdYpnX0JMT9tG8AYhRQiXo90GJoF_J8c6f+KoWKvZmyj-g@mail.gmail.com> (raw)
In-Reply-To: <20191017114906.30302-4-linux@rasmusvillemoes.dk>

On Thu, Oct 17, 2019 at 1:49 PM Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:

> +config DECOMPRESS_KEEPALIVE_TOGGLE_REG
> +       hex "Address of register to modify while decompressing"
> +       help
> +         Set this to a physical address of a 32-bit memory word to
> +         modify while decompressing.
> +
> +config DECOMPRESS_KEEPALIVE_TOGGLE_MASK
> +       hex "Bit mask to toggle while decompressing"
> +       help
> +         The register selected above will periodically be xor'ed with
> +         this value during decompression.

I would not allow users to store these vital hex values in their
defconfig and other unsafe places. Instead follow the pattern from
arch/arm/Kconfig.debug for storing the DEBUG_UART_PHYS:

config DEBUG_UART_PHYS
        hex "Physical base address of debug UART"
        default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0
        default 0x01c28000 if DEBUG_SUNXI_UART0
        default 0x01c28400 if DEBUG_SUNXI_UART1
....
i.e. make sure to provide the right default values. We probably
need at least one example for others to follow.

Maybe this is your plan, I don't know, wanted to point it out
anyways.

Yours,
Linus Walleij

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

  reply	other threads:[~2019-10-24 12:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 11:49 [RFC PATCH 0/3] watchdog servicing during decompression Rasmus Villemoes
2019-10-17 11:49 ` Rasmus Villemoes
2019-10-17 11:49 ` [RFC PATCH 1/3] decompress/keepalive.h: prepare for watchdog keepalive during kernel decompression Rasmus Villemoes
2019-10-17 11:49   ` Rasmus Villemoes
2019-10-17 11:49 ` [RFC PATCH 2/3] lib: lz4: wire up watchdog keepalive during decompression Rasmus Villemoes
2019-10-17 11:49   ` Rasmus Villemoes
2019-10-17 11:49 ` [RFC PATCH 3/3] decompress/keepalive.h: add config option for toggling a set of bits Rasmus Villemoes
2019-10-17 11:49   ` Rasmus Villemoes
2019-10-24 12:17   ` Linus Walleij [this message]
2019-10-24 12:17     ` Linus Walleij
2019-10-24 13:45     ` Rasmus Villemoes
2019-10-24 13:45       ` Rasmus Villemoes
2019-10-17 12:03 ` [RFC PATCH 0/3] watchdog servicing during decompression Russell King - ARM Linux admin
2019-10-17 12:03   ` Russell King - ARM Linux admin
2019-10-17 12:34   ` Rasmus Villemoes
2019-10-17 12:34     ` Rasmus Villemoes
2019-10-17 12:48     ` Russell King - ARM Linux admin
2019-10-17 12:48       ` Russell King - ARM Linux admin
2019-10-24 12:38     ` Linus Walleij
2019-10-24 12:38       ` Linus Walleij

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=CACRpkdYpnX0JMT9tG8AYhRQiXo90GJoF_J8c6f+KoWKvZmyj-g@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=xiang@kernel.org \
    --cc=yamada.masahiro@socionext.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.