Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp257913imm; Mon, 9 Jul 2018 00:54:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdypnHcTbrFY2288W2xK+5flr/mwihZjxl2dB+y6tATxeRJin8K8DTK8/Q0N9JROKkRYgyS X-Received: by 2002:a17:902:8f94:: with SMTP id z20-v6mr19387534plo.337.1531122840754; Mon, 09 Jul 2018 00:54:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531122840; cv=none; d=google.com; s=arc-20160816; b=xtcR1vaV5p9ujTX7y45fjWitsJeV4rVVQNEaYdrZbFD+HfuKBneMb8S8zSbbtmrkZM lqSW2Wg9zUPt2MEEm2kWNQLzF7gkrU3eBz7B3Z8DGhOT4MqB/C2fkzeePcfmbhLNIRrb QfCoBAfe7jcGuxifo7TBNlX+06CCBbNIdV2IU9ItpAo21DSXOMZXXUKmxO9ONo1DwsKf 1TZ5RSsR8Cbs5bh+Ssh9O0EpEVgaiMACfsNksHV24WTcq2wa47asqlpvtp6a8dB2JmA6 z7tDAOpo2q53pjExJ4V0vbfhklQyEWhK3Y3OKM04Lzo1U99+uoPs7TdnbPCJjSl25Bt9 lTcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:arc-authentication-results; bh=/6xlBOiZlZt4cYKIuADLBCJ3aLGZA73399Vj10Xsk1A=; b=DuPcn8i8/DrZETdLAoXtHaAfI1Vy6ZVcGhjIEFlGsiZQsHw62Lb0HPJ3df56RRWl0x 2tWqjq7MKT/5mGrXbejYqZtsHJJi6QNKQugTkFhzdUh35wZeJdy5pl5FMhYDgczK9YY6 zqhNsqUPJtDiupjoYe95z3lbkFl8SephaVG/j1xblQpHziRlROvo1rrtMvIyYlG64mLC gqf2DJLKuQ1GM/Kov7Tx0sLwUDFjNFnw1Id5RBeJZoHsuvZ/Fw+uRQ4z/1xP9yytiiJh HBLMQHffMR7Aij4NkZsKy3uJ/Sm+7SlOE8HEiKwswBRLhQBX1FkfAZcRD/LlMxcJ6h8p UoZg== 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 13-v6si14253126ple.274.2018.07.09.00.53.45; Mon, 09 Jul 2018 00:54:00 -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 S1754326AbeGIHxK (ORCPT + 99 others); Mon, 9 Jul 2018 03:53:10 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:37641 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751038AbeGIHxI (ORCPT ); Mon, 9 Jul 2018 03:53:08 -0400 Received: by mail-ua0-f193.google.com with SMTP id u8-v6so11141891uao.4; Mon, 09 Jul 2018 00:53:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/6xlBOiZlZt4cYKIuADLBCJ3aLGZA73399Vj10Xsk1A=; b=a1RuHABcjzzKKcO1Z5pPSnYuY8GzCl7V5ZWb1AJ0k0u7PbWkt+NKroTqf+KVwn7wYs oi5J259Gxo0Nwc0jYF5aBn3hQiN6g2jgA29riTc6ZMRRCS4wFt56wuWIjjkpJjcRhU6M y3yVIjc2vM2UjnSwq7LxhV+SENlXqeLLscNhMPFbc+vcVtUU3ydkHu8YDxBIgcSta2kh HpNUib1lKnkYmx7KpXGTVjCCV5UEiTxQX3lMq26OMpwy3EiJVGCjiKmsQaw4Iqe3Tf1H hv9OwLNKmysOADNgY5y5K5Te+UoC3bY+RjHLaHt2acvsxBX9mz7cpEsPkUc7MCjPuvnk dwTg== X-Gm-Message-State: APt69E2id04Y5VT2iPAtXefQAwneR+sAQb/hPCuyyRgns+kuG16tK/K7 zwnpq7HPgf3GoOw+wPrH1mzV2rFJLK5/nZARgXBkMw== X-Received: by 2002:ab0:5b57:: with SMTP id v23-v6mr12116679uae.72.1531122787788; Mon, 09 Jul 2018 00:53:07 -0700 (PDT) MIME-Version: 1.0 References: <20180709044444.6397-1-abrodkin@synopsys.com> <20180709054842.GB7618@kroah.com> <71dfb71de86ebe365897b2069bec0cb40b376928.camel@synopsys.com> In-Reply-To: <71dfb71de86ebe365897b2069bec0cb40b376928.camel@synopsys.com> From: Geert Uytterhoeven Date: Mon, 9 Jul 2018 09:52:56 +0200 Message-ID: Subject: Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long To: Alexey Brodkin Cc: Thomas Gleixner , Linux Kernel Mailing List , Linux-Arch , stable , Greg KH , arcml Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alexey, On Mon, Jul 9, 2018 at 9:22 AM Alexey Brodkin wrote: > On Mon, 2018-07-09 at 09:07 +0200, Geert Uytterhoeven wrote: > > On Mon, Jul 9, 2018 at 7:49 AM Greg KH wrote: > > > On Mon, Jul 09, 2018 at 07:44:44AM +0300, Alexey Brodkin wrote: > > > > Depending on ABI "long long" type of a particular 32-bit CPU > > > > might be aligned by either word (32-bits) or double word (64-bits). > > > > Or even 16-bit (on e.g. m68k). > > Indeed, thanks for the note! > Will add this in my v3. Note that in this particular case, the field will probably always be aligned to 4 bytes, as the struct will be allocated using *alloc(). > For ARC I'd like this fix to be back-ported starting > from v4.8 where we added support of "native" atomic64_t, see commit > ce6365270ecd (" ARCv2: Implement atomic64 based on LLOCKD/SCONDD instructions"). > > What about m68k, do you have any preference of earliest kernel version > where this fix might be useful? Given m68k is 32-bit, it will access atomic64_t variables while holding a spinlock, so it should still be safe without this change. Not to mention no one will try etnaviv on m68k ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds