From: Tony Lindgren <tony@atomide.com>
To: Matthew Howell <matthew.howell@sealevel.com>
Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org,
ryan.wenglarz@sealevel.com, james.olson@sealevel.com
Subject: Re: [PATCH] serial: Revert serial: core: Fix serial core port id to not use port->line
Date: Tue, 5 Sep 2023 18:55:24 +0300 [thread overview]
Message-ID: <20230905155524.GR11662@atomide.com> (raw)
In-Reply-To: <c4b1db31-7814-0d22-36de-a7e6f117d89c@sealevel.com>
* Matthew Howell <matthew.howell@sealevel.com> [230905 15:05]:
> On Sat, 2 Sep 2023, Tony Lindgren wrote:
> > OK. If the patch did not apply against v6.5, can you please verify you don't
> > have other patches applied like your revert? I don't think the patch I sent
> > is white space damanged or anything. Doing git diff v6.5.. should show you
> > what might be different :)
>
> It shouldn't have had any patches applied to. Just verified again by
> running git diff after pulling the v6.5 branch, but git diff shows no
> differences.
>
> I suspect alpine may be mangling the text on my end in some way. If I
> apply the changes manually and then run git diff v6.5 the patch looks the
> same as what you provided, but tab/spaces are different.
OK thanks for checking.
> > Not sure what you mean with the 8250 entries from before loading the
> > patched driver..
> >
> > Maybe things go wrong already somewhere earlier if the integrated 8250
> > port(s) don't show up either? If so, maybe this issue is somehow machine
> > specific rather than 8250_exar specific.
>
> I should have been more specific there. I was actually referring to
> 8250_exar entries, not 8250 entries. I have not had any issues with the
> base 8250 driver loading.
Ah OK sorry I misunderstood.
> HOWEVER, I did just find something very interesting. When I first found
> the issue my running kernel was still an RC version (6.5-RC4, I
> believe). The issue did NOT occur in the running kernel, or when building
> 8250_exar from the 6.5-RC4 source. I expected the issue to exist in the
> running kernel after I updated to 6.5, but this is NOT the the case.
> XR17V35X devices still work in my running kernel. It is only when I build
> from source AND the source contains the port_id changes that the issue
> occurs. My current kernel is 6.5.0-1-MANJARO.
>
> Could I be doing something wrong here that for some reason only
> manifests itself in combination with the port_id change?
>
> The only things I can think of are:
> 1) insmod does not account for dependencies, so in theory I could be
> failing to build and load some other required module. However, modprobe
> indicates 8250_exar has no dependencies, so I didn't think this should be
> an issue.
If you are not using modprobe, and have CONFIG_SERIAL_CORE=m, you
need to load serial_base.ko. I don't think we can build the core stuff as
as serial_core.ko without renaming serial_core.c to something else. Looks
like your config has SERIAL_CORFE built-in though, and without the serial
core stuff you'd likely get "Unknown symbol in module" error loading
8250_exar.
> 2) The Arch/Manjaro Kernel I am running does not actually have the port_id
> change, even though it should. Do you know of an a wy to determine this?
Well I guess you could check the patches applied to that kernel, but
presumably it's v6.5 for that part.
> The general build procedure I have been using is:
>
> ## Clone v6.5 tagged kernel source
> git clone --depth=1 https://github.com/torvalds/linux.git --branch v6.5
>
> ## Link symvers
> ln -s /usr/lib/modules/$(uname -r)/build/Module.symvers .
>
> ## Copy existing config
> zcat /proc/config.gz > .config
>
> ## Make sure 8250_exar is built as a module. Disable auto-version.
> sed -i '/CONFIG_SERIAL_8250_EXAR=/c\CONFIG_SERIAL_8250_EXAR=m' .config
> sed -i '/CONFIG_LOCALVERSION_AUTO=/c\CONFIG_LOCALVERSION_AUTO=n' .config
> sed -i '/CONFIG_LOCALVERSION=/c\CONFIG_LOCALVERSION=""' .config
> make modules_prepare LOCALVERSION=-MANJARO EXTRAVERSION=-1
>
> ## Apply patch, if applicable
> patch -p1 < patch.diff
>
> ## Build and load module
> make M=drivers/tty/serial/8250/
> sudo rmmod 8250_exar
Maybe check if rmmod 8250_exar now somehow causes the following insmod
8250_exar attempts to fail?
> sudo insmod drivers/tty/serial/8250/8250_exar.ko
>
> > Can you please post or email me your full working dmesg output, failing
> > dmesg output, the kernel .config used, and kernel command line?
>
> ---
> Kernel Command Line:
> quiet splash resume=UUID=46a37dda-0d60-4ed1-94ea-9219fbe85dde udev.log_priority=3 iomem=relaxed
> ---
>
> ---
> dmesg start
> Note: Everything before [ 1149.943049] is prior to loading the module
> built from source. The successful version looks the same, except instead
> of the error message I see the same ttyS4 and ttyS5 at MMIO... messages
> that appeared before.
OK yeah thanks, not seeing anything wrong early in the dmesg.
Regards,
Tony
next prev parent reply other threads:[~2023-09-05 16:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 20:41 [PATCH] serial: Revert serial: core: Fix serial core port id to not use port->line Matthew Howell
2023-08-29 3:52 ` Tony Lindgren
2023-08-29 13:42 ` Matthew Howell
2023-08-29 20:15 ` Tony Lindgren
2023-08-31 14:58 ` Matthew Howell
2023-09-01 4:47 ` Tony Lindgren
2023-09-01 18:48 ` Matthew Howell
2023-09-02 4:34 ` Tony Lindgren
[not found] ` <c4b1db31-7814-0d22-36de-a7e6f117d89c@sealevel.com>
2023-09-05 15:55 ` Tony Lindgren [this message]
2023-09-05 16:43 ` Matthew Howell
2023-09-05 16:51 ` Tony Lindgren
2023-09-11 13:04 ` Matthew Howell
2023-09-11 13:15 ` Greg KH
2023-09-11 13:58 ` Matthew Howell
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=20230905155524.GR11662@atomide.com \
--to=tony@atomide.com \
--cc=gregkh@linuxfoundation.org \
--cc=james.olson@sealevel.com \
--cc=linux-serial@vger.kernel.org \
--cc=matthew.howell@sealevel.com \
--cc=ryan.wenglarz@sealevel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox