Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760499AbcLUTYL (ORCPT ); Wed, 21 Dec 2016 14:24:11 -0500 Received: from mail-sn1nam02on0104.outbound.protection.outlook.com ([104.47.36.104]:10716 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760223AbcLUTYJ (ORCPT ); Wed, 21 Dec 2016 14:24:09 -0500 X-Greylist: delayed 943 seconds by postgrey-1.27 at vger.kernel.org; Wed, 21 Dec 2016 14:24:09 EST From: KY Srinivasan To: Roman Kagan , Paolo Bonzini , =?iso-8859-2?Q?Radim_Kr=E8m=E1=F8?= , Vitaly Kuznetsov CC: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , "Haiyang Zhang" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "Denis V . Lunev" Subject: RE: [PATCH 03/15] hyperv: use standard bitops Thread-Topic: [PATCH 03/15] hyperv: use standard bitops Thread-Index: AQHSWtmrb7OU6vaXIUaYMn6LMqyFB6ESxIfw Date: Wed, 21 Dec 2016 19:08:24 +0000 Message-ID: References: <20161220155602.6298-1-rkagan@virtuozzo.com> <20161220155602.6298-4-rkagan@virtuozzo.com> In-Reply-To: <20161220155602.6298-4-rkagan@virtuozzo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=kys@microsoft.com; x-originating-ip: [2601:600:8c00:1040:b076:3b2a:409c:285e] x-ms-office365-filtering-correlation-id: 1a198f8a-49e8-42b3-b478-08d429d4bd18 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR03MB1424; x-microsoft-exchange-diagnostics: 1;CY1PR03MB1424;7:wfyg1P1/e9rYfbq2csZZPN4bFT3HsB3Q/MeVpLtQgniMTMpohhtQv0WIpiaJZjp5g7eEHlFC13WAshYXp4CvRUipCvY3ELH4HybPNCciA/wKFo4lIE3UOZc2M+lBCHK6x5EGHemcPE4NMAuzaldxCaRLnnFVBqGO3tRB+YeKTmQ8FZrZ0cke6X4JWol9Dzfh08XG3m+UfizV35Wt1l7m2KQ+3Khncx6pM1QYQ/ArZLbapGATyH6HaCwVuhV571bsd16Y/vWK+WgsRyF7stvCBIxMo9Nu1m0K3CShBeEWAVfdwTvX38CEgUFIU6Kvkbu7Qv0FQ2NLX1GtQFBtJ+iCmgiTvZahaMTMLF0KeNlXQ+QjFGTDXc4+StL41mn0AF9SwTiILwipoTLlvguItxzu5vtMKxJH+dbU1Qp7LwJM0bVv2z7ppGQwg2AXGi0rTpEoVwCR+Gkjbr8YMiktEzSPdmkSDX+smTgIs2lbYX5xUCw= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123562025)(6072148)(6047074);SRVR:CY1PR03MB1424;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1424; x-forefront-prvs: 01630974C0 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(39410400002)(39840400002)(39450400003)(39850400002)(39860400002)(13464003)(199003)(377454003)(189002)(102836003)(33656002)(9686002)(7696004)(2950100002)(2900100001)(6436002)(6116002)(38730400001)(74316002)(68736007)(5660300001)(92566002)(77096006)(305945005)(6506006)(7416002)(25786008)(101416001)(8676002)(76176999)(7736002)(8936002)(229853002)(50986999)(81166006)(10090500001)(81156014)(54356999)(105586002)(106356001)(5005710100001)(10290500002)(3280700002)(8990500004)(99286002)(76576001)(97736004)(3660700001)(122556002)(86362001)(4326007)(86612001)(189998001)(2906002)(106116001)(5001770100001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR03MB1424;H:DM5PR03MB2490.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-2" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Dec 2016 19:08:24.5268 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1424 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uBLJOKqX019905 Content-Length: 2576 Lines: 79 > -----Original Message----- > From: Roman Kagan [mailto:rkagan@virtuozzo.com] > Sent: Tuesday, December 20, 2016 7:56 AM > To: Paolo Bonzini ; Radim Kr?m?? > ; KY Srinivasan ; Vitaly > Kuznetsov > Cc: Thomas Gleixner ; Ingo Molnar > ; H. Peter Anvin ; x86@kernel.org; > Haiyang Zhang ; kvm@vger.kernel.org; linux- > kernel@vger.kernel.org; devel@linuxdriverproject.org; Denis V . Lunev > ; Roman Kagan > Subject: [PATCH 03/15] hyperv: use standard bitops > No commit log? > 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); > What is the rationale for dropping the sync variant? > /* 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); > Same comment as before. > 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