From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fME7x-0000bb-B8 for qemu-devel@nongnu.org; Fri, 25 May 2018 10:55:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fME7s-0006bx-Gg for qemu-devel@nongnu.org; Fri, 25 May 2018 10:55:33 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:34001) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fME7s-0006bI-2X for qemu-devel@nongnu.org; Fri, 25 May 2018 10:55:28 -0400 Received: by mail-qk0-x242.google.com with SMTP id p186-v6so4279947qkd.1 for ; Fri, 25 May 2018 07:55:27 -0700 (PDT) References: <20180525132755.21839-1-peter.maydell@linaro.org> <20180525132755.21839-3-peter.maydell@linaro.org> From: Richard Henderson Message-ID: Date: Fri, 25 May 2018 07:55:21 -0700 MIME-Version: 1.0 In-Reply-To: <20180525132755.21839-3-peter.maydell@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/6] scripts/update-linux-headers: Handle __aligned_u64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Paolo Bonzini , Alex Williamson , "Michael S . Tsirkin" , Stefan Hajnoczi , patches@linaro.org On 05/25/2018 06:27 AM, Peter Maydell wrote: > We'll currently replace any 'u64' with a 'uint64_t' including when > it's embedded in an '__aligned_u64', creating a '__aligned_uint64_t' > which doesn't exist. We need to instead expand out the kernel's > definition of __aligned_u64: > #define __aligned_u64 __u64 __attribute__((aligned(8))) > before we convert the __u64 to uint64_t. Wow. I did not believe that would work. I expected that you'd need to define a typedef, or somehow sort the attribute after the identifier to which it applies. However typedef unsigned long uint64_t; uint64_t __attribute__((aligned(16))) a; struct bar { uint64_t __attribute__((aligned(16))) foo; } b; produces the expected alignments with both gcc(8) and clang(6). Reviewed-by: Richard Henderson r~