This set of patches expands the VMBus driver to include device tree
support. This feature allows for a kernel boot without the use of ACPI
tables, resulting in a smaller memory footprint and potentially faster
boot times. This is tested by enabling CONFIG_OF and OF_EARLY_FLATTREE
for x86.
The first two patches enable compilation of Hyper-V APIs in a non-ACPI
build.
The third patch converts the VMBus driver from acpi to more generic
platform driver.
The fourth patch introduces the device tree documentation for VMBus.
The fifth patch adds device tree support to the VMBus driver. Currently
this is tested only for x86 and it may not work for other archs.
[V9]
- Add vmbus_mmio_remove for error handling
- Remove logic from !acpi_disabled to acpi_disabled
[V8]
- Remove the auto select of CONFIG_OF
- Remove the dependency on !ACPI for OF_EARLY_FLATTREE
- Used acpi_disabled instead of #ifdef and hence added a dummy function
for vmbus_acpi_add
- GFP_ATOMIC -> GFP_KERNEL
- used range.flags instead of hard coding flags
- used __maybe_unused for acpi device id, removed #ifdef
[V7]
- Use cpu_addr instead of bus_addr.
- Updated Documentation accordingly.
[V6]
- define acpi_sleep_state_supported in acpi header for !ACPI,
dropped the changes done in hv_common.c under #ifdef CONFIG_ACPI
- "Devicetree" instead of "device tree"
- Remove initialize of ret
- set "np = pdev->dev.of_node;" on declarartion
- remove one error print
- use bus_addr instead of pci_addr
[V5]
- Removed #else for device tree parsing code. This should help better
test coverage.
- Fix macro '__maybe_unused' warning
- Added below options in Kconfig to enable device tree options for HYPERV
select OF if !ACPI
select OF_EARLY_FLATTREE if !ACPI
- moved dt documantation to bus folder
- update the dt node to have 'bus' as parent node instead of 'soc'. Also
added compatible and ranges property for parent node.
- Made sure dt_binding_check have no error/varnings for microsoft,vmbus.yaml file
- Fix commit messages and add Reviwed-by from Michael for first 3 patches
[V4]
- rebased which fixed return type of 'vmbus_mmio_remove' from int to void
- used __maybe_unused for 'vmbus_of_match' and safeguard vmbus_acpi_device_ids
under #ifdef
[V3]
- Changed the logic to use generic api (for_each_of_range) for parsing "ranges".
- Remove dependency of ACPI for HYPERV in case of x86.
- Removed "device tree bindings" from title and patch subject.
- Removed duplicate vendor prefix, used microsoft instead of msft.
- Use 'soc' in example of device tree documantation for parent node.
- Fixed compatible schemas error generated in other modules referring to
virtio.
- Drop hex notation and leading zeros from device tree cell properties.
- Added missing full stop at the end of commit message.
- Typos fix: s/Initaly/Initially/ and s/hibernate/hibernation/.
- Replace to_acpi_device with ACPI_COMPANION which simplify the logic.
- Added more info in cover letter aboutsystem under test.
[v2]
- Convert VMBus acpi device to platform device, and added device tree support
in separate patch. This enables using same driver structure for both the flows.
- In Device tree documentation, changed virtio folder to hypervisor and moved
VMBus documentation there.
- Moved bindings before Device tree patch.
- Removed stale ".data" and ".name" field from of_device match table.
- Removed debug print.
Saurabh Sengar (5):
drivers/clocksource/hyper-v: non ACPI support in hyperv clock
ACPI: bus: Add stub acpi_sleep_state_supported() in non-ACPI cases
Drivers: hv: vmbus: Convert acpi_device to more generic
platform_device
dt-bindings: bus: VMBus
Driver: VMBus: Add Devicetree support
.../bindings/bus/microsoft,vmbus.yaml | 54 ++++++++
MAINTAINERS | 1 +
drivers/clocksource/hyperv_timer.c | 15 ++-
drivers/hv/Kconfig | 5 +-
drivers/hv/vmbus_drv.c | 122 ++++++++++++++----
include/linux/acpi.h | 5 +
6 files changed, 172 insertions(+), 30 deletions(-)
create mode 100644 Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml
--
2.34.1
Update the driver to support Devicetree boot as well along with ACPI.
At present the Devicetree parsing only provides the mmio region info
and is not the exact copy of ACPI parsing. This is sufficient to cater
all the current Devicetree usecases for VMBus.
Currently Devicetree is supported only for x86 systems.
Signed-off-by: Saurabh Sengar <[email protected]>
---
[V9]
- Add vmbus_mmio_remove for error handling
- Remove logic from !acpi_disabled to acpi_disabled
drivers/hv/Kconfig | 5 ++--
drivers/hv/vmbus_drv.c | 66 +++++++++++++++++++++++++++++++++++++++---
2 files changed, 65 insertions(+), 6 deletions(-)
diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig
index 0747a8f1fcee..47132b30b7ee 100644
--- a/drivers/hv/Kconfig
+++ b/drivers/hv/Kconfig
@@ -4,11 +4,12 @@ menu "Microsoft Hyper-V guest support"
config HYPERV
tristate "Microsoft Hyper-V client drivers"
- depends on ACPI && ((X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \
- || (ARM64 && !CPU_BIG_ENDIAN))
+ depends on (X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \
+ || (ACPI && ARM64 && !CPU_BIG_ENDIAN)
select PARAVIRT
select X86_HV_CALLBACK_VECTOR if X86
select VMAP_PFN
+ select OF_EARLY_FLATTREE if OF
help
Select this option to run Linux as a Hyper-V client operating
system.
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 3ad2fa2b92e7..5de2d3bb8289 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -20,6 +20,7 @@
#include <linux/completion.h>
#include <linux/hyperv.h>
#include <linux/kernel_stat.h>
+#include <linux/of_address.h>
#include <linux/clockchips.h>
#include <linux/cpu.h>
#include <linux/sched/isolation.h>
@@ -2143,7 +2144,7 @@ void vmbus_device_unregister(struct hv_device *device_obj)
device_unregister(&device_obj->device);
}
-
+#ifdef CONFIG_ACPI
/*
* VMBUS is an acpi enumerated device. Get the information we
* need from DSDT.
@@ -2253,6 +2254,7 @@ static acpi_status vmbus_walk_resources(struct acpi_resource *res, void *ctx)
return AE_OK;
}
+#endif
static void vmbus_mmio_remove(void)
{
@@ -2273,7 +2275,7 @@ static void vmbus_mmio_remove(void)
}
}
-static void vmbus_reserve_fb(void)
+static void __maybe_unused vmbus_reserve_fb(void)
{
resource_size_t start = 0, size;
struct pci_dev *pdev;
@@ -2433,6 +2435,7 @@ void vmbus_free_mmio(resource_size_t start, resource_size_t size)
}
EXPORT_SYMBOL_GPL(vmbus_free_mmio);
+#ifdef CONFIG_ACPI
static int vmbus_acpi_add(struct platform_device *pdev)
{
acpi_status result;
@@ -2485,10 +2488,54 @@ static int vmbus_acpi_add(struct platform_device *pdev)
vmbus_mmio_remove();
return ret_val;
}
+#else
+static int vmbus_acpi_add(struct platform_device *pdev)
+{
+ return 0;
+}
+#endif
+
+static int vmbus_device_add(struct platform_device *pdev)
+{
+ struct resource **cur_res = &hyperv_mmio;
+ struct of_range range;
+ struct of_range_parser parser;
+ struct device_node *np = pdev->dev.of_node;
+ int ret;
+
+ hv_dev = &pdev->dev;
+
+ ret = of_range_parser_init(&parser, np);
+ if (ret)
+ return ret;
+
+ for_each_of_range(&parser, &range) {
+ struct resource *res;
+
+ res = kzalloc(sizeof(*res), GFP_KERNEL);
+ if (!res) {
+ vmbus_mmio_remove();
+ return -ENOMEM;
+ }
+
+ res->name = "hyperv mmio";
+ res->flags = range.flags;
+ res->start = range.cpu_addr;
+ res->end = range.cpu_addr + range.size;
+
+ *cur_res = res;
+ cur_res = &res->sibling;
+ }
+
+ return ret;
+}
static int vmbus_platform_driver_probe(struct platform_device *pdev)
{
- return vmbus_acpi_add(pdev);
+ if (acpi_disabled)
+ return vmbus_device_add(pdev);
+ else
+ return vmbus_acpi_add(pdev);
}
static int vmbus_platform_driver_remove(struct platform_device *pdev)
@@ -2634,7 +2681,17 @@ static int vmbus_bus_resume(struct device *dev)
#define vmbus_bus_resume NULL
#endif /* CONFIG_PM_SLEEP */
-static const struct acpi_device_id vmbus_acpi_device_ids[] = {
+static const __maybe_unused struct of_device_id vmbus_of_match[] = {
+ {
+ .compatible = "microsoft,vmbus",
+ },
+ {
+ /* sentinel */
+ },
+};
+MODULE_DEVICE_TABLE(of, vmbus_of_match);
+
+static const __maybe_unused struct acpi_device_id vmbus_acpi_device_ids[] = {
{"VMBUS", 0},
{"VMBus", 0},
{"", 0},
@@ -2668,6 +2725,7 @@ static struct platform_driver vmbus_platform_driver = {
.driver = {
.name = "vmbus",
.acpi_match_table = ACPI_PTR(vmbus_acpi_device_ids),
+ .of_match_table = of_match_ptr(vmbus_of_match),
.pm = &vmbus_bus_pm,
.probe_type = PROBE_FORCE_SYNCHRONOUS,
}
--
2.34.1
Add dt-bindings for Hyper-V VMBus.
Signed-off-by: Saurabh Sengar <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
---
.../bindings/bus/microsoft,vmbus.yaml | 54 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 55 insertions(+)
create mode 100644 Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml
diff --git a/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml b/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml
new file mode 100644
index 000000000000..a8d40c766dcd
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/microsoft,vmbus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microsoft Hyper-V VMBus
+
+maintainers:
+ - Saurabh Sengar <[email protected]>
+
+description:
+ VMBus is a software bus that implement the protocols for communication
+ between the root or host OS and guest OSs (virtual machines).
+
+properties:
+ compatible:
+ const: microsoft,vmbus
+
+ ranges: true
+
+ '#address-cells':
+ const: 2
+
+ '#size-cells':
+ const: 1
+
+required:
+ - compatible
+ - ranges
+ - '#address-cells'
+ - '#size-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ bus {
+ compatible = "simple-bus";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges;
+
+ vmbus@ff0000000 {
+ compatible = "microsoft,vmbus";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges = <0x0f 0xf0000000 0x0f 0xf0000000 0x10000000>;
+ };
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 216a61805c93..3cfe67af51f1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9540,6 +9540,7 @@ S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
F: Documentation/ABI/stable/sysfs-bus-vmbus
F: Documentation/ABI/testing/debugfs-hyperv
+F: Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml
F: Documentation/virt/hyperv
F: Documentation/networking/device_drivers/ethernet/microsoft/netvsc.rst
F: arch/arm64/hyperv
--
2.34.1
VMBus driver code currently has direct dependency on ACPI and struct
acpi_device. As a staging step toward optionally configuring based on
Devicetree instead of ACPI, use a more generic platform device to reduce
the dependency on ACPI where possible, though the dependency on ACPI
is not completely removed. Also rename the function vmbus_acpi_remove()
to the more generic vmbus_mmio_remove().
Signed-off-by: Saurabh Sengar <[email protected]>
Reviewed-by: Michael Kelley <[email protected]>
---
drivers/hv/vmbus_drv.c | 58 +++++++++++++++++++++++++-----------------
1 file changed, 35 insertions(+), 23 deletions(-)
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 229353f1e9c2..3ad2fa2b92e7 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -12,6 +12,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/device.h>
+#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/sysctl.h>
#include <linux/slab.h>
@@ -44,7 +45,7 @@ struct vmbus_dynid {
struct hv_vmbus_device_id id;
};
-static struct acpi_device *hv_acpi_dev;
+static struct device *hv_dev;
static int hyperv_cpuhp_online;
@@ -143,7 +144,7 @@ static DEFINE_MUTEX(hyperv_mmio_lock);
static int vmbus_exists(void)
{
- if (hv_acpi_dev == NULL)
+ if (hv_dev == NULL)
return -ENODEV;
return 0;
@@ -932,7 +933,7 @@ static int vmbus_dma_configure(struct device *child_device)
* On x86/x64 coherence is assumed and these calls have no effect.
*/
hv_setup_dma_ops(child_device,
- device_get_dma_attr(&hv_acpi_dev->dev) == DEV_DMA_COHERENT);
+ device_get_dma_attr(hv_dev) == DEV_DMA_COHERENT);
return 0;
}
@@ -2081,7 +2082,7 @@ int vmbus_device_register(struct hv_device *child_device_obj)
&child_device_obj->channel->offermsg.offer.if_instance);
child_device_obj->device.bus = &hv_bus;
- child_device_obj->device.parent = &hv_acpi_dev->dev;
+ child_device_obj->device.parent = hv_dev;
child_device_obj->device.release = vmbus_device_release;
child_device_obj->device.dma_parms = &child_device_obj->dma_parms;
@@ -2253,7 +2254,7 @@ static acpi_status vmbus_walk_resources(struct acpi_resource *res, void *ctx)
return AE_OK;
}
-static void vmbus_acpi_remove(struct acpi_device *device)
+static void vmbus_mmio_remove(void)
{
struct resource *cur_res;
struct resource *next_res;
@@ -2432,13 +2433,14 @@ void vmbus_free_mmio(resource_size_t start, resource_size_t size)
}
EXPORT_SYMBOL_GPL(vmbus_free_mmio);
-static int vmbus_acpi_add(struct acpi_device *device)
+static int vmbus_acpi_add(struct platform_device *pdev)
{
acpi_status result;
int ret_val = -ENODEV;
struct acpi_device *ancestor;
+ struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
- hv_acpi_dev = device;
+ hv_dev = &device->dev;
/*
* Older versions of Hyper-V for ARM64 fail to include the _CCA
@@ -2480,10 +2482,21 @@ static int vmbus_acpi_add(struct acpi_device *device)
acpi_walk_err:
if (ret_val)
- vmbus_acpi_remove(device);
+ vmbus_mmio_remove();
return ret_val;
}
+static int vmbus_platform_driver_probe(struct platform_device *pdev)
+{
+ return vmbus_acpi_add(pdev);
+}
+
+static int vmbus_platform_driver_remove(struct platform_device *pdev)
+{
+ vmbus_mmio_remove();
+ return 0;
+}
+
#ifdef CONFIG_PM_SLEEP
static int vmbus_bus_suspend(struct device *dev)
{
@@ -2649,15 +2662,15 @@ static const struct dev_pm_ops vmbus_bus_pm = {
.restore_noirq = vmbus_bus_resume
};
-static struct acpi_driver vmbus_acpi_driver = {
- .name = "vmbus",
- .ids = vmbus_acpi_device_ids,
- .ops = {
- .add = vmbus_acpi_add,
- .remove = vmbus_acpi_remove,
- },
- .drv.pm = &vmbus_bus_pm,
- .drv.probe_type = PROBE_FORCE_SYNCHRONOUS,
+static struct platform_driver vmbus_platform_driver = {
+ .probe = vmbus_platform_driver_probe,
+ .remove = vmbus_platform_driver_remove,
+ .driver = {
+ .name = "vmbus",
+ .acpi_match_table = ACPI_PTR(vmbus_acpi_device_ids),
+ .pm = &vmbus_bus_pm,
+ .probe_type = PROBE_FORCE_SYNCHRONOUS,
+ }
};
static void hv_kexec_handler(void)
@@ -2741,12 +2754,11 @@ static int __init hv_acpi_init(void)
/*
* Get ACPI resources first.
*/
- ret = acpi_bus_register_driver(&vmbus_acpi_driver);
-
+ ret = platform_driver_register(&vmbus_platform_driver);
if (ret)
return ret;
- if (!hv_acpi_dev) {
+ if (!hv_dev) {
ret = -ENODEV;
goto cleanup;
}
@@ -2776,8 +2788,8 @@ static int __init hv_acpi_init(void)
return 0;
cleanup:
- acpi_bus_unregister_driver(&vmbus_acpi_driver);
- hv_acpi_dev = NULL;
+ platform_driver_unregister(&vmbus_platform_driver);
+ hv_dev = NULL;
return ret;
}
@@ -2830,7 +2842,7 @@ static void __exit vmbus_exit(void)
cpuhp_remove_state(hyperv_cpuhp_online);
hv_synic_free();
- acpi_bus_unregister_driver(&vmbus_acpi_driver);
+ platform_driver_unregister(&vmbus_platform_driver);
}
--
2.34.1
From: Saurabh Sengar <[email protected]> Sent: Monday, March 20, 2023 12:48 AM
>
> Update the driver to support Devicetree boot as well along with ACPI.
> At present the Devicetree parsing only provides the mmio region info
> and is not the exact copy of ACPI parsing. This is sufficient to cater
> all the current Devicetree usecases for VMBus.
>
> Currently Devicetree is supported only for x86 systems.
>
> Signed-off-by: Saurabh Sengar <[email protected]>
> ---
> [V9]
> - Add vmbus_mmio_remove for error handling
> - Remove logic from !acpi_disabled to acpi_disabled
>
> drivers/hv/Kconfig | 5 ++--
> drivers/hv/vmbus_drv.c | 66 +++++++++++++++++++++++++++++++++++++++---
> 2 files changed, 65 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig
> index 0747a8f1fcee..47132b30b7ee 100644
> --- a/drivers/hv/Kconfig
> +++ b/drivers/hv/Kconfig
> @@ -4,11 +4,12 @@ menu "Microsoft Hyper-V guest support"
>
> config HYPERV
> tristate "Microsoft Hyper-V client drivers"
> - depends on ACPI && ((X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \
> - || (ARM64 && !CPU_BIG_ENDIAN))
> + depends on (X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \
> + || (ACPI && ARM64 && !CPU_BIG_ENDIAN)
> select PARAVIRT
> select X86_HV_CALLBACK_VECTOR if X86
> select VMAP_PFN
> + select OF_EARLY_FLATTREE if OF
> help
> Select this option to run Linux as a Hyper-V client operating
> system.
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 3ad2fa2b92e7..5de2d3bb8289 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -20,6 +20,7 @@
> #include <linux/completion.h>
> #include <linux/hyperv.h>
> #include <linux/kernel_stat.h>
> +#include <linux/of_address.h>
> #include <linux/clockchips.h>
> #include <linux/cpu.h>
> #include <linux/sched/isolation.h>
> @@ -2143,7 +2144,7 @@ void vmbus_device_unregister(struct hv_device
> *device_obj)
> device_unregister(&device_obj->device);
> }
>
> -
> +#ifdef CONFIG_ACPI
> /*
> * VMBUS is an acpi enumerated device. Get the information we
> * need from DSDT.
> @@ -2253,6 +2254,7 @@ static acpi_status vmbus_walk_resources(struct
> acpi_resource *res, void *ctx)
>
> return AE_OK;
> }
> +#endif
>
> static void vmbus_mmio_remove(void)
> {
> @@ -2273,7 +2275,7 @@ static void vmbus_mmio_remove(void)
> }
> }
>
> -static void vmbus_reserve_fb(void)
> +static void __maybe_unused vmbus_reserve_fb(void)
> {
> resource_size_t start = 0, size;
> struct pci_dev *pdev;
> @@ -2433,6 +2435,7 @@ void vmbus_free_mmio(resource_size_t start,
> resource_size_t size)
> }
> EXPORT_SYMBOL_GPL(vmbus_free_mmio);
>
> +#ifdef CONFIG_ACPI
> static int vmbus_acpi_add(struct platform_device *pdev)
> {
> acpi_status result;
> @@ -2485,10 +2488,54 @@ static int vmbus_acpi_add(struct platform_device *pdev)
> vmbus_mmio_remove();
> return ret_val;
> }
> +#else
> +static int vmbus_acpi_add(struct platform_device *pdev)
> +{
> + return 0;
> +}
> +#endif
> +
> +static int vmbus_device_add(struct platform_device *pdev)
> +{
> + struct resource **cur_res = &hyperv_mmio;
> + struct of_range range;
> + struct of_range_parser parser;
> + struct device_node *np = pdev->dev.of_node;
> + int ret;
> +
> + hv_dev = &pdev->dev;
> +
> + ret = of_range_parser_init(&parser, np);
> + if (ret)
> + return ret;
> +
> + for_each_of_range(&parser, &range) {
> + struct resource *res;
> +
> + res = kzalloc(sizeof(*res), GFP_KERNEL);
> + if (!res) {
> + vmbus_mmio_remove();
> + return -ENOMEM;
> + }
> +
> + res->name = "hyperv mmio";
> + res->flags = range.flags;
> + res->start = range.cpu_addr;
> + res->end = range.cpu_addr + range.size;
> +
> + *cur_res = res;
> + cur_res = &res->sibling;
> + }
> +
> + return ret;
> +}
>
> static int vmbus_platform_driver_probe(struct platform_device *pdev)
> {
> - return vmbus_acpi_add(pdev);
> + if (acpi_disabled)
> + return vmbus_device_add(pdev);
> + else
> + return vmbus_acpi_add(pdev);
> }
>
> static int vmbus_platform_driver_remove(struct platform_device *pdev)
> @@ -2634,7 +2681,17 @@ static int vmbus_bus_resume(struct device *dev)
> #define vmbus_bus_resume NULL
> #endif /* CONFIG_PM_SLEEP */
>
> -static const struct acpi_device_id vmbus_acpi_device_ids[] = {
> +static const __maybe_unused struct of_device_id vmbus_of_match[] = {
> + {
> + .compatible = "microsoft,vmbus",
> + },
> + {
> + /* sentinel */
> + },
> +};
> +MODULE_DEVICE_TABLE(of, vmbus_of_match);
> +
> +static const __maybe_unused struct acpi_device_id vmbus_acpi_device_ids[] = {
> {"VMBUS", 0},
> {"VMBus", 0},
> {"", 0},
> @@ -2668,6 +2725,7 @@ static struct platform_driver vmbus_platform_driver = {
> .driver = {
> .name = "vmbus",
> .acpi_match_table = ACPI_PTR(vmbus_acpi_device_ids),
> + .of_match_table = of_match_ptr(vmbus_of_match),
> .pm = &vmbus_bus_pm,
> .probe_type = PROBE_FORCE_SYNCHRONOUS,
> }
> --
> 2.34.1
Reviewed-by: Michael Kelley <[email protected]>
On Mon, Mar 20, 2023 at 12:47:39AM -0700, Saurabh Sengar wrote:
> Add dt-bindings for Hyper-V VMBus.
Do you perhaps want to use this as the commit subject line? The original
one looks to be cut off half way.
I can change this patch on my end. Just let me know.
Thanks,
Wei.
On Wed, Apr 05, 2023 at 11:10:17PM +0000, Wei Liu wrote:
> On Mon, Mar 20, 2023 at 12:47:39AM -0700, Saurabh Sengar wrote:
> > Add dt-bindings for Hyper-V VMBus.
>
> Do you perhaps want to use this as the commit subject line? The original
> one looks to be cut off half way.
In the first version of this patch series, I had this as subject line, however
'dt-bindings' was repetetive in subject line hence asked to be dropped by
device-tree maintainers.
Ref: https://lore.kernel.org/lkml/[email protected]/
If this subject line looks cut in half, may be we can modify it to:
dt-bindings: bus: Add Hyper-V VMBus
Regards,
Saurabh
>
> I can change this patch on my end. Just let me know.
>
> Thanks,
> Wei.
On Wed, Apr 05, 2023 at 08:03:16PM -0700, Saurabh Singh Sengar wrote:
> On Wed, Apr 05, 2023 at 11:10:17PM +0000, Wei Liu wrote:
> > On Mon, Mar 20, 2023 at 12:47:39AM -0700, Saurabh Sengar wrote:
> > > Add dt-bindings for Hyper-V VMBus.
> >
> > Do you perhaps want to use this as the commit subject line? The original
> > one looks to be cut off half way.
>
> In the first version of this patch series, I had this as subject line, however
> 'dt-bindings' was repetetive in subject line hence asked to be dropped by
> device-tree maintainers.
>
> Ref: https://lore.kernel.org/lkml/[email protected]/
>
> If this subject line looks cut in half, may be we can modify it to:
> dt-bindings: bus: Add Hyper-V VMBus
Okay. Let change the title to this.
Thanks,
Wei.
On Mon, Mar 20, 2023 at 12:47:35AM -0700, Saurabh Sengar wrote:
> This set of patches expands the VMBus driver to include device tree
> support. This feature allows for a kernel boot without the use of ACPI
> tables, resulting in a smaller memory footprint and potentially faster
> boot times. This is tested by enabling CONFIG_OF and OF_EARLY_FLATTREE
> for x86.
>
> The first two patches enable compilation of Hyper-V APIs in a non-ACPI
> build.
>
> The third patch converts the VMBus driver from acpi to more generic
> platform driver.
>
> The fourth patch introduces the device tree documentation for VMBus.
>
> The fifth patch adds device tree support to the VMBus driver. Currently
> this is tested only for x86 and it may not work for other archs.
>
[...]
> .../bindings/bus/microsoft,vmbus.yaml | 54 ++++++++
> MAINTAINERS | 1 +
> drivers/clocksource/hyperv_timer.c | 15 ++-
> drivers/hv/Kconfig | 5 +-
> drivers/hv/vmbus_drv.c | 122 ++++++++++++++----
> include/linux/acpi.h | 5 +
> 6 files changed, 172 insertions(+), 30 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml
>
Applied to hyperv-next.
Thanks,
Wei.
> --
> 2.34.1
>