Skip to content

Commit 5281c65

Browse files
committed
Merge tag 'char-misc-6.15-rc4' 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 char/misc driver fixes to resolve reported problems for 6.15-rc4. Included in here are: - misc chrdev region range fix reported by many people - nvmem driver fixes and dt updates - mei new device id and fixes - comedi driver fix - pps driver fix - binder debug log fix - pci1xxxx driver fixes - firmware driver fix All of these have been in linux-next for over a week with no reported issues" * tag 'char-misc-6.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (25 commits) firmware: stratix10-svc: Add of_platform_default_populate() mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf and rx_buf type mei: vsc: Fix fortify-panic caused by invalid counted_by() use pps: generators: tio: fix platform_set_drvdata() mcb: fix a double free bug in chameleon_parse_gdd() misc: microchip: pci1xxxx: Fix incorrect IRQ status handling during ack misc: microchip: pci1xxxx: Fix Kernel panic during IRQ handler registration char: misc: register chrdev region with all possible minors mei: me: add panther lake H DID comedi: jr3_pci: Fix synchronous deletion of timer binder: fix offset calculation in debug log intel_th: avoid using deprecated page->mapping, index fields dt-bindings: nvmem: Add compatible for MSM8960 dt-bindings: nvmem: Add compatible for IPQ5018 nvmem: qfprom: switch to 4-byte aligned reads nvmem: core: update raw_len if the bit reading is required nvmem: core: verify cell's raw_len nvmem: core: fix bit offsets of more than one byte dt-bindings: nvmem: fixed-cell: increase bits start value to 31 dt-bindings: nvmem: Add compatible for MS8937 ...
2 parents 3ae7f50 + 4d239f4 commit 5281c65

File tree

18 files changed

+151
-69
lines changed

18 files changed

+151
-69
lines changed

Documentation/devicetree/bindings/nvmem/layouts/fixed-cell.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ properties:
2727
$ref: /schemas/types.yaml#/definitions/uint32-array
2828
items:
2929
- minimum: 0
30-
maximum: 7
30+
maximum: 31
3131
description:
3232
Offset in bit within the address range specified by reg.
3333
- minimum: 1

Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ properties:
1919
- enum:
2020
- qcom,apq8064-qfprom
2121
- qcom,apq8084-qfprom
22+
- qcom,ipq5018-qfprom
2223
- qcom,ipq5332-qfprom
2324
- qcom,ipq5424-qfprom
2425
- qcom,ipq6018-qfprom
@@ -28,6 +29,8 @@ properties:
2829
- qcom,msm8226-qfprom
2930
- qcom,msm8916-qfprom
3031
- qcom,msm8917-qfprom
32+
- qcom,msm8937-qfprom
33+
- qcom,msm8960-qfprom
3134
- qcom,msm8974-qfprom
3235
- qcom,msm8976-qfprom
3336
- qcom,msm8996-qfprom
@@ -51,6 +54,7 @@ properties:
5154
- qcom,sm8450-qfprom
5255
- qcom,sm8550-qfprom
5356
- qcom,sm8650-qfprom
57+
- qcom,x1e80100-qfprom
5458
- const: qcom,qfprom
5559

5660
reg:

Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ properties:
1414
enum:
1515
- rockchip,px30-otp
1616
- rockchip,rk3308-otp
17+
- rockchip,rk3576-otp
1718
- rockchip,rk3588-otp
1819

1920
reg:
@@ -62,12 +63,34 @@ allOf:
6263
properties:
6364
clocks:
6465
maxItems: 3
66+
clock-names:
67+
maxItems: 3
6568
resets:
6669
maxItems: 1
6770
reset-names:
6871
items:
6972
- const: phy
7073

