Skip to contentSkip to conversation

next/pending-fixes bisection: baseline.login on mt8173-elm-hana

DISCUSSION Mark Brown 5 participants 6 messages May 9, 2022 – Jun 1, 2022 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mark Brown

author
#1 lore raw

On Mon, May 09, 2022 at 09:12:51AM -0700, KernelCI bot wrote:

The KernelCI bisection bot found a boot regression on mt8173-elm-hana which bisected to 6f81fdded0d02 ("serial: 8250_mtk: Make sure to select the right FEATURE_SEL"). With the patch the output terminates at:

<6>[    0.763969] EINJ: ACPI disabled.
<6>[    0.789312] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
<6>[    0.798321] printk: console [ttyS0] disabled
<6>[    0.823022] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 251, base_baud = 1625000) is a 16550A

with a stream of ^@s following.

I've included the full bisection report, including links to more info like full logs and a Reported-by tag from the bot below:

Quoted 116 lines

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* This automated bisection report was sent to you on the basis  *
* that you may be involved with the breaking commit it has      *
* found.  No manual investigation has been done to verify it,   *
* and the root cause of the problem may be somewhere else.      *
*                                                               *
* If you do send a fix, please include this trailer:            *
*   Reported-by: "kernelci.org bot" <[email protected]>          *
*                                                               *
* Hope this helps!                                              *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

next/pending-fixes bisection: baseline.login on mt8173-elm-hana

Summary:

  Start:      a42b168a3ce2c Merge branch 'for-linux-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc
  Plain log:  https://storage.kernelci.org/next/pending-fixes/v5.18-rc6-166-ga42b168a3ce2/arm64/defconfig+arm64-chromebook/gcc-10/lab-collabora/baseline-mt8173-elm-hana.txt
  HTML log:   https://storage.kernelci.org/next/pending-fixes/v5.18-rc6-166-ga42b168a3ce2/arm64/defconfig+arm64-chromebook/gcc-10/lab-collabora/baseline-mt8173-elm-hana.html
  Result:     6f81fdded0d02 serial: 8250_mtk: Make sure to select the right FEATURE_SEL

Checks:
revert: PASS
verify: PASS

Parameters:

  Tree:       next
  URL:        https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
  Branch:     pending-fixes
  Target:     mt8173-elm-hana
  CPU arch:   arm64
  Lab:        lab-collabora
  Compiler:   gcc-10
  Config:     defconfig+arm64-chromebook
  Test case:  baseline.login

Breaking commit found:

-------------------------------------------------------------------------------
commit 6f81fdded0d024c7d4084d434764f30bca1cd6b1

Author: AngeloGioacchino Del Regno <[email protected]>
Date:   Wed Apr 27 15:23:27 2022 +0200

serial: 8250_mtk: Make sure to select the right FEATURE_SEL

Set the FEATURE_SEL at probe time to make sure that BIT(0) is enabled:
this guarantees that when the port is configured as AP UART, the right register layout is interpreted by the UART IP.

drivers/tty/serial/8250/8250_mtk.c +7 -1
index cd62a5f340149..28e36459642ce 100644
@@ -54,6 +54,9 @@
 #define MTK_UART_TX_TRIGGER	1
 #define MTK_UART_RX_TRIGGER	MTK_UART_RX_SIZE
 
