From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
To: Christophe ROULLIER <christophe.roullier@foss.st.com>
Cc: Richard Cochran <richardcochran@gmail.com>,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Shuah Khan <shuah@kernel.org>,
Maciek Machnikowski <maciek@machnikowski.net>
Subject: Re: [BUG] Regression with commit: ptp: Add .getmaxphase callback to ptp_clock_info
Date: Thu, 19 Sep 2024 21:05:16 -0700 [thread overview]
Message-ID: <87v7yrynpf.fsf@nvidia.com> (raw)
In-Reply-To: <ZuO3qgO9OfUJrYUS@hoboy.vegasvil.org> (Richard Cochran's message of "Thu, 12 Sep 2024 20:55:22 -0700")
On Thu, 12 Sep, 2024 20:55:22 -0700 Richard Cochran <richardcochran@gmail.com> wrote:
> On Thu, Sep 12, 2024 at 04:51:51PM +0200, Christophe ROULLIER wrote:
>> Hi Richard,
>>
>>
>> I put in attachment result of pahole.
>>
>> It is :
>>
>> struct ptp_clock_caps {
>> int max_adj; /* 0 4 */
>> int n_alarm; /* 4 4 */
>> int n_ext_ts; /* 8 4 */
>> int n_per_out; /* 12 4 */
>> int pps; /* 16 4 */
>> int n_pins; /* 20 4 */
>> int cross_timestamping; /* 24 4 */
>> int adjust_phase; /* 28 4 */
>> int max_phase_adj; /* 32 4 */
>> int rsv[11]; /* 36 44 */
>>
>> /* size: 80, cachelines: 2, members: 10 */
>> /* last cacheline: 16 bytes */
>> };
>
> Total size is 80 bytes.
>
> As expected.
>
> So I can't explain the error that you are seeing.
Could you share what kind of STM32 development board you are using (like
the model), the kernel config, and toolchain you are using to build the
kernel? I would be interested in trying to reproduce. Also could you run
pahole on the ptp kernel module, "/lib/modules/$(uname -r)/kernel/drivers/ptp/ptp.ko",
and check the size of struct ptp_clock_caps there? If it is compressed,
you will need to uncompress the kernel object.
I am having a hard time believing commit
c3b60ab7a4dff6e6e608e685b70ddc3d6b2aca81 is the fundamental culprit, but
more likely it exposes some other issue seen uniquely on armhf. My
theory is if you have another commit that changes struct ptp_clock_caps
and adds an additional used field in place of a rsv element, you would
experience the same issue.
I do not work on PTP professionally anymore, but I am interested in
looking into this.
--
Thanks,
Rahul Rameshbabu
prev parent reply other threads:[~2024-09-20 4:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 15:13 [BUG] Regression with commit: ptp: Add .getmaxphase callback to ptp_clock_info Christophe ROULLIER
2024-09-09 15:35 ` Richard Cochran
2024-09-10 6:49 ` Christophe ROULLIER
2024-09-11 4:14 ` Richard Cochran
2024-09-12 14:51 ` Christophe ROULLIER
2024-09-13 3:55 ` Richard Cochran
2024-09-20 4:05 ` Rahul Rameshbabu [this message]
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=87v7yrynpf.fsf@nvidia.com \
--to=rrameshbabu@nvidia.com \
--cc=christophe.roullier@foss.st.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=maciek@machnikowski.net \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=shuah@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).