All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Sam Protsenko <semen.protsenko@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jaewon Kim <jaewon02.kim@samsung.com>,
	Chanho Park <chanho61.park@samsung.com>,
	David Virag <virag.david003@gmail.com>,
	Youngmin Nam <youngmin.nam@samsung.com>,
	devicetree@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH v3 5/5] tty: serial: samsung: Fix console registration from module
Date: Mon, 13 Dec 2021 12:39:24 +0100	[thread overview]
Message-ID: <fbadbd75-ac68-fa06-9303-76892567d179@canonical.com> (raw)
In-Reply-To: <20211204195757.8600-6-semen.protsenko@linaro.org>

On 04/12/2021 20:57, Sam Protsenko wrote:
> On modern Exynos SoCs (like Exynos850) the UART can be implemented as a
> part of USI IP-core. In such case, USI driver is used to initialize USI
> registers, and it also calls of_platform_populate() to instantiate all
> sub-nodes (e.g. serial node) of USI node. When serial driver is
> built-in, but USI driver is a module, and CONFIG_SERIAL_SAMSUNG_CONSOLE
> is enabled, next call chain will happen when loading USI module from
> user space:
> 
>     usi_init
>       v
>     usi_probe
>       v
>     of_platform_populate
>       v
>     s3c24xx_serial_probe
>       v
>     uart_add_one_port
>       v
>     uart_configure_port
>       v
>     register_console
>       v
>     try_enable_new_console
>       v
>     s3c24xx_serial_console_setup
> 
> But because the serial driver is built-in, and
> s3c24xx_serial_console_setup() is marked with __init keyword, that
> symbol will discarded and long gone by that time already, causing failed
> paging request.
> 
> That happens during the next config combination:
> 
>     EXYNOS_USI=m
>     SERIAL_SAMSUNG=y
>     SERIAL_SAMSUNG_CONSOLE=y
> 
> That config should be completely possible, so rather than limiting
> SERIAL_SAMSUNG choice to "m" only when USI=m, remove __init keyword for
> all affected functions.
> 
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
> Changes in v3:
>   - (none)
> 
> Changes in v2:
>   - This patch is added in v2
> 
>  drivers/tty/serial/samsung_tty.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Sam Protsenko <semen.protsenko@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jaewon Kim <jaewon02.kim@samsung.com>,
	Chanho Park <chanho61.park@samsung.com>,
	David Virag <virag.david003@gmail.com>,
	Youngmin Nam <youngmin.nam@samsung.com>,
	devicetree@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH v3 5/5] tty: serial: samsung: Fix console registration from module
Date: Mon, 13 Dec 2021 12:39:24 +0100	[thread overview]
Message-ID: <fbadbd75-ac68-fa06-9303-76892567d179@canonical.com> (raw)
In-Reply-To: <20211204195757.8600-6-semen.protsenko@linaro.org>

