Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp234433pxb; Wed, 20 Jan 2021 05:55:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5BKjaTyDb6uNaTBGC6PiRJTgwpSqqFB8G3eMEtTJDs870zbeIRqc+SxxZU69in02XS/aM X-Received: by 2002:a17:906:3b97:: with SMTP id u23mr6149486ejf.147.1611150944920; Wed, 20 Jan 2021 05:55:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611150944; cv=none; d=google.com; s=arc-20160816; b=iCnEVcZ4BDWM4DzXXxFouzkvT7rkcXRqBS9HfGtiq7d4npPsvq9BKCs7m1V2KMUfvu 18vdbLaEXG7G7+zm2ovcfFG3p4Kf8wwGQZMbyGg/jm8QpriWguHxO4uWVUfBLKKRuQF4 1K3ns2BTd0WdONqfg25VQzxP675u87IVOsAX2sedL6c0Btslbh1Mzki6/KAyJEwJwh18 vfg1GPTnufYxUTvK9qfqDEpRsvOX4BYZBYajVDQ95nqSxGwIU0YyFlkDdeSuHTNzt1u1 GeLrGc/5ISLY3bDII0BUaW9Etf7QVD5MArjA5eq7V6ifWM1zE8COQAh3hXTeZcxP0h+R iFcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mEBt6kadL06yrWP6jkRQ6hKHgAZ+ACyWHQVmdjiqpDc=; b=IF4dVCGw1C8GA85neUGUZlnkwWAvcYhVzAXDa2qtvCgO0lrem/4/SfZxH28tSbxHI/ CegBRW+5kjTitjxPUOx5X7E1XnHtrbBJ1zFostLkc4OEE8So08FbV2bkvY+wOlVxlSiv BSbsmA2i4EZB4uZCBV8a9ua9ujb2gJOxVJ1BpP8JbvsVa4eSzA5MYHlRA8bAGgcmEj79 NAzU68arnMCjLfIgMUVwRqdfZBG3Xn5Qp2L1SYG5ubin/92Osah0Yox3mlYlITNQiUpK jemvW9jroojQLfhuHFuovjOmYwobxs6hp473uXkqQj/2XE14hpNViCWnMTcy6sybwiyN W8FA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si868082edr.598.2021.01.20.05.55.20; Wed, 20 Jan 2021 05:55:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388550AbhATM4g (ORCPT + 99 others); Wed, 20 Jan 2021 07:56:36 -0500 Received: from mail-ej1-f44.google.com ([209.85.218.44]:33772 "EHLO mail-ej1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389063AbhATMKB (ORCPT ); Wed, 20 Jan 2021 07:10:01 -0500 Received: by mail-ej1-f44.google.com with SMTP id by1so26780484ejc.0; Wed, 20 Jan 2021 04:09:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mEBt6kadL06yrWP6jkRQ6hKHgAZ+ACyWHQVmdjiqpDc=; b=Tq3cDODU2WBec2iUu26b8eh4Y4vjaeDWkeQdXuDJFwQf6qTK8W2gDOiiHk2ly4696K OJsjUKvbZ1cVAoiijNz4vGowzmxAkf6XSKr7MPS4Kp1ECfM+FsUav3qsGKLsJIBuNd7a vHFfLETSD5W1WggXhascWZLrZu0O5zKnm5ysUBGIafxznZqi/LmHFG9gBRrmGn3vGGoZ TPLCf6IlhwGEZ3xXepdattsY0QpgMsXIabWPUnEEFddVam3XGdTzmvjOE2SxQz2gFO0a Odq0UzKgr/yz90VViXp+u9F0oT3vea/b7OsZrLH/b/11CJ/zE9P8fklzAtJXAPFhhKcZ 2yxA== X-Gm-Message-State: AOAM533qoEhZmdXUwjHyQlRnFlNRg2XRyc+ErQogU2+D+8oP9yYfQNUY oFqPOVBD/26+RJrj2OZTTcQ0i0TWeLc= X-Received: by 2002:adf:edc8:: with SMTP id v8mr5038846wro.374.1611144064770; Wed, 20 Jan 2021 04:01:04 -0800 (PST) Received: from liuwe-devbox-debian-v2.j3c5onc20sse1dnehy4noqpfcg.zx.internal.cloudapp.net ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id x17sm3747671wro.40.2021.01.20.04.01.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 04:01:04 -0800 (PST) From: Wei Liu To: Linux on Hyper-V List Cc: virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , pasha.tatashin@soleen.com, Wei Liu , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger Subject: [PATCH v5 03/16] Drivers: hv: vmbus: skip VMBus initialization if Linux is root Date: Wed, 20 Jan 2021 12:00:45 +0000 Message-Id: <20210120120058.29138-4-wei.liu@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210120120058.29138-1-wei.liu@kernel.org> References: <20210120120058.29138-1-wei.liu@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no VMBus and the other infrastructures initialized in hv_acpi_init when Linux is running as the root partition. Signed-off-by: Wei Liu --- v3: Return 0 instead of -ENODEV. --- drivers/hv/vmbus_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 502f8cd95f6d..ee27b3670a51 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -2620,6 +2620,9 @@ static int __init hv_acpi_init(void) if (!hv_is_hyperv_initialized()) return -ENODEV; + if (hv_root_partition) + return 0; + init_completion(&probe_event); /* -- 2.20.1