wrong detection of ALIGNED_64K_SUPPORTED

Bug #1676834 reported by Rasmus Villemoes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stress-ng
Fix Released
Medium
Colin Ian King

Bug Description

When cross-compiling for arm with gcc >= 5.4 but binutils 2.25, the assembler complains

  /tmp/ccH0h4Uw.s:14: Error: alignment too large: 15 assumed

Using binutils 2.26 seems to be ok. I assume the binutils commit db2ed2e (Rationalize ARM .align) is what makes the difference. In any case, I think it would be better to replace the preprocessor checks with a configure-time check of whether the entire toolchain will accept __aligned(65536).

Changed in stress-ng:
importance: Undecided → Medium
assignee: nobody → Colin Ian King (colin-king)
status: New → In Progress
Revision history for this message
Colin Ian King (colin-king) wrote :

Fix committed:

http://kernel.ubuntu.com/git/cking/stress-ng.git/commit/?id=9c7d1c449945538d35874cffe713e8d259e75beb

Please can you pull the latest changes and test build this and let me know if this fixes this for you. Thanks!

Changed in stress-ng:
status: In Progress → Fix Committed
Revision history for this message
Colin Ian King (colin-king) wrote :

Before you do a build; please "make clean" first to allow stress-ng to regenerate it's configuration settings.

Revision history for this message
Rasmus Villemoes (villemoes) wrote :

I'll check tomorrow, but I highly doubt this is correct. You need and want to check for 64K, aka 2^16 aka 65536, not just 64 byte alignment. The binutils commit I mentioned removed an explicit bound of 15 for the max log2 alignment.

Revision history for this message
Colin Ian King (colin-king) wrote :

Hi Rasmus, yep, I made a thinko here.. I've modified this to do 64K alignment now.

See: http://kernel.ubuntu.com/git/cking/stress-ng.git/commit/?id=2c03776f1b20007ecc94d9d6c21658ac27dd905d

Revision history for this message
Rasmus Villemoes (villemoes) wrote :

This seems to work. But I think the modifications of stress-ng.h are buggy - defining ALIGN64 or not should _not_ depend on HAVE_ALIGNED_64K - it should still just depend on the compiler being non-ancient (and implicitly assume that the rest of the toolchain, assembler and linker, always supports 64 bytes alignment - which isn't necessarily true, nor is a cache line always 64 bytes, but in practice this should be good enough, at least until someone actually files a bug report).

Revision history for this message
Colin Ian King (colin-king) wrote :

I've added a configuration 64 byte alignment check too.

Changed in stress-ng:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.