Bug 456225 - clocksource modules not built on x86_64
clocksource modules not built on x86_64
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Prarit Bhargava
Martin Jenner
Depends On:
  Show dependency treegraph
Reported: 2008-07-22 08:12 EDT by Prarit Bhargava
Modified: 2008-07-23 13:54 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-23 13:54:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Prarit Bhargava 2008-07-22 08:12:15 EDT
Description of problem:

The clocksource modules are supposed to built on x86_64.  They are "y" in the
.config but are not being compiled for some reason.  They are being correctly
built on i386.

Version-Release number of selected component (if applicable):  98.el5

How reproducible: AFAICT, 100%.

Steps to Reproduce:
1. unpack source
2. build
Actual results: (I started with a previously built tree ...)

[root@dell-pe2900-03 linux-2.6.18.x86_64]# make -j8
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CHK     include/linux/compile.h
  Building modules, stage 2.
Kernel: arch/x86_64/boot/bzImage is ready  (#4)
[root@dell-pe2900-03 linux-2.6.18.x86_64]# cat drivers/clocksource/Makefile 
obj-$(CONFIG_X86_CYCLONE_TIMER) += cyclone.o
obj-$(CONFIG_X86_PM_TIMER)      += acpi_pm.o
obj-$(CONFIG_SCx200HR_TIMER)    += scx200_hrt.o
[root@dell-pe2900-03 linux-2.6.18.x86_64]# ls -l drivers/clocksource/*.o
ls: drivers/clocksource/*.o: No such file or directory
[root@dell-pe2900-03 linux-2.6.18.x86_64]# cat .config | grep PM_TIMER
[root@dell-pe2900-03 linux-2.6.18.x86_64]# 

Expected results:  clocksource modules should compile and be included as built-in.

Additional info:  AFAICT, this has very light functional impact.  The x86_64
arch-specific time code (arch/x86_64/kernel/time.c) is the code currently being
used to decide what timer to use -- not the clocksource drivers.

However, as jburke will point out ;), the sysfs file


will not show the correct information.  It is possible therefore that an
application may make an incorrect decision on performance based on reading the file.

Currently, x86_64 *always* will show "jiffies" as the value for
available_clocksource, whereas i386 will show all potential values for the
available_clocksource, ie) "acpi_pm jiffies hpet tsc".

I'm undecided as to how critical this.  AFAICT, this has low impact in terms of
system behavior.  OTOH, we are supposed to be building these modules.

Peter, Linda -- care to weigh in?  I'm not sure what the impact of turning on
these drivers at this time will be.  

Comment 2 Prarit Bhargava 2008-07-22 08:16:20 EDT
RHTS job information that lead to this BZ being filed:


Comment 3 Peter Martuccelli 2008-07-22 12:40:20 EDT
I would proceed with making the change, it is a known problem and we should
address the issue to keep x86/x86_64 in sync.  I am not concerned with the clock
source selection code path, it should not be affected.
Comment 4 Prarit Bhargava 2008-07-22 12:58:27 EDT
I'll take a look at the code this week.  This is just some sort of
Makefile/Kconfig breakage.

Comment 5 Prarit Bhargava 2008-07-23 11:23:29 EDT
Well ... I figured out why this isn't building on x86_64.  It's because
CONFIG_GENERIC_TIME isn't defined.  Even with that, there are other functions
that are undefined on x86_64 (ex. mark_tsc_unstable() ) that are defined within

I'll see how big of a backport is required -- hopefully, not much.

Comment 6 Prarit Bhargava 2008-07-23 11:40:19 EDT
There are a lot of conflicts between the the arch/x86_64 code and the
clocksource code -- it will take significant hacks to make this compile, and
even then, x86_64 only has code for the acpi_pm.

After fixing the issue with mark_tsc_unstable() we end up with

kernel/built-in.o: In function `do_gettimeofday':
multiple definition of `do_gettimeofday'
first defined here
ld: Warning: size of symbol `do_gettimeofday' changed from 143 in
arch/x86_64/kernel/built-in.o to 157 in kernel/built-in.o
kernel/built-in.o: In function `do_settimeofday':
multiple definition of `do_settimeofday'
first defined here
ld: Warning: size of symbol `do_settimeofday' changed from 215 in
arch/x86_64/kernel/built-in.o to 251 in kernel/built-in.o
drivers/built-in.o:(.data.read_mostly+0x28): multiple definition of `pmtmr_ioport'
arch/x86_64/kernel/built-in.o:(.data.read_mostly+0x5174): first defined here
make: *** [.tmp_vmlinux1] Error 

I suggest changing this to WONTFIX.  Unless we're willing to do a large backport
of code that has no purpose in RHEL, I can't see the benefit to fix the output
of that one /sys file.



Note You need to log in before you can comment on or make changes to this bug.