+#define MTK_UART_FEATURE_SEL	39	/* Feature Selection register */
+#define MTK_UART_FEAT_NEWRMAP	BIT(0)	/* Use new register map */
+
 #ifdef CONFIG_SERIAL_8250_DMA
 enum dma_rx_status {
 	DMA_RX_START = 0,
@@ -569,6 +572,10 @@ static int mtk8250_probe(struct platform_device *pdev)
 		uart.dma = data->dma;
 #endif
 
+	/* Set AP UART new register map */
+	writel(MTK_UART_FEAT_NEWRMAP, uart.port.membase +
+	       (MTK_UART_FEATURE_SEL << uart.port.regshift));
+
 	/* Disable Rate Fix function */
 	writel(0x0, uart.port.membase +
 			(MTK_UART_RATE_FIX << uart.port.regshift));
-------------------------------------------------------------------------------

Git bisection log:

-------------------------------------------------------------------------------
git bisect start
# good: [c5eb0a61238dd6faf37f58c9ce61c9980aaffd7a] Linux 5.18-rc6
git bisect good c5eb0a61238dd6faf37f58c9ce61c9980aaffd7a
# bad: [a42b168a3ce2c4923d405814c81ef015aa5e6515] Merge branch 'for-linux-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc
git bisect bad a42b168a3ce2c4923d405814c81ef015aa5e6515
# bad: [d424caf55dd6da1f39787899d223b17b61bff74e] Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
git bisect bad d424caf55dd6da1f39787899d223b17b61bff74e
# good: [2ecea400e96eddd79295a717ce9a7ef71d9519c0] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
git bisect good 2ecea400e96eddd79295a717ce9a7ef71d9519c0
# good: [493e389da29b9df4898136e487b7217b277a0d2f] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
git bisect good 493e389da29b9df4898136e487b7217b277a0d2f
# good: [4e02910ec7a8c7d7608dd3d18169f92d04e40eac] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
git bisect good 4e02910ec7a8c7d7608dd3d18169f92d04e40eac
# bad: [edd5f60c340086891fab094ad61270d6c80f9ca4] tty: n_gsm: fix mux activation issues in gsm_config()
git bisect bad edd5f60c340086891fab094ad61270d6c80f9ca4
# bad: [6f81fdded0d024c7d4084d434764f30bca1cd6b1] serial: 8250_mtk: Make sure to select the right FEATURE_SEL
git bisect bad 6f81fdded0d024c7d4084d434764f30bca1cd6b1
# good: [bb0b197aadd928f52ce6f01f0ee977f0a08cf1be] serial: 8250_mtk: Fix UART_EFR register address
git bisect good bb0b197aadd928f52ce6f01f0ee977f0a08cf1be

# first bad commit: [6f81fdded0d024c7d4084d434764f30bca1cd6b1] serial: 8250_mtk: Make sure to select the right FEATURE_SEL
-------------------------------------------------------------------------------

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group. View/Reply Online (#26744): https://groups.io/g/kernelci-results/message/26744
Mute This Topic: https://groups.io/mt/90993243/1131744
Group Owner: [email protected]
Unsubscribe: https://groups.io/g/kernelci-results/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#2 lore raw
Quoted 5 lines · Mark Brown

On Mon, May 09, 2022 at 09:12:51AM -0700, KernelCI bot wrote:

The KernelCI bisection bot found a boot regression on mt8173-elm-hana which bisected to 6f81fdded0d02 ("serial: 8250_mtk: Make sure to select the right FEATURE_SEL"). With the patch the output terminates at:

There was also a similar report on mt8183-kukui-jacuzzi-juniper-sku16.

#3 lore raw

Il 09/05/22 20:16, Mark Brown ha scritto:

Quoted 8 lines · Mark Brown
Quoted 5 lines · KernelCI bot

The KernelCI bisection bot found a boot regression on mt8173-elm-hana which bisected to 6f81fdded0d02 ("serial: 8250_mtk: Make sure to select the right FEATURE_SEL"). With the patch the output terminates at:

There was also a similar report on mt8183-kukui-jacuzzi-juniper-sku16.

Strange, we tested it on another Kukui device and it didn't produce any issue...

Doubt is if it's just about the FEATURE_SEL register, as that may be protected and/or not exist on 8173?

I'm investigating that today.

Cheers,
Angelo

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#4 lore raw
Quoted 12 lines · AngeloGioacchino Del Regno

Il 09/05/22 20:16, Mark Brown ha scritto:

Quoted 8 lines · Mark Brown
Quoted 5 lines · KernelCI bot

The KernelCI bisection bot found a boot regression on mt8173-elm-hana which bisected to 6f81fdded0d02 ("serial: 8250_mtk: Make sure to select the right FEATURE_SEL"). With the patch the output terminates at:

There was also a similar report on mt8183-kukui-jacuzzi-juniper-sku16.

Quoted 6 lines

Strange, we tested it on another Kukui device and it didn't produce any issue...

Doubt is if it's just about the FEATURE_SEL register, as that may be protected and/or not exist on 8173?

I'm investigating that today.

Confirmed it regressed on MT8183 as well.

ChenYu

#5 lore raw

[BUG] mtk serial broken on mt7622 with 5.18.0

Hi,

i get a serial console hang on booting my mt7622 bananapi r64 with 5.18.0

[    0.591802] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.599915] printk: console [ttyS0] disabled
[    0.624563] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 126,

base_baud = 1562500) is a 16550A

