Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4344403ybf; Wed, 4 Mar 2020 02:05:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vuvwC0RnjyVGIg2QnwuA+Z1FzZfF+9PvYzP48kOVQTu3kjyMuyrjxSoyNAimReEGpVIRq3u X-Received: by 2002:a9d:70ce:: with SMTP id w14mr1784970otj.194.1583316305284; Wed, 04 Mar 2020 02:05:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583316305; cv=none; d=google.com; s=arc-20160816; b=NI9p6HWwmTFt+7tqDjW3YouafnvpfDGgIU/lP5wd0n5D2Hb00/AFG9MGAZ/f3iOoS0 XjgjIPjtHJSXnCc5u52n9+9gY9o2S/7JsjJ1OD8D1vTSD10OZ8ERQOlttQICAxKk7PEy nnBfbgC2rM9+S2FQAthHmQgw32mtnx0v3xfrRwMxFLb23wXhvvxJ5R/aq0XH0M1qqbm8 5UnGFkVrMzvmHND9HGV9QQwNSL01lgHVyQ93Ee6BSSzTRPf8RIphKWVuDlZDELk3MMoT dXJ/f7YF+Jp6P3crahv3dXF4wDOEU7fIuZjspgUb+ni99zBaRtC5bFyPTPqHvAXLAmoO JpRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=joc6mkpsAJhcX0YbSolxXtfYnAc+3nHjCaHtP4av6cA=; b=hetApTeIgP0+NvOIwRad4HQ6bptRE3GW8094LWmmTJHceLQmgRi7ocWQTARXiQPyqs al6QZy4Upma0vdrWPg9Or6BGmDg1ISJcTgYj5hQXm/XR+e/UZtxlFoNhoDGkuNojiW8U yukYaghbGiycak3Wy0EiOethG0gg6xhhboQ7eudAkpk2hZvjW4h7K3Glmii13odLZ1qk onBVLVcqx2XUciysNALQMhTQQyyXPXXJfbahdn57LSI2ut9MaOkiFXhZGO4LjB4sZ7SA frbO9g+8Fcwi0qyXY6dKgigj403wpUZo1eIDG3pZ2CRRadBPty8JulHZeX7ZEH3kLeTg Rb2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="SJy5M/ff"; 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 z16si882443oia.151.2020.03.04.02.04.53; Wed, 04 Mar 2020 02:05:05 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="SJy5M/ff"; 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 S1729138AbgCDKEo (ORCPT + 99 others); Wed, 4 Mar 2020 05:04:44 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:54284 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbgCDKEo (ORCPT ); Wed, 4 Mar 2020 05:04:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=joc6mkpsAJhcX0YbSolxXtfYnAc+3nHjCaHtP4av6cA=; b=SJy5M/ffBE1p9hJhif0f8H62mq hEX2p1T7p2fmGz0zJQJ9bgotX/ie27/bPzy4ZJCya+QsQYcA/NGPslBJlpDuu6vodH+MwhcpHtoeO 2OIX/ztQ/gj5RMwHNndjuRtPW37hpJwjphRsVknIRPL0MPH6snmxX3NaQLYoqucw37WVEO/MDQ+zb B72Zh6wpkL1i55feEvJSOZOfIxuelto44mvAjfgHREW57zd5/stIByD5PvGy3KvrOmym0opWWdzF6 fGnrVFZSn3GPDp22KXP1pwYEuVB3PeUvNENlJjQve2/6BVzQolYNBjtIxWJmCIpfjkruLPPoSjBVj F4V3FnkA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j9QtL-0001om-Vx; Wed, 04 Mar 2020 10:04:40 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8E35D3013A4; Wed, 4 Mar 2020 11:02:39 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 12DBF20BCBDC5; Wed, 4 Mar 2020 11:04:38 +0100 (CET) Date: Wed, 4 Mar 2020 11:04:38 +0100 From: Peter Zijlstra To: hpa@zytor.com Cc: Alexey Dobriyan , rjw@rjwysocki.net, lenb@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, luto@kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH] x86/acpi: make "asmlinkage" part first thing in the function definition Message-ID: <20200304100437.GM2596@hirez.programming.kicks-ass.net> References: <20200303204144.GA9913@avx2> <9947D7CB-B9CD-47E0-BC5E-C7FC3A81FC7B@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9947D7CB-B9CD-47E0-BC5E-C7FC3A81FC7B@zytor.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 04, 2020 at 12:54:09AM -0800, hpa@zytor.com wrote: > On March 3, 2020 12:41:44 PM PST, Alexey Dobriyan wrote: > >g++ insists that function declaration must start with extern "C" > >(which asmlinkage expands to). > > > >gcc doesn't care. > > > >Signed-off-by: _Z6Alexeyv > >--- > > > > arch/x86/kernel/acpi/sleep.c | 2 +- > > arch/x86/kernel/acpi/sleep.h | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > >--- a/arch/x86/kernel/acpi/sleep.c > >+++ b/arch/x86/kernel/acpi/sleep.c > >@@ -43,7 +43,7 @@ unsigned long acpi_get_wakeup_address(void) > > * > > * Wrapper around acpi_enter_sleep_state() to be called by assmebly. > > */ > >-acpi_status asmlinkage __visible x86_acpi_enter_sleep_state(u8 state) > >+asmlinkage acpi_status __visible x86_acpi_enter_sleep_state(u8 state) > > { > > return acpi_enter_sleep_state(state); > > } > >--- a/arch/x86/kernel/acpi/sleep.h > >+++ b/arch/x86/kernel/acpi/sleep.h > >@@ -19,4 +19,4 @@ extern void do_suspend_lowlevel(void); > > > > extern int x86_acpi_suspend_lowlevel(void); > > > >-acpi_status asmlinkage x86_acpi_enter_sleep_state(u8 state); > >+asmlinkage acpi_status x86_acpi_enter_sleep_state(u8 state); > > Are you building the kernel with C++?! He is :-) IIRC he's got a whole bunch of patches that removes all the C++ keywords from the kernel.