Received: by 10.223.164.221 with SMTP id h29csp1124123wrb; Wed, 1 Nov 2017 10:49:59 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TN+JXlZXDu7RChyXtd6qggay9VS86Rp7Sot+kflyWEv6oph/XjfEMktB23JAScppLXQNmh X-Received: by 10.99.172.83 with SMTP id z19mr705226pgn.46.1509558598972; Wed, 01 Nov 2017 10:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509558598; cv=none; d=google.com; s=arc-20160816; b=Z0oIsxRO1fWTP/Di88S6puQaUwLLy22Yn5arAp8a/5CoBij6mLrCHtDLsbvzXPtn9Q hyk2vR5OpAvBlCEiBrvievB+AqaDshmaBmDBmItrIhPQRkHycPdo/1JPFivPkY1j/7iX lHymVb7h/qVTrGC5tf2tBUrfQ3Hhy/ietsUJUc/HvUqGoq3ilz2LoKtmDs3SJlRc6eak dvzWOzX6RwbAmSoq2MY2W4Aby7ppfkFbynFeSXFNTk+ooUM3RpeEmzsF3RmQKHYi8tSe IR1ifQK+5HOGdHmx8sptiKa/9hkrnkpZx9ckzjL8MePtDh30LYZRCVHwFU5wg6Wf70sb tCjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=fhvGMek9dDjsJTROqj+SiAHxj2DrsEELrDy1zHa9PIA=; b=HtDj1VZEMWk/VbpnegqXBFmNZ6Pq8CSyOUT5q6rgaC9ewtOhYElv+kYARS6pErdppp 9VIYlOeIIALHT1D7b1AREKIB8NdtHQ3QaODfepo/rr5gZgt6kwIxtY3k+fJfCSPZMGdq dxA/vFwvqCkSTteamqD/XPvwfiZh+xKkRaSkWp/yf3gzWL7mU+AibgT5TKudOiHv3AnX lPE/ZTDtpmgzhH/mboWhE3glxosOpYz7t5yklo9+u4DglcvGy9OpQHHXYfPou+WGozSE j2AFezD59m2JOX7gtFhw/zoDxHVkUAJkec/VVA8pUstgoTpPPZRm8wBL+LQkaTlDlew/ vTXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=aXlDe4j0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=android.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p86si1640671pfd.295.2017.11.01.10.49.44; Wed, 01 Nov 2017 10:49:58 -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; dkim=pass header.i=@android.com header.s=20161025 header.b=aXlDe4j0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=android.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755051AbdKARtE (ORCPT + 99 others); Wed, 1 Nov 2017 13:49:04 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:50965 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751540AbdKARtC (ORCPT ); Wed, 1 Nov 2017 13:49:02 -0400 Received: by mail-io0-f193.google.com with SMTP id 97so7827043iok.7 for ; Wed, 01 Nov 2017 10:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=fhvGMek9dDjsJTROqj+SiAHxj2DrsEELrDy1zHa9PIA=; b=aXlDe4j0QwsA7xmx3jQCYomoGyE+YaS6yaXDDU73H52VWrpk9BEcfw99O+ocAb4oZq QukeiDkMSXcSpnqbsQPgloJ2sA0QSbCb8JZNte7vuW891cMG+vmFB6UhgPNfZC+420yx KdJR9zKYi23Cle2MptOOmBMw4ElQCBe4LRpQSnCx1NmXUj5vMBS0LnHZAjSajUMwiJ9h cwycVjBvzCJPOj8P9Ud++tGv59cX+lROAsOpFgv5boJxmSK0XuaPOab9j3FzKxeiWcYn 7Z1xb8MoPYFFVvFq7HRv3P87Aw913tzTX4712C65fq3xKZ0g7FyL2TQ3rzysRRpF4eOB HSoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=fhvGMek9dDjsJTROqj+SiAHxj2DrsEELrDy1zHa9PIA=; b=RPGn+d73VBSgogH+0uaYDjVeoUcInud48JYvvR1sDLVq3L36t0o8aYJ1tIdTe5Wa9G P9owMCpM9FzHk1YMw1YB5XthkobQRoRU7xNb8ww3CUS8RH706SzqWqHYvwpX/d4bAbQa AXFhmMZMpegJN5wZb2secuL/Zr8fgVDZ8mQplP+8XUzcKxdUOcs8ySBPK7HLMJYpP18O 8VXhUtszT6E30APsMEeHaEfQrn2tHBK3iOdzbZOAW6P3tgwHCldvnp1MlUm/cZV8ixDE Wmg3wXTDOoj0TfP4Z66Inu/+Fv0QcTWFiWXJaE1Ky0GZdSO7NbAv//0/StzQX4mmP3iv doTQ== X-Gm-Message-State: AJaThX7DUgWHGYLTej1CExs2tnGwHj1g34IwoGmwFomteGVrnNnuaCFb AapB3ygAHeQ9RUA7ryCqkMrs+w== X-Received: by 10.107.150.67 with SMTP id y64mr880550iod.74.1509558541730; Wed, 01 Nov 2017 10:49:01 -0700 (PDT) Received: from nebulus.mtv.corp.google.com ([2620:0:1000:1612:7089:24e6:dc42:fa12]) by smtp.googlemail.com with ESMTPSA id z8sm642297itc.41.2017.11.01.10.49.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Nov 2017 10:49:01 -0700 (PDT) Subject: Re: [PATCH] arm64: write_sysreg asm illegal for aarch32 To: Robin Murphy , linux-kernel@vger.kernel.org Cc: Mark Rutland , Christoffer Dall , Stefan Traby , Suzuki K Poulose , Marc Zyngier , Catalin Marinas , Will Deacon , Dave Martin , linux-arm-kernel@lists.infradead.org References: <20171101170014.20931-1-salyzyn@android.com> <35cf2062-f27e-16e6-19b1-cae5200d7081@arm.com> From: Mark Salyzyn Message-ID: <24cdf320-35e3-76f2-6e07-8b5548ac67a0@android.com> Date: Wed, 1 Nov 2017 10:49:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <35cf2062-f27e-16e6-19b1-cae5200d7081@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/01/2017 10:14 AM, Robin Murphy wrote: > On 01/11/17 16:58, Mark Salyzyn wrote: >> Cross compiling to aarch32 (for vdso32) using clang correctly >> identifies that (the unused) write_sysreg inline asm directive is >> illegal in that architectural context: >> >> arch/arm64/include/asm/arch_timer.h: error: invalid input constraint 'rZ' in asm >> write_sysreg(cntkctl, cntkctl_el1); >> ^ >> arch/arm64/include/asm/sysreg.h: note: expanded from macro 'write_sysreg' >> : : "rZ" (__val)); >> ^ >> >> GCC normally checks for correctness everywhere. But uniquely for >> unused asm, will optimize out and suppress the error report. > It sounds more like some paths are wrong in the compat vDSO build if > it's pulling in this header in the first place - nothing in this file is > relevant to AArch32. > > Robin. > And yet, when you CROSS_COMPILE_ARM32 a vdso32, you have no choice but to utilize the arm64 headers since they contain all the relevant kernel structures and environment. asm/arch_timer.h (remember we are using arm instructions to access arch64 timers) linux/time.h (really only for struct timespec()) asm/processor.h (eg: cpu_relax()) pull in a _lot_ of architectural related cruft that always somehow picks up asm/sysreg.h somewhere in the multitude of includes to fulfill some unused inline's needs. -- Mark From 1582884780858053784@xxx Wed Nov 01 17:16:01 +0000 2017 X-GM-THRID: 1582883904992468824 X-Gmail-Labels: Inbox,Category Forums