From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
Cc: KY Srinivasan <kys@microsoft.com>,
Stephen Hemminger <stephen@networkplumber.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
"olaf@aepfle.de" <olaf@aepfle.de>,
"apw@canonical.com" <apw@canonical.com>,
"vkuznets@redhat.com" <vkuznets@redhat.com>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"leann.ogasawara@canonical.com" <leann.ogasawara@canonical.com>,
"marcelo.cerri@canonical.com" <marcelo.cerri@canonical.com>,
Stephen Hemminger <sthemmin@microsoft.com>
Subject: Re: [PATCH 08/12] Drivers: hv: vmbus: Implement Direct Mode for stimer0
Date: Wed, 14 Feb 2018 10:34:34 +0300 [thread overview]
Message-ID: <20180214073434.3u7l7nnncvujstyp@mwanda> (raw)
In-Reply-To: <DM5PR2101MB1030958D199D3D111440F1A1DCF50@DM5PR2101MB1030.namprd21.prod.outlook.com>
On Wed, Feb 14, 2018 at 02:58:41AM +0000, Michael Kelley (EOSG) wrote:
> > -----Original Message-----
> > From: Dan Carpenter <dan.carpenter@oracle.com>
> > Sent: Monday, February 12, 2018 12:42 AM
> > To: KY Srinivasan <kys@microsoft.com>; Stephen Hemminger
> > <stephen@networkplumber.org>
> > Cc: gregkh@linuxfoundation.org; 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
> > <sthemmin@microsoft.com>; Michael Kelley (EOSG) <Michael.H.Kelley@microsoft.com>
> > Subject: Re: [PATCH 08/12] Drivers: hv: vmbus: Implement Direct Mode for stimer0
> >
> > On Sun, Feb 11, 2018 at 05:33:16PM -0700, kys@exchange.microsoft.com wrote:
> > > @@ -116,9 +146,29 @@ static int hv_ce_set_oneshot(struct clock_event_device *evt)
> > > {
> > > union hv_timer_config timer_cfg;
> > >
> > > + timer_cfg.as_uint64 = 0;
> > > timer_cfg.enable = 1;
> > > timer_cfg.auto_enable = 1;
> > > - timer_cfg.sintx = VMBUS_MESSAGE_SINT;
> > > + if (direct_mode_enabled)
> > > + /*
> > > + * When it expires, the timer will directly interrupt
> > > + * on the specified hardware vector/IRQ.
> > > + */
> > > + {
> > > + timer_cfg.direct_mode = 1;
> > > + timer_cfg.apic_vector = stimer0_vector;
> > > + hv_enable_stimer0_percpu_irq(stimer0_irq);
> > > + }
> > > + else
> > > + /*
> > > + * When it expires, the timer will generate a VMbus message,
> > > + * to be handled by the normal VMbus interrupt handler.
> > > + */
> > > + {
> > > + timer_cfg.direct_mode = 0;
> > > + timer_cfg.sintx = VMBUS_MESSAGE_SINT;
> > > + }
> > > +
> >
> > This indenting isn't right. We should probably zero out .apic_vector
> > if .direct_mode is zero. Or maybe it's fine. I don't know if any
> > static analysis tools will complain...
>
> I'll fix the indenting. Old habits ....
>
> The " timer_cfg.as_uint64 = 0" statement already zero's out .apic_vector
> along with all the other unused fields in the 64-bit value, as required by
> the Hyper-V spec.
Ah, you're right, of course.
regards,
dan carpenter
next prev parent reply other threads:[~2018-02-14 7:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 0:29 [PATCH 00/12] Drivers: hv: Miscellaneous fixes kys
2018-02-12 0:33 ` [PATCH 01/12] tools/hv: Fix IP reporting by KVP daemon with SRIOV kys
2018-02-12 0:33 ` [PATCH 02/12] hyper-v: use GFP_KERNEL for hv_context.hv_numa_map kys
2018-02-12 0:33 ` [PATCH 03/12] hv: Synthetic typo correction kys
2018-02-12 0:33 ` [PATCH 04/12] tools: hv: fix compiler warnings about major/target_fname kys
2018-02-12 0:33 ` [PATCH 05/12] tools: hv: include string.h in hv_fcopy_daemon kys
2018-02-12 0:33 ` [PATCH 06/12] vmbus/ring_buffer: remove some redundant helper function kys
2018-02-12 0:33 ` [PATCH 07/12] hv_vmbus: Correct the stale comments regarding cpu affinity kys
2018-02-12 0:33 ` [PATCH 08/12] Drivers: hv: vmbus: Implement Direct Mode for stimer0 kys
2018-02-12 8:42 ` Dan Carpenter
2018-02-14 2:58 ` Michael Kelley (EOSG)
2018-02-14 7:34 ` Dan Carpenter [this message]
2018-02-12 0:33 ` [PATCH 09/12] hv_balloon: fix printk loglevel kys
2018-02-12 0:33 ` [PATCH 10/12] hv_balloon: simplify hv_online_page()/hv_page_online_one() kys
2018-02-12 0:33 ` [PATCH 11/12] hv_balloon: fix bugs in num_pages_onlined accounting kys
2018-02-12 0:38 ` [PATCH 12/12] hv_balloon: trace post_status kys
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180214073434.3u7l7nnncvujstyp@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Michael.H.Kelley@microsoft.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=leann.ogasawara@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.cerri@canonical.com \
--cc=olaf@aepfle.de \
--cc=stephen@networkplumber.org \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®