Skip to content

Commit

Permalink
Merge branch 'linux-6.6.y' into linux-6.6-y-rolling-lts-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
opsiff authored Aug 4, 2024
2 parents ff097a3 + 40a0e93 commit bcb151f
Show file tree
Hide file tree
Showing 372 changed files with 191,136 additions and 29,333 deletions.
5 changes: 5 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ D: dosfs, LILO, some fd features, ATM, various other hacks here and there
S: Buenos Aires
S: Argentina

NTFS FILESYSTEM
N: Anton Altaparmakov
E: anton@tuxera.com
D: NTFS filesystem

N: Tim Alpaerts
E: tim_alpaerts@toyota-motor-europe.com
D: 802.2 class II logical link control layer,
Expand Down
466 changes: 0 additions & 466 deletions Documentation/filesystems/ntfs.rst

This file was deleted.

10 changes: 0 additions & 10 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -15209,16 +15209,6 @@ W: https://github.com/davejiang/linux/wiki
T: git https://github.com/davejiang/linux.git
F: drivers/ntb/hw/intel/

NTFS FILESYSTEM
M: Anton Altaparmakov <anton@tuxera.com>
R: Namjae Jeon <linkinjeon@kernel.org>
L: linux-ntfs-dev@lists.sourceforge.net
S: Supported
W: http://www.tuxera.com/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs.git
F: Documentation/filesystems/ntfs.rst
F: fs/ntfs/

NTFS3 FILESYSTEM
M: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
L: ntfs3@lists.linux.dev
Expand Down
2 changes: 0 additions & 2 deletions arch/arm64/configs/deepin_arm64_desktop_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ CONFIG_ENERGY_MODEL=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_CPU_IDLE_GOV_TEO=y
CONFIG_ARM_PSCI_CPUIDLE=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
Expand Down Expand Up @@ -826,7 +825,6 @@ CONFIG_EFI_ZBOOT=y
CONFIG_EFI_BOOTLOADER_CONTROL=m
CONFIG_EFI_CAPSULE_LOADER=m
CONFIG_RESET_ATTACK_MITIGATION=y
CONFIG_ARM_PSCI_CHECKER=y
CONFIG_TEGRA_IVC=y
CONFIG_GNSS=m
CONFIG_GNSS_MTK_SERIAL=m
Expand Down
3 changes: 2 additions & 1 deletion drivers/crypto/ccp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ ccp-$(CONFIG_CRYPTO_DEV_SP_PSP) += psp-dev.o \
tee-dev.o \
platform-access.o \
dbc.o \
hygon/psp-dev.o
hygon/psp-dev.o \
hygon/csv-dev.o

obj-$(CONFIG_CRYPTO_DEV_CCP_CRYPTO) += ccp-crypto.o
ccp-crypto-objs := ccp-crypto-main.o \
Expand Down
122 changes: 122 additions & 0 deletions drivers/crypto/ccp/hygon/csv-dev.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* HYGON CSV interface
*
* Copyright (C) 2024 Hygon Info Technologies Ltd.
*
* Author: Liyang Han <hanliyang@hygon.cn>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#include <linux/psp.h>
#include <linux/psp-hygon.h>
#include <uapi/linux/psp-hygon.h>

#include "psp-dev.h"

int csv_cmd_buffer_len(int cmd)
{
switch (cmd) {
case CSV_CMD_HGSC_CERT_IMPORT: return sizeof(struct csv_data_hgsc_cert_import);
default: return 0;
}
}

static int csv_ioctl_do_hgsc_import(struct sev_issue_cmd *argp)
{
struct csv_user_data_hgsc_cert_import input;
struct csv_data_hgsc_cert_import *data;
void *hgscsk_blob, *hgsc_blob;
int ret;

if (copy_from_user(&input, (void __user *)argp->data, sizeof(input)))
return -EFAULT;

data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;

/* copy HGSCSK certificate blobs from userspace */
hgscsk_blob = psp_copy_user_blob(input.hgscsk_cert_address, input.hgscsk_cert_len);
if (IS_ERR(hgscsk_blob)) {
ret = PTR_ERR(hgscsk_blob);
goto e_free;
}

data->hgscsk_cert_address = __psp_pa(hgscsk_blob);
data->hgscsk_cert_len = input.hgscsk_cert_len;

/* copy HGSC certificate blobs from userspace */
hgsc_blob = psp_copy_user_blob(input.hgsc_cert_address, input.hgsc_cert_len);
if (IS_ERR(hgsc_blob)) {
ret = PTR_ERR(hgsc_blob);
goto e_free_hgscsk;
}

data->hgsc_cert_address = __psp_pa(hgsc_blob);
data->hgsc_cert_len = input.hgsc_cert_len;

ret = hygon_psp_hooks.__sev_do_cmd_locked(CSV_CMD_HGSC_CERT_IMPORT,
data, &argp->error);

kfree(hgsc_blob);
e_free_hgscsk:
kfree(hgscsk_blob);
e_free:
kfree(data);
return ret;
}

