forked from tenstorrent/tt-kmd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Terrible, Horrible, No Good, Very Bad Hack
This was less effort than writing a proper driver for the card in question. Long story short: - GS/WH hugepage "sysmem" DMA don't act right under SiFive Premier P550 dev board - Want to test a different piece of hardware with similar driver code path
- Loading branch information
1 parent
715a5d7
commit 72895d1
Showing
5 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc. | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
|
||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
#include <linux/types.h> | ||
|
||
#include "squirrel.h" | ||
#include "pcie.h" | ||
#include "module.h" | ||
#include "hwmon.h" | ||
|
||
|
||
static bool squirrel_init(struct tenstorrent_device *tt_dev) { | ||
struct squirrel_device *wh_dev = tt_dev_to_sq_dev(tt_dev); | ||
|
||
return true; | ||
} | ||
|
||
|
||
static bool squirrel_init_hardware(struct tenstorrent_device *tt_dev) { | ||
return true; | ||
} | ||
|
||
static bool squirrel_post_hardware_init(struct tenstorrent_device *tt_dev) { | ||
return true; | ||
} | ||
|
||
static void squirrel_cleanup_hardware(struct tenstorrent_device *tt_dev) { | ||
} | ||
|
||
static void squirrel_cleanup(struct tenstorrent_device *tt_dev) { | ||
struct squirrel_device *sq_dev = tt_dev_to_sq_dev(tt_dev); | ||
} | ||
|
||
struct tenstorrent_device_class squirrel_class = { | ||
.name = "Squirrel", | ||
.instance_size = sizeof(struct squirrel_device), | ||
.init_device = squirrel_init, | ||
.init_hardware = squirrel_init_hardware, | ||
.post_hardware_init = squirrel_post_hardware_init, | ||
.cleanup_hardware = squirrel_cleanup_hardware, | ||
.cleanup_device = squirrel_cleanup, | ||
.reboot = squirrel_cleanup_hardware, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc. | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
|
||
#ifndef TTDRIVER_WORMHOLE_H_INCLUDED | ||
#define TTDRIVER_WORMHOLE_H_INCLUDED | ||
|
||
#include <linux/types.h> | ||
#include "device.h" | ||
|
||
struct squirrel_device { | ||
struct tenstorrent_device tt; | ||
}; | ||
|
||
#define tt_dev_to_sq_dev(ttdev) \ | ||
container_of((tt_dev), struct squirrel_device, tt) | ||
|
||
#endif |