Skip to content

Commit 04ce931

Browse files
committed
Merge tag 'char-misc-5.3-rc2' 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 and misc driver fixes for 5.3-rc2 to resolve some reported issues. Nothing major at all, some binder bugfixes for issues found, some new mei device ids, firmware building warning fixes, habanalabs fixes, a few other build fixes, and a MAINTAINERS update. All of these have been in linux-next with no reported issues" * tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: test_firmware: fix a memory leak bug hpet: Fix division by zero in hpet_time_div() eeprom: make older eeprom drivers select NVMEM_SYSFS vmw_balloon: Remove Julien from the maintainers list fpga-manager: altera-ps-spi: Fix build error mei: me: add mule creek canyon (EHL) device ids binder: prevent transactions to context manager from its own process. binder: Set end of SG buffer area properly. firmware: Fix missing inline firmware: fix build errors in paged buffer handling code habanalabs: don't reset device when getting VRHOT habanalabs: use %pad for printing a dma_addr_t
2 parents 572782b + d4fddac commit 04ce931

File tree

10 files changed

+23
-11
lines changed

10 files changed

+23
-11
lines changed

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17172,7 +17172,6 @@ F: drivers/vme/
1717217172
F: include/linux/vme*
1717317173

1717417174
VMWARE BALLOON DRIVER
17175-
M: Julien Freche <[email protected]>
1717617175
M: Nadav Amit <[email protected]>
1717717176
M: "VMware, Inc." <[email protected]>
1717817177