static long csv_ioctl(struct file *file, unsigned int ioctl, unsigned long arg)
{
void __user *argp = (void __user *)arg;
struct sev_issue_cmd input;
int ret = -EFAULT;

if (!hygon_psp_hooks.sev_dev_hooks_installed)
return -ENODEV;

if (!psp_master || !psp_master->sev_data)
return -ENODEV;

if (ioctl != SEV_ISSUE_CMD)
return -EINVAL;

if (copy_from_user(&input, argp, sizeof(struct sev_issue_cmd)))
return -EFAULT;

if (input.cmd > CSV_MAX)
return -EINVAL;

mutex_lock(hygon_psp_hooks.sev_cmd_mutex);

switch (input.cmd) {
case CSV_HGSC_CERT_IMPORT:
ret = csv_ioctl_do_hgsc_import(&input);
break;
default:
/*
* If the command is compatible between CSV and SEV, the
* native implementation of the driver is invoked.
* Release the mutex before calling the native ioctl function
* because it will acquires the mutex.
*/
mutex_unlock(hygon_psp_hooks.sev_cmd_mutex);
return hygon_psp_hooks.sev_ioctl(file, ioctl, arg);
}

if (copy_to_user(argp, &input, sizeof(struct sev_issue_cmd)))
ret = -EFAULT;

mutex_unlock(hygon_psp_hooks.sev_cmd_mutex);

return ret;
}

const struct file_operations csv_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = csv_ioctl,
};
19 changes: 19 additions & 0 deletions drivers/crypto/ccp/hygon/csv-dev.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* HYGON CSV driver interface
*
* Copyright (C) 2024 Hygon Info Technologies Ltd.
*
* Author: Liyang Han <hanliyang@hygon.cn>
*/

#ifndef __CCP_HYGON_CSV_DEV_H__
#define __CCP_HYGON_CSV_DEV_H__

#include <linux/fs.h>

extern const struct file_operations csv_fops;

int csv_cmd_buffer_len(int cmd);

#endif /* __CCP_HYGON_CSV_DEV_H__ */
1 change: 1 addition & 0 deletions drivers/crypto/ccp/hygon/psp-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extern struct hygon_psp_hooks_table {
bool sev_dev_hooks_installed;
struct mutex *sev_cmd_mutex;
int (*__sev_do_cmd_locked)(int cmd, void *data, int *psp_ret);
long (*sev_ioctl)(struct file *file, unsigned int ioctl, unsigned long arg);
} hygon_psp_hooks;

int fixup_hygon_psp_caps(struct psp_device *psp);
Expand Down
23 changes: 21 additions & 2 deletions drivers/crypto/ccp/sev-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "sev-dev.h"

#include "hygon/psp-dev.h"
#include "hygon/csv-dev.h"

