Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751907AbbECB7X (ORCPT ); Sat, 2 May 2015 21:59:23 -0400 Received: from mail-bl2on0143.outbound.protection.outlook.com ([65.55.169.143]:21056 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750807AbbECB7P convert rfc822-to-8bit (ORCPT ); Sat, 2 May 2015 21:59:15 -0400 From: KY Srinivasan To: Vitaly Kuznetsov CC: Haiyang Zhang , "devel@linuxdriverproject.org" , "linux-kernel@vger.kernel.org" , Dexuan Cui , "Dan Carpenter" Subject: RE: [PATCH v2 3/3] Drivers: hv: vmbus: setup irq after synic is initialized Thread-Topic: [PATCH v2 3/3] Drivers: hv: vmbus: setup irq after synic is initialized Thread-Index: AQHQfE9FANQGb68zuE6FAeGljB1Ib51pjxCA Date: Sun, 3 May 2015 01:58:47 +0000 Message-ID: References: <1429633298-31142-1-git-send-email-vkuznets@redhat.com> <1429633298-31142-4-git-send-email-vkuznets@redhat.com> In-Reply-To: <1429633298-31142-4-git-send-email-vkuznets@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none; x-originating-ip: [2601:8:9b00:fd:b012:983e:93ee:bb71] x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0776; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401001)(5005006)(3002001);SRVR:BY2PR0301MB0776;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0776; x-forefront-prvs: 056544FBEE x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(13464003)(51704005)(377454003)(46102003)(76576001)(99286002)(19580395003)(19580405001)(40100003)(5001960100002)(110136002)(122556002)(106116001)(33656002)(86362001)(50986999)(54356999)(76176999)(86612001)(2656002)(2900100001)(2950100001)(74316001)(92566002)(87936001)(102836002)(77156002)(62966003)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0301MB0776;H:BY2PR0301MB0711.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: microsoft.onmicrosoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 May 2015 01:58:47.5139 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0776 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1798 Lines: 56 > -----Original Message----- > From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] > Sent: Tuesday, April 21, 2015 9:22 AM > To: KY Srinivasan > Cc: Haiyang Zhang; devel@linuxdriverproject.org; linux- > kernel@vger.kernel.org; Dexuan Cui; Dan Carpenter > Subject: [PATCH v2 3/3] Drivers: hv: vmbus: setup irq after synic is initialized > > vmbus_isr() uses synic pages which are being setup in hv_synic_alloc(), we > need to register this irq handler only after we allocate all the required > pages. Why? Until we tell the hypervisor to route the vmbus interrupts on the specified vector, no vmbus interrupts will be delivered and this is done in the function hv_synic_init(). So, the only requirement here is that all of the irq plumbing and allocations be done before we enable the synthetic interrupt controller and register the vector with the hypervisor. What am I missing. Regards, K. Y > > Signed-off-by: Vitaly Kuznetsov > --- > drivers/hv/vmbus_drv.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c > index cf20400..e922804 100644 > --- a/drivers/hv/vmbus_drv.c > +++ b/drivers/hv/vmbus_drv.c > @@ -822,11 +822,12 @@ static int vmbus_bus_init(int irq) > if (ret) > goto err_cleanup; > > - hv_setup_vmbus_irq(vmbus_isr); > - > ret = hv_synic_alloc(); > if (ret) > goto err_alloc; > + > + hv_setup_vmbus_irq(vmbus_isr); > + > /* > * Initialize the per-cpu interrupt state and > * connect to the host. > -- > 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/