From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Kagan Subject: [PATCH 03/15] hyperv: use standard bitops Date: Tue, 20 Dec 2016 18:55:50 +0300 Message-ID: <20161220155602.6298-4-rkagan@virtuozzo.com> References: <20161220155602.6298-1-rkagan@virtuozzo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, "Denis V . Lunev" , Haiyang Zhang , x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Roman Kagan , "H. Peter Anvin" , devel@linuxdriverproject.org, Thomas Gleixner To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , "K. Y. Srinivasan" , Vitaly Kuznetsov Return-path: In-Reply-To: <20161220155602.6298-1-rkagan@virtuozzo.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: kvm.vger.kernel.org Signed-off-by: Roman Kagan --- drivers/hv/channel.c | 8 +++----- drivers/hv/connection.c | 9 +++------ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 5fb4c6d..f9df275 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -49,15 +49,13 @@ void vmbus_setevent(struct vmbus_channel *channel) */ if ((channel->offermsg.monitor_allocated) && (!channel->low_latency)) { - /* Each u32 represents 32 channels */ - sync_set_bit(channel->offermsg.child_relid & 31, - (unsigned long *) vmbus_connection.send_int_page + - (channel->offermsg.child_relid >> 5)); + set_bit(channel->offermsg.child_relid, + (unsigned long *)vmbus_connection.send_int_page); /* Get the child to parent monitor page */ monitorpage = vmbus_connection.monitor_pages[1]; - sync_set_bit(channel->monitor_bit, + set_bit(channel->monitor_bit, (unsigned long *)&monitorpage->trigger_group [channel->monitor_grp].pending); diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index aaa2103..139b33e 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -468,12 +468,9 @@ void vmbus_set_event(struct vmbus_channel *channel) { u32 child_relid = channel->offermsg.child_relid; - if (!channel->is_dedicated_interrupt) { - /* Each u32 represents 32 channels */ - sync_set_bit(child_relid & 31, - (unsigned long *)vmbus_connection.send_int_page + - (child_relid >> 5)); - } + if (!channel->is_dedicated_interrupt) + set_bit(child_relid, + (unsigned long *)vmbus_connection.send_int_page); hv_do_hypercall(HVCALL_SIGNAL_EVENT, channel->sig_event, NULL); } -- 2.9.3