Skip to content
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

Update 5.10.x+fslc up to v5.10.29 #301

Merged
merged 43 commits into from
Apr 12, 2021
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5c6f778
ARM: dts: am33xx: add aliases for mmc interfaces
mansr Jan 28, 2021
4c875e0
bus: ti-sysc: Fix warning on unbind if reset is not deasserted
tmlind Feb 18, 2021
107875a
platform/x86: intel-hid: Support Lenovo ThinkPad X1 Tablet Gen 2
AlbanBedel Feb 22, 2021
198afc3
bpf, x86: Use kvmalloc_array instead kmalloc_array in bpf_jit_comp
yonghong-song Mar 9, 2021
4b4ce98
net/mlx5e: Enforce minimum value check for ICOSQ size
Jan 12, 2021
f0ed115
net: pxa168_eth: Fix a potential data race in pxa168_eth_remove
PavelAndrianov Mar 10, 2021
4ca2656
kunit: tool: Fix a python tuple typing error
sulix Feb 23, 2021
05878b6
mISDN: fix crash in fritzpci
lzto Mar 11, 2021
7705c48
mac80211: Check crypto_aead_encrypt for errors
mamapanda Mar 9, 2021
0a66bd6
mac80211: choose first enabled channel for monitor
Mar 11, 2021
b9ec77e
drm/msm/dsi_pll_7nm: Fix variable usage for pll_lockdet_rate
lumag Feb 24, 2021
57e0546
drm/msm/adreno: a5xx_power: Don't apply A540 lm_setup to other GPUs
Feb 28, 2021
439c2c2
drm/msm: Ratelimit invalid-fence message
robclark Mar 17, 2021
b0c795f
netfilter: conntrack: Fix gre tunneling over ipv6
lsenecaux Mar 4, 2021
8a57256
netfilter: nftables: skip hook overlap logic if flowtable is stale
ummakynes Mar 17, 2021
6304295
net: ipa: fix init header command validation
Mar 20, 2021
bcd57b0
platform/x86: thinkpad_acpi: Allow the FnLock LED to change state
mid-kid Mar 15, 2021
6deb9d9
kselftest/arm64: sve: Do not use non-canonical FFR register value
Andre-ARM Mar 19, 2021
6372aa9
drm/msm/disp/dpu1: icc path needs to be set before dpu runtime resume
Mar 22, 2021
7c73059
x86/build: Turn off -fcf-protection for realmode targets
arndb Mar 23, 2021
0379508
block: clear GD_NEED_PART_SCAN later in bdev_disk_changed
mschiu77 Mar 23, 2021
f135b89
platform/x86: intel_pmc_core: Ignore GBE LTR on Tiger Lake platforms
debox1 Mar 19, 2021
266d310
ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation
yangbolu1991 Mar 23, 2021
47f8bc6
scsi: target: pscsi: Clean up after failure in pscsi_map_sg()
mwilck Mar 23, 2021
b008489
selftests/vm: fix out-of-tree build
xilabao Mar 25, 2021
bc30fdd
ia64: mca: allocate early mca with GFP_ATOMIC
Mar 25, 2021
42498ee
ia64: fix format strings for err_inject
Mar 25, 2021
fee1110
cifs: revalidate mapping when we open files for SMB1 POSIX
Mar 25, 2021
8f9049e
cifs: Silently ignore unknown oplock break handle
vwax Mar 19, 2021
7345d4b
io_uring: fix timeout cancel return code
isilence Mar 25, 2021
2934985
math: Export mul_u64_u64_div_u64
davem330 Mar 24, 2021
2497190
tools/resolve_btfids: Build libbpf and libsubcmd in separate directories
olsajiri Feb 5, 2021
f60c918
tools/resolve_btfids: Check objects before removing
olsajiri Feb 5, 2021
eff1e04
tools/resolve_btfids: Set srctree variable unconditionally
olsajiri Feb 5, 2021
0945d67
kbuild: Add resolve_btfids clean to root clean target
olsajiri Feb 5, 2021
76983e2
kbuild: Do not clean resolve_btfids if the output does not exist
olsajiri Feb 11, 2021
f890246
tools/resolve_btfids: Add /libbpf to .gitignore
fomichev Feb 12, 2021
3edb896
bpf, x86: Validate computation of branch displacements for x86-64
piotr-krysiuk Apr 5, 2021
faa3096
bpf, x86: Validate computation of branch displacements for x86-32
piotr-krysiuk Apr 6, 2021
ba02635
init/Kconfig: make COMPILE_TEST depend on !S390
hcahca Nov 18, 2020
cef13a0
init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
masahir0y Mar 13, 2021
d8cf82b
Linux 5.10.29
gregkh Apr 10, 2021
8837e15
Merge tag 'v5.10.29' into 5.10.x+fslc
zandrey Apr 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation
[ Upstream commit f51d7bf ]

Current calculation for diff of TMR_ADD register value may have
64-bit overflow in this code line, when long type scaled_ppm is
large.

adj *= scaled_ppm;

This patch is to resolve it by using mul_u64_u64_div_u64().

Signed-off-by: Yangbo Lu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
yangbolu1991 authored and gregkh committed Apr 10, 2021

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 266d3106efbd9ffe92e0b86789299feae0750991
13 changes: 7 additions & 6 deletions drivers/ptp/ptp_qoriq.c
Original file line number Diff line number Diff line change
@@ -189,15 +189,16 @@ int ptp_qoriq_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
tmr_add = ptp_qoriq->tmr_add;
adj = tmr_add;

/* calculate diff as adj*(scaled_ppm/65536)/1000000
* and round() to the nearest integer
/*
* Calculate diff and round() to the nearest integer
*
* diff = adj * (ppb / 1000000000)
* = adj * scaled_ppm / 65536000000
*/
adj *= scaled_ppm;
diff = div_u64(adj, 8000000);
diff = (diff >> 13) + ((diff >> 12) & 1);
diff = mul_u64_u64_div_u64(adj, scaled_ppm, 32768000000);
diff = DIV64_U64_ROUND_UP(diff, 2);

tmr_add = neg_adj ? tmr_add - diff : tmr_add + diff;

ptp_qoriq->write(&regs->ctrl_regs->tmr_add, tmr_add);

return 0;