Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp637037imm; Mon, 9 Jul 2018 08:02:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcRjaLFjqOFHK2cLfhhmH4ts/fKSVKLDQGlyLlPiaQsT0WE5DSWIwCDjTgYku6+c4MGzrcA X-Received: by 2002:a63:4a07:: with SMTP id x7-v6mr19432599pga.34.1531148576073; Mon, 09 Jul 2018 08:02:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531148576; cv=none; d=google.com; s=arc-20160816; b=N2gucUXoU7kvn9TggfcZHxXnF4lNVeMMq6G3KxtvEomHhww6/mYtluo5maQIPuMeh1 rEv7ZZZ/FawAuvr6amEKrTQdV3uIJIfxMljG7Z4h+Lj0LnPO2azRhXYXEM2MDvFprAMq VbHfd4eoPldAuFV9Pb3lmE19L4JmJcs9wtdS+Faka2+t+3GB5VMidmdksebkkfKpr4DG p2RhgGWPHAsFcZjH1K+ohp9g3x29tcoka9yS7e8rXAzq2SxKsGkdiQYH2FU7mwH/39y6 CZGcbI1sbrsnENOVCctd3UFdtRyGEES9ovK6PXz6L8gp5KTFPuwAaEVJAus2D9o600yX vOTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=hALVUCaMuNJBCn+4xVc9DjN+Qb1JSoBwB+q3WVg3Zms=; b=RXdl/wNx5SWwEqXBRO1eUWJkf0sGdR4e0xbtSugzumRycd0pzwz+bqjzN8wqgE225e XEH5Dy04iSHqDSWoour9aGDncYLHxWlzLDstJprtxD69E8OjUP/Z7WJsiasu5afjR6DV MOAf/bIfSmYiRQf/OkggwxO0BWVPRBUiyyvVDMmOL3S7N9LUnVvsg9DWEvjs+mZa8VEy KAgZo6paOtrjYeKXirX+jNgVqhy1o4i2k9jMKYHWOUAX++1n+bK6dE4qrB5+UokPandW P8orx7OKFo8+xFoaMZCWft2Saz+Q/i1mmnfdmOm8GB+9UNDPjVl+ajbb5Lokd+3BNZUD EUeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m141-v6si16012315pfd.310.2018.07.09.08.02.41; Mon, 09 Jul 2018 08:02:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933307AbeGIPAi convert rfc822-to-8bit (ORCPT + 99 others); Mon, 9 Jul 2018 11:00:38 -0400 Received: from smtp-out6.electric.net ([192.162.217.187]:64530 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933297AbeGIPAg (ORCPT ); Mon, 9 Jul 2018 11:00:36 -0400 Received: from 1fcXeP-0000hF-UY by out6a.electric.net with emc1-ok (Exim 4.90_1) (envelope-from ) id 1fcXeR-0000to-Vs; Mon, 09 Jul 2018 08:00:31 -0700 Received: by emcmailer; Mon, 09 Jul 2018 08:00:31 -0700 Received: from [156.67.243.126] (helo=AcuMS.aculab.com) by out6a.electric.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fcXeP-0000hF-UY; Mon, 09 Jul 2018 08:00:29 -0700 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 9 Jul 2018 16:02:08 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Mon, 9 Jul 2018 16:02:08 +0100 From: David Laight To: 'Peter Zijlstra' , Alexey Brodkin CC: "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "linux-snps-arc@lists.infradead.org" , "stable@vger.kernel.org" , "greg@kroah.com" , "will.deacon@arm.com" , "gregkh@linuxfoundation.org" , "linux-arch@vger.kernel.org" , "geert@linux-m68k.org" Subject: RE: [PATCH v3] devres: Explicitly align datai[] to 64-bit Thread-Topic: [PATCH v3] devres: Explicitly align datai[] to 64-bit Thread-Index: AQHUF5RQYtcNwcQOfUmtgpsbxmBbOaSG+rxw Date: Mon, 9 Jul 2018 15:02:08 +0000 Message-ID: References: <20180709134550.29541-1-abrodkin@synopsys.com> <20180709140717.GR2476@hirez.programming.kicks-ass.net> <20180709141056.GR2512@hirez.programming.kicks-ass.net> <44727d3cebda7bee5b68fb388bd2fecfc6dc7b89.camel@synopsys.com> <20180709144925.GU2476@hirez.programming.kicks-ass.net> In-Reply-To: <20180709144925.GU2476@hirez.programming.kicks-ass.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.33] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuMS.aculab.com X-TLS: TLSv1.2:ECDHE-RSA-AES256-SHA384:256 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 X-Virus-Status: Scanned by VirusSMART (c) X-Virus-Status: Scanned by VirusSMART (s) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra > Sent: 09 July 2018 15:49 > On Mon, Jul 09, 2018 at 02:33:26PM +0000, Alexey Brodkin wrote: > > > In fact, since alloc_dr() uses kmalloc() to allocate the entire thing, > > > it is impossible to guarantee a larger alignment than kmalloc does. > > > > Well but 4-bytes [which is critical for atomic64_t] should be much less > > than a sane cache line length so above should work. > > AFAICT ARCH_KMALLOC_MINALIGN ends up being 4 on x86_32 (it doesn't > define ARCH_DMA_MINALIGN and doesn't seem to otherwise override the > thing). That seems broken. I wonder what the minimal alignment really is? I suspect some code expects (and gets) 8-byte alignment. The min alignment might even be 16 or 32 bytes. There aren't many x86 instructions that fault on mis-aligned addresses, but there are a few. Mostly related to the fpu - probably including the fpu save area. David