Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765087AbcLTS32 (ORCPT ); Tue, 20 Dec 2016 13:29:28 -0500 Received: from mail-db5eur01on0096.outbound.protection.outlook.com ([104.47.2.96]:50424 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1764620AbcLTS3N (ORCPT ); Tue, 20 Dec 2016 13:29:13 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; From: Roman Kagan To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , "K. Y. Srinivasan" , Vitaly Kuznetsov CC: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , , Haiyang Zhang , , , , "Denis V . Lunev" , 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> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161220155602.6298-1-rkagan@virtuozzo.com> References: <20161220155602.6298-1-rkagan@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: AM4PR01CA0030.eurprd01.prod.exchangelabs.com (10.164.74.168) To VI1PR0802MB2478.eurprd08.prod.outlook.com (10.175.26.21) X-MS-Office365-Filtering-Correlation-Id: 1e3c2756-7593-49c7-468c-08d428f0cb51 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:VI1PR0802MB2478; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0802MB2478;3:D3hMxAeAlbvGDmLPfdWqGuIW6vYSjBb5AyThI31Y/lhpxVkOm2AMrDFLccYuJjIw+9nXfWd3+hqKJ/O/GHFJll1sAE5tpZ4y1fPPAfLMFEkCb5V9KrQYKJJY8hSnw/QL9XJdDmp56TYPIYTax40U4RjHc1WGaBgMb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9Grlb35ExogfEBZ2KJIp66nPB73ADFcY3aIqCisxmG3LEDRp0KMJQrGTraTdZnOZDKo0byPrWP3ntiYaur+pq1qHPEuqU+o3aABm2rzmHzUVSEu01ZlVIQvNc4t6RvtjEGcTWuXsA0H9eGGQqp5ZvVmr47Ag==;20:Z6FK8tJM5mgO54VDe60nRzgXa4VsOQac4g36yvvkGfn4HkRwoZLdNUPAJoJ0zvP1ICEGWAHGPQj0FLEPsAW2zNw7sM48FD28FNOoIQv8kh4ba8Cklg9ldy+Va+jkBt8Ov4Zfyw5I2bbHEB/6U55YE4enCbvkXwt4BLINzjpfLnZTptoSa3Dj7XyOVYEMTJZD1IIGx0JdB4DAhhv6nEsWgS8ANdzy2OOWz0z+9XEl5VrF4TVgctJYhOReKZllk8BD X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123558021)(20161123562025)(6072148);SRVR:VI1PR0802MB2478;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0802MB2478; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0802MB2478;4:MiKtcbGlsitmUDcK8wzX/tSgVYIbjqR6ZkBtlpLQVED/xQB+bNHLWusagcVH6Z8ZsYjjcFDGQd7T6tkMKuzIlTX0TBeacM7p59pRAQdL0Itl6pYY+T1rA9XTodJkf1p8JbvA+jObaSFNxrHeB/6w1yGb7xJijVb82IkrPSOSE6n1qkEtNb0trUkzFQwsnHaVQI86gVBAirgbspMsoTeluj1QjuUgHjSUsX75L8j64qe7KLJDzxw3j50dTdJiN6JRh5yooS/7MMrkyhB11j1EjSsKLVzG3ew10W8kpzldTySzG5q3KNfcT1vMLOzzlE8khFgtKLDfdgxkqzC/u6Wj6we3FG+4SMlU1O61lS2LhEssGUKpKxdQLmoPGZeZ/VYl+BU2ISQt8E1EwDNlRvYrz5HsdBFIKn8c+plDB758AgvB1Zz3hP+NfwSwkRIeDxv3Cl75PvGZ0diUsjpIHMmok4G8Cl3Zx7UBMC8cdSj+z8Vv7AeaM4bfsiXZie6XF6Niz9sS5cD0vlCIhsGkjk5McjcBc7uqNfdKIkG+zq41W6+FF7aHmthY0+35Ocw5ch2hxM/FXVnfj/8SuRvguS5Ized034PAZJJ9BIYPlb5hyEw= X-Forefront-PRVS: 0162ACCC24 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(39450400003)(199003)(189002)(6666003)(97736004)(189998001)(101416001)(5001770100001)(4001430100002)(5003940100001)(36756003)(81166006)(47776003)(50986999)(66066001)(1511001)(2950100002)(50466002)(76176999)(5660300001)(81156014)(2906002)(8666005)(305945005)(69596002)(48376002)(7736002)(92566002)(7416002)(106356001)(53416004)(25786008)(6116002)(105586002)(6486002)(2421001)(6506006)(1076002)(3846002)(86362001)(4326007)(68736007)(8676002)(50226002)(42186005)(107886002)(2561002)(38730400001)(6512006)(33646002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0802MB2478;H:rkaganb.sw.ru;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR0802MB2478;23:20/NBHhjB/x8eNuI3DrMvG6fzPGyoUnWJeaGjjZ?= =?us-ascii?Q?JYl9UrCcoM4n2+ljHpcGXUi2S6+J6VBGAKL4Z3IfWRaO3sKFMfd5oxwFxY6G?= =?us-ascii?Q?ET63XLcjMPQ92RjABC2FvsG0Y3XhNFr33R2LL87inY+2Tsr37RAz3v8qoCa6?= =?us-ascii?Q?5x3Ye3OI9NHwW1BYkP97EEm+d6BkZMUhQQ3o0Twmi9y3MxeQLCJWfjncbtoD?= =?us-ascii?Q?UrE4I09zKR1llAbxNQCEnIMB7ZJUsM4TEx5TDhvbzbT3/gvuKDxfHPToZjdM?= =?us-ascii?Q?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5pQ0/q2r2fa?= =?us-ascii?Q?pLuvwj/YWL/DAnglQJQf/P+2dHuLUBpOUhP8SFyYwBf7W03pRiPoyuE0HIHQ?= =?us-ascii?Q?AHHr5aEYLQGifCKTvIFSyM9ZZpcoRWbIYiLbzGvSA?= X-Microsoft-Exchange-Diagnostics: 1;VI1PR0802MB2478;6:9kCgY1ahcuSrwYOgl1Z3y5EixSXnGh28R+T8RIO4verrjI1Wdp4XvB2fgoy8oC6EUaWq61U2gaFkbi6Uen3KuThst+zIsAqpWbZ3OU/mOILstw89vxU4rE0RRzOpAPorLqu6w+r5il56O/pctSNJrg0CRNIDfXzcGplheRNrW68kWZJOXAlYJVyyq2A361WiSuJfffeeddFvXu+2BPZpoCNubpc9D16t+BmZSSkkJYAPJ8BWtFgR/RsjnulvBkQ0AuTg836PLjCZW3XxGXVv342qTG6exhKo6MOdeL+Ej1uwgZ5k7TUa1PuibZUoWvHgu1SpjMdAXcWzL/39HMGPE9E2fC90Ekob2c/FXIOtrnwMB3f6s7lE+c/inkkG9NK2FMq2aF9he1L7vgfJZ9Lh/ZuSgtOhdMXdXpgMy/hj0AI=;5:RhjrHC5m9wQgGBAM0juTc6/oZtwf13TwMVlnmvNBTITImzJtDE9sr6zpNPckXfeby8Zgsuj/lF5G0sgWLASN0aF3ILaqMPUFH1uZ/PPopitplJWOv46WSTZ2JJBnVmP43matAgXemIHIeoGGN4JbOTyt5Fgd6Bt2x1tjqTU6sxI=;24:qF9JNuhvU2v0x2xq8EZtNYLiRDmbayfefPMjp5DBMSvC0Ok9kR5+c5lqUBqXE7PLpnjVPFG0lryws7QmEYDSaOxsqvmbs4O6pJ+Uk874uN0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0802MB2478;7:NIzEjQvaW6lIBVyoI8M96eOoimPmvdDb/InQrJgntHkrguARt74zi2juqipI1mFLgLmxpwUKyg76FqWI0lhgZta5DTv26XzawPFLzmc2iUWYgBOHLyrUrYQPYdG3yy54UkdhOJJ9p7g+p3doPQUa1lDRGtDOi5c9HIIcKIc7TYRwmLwpiXkpvx5GDz5rXDhF9hWIPcgWTp84UlrmO0GWkC9RdabFfipbr3ZDfTPaTPt4Pqq3Npwli+5/H0IHzn61Y+V0GqlJ9Nk1xQbQKwsMJ8fiCn8BJqNQNiObHHX/tpZlL/Pcx8+VJz3bIyfyzVS3nhNMOXvOmId/wvqKgJDqqoAw3KUtb0upovDRrmSLf3oSAj854xTcHtPfQxQddJvfgVPVnHkLXg+IYPzacqRYXWB6gyeb6FLIAo9bqWzzP4bMPOaQi7SqjLNkX4E4h/mZCUPGiUOOKlFuQEsBHAlnkg==;20:7OppW8oPXRilk28teZiAwtKv0hHv8MPPdUIS+1iNL34KNgY2gKxFcYZQaisl9EevSjr2KlQajkEzjCa64BB8VSFWVVV+vQG4GhP+Qs+fcZm5q957hy3BtIeJiGEnI7ZcVzl+q04EJUJH+whm5buL1mngQOpHjYRYFLPq1JsJWxY= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2016 15:56:42.4287 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2478 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1712 Lines: 51 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