#define DEVICE_NAME "sev"
#define SEV_FW_FILE "amd/sev.fw"
Expand Down Expand Up @@ -129,6 +130,18 @@ static int sev_wait_cmd_ioc(struct sev_device *sev,

static int sev_cmd_buffer_len(int cmd)
{
/*
* The Hygon CSV command may conflict with AMD SEV command, so it's
* preferred to check whether it's a CSV-specific command for Hygon
* psp.
*/
if (is_vendor_hygon()) {
int r = csv_cmd_buffer_len(cmd);

if (r)
return r;
}

switch (cmd) {
case SEV_CMD_INIT: return sizeof(struct sev_data_init);
case SEV_CMD_INIT_EX: return sizeof(struct sev_data_init_ex);
Expand Down Expand Up @@ -1200,7 +1213,11 @@ static int sev_misc_init(struct sev_device *sev)
misc = &misc_dev->misc;
misc->minor = MISC_DYNAMIC_MINOR;
misc->name = DEVICE_NAME;
misc->fops = &sev_fops;

if (is_vendor_hygon())
misc->fops = &csv_fops;
else
misc->fops = &sev_fops;

ret = misc_register(misc);
if (ret)
Expand All @@ -1223,6 +1240,7 @@ static void sev_dev_install_hooks(void)
{
hygon_psp_hooks.sev_cmd_mutex = &sev_cmd_mutex;
hygon_psp_hooks.__sev_do_cmd_locked = __sev_do_cmd_locked;
hygon_psp_hooks.sev_ioctl = sev_ioctl;

hygon_psp_hooks.sev_dev_hooks_installed = true;
}
Expand Down Expand Up @@ -1330,7 +1348,8 @@ void sev_dev_destroy(struct psp_device *psp)
int sev_issue_cmd_external_user(struct file *filep, unsigned int cmd,
void *data, int *error)
{
if (!filep || filep->f_op != &sev_fops)
if (!filep || filep->f_op != (is_vendor_hygon()
? &csv_fops : &sev_fops))
return -EBADF;

return sev_do_cmd(cmd, data, error);
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ source "drivers/gpu/drm/sprd/Kconfig"

source "drivers/gpu/drm/phytium/Kconfig"

source "drivers/gpu/drm/arise/Kconfig"

config DRM_HYPERV
tristate "DRM Support for Hyper-V synthetic video device"
depends on DRM && PCI && MMU && HYPERV
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,4 @@ obj-y += solomon/
obj-$(CONFIG_DRM_SPRD) += sprd/
obj-$(CONFIG_DRM_LOONGSON) += loongson/
obj-$(CONFIG_DRM_PHYTIUM) += phytium/
obj-$(CONFIG_DRM_ARISE) += arise/
8 changes: 8 additions & 0 deletions drivers/gpu/drm/arise/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
config DRM_ARISE
tristate "Arise DRM"
default m
depends on DRM
select DRM_KMS_HELPER
help
Choose this option if you have an Glenfly Arise GPU. If M is selected
the module will be called arise.
83 changes: 83 additions & 0 deletions drivers/gpu/drm/arise/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
CHIP?=E3k
DRIVER_NAME?=arise
PRO_DRIVER_NAME=$(DRIVER_NAME)
TARGET_ARCH?=x86_64
DEBUG?=0
VIDEO_ONLY_FPGA?=0
RUN_HW_NULL?=0
HW_NULL?=0
CONFIG-GFGPU=m
ifeq ("$(M)", "")
CHECK_GCC_VERSION?=0
else
CHECK_GCC_VERSION?=1
endif

ccflags-y := -D__LINUX__ -DKERNEL_BUILD
ccflags-y += -Wno-undef -Wno-unused -Wno-missing-braces -Wno-missing-attributes -Wno-overflow -Wno-missing-prototypes -Wno-missing-declarations

ifeq ($(CHECK_GCC_VERSION), 1)

KERNEL_UNAME?=$(shell uname -r)
KERNEL_MODLIB:=/lib/modules/$(KERNEL_UNAME)
KERNEL_SOURCES:=$(shell test -d $(KERNEL_MODLIB)/source && echo $(KERNEL_MODLIB)/source || echo $(KERNEL_MODLIB)/build)
KERNEL_COMPILE_H=$(KERNEL_SOURCES)/include/generated/compile.h
KERNEL_COMPILE_H_EXIT=$(shell if [ -f $(KERNEL_COMPILE_H) ]; then echo 1; else echo 0; fi)

ifeq ($(KERNEL_COMPILE_H_EXIT), 1)

KERNEL_BUILT_GCC_STRING=$(shell cat ${KERNEL_COMPILE_H} | grep LINUX_COMPILER | cut -f 2 -d '"')
KERNEL_BUILT_GCC_VERSION=$(shell echo "${KERNEL_BUILT_GCC_STRING}" | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | head -n 1)
ifeq ("$(KERNEL_BUILT_GCC_VERSION)", "")
KERNEL_BUILT_GCC_VERSION=$(shell echo "${KERNEL_BUILT_GCC_STRING}" | grep -o '[0-9]\+\.[0-9]\+' | head -n 1)
endif

SYSTEM_GCC_VERSION=$(shell $(CC) -v 2>&1 | awk 'END{print}' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | head -n 1)
ifeq ("$(SYSTEM_GCC_VERSION)", "")
SYSTEM_GCC_VERSION=$(shell $(CC) -v 2>&1 | awk 'END{print}' | grep -o '[0-9]\+\.[0-9]\+' | head -n 1)
endif

ifneq ("$(KERNEL_BUILT_GCC_VERSION)", "$(SYSTEM_GCC_VERSION)")
$(warning "Kernel Built GCC Version ($(KERNEL_BUILT_GCC_VERSION)) Are Differ From System GCC Version($(SYSTEM_GCC_VERSION))!!")
$(warning "System GCC Version Must Match To Kernel Built GCC Version!!")
$(warning "Please Check GCC Version!!")
endif

else
$(warning "$(KERNEL_COMPILE_H) not exist,can not do gcc version check,skip")
endif

endif

ifeq ($(DEBUG), 1)
ccflags-y += -ggdb3 -O2 -D_DEBUG_ -DGF_TRACE_EVENT=1
else
ccflags-y += -O2 -fno-strict-aliasing -fno-stack-protector -DGF_TRACE_EVENT=1
endif

ifeq ($(VIDEO_ONLY_FPGA), 1)
ccflags-y += -DVIDEO_ONLY_FPGA
endif

ifeq ($(RUN_HW_NULL), 1)
ccflags-y += -DGF_HW_NULL
else
ccflags-y += -DGF_PCIE_BUS
endif

ccflags-y += -I$(src)

ifeq ("$(M)", "")
ifeq ("$(O)", "")
GFGPU_FULL_PATH=$(src)
else
GFGPU_FULL_PATH=$(srctree)/$(src)
endif
else
GFGPU_FULL_PATH=$(src)
endif

include $(GFGPU_FULL_PATH)/core/Makefile
include $(GFGPU_FULL_PATH)/cbios/cbios.mk
include $(GFGPU_FULL_PATH)/linux/Makefile
obj-$(CONFIG_DRM_ARISE) := $(PRO_DRIVER_NAME).o
Loading

0 comments on commit bcb151f

Please sign in to comment.