- Subject: Linux kernel arm oprofile driver compilation problem
- From: William Cohen <wcohen@xxxxxxxxxx>
- Date: Wed, 22 Feb 2012 23:08:23 -0500
- Delivered-to: arm@xxxxxxxxxxxxxxxxxxxxxxx
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.26) Gecko/20120215 Red Hat/3.1.18-2.el6_2 Thunderbird/3.1.18
I was looking to see why the arm kernel builds for fedora 17 were failing with:
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:28:28: error: variably modified 'perf_events' at file scope
The error points to the following line in oprofile_perf.c:
static struct perf_event **perf_events[nr_cpumask_bits];
The nr_cpumask_bits is defined in linux/include/linux/cpumask.h with
the following snippet of code:
#if NR_CPUS == 1
#define nr_cpu_ids 1
#else
extern int nr_cpu_ids;
#endif
#ifdef CONFIG_CPUMASK_OFFSTACK
/* Assuming NR_CPUS is huge, a runtime limit is more efficient. Also,
* not all bits may be allocated. */
#define nr_cpumask_bits nr_cpu_ids
#else
#define nr_cpumask_bits NR_CPUS
#endif
The problem is that several arm machines have more than one processor
(CONFIG_NR_CPUS>1), making nr_cpumask_bits be a variable rather than a
compile time constant. Seems like the kernel should dynamically allocate
space for perf_events[nr_cpumask_bits] because of the variable nature
of nr_cpu_mask_bits.
An example of a problem arm kernel build can be found at:
http://arm.koji.fedoraproject.org/koji/buildinfo?buildID=56273
The log file with the error message can be found at:
http://arm.koji.fedoraproject.org/koji/getfile?taskID=458300&name=build.log
-Will
_______________________________________________
arm mailing list
arm@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/arm
[Linux ARM (Vger)]
[Linux ARM]
[ARM Kernel]
[Fedora User Discussion]
[Older Fedora Users Discussion]
[Fedora Advisory Board]
[Fedora Security]
[Fedora Maintainers]
[Fedora Devel Java]
[Fedora Legacy]
[Fedora Desktop]
[ATA RAID]
[Fedora Marketing]
[Fedora Mentors]
[Fedora Package Announce]
[Fedora Package Review]
[Fedora Music]
[Fedora Packaging]
[Centos]
[Fedora SELinux]
[Fedora Triage]
[Deep Creek Hot Springs]
[Coolkey]
[Yum Users]
[Tux]
[Big List of Linux Books]
[Yosemite News]
[Yosemite Photos]
[Linux Apps]
[KDE Users]
[Fedora Tools]
[Fedora Art]
[Fedora Docs]
[Asterisk PBX]