Merge 0d508cefcd ("vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines") into android16-6.12-lts
Steps on the way to 6.12.31 Resolves merge conflicts in: drivers/media/usb/uvc/uvc_ctrl.c Change-Id: I663a7a27e554e5a9d426532ff17f7dffc9619d22 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -6322,6 +6322,8 @@
|
||||
|
||||
Selecting 'on' will also enable the mitigation
|
||||
against user space to user space task attacks.
|
||||
Selecting specific mitigation does not force enable
|
||||
user mitigations.
|
||||
|
||||
Selecting 'off' will disable both the kernel and
|
||||
the user space protections.
|
||||
|
||||
@@ -545,11 +545,12 @@ extern u32 at91_pm_suspend_in_sram_sz;
|
||||
|
||||
static int at91_suspend_finish(unsigned long val)
|
||||
{
|
||||
unsigned char modified_gray_code[] = {
|
||||
0x00, 0x01, 0x02, 0x03, 0x06, 0x07, 0x04, 0x05, 0x0c, 0x0d,
|
||||
0x0e, 0x0f, 0x0a, 0x0b, 0x08, 0x09, 0x18, 0x19, 0x1a, 0x1b,
|
||||
0x1e, 0x1f, 0x1c, 0x1d, 0x14, 0x15, 0x16, 0x17, 0x12, 0x13,
|
||||
0x10, 0x11,
|
||||
/* SYNOPSYS workaround to fix a bug in the calibration logic */
|
||||
unsigned char modified_fix_code[] = {
|
||||
0x00, 0x01, 0x01, 0x06, 0x07, 0x0c, 0x06, 0x07, 0x0b, 0x18,
|
||||
0x0a, 0x0b, 0x0c, 0x0d, 0x0d, 0x0a, 0x13, 0x13, 0x12, 0x13,
|
||||
0x14, 0x15, 0x15, 0x12, 0x18, 0x19, 0x19, 0x1e, 0x1f, 0x14,
|
||||
0x1e, 0x1f,
|
||||
};
|
||||
unsigned int tmp, index;
|
||||
int i;
|
||||
@@ -560,25 +561,25 @@ static int at91_suspend_finish(unsigned long val)
|
||||
* restore the ZQ0SR0 with the value saved here. But the
|
||||
* calibration is buggy and restoring some values from ZQ0SR0
|
||||
* is forbidden and risky thus we need to provide processed
|
||||
* values for these (modified gray code values).
|
||||
* values for these.
|
||||
*/
|
||||
tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
|
||||
|
||||
/* Store pull-down output impedance select. */
|
||||
index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
|
||||
soc_pm.bu->ddr_phy_calibration[0] = modified_gray_code[index];
|
||||
soc_pm.bu->ddr_phy_calibration[0] = modified_fix_code[index] << DDR3PHY_ZQ0SR0_PDO_OFF;
|
||||
|
||||
/* Store pull-up output impedance select. */
|
||||
index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
|
||||
soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
|
||||
soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SR0_PUO_OFF;
|
||||
|
||||
/* Store pull-down on-die termination impedance select. */
|
||||
index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
|
||||
soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
|
||||
soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SR0_PDODT_OFF;
|
||||
|
||||
/* Store pull-up on-die termination impedance select. */
|
||||
index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
|
||||
soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
|
||||
soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SRO_PUODT_OFF;
|
||||
|
||||
/*
|
||||
* The 1st 8 words of memory might get corrupted in the process
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
# This script requires:
|
||||
# bash
|
||||
# syslinux
|
||||
# genisoimage
|
||||
# mtools (for fdimage* and hdimage)
|
||||
# edk2/OVMF (for hdimage)
|
||||
#
|
||||
@@ -251,7 +252,9 @@ geniso() {
|
||||
cp "$isolinux" "$ldlinux" "$tmp_dir"
|
||||
cp "$FBZIMAGE" "$tmp_dir"/linux
|
||||
echo default linux "$KCMDLINE" > "$tmp_dir"/isolinux.cfg
|
||||
cp "${FDINITRDS[@]}" "$tmp_dir"/
|
||||
if [ ${#FDINITRDS[@]} -gt 0 ]; then
|
||||
cp "${FDINITRDS[@]}" "$tmp_dir"/
|
||||
fi
|
||||
genisoimage -J -r -appid 'LINUX_BOOT' -input-charset=utf-8 \
|
||||
-quiet -o "$FIMAGE" -b isolinux.bin \
|
||||
-c boot.cat -no-emul-boot -boot-load-size 4 \
|
||||
|
||||
@@ -56,6 +56,8 @@ int __register_nmi_handler(unsigned int, struct nmiaction *);
|
||||
|
||||
void unregister_nmi_handler(unsigned int, const char *);
|
||||
|
||||
void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler);
|
||||
|
||||
void stop_nmi(void);
|
||||
void restart_nmi(void);
|
||||
void local_touch_nmi(void);
|
||||
|
||||
@@ -1442,9 +1442,13 @@ static __ro_after_init enum spectre_v2_mitigation_cmd spectre_v2_cmd;
|
||||
static enum spectre_v2_user_cmd __init
|
||||
spectre_v2_parse_user_cmdline(void)
|
||||
{
|
||||
enum spectre_v2_user_cmd mode;
|
||||
char arg[20];
|
||||
int ret, i;
|
||||
|
||||
mode = IS_ENABLED(CONFIG_MITIGATION_SPECTRE_V2) ?
|
||||
SPECTRE_V2_USER_CMD_AUTO : SPECTRE_V2_USER_CMD_NONE;
|
||||
|
||||
switch (spectre_v2_cmd) {
|
||||
case SPECTRE_V2_CMD_NONE:
|
||||
return SPECTRE_V2_USER_CMD_NONE;
|
||||
@@ -1457,7 +1461,7 @@ spectre_v2_parse_user_cmdline(void)
|
||||
ret = cmdline_find_option(boot_command_line, "spectre_v2_user",
|
||||
arg, sizeof(arg));
|
||||
if (ret < 0)
|
||||
return SPECTRE_V2_USER_CMD_AUTO;
|
||||
return mode;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(v2_user_options); i++) {
|
||||
if (match_option(arg, ret, v2_user_options[i].option)) {
|
||||
@@ -1467,8 +1471,8 @@ spectre_v2_parse_user_cmdline(void)
|
||||
}
|
||||
}
|
||||
|
||||
pr_err("Unknown user space protection option (%s). Switching to AUTO select\n", arg);
|
||||
return SPECTRE_V2_USER_CMD_AUTO;
|
||||
pr_err("Unknown user space protection option (%s). Switching to default\n", arg);
|
||||
return mode;
|
||||
}
|
||||
|
||||
static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode)
|
||||
|
||||
@@ -40,8 +40,12 @@
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/nmi.h>
|
||||
|
||||
/*
|
||||
* An emergency handler can be set in any context including NMI
|
||||
*/
|
||||
struct nmi_desc {
|
||||
raw_spinlock_t lock;
|
||||
nmi_handler_t emerg_handler;
|
||||
struct list_head head;
|
||||
};
|
||||
|
||||
@@ -132,9 +136,22 @@ static void nmi_check_duration(struct nmiaction *action, u64 duration)
|
||||
static int nmi_handle(unsigned int type, struct pt_regs *regs)
|
||||
{
|
||||
struct nmi_desc *desc = nmi_to_desc(type);
|
||||
nmi_handler_t ehandler;
|
||||
struct nmiaction *a;
|
||||
int handled=0;
|
||||
|
||||
/*
|
||||
* Call the emergency handler, if set
|
||||
*
|
||||
* In the case of crash_nmi_callback() emergency handler, it will
|
||||
* return in the case of the crashing CPU to enable it to complete
|
||||
* other necessary crashing actions ASAP. Other handlers in the
|
||||
* linked list won't need to be run.
|
||||
*/
|
||||
ehandler = desc->emerg_handler;
|
||||
if (ehandler)
|
||||
return ehandler(type, regs);
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
/*
|
||||
@@ -224,6 +241,31 @@ void unregister_nmi_handler(unsigned int type, const char *name)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(unregister_nmi_handler);
|
||||
|
||||
/**
|
||||
* set_emergency_nmi_handler - Set emergency handler
|
||||
* @type: NMI type
|
||||
* @handler: the emergency handler to be stored
|
||||
*
|
||||
* Set an emergency NMI handler which, if set, will preempt all the other
|
||||
* handlers in the linked list. If a NULL handler is passed in, it will clear
|
||||
* it. It is expected that concurrent calls to this function will not happen
|
||||
* or the system is screwed beyond repair.
|
||||
*/
|
||||
void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler)
|
||||
{
|
||||
struct nmi_desc *desc = nmi_to_desc(type);
|
||||
|
||||
if (WARN_ON_ONCE(desc->emerg_handler == handler))
|
||||
return;
|
||||
desc->emerg_handler = handler;
|
||||
|
||||
/*
|
||||
* Ensure the emergency handler is visible to other CPUs before
|
||||
* function return
|
||||
*/
|
||||
smp_wmb();
|
||||
}
|
||||
|
||||
static void
|
||||
pci_serr_error(unsigned char reason, struct pt_regs *regs)
|
||||
{
|
||||
|
||||
@@ -926,15 +926,11 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
|
||||
shootdown_callback = callback;
|
||||
|
||||
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
|
||||
/* Would it be better to replace the trap vector here? */
|
||||
if (register_nmi_handler(NMI_LOCAL, crash_nmi_callback,
|
||||
NMI_FLAG_FIRST, "crash"))
|
||||
return; /* Return what? */
|
||||
|
||||
/*
|
||||
* Ensure the new callback function is set before sending
|
||||
* out the NMI
|
||||
* Set emergency handler to preempt other handlers.
|
||||
*/
|
||||
wmb();
|
||||
set_emergency_nmi_handler(NMI_LOCAL, crash_nmi_callback);
|
||||
|
||||
apic_send_IPI_allbutself(NMI_VECTOR);
|
||||
|
||||
|
||||
@@ -124,6 +124,11 @@ static int blk_validate_integrity_limits(struct queue_limits *lim)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lim->features & BLK_FEAT_BOUNCE_HIGH) {
|
||||
pr_warn("no bounce buffer support for integrity metadata\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!IS_ENABLED(CONFIG_BLK_DEV_INTEGRITY)) {
|
||||
pr_warn("integrity support disabled.\n");
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1593,13 +1593,6 @@ static bool tg_within_limit(struct throtl_grp *tg, struct bio *bio, bool rw)
|
||||
return tg_may_dispatch(tg, bio, NULL);
|
||||
}
|
||||
|
||||
static void tg_dispatch_in_debt(struct throtl_grp *tg, struct bio *bio, bool rw)
|
||||
{
|
||||
if (!bio_flagged(bio, BIO_BPS_THROTTLED))
|
||||
tg->carryover_bytes[rw] -= throtl_bio_data_size(bio);
|
||||
tg->carryover_ios[rw]--;
|
||||
}
|
||||
|
||||
bool __blk_throtl_bio(struct bio *bio)
|
||||
{
|
||||
struct request_queue *q = bdev_get_queue(bio->bi_bdev);
|
||||
@@ -1636,10 +1629,12 @@ bool __blk_throtl_bio(struct bio *bio)
|
||||
/*
|
||||
* IOs which may cause priority inversions are
|
||||
* dispatched directly, even if they're over limit.
|
||||
* Debts are handled by carryover_bytes/ios while
|
||||
* calculating wait time.
|
||||
*
|
||||
* Charge and dispatch directly, and our throttle
|
||||
* control algorithm is adaptive, and extra IO bytes
|
||||
* will be throttled for paying the debt
|
||||
*/
|
||||
tg_dispatch_in_debt(tg, bio, rw);
|
||||
throtl_charge_bio(tg, bio);
|
||||
} else {
|
||||
/* if above limits, break to queue */
|
||||
break;
|
||||
|
||||
@@ -41,8 +41,6 @@ static void init_bounce_bioset(void)
|
||||
|
||||
ret = bioset_init(&bounce_bio_set, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
|
||||
BUG_ON(ret);
|
||||
if (bioset_integrity_create(&bounce_bio_set, BIO_POOL_SIZE))
|
||||
BUG_ON(1);
|
||||
|
||||
ret = bioset_init(&bounce_bio_split, BIO_POOL_SIZE, 0, 0);
|
||||
BUG_ON(ret);
|
||||
|
||||
@@ -484,15 +484,17 @@ static wait_queue_head_t ublk_idr_wq; /* wait until one idr is freed */
|
||||
|
||||
static DEFINE_MUTEX(ublk_ctl_mutex);
|
||||
|
||||
|
||||
#define UBLK_MAX_UBLKS UBLK_MINORS
|
||||
|
||||
/*
|
||||
* Max ublk devices allowed to add
|
||||
* Max unprivileged ublk devices allowed to add
|
||||
*
|
||||
* It can be extended to one per-user limit in future or even controlled
|
||||
* by cgroup.
|
||||
*/
|
||||
#define UBLK_MAX_UBLKS UBLK_MINORS
|
||||
static unsigned int ublks_max = 64;
|
||||
static unsigned int ublks_added; /* protected by ublk_ctl_mutex */
|
||||
static unsigned int unprivileged_ublks_max = 64;
|
||||
static unsigned int unprivileged_ublks_added; /* protected by ublk_ctl_mutex */
|
||||
|
||||
static struct miscdevice ublk_misc;
|
||||
|
||||
@@ -1879,10 +1881,9 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,
|
||||
return -EIOCBQUEUED;
|
||||
|
||||
out:
|
||||
io_uring_cmd_done(cmd, ret, 0, issue_flags);
|
||||
pr_devel("%s: complete: cmd op %d, tag %d ret %x io_flags %x\n",
|
||||
__func__, cmd_op, tag, ret, io->flags);
|
||||
return -EIOCBQUEUED;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline struct request *__ublk_check_and_get_req(struct ublk_device *ub,
|
||||
@@ -1938,7 +1939,10 @@ static inline int ublk_ch_uring_cmd_local(struct io_uring_cmd *cmd,
|
||||
static void ublk_ch_uring_cmd_cb(struct io_uring_cmd *cmd,
|
||||
unsigned int issue_flags)
|
||||
{
|
||||
ublk_ch_uring_cmd_local(cmd, issue_flags);
|
||||
int ret = ublk_ch_uring_cmd_local(cmd, issue_flags);
|
||||
|
||||
if (ret != -EIOCBQUEUED)
|
||||
io_uring_cmd_done(cmd, ret, 0, issue_flags);
|
||||
}
|
||||
|
||||
static int ublk_ch_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags)
|
||||
@@ -2203,7 +2207,8 @@ static int ublk_add_chdev(struct ublk_device *ub)
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
ublks_added++;
|
||||
if (ub->dev_info.flags & UBLK_F_UNPRIVILEGED_DEV)
|
||||
unprivileged_ublks_added++;
|
||||
return 0;
|
||||
fail:
|
||||
put_device(dev);
|
||||
@@ -2241,12 +2246,17 @@ static int ublk_add_tag_set(struct ublk_device *ub)
|
||||
|
||||
static void ublk_remove(struct ublk_device *ub)
|
||||
{
|
||||
bool unprivileged;
|
||||
|
||||
ublk_stop_dev(ub);
|
||||
cancel_work_sync(&ub->stop_work);
|
||||
cancel_work_sync(&ub->quiesce_work);
|
||||
cdev_device_del(&ub->cdev, &ub->cdev_dev);
|
||||
unprivileged = ub->dev_info.flags & UBLK_F_UNPRIVILEGED_DEV;
|
||||
ublk_put_device(ub);
|
||||
ublks_added--;
|
||||
|
||||
if (unprivileged)
|
||||
unprivileged_ublks_added--;
|
||||
}
|
||||
|
||||
static struct ublk_device *ublk_get_device_from_id(int idx)
|
||||
@@ -2495,7 +2505,8 @@ static int ublk_ctrl_add_dev(struct io_uring_cmd *cmd)
|
||||
return ret;
|
||||
|
||||
ret = -EACCES;
|
||||
if (ublks_added >= ublks_max)
|
||||
if ((info.flags & UBLK_F_UNPRIVILEGED_DEV) &&
|
||||
unprivileged_ublks_added >= unprivileged_ublks_max)
|
||||
goto out_unlock;
|
||||
|
||||
ret = -ENOMEM;
|
||||
@@ -3056,10 +3067,9 @@ static int ublk_ctrl_uring_cmd(struct io_uring_cmd *cmd,
|
||||
if (ub)
|
||||
ublk_put_device(ub);
|
||||
out:
|
||||
io_uring_cmd_done(cmd, ret, 0, issue_flags);
|
||||
pr_devel("%s: cmd done ret %d cmd_op %x, dev id %d qid %d\n",
|
||||
__func__, ret, cmd->cmd_op, header->dev_id, header->queue_id);
|
||||
return -EIOCBQUEUED;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct file_operations ublk_ctl_fops = {
|
||||
@@ -3123,23 +3133,26 @@ static void __exit ublk_exit(void)
|
||||
module_init(ublk_init);
|
||||
module_exit(ublk_exit);
|
||||
|
||||
static int ublk_set_max_ublks(const char *buf, const struct kernel_param *kp)
|
||||
static int ublk_set_max_unprivileged_ublks(const char *buf,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
return param_set_uint_minmax(buf, kp, 0, UBLK_MAX_UBLKS);
|
||||
}
|
||||
|
||||
static int ublk_get_max_ublks(char *buf, const struct kernel_param *kp)
|
||||
static int ublk_get_max_unprivileged_ublks(char *buf,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
return sysfs_emit(buf, "%u\n", ublks_max);
|
||||
return sysfs_emit(buf, "%u\n", unprivileged_ublks_max);
|
||||
}
|
||||
|
||||
static const struct kernel_param_ops ublk_max_ublks_ops = {
|
||||
.set = ublk_set_max_ublks,
|
||||
.get = ublk_get_max_ublks,
|
||||
static const struct kernel_param_ops ublk_max_unprivileged_ublks_ops = {
|
||||
.set = ublk_set_max_unprivileged_ublks,
|
||||
.get = ublk_get_max_unprivileged_ublks,
|
||||
};
|
||||
|
||||
module_param_cb(ublks_max, &ublk_max_ublks_ops, &ublks_max, 0644);
|
||||
MODULE_PARM_DESC(ublks_max, "max number of ublk devices allowed to add(default: 64)");
|
||||
module_param_cb(ublks_max, &ublk_max_unprivileged_ublks_ops,
|
||||
&unprivileged_ublks_max, 0644);
|
||||
MODULE_PARM_DESC(ublks_max, "max number of unprivileged ublk devices allowed to add(default: 64)");
|
||||
|
||||
MODULE_AUTHOR("Ming Lei <ming.lei@redhat.com>");
|
||||
MODULE_DESCRIPTION("Userspace block device");
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/units.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
@@ -406,11 +407,151 @@ static const char * const imx8mp_clkout_sels[] = {"audio_pll1_out", "audio_pll2_
|
||||
static struct clk_hw **hws;
|
||||
static struct clk_hw_onecell_data *clk_hw_data;
|
||||
|
||||
struct imx8mp_clock_constraints {
|
||||
unsigned int clkid;
|
||||
u32 maxrate;
|
||||
};
|
||||
|
||||
/*
|
||||
* Below tables are taken from IMX8MPCEC Rev. 2.1, 07/2023
|
||||
* Table 13. Maximum frequency of modules.
|
||||
* Probable typos fixed are marked with a comment.
|
||||
*/
|
||||
static const struct imx8mp_clock_constraints imx8mp_clock_common_constraints[] = {
|
||||
{ IMX8MP_CLK_A53_DIV, 1000 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ENET_AXI, 266666667 }, /* Datasheet claims 266MHz */
|
||||
{ IMX8MP_CLK_NAND_USDHC_BUS, 266666667 }, /* Datasheet claims 266MHz */
|
||||
{ IMX8MP_CLK_MEDIA_APB, 200 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_HDMI_APB, 133333333 }, /* Datasheet claims 133MHz */
|
||||
{ IMX8MP_CLK_ML_AXI, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_AHB, 133333333 },
|
||||
{ IMX8MP_CLK_IPG_ROOT, 66666667 },
|
||||
{ IMX8MP_CLK_AUDIO_AHB, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_DISP2_PIX, 170 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_DRAM_ALT, 666666667 },
|
||||
{ IMX8MP_CLK_DRAM_APB, 200 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_CAN1, 80 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_CAN2, 80 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_PCIE_AUX, 10 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_I2C5, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_I2C6, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_SAI1, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_SAI2, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_SAI3, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_SAI5, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_SAI6, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_ENET_QOS, 125 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ENET_QOS_TIMER, 200 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ENET_REF, 125 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ENET_TIMER, 125 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ENET_PHY_REF, 125 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_NAND, 500 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_QSPI, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_USDHC1, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_USDHC2, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_I2C1, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_I2C2, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_I2C3, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_I2C4, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_UART1, 80 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_UART2, 80 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_UART3, 80 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_UART4, 80 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ECSPI1, 80 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ECSPI2, 80 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_PWM1, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_PWM2, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_PWM3, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_PWM4, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_GPT1, 100 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPT2, 100 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPT3, 100 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPT4, 100 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPT5, 100 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPT6, 100 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_WDOG, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_IPP_DO_CLKO1, 200 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_IPP_DO_CLKO2, 200 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_HDMI_REF_266M, 266 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_USDHC3, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_MIPI_PHY1_REF, 300 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_DISP1_PIX, 250 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_CAM2_PIX, 277 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_LDB, 595 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_MIPI_TEST_BYTE, 200 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ECSPI3, 80 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_PDM, 200 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_SAI7, 66666667 }, /* Datasheet claims 66MHz */
|
||||
{ IMX8MP_CLK_MAIN_AXI, 400 * HZ_PER_MHZ },
|
||||
{ /* Sentinel */ }
|
||||
};
|
||||
|
||||
static const struct imx8mp_clock_constraints imx8mp_clock_nominal_constraints[] = {
|
||||
{ IMX8MP_CLK_M7_CORE, 600 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ML_CORE, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPU3D_CORE, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPU3D_SHADER_CORE, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPU2D_CORE, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_AUDIO_AXI_SRC, 600 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_HSIO_AXI, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_ISP, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_VPU_BUS, 600 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_AXI, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_HDMI_AXI, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPU_AXI, 600 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPU_AHB, 300 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_NOC, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_NOC_IO, 600 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ML_AHB, 300 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_VPU_G1, 600 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_VPU_G2, 500 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_CAM1_PIX, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_VPU_VC8000E, 400 * HZ_PER_MHZ }, /* Datasheet claims 500MHz */
|
||||
{ IMX8MP_CLK_DRAM_CORE, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GIC, 400 * HZ_PER_MHZ },
|
||||
{ /* Sentinel */ }
|
||||
};
|
||||
|
||||
static const struct imx8mp_clock_constraints imx8mp_clock_overdrive_constraints[] = {
|
||||
{ IMX8MP_CLK_M7_CORE, 800 * HZ_PER_MHZ},
|
||||
{ IMX8MP_CLK_ML_CORE, 1000 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPU3D_CORE, 1000 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPU3D_SHADER_CORE, 1000 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPU2D_CORE, 1000 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_AUDIO_AXI_SRC, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_HSIO_AXI, 500 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_ISP, 500 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_VPU_BUS, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_AXI, 500 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_HDMI_AXI, 500 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPU_AXI, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GPU_AHB, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_NOC, 1000 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_NOC_IO, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_ML_AHB, 400 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_VPU_G1, 800 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_VPU_G2, 700 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_MEDIA_CAM1_PIX, 500 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_VPU_VC8000E, 500 * HZ_PER_MHZ }, /* Datasheet claims 400MHz */
|
||||
{ IMX8MP_CLK_DRAM_CORE, 1000 * HZ_PER_MHZ },
|
||||
{ IMX8MP_CLK_GIC, 500 * HZ_PER_MHZ },
|
||||
{ /* Sentinel */ }
|
||||
};
|
||||
|
||||
static void imx8mp_clocks_apply_constraints(const struct imx8mp_clock_constraints constraints[])
|
||||
{
|
||||
const struct imx8mp_clock_constraints *constr;
|
||||
|
||||
for (constr = constraints; constr->clkid; constr++)
|
||||
clk_hw_set_rate_range(hws[constr->clkid], 0, constr->maxrate);
|
||||
}
|
||||
|
||||
static int imx8mp_clocks_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *np;
|
||||
void __iomem *anatop_base, *ccm_base;
|
||||
const char *opmode;
|
||||
int err;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mp-anatop");
|
||||
@@ -715,6 +856,16 @@ static int imx8mp_clocks_probe(struct platform_device *pdev)
|
||||
|
||||
imx_check_clk_hws(hws, IMX8MP_CLK_END);
|
||||
|
||||
imx8mp_clocks_apply_constraints(imx8mp_clock_common_constraints);
|
||||
|
||||
err = of_property_read_string(np, "fsl,operating-mode", &opmode);
|
||||
if (!err) {
|
||||
if (!strcmp(opmode, "nominal"))
|
||||
imx8mp_clocks_apply_constraints(imx8mp_clock_nominal_constraints);
|
||||
else if (!strcmp(opmode, "overdrive"))
|
||||
imx8mp_clocks_apply_constraints(imx8mp_clock_overdrive_constraints);
|
||||
}
|
||||
|
||||
err = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
|
||||
if (err < 0) {
|
||||
dev_err(dev, "failed to register hws for i.MX8MP\n");
|
||||
|
||||
@@ -443,8 +443,11 @@ static void dpll_pin_prop_free(struct dpll_pin_properties *prop)
|
||||
static int dpll_pin_prop_dup(const struct dpll_pin_properties *src,
|
||||
struct dpll_pin_properties *dst)
|
||||
{
|
||||
if (WARN_ON(src->freq_supported && !src->freq_supported_num))
|
||||
return -EINVAL;
|
||||
|
||||
memcpy(dst, src, sizeof(*dst));
|
||||
if (src->freq_supported && src->freq_supported_num) {
|
||||
if (src->freq_supported) {
|
||||
size_t freq_size = src->freq_supported_num *
|
||||
sizeof(*src->freq_supported);
|
||||
dst->freq_supported = kmemdup(src->freq_supported,
|
||||
|
||||
@@ -212,6 +212,7 @@ ffa_device_register(const struct ffa_partition_info *part_info,
|
||||
dev = &ffa_dev->dev;
|
||||
dev->bus = &ffa_bus_type;
|
||||
dev->release = ffa_release_device;
|
||||
dev->dma_mask = &dev->coherent_dma_mask;
|
||||
dev_set_name(&ffa_dev->dev, "arm-ffa-%d", id);
|
||||
|
||||
ffa_dev->id = id;
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
/* V2 Defines */
|
||||
#define VSE_CVP_TX_CREDITS 0x49 /* 8bit */
|
||||
|
||||
#define V2_CREDIT_TIMEOUT_US 20000
|
||||
#define V2_CREDIT_TIMEOUT_US 40000
|
||||
#define V2_CHECK_CREDIT_US 10
|
||||
#define V2_POLL_TIMEOUT_US 1000000
|
||||
#define V2_USER_TIMEOUT_US 500000
|
||||
|
||||
@@ -92,12 +92,12 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)
|
||||
{
|
||||
uint64_t value;
|
||||
|
||||
/* Program the AGP BAR */
|
||||
WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BASE, 0);
|
||||
WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
|
||||
WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
|
||||
|
||||
if (!amdgpu_sriov_vf(adev) || adev->asic_type <= CHIP_VEGA10) {
|
||||
/* Program the AGP BAR */
|
||||
WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BASE, 0);
|
||||
WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
|
||||
WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
|
||||
|
||||
/* Program the system aperture low logical page number. */
|
||||
WREG32_SOC15_RLC(GC, 0, mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
|
||||
min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
|
||||
|
||||
@@ -842,6 +842,14 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
/* If the process just called exec(3), it is possible that the
|
||||
* cleanup of the kfd_process (following the release of the mm
|
||||
* of the old process image) is still in the cleanup work queue.
|
||||
* Make sure to drain any job before trying to recreate any
|
||||
* resource for this process.
|
||||
*/
|
||||
flush_workqueue(kfd_process_wq);
|
||||
|
||||
/*
|
||||
* take kfd processes mutex before starting of process creation
|
||||
* so there won't be a case where two threads of the same process
|
||||
@@ -860,14 +868,6 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
|
||||
if (process) {
|
||||
pr_debug("Process already found\n");
|
||||
} else {
|
||||
/* If the process just called exec(3), it is possible that the
|
||||
* cleanup of the kfd_process (following the release of the mm
|
||||
* of the old process image) is still in the cleanup work queue.
|
||||
* Make sure to drain any job before trying to recreate any
|
||||
* resource for this process.
|
||||
*/
|
||||
flush_workqueue(kfd_process_wq);
|
||||
|
||||
process = create_process(thread);
|
||||
if (IS_ERR(process))
|
||||
goto out;
|
||||
|
||||
@@ -101,7 +101,6 @@ static void init_dig_encoder_control(struct bios_parser *bp)
|
||||
bp->cmd_tbl.dig_encoder_control = encoder_control_digx_v1_5;
|
||||
break;
|
||||
default:
|
||||
dm_output_to_console("Don't have dig_encoder_control for v%d\n", version);
|
||||
bp->cmd_tbl.dig_encoder_control = encoder_control_fallback;
|
||||
break;
|
||||
}
|
||||
@@ -238,7 +237,6 @@ static void init_transmitter_control(struct bios_parser *bp)
|
||||
bp->cmd_tbl.transmitter_control = transmitter_control_v1_7;
|
||||
break;
|
||||
default:
|
||||
dm_output_to_console("Don't have transmitter_control for v%d\n", crev);
|
||||
bp->cmd_tbl.transmitter_control = transmitter_control_fallback;
|
||||
break;
|
||||
}
|
||||
@@ -408,8 +406,6 @@ static void init_set_pixel_clock(struct bios_parser *bp)
|
||||
bp->cmd_tbl.set_pixel_clock = set_pixel_clock_v7;
|
||||
break;
|
||||
default:
|
||||
dm_output_to_console("Don't have set_pixel_clock for v%d\n",
|
||||
BIOS_CMD_TABLE_PARA_REVISION(setpixelclock));
|
||||
bp->cmd_tbl.set_pixel_clock = set_pixel_clock_fallback;
|
||||
break;
|
||||
}
|
||||
@@ -554,7 +550,6 @@ static void init_set_crtc_timing(struct bios_parser *bp)
|
||||
set_crtc_using_dtd_timing_v3;
|
||||
break;
|
||||
default:
|
||||
dm_output_to_console("Don't have set_crtc_timing for v%d\n", dtd_version);
|
||||
bp->cmd_tbl.set_crtc_timing = NULL;
|
||||
break;
|
||||
}
|
||||
@@ -671,8 +666,6 @@ static void init_enable_crtc(struct bios_parser *bp)
|
||||
bp->cmd_tbl.enable_crtc = enable_crtc_v1;
|
||||
break;
|
||||
default:
|
||||
dm_output_to_console("Don't have enable_crtc for v%d\n",
|
||||
BIOS_CMD_TABLE_PARA_REVISION(enablecrtc));
|
||||
bp->cmd_tbl.enable_crtc = NULL;
|
||||
break;
|
||||
}
|
||||
@@ -864,8 +857,6 @@ static void init_set_dce_clock(struct bios_parser *bp)
|
||||
bp->cmd_tbl.set_dce_clock = set_dce_clock_v2_1;
|
||||
break;
|
||||
default:
|
||||
dm_output_to_console("Don't have set_dce_clock for v%d\n",
|
||||
BIOS_CMD_TABLE_PARA_REVISION(setdceclock));
|
||||
bp->cmd_tbl.set_dce_clock = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -87,8 +87,7 @@ bool dal_bios_parser_init_cmd_tbl_helper2(
|
||||
return true;
|
||||
|
||||
default:
|
||||
/* Unsupported DCE */
|
||||
BREAK_TO_DEBUGGER();
|
||||
*h = dal_cmd_tbl_helper_dce112_get_table2();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4744,7 +4744,8 @@ static bool full_update_required(struct dc *dc,
|
||||
stream_update->lut3d_func ||
|
||||
stream_update->pending_test_pattern ||
|
||||
stream_update->crtc_timing_adjust ||
|
||||
stream_update->scaler_sharpener_update))
|
||||
stream_update->scaler_sharpener_update ||
|
||||
stream_update->hw_cursor_req))
|
||||
return true;
|
||||
|
||||
if (stream) {
|
||||
|
||||
@@ -508,6 +508,7 @@ void set_p_state_switch_method(
|
||||
if (!dc->ctx || !dc->ctx->dmub_srv || !pipe_ctx || !vba)
|
||||
return;
|
||||
|
||||
pipe_ctx->p_state_type = P_STATE_UNKNOWN;
|
||||
if (vba->DRAMClockChangeSupport[vba->VoltageLevel][vba->maxMpcComb] !=
|
||||
dm_dram_clock_change_unsupported) {
|
||||
/* MCLK switching is supported */
|
||||
|
||||
@@ -626,6 +626,7 @@ static bool dcn32_assign_subvp_pipe(struct dc *dc,
|
||||
* - Not TMZ surface
|
||||
*/
|
||||
if (pipe->plane_state && !pipe->top_pipe && !pipe->prev_odm_pipe && !dcn32_is_center_timing(pipe) &&
|
||||
!pipe->stream->hw_cursor_req &&
|
||||
!(pipe->stream->timing.pix_clk_100hz / 10000 > DCN3_2_MAX_SUBVP_PIXEL_RATE_MHZ) &&
|
||||
(!dcn32_is_psr_capable(pipe) || (context->stream_count == 1 && dc->caps.dmub_caps.subvp_psr)) &&
|
||||
dc_state_get_pipe_subvp_type(context, pipe) == SUBVP_NONE &&
|
||||
|
||||
@@ -425,11 +425,6 @@ bool dpp3_get_optimal_number_of_taps(
|
||||
int min_taps_y, min_taps_c;
|
||||
enum lb_memory_config lb_config;
|
||||
|
||||
if (scl_data->viewport.width > scl_data->h_active &&
|
||||
dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
|
||||
scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Set default taps if none are provided
|
||||
* From programming guide: taps = min{ ceil(2*H_RATIO,1), 8} for downscaling
|
||||
@@ -467,6 +462,12 @@ bool dpp3_get_optimal_number_of_taps(
|
||||
else
|
||||
scl_data->taps.h_taps_c = in_taps->h_taps_c;
|
||||
|
||||
// Avoid null data in the scl data with this early return, proceed non-adaptive calcualtion first
|
||||
if (scl_data->viewport.width > scl_data->h_active &&
|
||||
dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
|
||||
scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
|
||||
return false;
|
||||
|
||||
/*Ensure we can support the requested number of vtaps*/
|
||||
min_taps_y = dc_fixpt_ceil(scl_data->ratios.vert);
|
||||
min_taps_c = dc_fixpt_ceil(scl_data->ratios.vert_c);
|
||||
|
||||
@@ -250,21 +250,21 @@ static uint32_t intersect_frl_link_bw_support(
|
||||
{
|
||||
uint32_t supported_bw_in_kbps = max_supported_frl_bw_in_kbps;
|
||||
|
||||
// HDMI_ENCODED_LINK_BW bits are only valid if HDMI Link Configuration bit is 1 (FRL mode)
|
||||
if (hdmi_encoded_link_bw.bits.FRL_MODE) {
|
||||
if (hdmi_encoded_link_bw.bits.BW_48Gbps)
|
||||
supported_bw_in_kbps = 48000000;
|
||||
else if (hdmi_encoded_link_bw.bits.BW_40Gbps)
|
||||
supported_bw_in_kbps = 40000000;
|
||||
else if (hdmi_encoded_link_bw.bits.BW_32Gbps)
|
||||
supported_bw_in_kbps = 32000000;
|
||||
else if (hdmi_encoded_link_bw.bits.BW_24Gbps)
|
||||
supported_bw_in_kbps = 24000000;
|
||||
else if (hdmi_encoded_link_bw.bits.BW_18Gbps)
|
||||
supported_bw_in_kbps = 18000000;
|
||||
else if (hdmi_encoded_link_bw.bits.BW_9Gbps)
|
||||
supported_bw_in_kbps = 9000000;
|
||||
}
|
||||
/* Skip checking FRL_MODE bit, as certain PCON will clear
|
||||
* it despite supporting the link BW indicated in the other bits.
|
||||
*/
|
||||
if (hdmi_encoded_link_bw.bits.BW_48Gbps)
|
||||
supported_bw_in_kbps = 48000000;
|
||||
else if (hdmi_encoded_link_bw.bits.BW_40Gbps)
|
||||
supported_bw_in_kbps = 40000000;
|
||||
else if (hdmi_encoded_link_bw.bits.BW_32Gbps)
|
||||
supported_bw_in_kbps = 32000000;
|
||||
else if (hdmi_encoded_link_bw.bits.BW_24Gbps)
|
||||
supported_bw_in_kbps = 24000000;
|
||||
else if (hdmi_encoded_link_bw.bits.BW_18Gbps)
|
||||
supported_bw_in_kbps = 18000000;
|
||||
else if (hdmi_encoded_link_bw.bits.BW_9Gbps)
|
||||
supported_bw_in_kbps = 9000000;
|
||||
|
||||
return supported_bw_in_kbps;
|
||||
}
|
||||
|
||||
@@ -875,8 +875,8 @@ static bool spl_get_optimal_number_of_taps(
|
||||
bool *enable_isharp)
|
||||
{
|
||||
int num_part_y, num_part_c;
|
||||
int max_taps_y, max_taps_c;
|
||||
int min_taps_y, min_taps_c;
|
||||
unsigned int max_taps_y, max_taps_c;
|
||||
unsigned int min_taps_y, min_taps_c;
|
||||
enum lb_memory_config lb_config;
|
||||
bool skip_easf = false;
|
||||
|
||||
|
||||
@@ -479,7 +479,7 @@ struct spl_sharpness_range {
|
||||
};
|
||||
struct adaptive_sharpness {
|
||||
bool enable;
|
||||
int sharpness_level;
|
||||
unsigned int sharpness_level;
|
||||
struct spl_sharpness_range sharpness_range;
|
||||
};
|
||||
enum linear_light_scaling { // convert it in translation logic
|
||||
|
||||
@@ -83,8 +83,8 @@ static inline void dmub_dcn31_translate_addr(const union dmub_addr *addr_in,
|
||||
void dmub_dcn31_reset(struct dmub_srv *dmub)
|
||||
{
|
||||
union dmub_gpint_data_register cmd;
|
||||
const uint32_t timeout = 100;
|
||||
uint32_t in_reset, scratch, i, pwait_mode;
|
||||
const uint32_t timeout = 100000;
|
||||
uint32_t in_reset, is_enabled, scratch, i, pwait_mode;
|
||||
|
||||
REG_GET(DMCUB_CNTL2, DMCUB_SOFT_RESET, &in_reset);
|
||||
|
||||
@@ -108,7 +108,7 @@ void dmub_dcn31_reset(struct dmub_srv *dmub)
|
||||
}
|
||||
|
||||
for (i = 0; i < timeout; ++i) {
|
||||
scratch = dmub->hw_funcs.get_gpint_response(dmub);
|
||||
scratch = REG_READ(DMCUB_SCRATCH7);
|
||||
if (scratch == DMUB_GPINT__STOP_FW_RESPONSE)
|
||||
break;
|
||||
|
||||
@@ -125,9 +125,14 @@ void dmub_dcn31_reset(struct dmub_srv *dmub)
|
||||
/* Force reset in case we timed out, DMCUB is likely hung. */
|
||||
}
|
||||
|
||||
REG_UPDATE(DMCUB_CNTL2, DMCUB_SOFT_RESET, 1);
|
||||
REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
|
||||
REG_UPDATE(MMHUBBUB_SOFT_RESET, DMUIF_SOFT_RESET, 1);
|
||||
REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_enabled);
|
||||
|
||||
if (is_enabled) {
|
||||
REG_UPDATE(DMCUB_CNTL2, DMCUB_SOFT_RESET, 1);
|
||||
REG_UPDATE(MMHUBBUB_SOFT_RESET, DMUIF_SOFT_RESET, 1);
|
||||
REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
|
||||
}
|
||||
|
||||
REG_WRITE(DMCUB_INBOX1_RPTR, 0);
|
||||
REG_WRITE(DMCUB_INBOX1_WPTR, 0);
|
||||
REG_WRITE(DMCUB_OUTBOX1_RPTR, 0);
|
||||
|
||||
@@ -88,7 +88,7 @@ static inline void dmub_dcn35_translate_addr(const union dmub_addr *addr_in,
|
||||
void dmub_dcn35_reset(struct dmub_srv *dmub)
|
||||
{
|
||||
union dmub_gpint_data_register cmd;
|
||||
const uint32_t timeout = 100;
|
||||
const uint32_t timeout = 100000;
|
||||
uint32_t in_reset, is_enabled, scratch, i, pwait_mode;
|
||||
|
||||
REG_GET(DMCUB_CNTL2, DMCUB_SOFT_RESET, &in_reset);
|
||||
@@ -113,7 +113,7 @@ void dmub_dcn35_reset(struct dmub_srv *dmub)
|
||||
}
|
||||
|
||||
for (i = 0; i < timeout; ++i) {
|
||||
scratch = dmub->hw_funcs.get_gpint_response(dmub);
|
||||
scratch = REG_READ(DMCUB_SCRATCH7);
|
||||
if (scratch == DMUB_GPINT__STOP_FW_RESPONSE)
|
||||
break;
|
||||
|
||||
|
||||
@@ -63,8 +63,10 @@ static inline void dmub_dcn401_translate_addr(const union dmub_addr *addr_in,
|
||||
void dmub_dcn401_reset(struct dmub_srv *dmub)
|
||||
{
|
||||
union dmub_gpint_data_register cmd;
|
||||
const uint32_t timeout = 30;
|
||||
uint32_t in_reset, scratch, i;
|
||||
const uint32_t timeout_us = 1 * 1000 * 1000; //1s
|
||||
const uint32_t poll_delay_us = 1; //1us
|
||||
uint32_t i = 0;
|
||||
uint32_t in_reset, scratch, pwait_mode;
|
||||
|
||||
REG_GET(DMCUB_CNTL2, DMCUB_SOFT_RESET, &in_reset);
|
||||
|
||||
@@ -75,32 +77,35 @@ void dmub_dcn401_reset(struct dmub_srv *dmub)
|
||||
|
||||
dmub->hw_funcs.set_gpint(dmub, cmd);
|
||||
|
||||
/**
|
||||
* Timeout covers both the ACK and the wait
|
||||
* for remaining work to finish.
|
||||
*
|
||||
* This is mostly bound by the PHY disable sequence.
|
||||
* Each register check will be greater than 1us, so
|
||||
* don't bother using udelay.
|
||||
*/
|
||||
|
||||
for (i = 0; i < timeout; ++i) {
|
||||
for (i = 0; i < timeout_us; i++) {
|
||||
if (dmub->hw_funcs.is_gpint_acked(dmub, cmd))
|
||||
break;
|
||||
|
||||
udelay(poll_delay_us);
|
||||
}
|
||||
|
||||
for (i = 0; i < timeout; ++i) {
|
||||
for (; i < timeout_us; i++) {
|
||||
scratch = dmub->hw_funcs.get_gpint_response(dmub);
|
||||
if (scratch == DMUB_GPINT__STOP_FW_RESPONSE)
|
||||
break;
|
||||
|
||||
udelay(poll_delay_us);
|
||||
}
|
||||
|
||||
/* Force reset in case we timed out, DMCUB is likely hung. */
|
||||
for (; i < timeout_us; i++) {
|
||||
REG_GET(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS, &pwait_mode);
|
||||
if (pwait_mode & (1 << 0))
|
||||
break;
|
||||
|
||||
udelay(poll_delay_us);
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= timeout_us) {
|
||||
/* timeout should never occur */
|
||||
BREAK_TO_DEBUGGER();
|
||||
}
|
||||
|
||||
REG_UPDATE(DMCUB_CNTL2, DMCUB_SOFT_RESET, 1);
|
||||
REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
|
||||
REG_UPDATE(MMHUBBUB_SOFT_RESET, DMUIF_SOFT_RESET, 1);
|
||||
REG_WRITE(DMCUB_INBOX1_RPTR, 0);
|
||||
REG_WRITE(DMCUB_INBOX1_WPTR, 0);
|
||||
REG_WRITE(DMCUB_OUTBOX1_RPTR, 0);
|
||||
@@ -131,7 +136,10 @@ void dmub_dcn401_backdoor_load(struct dmub_srv *dmub,
|
||||
|
||||
dmub_dcn401_get_fb_base_offset(dmub, &fb_base, &fb_offset);
|
||||
|
||||
/* reset and disable DMCUB and MMHUBBUB DMUIF */
|
||||
REG_UPDATE(DMCUB_SEC_CNTL, DMCUB_SEC_RESET, 1);
|
||||
REG_UPDATE(MMHUBBUB_SOFT_RESET, DMUIF_SOFT_RESET, 1);
|
||||
REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
|
||||
|
||||
dmub_dcn401_translate_addr(&cw0->offset, fb_base, fb_offset, &offset);
|
||||
|
||||
@@ -151,6 +159,7 @@ void dmub_dcn401_backdoor_load(struct dmub_srv *dmub,
|
||||
DMCUB_REGION3_CW1_TOP_ADDRESS, cw1->region.top,
|
||||
DMCUB_REGION3_CW1_ENABLE, 1);
|
||||
|
||||
/* release DMCUB reset only to prevent premature execution */
|
||||
REG_UPDATE_2(DMCUB_SEC_CNTL, DMCUB_SEC_RESET, 0, DMCUB_MEM_UNIT_ID,
|
||||
0x20);
|
||||
}
|
||||
@@ -161,7 +170,10 @@ void dmub_dcn401_backdoor_load_zfb_mode(struct dmub_srv *dmub,
|
||||
{
|
||||
union dmub_addr offset;
|
||||
|
||||
/* reset and disable DMCUB and MMHUBBUB DMUIF */
|
||||
REG_UPDATE(DMCUB_SEC_CNTL, DMCUB_SEC_RESET, 1);
|
||||
REG_UPDATE(MMHUBBUB_SOFT_RESET, DMUIF_SOFT_RESET, 1);
|
||||
REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
|
||||
|
||||
offset = cw0->offset;
|
||||
|
||||
@@ -181,6 +193,7 @@ void dmub_dcn401_backdoor_load_zfb_mode(struct dmub_srv *dmub,
|
||||
DMCUB_REGION3_CW1_TOP_ADDRESS, cw1->region.top,
|
||||
DMCUB_REGION3_CW1_ENABLE, 1);
|
||||
|
||||
/* release DMCUB reset only to prevent premature execution */
|
||||
REG_UPDATE_2(DMCUB_SEC_CNTL, DMCUB_SEC_RESET, 0, DMCUB_MEM_UNIT_ID,
|
||||
0x20);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,8 @@ struct dmub_srv;
|
||||
DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_INBOX0_RSP_INT_EN) \
|
||||
DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_ACK) \
|
||||
DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_STAT) \
|
||||
DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_EN)
|
||||
DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_EN) \
|
||||
DMUB_SF(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS)
|
||||
|
||||
struct dmub_srv_dcn401_reg_offset {
|
||||
#define DMUB_SR(reg) uint32_t reg;
|
||||
|
||||
@@ -410,12 +410,13 @@ static void mtk_dpi_config_swap_input(struct mtk_dpi *dpi, bool enable)
|
||||
|
||||
static void mtk_dpi_config_2n_h_fre(struct mtk_dpi *dpi)
|
||||
{
|
||||
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
|
||||
if (dpi->conf->reg_h_fre_con)
|
||||
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
|
||||
}
|
||||
|
||||
static void mtk_dpi_config_disable_edge(struct mtk_dpi *dpi)
|
||||
{
|
||||
if (dpi->conf->edge_sel_en)
|
||||
if (dpi->conf->edge_sel_en && dpi->conf->reg_h_fre_con)
|
||||
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, 0, EDGE_SEL_EN);
|
||||
}
|
||||
|
||||
|
||||
@@ -1432,10 +1432,8 @@ static void vop2_plane_atomic_update(struct drm_plane *plane,
|
||||
|
||||
rb_swap = vop2_win_rb_swap(fb->format->format);
|
||||
vop2_win_write(win, VOP2_WIN_RB_SWAP, rb_swap);
|
||||
if (!vop2_cluster_window(win)) {
|
||||
uv_swap = vop2_win_uv_swap(fb->format->format);
|
||||
vop2_win_write(win, VOP2_WIN_UV_SWAP, uv_swap);
|
||||
}
|
||||
uv_swap = vop2_win_uv_swap(fb->format->format);
|
||||
vop2_win_write(win, VOP2_WIN_UV_SWAP, uv_swap);
|
||||
|
||||
if (fb->format->is_yuv) {
|
||||
vop2_win_write(win, VOP2_WIN_UV_VIR, DIV_ROUND_UP(fb->pitches[1], 4));
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
"\n" \
|
||||
"#endif\n"
|
||||
|
||||
static void print_usage(FILE *f)
|
||||
static void print_usage(FILE *f, const char *progname)
|
||||
{
|
||||
fprintf(f, "usage: %s <input-rule-file> <generated-c-source-file> <generated-c-header-file>\n",
|
||||
program_invocation_short_name);
|
||||
progname);
|
||||
}
|
||||
|
||||
static void print_parse_error(const char *err_msg, const char *line,
|
||||
@@ -144,7 +144,7 @@ int main(int argc, const char *argv[])
|
||||
|
||||
if (argc < 3) {
|
||||
fprintf(stderr, "ERROR: wrong arguments\n");
|
||||
print_usage(stderr);
|
||||
print_usage(stderr, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,12 +46,19 @@ static int guc_action_vf_reset(struct xe_guc *guc)
|
||||
return ret > 0 ? -EPROTO : ret;
|
||||
}
|
||||
|
||||
#define GUC_RESET_VF_STATE_RETRY_MAX 10
|
||||
static int vf_reset_guc_state(struct xe_gt *gt)
|
||||
{
|
||||
unsigned int retry = GUC_RESET_VF_STATE_RETRY_MAX;
|
||||
struct xe_guc *guc = >->uc.guc;
|
||||
int err;
|
||||
|
||||
err = guc_action_vf_reset(guc);
|
||||
do {
|
||||
err = guc_action_vf_reset(guc);
|
||||
if (!err || err != -ETIMEDOUT)
|
||||
break;
|
||||
} while (--retry);
|
||||
|
||||
if (unlikely(err))
|
||||
xe_gt_sriov_err(gt, "Failed to reset GuC state (%pe)\n", ERR_PTR(err));
|
||||
return err;
|
||||
|
||||
@@ -62,6 +62,55 @@ static void pf_reset_vfs(struct xe_device *xe, unsigned int num_vfs)
|
||||
xe_gt_sriov_pf_control_trigger_flr(gt, n);
|
||||
}
|
||||
|
||||
static struct pci_dev *xe_pci_pf_get_vf_dev(struct xe_device *xe, unsigned int vf_id)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
|
||||
|
||||
xe_assert(xe, IS_SRIOV_PF(xe));
|
||||
|
||||
/* caller must use pci_dev_put() */
|
||||
return pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
|
||||
pdev->bus->number,
|
||||
pci_iov_virtfn_devfn(pdev, vf_id));
|
||||
}
|
||||
|
||||
static void pf_link_vfs(struct xe_device *xe, int num_vfs)
|
||||
{
|
||||
struct pci_dev *pdev_pf = to_pci_dev(xe->drm.dev);
|
||||
struct device_link *link;
|
||||
struct pci_dev *pdev_vf;
|
||||
unsigned int n;
|
||||
|
||||
/*
|
||||
* When both PF and VF devices are enabled on the host, during system
|
||||
* resume they are resuming in parallel.
|
||||
*
|
||||
* But PF has to complete the provision of VF first to allow any VFs to
|
||||
* successfully resume.
|
||||
*
|
||||
* Create a parent-child device link between PF and VF devices that will
|
||||
* enforce correct resume order.
|
||||
*/
|
||||
for (n = 1; n <= num_vfs; n++) {
|
||||
pdev_vf = xe_pci_pf_get_vf_dev(xe, n - 1);
|
||||
|
||||
/* unlikely, something weird is happening, abort */
|
||||
if (!pdev_vf) {
|
||||
xe_sriov_err(xe, "Cannot find VF%u device, aborting link%s creation!\n",
|
||||
n, str_plural(num_vfs));
|
||||
break;
|
||||
}
|
||||
|
||||
link = device_link_add(&pdev_vf->dev, &pdev_pf->dev,
|
||||
DL_FLAG_AUTOREMOVE_CONSUMER);
|
||||
/* unlikely and harmless, continue with other VFs */
|
||||
if (!link)
|
||||
xe_sriov_notice(xe, "Failed linking VF%u\n", n);
|
||||
|
||||
pci_dev_put(pdev_vf);
|
||||
}
|
||||
}
|
||||
|
||||
static int pf_enable_vfs(struct xe_device *xe, int num_vfs)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
|
||||
@@ -92,6 +141,8 @@ static int pf_enable_vfs(struct xe_device *xe, int num_vfs)
|
||||
if (err < 0)
|
||||
goto failed;
|
||||
|
||||
pf_link_vfs(xe, num_vfs);
|
||||
|
||||
xe_sriov_info(xe, "Enabled %u of %u VF%s\n",
|
||||
num_vfs, total_vfs, str_plural(total_vfs));
|
||||
return num_vfs;
|
||||
|
||||
@@ -393,7 +393,12 @@ static int gpio_fan_set_cur_state(struct thermal_cooling_device *cdev,
|
||||
if (state >= fan_data->num_speed)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&fan_data->lock);
|
||||
|
||||
set_fan_speed(fan_data, state);
|
||||
|
||||
mutex_unlock(&fan_data->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -489,7 +494,11 @@ MODULE_DEVICE_TABLE(of, of_gpio_fan_match);
|
||||
|
||||
static void gpio_fan_stop(void *data)
|
||||
{
|
||||
struct gpio_fan_data *fan_data = data;
|
||||
|
||||
mutex_lock(&fan_data->lock);
|
||||
set_fan_speed(data, 0);
|
||||
mutex_unlock(&fan_data->lock);
|
||||
}
|
||||
|
||||
static int gpio_fan_probe(struct platform_device *pdev)
|
||||
@@ -562,7 +571,9 @@ static int gpio_fan_suspend(struct device *dev)
|
||||
|
||||
if (fan_data->gpios) {
|
||||
fan_data->resume_speed = fan_data->speed_index;
|
||||
mutex_lock(&fan_data->lock);
|
||||
set_fan_speed(fan_data, 0);
|
||||
mutex_unlock(&fan_data->lock);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -572,8 +583,11 @@ static int gpio_fan_resume(struct device *dev)
|
||||
{
|
||||
struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
|
||||
|
||||
if (fan_data->gpios)
|
||||
if (fan_data->gpios) {
|
||||
mutex_lock(&fan_data->lock);
|
||||
set_fan_speed(fan_data, fan_data->resume_speed);
|
||||
mutex_unlock(&fan_data->lock);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -122,6 +122,9 @@ iommufd_hwpt_paging_alloc(struct iommufd_ctx *ictx, struct iommufd_ioas *ioas,
|
||||
if ((flags & IOMMU_HWPT_ALLOC_DIRTY_TRACKING) &&
|
||||
!device_iommu_capable(idev->dev, IOMMU_CAP_DIRTY_TRACKING))
|
||||
return ERR_PTR(-EOPNOTSUPP);
|
||||
if ((flags & IOMMU_HWPT_FAULT_ID_VALID) &&
|
||||
(flags & IOMMU_HWPT_ALLOC_NEST_PARENT))
|
||||
return ERR_PTR(-EOPNOTSUPP);
|
||||
|
||||
hwpt_paging = __iommufd_object_alloc(
|
||||
ictx, hwpt_paging, IOMMUFD_OBJ_HWPT_PAGING, common.obj);
|
||||
|
||||
@@ -135,8 +135,11 @@ static int led_pwm_mc_probe(struct platform_device *pdev)
|
||||
|
||||
/* init the multicolor's LED class device */
|
||||
cdev = &priv->mc_cdev.led_cdev;
|
||||
fwnode_property_read_u32(mcnode, "max-brightness",
|
||||
ret = fwnode_property_read_u32(mcnode, "max-brightness",
|
||||
&cdev->max_brightness);
|
||||
if (ret)
|
||||
goto release_mcnode;
|
||||
|
||||
cdev->flags = LED_CORE_SUSPENDRESUME;
|
||||
cdev->brightness_set_blocking = led_pwm_mc_set;
|
||||
|
||||
|
||||
@@ -559,12 +559,14 @@ static int imx335_set_ctrl(struct v4l2_ctrl *ctrl)
|
||||
imx335->vblank,
|
||||
imx335->vblank + imx335->cur_mode->height);
|
||||
|
||||
return __v4l2_ctrl_modify_range(imx335->exp_ctrl,
|
||||
IMX335_EXPOSURE_MIN,
|
||||
imx335->vblank +
|
||||
imx335->cur_mode->height -
|
||||
IMX335_EXPOSURE_OFFSET,
|
||||
1, IMX335_EXPOSURE_DEFAULT);
|
||||
ret = __v4l2_ctrl_modify_range(imx335->exp_ctrl,
|
||||
IMX335_EXPOSURE_MIN,
|
||||
imx335->vblank +
|
||||
imx335->cur_mode->height -
|
||||
IMX335_EXPOSURE_OFFSET,
|
||||
1, IMX335_EXPOSURE_DEFAULT);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -575,6 +577,13 @@ static int imx335_set_ctrl(struct v4l2_ctrl *ctrl)
|
||||
return 0;
|
||||
|
||||
switch (ctrl->id) {
|
||||
case V4L2_CID_VBLANK:
|
||||
exposure = imx335->exp_ctrl->val;
|
||||
analog_gain = imx335->again_ctrl->val;
|
||||
|
||||
ret = imx335_update_exp_gain(imx335, exposure, analog_gain);
|
||||
|
||||
break;
|
||||
case V4L2_CID_EXPOSURE:
|
||||
exposure = ctrl->val;
|
||||
analog_gain = imx335->again_ctrl->val;
|
||||
|
||||
@@ -1722,6 +1722,8 @@ static void cx231xx_video_dev_init(
|
||||
vfd->lock = &dev->lock;
|
||||
vfd->release = video_device_release_empty;
|
||||
vfd->ctrl_handler = &dev->mpeg_ctrl_handler.hdl;
|
||||
vfd->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING |
|
||||
V4L2_CAP_VIDEO_CAPTURE;
|
||||
video_set_drvdata(vfd, dev);
|
||||
if (dev->tuner_type == TUNER_ABSENT) {
|
||||
v4l2_disable_ioctl(vfd, VIDIOC_G_FREQUENCY);
|
||||
|
||||
@@ -2542,7 +2542,7 @@ static int __bond_release_one(struct net_device *bond_dev,
|
||||
|
||||
RCU_INIT_POINTER(bond->current_arp_slave, NULL);
|
||||
|
||||
if (!all && (!bond->params.fail_over_mac ||
|
||||
if (!all && (bond->params.fail_over_mac != BOND_FOM_ACTIVE ||
|
||||
BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)) {
|
||||
if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) &&
|
||||
bond_has_slaves(bond))
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#include "main.h"
|
||||
|
||||
static const struct acpi_device_id xge_acpi_match[];
|
||||
|
||||
static int xge_get_resources(struct xge_pdata *pdata)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
@@ -731,7 +729,7 @@ MODULE_DEVICE_TABLE(acpi, xge_acpi_match);
|
||||
static struct platform_driver xge_driver = {
|
||||
.driver = {
|
||||
.name = "xgene-enet-v2",
|
||||
.acpi_match_table = ACPI_PTR(xge_acpi_match),
|
||||
.acpi_match_table = xge_acpi_match,
|
||||
},
|
||||
.probe = xge_probe,
|
||||
.remove_new = xge_remove,
|
||||
|
||||
@@ -66,8 +66,18 @@ static int cgx_fwi_link_change(struct cgx *cgx, int lmac_id, bool en);
|
||||
/* Supported devices */
|
||||
static const struct pci_device_id cgx_id_table[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_OCTEONTX2_CGX) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM,
|
||||
PCI_ANY_ID, PCI_SUBSYS_DEVID_CN10K_A) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM,
|
||||
PCI_ANY_ID, PCI_SUBSYS_DEVID_CNF10K_A) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM,
|
||||
PCI_ANY_ID, PCI_SUBSYS_DEVID_CNF10K_B) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM,
|
||||
PCI_ANY_ID, PCI_SUBSYS_DEVID_CN10K_B) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM,
|
||||
PCI_ANY_ID, PCI_SUBSYS_DEVID_CN20KA) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM,
|
||||
PCI_ANY_ID, PCI_SUBSYS_DEVID_CNF20KA) },
|
||||
{ 0, } /* end of table */
|
||||
};
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#define PCI_SUBSYS_DEVID_CNF10K_A 0xBA00
|
||||
#define PCI_SUBSYS_DEVID_CNF10K_B 0xBC00
|
||||
#define PCI_SUBSYS_DEVID_CN10K_B 0xBD00
|
||||
#define PCI_SUBSYS_DEVID_CN20KA 0xC220
|
||||
#define PCI_SUBSYS_DEVID_CNF20KA 0xC320
|
||||
|
||||
/* PCI BAR nos */
|
||||
#define PCI_AF_REG_BAR_NUM 0
|
||||
|
||||
@@ -34,8 +34,10 @@ struct mtk_flow_data {
|
||||
u16 vlan_in;
|
||||
|
||||
struct {
|
||||
u16 id;
|
||||
__be16 proto;
|
||||
struct {
|
||||
u16 id;
|
||||
__be16 proto;
|
||||
} vlans[2];
|
||||
u8 num;
|
||||
} vlan;
|
||||
struct {
|
||||
@@ -349,18 +351,19 @@ mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f,
|
||||
case FLOW_ACTION_CSUM:
|
||||
break;
|
||||
case FLOW_ACTION_VLAN_PUSH:
|
||||
if (data.vlan.num == 1 ||
|
||||
if (data.vlan.num + data.pppoe.num == 2 ||
|
||||
act->vlan.proto != htons(ETH_P_8021Q))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
data.vlan.id = act->vlan.vid;
|
||||
data.vlan.proto = act->vlan.proto;
|
||||
data.vlan.vlans[data.vlan.num].id = act->vlan.vid;
|
||||
data.vlan.vlans[data.vlan.num].proto = act->vlan.proto;
|
||||
data.vlan.num++;
|
||||
break;
|
||||
case FLOW_ACTION_VLAN_POP:
|
||||
break;
|
||||
case FLOW_ACTION_PPPOE_PUSH:
|
||||
if (data.pppoe.num == 1)
|
||||
if (data.pppoe.num == 1 ||
|
||||
data.vlan.num == 2)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
data.pppoe.sid = act->pppoe.sid;
|
||||
@@ -450,12 +453,9 @@ mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f,
|
||||
if (offload_type == MTK_PPE_PKT_TYPE_BRIDGE)
|
||||
foe.bridge.vlan = data.vlan_in;
|
||||
|
||||
if (data.vlan.num == 1) {
|
||||
if (data.vlan.proto != htons(ETH_P_8021Q))
|
||||
return -EOPNOTSUPP;
|
||||
for (i = 0; i < data.vlan.num; i++)
|
||||
mtk_foe_entry_set_vlan(eth, &foe, data.vlan.vlans[i].id);
|
||||
|
||||
mtk_foe_entry_set_vlan(eth, &foe, data.vlan.id);
|
||||
}
|
||||
if (data.pppoe.num == 1)
|
||||
mtk_foe_entry_set_pppoe(eth, &foe, data.pppoe.sid);
|
||||
|
||||
|
||||
@@ -799,6 +799,7 @@ static void poll_health(struct timer_list *t)
|
||||
health->prev = count;
|
||||
if (health->miss_counter == MAX_MISSES) {
|
||||
mlx5_core_err(dev, "device's health compromised - reached miss count\n");
|
||||
health->synd = ioread8(&h->synd);
|
||||
print_health_info(dev);
|
||||
queue_work(health->wq, &health->report_work);
|
||||
}
|
||||
|
||||
@@ -1417,6 +1417,7 @@ static int cpsw_create_ports(struct cpsw_common *cpsw)
|
||||
ndev->netdev_ops = &cpsw_netdev_ops;
|
||||
ndev->ethtool_ops = &cpsw_ethtool_ops;
|
||||
SET_NETDEV_DEV(ndev, dev);
|
||||
ndev->dev.of_node = slave_data->slave_node;
|
||||
|
||||
if (!napi_ndev) {
|
||||
/* CPSW Host port CPDMA interface is shared between
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/* NXP C45 PHY driver
|
||||
* Copyright 2021-2023 NXP
|
||||
* Copyright 2021-2025 NXP
|
||||
* Author: Radu Pirea <radu-nicolae.pirea@oss.nxp.com>
|
||||
*/
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "nxp-c45-tja11xx.h"
|
||||
|
||||
#define PHY_ID_MASK GENMASK(31, 4)
|
||||
/* Same id: TJA1103, TJA1104 */
|
||||
#define PHY_ID_TJA_1103 0x001BB010
|
||||
#define PHY_ID_TJA_1120 0x001BB031
|
||||
|
||||
@@ -1930,6 +1932,30 @@ static void tja1120_nmi_handler(struct phy_device *phydev,
|
||||
}
|
||||
}
|
||||
|
||||
static int nxp_c45_macsec_ability(struct phy_device *phydev)
|
||||
{
|
||||
bool macsec_ability;
|
||||
int phy_abilities;
|
||||
|
||||
phy_abilities = phy_read_mmd(phydev, MDIO_MMD_VEND1,
|
||||
VEND1_PORT_ABILITIES);
|
||||
macsec_ability = !!(phy_abilities & MACSEC_ABILITY);
|
||||
|
||||
return macsec_ability;
|
||||
}
|
||||
|
||||
static int tja1103_match_phy_device(struct phy_device *phydev)
|
||||
{
|
||||
return phy_id_compare(phydev->phy_id, PHY_ID_TJA_1103, PHY_ID_MASK) &&
|
||||
!nxp_c45_macsec_ability(phydev);
|
||||
}
|
||||
|
||||
static int tja1104_match_phy_device(struct phy_device *phydev)
|
||||
{
|
||||
return phy_id_compare(phydev->phy_id, PHY_ID_TJA_1103, PHY_ID_MASK) &&
|
||||
nxp_c45_macsec_ability(phydev);
|
||||
}
|
||||
|
||||
static const struct nxp_c45_regmap tja1120_regmap = {
|
||||
.vend1_ptp_clk_period = 0x1020,
|
||||
.vend1_event_msg_filt = 0x9010,
|
||||
@@ -2000,7 +2026,6 @@ static const struct nxp_c45_phy_data tja1120_phy_data = {
|
||||
|
||||
static struct phy_driver nxp_c45_driver[] = {
|
||||
{
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_TJA_1103),
|
||||
.name = "NXP C45 TJA1103",
|
||||
.get_features = nxp_c45_get_features,
|
||||
.driver_data = &tja1103_phy_data,
|
||||
@@ -2022,6 +2047,31 @@ static struct phy_driver nxp_c45_driver[] = {
|
||||
.get_sqi = nxp_c45_get_sqi,
|
||||
.get_sqi_max = nxp_c45_get_sqi_max,
|
||||
.remove = nxp_c45_remove,
|
||||
.match_phy_device = tja1103_match_phy_device,
|
||||
},
|
||||
{
|
||||
.name = "NXP C45 TJA1104",
|
||||
.get_features = nxp_c45_get_features,
|
||||
.driver_data = &tja1103_phy_data,
|
||||
.probe = nxp_c45_probe,
|
||||
.soft_reset = nxp_c45_soft_reset,
|
||||
.config_aneg = genphy_c45_config_aneg,
|
||||
.config_init = nxp_c45_config_init,
|
||||
.config_intr = tja1103_config_intr,
|
||||
.handle_interrupt = nxp_c45_handle_interrupt,
|
||||
.read_status = genphy_c45_read_status,
|
||||
.suspend = genphy_c45_pma_suspend,
|
||||
.resume = genphy_c45_pma_resume,
|
||||
.get_sset_count = nxp_c45_get_sset_count,
|
||||
.get_strings = nxp_c45_get_strings,
|
||||
.get_stats = nxp_c45_get_stats,
|
||||
.cable_test_start = nxp_c45_cable_test_start,
|
||||
.cable_test_get_status = nxp_c45_cable_test_get_status,
|
||||
.set_loopback = genphy_c45_loopback,
|
||||
.get_sqi = nxp_c45_get_sqi,
|
||||
.get_sqi_max = nxp_c45_get_sqi_max,
|
||||
.remove = nxp_c45_remove,
|
||||
.match_phy_device = tja1104_match_phy_device,
|
||||
},
|
||||
{
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_TJA_1120),
|
||||
|
||||
@@ -1811,7 +1811,7 @@ bool phylink_expects_phy(struct phylink *pl)
|
||||
{
|
||||
if (pl->cfg_link_an_mode == MLO_AN_FIXED ||
|
||||
(pl->cfg_link_an_mode == MLO_AN_INBAND &&
|
||||
phy_interface_mode_is_8023z(pl->link_config.interface)))
|
||||
phy_interface_mode_is_8023z(pl->link_interface)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -557,13 +557,13 @@ ath12k_dp_tx_process_htt_tx_complete(struct ath12k_base *ab,
|
||||
|
||||
switch (wbm_status) {
|
||||
case HAL_WBM_REL_HTT_TX_COMP_STATUS_OK:
|
||||
case HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP:
|
||||
case HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL:
|
||||
ts.acked = (wbm_status == HAL_WBM_REL_HTT_TX_COMP_STATUS_OK);
|
||||
ts.ack_rssi = le32_get_bits(status_desc->info2,
|
||||
HTT_TX_WBM_COMP_INFO2_ACK_RSSI);
|
||||
ath12k_dp_tx_htt_tx_complete_buf(ab, msdu, tx_ring, &ts);
|
||||
break;
|
||||
case HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP:
|
||||
case HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL:
|
||||
case HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ:
|
||||
case HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT:
|
||||
ath12k_dp_tx_free_txbuf(ab, msdu, mac_id, tx_ring);
|
||||
|
||||
@@ -2206,8 +2206,8 @@ void ath12k_wmi_start_scan_init(struct ath12k *ar,
|
||||
arg->dwell_time_active = 50;
|
||||
arg->dwell_time_active_2g = 0;
|
||||
arg->dwell_time_passive = 150;
|
||||
arg->dwell_time_active_6g = 40;
|
||||
arg->dwell_time_passive_6g = 30;
|
||||
arg->dwell_time_active_6g = 70;
|
||||
arg->dwell_time_passive_6g = 70;
|
||||
arg->min_rest_time = 50;
|
||||
arg->max_rest_time = 500;
|
||||
arg->repeat_probe_time = 0;
|
||||
|
||||
@@ -309,8 +309,8 @@ static int brcm_pcie_encode_ibar_size(u64 size)
|
||||
if (log2_in >= 12 && log2_in <= 15)
|
||||
/* Covers 4KB to 32KB (inclusive) */
|
||||
return (log2_in - 12) + 0x1c;
|
||||
else if (log2_in >= 16 && log2_in <= 35)
|
||||
/* Covers 64KB to 32GB, (inclusive) */
|
||||
else if (log2_in >= 16 && log2_in <= 36)
|
||||
/* Covers 64KB to 64GB, (inclusive) */
|
||||
return log2_in - 15;
|
||||
/* Something is awry so disable */
|
||||
return 0;
|
||||
@@ -1947,3 +1947,4 @@ module_platform_driver(brcm_pcie_driver);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Broadcom STB PCIe RC driver");
|
||||
MODULE_AUTHOR("Broadcom");
|
||||
MODULE_SOFTDEP("pre: irq_bcm2712_mip");
|
||||
|
||||
@@ -817,10 +817,10 @@ static void armv8pmu_start(struct arm_pmu *cpu_pmu)
|
||||
else
|
||||
armv8pmu_disable_user_access();
|
||||
|
||||
kvm_vcpu_pmu_resync_el0();
|
||||
|
||||
/* Enable all counters */
|
||||
armv8pmu_pmcr_write(armv8pmu_pmcr_read() | ARMV8_PMU_PMCR_E);
|
||||
|
||||
kvm_vcpu_pmu_resync_el0();
|
||||
}
|
||||
|
||||
static void armv8pmu_stop(struct arm_pmu *cpu_pmu)
|
||||
|
||||
@@ -72,7 +72,7 @@ static enum bcm281xx_pin_type hdmi_pin = BCM281XX_PIN_TYPE_HDMI;
|
||||
struct bcm281xx_pin_function {
|
||||
const char *name;
|
||||
const char * const *groups;
|
||||
const unsigned ngroups;
|
||||
const unsigned int ngroups;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -84,10 +84,10 @@ struct bcm281xx_pinctrl_data {
|
||||
|
||||
/* List of all pins */
|
||||
const struct pinctrl_pin_desc *pins;
|
||||
const unsigned npins;
|
||||
const unsigned int npins;
|
||||
|
||||
const struct bcm281xx_pin_function *functions;
|
||||
const unsigned nfunctions;
|
||||
const unsigned int nfunctions;
|
||||
|
||||
struct regmap *regmap;
|
||||
};
|
||||
@@ -941,7 +941,7 @@ static struct bcm281xx_pinctrl_data bcm281xx_pinctrl = {
|
||||
};
|
||||
|
||||
static inline enum bcm281xx_pin_type pin_type_get(struct pinctrl_dev *pctldev,
|
||||
unsigned pin)
|
||||
unsigned int pin)
|
||||
{
|
||||
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
||||
@@ -985,7 +985,7 @@ static int bcm281xx_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
|
||||
}
|
||||
|
||||
static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
|
||||
unsigned group)
|
||||
unsigned int group)
|
||||
{
|
||||
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
||||
@@ -993,9 +993,9 @@ static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
|
||||
}
|
||||
|
||||
static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
|
||||
unsigned group,
|
||||
unsigned int group,
|
||||
const unsigned **pins,
|
||||
unsigned *num_pins)
|
||||
unsigned int *num_pins)
|
||||
{
|
||||
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
||||
@@ -1007,7 +1007,7 @@ static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
|
||||
|
||||
static void bcm281xx_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev,
|
||||
struct seq_file *s,
|
||||
unsigned offset)
|
||||
unsigned int offset)
|
||||
{
|
||||
seq_printf(s, " %s", dev_name(pctldev->dev));
|
||||
}
|
||||
@@ -1029,7 +1029,7 @@ static int bcm281xx_pinctrl_get_fcns_count(struct pinctrl_dev *pctldev)
|
||||
}
|
||||
|
||||
static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
|
||||
unsigned function)
|
||||
unsigned int function)
|
||||
{
|
||||
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
||||
@@ -1037,9 +1037,9 @@ static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
|
||||
}
|
||||
|
||||
static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
|
||||
unsigned function,
|
||||
unsigned int function,
|
||||
const char * const **groups,
|
||||
unsigned * const num_groups)
|
||||
unsigned int * const num_groups)
|
||||
{
|
||||
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
|
||||
|
||||
@@ -1050,8 +1050,8 @@ static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
|
||||
}
|
||||
|
||||
static int bcm281xx_pinmux_set(struct pinctrl_dev *pctldev,
|
||||
unsigned function,
|
||||
unsigned group)
|
||||
unsigned int function,
|
||||
unsigned int group)
|
||||
{
|
||||
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
|
||||
const struct bcm281xx_pin_function *f = &pdata->functions[function];
|
||||
@@ -1082,7 +1082,7 @@ static const struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = {
|
||||
};
|
||||
|
||||
static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
|
||||
unsigned pin,
|
||||
unsigned int pin,
|
||||
unsigned long *config)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
@@ -1091,9 +1091,9 @@ static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
|
||||
|
||||
/* Goes through the configs and update register val/mask */
|
||||
static int bcm281xx_std_pin_update(struct pinctrl_dev *pctldev,
|
||||
unsigned pin,
|
||||
unsigned int pin,
|
||||
unsigned long *configs,
|
||||
unsigned num_configs,
|
||||
unsigned int num_configs,
|
||||
u32 *val,
|
||||
u32 *mask)
|
||||
{
|
||||
@@ -1207,9 +1207,9 @@ static const u16 bcm281xx_pullup_map[] = {
|
||||
|
||||
/* Goes through the configs and update register val/mask */
|
||||
static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
|
||||
unsigned pin,
|
||||
unsigned int pin,
|
||||
unsigned long *configs,
|
||||
unsigned num_configs,
|
||||
unsigned int num_configs,
|
||||
u32 *val,
|
||||
u32 *mask)
|
||||
{
|
||||
@@ -1277,9 +1277,9 @@ static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
|
||||
|
||||
/* Goes through the configs and update register val/mask */
|
||||
static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
|
||||
unsigned pin,
|
||||
unsigned int pin,
|
||||
unsigned long *configs,
|
||||
unsigned num_configs,
|
||||
unsigned int num_configs,
|
||||
u32 *val,
|
||||
u32 *mask)
|
||||
{
|
||||
@@ -1321,9 +1321,9 @@ static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
|
||||
}
|
||||
|
||||
static int bcm281xx_pinctrl_pin_config_set(struct pinctrl_dev *pctldev,
|
||||
unsigned pin,
|
||||
unsigned int pin,
|
||||
unsigned long *configs,
|
||||
unsigned num_configs)
|
||||
unsigned int num_configs)
|
||||
{
|
||||
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
|
||||
enum bcm281xx_pin_type pin_type;
|
||||
|
||||
@@ -574,10 +574,10 @@ static int cv1800_pinconf_compute_config(struct cv1800_pinctrl *pctrl,
|
||||
struct cv1800_pin *pin,
|
||||
unsigned long *configs,
|
||||
unsigned int num_configs,
|
||||
u32 *value)
|
||||
u32 *value, u32 *mask)
|
||||
{
|
||||
int i;
|
||||
u32 v = 0;
|
||||
u32 v = 0, m = 0;
|
||||
enum cv1800_pin_io_type type;
|
||||
int ret;
|
||||
|
||||
@@ -596,10 +596,12 @@ static int cv1800_pinconf_compute_config(struct cv1800_pinctrl *pctrl,
|
||||
case PIN_CONFIG_BIAS_PULL_DOWN:
|
||||
v &= ~PIN_IO_PULLDOWN;
|
||||
v |= FIELD_PREP(PIN_IO_PULLDOWN, arg);
|
||||
m |= PIN_IO_PULLDOWN;
|
||||
break;
|
||||
case PIN_CONFIG_BIAS_PULL_UP:
|
||||
v &= ~PIN_IO_PULLUP;
|
||||
v |= FIELD_PREP(PIN_IO_PULLUP, arg);
|
||||
m |= PIN_IO_PULLUP;
|
||||
break;
|
||||
case PIN_CONFIG_DRIVE_STRENGTH_UA:
|
||||
ret = cv1800_pinctrl_oc2reg(pctrl, pin, arg);
|
||||
@@ -607,6 +609,7 @@ static int cv1800_pinconf_compute_config(struct cv1800_pinctrl *pctrl,
|
||||
return ret;
|
||||
v &= ~PIN_IO_DRIVE;
|
||||
v |= FIELD_PREP(PIN_IO_DRIVE, ret);
|
||||
m |= PIN_IO_DRIVE;
|
||||
break;
|
||||
case PIN_CONFIG_INPUT_SCHMITT_UV:
|
||||
ret = cv1800_pinctrl_schmitt2reg(pctrl, pin, arg);
|
||||
@@ -614,6 +617,7 @@ static int cv1800_pinconf_compute_config(struct cv1800_pinctrl *pctrl,
|
||||
return ret;
|
||||
v &= ~PIN_IO_SCHMITT;
|
||||
v |= FIELD_PREP(PIN_IO_SCHMITT, ret);
|
||||
m |= PIN_IO_SCHMITT;
|
||||
break;
|
||||
case PIN_CONFIG_POWER_SOURCE:
|
||||
/* Ignore power source as it is always fixed */
|
||||
@@ -621,10 +625,12 @@ static int cv1800_pinconf_compute_config(struct cv1800_pinctrl *pctrl,
|
||||
case PIN_CONFIG_SLEW_RATE:
|
||||
v &= ~PIN_IO_OUT_FAST_SLEW;
|
||||
v |= FIELD_PREP(PIN_IO_OUT_FAST_SLEW, arg);
|
||||
m |= PIN_IO_OUT_FAST_SLEW;
|
||||
break;
|
||||
case PIN_CONFIG_BIAS_BUS_HOLD:
|
||||
v &= ~PIN_IO_BUS_HOLD;
|
||||
v |= FIELD_PREP(PIN_IO_BUS_HOLD, arg);
|
||||
m |= PIN_IO_BUS_HOLD;
|
||||
break;
|
||||
default:
|
||||
return -ENOTSUPP;
|
||||
@@ -632,17 +638,19 @@ static int cv1800_pinconf_compute_config(struct cv1800_pinctrl *pctrl,
|
||||
}
|
||||
|
||||
*value = v;
|
||||
*mask = m;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cv1800_pin_set_config(struct cv1800_pinctrl *pctrl,
|
||||
unsigned int pin_id,
|
||||
u32 value)
|
||||
u32 value, u32 mask)
|
||||
{
|
||||
struct cv1800_pin *pin = cv1800_get_pin(pctrl, pin_id);
|
||||
unsigned long flags;
|
||||
void __iomem *addr;
|
||||
u32 reg;
|
||||
|
||||
if (!pin)
|
||||
return -EINVAL;
|
||||
@@ -650,7 +658,10 @@ static int cv1800_pin_set_config(struct cv1800_pinctrl *pctrl,
|
||||
addr = cv1800_pinctrl_get_component_addr(pctrl, &pin->conf);
|
||||
|
||||
raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
writel(value, addr);
|
||||
reg = readl(addr);
|
||||
reg &= ~mask;
|
||||
reg |= value;
|
||||
writel(reg, addr);
|
||||
raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
|
||||
return 0;
|
||||
@@ -662,16 +673,17 @@ static int cv1800_pconf_set(struct pinctrl_dev *pctldev,
|
||||
{
|
||||
struct cv1800_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
|
||||
struct cv1800_pin *pin = cv1800_get_pin(pctrl, pin_id);
|
||||
u32 value;
|
||||
u32 value, mask;
|
||||
|
||||
if (!pin)
|
||||
return -ENODEV;
|
||||
|
||||
if (cv1800_pinconf_compute_config(pctrl, pin,
|
||||
configs, num_configs, &value))
|
||||
configs, num_configs,
|
||||
&value, &mask))
|
||||
return -ENOTSUPP;
|
||||
|
||||
return cv1800_pin_set_config(pctrl, pin_id, value);
|
||||
return cv1800_pin_set_config(pctrl, pin_id, value, mask);
|
||||
}
|
||||
|
||||
static int cv1800_pconf_group_set(struct pinctrl_dev *pctldev,
|
||||
@@ -682,7 +694,7 @@ static int cv1800_pconf_group_set(struct pinctrl_dev *pctldev,
|
||||
struct cv1800_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
|
||||
const struct group_desc *group;
|
||||
const struct cv1800_pin_mux_config *pinmuxs;
|
||||
u32 value;
|
||||
u32 value, mask;
|
||||
int i;
|
||||
|
||||
group = pinctrl_generic_get_group(pctldev, gsel);
|
||||
@@ -692,11 +704,12 @@ static int cv1800_pconf_group_set(struct pinctrl_dev *pctldev,
|
||||
pinmuxs = group->data;
|
||||
|
||||
if (cv1800_pinconf_compute_config(pctrl, pinmuxs[0].pin,
|
||||
configs, num_configs, &value))
|
||||
configs, num_configs,
|
||||
&value, &mask))
|
||||
return -ENOTSUPP;
|
||||
|
||||
for (i = 0; i < group->grp.npins; i++)
|
||||
cv1800_pin_set_config(pctrl, group->grp.pins[i], value);
|
||||
cv1800_pin_set_config(pctrl, group->grp.pins[i], value, mask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -117,10 +117,10 @@ static const struct wcnss_data pronto_v1_data = {
|
||||
.pmu_offset = 0x1004,
|
||||
.spare_offset = 0x1088,
|
||||
|
||||
.pd_names = { "mx", "cx" },
|
||||
.pd_names = { "cx", "mx" },
|
||||
.vregs = (struct wcnss_vreg_info[]) {
|
||||
{ "vddmx", 950000, 1150000, 0 },
|
||||
{ "vddcx", .super_turbo = true},
|
||||
{ "vddmx", 950000, 1150000, 0 },
|
||||
{ "vddpx", 1800000, 1800000, 0 },
|
||||
},
|
||||
.num_pd_vregs = 2,
|
||||
@@ -131,10 +131,10 @@ static const struct wcnss_data pronto_v2_data = {
|
||||
.pmu_offset = 0x1004,
|
||||
.spare_offset = 0x1088,
|
||||
|
||||
.pd_names = { "mx", "cx" },
|
||||
.pd_names = { "cx", "mx" },
|
||||
.vregs = (struct wcnss_vreg_info[]) {
|
||||
{ "vddmx", 1287500, 1287500, 0 },
|
||||
{ "vddcx", .super_turbo = true },
|
||||
{ "vddmx", 1287500, 1287500, 0 },
|
||||
{ "vddpx", 1800000, 1800000, 0 },
|
||||
},
|
||||
.num_pd_vregs = 2,
|
||||
@@ -397,8 +397,17 @@ static irqreturn_t wcnss_stop_ack_interrupt(int irq, void *dev)
|
||||
static int wcnss_init_pds(struct qcom_wcnss *wcnss,
|
||||
const char * const pd_names[WCNSS_MAX_PDS])
|
||||
{
|
||||
struct device *dev = wcnss->dev;
|
||||
int i, ret;
|
||||
|
||||
/* Handle single power domain */
|
||||
if (dev->pm_domain) {
|
||||
wcnss->pds[0] = dev;
|
||||
wcnss->num_pds = 1;
|
||||
pm_runtime_enable(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < WCNSS_MAX_PDS; i++) {
|
||||
if (!pd_names[i])
|
||||
break;
|
||||
@@ -418,8 +427,15 @@ static int wcnss_init_pds(struct qcom_wcnss *wcnss,
|
||||
|
||||
static void wcnss_release_pds(struct qcom_wcnss *wcnss)
|
||||
{
|
||||
struct device *dev = wcnss->dev;
|
||||
int i;
|
||||
|
||||
/* Handle single power domain */
|
||||
if (wcnss->num_pds == 1 && dev->pm_domain) {
|
||||
pm_runtime_disable(dev);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < wcnss->num_pds; i++)
|
||||
dev_pm_domain_detach(wcnss->pds[i], false);
|
||||
}
|
||||
@@ -437,10 +453,13 @@ static int wcnss_init_regulators(struct qcom_wcnss *wcnss,
|
||||
* the regulators for the power domains. For old device trees we need to
|
||||
* reserve extra space to manage them through the regulator interface.
|
||||
*/
|
||||
if (wcnss->num_pds)
|
||||
info += num_pd_vregs;
|
||||
else
|
||||
if (wcnss->num_pds) {
|
||||
info += wcnss->num_pds;
|
||||
/* Handle single power domain case */
|
||||
num_vregs += num_pd_vregs - wcnss->num_pds;
|
||||
} else {
|
||||
num_vregs += num_pd_vregs;
|
||||
}
|
||||
|
||||
bulk = devm_kcalloc(wcnss->dev,
|
||||
num_vregs, sizeof(struct regulator_bulk_data),
|
||||
|
||||
@@ -17,7 +17,9 @@ static struct ctl_table scsi_table[] = {
|
||||
.data = &scsi_logging_level,
|
||||
.maxlen = sizeof(scsi_logging_level),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec },
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = SYSCTL_ZERO,
|
||||
.extra2 = SYSCTL_INT_MAX },
|
||||
};
|
||||
|
||||
static struct ctl_table_header *scsi_table_header;
|
||||
|
||||
@@ -44,6 +44,7 @@ struct apple_rtkit {
|
||||
|
||||
struct apple_rtkit_shmem ioreport_buffer;
|
||||
struct apple_rtkit_shmem crashlog_buffer;
|
||||
struct apple_rtkit_shmem oslog_buffer;
|
||||
|
||||
struct apple_rtkit_shmem syslog_buffer;
|
||||
char *syslog_msg_buffer;
|
||||
|
||||
@@ -66,8 +66,9 @@ enum {
|
||||
#define APPLE_RTKIT_SYSLOG_MSG_SIZE GENMASK_ULL(31, 24)
|
||||
|
||||
#define APPLE_RTKIT_OSLOG_TYPE GENMASK_ULL(63, 56)
|
||||
#define APPLE_RTKIT_OSLOG_INIT 1
|
||||
#define APPLE_RTKIT_OSLOG_ACK 3
|
||||
#define APPLE_RTKIT_OSLOG_BUFFER_REQUEST 1
|
||||
#define APPLE_RTKIT_OSLOG_SIZE GENMASK_ULL(55, 36)
|
||||
#define APPLE_RTKIT_OSLOG_IOVA GENMASK_ULL(35, 0)
|
||||
|
||||
#define APPLE_RTKIT_MIN_SUPPORTED_VERSION 11
|
||||
#define APPLE_RTKIT_MAX_SUPPORTED_VERSION 12
|
||||
@@ -251,15 +252,21 @@ static int apple_rtkit_common_rx_get_buffer(struct apple_rtkit *rtk,
|
||||
struct apple_rtkit_shmem *buffer,
|
||||
u8 ep, u64 msg)
|
||||
{
|
||||
size_t n_4kpages = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_SIZE, msg);
|
||||
u64 reply;
|
||||
int err;
|
||||
|
||||
/* The different size vs. IOVA shifts look odd but are indeed correct this way */
|
||||
if (ep == APPLE_RTKIT_EP_OSLOG) {
|
||||
buffer->size = FIELD_GET(APPLE_RTKIT_OSLOG_SIZE, msg);
|
||||
buffer->iova = FIELD_GET(APPLE_RTKIT_OSLOG_IOVA, msg) << 12;
|
||||
} else {
|
||||
buffer->size = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_SIZE, msg) << 12;
|
||||
buffer->iova = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_IOVA, msg);
|
||||
}
|
||||
|
||||
buffer->buffer = NULL;
|
||||
buffer->iomem = NULL;
|
||||
buffer->is_mapped = false;
|
||||
buffer->iova = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_IOVA, msg);
|
||||
buffer->size = n_4kpages << 12;
|
||||
|
||||
dev_dbg(rtk->dev, "RTKit: buffer request for 0x%zx bytes at %pad\n",
|
||||
buffer->size, &buffer->iova);
|
||||
@@ -284,11 +291,21 @@ static int apple_rtkit_common_rx_get_buffer(struct apple_rtkit *rtk,
|
||||
}
|
||||
|
||||
if (!buffer->is_mapped) {
|
||||
reply = FIELD_PREP(APPLE_RTKIT_SYSLOG_TYPE,
|
||||
APPLE_RTKIT_BUFFER_REQUEST);
|
||||
reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_SIZE, n_4kpages);
|
||||
reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_IOVA,
|
||||
buffer->iova);
|
||||
/* oslog uses different fields and needs a shifted IOVA instead of size */
|
||||
if (ep == APPLE_RTKIT_EP_OSLOG) {
|
||||
reply = FIELD_PREP(APPLE_RTKIT_OSLOG_TYPE,
|
||||
APPLE_RTKIT_OSLOG_BUFFER_REQUEST);
|
||||
reply |= FIELD_PREP(APPLE_RTKIT_OSLOG_SIZE, buffer->size);
|
||||
reply |= FIELD_PREP(APPLE_RTKIT_OSLOG_IOVA,
|
||||
buffer->iova >> 12);
|
||||
} else {
|
||||
reply = FIELD_PREP(APPLE_RTKIT_SYSLOG_TYPE,
|
||||
APPLE_RTKIT_BUFFER_REQUEST);
|
||||
reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_SIZE,
|
||||
buffer->size >> 12);
|
||||
reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_IOVA,
|
||||
buffer->iova);
|
||||
}
|
||||
apple_rtkit_send_message(rtk, ep, reply, NULL, false);
|
||||
}
|
||||
|
||||
@@ -482,25 +499,18 @@ static void apple_rtkit_syslog_rx(struct apple_rtkit *rtk, u64 msg)
|
||||
}
|
||||
}
|
||||
|
||||
static void apple_rtkit_oslog_rx_init(struct apple_rtkit *rtk, u64 msg)
|
||||
{
|
||||
u64 ack;
|
||||
|
||||
dev_dbg(rtk->dev, "RTKit: oslog init: msg: 0x%llx\n", msg);
|
||||
ack = FIELD_PREP(APPLE_RTKIT_OSLOG_TYPE, APPLE_RTKIT_OSLOG_ACK);
|
||||
apple_rtkit_send_message(rtk, APPLE_RTKIT_EP_OSLOG, ack, NULL, false);
|
||||
}
|
||||
|
||||
static void apple_rtkit_oslog_rx(struct apple_rtkit *rtk, u64 msg)
|
||||
{
|
||||
u8 type = FIELD_GET(APPLE_RTKIT_OSLOG_TYPE, msg);
|
||||
|
||||
switch (type) {
|
||||
case APPLE_RTKIT_OSLOG_INIT:
|
||||
apple_rtkit_oslog_rx_init(rtk, msg);
|
||||
case APPLE_RTKIT_OSLOG_BUFFER_REQUEST:
|
||||
apple_rtkit_common_rx_get_buffer(rtk, &rtk->oslog_buffer,
|
||||
APPLE_RTKIT_EP_OSLOG, msg);
|
||||
break;
|
||||
default:
|
||||
dev_warn(rtk->dev, "RTKit: Unknown oslog message: %llx\n", msg);
|
||||
dev_warn(rtk->dev, "RTKit: Unknown oslog message: %llx\n",
|
||||
msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -667,7 +677,7 @@ struct apple_rtkit *apple_rtkit_init(struct device *dev, void *cookie,
|
||||
rtk->mbox->rx = apple_rtkit_rx;
|
||||
rtk->mbox->cookie = rtk;
|
||||
|
||||
rtk->wq = alloc_ordered_workqueue("rtkit-%s", WQ_MEM_RECLAIM,
|
||||
rtk->wq = alloc_ordered_workqueue("rtkit-%s", WQ_HIGHPRI | WQ_MEM_RECLAIM,
|
||||
dev_name(rtk->dev));
|
||||
if (!rtk->wq) {
|
||||
ret = -ENOMEM;
|
||||
@@ -710,6 +720,7 @@ int apple_rtkit_reinit(struct apple_rtkit *rtk)
|
||||
|
||||
apple_rtkit_free_buffer(rtk, &rtk->ioreport_buffer);
|
||||
apple_rtkit_free_buffer(rtk, &rtk->crashlog_buffer);
|
||||
apple_rtkit_free_buffer(rtk, &rtk->oslog_buffer);
|
||||
apple_rtkit_free_buffer(rtk, &rtk->syslog_buffer);
|
||||
|
||||
kfree(rtk->syslog_msg_buffer);
|
||||
@@ -890,6 +901,7 @@ void apple_rtkit_free(struct apple_rtkit *rtk)
|
||||
|
||||
apple_rtkit_free_buffer(rtk, &rtk->ioreport_buffer);
|
||||
apple_rtkit_free_buffer(rtk, &rtk->crashlog_buffer);
|
||||
apple_rtkit_free_buffer(rtk, &rtk->oslog_buffer);
|
||||
apple_rtkit_free_buffer(rtk, &rtk->syslog_buffer);
|
||||
|
||||
kfree(rtk->syslog_msg_buffer);
|
||||
|
||||
@@ -105,6 +105,12 @@ err_unknown_variant:
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static const struct regmap_config k3_chipinfo_regmap_cfg = {
|
||||
.reg_bits = 32,
|
||||
.val_bits = 32,
|
||||
.reg_stride = 4,
|
||||
};
|
||||
|
||||
static int k3_chipinfo_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
@@ -112,13 +118,18 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct soc_device *soc_dev;
|
||||
struct regmap *regmap;
|
||||
void __iomem *base;
|
||||
u32 partno_id;
|
||||
u32 variant;
|
||||
u32 jtag_id;
|
||||
u32 mfg;
|
||||
int ret;
|
||||
|
||||
regmap = device_node_to_regmap(node);
|
||||
base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
|
||||
@@ -3884,6 +3884,9 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
|
||||
ndev->mvdev.max_vqs = max_vqs;
|
||||
mvdev = &ndev->mvdev;
|
||||
mvdev->mdev = mdev;
|
||||
/* cpu_to_mlx5vdpa16() below depends on this flag */
|
||||
mvdev->actual_features =
|
||||
(device_features & BIT_ULL(VIRTIO_F_VERSION_1));
|
||||
|
||||
ndev->vqs = kcalloc(max_vqs, sizeof(*ndev->vqs), GFP_KERNEL);
|
||||
ndev->event_cbs = kcalloc(max_vqs + 1, sizeof(*ndev->event_cbs), GFP_KERNEL);
|
||||
|
||||
@@ -762,7 +762,7 @@ vhost_scsi_copy_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
|
||||
size_t len = iov_iter_count(iter);
|
||||
unsigned int nbytes = 0;
|
||||
struct page *page;
|
||||
int i;
|
||||
int i, ret;
|
||||
|
||||
if (cmd->tvc_data_direction == DMA_FROM_DEVICE) {
|
||||
cmd->saved_iter_addr = dup_iter(&cmd->saved_iter, iter,
|
||||
@@ -775,6 +775,7 @@ vhost_scsi_copy_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
|
||||
page = alloc_page(GFP_KERNEL);
|
||||
if (!page) {
|
||||
i--;
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -782,8 +783,10 @@ vhost_scsi_copy_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
|
||||
sg_set_page(&sg[i], page, nbytes, 0);
|
||||
|
||||
if (cmd->tvc_data_direction == DMA_TO_DEVICE &&
|
||||
copy_page_from_iter(page, 0, nbytes, iter) != nbytes)
|
||||
copy_page_from_iter(page, 0, nbytes, iter) != nbytes) {
|
||||
ret = -EFAULT;
|
||||
goto err;
|
||||
}
|
||||
|
||||
len -= nbytes;
|
||||
}
|
||||
@@ -798,7 +801,7 @@ err:
|
||||
for (; i >= 0; i--)
|
||||
__free_page(sg_page(&sg[i]));
|
||||
kfree(cmd->saved_iter_addr);
|
||||
return -ENOMEM;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1282,9 +1285,9 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq)
|
||||
" %d\n", cmd, exp_data_len, prot_bytes, data_direction);
|
||||
|
||||
if (data_direction != DMA_NONE) {
|
||||
if (unlikely(vhost_scsi_mapal(cmd, prot_bytes,
|
||||
&prot_iter, exp_data_len,
|
||||
&data_iter))) {
|
||||
ret = vhost_scsi_mapal(cmd, prot_bytes, &prot_iter,
|
||||
exp_data_len, &data_iter);
|
||||
if (unlikely(ret)) {
|
||||
vq_err(vq, "Failed to map iov to sgl\n");
|
||||
vhost_scsi_release_cmd_res(&cmd->tvc_se_cmd);
|
||||
goto err;
|
||||
|
||||
@@ -195,6 +195,7 @@ struct hda_codec {
|
||||
/* beep device */
|
||||
struct hda_beep *beep;
|
||||
unsigned int beep_mode;
|
||||
bool beep_just_power_on;
|
||||
|
||||
/* widget capabilities cache */
|
||||
u32 *wcaps;
|
||||
|
||||
@@ -2987,6 +2987,21 @@ bpf_jit_find_kfunc_model(const struct bpf_prog *prog,
|
||||
return res ? &res->func_model : NULL;
|
||||
}
|
||||
|
||||
static int add_kfunc_in_insns(struct bpf_verifier_env *env,
|
||||
struct bpf_insn *insn, int cnt)
|
||||
{
|
||||
int i, ret;
|
||||
|
||||
for (i = 0; i < cnt; i++, insn++) {
|
||||
if (bpf_pseudo_kfunc_call(insn)) {
|
||||
ret = add_kfunc_call(env, insn->imm, insn->off);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int add_subprog_and_kfunc(struct bpf_verifier_env *env)
|
||||
{
|
||||
struct bpf_subprog_info *subprog = env->subprog_info;
|
||||
@@ -19737,7 +19752,7 @@ static int convert_ctx_accesses(struct bpf_verifier_env *env)
|
||||
{
|
||||
struct bpf_subprog_info *subprogs = env->subprog_info;
|
||||
const struct bpf_verifier_ops *ops = env->ops;
|
||||
int i, cnt, size, ctx_field_size, delta = 0, epilogue_cnt = 0;
|
||||
int i, cnt, size, ctx_field_size, ret, delta = 0, epilogue_cnt = 0;
|
||||
const int insn_cnt = env->prog->len;
|
||||
struct bpf_insn *epilogue_buf = env->epilogue_buf;
|
||||
struct bpf_insn *insn_buf = env->insn_buf;
|
||||
@@ -19766,6 +19781,10 @@ static int convert_ctx_accesses(struct bpf_verifier_env *env)
|
||||
return -ENOMEM;
|
||||
env->prog = new_prog;
|
||||
delta += cnt - 1;
|
||||
|
||||
ret = add_kfunc_in_insns(env, epilogue_buf, epilogue_cnt - 1);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19786,6 +19805,10 @@ static int convert_ctx_accesses(struct bpf_verifier_env *env)
|
||||
|
||||
env->prog = new_prog;
|
||||
delta += cnt - 1;
|
||||
|
||||
ret = add_kfunc_in_insns(env, insn_buf, cnt - 1);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11965,40 +11965,51 @@ static int perf_try_init_event(struct pmu *pmu, struct perf_event *event)
|
||||
if (ctx)
|
||||
perf_event_ctx_unlock(event->group_leader, ctx);
|
||||
|
||||
if (!ret) {
|
||||
if (!(pmu->capabilities & PERF_PMU_CAP_EXTENDED_REGS) &&
|
||||
has_extended_regs(event))
|
||||
ret = -EOPNOTSUPP;
|
||||
if (ret)
|
||||
goto err_pmu;
|
||||
|
||||
if (pmu->capabilities & PERF_PMU_CAP_NO_EXCLUDE &&
|
||||
event_has_any_exclude_flag(event))
|
||||
ret = -EINVAL;
|
||||
|
||||
if (pmu->scope != PERF_PMU_SCOPE_NONE && event->cpu >= 0) {
|
||||
const struct cpumask *cpumask = perf_scope_cpu_topology_cpumask(pmu->scope, event->cpu);
|
||||
struct cpumask *pmu_cpumask = perf_scope_cpumask(pmu->scope);
|
||||
int cpu;
|
||||
|
||||
if (pmu_cpumask && cpumask) {
|
||||
cpu = cpumask_any_and(pmu_cpumask, cpumask);
|
||||
if (cpu >= nr_cpu_ids)
|
||||
ret = -ENODEV;
|
||||
else
|
||||
event->event_caps |= PERF_EV_CAP_READ_SCOPE;
|
||||
} else {
|
||||
ret = -ENODEV;
|
||||
}
|
||||
}
|
||||
|
||||
if (ret && event->destroy)
|
||||
event->destroy(event);
|
||||
if (!(pmu->capabilities & PERF_PMU_CAP_EXTENDED_REGS) &&
|
||||
has_extended_regs(event)) {
|
||||
ret = -EOPNOTSUPP;
|
||||
goto err_destroy;
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
event->pmu = NULL;
|
||||
module_put(pmu->module);
|
||||
if (pmu->capabilities & PERF_PMU_CAP_NO_EXCLUDE &&
|
||||
event_has_any_exclude_flag(event)) {
|
||||
ret = -EINVAL;
|
||||
goto err_destroy;
|
||||
}
|
||||
|
||||
if (pmu->scope != PERF_PMU_SCOPE_NONE && event->cpu >= 0) {
|
||||
const struct cpumask *cpumask;
|
||||
struct cpumask *pmu_cpumask;
|
||||
int cpu;
|
||||
|
||||
cpumask = perf_scope_cpu_topology_cpumask(pmu->scope, event->cpu);
|
||||
pmu_cpumask = perf_scope_cpumask(pmu->scope);
|
||||
|
||||
ret = -ENODEV;
|
||||
if (!pmu_cpumask || !cpumask)
|
||||
goto err_destroy;
|
||||
|
||||
cpu = cpumask_any_and(pmu_cpumask, cpumask);
|
||||
if (cpu >= nr_cpu_ids)
|
||||
goto err_destroy;
|
||||
|
||||
event->event_caps |= PERF_EV_CAP_READ_SCOPE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_destroy:
|
||||
if (event->destroy) {
|
||||
event->destroy(event);
|
||||
event->destroy = NULL;
|
||||
}
|
||||
|
||||
err_pmu:
|
||||
event->pmu = NULL;
|
||||
module_put(pmu->module);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -950,9 +950,10 @@ static int hw_breakpoint_event_init(struct perf_event *bp)
|
||||
return -ENOENT;
|
||||
|
||||
/*
|
||||
* no branch sampling for breakpoint events
|
||||
* Check if breakpoint type is supported before proceeding.
|
||||
* Also, no branch sampling for breakpoint events.
|
||||
*/
|
||||
if (has_branch_stack(bp))
|
||||
if (!hw_breakpoint_slots_cached(find_slot_idx(bp->attr.bp_type)) || has_branch_stack(bp))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
err = register_perf_hw_breakpoint(bp);
|
||||
|
||||
@@ -162,7 +162,7 @@ static inline bool rcu_seq_done_exact(unsigned long *sp, unsigned long s)
|
||||
{
|
||||
unsigned long cur_s = READ_ONCE(*sp);
|
||||
|
||||
return ULONG_CMP_GE(cur_s, s) || ULONG_CMP_LT(cur_s, s - (2 * RCU_SEQ_STATE_MASK + 1));
|
||||
return ULONG_CMP_GE(cur_s, s) || ULONG_CMP_LT(cur_s, s - (3 * RCU_SEQ_STATE_MASK + 1));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1822,10 +1822,14 @@ static noinline_for_stack bool rcu_gp_init(void)
|
||||
|
||||
/* Advance to a new grace period and initialize state. */
|
||||
record_gp_stall_check_time();
|
||||
/*
|
||||
* A new wait segment must be started before gp_seq advanced, so
|
||||
* that previous gp waiters won't observe the new gp_seq.
|
||||
*/
|
||||
start_new_poll = rcu_sr_normal_gp_init();
|
||||
/* Record GP times before starting GP, hence rcu_seq_start(). */
|
||||
rcu_seq_start(&rcu_state.gp_seq);
|
||||
ASSERT_EXCLUSIVE_WRITER(rcu_state.gp_seq);
|
||||
start_new_poll = rcu_sr_normal_gp_init();
|
||||
trace_rcu_grace_period(rcu_state.name, rcu_state.gp_seq, TPS("start"));
|
||||
rcu_poll_gp_seq_start(&rcu_state.gp_seq_polled_snap);
|
||||
raw_spin_unlock_irq_rcu_node(rnp);
|
||||
@@ -4183,14 +4187,17 @@ EXPORT_SYMBOL_GPL(get_state_synchronize_rcu);
|
||||
*/
|
||||
void get_state_synchronize_rcu_full(struct rcu_gp_oldstate *rgosp)
|
||||
{
|
||||
struct rcu_node *rnp = rcu_get_root();
|
||||
|
||||
/*
|
||||
* Any prior manipulation of RCU-protected data must happen
|
||||
* before the loads from ->gp_seq and ->expedited_sequence.
|
||||
*/
|
||||
smp_mb(); /* ^^^ */
|
||||
rgosp->rgos_norm = rcu_seq_snap(&rnp->gp_seq);
|
||||
|
||||
// Yes, rcu_state.gp_seq, not rnp_root->gp_seq, the latter's use
|
||||
// in poll_state_synchronize_rcu_full() notwithstanding. Use of
|
||||
// the latter here would result in too-short grace periods due to
|
||||
// interactions with newly onlined CPUs.
|
||||
rgosp->rgos_norm = rcu_seq_snap(&rcu_state.gp_seq);
|
||||
rgosp->rgos_exp = rcu_seq_snap(&rcu_state.expedited_sequence);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(get_state_synchronize_rcu_full);
|
||||
|
||||
@@ -898,6 +898,10 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
|
||||
pkt_dev->nr_labels = 0;
|
||||
do {
|
||||
__u32 tmp;
|
||||
|
||||
if (n >= MAX_MPLS_LABELS)
|
||||
return -E2BIG;
|
||||
|
||||
len = hex32_arg(&buffer[i], 8, &tmp);
|
||||
if (len <= 0)
|
||||
return len;
|
||||
@@ -909,8 +913,6 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
|
||||
return -EFAULT;
|
||||
i++;
|
||||
n++;
|
||||
if (n >= MAX_MPLS_LABELS)
|
||||
return -E2BIG;
|
||||
} while (c == ',');
|
||||
|
||||
pkt_dev->nr_labels = n;
|
||||
|
||||
@@ -829,19 +829,33 @@ static int rtm_to_fib_config(struct net *net, struct sk_buff *skb,
|
||||
}
|
||||
}
|
||||
|
||||
if (cfg->fc_dst_len > 32) {
|
||||
NL_SET_ERR_MSG(extack, "Invalid prefix length");
|
||||
err = -EINVAL;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
if (cfg->fc_dst_len < 32 && (ntohl(cfg->fc_dst) << cfg->fc_dst_len)) {
|
||||
NL_SET_ERR_MSG(extack, "Invalid prefix for given prefix length");
|
||||
err = -EINVAL;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
if (cfg->fc_nh_id) {
|
||||
if (cfg->fc_oif || cfg->fc_gw_family ||
|
||||
cfg->fc_encap || cfg->fc_mp) {
|
||||
NL_SET_ERR_MSG(extack,
|
||||
"Nexthop specification and nexthop id are mutually exclusive");
|
||||
return -EINVAL;
|
||||
err = -EINVAL;
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
|
||||
if (has_gw && has_via) {
|
||||
NL_SET_ERR_MSG(extack,
|
||||
"Nexthop configuration can not contain both GATEWAY and VIA");
|
||||
return -EINVAL;
|
||||
err = -EINVAL;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
if (!cfg->fc_table)
|
||||
|
||||
@@ -1193,22 +1193,6 @@ static int fib_insert_alias(struct trie *t, struct key_vector *tp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool fib_valid_key_len(u32 key, u8 plen, struct netlink_ext_ack *extack)
|
||||
{
|
||||
if (plen > KEYLENGTH) {
|
||||
NL_SET_ERR_MSG(extack, "Invalid prefix length");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((plen < KEYLENGTH) && (key << plen)) {
|
||||
NL_SET_ERR_MSG(extack,
|
||||
"Invalid prefix for given prefix length");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void fib_remove_alias(struct trie *t, struct key_vector *tp,
|
||||
struct key_vector *l, struct fib_alias *old);
|
||||
|
||||
@@ -1229,9 +1213,6 @@ int fib_table_insert(struct net *net, struct fib_table *tb,
|
||||
|
||||
key = ntohl(cfg->fc_dst);
|
||||
|
||||
if (!fib_valid_key_len(key, plen, extack))
|
||||
return -EINVAL;
|
||||
|
||||
pr_debug("Insert table=%u %08x/%d\n", tb->tb_id, key, plen);
|
||||
|
||||
fi = fib_create_info(cfg, extack);
|
||||
@@ -1723,9 +1704,6 @@ int fib_table_delete(struct net *net, struct fib_table *tb,
|
||||
|
||||
key = ntohl(cfg->fc_dst);
|
||||
|
||||
if (!fib_valid_key_len(key, plen, extack))
|
||||
return -EINVAL;
|
||||
|
||||
l = fib_find_node(t, &tp, key);
|
||||
if (!l)
|
||||
return -ESRCH;
|
||||
|
||||
@@ -31,8 +31,9 @@ static void generate_tone(struct hda_beep *beep, int tone)
|
||||
beep->power_hook(beep, true);
|
||||
beep->playing = 1;
|
||||
}
|
||||
snd_hda_codec_write(codec, beep->nid, 0,
|
||||
AC_VERB_SET_BEEP_CONTROL, tone);
|
||||
if (!codec->beep_just_power_on)
|
||||
snd_hda_codec_write(codec, beep->nid, 0,
|
||||
AC_VERB_SET_BEEP_CONTROL, tone);
|
||||
if (!tone && beep->playing) {
|
||||
beep->playing = 0;
|
||||
if (beep->power_hook)
|
||||
@@ -212,10 +213,12 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
|
||||
struct hda_beep *beep;
|
||||
int err;
|
||||
|
||||
if (!snd_hda_get_bool_hint(codec, "beep"))
|
||||
return 0; /* disabled explicitly by hints */
|
||||
if (codec->beep_mode == HDA_BEEP_MODE_OFF)
|
||||
return 0; /* disabled by module option */
|
||||
if (!codec->beep_just_power_on) {
|
||||
if (!snd_hda_get_bool_hint(codec, "beep"))
|
||||
return 0; /* disabled explicitly by hints */
|
||||
if (codec->beep_mode == HDA_BEEP_MODE_OFF)
|
||||
return 0; /* disabled by module option */
|
||||
}
|
||||
|
||||
beep = kzalloc(sizeof(*beep), GFP_KERNEL);
|
||||
if (beep == NULL)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <sound/hda_codec.h>
|
||||
#include "hda_local.h"
|
||||
#include "hda_auto_parser.h"
|
||||
#include "hda_beep.h"
|
||||
#include "hda_jack.h"
|
||||
#include "hda_generic.h"
|
||||
#include "hda_component.h"
|
||||
@@ -7036,6 +7037,30 @@ static void alc285_fixup_hp_envy_x360(struct hda_codec *codec,
|
||||
}
|
||||
}
|
||||
|
||||
static void alc285_fixup_hp_beep(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix, int action)
|
||||
{
|
||||
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
|
||||
codec->beep_just_power_on = true;
|
||||
} else if (action == HDA_FIXUP_ACT_INIT) {
|
||||
#ifdef CONFIG_SND_HDA_INPUT_BEEP
|
||||
/*
|
||||
* Just enable loopback to internal speaker and headphone jack.
|
||||
* Disable amplification to get about the same beep volume as
|
||||
* was on pure BIOS setup before loading the driver.
|
||||
*/
|
||||
alc_update_coef_idx(codec, 0x36, 0x7070, BIT(13));
|
||||
|
||||
snd_hda_enable_beep_device(codec, 1);
|
||||
|
||||
#if !IS_ENABLED(CONFIG_INPUT_PCSPKR)
|
||||
dev_warn_once(hda_codec_dev(codec),
|
||||
"enable CONFIG_INPUT_PCSPKR to get PC beeps\n");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* for hda_fixup_thinkpad_acpi() */
|
||||
#include "thinkpad_helper.c"
|
||||
|
||||
@@ -7806,6 +7831,7 @@ enum {
|
||||
ALC285_FIXUP_HP_GPIO_LED,
|
||||
ALC285_FIXUP_HP_MUTE_LED,
|
||||
ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED,
|
||||
ALC285_FIXUP_HP_BEEP_MICMUTE_LED,
|
||||
ALC236_FIXUP_HP_MUTE_LED_COEFBIT2,
|
||||
ALC236_FIXUP_HP_GPIO_LED,
|
||||
ALC236_FIXUP_HP_MUTE_LED,
|
||||
@@ -9395,6 +9421,12 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc285_fixup_hp_spectre_x360_mute_led,
|
||||
},
|
||||
[ALC285_FIXUP_HP_BEEP_MICMUTE_LED] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc285_fixup_hp_beep,
|
||||
.chained = true,
|
||||
.chain_id = ALC285_FIXUP_HP_MUTE_LED,
|
||||
},
|
||||
[ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc236_fixup_hp_mute_led_coefbit2,
|
||||
@@ -10493,7 +10525,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
|
||||
SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
|
||||
SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
|
||||
SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8760, "HP EliteBook 8{4,5}5 G7", ALC285_FIXUP_HP_BEEP_MICMUTE_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
|
||||
SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
|
||||
|
||||
@@ -58,7 +58,15 @@ static const char *aud_clks[MT8188_CLK_NUM] = {
|
||||
[MT8188_CLK_AUD_ADC] = "aud_adc",
|
||||
[MT8188_CLK_AUD_DAC_HIRES] = "aud_dac_hires",
|
||||
[MT8188_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp",
|
||||
[MT8188_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1",
|
||||
[MT8188_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2",
|
||||
[MT8188_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3",
|
||||
[MT8188_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4",
|
||||
[MT8188_CLK_AUD_ADC_HIRES] = "aud_adc_hires",
|
||||
[MT8188_CLK_AUD_DMIC_HIRES1] = "aud_dmic_hires1",
|
||||
[MT8188_CLK_AUD_DMIC_HIRES2] = "aud_dmic_hires2",
|
||||
[MT8188_CLK_AUD_DMIC_HIRES3] = "aud_dmic_hires3",
|
||||
[MT8188_CLK_AUD_DMIC_HIRES4] = "aud_dmic_hires4",
|
||||
[MT8188_CLK_AUD_I2SIN] = "aud_i2sin",
|
||||
[MT8188_CLK_AUD_TDM_IN] = "aud_tdm_in",
|
||||
[MT8188_CLK_AUD_I2S_OUT] = "aud_i2s_out",
|
||||
|
||||
@@ -54,7 +54,15 @@ enum {
|
||||
MT8188_CLK_AUD_ADC,
|
||||
MT8188_CLK_AUD_DAC_HIRES,
|
||||
MT8188_CLK_AUD_A1SYS_HP,
|
||||
MT8188_CLK_AUD_AFE_DMIC1,
|
||||
MT8188_CLK_AUD_AFE_DMIC2,
|
||||
MT8188_CLK_AUD_AFE_DMIC3,
|
||||
MT8188_CLK_AUD_AFE_DMIC4,
|
||||
MT8188_CLK_AUD_ADC_HIRES,
|
||||
MT8188_CLK_AUD_DMIC_HIRES1,
|
||||
MT8188_CLK_AUD_DMIC_HIRES2,
|
||||
MT8188_CLK_AUD_DMIC_HIRES3,
|
||||
MT8188_CLK_AUD_DMIC_HIRES4,
|
||||
MT8188_CLK_AUD_I2SIN,
|
||||
MT8188_CLK_AUD_TDM_IN,
|
||||
MT8188_CLK_AUD_I2S_OUT,
|
||||
|
||||
@@ -2855,10 +2855,6 @@ static bool mt8188_is_volatile_reg(struct device *dev, unsigned int reg)
|
||||
case AFE_DMIC3_SRC_DEBUG_MON0:
|
||||
case AFE_DMIC3_UL_SRC_MON0:
|
||||
case AFE_DMIC3_UL_SRC_MON1:
|
||||
case DMIC_GAIN1_CUR:
|
||||
case DMIC_GAIN2_CUR:
|
||||
case DMIC_GAIN3_CUR:
|
||||
case DMIC_GAIN4_CUR:
|
||||
case ETDM_IN1_MONITOR:
|
||||
case ETDM_IN2_MONITOR:
|
||||
case ETDM_OUT1_MONITOR:
|
||||
|
||||
@@ -289,6 +289,10 @@ TEST_F(iommufd_ioas, alloc_hwpt_nested)
|
||||
&test_hwpt_id);
|
||||
test_err_hwpt_alloc(EINVAL, self->device_id, self->device_id, 0,
|
||||
&test_hwpt_id);
|
||||
test_err_hwpt_alloc(EOPNOTSUPP, self->device_id, self->ioas_id,
|
||||
IOMMU_HWPT_ALLOC_NEST_PARENT |
|
||||
IOMMU_HWPT_FAULT_ID_VALID,
|
||||
&test_hwpt_id);
|
||||
|
||||
test_cmd_hwpt_alloc(self->device_id, self->ioas_id,
|
||||
IOMMU_HWPT_ALLOC_NEST_PARENT,
|
||||
|
||||
@@ -100,5 +100,6 @@ trap cleanup EXIT
|
||||
if [[ "${test}" == "all" ]]; then
|
||||
run_all_tests
|
||||
else
|
||||
run_test "${proto}" "${test}"
|
||||
exit_code=$(run_test "${proto}" "${test}")
|
||||
exit $exit_code
|
||||
fi;
|
||||
|
||||
Reference in New Issue
Block a user