Backport more riscv patches for testing
Two more patches on top of previous: https://patchwork.kernel.org/project/linux-riscv/patch/20230725132246.817726-1-alexghiti@rivosinc.com/ https://patchwork.kernel.org/project/linux-riscv/patch/20230717185841.1294425-1-samuel.holland@sifive.com/ Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
parent
d69d90eae2
commit
920e3e403d
|
@ -180,7 +180,7 @@ Summary: The Linux kernel
|
||||||
# This is needed to do merge window version magic
|
# This is needed to do merge window version magic
|
||||||
%define patchlevel 5
|
%define patchlevel 5
|
||||||
# This allows pkg_release to have configurable %%{?dist} tag
|
# This allows pkg_release to have configurable %%{?dist} tag
|
||||||
%define specrelease 0.rc4.30%{?buildid}.3.riscv64%{?dist}
|
%define specrelease 0.rc4.30%{?buildid}.4.riscv64%{?dist}
|
||||||
# This defines the kabi tarball version
|
# This defines the kabi tarball version
|
||||||
%define kabiversion 6.5.0
|
%define kabiversion 6.5.0
|
||||||
|
|
||||||
|
|
|
@ -74,3 +74,77 @@ index d0577cc6a081..a8efa053c4a5 100644
|
||||||
"memory");
|
"memory");
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
diff --git a/arch/riscv/include/asm/cacheflush.h b/arch/riscv/include/asm/cacheflush.h
|
||||||
|
index 8091b8bf4883..b93ffddf8a61 100644
|
||||||
|
--- a/arch/riscv/include/asm/cacheflush.h
|
||||||
|
+++ b/arch/riscv/include/asm/cacheflush.h
|
||||||
|
@@ -37,6 +37,10 @@ static inline void flush_dcache_page(struct page *page)
|
||||||
|
#define flush_icache_user_page(vma, pg, addr, len) \
|
||||||
|
flush_icache_mm(vma->vm_mm, 0)
|
||||||
|
|
||||||
|
+#ifdef CONFIG_64BIT
|
||||||
|
+#define flush_cache_vmap(start, end) flush_tlb_kernel_range(start, end)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
|
|
||||||
|
#define flush_icache_all() local_flush_icache_all()
|
||||||
|
diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c
|
||||||
|
index e1484905b7bd..c2673fdad8e5 100644
|
||||||
|
--- a/drivers/irqchip/irq-sifive-plic.c
|
||||||
|
+++ b/drivers/irqchip/irq-sifive-plic.c
|
||||||
|
@@ -120,12 +120,14 @@ static inline void plic_irq_toggle(const struct cpumask *mask,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void plic_irq_enable(struct irq_data *d)
|
||||||
|
+static unsigned int plic_irq_startup(struct irq_data *d)
|
||||||
|
{
|
||||||
|
plic_irq_toggle(irq_data_get_effective_affinity_mask(d), d, 1);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void plic_irq_disable(struct irq_data *d)
|
||||||
|
+static void plic_irq_shutdown(struct irq_data *d)
|
||||||
|
{
|
||||||
|
plic_irq_toggle(irq_data_get_effective_affinity_mask(d), d, 0);
|
||||||
|
}
|
||||||
|
@@ -169,12 +171,12 @@ static int plic_set_affinity(struct irq_data *d,
|
||||||
|
if (cpu >= nr_cpu_ids)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
- plic_irq_disable(d);
|
||||||
|
+ plic_irq_shutdown(d);
|
||||||
|
|
||||||
|
irq_data_update_effective_affinity(d, cpumask_of(cpu));
|
||||||
|
|
||||||
|
- if (!irqd_irq_disabled(d))
|
||||||
|
- plic_irq_enable(d);
|
||||||
|
+ if (irqd_is_started(d))
|
||||||
|
+ plic_irq_startup(d);
|
||||||
|
|
||||||
|
return IRQ_SET_MASK_OK_DONE;
|
||||||
|
}
|
||||||
|
@@ -182,8 +184,8 @@ static int plic_set_affinity(struct irq_data *d,
|
||||||
|
|
||||||
|
static struct irq_chip plic_edge_chip = {
|
||||||
|
.name = "SiFive PLIC",
|
||||||
|
- .irq_enable = plic_irq_enable,
|
||||||
|
- .irq_disable = plic_irq_disable,
|
||||||
|
+ .irq_startup = plic_irq_startup,
|
||||||
|
+ .irq_shutdown = plic_irq_shutdown,
|
||||||
|
.irq_ack = plic_irq_eoi,
|
||||||
|
.irq_mask = plic_irq_mask,
|
||||||
|
.irq_unmask = plic_irq_unmask,
|
||||||
|
@@ -197,8 +199,8 @@ static struct irq_chip plic_edge_chip = {
|
||||||
|
|
||||||
|
static struct irq_chip plic_chip = {
|
||||||
|
.name = "SiFive PLIC",
|
||||||
|
- .irq_enable = plic_irq_enable,
|
||||||
|
- .irq_disable = plic_irq_disable,
|
||||||
|
+ .irq_startup = plic_irq_startup,
|
||||||
|
+ .irq_shutdown = plic_irq_shutdown,
|
||||||
|
.irq_mask = plic_irq_mask,
|
||||||
|
.irq_unmask = plic_irq_unmask,
|
||||||
|
.irq_eoi = plic_irq_eoi,
|
||||||
|
|
Loading…
Reference in New Issue