74+
- if:
75+
properties:
76+
compatible:
77+
contains:
78+
enum:
79+
- rockchip,rk3576-otp
80+
then:
81+
properties:
82+
clocks:
83+
maxItems: 3
84+
clock-names:
85+
maxItems: 3
86+
resets:
87+
minItems: 2
88+
maxItems: 2
89+
reset-names:
90+
items:
91+
- const: otp
92+
- const: apb
93+
7194
- if:
7295
properties:
7396
compatible:
@@ -78,6 +101,8 @@ allOf:
78101
properties:
79102
clocks:
80103
minItems: 4
104+
clock-names:
105+
minItems: 4
81106
resets:
82107
minItems: 3
83108
reset-names:

drivers/android/binder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6373,7 +6373,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m,
63736373
seq_printf(m, " node %d", buffer->target_node->debug_id);
63746374
seq_printf(m, " size %zd:%zd offset %lx\n",
63756375
buffer->data_size, buffer->offsets_size,
6376-
proc->alloc.vm_start - buffer->user_data);
6376+
buffer->user_data - proc->alloc.vm_start);
63776377
}
63786378

63796379
static void print_binder_work_ilocked(struct seq_file *m,

drivers/char/misc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static int __init misc_init(void)
315315
goto fail_remove;
316316

317317
err = -EIO;
318-
if (register_chrdev(MISC_MAJOR, "misc", &misc_fops))
318+
if (__register_chrdev(MISC_MAJOR, 0, MINORMASK + 1, "misc", &misc_fops))
319319
goto fail_printk;
320320
return 0;
321321

drivers/comedi/drivers/jr3_pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ static void jr3_pci_detach(struct comedi_device *dev)
758758
struct jr3_pci_dev_private *devpriv = dev->private;
759759

760760
if (devpriv)
761-
timer_delete_sync(&devpriv->timer);
761+
timer_shutdown_sync(&devpriv->timer);
762762

763763
comedi_pci_detach(dev);
764764
}

drivers/firmware/stratix10-svc.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,22 +1224,28 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
12241224
if (!svc->intel_svc_fcs) {
12251225
dev_err(dev, "failed to allocate %s device\n", INTEL_FCS);
12261226
ret = -ENOMEM;
1227-
goto err_unregister_dev;
1227+
goto err_unregister_rsu_dev;
12281228
}
12291229

12301230
ret = platform_device_add(svc->intel_svc_fcs);
12311231
if (ret) {
12321232
platform_device_put(svc->intel_svc_fcs);
1233-
goto err_unregister_dev;
1233+
goto err_unregister_rsu_dev;
12341234
}
12351235

1236+
ret = of_platform_default_populate(dev_of_node(dev), NULL, dev);
1237+
if (ret)
1238+
goto err_unregister_fcs_dev;
1239+
12361240
dev_set_drvdata(dev, svc);
12371241

12381242
pr_info("Intel Service Layer Driver Initialized\n");
12391243

12401244
return 0;
12411245

1242-
err_unregister_dev:
1246+
err_unregister_fcs_dev:
1247+
platform_device_unregister(svc->intel_svc_fcs);
1248+
err_unregister_rsu_dev:
12431249
platform_device_unregister(svc->stratix10_svc_rsu);
12441250
err_free_kfifo:
12451251
kfifo_free(&controller->svc_fifo);
@@ -1253,6 +1259,8 @@ static void stratix10_svc_drv_remove(struct platform_device *pdev)
12531259
struct stratix10_svc *svc = dev_get_drvdata(&pdev->dev);
12541260
struct stratix10_svc_controller *ctrl = platform_get_drvdata(pdev);
12551261

1262+
of_platform_depopulate(ctrl->dev);
1263+
12561264
platform_device_unregister(svc->intel_svc_fcs);
12571265
platform_device_unregister(svc->stratix10_svc_rsu);
12581266

drivers/hwtracing/intel_th/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ config INTEL_TH_STH
6060

6161
config INTEL_TH_MSU
6262
tristate "Intel(R) Trace Hub Memory Storage Unit"
63+
depends on MMU
6364
help
6465
Memory Storage Unit (MSU) trace output device enables
6566
storing STP traces to system memory. It supports single