drivers/android/binder.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,7 +2988,7 @@ static void binder_transaction(struct binder_proc *proc,
29882988
else
29892989
return_error = BR_DEAD_REPLY;
29902990
mutex_unlock(&context->context_mgr_node_lock);
2991-
if (target_node && target_proc == proc) {
2991+
if (target_node && target_proc->pid == proc->pid) {
29922992
binder_user_error("%d:%d got transaction to context manager from process owning it\n",
29932993
proc->pid, thread->pid);
29942994
return_error = BR_FAILED_REPLY;
@@ -3239,7 +3239,8 @@ static void binder_transaction(struct binder_proc *proc,
32393239
buffer_offset = off_start_offset;
32403240
off_end_offset = off_start_offset + tr->offsets_size;
32413241
sg_buf_offset = ALIGN(off_end_offset, sizeof(void *));
3242-
sg_buf_end_offset = sg_buf_offset + extra_buffers_size;
3242+
sg_buf_end_offset = sg_buf_offset + extra_buffers_size -
3243+
ALIGN(secctx_sz, sizeof(u64));
32433244
off_min = 0;
32443245
for (buffer_offset = off_start_offset; buffer_offset < off_end_offset;
32453246
buffer_offset += sizeof(binder_size_t)) {

drivers/base/firmware_loader/firmware.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ int fw_grow_paged_buf(struct fw_priv *fw_priv, int pages_needed);
141141
int fw_map_paged_buf(struct fw_priv *fw_priv);
142142
#else
143143
static inline void fw_free_paged_buf(struct fw_priv *fw_priv) {}
144-
int fw_grow_paged_buf(struct fw_priv *fw_priv, int pages_needed) { return -ENXIO; }
145-
int fw_map_paged_buf(struct fw_priv *fw_priv) { return -ENXIO; }
144+
static inline int fw_grow_paged_buf(struct fw_priv *fw_priv, int pages_needed) { return -ENXIO; }
145+
static inline int fw_map_paged_buf(struct fw_priv *fw_priv) { return -ENXIO; }
146146
#endif
147147

148148
#endif /* __FIRMWARE_LOADER_H */

drivers/char/hpet.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets,
567567
unsigned long long m;
568568

569569
m = hpets->hp_tick_freq + (dis >> 1);
570-
do_div(m, dis);
571-
return (unsigned long)m;
570+
return div64_ul(m, dis);
572571
}
573572

574573
static int

drivers/fpga/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ config ALTERA_PR_IP_CORE_PLAT
4040
config FPGA_MGR_ALTERA_PS_SPI
4141
tristate "Altera FPGA Passive Serial over SPI"
4242
depends on SPI
43+
select BITREVERSE
4344
help
4445
FPGA manager driver support for Altera Arria/Cyclone/Stratix
4546
using the passive serial interface over SPI.

drivers/misc/eeprom/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ config EEPROM_AT24
55
tristate "I2C EEPROMs / RAMs / ROMs from most vendors"
66
depends on I2C && SYSFS
77
select NVMEM
8+
select NVMEM_SYSFS
89
select REGMAP_I2C
910
help
1011
Enable this driver to get read/write support to most I2C EEPROMs
@@ -34,6 +35,7 @@ config EEPROM_AT25
3435
tristate "SPI EEPROMs from most vendors"
3536
depends on SPI && SYSFS
3637
select NVMEM
38+
select NVMEM_SYSFS
3739
help
3840
Enable this driver to get read/write support to most SPI EEPROMs,
3941
after you configure the board init code to know about each eeprom
@@ -80,6 +82,7 @@ config EEPROM_93XX46
8082
depends on SPI && SYSFS
8183
select REGMAP
8284
select NVMEM
85+
select NVMEM_SYSFS
8386
help
8487
Driver for the microwire EEPROM chipsets 93xx46x. The driver
8588
supports both read and write commands and also the command to

drivers/misc/habanalabs/goya/goya.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,8 @@ static int goya_sw_init(struct hl_device *hdev)
695695
goto free_dma_pool;
696696
}
697697

698-
dev_dbg(hdev->dev, "cpu accessible memory at bus address 0x%llx\n",
699-
hdev->cpu_accessible_dma_address);
698+
dev_dbg(hdev->dev, "cpu accessible memory at bus address %pad\n",
699+
&hdev->cpu_accessible_dma_address);
700700

701701
hdev->cpu_accessible_dma_pool = gen_pool_create(ilog2(32), -1);
702702
if (!hdev->cpu_accessible_dma_pool) {
@@ -4449,7 +4449,6 @@ void goya_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entry)
44494449
case GOYA_ASYNC_EVENT_ID_AXI_ECC:
44504450
case GOYA_ASYNC_EVENT_ID_L2_RAM_ECC:
44514451
case GOYA_ASYNC_EVENT_ID_PSOC_GPIO_05_SW_RESET:
4452-
case GOYA_ASYNC_EVENT_ID_PSOC_GPIO_10_VRHOT_ICRIT:
44534452
goya_print_irq_info(hdev, event_type, false);
44544453
hl_device_reset(hdev, true, false);
44554454
break;
@@ -4485,6 +4484,7 @@ void goya_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_entry)
44854484
goya_unmask_irq(hdev, event_type);
44864485
break;
44874486

4487+
case GOYA_ASYNC_EVENT_ID_PSOC_GPIO_10_VRHOT_ICRIT:
44884488
case GOYA_ASYNC_EVENT_ID_TPC0_BMON_SPMU:
44894489
case GOYA_ASYNC_EVENT_ID_TPC1_BMON_SPMU:
44904490
case GOYA_ASYNC_EVENT_ID_TPC2_BMON_SPMU:

drivers/misc/mei/hw-me-regs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181

8282
#define MEI_DEV_ID_ICP_LP 0x34E0 /* Ice Lake Point LP */
8383

84+
#define MEI_DEV_ID_MCC 0x4B70 /* Mule Creek Canyon (EHL) */
85+
#define MEI_DEV_ID_MCC_4 0x4B75 /* Mule Creek Canyon 4 (EHL) */
86+
8487
/*
8588
* MEI HW Section
8689
*/

drivers/misc/mei/pci-me.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
9898

9999
{MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)},
100100

101+
{MEI_PCI_DEVICE(MEI_DEV_ID_MCC, MEI_ME_PCH12_CFG)},
102+
{MEI_PCI_DEVICE(MEI_DEV_ID_MCC_4, MEI_ME_PCH8_CFG)},
103+
101104
/* required last entry */
102105
{0, }
103106
};

lib/test_firmware.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,8 +886,11 @@ static int __init test_firmware_init(void)
886886
return -ENOMEM;
887887

888888
rc = __test_firmware_config_init();
889-
if (rc)
889+
if (rc) {
890+
kfree(test_fw_config);
891+
pr_err("could not init firmware test config: %d\n", rc);
890892
return rc;
893+
}
891894

892895
rc = misc_register(&test_fw_misc_device);
893896
if (rc) {

0 commit comments

Comments
 (0)