Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1666284imj; Thu, 14 Feb 2019 10:01:07 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia7BZpnpeGkmGhFSSLG7y2IptZllunZL0j93g0/genMxUJttxzZ84ciRATTOIFUP+apCpaT X-Received: by 2002:a17:902:820f:: with SMTP id x15mr5312156pln.224.1550167267839; Thu, 14 Feb 2019 10:01:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550167267; cv=none; d=google.com; s=arc-20160816; b=Jsdid0ZDzMdFiyQWTDfJQS4reP0LyEWlCLhT0fzNW9h34YIgRMyPuZTKkRKOw+3d8C btnImBrSXFKXcdHZxfizWZDgcMKt8l/oRgFF1g9FTTCgHZwSLK6hozkN8NC9zg941P47 JsHQAkrlckYf+E2cEUWLI9TSY1qUOxJ5O6JESU4lyWVRwtJekkICfcmyUFypj+bMrhmd jPiJTeMSTcpuNqA0xxBYlARD8cwTMV4vJJw5xOr0tdpMdDmM6upyWysdMXj5q5cKcdhT 3v379gHZq+mnRCjnZPCQSgi/btzTgzo4SKWPH8yIwZKqIPyqp4zuW854jpo6kB2NeRrD pHaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zLuFSdW+UO5nFqX/uI/BxHZUhCEVOW/ZxSRSMf803YA=; b=gmgM4Ut6i7JSNqdXy+qx7yQwhHYuVfSZdsnUeEK9eKFbS/9PAf7FjYdjZIIvzgauxW Z/dW/FJQ3uZW73CE2RQx+qWc0I74ZZ8J7C+zP6iztkCANtJANSILyKPmV9FZPS5Equtl 396ZTL4rxX10gDGz74phg76AE+w2zMsSLSS6IfH9nXox2VMywYjBuqbFrqhpZfg9ydN/ SDNr6kuzvYaVZFclleLtGhh82CQZ6BNh2GR2UZFwGjCM8ialBxAK/J+4tdQN2MXDxvZO w/j4aveaHf/qyUCsTnpeS2z2lKwe2lInPlfg+nCUq8sSuPLYQT0kF31XE+5lV7ixm8+6 su5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="G6hNv/iz"; 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 e129si2805385pgc.333.2019.02.14.10.00.51; Thu, 14 Feb 2019 10:01:07 -0800 (PST) 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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="G6hNv/iz"; 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 S2392576AbfBNK20 (ORCPT + 99 others); Thu, 14 Feb 2019 05:28:26 -0500 Received: from merlin.infradead.org ([205.233.59.134]:54098 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbfBNK20 (ORCPT ); Thu, 14 Feb 2019 05:28:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zLuFSdW+UO5nFqX/uI/BxHZUhCEVOW/ZxSRSMf803YA=; b=G6hNv/iz31k6CxW5vusw4X8O9 hOa0g7gMM4ZNXwH2sZC4MU7X9wkwbcK/CAmaD9PifD2i3M5DyYjEToZc9MW/NkiHBCX61FxGDYqcU DJyEknAkX/WomN8w7Vy27QNx/8o8W+I2yaEe2x0v4OKkm+n7CcAMn9MEn+pM9xXXezhxv8HxqemvL SQc7GA2ayXqgmX3Pm65oK4305cNQhQvSJ0LEaPRDXM8RBm2XANDAfEn6GTo812V3xY5ZuAjzjteRf jwPphrMP7zqwtq1YAoVe8vwTrVtdsLtUrS1GbaGvTK2QcA5SnggKdKjsBKiflPV69mUymEdpHSu6O M6wZv+C2w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1guEFd-0000rM-RX; Thu, 14 Feb 2019 10:28:18 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D015920298375; Thu, 14 Feb 2019 11:28:15 +0100 (CET) Date: Thu, 14 Feb 2019 11:28:15 +0100 From: Peter Zijlstra To: Alexey Brodkin Cc: Vineet Gupta , David Laight , "linux-snps-arc@lists.infradead.org" , Arnd Bergmann , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Mark Rutland Subject: Re: [PATCH] ARC: Explicitly set ARCH_SLAB_MINALIGN = 8 Message-ID: <20190214102815.GF32494@hirez.programming.kicks-ass.net> References: <20190208105519.26750-1-abrodkin@synopsys.com> <81017fe4-b31f-4942-e822-a7b70008b74d@synopsys.com> <20190213125651.GP32494@hirez.programming.kicks-ass.net> <4881796E12491D4BB15146FE0209CE64681DB01F@DE02WEMBXB.internal.synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4881796E12491D4BB15146FE0209CE64681DB01F@DE02WEMBXB.internal.synopsys.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 14, 2019 at 08:50:43AM +0000, Alexey Brodkin wrote: > But that's pretty much the same for other 32-bit arches that have 64-bit atomics > like ARM etc. From what I may see from ARM's documentation for LDREXD/SRREXD they > require double-word alignment of data as well. > > That said if for some reason atomic64_t variable is unaligned execution on > any (or at least most) 32-bit architectures will lead to run-time failure, > i.e. we'll know about it and this will be fixed. On x86_32 we have cmpxchg8b that 'likes' 8b alignment, our atomic64_32 implementation has the explicit alignment in, however there __alignof__(unsigned long long) is actually 8, so it all works. Even though the hardware (obviously) never really requires alignment, even for atomic ops (although that's coming, yay!).