cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

context_bus.c (717B)


      1// SPDX-License-Identifier: GPL-2.0-only
      2/*
      3 * Copyright (c) 2021, NVIDIA Corporation.
      4 */
      5
      6#include <linux/device.h>
      7#include <linux/of.h>
      8
      9struct bus_type host1x_context_device_bus_type = {
     10	.name = "host1x-context",
     11};
     12EXPORT_SYMBOL_GPL(host1x_context_device_bus_type);
     13
     14static int __init host1x_context_device_bus_init(void)
     15{
     16	int err;
     17
     18	if (!of_machine_is_compatible("nvidia,tegra186") &&
     19	    !of_machine_is_compatible("nvidia,tegra194") &&
     20	    !of_machine_is_compatible("nvidia,tegra234"))
     21		return 0;
     22
     23	err = bus_register(&host1x_context_device_bus_type);
     24	if (err < 0) {
     25		pr_err("bus type registration failed: %d\n", err);
     26		return err;
     27	}
     28
     29	return 0;
     30}
     31postcore_initcall(host1x_context_device_bus_init);