On 04/12/2021 20:57, Sam Protsenko wrote:
> On modern Exynos SoCs (like Exynos850) the UART can be implemented as a
> part of USI IP-core. In such case, USI driver is used to initialize USI
> registers, and it also calls of_platform_populate() to instantiate all
> sub-nodes (e.g. serial node) of USI node. When serial driver is
> built-in, but USI driver is a module, and CONFIG_SERIAL_SAMSUNG_CONSOLE
> is enabled, next call chain will happen when loading USI module from
> user space:
> 
>     usi_init
>       v
>     usi_probe
>       v
>     of_platform_populate
>       v
>     s3c24xx_serial_probe
>       v
>     uart_add_one_port
>       v
>     uart_configure_port
>       v
>     register_console
>       v
>     try_enable_new_console
>       v
>     s3c24xx_serial_console_setup
> 
> But because the serial driver is built-in, and
> s3c24xx_serial_console_setup() is marked with __init keyword, that
> symbol will discarded and long gone by that time already, causing failed
> paging request.
> 
> That happens during the next config combination:
> 
>     EXYNOS_USI=m
>     SERIAL_SAMSUNG=y
>     SERIAL_SAMSUNG_CONSOLE=y
> 
> That config should be completely possible, so rather than limiting
> SERIAL_SAMSUNG choice to "m" only when USI=m, remove __init keyword for
> all affected functions.
> 
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
> Changes in v3:
>   - (none)
> 
> Changes in v2:
>   - This patch is added in v2
> 
>  drivers/tty/serial/samsung_tty.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

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

  reply	other threads:[~2021-12-13 11:39 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20211204195806epcas2p15410815b695603ef2429fc55730ddb21@epcas2p1.samsung.com>
2021-12-04 19:57 ` [PATCH v3 0/5] soc: samsung: Add USI driver Sam Protsenko
2021-12-04 19:57   ` Sam Protsenko
2021-12-04 19:57   ` [PATCH v3 1/5] dt-bindings: soc: samsung: Add Exynos USI bindings Sam Protsenko
2021-12-04 19:57     ` Sam Protsenko
2021-12-06 21:02     ` Rob Herring
2021-12-06 21:02       ` Rob Herring
2021-12-13 11:12     ` (subset) " Krzysztof Kozlowski
2021-12-13 11:12       ` Krzysztof Kozlowski
2021-12-04 19:57   ` [PATCH v3 2/5] soc: samsung: Add USI driver Sam Protsenko
2021-12-04 19:57     ` Sam Protsenko
2021-12-13 11:12     ` (subset) " Krzysztof Kozlowski
2021-12-13 11:12       ` Krzysztof Kozlowski
2021-12-04 19:57   ` [PATCH v3 3/5] tty: serial: samsung: Remove USI initialization Sam Protsenko
2021-12-04 19:57     ` Sam Protsenko
2021-12-13 11:00     ` Krzysztof Kozlowski
2021-12-13 11:00       ` Krzysztof Kozlowski
2021-12-13 11:31       ` Sam Protsenko
2021-12-13 11:31         ` Sam Protsenko
2021-12-13 11:33         ` Krzysztof Kozlowski
2021-12-13 11:33           ` Krzysztof Kozlowski
2021-12-13 11:35     ` Krzysztof Kozlowski
2021-12-13 11:35       ` Krzysztof Kozlowski
2021-12-20 15:21       ` Sam Protsenko
2021-12-20 15:21         ` Sam Protsenko
2021-12-20 15:55         ` Greg Kroah-Hartman
2021-12-20 15:55           ` Greg Kroah-Hartman
2021-12-04 19:57   ` [PATCH v3 4/5] tty: serial: samsung: Enable console as module Sam Protsenko
2021-12-04 19:57     ` Sam Protsenko
2021-12-13 11:35     ` Krzysztof Kozlowski
2021-12-13 11:35       ` Krzysztof Kozlowski
2021-12-04 19:57   ` [PATCH v3 5/5] tty: serial: samsung: Fix console registration from module Sam Protsenko
2021-12-04 19:57     ` Sam Protsenko
2021-12-13 11:39     ` Krzysztof Kozlowski [this message]
2021-12-13 11:39       ` Krzysztof Kozlowski
2021-12-05 16:24   ` [PATCH v3 0/5] soc: samsung: Add USI driver Krzysztof Kozlowski
2021-12-05 16:24     ` Krzysztof Kozlowski
2021-12-06 18:23     ` Krzysztof Kozlowski
2021-12-06 18:23       ` Krzysztof Kozlowski
2021-12-08  9:13       ` Chanho Park
2021-12-08  9:13         ` Chanho Park
2021-12-08  9:15   ` Chanho Park
2021-12-08  9:15     ` Chanho Park

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=fbadbd75-ac68-fa06-9303-76892567d179@canonical.com \
    --to=krzysztof.kozlowski@canonical.com \
    --cc=chanho61.park@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jaewon02.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=semen.protsenko@linaro.org \
    --cc=virag.david003@gmail.com \
    --cc=youngmin.nam@samsung.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.