Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1353145pxu; Sat, 24 Oct 2020 08:06:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo9e5M+WPoN7i8UkGuyOnfd6z6G44Rs9r1WSDO7AGP+Zx6+tuiE5yA6bqVtVG1l++DMK+q X-Received: by 2002:a17:906:cc8b:: with SMTP id oq11mr7620590ejb.116.1603551988625; Sat, 24 Oct 2020 08:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603551988; cv=none; d=google.com; s=arc-20160816; b=qSWUkUlQSjO6qEUOsaXIxBT9y4RW83rUD0hrPBHD87M2QMXxGjIrXusgHfOHAR+BeN OuAOSR2UXFHGoJePhfsl35IXvGYkg8CDyi9x3fUT5kLZ9gNmQoTEl8nlO+ZTHaXvg+zH oEwIwDEacGWujEBG7mlHZaWp2Eucj9ldbUdLlIpqa7Dze1QZpS9NLWciFmLchV2lSJt+ hRz5h0GENC5ErT0yzRFTHgxVLmcfsikdLaJawn0TIiw9yw5R9OWgshoUQGsXfazJWznW OUWoXf0qcRdn1IQyx5+CD9nv7cJf66A8ghcCO00+C1I8l2+WjLDSMFmG4QxGB1eI1SS6 J1uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:subject:references:in-reply-to :cc:to:from; bh=dYRujYWvrzcIGih22+61Ga7puuu3YFRB7fHNXO146F4=; b=mlH59LNK6sCxeplzDyzYOzVHCCa6ADiaK8TdJGHYMqWLqAovBL0p97AP9kYe0ufeEm Tk4zlnb/+aiXqh26kl0+yc68EgndHHOWl3iuRT8LiMDDf99DJH8hPNRG7qEhIiZPJd2v 3yGVohEhIvOCnsDdt6/eksyTME1U1XQQkb5lvT8oECmseEYwOs9d8ktDyc1EJHA4t4D1 5J96Rbxzmms4j9PpRDyIG3QrUkf7wRbBlXiDYNpBJ77NiVo9ONZOzVqjzN4DLnl0lx91 C+G/ulKvqBm+hGEt+rzmXu8KsXUPCb1i5Hv6EV93z4ALTdi35EqALzmcDWjCrv+0Lx1G tRsw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz24si16896edb.518.2020.10.24.08.06.05; Sat, 24 Oct 2020 08:06:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760933AbgJXK17 (ORCPT + 99 others); Sat, 24 Oct 2020 06:27:59 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:51663 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760929AbgJXK17 (ORCPT ); Sat, 24 Oct 2020 06:27:59 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 4CJHNs1yYGz9sV1; Sat, 24 Oct 2020 21:27:57 +1100 (AEDT) From: Michael Ellerman To: Michael Ellerman , Christophe Leroy , Paul Mackerras , Benjamin Herrenschmidt , mathieu.desnoyers@efficios.com Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org In-Reply-To: <212d3bc4a52ca71523759517bb9c61f7e477c46a.1603179582.git.christophe.leroy@csgroup.eu> References: <212d3bc4a52ca71523759517bb9c61f7e477c46a.1603179582.git.christophe.leroy@csgroup.eu> Subject: Re: [PATCH v2 1/3] powerpc/uaccess: Don't use "m<>" constraint with GCC 4.9 Message-Id: <160353524065.3419015.15517113357931210947.b4-ty@ellerman.id.au> Date: Sat, 24 Oct 2020 21:27:57 +1100 (AEDT) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Oct 2020 07:40:07 +0000 (UTC), Christophe Leroy wrote: > GCC 4.9 sometimes fails to build with "m<>" constraint in > inline assembly. > > CC lib/iov_iter.o > In file included from ./arch/powerpc/include/asm/cmpxchg.h:6:0, > from ./arch/powerpc/include/asm/atomic.h:11, > from ./include/linux/atomic.h:7, > from ./include/linux/crypto.h:15, > from ./include/crypto/hash.h:11, > from lib/iov_iter.c:2: > lib/iov_iter.c: In function 'iovec_from_user.part.30': > ./arch/powerpc/include/asm/uaccess.h:287:2: error: 'asm' operand has impossible constraints > __asm__ __volatile__( \ > ^ > ./include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > ./arch/powerpc/include/asm/uaccess.h:583:34: note: in expansion of macro 'unsafe_op_wrap' > #define unsafe_get_user(x, p, e) unsafe_op_wrap(__get_user_allowed(x, p), e) > ^ > ./arch/powerpc/include/asm/uaccess.h:329:10: note: in expansion of macro '__get_user_asm' > case 4: __get_user_asm(x, (u32 __user *)ptr, retval, "lwz"); break; \ > ^ > ./arch/powerpc/include/asm/uaccess.h:363:3: note: in expansion of macro '__get_user_size_allowed' > __get_user_size_allowed(__gu_val, __gu_addr, __gu_size, __gu_err); \ > ^ > ./arch/powerpc/include/asm/uaccess.h:100:2: note: in expansion of macro '__get_user_nocheck' > __get_user_nocheck((x), (ptr), sizeof(*(ptr)), false) > ^ > ./arch/powerpc/include/asm/uaccess.h:583:49: note: in expansion of macro '__get_user_allowed' > #define unsafe_get_user(x, p, e) unsafe_op_wrap(__get_user_allowed(x, p), e) > ^ > lib/iov_iter.c:1663:3: note: in expansion of macro 'unsafe_get_user' > unsafe_get_user(len, &uiov[i].iov_len, uaccess_end); > ^ > make[1]: *** [scripts/Makefile.build:283: lib/iov_iter.o] Error 1 > > [...] Patch 1 applied to powerpc/fixes. [1/3] powerpc/uaccess: Don't use "m<>" constraint with GCC 4.9 https://git.kernel.org/powerpc/c/592bbe9c505d9a0ef69260f8c8263df47da2698e cheers