Skip to content

pps: Compatibility hack should be X86-specific #5478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2023

Conversation

pelwell
Copy link
Contributor

@pelwell pelwell commented May 22, 2023

As of [1], using PPS_FETCH on a 64-bit ARM kernel with a 32-bit userland is broken, returning a timeout. This is because the requested 4-byte alignment for struct pps_ktime_compat (illegal on arm64) results in the timeout flags field being uninitialised.

Make the hack specific to X86_64 builds with CONFIG_COMPAT defined.

[1] commit c2a49fe ("pps: fix padding issue with PPS_FETCH for
ioctl_compat")

See: #5430
Fixes: c2a49fe ("pps: fix padding issue with PPS_FETCH for ioctl_compat")

As of [1], using PPS_FETCH on a 64-bit ARM kernel with a 32-bit userland
is broken, returning a timeout. This is because the requested 4-byte
alignment for struct pps_ktime_compat (illegal on arm64) results in the
timeout flags field being uninitialised.

Make the hack specific to X86_64 builds with CONFIG_COMPAT defined.

[1] commit c2a49fe ("pps: fix padding issue with PPS_FETCH for
    ioctl_compat")

See: raspberrypi#5430
Fixes: c2a49fe ("pps: fix padding issue with PPS_FETCH for ioctl_compat")
Signed-off-by: Phil Elwell <[email protected]>
@pelwell pelwell merged commit ed10309 into raspberrypi:rpi-6.1.y May 25, 2023
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request May 30, 2023
See: raspberrypi/linux#5482

kernel: Fix I2C issues for DSI touch and V3 camera
See: raspberrypi/linux#5479

kernel: pps: Compatibility hack should be X86-specific
See: raspberrypi/linux#5478
popcornmix added a commit to raspberrypi/firmware that referenced this pull request May 30, 2023
See: raspberrypi/linux#5482

kernel: Fix I2C issues for DSI touch and V3 camera
See: raspberrypi/linux#5479

kernel: pps: Compatibility hack should be X86-specific
See: raspberrypi/linux#5478
tiagofreire-pt added a commit to tiagofreire-pt/rpi_adafruit_stratum1_chrony that referenced this pull request Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant