Received: by 10.213.65.68 with SMTP id h4csp890124imn; Wed, 4 Apr 2018 08:58:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx49me7rt2fEa2dOTdPgRNABfPID3LqLOH1ezVpS2HTSC3YDKBjF0ghsIV0wUgu6nQSDKYnbG X-Received: by 10.99.125.78 with SMTP id m14mr12455423pgn.190.1522857504279; Wed, 04 Apr 2018 08:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522857504; cv=none; d=google.com; s=arc-20160816; b=ezFcCVVGwwrHhevMeWWkHXGxUbcIICY0ZMNTMHRIqSHH5HAU7Mc05z9YX9+9WLGugR FrlH2S90goc5jV4qFHTkVYSkaGTSlzRgw4cgDPGvNxjr3Vxr/alZqj0gh2LFYFLSsFDK Mh2gxwm8RMhwlM4bpH2tKEp3pNxQ3DrPuXMtluko/srmLYkYkW/0UdPfT7CcRxyy1EzX b0vStXyxVUhTd5wjvy4MvtjxNh2GV+m2Mr4n2uWFuaY2hsgxoBY6NZ6Li3Nba8a4BeRq bZKDe/hASUchKddqj2GLjnFbG029lfsiKP1+vf+DVUAS3YqxvfvBfj6iUmbof94x1hF6 VXxQ== 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:arc-authentication-results; bh=XY7YEx9B4bU/XKw2yKTJXUb+DV0ZeROqSoGXxS6T7rc=; b=fhxyBxtGDl48XNxU+R57le30w3hFUCimyIF4pOX9A+40RWuROOjZUrJiNC+UsPEHVo 1D8zmiJrklUPPpJDdWuG4O+GdlItemA7gbkKRryAksxBULaQ5R5YFki6IZzMGP/sRA4T Xr4+T/i8Xl7z2GFaA6h1E3M0XiVOtQQbFPGXAxFhoogrIxHvo5Fz8CL31OgDf7X420C+ sdMCpDVgNxQiEfk1SmAL87hYN2dP/Dc5snVAvkUwLI4KSOfBos+J8lKBHQxo5XsV4R0v j+IJCF2ZiOsdnnyyDQIhb88xokXQyQbY2ESFIuwnzHKMgSUnx3NKCdXXJg2zgQp7s5cW VyyQ== ARC-Authentication-Results: i=1; mx.google.com; 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 91-v6si3409099plb.203.2018.04.04.08.58.10; Wed, 04 Apr 2018 08:58:24 -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; 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 S1752311AbeDDP5G (ORCPT + 99 others); Wed, 4 Apr 2018 11:57:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50632 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752207AbeDDP5E (ORCPT ); Wed, 4 Apr 2018 11:57:04 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A4D3DB78; Wed, 4 Apr 2018 15:57:03 +0000 (UTC) Date: Wed, 4 Apr 2018 17:57:04 +0200 From: Greg KH To: "Michael Kelley (EOSG)" Cc: "olaf@aepfle.de" , Stephen Hemminger , "jasowang@redhat.com" , "linux-kernel@vger.kernel.org" , "marcelo.cerri@canonical.com" , "apw@canonical.com" , "devel@linuxdriverproject.org" , "vkuznets@redhat.com" , "leann.ogasawara@canonical.com" Subject: Re: [PATCH v2 char-misc 1/1] x86/hyperv: Add interrupt handler annotations Message-ID: <20180404155704.GA5891@kroah.com> References: <1522789148-1787-1-git-send-email-mikelley@microsoft.com> <20180404081629.GA22277@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 04, 2018 at 03:47:03PM +0000, Michael Kelley (EOSG) wrote: > > -----Original Message----- > > From: Greg KH > > Sent: Wednesday, April 4, 2018 1:16 AM > > To: Michael Kelley (EOSG) > > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de; > > apw@canonical.com; vkuznets@redhat.com; jasowang@redhat.com; > > leann.ogasawara@canonical.com; marcelo.cerri@canonical.com; Stephen Hemminger > > ; KY Srinivasan > > Subject: Re: [PATCH v2 char-misc 1/1] x86/hyperv: Add interrupt handler annotations > > > > On Tue, Apr 03, 2018 at 01:59:08PM -0700, mhkelley58@gmail.com wrote: > > > From: Michael Kelley > > > > > > Add standard interrupt handler annotations to > > > hyperv_vector_handler(). > > > > > > Signed-off-by: Michael Kelley > > > --- > > > Changes in v2: > > > * Fixed From: line > > > --- > > > arch/x86/kernel/cpu/mshyperv.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c > > > index 4488cf0..20f6849 100644 > > > --- a/arch/x86/kernel/cpu/mshyperv.c > > > +++ b/arch/x86/kernel/cpu/mshyperv.c > > > @@ -41,7 +41,7 @@ static void (*hv_stimer0_handler)(void); > > > static void (*hv_kexec_handler)(void); > > > static void (*hv_crash_handler)(struct pt_regs *regs); > > > > > > -void hyperv_vector_handler(struct pt_regs *regs) > > > +__visible void __irq_entry hyperv_vector_handler(struct pt_regs *regs) > > > > What bug does this solve? What is wrong with the existing markings? > > What does __visible and __irq_entry give us that we don't already have > > and we need? > > > > Are you really using LTO that requires this marking to prevent the code > > from being removed? > > Thomas Gleixner commented on Vitaly Kuznetsov's Hyper-V reenlightenment patch > that the interrupt handler should have these annotations: see > https://lkml.org/lkml/2018/1/14/145 Ok, then someone needs to put a "Suggested-by:" or "Requested-by:" or something like that tag here, right? > I put the same annotations on the interrupt handler for stimer0 Direct Mode, > So this change makes the hyperv_vector_handler() consistent with > hv_stimer0_vector_handler() in the same source file. It does not fix any > immediate bug -- it's for consistency and alignment with what is apparently > standard practice. > > Not sure what LTO is ... That's what the __visable marking fixes! Please go at least _read_ the definition of the marking you are adding to a function before doing it. Otherwise this is just cargo-cult-coding :( thanks, greg k-h