Atomic operations not safe for ARMv7,Thumb-2 and multicore
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qt4-x11 (Ubuntu) |
Fix Released
|
Medium
|
Jani Monoses | ||
Natty |
Fix Released
|
Medium
|
Jani Monoses |
Bug Description
Problem noted in: qt4-x11_
There are two problems here:
1) in configure, the build architecture baseline is detected using `uname -r`: this just gives "armel", which does not work for determining whether the baseline is armv6 or armv7 or whatever. There are some specific files for armv6, but these are not used because configure defines QT_ARCH_ARM instead of QT_ARCH_ARMV6.
It may make sense for the ubuntu build rules to pass an explicit -arch option to configure.
2) The "generic arm" atomics in src/arch/
3) The armv6 atomics in src/arch/
Possibly we should add a new src/arch/
If at all possible, this new header should be ported to use the GCC atomic intrinsics: see
https:/
The qatomic_avr32.h header seems to be based on the intrinsics and may be useful as a template.
The qatomic_ia64.h header's calls to __memory_barrier() may indicate the appropriate places where an additional explicit barrier is needed.
If it is not possible to use the GCC intrinsics, a dmb instruction should be added before and after each ldrex...strex sequence where the API semantics of the atomic operations qt is trying to implement require it.
Searching for other possibly arm/armv6 specific files, if would be a good idea to review the following for implications.
See https:/
Apart from the atomics, these look like optimisation opportunities and some relatively harmless minor things, but I haven't investigated in much detail yet.
* include/
* include/
* src/corelib/
* src/corelib/
* include/
* include/
* include/
* include/
* src/corelib/
* src/corelib/
* src/gui/
* src/gui/
* src/gui/
* src/gui/
Changed in qt4-x11 (Ubuntu): | |
status: | Triaged → In Progress |
assignee: | nobody → Michael Casadevall (mcasadevall) |
tags: | added: patch |
Changed in qt4-x11 (Ubuntu): | |
assignee: | Michael Casadevall (mcasadevall) → nobody |
tags: | added: thumb |
Changed in qt4-x11 (Ubuntu): | |
milestone: | none → natty-alpha-1 |
Changed in qt4-x11 (Ubuntu Natty): | |
milestone: | natty-alpha-1 → natty-alpha-2 |
Changed in qt4-x11 (Ubuntu Natty): | |
milestone: | natty-alpha-2 → natty-alpha-3 |
tags: | added: arm-porting-queue |
Changed in qt4-x11 (Ubuntu Natty): | |
milestone: | natty-alpha-3 → ubuntu-11.04-beta-1 |
assignee: | nobody → Canonical ARM (canonical-arm) |
Changed in qt4-x11 (Ubuntu Natty): | |
assignee: | Canonical ARM (canonical-arm) → Jani Monoses (jani) |
Setting this at medium for now, but this might be worth revisiting when multicore chips become available if this proves to be causing big problems.