Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2252340pxk; Sat, 5 Sep 2020 14:38:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdhtSXOrNsiFgpjjuYZYRNVl1AObnn44izgSZux+FlN264OxgvFVyRweAgmSFU3lPNrbsA X-Received: by 2002:a17:907:104c:: with SMTP id oy12mr14295130ejb.450.1599341895972; Sat, 05 Sep 2020 14:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599341895; cv=none; d=google.com; s=arc-20160816; b=Gk4DebQxpW6l8A6Vw8LCkIybsIb3ElS3S+5+beYVbuwV9n879PKDSD0anL5+/CZOpL 8T1+oicaAKp7VAGJQe0tZbLpcMN7PDJQrfWt+VJyOSeAhXZ7sPTPVzH1VpZ0gmpriJk6 i7zDmMTAdxq2+I7TEqCCRKY5JX38GAm8I5Am699QI3o+wLALLSJVjFk6jhv845abTNUg uK52/vR3Wq9Of580yVcFZttyuq+/92Kw9PkjX+kbgE2g+Q0j+D7FoMWIC0h7rZXX4FsT AFXl9ekdLTu31k+m1lWmiSRIXEcf77TsJzCh3WDKuZ/NUlKknSOUimtTYxGxeRqfdNiP aXmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Qk4slgfid1yPByHqYlwQFEuSRddQf9kuyAkrPfErQjg=; b=FUsTdphQgZE2cUmE5gWOEIN5XMASf3qy32M4vHvxc5aKz3v3l2+E660GGezSZjZWrF ym8ckdhWATV5okMg0DO8n41S+n/ry68lifxIkaOCxHHAkEDs6uMo8Nu4xqgKpLRpQFRK bvDLYgC/qatnOYorpJ90krKiccHo466p5LA/5PqwwruWWvGm0yPoFNy0W0yqraQtocCp FsA8m9+P8KgOD514/UTkzRERLZi2ra6WaVvAz2bSf3vdLuNjYVhHAc0DAxeaGr4ObVyC 82cnp/EuPRvIgi869W9myqUMSGhYeXtMMap9am+Q7dZky1b9haGhuwOlbpYnvwrwuIYr QHvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WlVgjmdV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si7647863ejd.265.2020.09.05.14.37.51; Sat, 05 Sep 2020 14:38:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WlVgjmdV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728647AbgIEVeO (ORCPT + 99 others); Sat, 5 Sep 2020 17:34:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbgIEVeN (ORCPT ); Sat, 5 Sep 2020 17:34:13 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFD61C061244 for ; Sat, 5 Sep 2020 14:34:11 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id a8so2740103plm.2 for ; Sat, 05 Sep 2020 14:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Qk4slgfid1yPByHqYlwQFEuSRddQf9kuyAkrPfErQjg=; b=WlVgjmdVfdyU8pU/+PGGtpMTnKySdx4q36fU9wgecVCQ9lEg6XpJcuUeleFuJ+JRgV 3uzS0+4jHXBXokhpPV2+w+0Ifdop36SjFUIZE8k+SscsyUrTI5jYGHTnY2uJmdWuP8Kb bMuTPgC1guHZTOFgZXeHGuDdt1C57tdioBt2kIbh1vDhw0uZCvQFKRhqPh+dpZd9RYK5 EES3GokZZ471TqFAJpBCYB0O1MMgkk0tOrTUHBMN+qrZKapFBO/aKX7uinmSOW/vpbV5 wo/rr264kNHCxeT2ML5BzhnBKIgm7d9vaGzuPeJ5yM5ft488R5lnL8FbbSNWi1Ed9OiL 3tkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Qk4slgfid1yPByHqYlwQFEuSRddQf9kuyAkrPfErQjg=; b=I4x/WNSh7QkVfAfK6PRvVCdDdlmS4s4iPQ/2499iVaRub8ath/ojMAUuQO87yptuWE Q1DptYmYR/ZxwI514EBQ2eOgL9ABQoVLVJ7IwqqJrWCdXAAIzNz6kPdwRgPGmwSYK7ha Fb+mTOisWFeYFRfJ4vv4s6xr4AbPFmfRmWZI0NmLppLFJgHxlBSU8TmOmVhca4rRu4nh Y6MwwmGO0fAj4ZycpFvjQQSYCpg4TIrVgqLlZS6XJfi7+S87UtPmADLtPO1FeI4OICOA ZvMXZSVIRFXNW8IPFQpDWxXofyn8ff+7EsJPc9x6LuHneRmDMfhF9MgrzQG2tXx4BFm3 b+pg== X-Gm-Message-State: AOAM5300WGDWg/ZfNWRzbV+bF5DijAHgPTfc3LREljE9kKru2wK89uxS U0iqe8QxIXA70IssH2n1Nr4= X-Received: by 2002:a17:90a:f198:: with SMTP id bv24mr14533985pjb.117.1599341651203; Sat, 05 Sep 2020 14:34:11 -0700 (PDT) Received: from localhost (g223.115-65-55.ppp.wakwak.ne.jp. [115.65.55.223]) by smtp.gmail.com with ESMTPSA id u138sm10713710pfc.218.2020.09.05.14.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2020 14:34:10 -0700 (PDT) Date: Sun, 6 Sep 2020 06:34:08 +0900 From: Stafford Horne To: Luc Van Oostenryck Cc: LKML , Jonas Bonn , Stefan Kristiansson , Andrew Morton , Geert Uytterhoeven , Greentime Hu , openrisc@lists.librecores.org Subject: Re: [PATCH v2 3/3] openrisc: Fix issue with get_user for 64-bit values Message-ID: <20200905213408.GI3562056@lianli.shorne-pla.net> References: <20200905131935.972386-1-shorne@gmail.com> <20200905131935.972386-4-shorne@gmail.com> <20200905135714.74bsr5h423k7guw4@ltop.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200905135714.74bsr5h423k7guw4@ltop.local> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 05, 2020 at 03:57:14PM +0200, Luc Van Oostenryck wrote: > On Sat, Sep 05, 2020 at 10:19:35PM +0900, Stafford Horne wrote: > > Hi, > > The change for 64-bit get_user() looks good to me. > But I wonder, given that openrisc is big-endian, what will happen > you have the opposite situation: > u32 *ptr; > u64 val; > ... > get_user(val, ptr); > > Won't you end with the value in the most significant part of > the register pair? Hi Luc, The get_user function uses the size of the ptr to determine how to do the load , so this case would not use the 64-bit pair register logic. I think it should be ok, the end result would be the same as c code: var = *ptr; -Stafford