Commit f014d2b8 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'char-misc-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are some small different driver fixes for 5.6-rc7:

   - binderfs fix, yet again

   - slimbus new device id added

   - hwtracing bugfixes for reported issues and a new device id

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  intel_th: pci: Add Elkhart Lake CPU support
  intel_th: Fix user-visible error codes
  intel_th: msu: Fix the unexpected state warning
  stm class: sys-t: Fix the use of time_after()
  slimbus: ngd: add v2.1.0 compatible
  binderfs: use refcount for binder control devices too
parents 3bd14829 add492d2
...@@ -448,6 +448,7 @@ static int binderfs_binder_ctl_create(struct super_block *sb) ...@@ -448,6 +448,7 @@ static int binderfs_binder_ctl_create(struct super_block *sb)
inode->i_uid = info->root_uid; inode->i_uid = info->root_uid;
inode->i_gid = info->root_gid; inode->i_gid = info->root_gid;
refcount_set(&device->ref, 1);
device->binderfs_inode = inode; device->binderfs_inode = inode;
device->miscdev.minor = minor; device->miscdev.minor = minor;
......
...@@ -718,9 +718,6 @@ static int msc_win_set_lockout(struct msc_window *win, ...@@ -718,9 +718,6 @@ static int msc_win_set_lockout(struct msc_window *win,
if (old != expect) { if (old != expect) {
ret = -EINVAL; ret = -EINVAL;
dev_warn_ratelimited(msc_dev(win->msc),
"expected lockout state %d, got %d\n",
expect, old);
goto unlock; goto unlock;
} }
...@@ -741,6 +738,10 @@ static int msc_win_set_lockout(struct msc_window *win, ...@@ -741,6 +738,10 @@ static int msc_win_set_lockout(struct msc_window *win,
/* from intel_th_msc_window_unlock(), don't warn if not locked */ /* from intel_th_msc_window_unlock(), don't warn if not locked */
if (expect == WIN_LOCKED && old == new) if (expect == WIN_LOCKED && old == new)
return 0; return 0;
dev_warn_ratelimited(msc_dev(win->msc),
"expected lockout state %d, got %d\n",
expect, old);
} }
return ret; return ret;
...@@ -760,7 +761,7 @@ static int msc_configure(struct msc *msc) ...@@ -760,7 +761,7 @@ static int msc_configure(struct msc *msc)
lockdep_assert_held(&msc->buf_mutex); lockdep_assert_held(&msc->buf_mutex);
if (msc->mode > MSC_MODE_MULTI) if (msc->mode > MSC_MODE_MULTI)
return -ENOTSUPP; return -EINVAL;
if (msc->mode == MSC_MODE_MULTI) { if (msc->mode == MSC_MODE_MULTI) {
if (msc_win_set_lockout(msc->cur_win, WIN_READY, WIN_INUSE)) if (msc_win_set_lockout(msc->cur_win, WIN_READY, WIN_INUSE))
...@@ -1294,7 +1295,7 @@ static int msc_buffer_alloc(struct msc *msc, unsigned long *nr_pages, ...@@ -1294,7 +1295,7 @@ static int msc_buffer_alloc(struct msc *msc, unsigned long *nr_pages,
} else if (msc->mode == MSC_MODE_MULTI) { } else if (msc->mode == MSC_MODE_MULTI) {
ret = msc_buffer_multi_alloc(msc, nr_pages, nr_wins); ret = msc_buffer_multi_alloc(msc, nr_pages, nr_wins);
} else { } else {
ret = -ENOTSUPP; ret = -EINVAL;
} }
if (!ret) { if (!ret) {
...@@ -1530,7 +1531,7 @@ static ssize_t intel_th_msc_read(struct file *file, char __user *buf, ...@@ -1530,7 +1531,7 @@ static ssize_t intel_th_msc_read(struct file *file, char __user *buf,
if (ret >= 0) if (ret >= 0)
*ppos = iter->offset; *ppos = iter->offset;
} else { } else {
ret = -ENOTSUPP; ret = -EINVAL;
} }
put_count: put_count:
......
...@@ -234,6 +234,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = { ...@@ -234,6 +234,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4da6), PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4da6),
.driver_data = (kernel_ulong_t)&intel_th_2x, .driver_data = (kernel_ulong_t)&intel_th_2x,
}, },
{
/* Elkhart Lake CPU */
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4529),
.driver_data = (kernel_ulong_t)&intel_th_2x,
},
{ {
/* Elkhart Lake */ /* Elkhart Lake */
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26), PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26),
......
...@@ -238,7 +238,7 @@ static struct configfs_attribute *sys_t_policy_attrs[] = { ...@@ -238,7 +238,7 @@ static struct configfs_attribute *sys_t_policy_attrs[] = {
static inline bool sys_t_need_ts(struct sys_t_output *op) static inline bool sys_t_need_ts(struct sys_t_output *op)
{ {
if (op->node.ts_interval && if (op->node.ts_interval &&
time_after(op->ts_jiffies + op->node.ts_interval, jiffies)) { time_after(jiffies, op->ts_jiffies + op->node.ts_interval)) {
op->ts_jiffies = jiffies; op->ts_jiffies = jiffies;
return true; return true;
...@@ -250,8 +250,8 @@ static inline bool sys_t_need_ts(struct sys_t_output *op) ...@@ -250,8 +250,8 @@ static inline bool sys_t_need_ts(struct sys_t_output *op)
static bool sys_t_need_clock_sync(struct sys_t_output *op) static bool sys_t_need_clock_sync(struct sys_t_output *op)
{ {
if (op->node.clocksync_interval && if (op->node.clocksync_interval &&
time_after(op->clocksync_jiffies + op->node.clocksync_interval, time_after(jiffies,
jiffies)) { op->clocksync_jiffies + op->node.clocksync_interval)) {
op->clocksync_jiffies = jiffies; op->clocksync_jiffies = jiffies;
return true; return true;
......
...@@ -1320,6 +1320,9 @@ static const struct of_device_id qcom_slim_ngd_dt_match[] = { ...@@ -1320,6 +1320,9 @@ static const struct of_device_id qcom_slim_ngd_dt_match[] = {
{ {
.compatible = "qcom,slim-ngd-v1.5.0", .compatible = "qcom,slim-ngd-v1.5.0",
.data = &ngd_v1_5_offset_info, .data = &ngd_v1_5_offset_info,
},{
.compatible = "qcom,slim-ngd-v2.1.0",
.data = &ngd_v1_5_offset_info,
}, },
{} {}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment