Bug 816761

Summary: ARM fc17 kernel-devel missing /usr/src/kernels/3.3.2-8.fc17.armv7hl.tegra/arch/arm/mach-tegra/include/mach
Product: [Fedora] Fedora Reporter: William Cohen <wcohen>
Component: kernelAssignee: Dennis Gilmore <dennis>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 17CC: dgilmore, gansalmon, itamar, jcm, jonathan, kernel-maint, madhu.chinakonda, mjw
Target Milestone: ---   
Target Release: ---   
Hardware: arm9   
OS: Linux   
Whiteboard: Arm
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 739596 Environment:
Last Closed: 2012-07-09 21:16:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 739596    
Bug Blocks:    

Description William Cohen 2012-04-26 21:57:15 UTC
+++ This bug was initially created as a clone of Bug #739596 +++

Description of problem:

Attempting to use systemtap on fc17. Systemtap builds kernel modules and installs them to instrument the machine. For this to work need to have kernel-devel (or kernel-tegra-devel) able to build modules on the machine. The machine attempting this on is a trimslice pro.  Pretty much like #739595 just a newer version of the kernel.


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

kernel-headers-3.3.2-8.fc17.armv7hl
kernel-tegra-3.3.2-8.fc17.armv7hl
kernel-debuginfo-common-armv7hl-3.3.2-2.fc17.armv7hl
kernel-tegra-devel-3.3.2-8.fc17.armv7hl
systemtap-1.7-4.fc17.armv7hl

How reproducible:

Every time.

Steps to Reproduce:
1. Install the rpms above from koji
2. As root run the example from http://sourceware.org/systemtap/SystemTap_Beginners_Guide/using-systemtap.html#testing:
stap -v -e 'probe begin {printf("hello world\n"); exit()}'
3.
  
Actual results:

Unable to run the example get something of like the following:


# stap -v -e 'probe begin {printf("hello world\n"); exit()}'
Pass 1: parsed user script and 83 library script(s) using 25756virt/13712res/2456shr kb, in 720usr/20sys/735real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) using 26020virt/14240res/2524shr kb, in 20usr/0sys/17real ms.
Pass 3: translated to C into "/tmp/stap6wJT7S/stap_85f5550c023ef77b0a0f19716f294f53_731_src.c" using 26020virt/14544res/2792shr kb, in 0usr/0sys/2real ms.
In file included from include/linux/timex.h:174:0,
                 from include/linux/jiffies.h:8,
                 from include/linux/ktime.h:25,
                 from include/linux/timer.h:5,
                 from include/linux/workqueue.h:8,
                 from include/linux/kmod.h:26,
                 from include/linux/module.h:13,
                 from /usr/share/systemtap/runtime/runtime.h:14,
                 from /tmp/stap6wJT7S/stap_85f5550c023ef77b0a0f19716f294f53_731_src.c:20:
/usr/src/kernels/3.3.2-8.fc17.armv7hl.tegra/arch/arm/include/asm/timex.h:15:24: fatal error: mach/timex.h: No such file or directory
compilation terminated.
make[1]: *** [/tmp/stap6wJT7S/stap_85f5550c023ef77b0a0f19716f294f53_731_src.o] Error 1
make: *** [_module_/tmp/stap6wJT7S] Error 2
WARNING: make exited with status: 2
Pass 4: compiled C into "stap_85f5550c023ef77b0a0f19716f294f53_731.ko" in 40560usr/7480sys/52349real ms.
Pass 4: compilation failed.  Try again with another '--vp 0001' option.


Expected results:

The instrumentation compiled into a kernel module which include the following line in the output:

read performed



Additional info:

Looking at local rpmbuild of kernel rpm see:

$ls rpmbuild/BUILD/kernel-2.6.39.fc14/linux-2.6.39.armv5tel/arch/arm/mach-tegra/include/mach/
barriers.h     entry-macro.S  irqs.h       powergate.h           timex.h
clkdev.h       gpio.h         kbc.h        sdhci.h               uncompress.h
clk.h          hardware.h     memory.h     suspend.h             usb_phy.h
debug-macro.S  io.h           pinmux.h     system.h              vmalloc.h
dma.h          iomap.h        pinmux-t2.h  tegra_wm8903_pdata.h

Don't see the include/mach in the kernel-tegra-devel:

$ls /usr/src/kernels/2.6.40.3-0.fc14.armv7l.tegra/arch/arm/mach-tegra/
Kconfig  Makefile  Makefile.boot


Manually copied the missing include directory over to /usr/src/kernels/2.6.40.3-0.fc14.armv7l.tegra/arch/arm/mach-tegra/ and things ran.

--- Additional comment from mjw on 2011-11-23 14:38:24 EST ---

Same for 2.6.40.4-6.fc15.armv7hl.tegra

--- Additional comment from dmarlin on 2011-12-08 14:50:47 EST ---

Created attachment 542714 [details]
Add the arch/arm/mach-<ArmVariant>/include direcetory to the -devel package

I have been building a slightly different version of the kernel, but I believe this patch to the kernel.spec file will copy the missing include directory to the appropriate location in the kernel-*-devel packages.

--- Additional comment from wcohen on 2012-02-20 10:32:00 EST ---

See that this is fixed in kernel-tegra-devel-2.6.42.3-2.fc15.armv7hl

Comment 1 Dennis Gilmore 2012-06-28 16:51:01 UTC
the biggest issue is taht some of the arches have headers in plat- arch- and mach- we need to make sure we get all the headers and put them in place appropriately

Comment 2 Dennis Gilmore 2012-06-28 19:21:23 UTC
i just commited the patch to rawhide and f17 so it will show up in thenext kernel builds, we do need to ensure that we do get all the headers we need

Comment 3 William Cohen 2012-07-09 21:16:17 UTC
With the newer systemtap-1.8 the systemtap kernel module builds as expected on the trimslice machine that previously exhibited the problem:

$ stap -v -e 'probe begin {printf("hello world\n"); exit()}'
Pass 1: parsed user script and 84 library script(s) using 26192virt/14328res/2524shr/12332data kb, in 740usr/20sys/793real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) using 26456virt/14856res/2728shr/12596data kb, in 20usr/0sys/16real ms.
Pass 3: using cached /home/wcohen/.systemtap/cache/d6/stap_d6e1b396735caae0f74b6961bd11bc2f_812.c
Pass 4: using cached /home/wcohen/.systemtap/cache/d6/stap_d6e1b396735caae0f74b6961bd11bc2f_812.ko
Pass 5: starting run.
hello world
Pass 5: run completed in 40usr/50sys/490real ms.