Skip to content

Commit

Permalink
Set the 32-bit ARM HZ value to a default value of 100 if the kernel
Browse files Browse the repository at this point in the history
was not configured with CONFIG_IKCONFIG.  Without the patch, the
initial system banner and the "sys" command show "UPTIME: (cannot
calculate: unknown HZ value)", the "ps -t" option shows "RUN TIME:
(cannot calculate: unknown HZ value)", and the "timer -r" option
kills the crash session with a floating point exception.
(hukeping@huawei.com)
  • Loading branch information
Dave Anderson committed Sep 29, 2014
1 parent a3a441a commit 5da8ffe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arm.c
Expand Up @@ -322,6 +322,9 @@ arm_init(int when)
"pr_pid");
MEMBER_OFFSET_INIT(elf_prstatus_pr_reg, "elf_prstatus",
"pr_reg");

if (!machdep->hz)
machdep->hz = 100;
break;

case POST_VM:
Expand Down

0 comments on commit 5da8ffe

Please sign in to comment.