mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
firmware: tegra: Changes for v7.2-rc1
This set of changes contains another attempt at resolving a Kconfig dependency, propagates debugfs error codes and adds support for multiple sockets to the BPMP driver. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmobyUoACgkQ3SOs138+ s6Egiw//clNlyi84Hl58QEz5dTPy3kCRLPhN3tHovNJKYwAOBb4OLd3QZFBok+dw iNA05AKFKtjWDOdkuWBE5i7okjNRNzkwrb7uKOye80aRBtPZ3kV3kfm86+Mm4PX8 moFrjqbRVEoBmdPMbJRXo4onXo3fXVMeQlnvkSRGjyiniePv153hKAmkqGUAJ0Bw DEpd8TxDzJGyblcr8hP7LLZlSAsjvwHCqC3zbrvb15rwUZAffklou7y21J50ydoZ BGYSblyEPSJlFM9UrJHZDovpPFN7eYf8tu7oohk1DNaXL4rv3XKHOKtOpRk90THC 0NUEpEy16f8bdCuEl3XG2JM17igVNZ0C+vq7phtW7vpLUsqWZcYN7H5hC7xWx7+C BFVZuy6jFvJJ9u0SKYdRAp50uanu4GBWNdN71F14mpkx86KdCQ73yeQWE3vngC3P qQUphdJUauhRG5/LJ9SxF11fSyBL1xMuX5fLAIAEGH8szGvsB6W+hgPJKnFX0vXw G78hHN0/49edHCBe13D5OSQXsK9bVGEGN4xmj/EZim3I3MQC84yYAXPzVK97P3YK vMsEyuqK3WnKTEmgHNCVL4glxHAlitRHPuZjQrHbVJIdbt3DihP9FXVm9XjlWQ+2 sInRybSGvs2AEiXaPOM0ZaXGK5pDwSlMnVLaYgF4nw7FXsLyxh0= =gbxD -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmooIbwACgkQmmx57+YA GNkPjQ//aUEpJWqH6kHDg1SnJnGKL4h2LXvbJuiod8aJoaK6vqF/TERsrWhnrNlM fZ0Fk5Vo2w5XVzLxFy/fMLiDJBYplygVMc/SlJrM/aGuyiqaQOH8Hc/byYWWS19f anmutIQgEPZj2ll1L4Dtjx+wCqfltX+DgdyNMdlOL/l4A79IMNQSwYhOr2nimXVy nvNmGNup2tE5eNV1LRYiciayoovI5boULiH5aAIaWM2yzzRmFcDtrYzOwHh2LB0I coYSrZF9SNgzrEeoU2xeQbId4nRxj/DPOtaaIygIyWiNqhGEx0IQiRoGVeMx+2h5 z8cUwR3Y/pAYcTL03o3fEnDqV+H+48LMUn7stdxhVz709uy+MtYDQls7v9dcFngM sXvEFaFE2AoJABVnAa3KO5zFBqTPYePtpzymypMxkWuAiyKWgr/ptY5ITyW5sSNA MUW9p7v0pssXPUIlMaMyrOBntl3ZcHjR9QfpCgqqlfk5efpAuQOjWfNSmvFLxKPb +miK76yxdsWc1+Zxuto7+P1ZuvAs9w6YWoIsRou4yW/Jl/QOwhwRUQJEwjrXDEI6 I7ilc61hCPVObzXoNOLkTCYp7DPDdQL9xA2NIOHSRYCJ2dkxPz+tVcFjYQPxyJfo 38Ezps1Q1A9rkgLbdWTuKl2glBW6R3IdJrubccky191ixjM9RcU= =VmwN -----END PGP SIGNATURE----- Merge tag 'tegra-for-7.2-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers firmware: tegra: Changes for v7.2-rc1 This set of changes contains another attempt at resolving a Kconfig dependency, propagates debugfs error codes and adds support for multiple sockets to the BPMP driver. * tag 'tegra-for-7.2-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: bpmp: Add support for multi-socket platforms firmware: tegra: bpmp: Propagate debugfs errors firmware: tegra: Make TEGRA_IVC a hidden Kconfig symbol Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
0d519d755c
|
|
@ -2,7 +2,7 @@
|
|||
menu "Tegra firmware driver"
|
||||
|
||||
config TEGRA_IVC
|
||||
bool "Tegra IVC protocol" if COMPILE_TEST
|
||||
bool
|
||||
depends on ARCH_TEGRA
|
||||
help
|
||||
IVC (Inter-VM Communication) protocol is part of the IPC
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
/*
|
||||
* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/cleanup.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
|
|
@ -468,7 +470,7 @@ static int bpmp_populate_debugfs_inband(struct tegra_bpmp *bpmp,
|
|||
dentry = debugfs_create_file(name, mode, parent, bpmp,
|
||||
&bpmp_debug_fops);
|
||||
if (IS_ERR(dentry)) {
|
||||
err = -ENOMEM;
|
||||
err = PTR_ERR(dentry);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
|
@ -719,7 +721,7 @@ static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf,
|
|||
if (t & DEBUGFS_S_ISDIR) {
|
||||
dentry = debugfs_create_dir(name, parent);
|
||||
if (IS_ERR(dentry))
|
||||
return -ENOMEM;
|
||||
return PTR_ERR(dentry);
|
||||
err = bpmp_populate_dir(bpmp, seqbuf, dentry, depth+1);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
|
@ -732,7 +734,7 @@ static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf,
|
|||
parent, bpmp,
|
||||
&debugfs_fops);
|
||||
if (IS_ERR(dentry))
|
||||
return -ENOMEM;
|
||||
return PTR_ERR(dentry);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -769,9 +771,21 @@ static int bpmp_populate_debugfs_shmem(struct tegra_bpmp *bpmp)
|
|||
return err;
|
||||
}
|
||||
|
||||
static DEFINE_MUTEX(bpmp_debugfs_root_lock);
|
||||
static struct dentry *bpmp_debugfs_root;
|
||||
|
||||
static struct dentry *bpmp_debugfs_get_root(void)
|
||||
{
|
||||
guard(mutex)(&bpmp_debugfs_root_lock);
|
||||
if (!bpmp_debugfs_root)
|
||||
bpmp_debugfs_root = debugfs_create_dir("bpmp", NULL);
|
||||
return bpmp_debugfs_root;
|
||||
}
|
||||
|
||||
int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
|
||||
{
|
||||
struct dentry *root;
|
||||
struct dentry *root, *d;
|
||||
char name[32];
|
||||
bool inband;
|
||||
int err;
|
||||
|
||||
|
|
@ -780,13 +794,24 @@ int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
|
|||
if (!inband && !tegra_bpmp_mrq_is_supported(bpmp, MRQ_DEBUGFS))
|
||||
return 0;
|
||||
|
||||
root = debugfs_create_dir("bpmp", NULL);
|
||||
root = bpmp_debugfs_get_root();
|
||||
if (IS_ERR(root))
|
||||
return -ENOMEM;
|
||||
return PTR_ERR(root);
|
||||
|
||||
bpmp->debugfs_mirror = debugfs_create_dir("debug", root);
|
||||
if (dev_to_node(bpmp->dev) == NUMA_NO_NODE) {
|
||||
d = root;
|
||||
} else {
|
||||
snprintf(name, sizeof(name), "%d-bpmp", dev_to_node(bpmp->dev));
|
||||
d = debugfs_create_dir(name, root);
|
||||
if (IS_ERR(d)) {
|
||||
err = PTR_ERR(d);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
bpmp->debugfs_mirror = debugfs_create_dir("debug", d);
|
||||
if (IS_ERR(bpmp->debugfs_mirror)) {
|
||||
err = -ENOMEM;
|
||||
err = PTR_ERR(bpmp->debugfs_mirror);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
@ -797,8 +822,18 @@ int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
|
|||
err = bpmp_populate_debugfs_shmem(bpmp);
|
||||
|
||||
out:
|
||||
if (err < 0)
|
||||
debugfs_remove_recursive(root);
|
||||
if (err < 0) {
|
||||
if (!IS_ERR(d))
|
||||
debugfs_remove_recursive(d);
|
||||
|
||||
guard(mutex)(&bpmp_debugfs_root_lock);
|
||||
if (root == d) {
|
||||
bpmp_debugfs_root = NULL;
|
||||
} else if (simple_empty(root)) {
|
||||
debugfs_remove(root);
|
||||
bpmp_debugfs_root = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user