Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2375568pxj; Mon, 10 May 2021 01:06:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0Uhuz1jftwZ8I/4yyWz0L204lzhhlKAqJY5w69Djd5AM8eabvNSRq5Z+hTNukiUqI87IL X-Received: by 2002:a05:6602:55:: with SMTP id z21mr6122941ioz.54.1620634002701; Mon, 10 May 2021 01:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620634002; cv=none; d=google.com; s=arc-20160816; b=jdgAbl2RNemjWrLJmsf82h6wmbNfUrpnaDMuuYC0mIvXaMNmKMxJEvN6X7cqivVeiE ecVYOPKXtCXz1BNrJGxUUDEKiliSof9jz8iE/+hbo9ph6C5D9D0kQ1oRN6W2XZVTUhAy tlz5m0FuOVcuQDYYSHPhPSaOGiJYDtYDwb2pk1JmL/djw2tuZeD7bjaMi75u8l17KjF9 BOivVthM3ECaAEhEyNY0sg8kJq6/ZeC/HJHaF6KG70runnBkvG6BMvoVmIUIgAs/0HS7 V/J33JIwDoOPu8r+SwLMZt6RXN+S0gsbWSVzNZOlKC3biFGuschRml7YQ54gKbOTb27G Bfpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+rMRqhlav8PSD3WGfNcjzlbBvkCmhpW6OzLvC2706gY=; b=LuT6Y7SwIVxlC+IiD609HW5/JMOEVVi4WDWGvZF5EnyRSMIgu4kMslS7HVxsvMEA+a ZomtQcpHXt3WP5A73bM2ZZS/QWGlU8BICWNC9kIXEuxk6J7sIuewEVx6rVnP5NE5F1dt GLmpfdVeaA+oViyngguX5i971rpJRZC4BdIkZKZPg3xPsgMoMz51kjgO8uIf9+QJceni SJgr0NSlApnBCWAOnv+wAzgL4dmcvLEegd3R8xOCvC/7+gvxgBcEm7wwoqEdoc98vND3 uJ28XmeDaGbBfPBznPOqfa2vHMFqGHZnnrhz0bbrzZlzXqI3wKQQabepcl/d3ujXo8EZ Idig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1BOnYO8k; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si729309ilu.88.2021.05.10.01.06.30; Mon, 10 May 2021 01:06:42 -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=@linuxfoundation.org header.s=korg header.b=1BOnYO8k; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230187AbhEJIE6 (ORCPT + 99 others); Mon, 10 May 2021 04:04:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:35978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229852AbhEJIE5 (ORCPT ); Mon, 10 May 2021 04:04:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D41DD61108; Mon, 10 May 2021 08:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620633833; bh=3pVlZd3endQBC1asJ5OJ1LBt8LcXCHuSEw4u58gmNgg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1BOnYO8kW6IDQ469LmdKmEzDvbwEK+bfcPtTBh/BbPZEWMwQjN0Eq7HZ2gz9MhDVU yPB0Mu8ysv1TFX2tDJw851gUD0GyVaF64BxB5UN0oR4keLu66BtGJPkmUOFOn41L7j k+rI4b+W/6awXs88loMN0gYfqvj9AFZfFRAtiBOs= Date: Mon, 10 May 2021 10:03:51 +0200 From: Greg KH To: Nathan Chancellor Cc: Jian Cai , sashal@kernel.org, will@kernel.org, catalin.marinas@arm.com, stable@vger.kernel.org, ndesaulniers@google.com, manojgupta@google.com, llozano@google.com, clang-built-linux@googlegroups.com, Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4.19 ONLY v4] arm64: vdso: remove commas between macro name and arguments Message-ID: References: <20210506012508.3822221-1-jiancai@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 06, 2021 at 10:43:33AM -0700, Nathan Chancellor wrote: > On 5/5/2021 6:25 PM, Jian Cai wrote: > > LLVM's integrated assembler appears to assume an argument with default > > value is passed whenever it sees a comma right after the macro name. > > It will be fine if the number of following arguments is one less than > > the number of parameters specified in the macro definition. Otherwise, > > it fails. For example, the following code works: > > > > $ cat foo.s > > .macro foo arg1=2, arg2=4 > > ldr r0, [r1, #\arg1] > > ldr r0, [r1, #\arg2] > > .endm > > > > foo, arg2=8 > > > > $ llvm-mc -triple=armv7a -filetype=obj foo.s -o ias.o > > arm-linux-gnueabihf-objdump -dr ias.o > > > > ias.o: file format elf32-littlearm > > > > Disassembly of section .text: > > > > 00000000 <.text>: > > 0: e5910001 ldr r0, [r1, #2] > > 4: e5910003 ldr r0, [r1, #8] > > > > While the the following code would fail: > > > > $ cat foo.s > > .macro foo arg1=2, arg2=4 > > ldr r0, [r1, #\arg1] > > ldr r0, [r1, #\arg2] > > .endm > > > > foo, arg1=2, arg2=8 > > > > $ llvm-mc -triple=armv7a -filetype=obj foo.s -o ias.o > > foo.s:6:14: error: too many positional arguments > > foo, arg1=2, arg2=8 > > > > This causes build failures as follows: > > > > arch/arm64/kernel/vdso/gettimeofday.S:230:24: error: too many positional > > arguments > > clock_gettime_return, shift=1 > > ^ > > arch/arm64/kernel/vdso/gettimeofday.S:253:24: error: too many positional > > arguments > > clock_gettime_return, shift=1 > > ^ > > arch/arm64/kernel/vdso/gettimeofday.S:274:24: error: too many positional > > arguments > > clock_gettime_return, shift=1 > > > > This error is not in mainline because commit 28b1a824a4f4 ("arm64: vdso: > > Substitute gettimeofday() with C implementation") rewrote this assembler > > file in C as part of a 25 patch series that is unsuitable for stable. > > Just remove the comma in the clock_gettime_return invocations in 4.19 so > > that GNU as and LLVM's integrated assembler work the same. > > > > Link: > > https://github.com/ClangBuiltLinux/linux/issues/1349 > > > > Suggested-by: Nathan Chancellor > > Signed-off-by: Jian Cai > > Thanks for the updated example and explanation, this looks good to me now. > > Reviewed-by: Nathan Chancellor Now queued up, thanks. greg k-h