Skip to content

Commit

Permalink
Add SPDX license & copyright headers
Browse files Browse the repository at this point in the history
  • Loading branch information
alewycky-tenstorrent committed Oct 16, 2023
1 parent 4e2106a commit 70b3f58
Show file tree
Hide file tree
Showing 39 changed files with 117 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
# SPDX-License-Identifier: GPL-2.0-only

obj-m += tenstorrent.o
tenstorrent-y := module.o chardev.o enumerate.o interrupt.o grayskull.o wormhole.o pcie.o

Expand Down
3 changes: 3 additions & 0 deletions chardev.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
#include <linux/types.h>
Expand Down
3 changes: 3 additions & 0 deletions chardev.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#ifndef TTDRIVER_CHARDEV_H_INCLUDED
#define TTDRIVER_CHARDEV_H_INCLUDED

Expand Down
3 changes: 3 additions & 0 deletions device.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#ifndef TTDRIVER_DEVICE_H_INCLUDED
#define TTDRIVER_DEVICE_H_INCLUDED

Expand Down
3 changes: 3 additions & 0 deletions enumerate.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/idr.h>
Expand Down
3 changes: 3 additions & 0 deletions enumerate.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#ifndef TTDRIVER_ENUMERATE_H_INCLUDED
#define TTDRIVER_ENUMERATE_H_INCLUDED

Expand Down
3 changes: 3 additions & 0 deletions grayskull.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/delay.h>
#include <linux/types.h>
Expand Down
3 changes: 3 additions & 0 deletions grayskull.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#ifndef TTDRIVER_GRAYSKULL_H_INCLUDED
#define TTDRIVER_GRAYSKULL_H_INCLUDED

Expand Down
3 changes: 3 additions & 0 deletions interrupt.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#include <linux/pci.h>
#include <linux/types.h>
#include <linux/interrupt.h>
Expand Down
3 changes: 3 additions & 0 deletions interrupt.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#ifndef TTDRIVER_INTERRUPT_H_INCLUDED
#define TTDRIVER_INTERRUPT_H_INCLUDED

Expand Down
3 changes: 3 additions & 0 deletions ioctl.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#ifndef TTDRIVER_IOCTL_H_INCLUDED
#define TTDRIVER_IOCTL_H_INCLUDED

Expand Down
3 changes: 3 additions & 0 deletions module.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
Expand Down
3 changes: 3 additions & 0 deletions module.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#ifndef TTDRIVER_MODULE_H_INCLUDED
#define TTDRIVER_MODULE_H_INCLUDED

Expand Down
3 changes: 3 additions & 0 deletions pcie.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/delay.h>

Expand Down
3 changes: 3 additions & 0 deletions pcie.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#ifndef TTDRIVER_PCIE_H_INCLUDED
#define TTDRIVER_PCIE_H_INCLUDED

Expand Down
3 changes: 3 additions & 0 deletions test/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
# SPDX-License-Identifier: GPL-2.0-only

all::

PROG := ttkmd_test
Expand Down
3 changes: 3 additions & 0 deletions test/aligned_allocator.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#pragma once

#include <memory>
Expand Down
3 changes: 3 additions & 0 deletions test/checkws
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#! /usr/bin/python3

# SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
# SPDX-License-Identifier: GPL-2.0-only

import fileinput
import re

Expand Down
3 changes: 3 additions & 0 deletions test/config_space.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#include <iostream>
#include <optional>
#include <stdexcept>
Expand Down
3 changes: 3 additions & 0 deletions test/devfd.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#include "devfd.h"

#include <sys/types.h>
Expand Down
3 changes: 3 additions & 0 deletions test/devfd.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#pragma once

#include <string>
Expand Down
3 changes: 3 additions & 0 deletions test/dma_buf.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#include <limits>
#include <variant>
#include <cerrno>
Expand Down
3 changes: 3 additions & 0 deletions test/enumeration.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

// Verify that the contents of /dev/tenstorrent are sensible and complete.

// /dev/tenstorrent/* must be a (symlink to) character device, where its MAJOR:MINOR
Expand Down
3 changes: 3 additions & 0 deletions test/enumeration.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#pragma once

#include <string>
Expand Down
3 changes: 3 additions & 0 deletions test/get_device_info.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#include <string>

#include <sys/ioctl.h>
Expand Down
3 changes: 3 additions & 0 deletions test/ioctl.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#ifndef TTDRIVER_IOCTL_H_INCLUDED
#define TTDRIVER_IOCTL_H_INCLUDED

Expand Down
3 changes: 3 additions & 0 deletions test/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#include <iostream>

#include "util.h"
Expand Down
3 changes: 3 additions & 0 deletions test/mass-build-test
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#! /usr/bin/python3

# SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
# SPDX-License-Identifier: GPL-2.0-only

"""
Test-build a kernel module against all kernel versions in a range of refs, or single git ref.
Expand Down
3 changes: 3 additions & 0 deletions test/pin_pages.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

// Verify that pin pages requires TENSTORRENT_PIN_PAGES_CONTIGUOUS.
// Verify that pin pages rejects any other flags.
// Verify that pin pages rejects size == 0 and size not multiple of page size.
Expand Down
3 changes: 3 additions & 0 deletions test/query_mappings.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

// Verify that all resource IDs are known to us.
// Verify that all the UNUSEDs are at the end of the output array.
// Verify that no non-UNUSED mapping ID appears more than once.
Expand Down
3 changes: 3 additions & 0 deletions test/test_failure.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#include "test_failure.h"

std::string test_failure::format_msg(const std::string &msg, const char *file, unsigned int line, const char *func)
Expand Down
3 changes: 3 additions & 0 deletions test/test_failure.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#pragma once

#include <stdexcept>
Expand Down
3 changes: 3 additions & 0 deletions test/util.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#include <fstream>
#include <iterator>
#include <limits>
Expand Down
3 changes: 3 additions & 0 deletions test/util.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#pragma once

#include <string>
Expand Down
3 changes: 3 additions & 0 deletions tools/make-installer
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#! /bin/bash

# SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
# SPDX-License-Identifier: GPL-2.0-only

set -e

ttdriver_rel="/mnt/motor/syseng/ttdriver-rel"
Expand Down
3 changes: 3 additions & 0 deletions tools/make-source-release
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#! /bin/bash

# SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
# SPDX-License-Identifier: GPL-2.0-only

set -e

machine_readable_output=0
Expand Down
3 changes: 3 additions & 0 deletions ttkmd_arc_if.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

// *************************************** //
// THIS FILE IS AUTO GENERATED //
// *************************************** //
Expand Down
3 changes: 3 additions & 0 deletions wormhole.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/types.h>

Expand Down
3 changes: 3 additions & 0 deletions wormhole.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
// SPDX-License-Identifier: GPL-2.0-only

#ifndef TTDRIVER_WORMHOLE_H_INCLUDED
#define TTDRIVER_WORMHOLE_H_INCLUDED

Expand Down

0 comments on commit 70b3f58

Please sign in to comment.