Skip to content

Commit 410430b

Browse files
committed
Merge tag 'mips-fixes_7.2_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fixes from Thomas Bogendoerfer. * tag 'mips-fixes_7.2_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: configs: Enable the current Ingenic USB PHY symbol MIPS: loongson64: add IRQ work based on self-IPI MIPS: mm: Add check for highmem before removing memory block mips: Add build salt to the vDSO MIPS: DEC: Ensure RTC platform device deregistration upon failure
2 parents 1e9cdc2 + 0880884 commit 410430b

9 files changed

Lines changed: 35 additions & 6 deletions

File tree

arch/mips/configs/cu1000-neo_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ CONFIG_DMA_JZ4780=y
8686
# CONFIG_INGENIC_TIMER is not set
8787
CONFIG_INGENIC_SYSOST=y
8888
# CONFIG_IOMMU_SUPPORT is not set
89-
CONFIG_JZ4770_PHY=y
89+
CONFIG_PHY_INGENIC_USB=y
9090
CONFIG_EXT4_FS=y
9191
# CONFIG_DNOTIFY is not set
9292
CONFIG_AUTOFS_FS=y

arch/mips/configs/cu1830-neo_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ CONFIG_DMA_JZ4780=y
8989
# CONFIG_INGENIC_TIMER is not set
9090
CONFIG_INGENIC_SYSOST=y
9191
# CONFIG_IOMMU_SUPPORT is not set
92-
CONFIG_JZ4770_PHY=y
92+
CONFIG_PHY_INGENIC_USB=y
9393
CONFIG_EXT4_FS=y
9494
# CONFIG_DNOTIFY is not set
9595
CONFIG_AUTOFS_FS=y

arch/mips/configs/gcw0_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ CONFIG_USB_MUSB_HDRC=y
9999
CONFIG_USB_MUSB_GADGET=y
100100
CONFIG_USB_MUSB_JZ4740=y
101101
CONFIG_USB_INVENTRA_DMA=y
102-
CONFIG_JZ4770_PHY=y
102+
CONFIG_PHY_INGENIC_USB=y
103103
CONFIG_USB_GADGET=y
104104
CONFIG_USB_GADGET_VBUS_DRAW=500
105105
CONFIG_USB_ETH=y

arch/mips/dec/platform.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ static struct platform_device dec_rtc_device = {
3838
.num_resources = ARRAY_SIZE(dec_rtc_resources),
3939
};
4040

41+
static struct platform_device *dec_rtc_devices[] __initdata = {
42+
&dec_rtc_device,
43+
};
44+
4145
static struct resource dec_dz_resources[] = {
4246
{ .name = "dz", .flags = IORESOURCE_MEM, },
4347
{ .name = "dz", .flags = IORESOURCE_IRQ, },
@@ -137,7 +141,7 @@ static int __init dec_add_devices(void)
137141
}
138142
num_zs = i;
139143

140-
ret1 = platform_device_register(&dec_rtc_device);
144+
ret1 = platform_add_devices(dec_rtc_devices, 1);
141145
ret2 = IS_ENABLED(CONFIG_32BIT) ?
142146
platform_add_devices(dec_dz_devices, num_dz) : 0;
143147
ret3 = platform_add_devices(dec_zs_devices, num_zs);

arch/mips/include/asm/irq_work.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#ifndef _ASM_MIPS_IRQ_WORK_H
4+
#define _ASM_MIPS_IRQ_WORK_H
5+
static inline bool arch_irq_work_has_interrupt(void)
6+
{
7+
return IS_ENABLED(CONFIG_MACH_LOONGSON64) && IS_ENABLED(CONFIG_SMP);
8+
}
9+
#endif /* _ASM_MIPS_IRQ_WORK_H */

arch/mips/include/asm/smp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ extern int __cpu_logical_map[NR_CPUS];
5050
#define SMP_CALL_FUNCTION 0x2
5151
/* Octeon - Tell another core to flush its icache */
5252
#define SMP_ICACHE_FLUSH 0x4
53+
/* Loongson64 - Self IPI for IRQ work */
54+
#define SMP_IRQ_WORK 0x8
5355

5456
/* Mask of CPUs which are currently definitely operating coherently */
5557
extern cpumask_t cpu_coherent_mask;

arch/mips/loongson64/smp.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,13 @@ loongson3_send_ipi_mask(const struct cpumask *mask, unsigned int action)
381381
ipi_write_action(cpu_logical_map(i), (u32)action);
382382
}
383383

384+
#ifdef CONFIG_IRQ_WORK
385+
void arch_irq_work_raise(void)
386+
{
387+
loongson3_send_ipi_single(smp_processor_id(), SMP_IRQ_WORK);
388+
}
389+
#endif
390+
384391
static irqreturn_t loongson3_ipi_interrupt(int irq, void *dev_id)
385392
{
386393
int cpu = smp_processor_id();
@@ -397,6 +404,9 @@ static irqreturn_t loongson3_ipi_interrupt(int irq, void *dev_id)
397404
irq_exit();
398405
}
399406

407+
if (action & SMP_IRQ_WORK)
408+
irq_work_run();
409+
400410
return IRQ_HANDLED;
401411
}
402412

arch/mips/mm/init.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,11 @@ static inline void __init highmem_init(void)
426426
unsigned long tmp;
427427

428428
/*
429-
* If CPU cannot support HIGHMEM discard the memory above highstart_pfn
429+
* If CPU cannot support HIGHMEM discard any memory above highstart_pfn
430430
*/
431431
if (cpu_has_dc_aliases) {
432-
memblock_remove(PFN_PHYS(highstart_pfn), -1);
432+
if (highstart_pfn)
433+
memblock_remove(PFN_PHYS(highstart_pfn), -1);
433434
return;
434435
}
435436

arch/mips/vdso/elf.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88

99
#include <asm/isa-rev.h>
1010

11+
#include <linux/build-salt.h>
1112
#include <linux/elfnote.h>
1213
#include <linux/version.h>
1314

1415
ELFNOTE_START(Linux, 0, "a")
1516
.long LINUX_VERSION_CODE
1617
ELFNOTE_END
1718

19+
BUILD_SALT
20+
1821
/*
1922
* The .MIPS.abiflags section must be defined with the FP ABI flags set
2023
* to 'any' to be able to link with both old and new libraries.

0 commit comments

Comments
 (0)