drivers/hwtracing/intel_th/msu.c

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/io.h>
2020
#include <linux/workqueue.h>
2121
#include <linux/dma-mapping.h>
22+
#include <linux/pfn_t.h>
2223

2324
#ifdef CONFIG_X86
2425
#include <asm/set_memory.h>
@@ -976,7 +977,6 @@ static void msc_buffer_contig_free(struct msc *msc)
976977
for (off = 0; off < msc->nr_pages << PAGE_SHIFT; off += PAGE_SIZE) {
977978
struct page *page = virt_to_page(msc->base + off);
978979

979-
page->mapping = NULL;
980980
__free_page(page);
981981
}
982982

@@ -1158,9 +1158,6 @@ static void __msc_buffer_win_free(struct msc *msc, struct msc_window *win)
11581158
int i;
11591159

11601160
for_each_sg(win->sgt->sgl, sg, win->nr_segs, i) {
1161-
struct page *page = msc_sg_page(sg);
1162-
1163-
page->mapping = NULL;
11641161
dma_free_coherent(msc_dev(win->msc)->parent->parent, PAGE_SIZE,
11651162
sg_virt(sg), sg_dma_address(sg));
11661163
}
@@ -1601,22 +1598,10 @@ static void msc_mmap_close(struct vm_area_struct *vma)
16011598
{
16021599
struct msc_iter *iter = vma->vm_file->private_data;
16031600
struct msc *msc = iter->msc;
1604-
unsigned long pg;
16051601

16061602
if (!atomic_dec_and_mutex_lock(&msc->mmap_count, &msc->buf_mutex))
16071603
return;
16081604

1609-
/* drop page _refcounts */
1610-
for (pg = 0; pg < msc->nr_pages; pg++) {
1611-
struct page *page = msc_buffer_get_page(msc, pg);
1612-
1613-
if (WARN_ON_ONCE(!page))
1614-
continue;
1615-
1616-
if (page->mapping)
1617-
page->mapping = NULL;
1618-
}
1619-
16201605
/* last mapping -- drop user_count */
16211606
atomic_dec(&msc->user_count);
16221607
mutex_unlock(&msc->buf_mutex);
@@ -1626,16 +1611,14 @@ static vm_fault_t msc_mmap_fault(struct vm_fault *vmf)
16261611
{
16271612
struct msc_iter *iter = vmf->vma->vm_file->private_data;
16281613
struct msc *msc = iter->msc;
1614+
struct page *page;
16291615

1630-
vmf->page = msc_buffer_get_page(msc, vmf->pgoff);
1631-
if (!vmf->page)
1616+
page = msc_buffer_get_page(msc, vmf->pgoff);
1617+
if (!page)
16321618
return VM_FAULT_SIGBUS;
16331619

1634-
get_page(vmf->page);
1635-
vmf->page->mapping = vmf->vma->vm_file->f_mapping;
1636-
vmf->page->index = vmf->pgoff;
1637-
1638-
return 0;
1620+
get_page(page);
1621+
return vmf_insert_mixed(vmf->vma, vmf->address, page_to_pfn_t(page));
16391622
}
16401623

16411624
static const struct vm_operations_struct msc_mmap_ops = {
@@ -1676,7 +1659,7 @@ static int intel_th_msc_mmap(struct file *file, struct vm_area_struct *vma)
16761659
atomic_dec(&msc->user_count);
16771660

16781661
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
1679-
vm_flags_set(vma, VM_DONTEXPAND | VM_DONTCOPY);
1662+
vm_flags_set(vma, VM_DONTEXPAND | VM_DONTCOPY | VM_MIXEDMAP);
16801663
vma->vm_ops = &msc_mmap_ops;
16811664
return ret;
16821665
}

drivers/mcb/mcb-parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static int chameleon_parse_gdd(struct mcb_bus *bus,
9696

9797
ret = mcb_device_register(bus, mdev);
9898
if (ret < 0)
99-
goto err;
99+
return ret;
100100

101101
return 0;
102102

0 commit comments

Comments
 (0)