Commit dcbcb491 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'arc-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta:
 "Accumulated fixes for ARC which I've been been sitting on for a while:

   - reading clk from driver vs device tree [Vlad]

   - fix support for UIO in VDK platform [Alexey]

   - SLC busy bit reading workaround

   - build warning with kprobes header reorg"

* tag 'arc-4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: fix build warnings with !CONFIG_KPROBES
  ARCv2: SLC: Make sure busy bit is set properly on SLC flushing
  ARC: vdk: Fix support of UIO
  ARCv2: make unimplemented vectors as no-ops rather than halt core
  ARC: get rate from clk driver instead of reading device tree
  ARC: [dts] add cpu nodes to ARCHS SMP device tree
  ARC: [dts] add input clocks for cpu nodes
parents 09c8b3d1 4c6fabda
...@@ -26,6 +26,7 @@ cpu@0 { ...@@ -26,6 +26,7 @@ cpu@0 {
device_type = "cpu"; device_type = "cpu";
compatible = "snps,arc770d"; compatible = "snps,arc770d";
reg = <0>; reg = <0>;
clocks = <&core_clk>;
}; };
}; };
......
...@@ -21,6 +21,7 @@ cpu@0 { ...@@ -21,6 +21,7 @@ cpu@0 {
device_type = "cpu"; device_type = "cpu";
compatible = "snps,archs38"; compatible = "snps,archs38";
reg = <0>; reg = <0>;
clocks = <&core_clk>;
}; };
}; };
......
...@@ -19,8 +19,27 @@ cpus { ...@@ -19,8 +19,27 @@ cpus {
cpu@0 { cpu@0 {
device_type = "cpu"; device_type = "cpu";
compatible = "snps,archs38xN"; compatible = "snps,archs38";
reg = <0>; reg = <0>;
clocks = <&core_clk>;
};
cpu@1 {
device_type = "cpu";
compatible = "snps,archs38";
reg = <1>;
clocks = <&core_clk>;
};
cpu@2 {
device_type = "cpu";
compatible = "snps,archs38";
reg = <2>;
clocks = <&core_clk>;
};
cpu@3 {
device_type = "cpu";
compatible = "snps,archs38";
reg = <3>;
clocks = <&core_clk>;
}; };
}; };
......
...@@ -112,13 +112,19 @@ mmc@0x15000 { ...@@ -112,13 +112,19 @@ mmc@0x15000 {
interrupts = <7>; interrupts = <7>;
bus-width = <4>; bus-width = <4>;
}; };
};
/* Embedded Vision subsystem UIO mappings; only relevant for EV VDK */ /*
* Embedded Vision subsystem UIO mappings; only relevant for EV VDK
*
* This node is intentionally put outside of MB above becase
* it maps areas outside of MB's 0xEz-0xFz.
*/
uio_ev: uio@0xD0000000 { uio_ev: uio@0xD0000000 {
compatible = "generic-uio"; compatible = "generic-uio";
reg = <0xD0000000 0x2000 0xD1000000 0x2000 0x90000000 0x10000000 0xC0000000 0x10000000>; reg = <0xD0000000 0x2000 0xD1000000 0x2000 0x90000000 0x10000000 0xC0000000 0x10000000>;
reg-names = "ev_gsa", "ev_ctrl", "ev_shared_mem", "ev_code_mem"; reg-names = "ev_gsa", "ev_ctrl", "ev_shared_mem", "ev_code_mem";
interrupt-parent = <&mb_intc>;
interrupts = <23>; interrupts = <23>;
}; };
};
}; };
...@@ -54,9 +54,7 @@ int kprobe_fault_handler(struct pt_regs *regs, unsigned long cause); ...@@ -54,9 +54,7 @@ int kprobe_fault_handler(struct pt_regs *regs, unsigned long cause);
void kretprobe_trampoline(void); void kretprobe_trampoline(void);
void trap_is_kprobe(unsigned long address, struct pt_regs *regs); void trap_is_kprobe(unsigned long address, struct pt_regs *regs);
#else #else
static void trap_is_kprobe(unsigned long address, struct pt_regs *regs) #define trap_is_kprobe(address, regs)
{
}
#endif /* CONFIG_KPROBES */ #endif /* CONFIG_KPROBES */
#endif /* _ARC_KPROBES_H */ #endif /* _ARC_KPROBES_H */
...@@ -100,15 +100,21 @@ END(handle_interrupt) ...@@ -100,15 +100,21 @@ END(handle_interrupt)
;################### Non TLB Exception Handling ############################# ;################### Non TLB Exception Handling #############################
ENTRY(EV_SWI) ENTRY(EV_SWI)
flag 1 ; TODO: implement this
EXCEPTION_PROLOGUE
b ret_from_exception
END(EV_SWI) END(EV_SWI)
ENTRY(EV_DivZero) ENTRY(EV_DivZero)
flag 1 ; TODO: implement this
EXCEPTION_PROLOGUE
b ret_from_exception
END(EV_DivZero) END(EV_DivZero)
ENTRY(EV_DCError) ENTRY(EV_DCError)
flag 1 ; TODO: implement this
EXCEPTION_PROLOGUE
b ret_from_exception
END(EV_DCError) END(EV_DCError)
; --------------------------------------------- ; ---------------------------------------------
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/root_dev.h> #include <linux/root_dev.h>
#include <linux/clk.h>
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/console.h> #include <linux/console.h>
...@@ -488,8 +489,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -488,8 +489,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
{ {
char *str; char *str;
int cpu_id = ptr_to_cpu(v); int cpu_id = ptr_to_cpu(v);
struct device_node *core_clk = of_find_node_by_name(NULL, "core_clk"); struct device *cpu_dev = get_cpu_device(cpu_id);
u32 freq = 0; struct clk *cpu_clk;
unsigned long freq = 0;
if (!cpu_online(cpu_id)) { if (!cpu_online(cpu_id)) {
seq_printf(m, "processor [%d]\t: Offline\n", cpu_id); seq_printf(m, "processor [%d]\t: Offline\n", cpu_id);
...@@ -502,9 +504,15 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -502,9 +504,15 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE)); seq_printf(m, arc_cpu_mumbojumbo(cpu_id, str, PAGE_SIZE));
of_property_read_u32(core_clk, "clock-frequency", &freq); cpu_clk = clk_get(cpu_dev, NULL);
if (IS_ERR(cpu_clk)) {
seq_printf(m, "CPU speed \t: Cannot get clock for processor [%d]\n",
cpu_id);
} else {
freq = clk_get_rate(cpu_clk);
}
if (freq) if (freq)
seq_printf(m, "CPU speed\t: %u.%02u Mhz\n", seq_printf(m, "CPU speed\t: %lu.%02lu Mhz\n",
freq / 1000000, (freq / 10000) % 100); freq / 1000000, (freq / 10000) % 100);
seq_printf(m, "Bogo MIPS\t: %lu.%02lu\n", seq_printf(m, "Bogo MIPS\t: %lu.%02lu\n",
......
...@@ -633,6 +633,9 @@ noinline static void slc_entire_op(const int op) ...@@ -633,6 +633,9 @@ noinline static void slc_entire_op(const int op)
write_aux_reg(ARC_REG_SLC_INVALIDATE, 1); write_aux_reg(ARC_REG_SLC_INVALIDATE, 1);
/* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */
read_aux_reg(r);
/* Important to wait for flush to complete */ /* Important to wait for flush to complete */
while (read_aux_reg(r) & SLC_CTRL_BUSY); while (read_aux_reg(r) & SLC_CTRL_BUSY);
} }
......
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