Commit 8d2a7558 authored by Tiffany Yang's avatar Tiffany Yang Committed by Tejun Heo
Browse files

cgroup: Fix 64-bit division in cgroup.stat.local



Fix the following build error for 32-bit systems:
   arm-linux-gnueabi-ld: kernel/cgroup/cgroup.o: in function `cgroup_core_local_stat_show':
>> kernel/cgroup/cgroup.c:3781:(.text+0x28f4): undefined reference to `__aeabi_uldivmod'
   arm-linux-gnueabi-ld: (__aeabi_uldivmod): Unknown destination type (ARM/Thumb) in kernel/cgroup/cgroup.o
>> kernel/cgroup/cgroup.c:3781:(.text+0x28f4): dangerous relocation: unsupported relocation

Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508230604.KyvqOy81-lkp@intel.com/


Signed-off-by: default avatarTiffany Yang <ynaffit@google.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 7b281a45
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3778,8 +3778,8 @@ static int cgroup_core_local_stat_show(struct seq_file *seq, void *v)
					cgrp->freezer.freeze_start_nsec);
	} while (read_seqcount_retry(&cgrp->freezer.freeze_seq, sequence));

	seq_printf(seq, "frozen_usec %llu\n",
		   (unsigned long long) freeze_time / NSEC_PER_USEC);
	do_div(freeze_time, NSEC_PER_USEC);
	seq_printf(seq, "frozen_usec %llu\n", freeze_time);

	return 0;
}