git bisect points to this commit (cannot revert it alone)

6f81fdded0d024c7d4084d434764f30bca1cd6b1 is the first bad commit commit 6f81fdded0d024c7d4084d434764f30bca1cd6b1

Author: AngeloGioacchino Del Regno <[email protected]>
Date:   Wed Apr 27 15:23:27 2022 +0200

serial: 8250_mtk: Make sure to select the right FEATURE_SEL

Set the FEATURE_SEL at probe time to make sure that BIT(0) is enabled:
this guarantees that when the port is configured as AP UART, the right register layout is interpreted by the UART IP.

Signed-off-by: AngeloGioacchino Del Regno
<[email protected]>
Cc: stable <[email protected]>
Link:
https://lore.kernel.org/r/[email protected]

 drivers/tty/serial/8250/8250_mtk.c | 7 +++++++
 1 file changed, 7 insertions(+)

merged by 6811a466d27b "Merge tag 'tty-5.18-rc7'"

reverted these 2 commits works for me
e1bfdbc7daca 2022-04-27 serial: 8250_mtk: Fix register address for XON/XOFF character
6f81fdded0d0 2022-04-27 serial: 8250_mtk: Make sure to select the right FEATURE_SEL

have see this discussion [1], but can't manage to import mbox file to thunderbird yet

regards Frank

[1]
https://lore.kernel.org/linux-arm-kernel/CAGXv+5Hx7cRwNzLWrExcFGy=MMOc3-0EbqCanv2E0G_DKXLCgg@mail.gmail.com/#t

#6 lore raw

Re: [BUG] mtk serial broken on mt7622 with 5.18.0

Quoted 40 lines · Frank Wunderlich

Hi,

i get a serial console hang on booting my mt7622 bananapi r64 with 5.18.0

[    0.591802] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.599915] printk: console [ttyS0] disabled
[    0.624563] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 126,

base_baud = 1562500) is a 16550A

git bisect points to this commit (cannot revert it alone)

6f81fdded0d024c7d4084d434764f30bca1cd6b1 is the first bad commit commit 6f81fdded0d024c7d4084d434764f30bca1cd6b1

Author: AngeloGioacchino Del Regno <[email protected]>
Date:   Wed Apr 27 15:23:27 2022 +0200

serial: 8250_mtk: Make sure to select the right FEATURE_SEL

Set the FEATURE_SEL at probe time to make sure that BIT(0) is enabled:
this guarantees that when the port is configured as AP UART, the right register layout is interpreted by the UART IP.

Signed-off-by: AngeloGioacchino Del Regno
<[email protected]>
Cc: stable <[email protected]>
Link:
https://lore.kernel.org/r/[email protected]

 drivers/tty/serial/8250/8250_mtk.c | 7 +++++++
 1 file changed, 7 insertions(+)

merged by 6811a466d27b "Merge tag 'tty-5.18-rc7'"

reverted these 2 commits works for me
e1bfdbc7daca 2022-04-27 serial: 8250_mtk: Fix register address for XON/XOFF character
6f81fdded0d0 2022-04-27 serial: 8250_mtk: Make sure to select the right FEATURE_SEL

Quoted 7 lines

have see this discussion [1], but can't manage to import mbox file to thunderbird yet

regards Frank

[1]
https://lore.kernel.org/linux-arm-kernel/CAGXv+5Hx7cRwNzLWrExcFGy=MMOc3-0EbqCanv2E0G_DKXLCgg@mail.gmail.com/#t

The FEATURE_SEL change is already reverted to fix the problem but it didn't make into 5.18:

https://lore.kernel.org/linux-arm-kernel/[email protected]/T/

Signature · 1 line
 i.