Commit f71df633 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64

Pull arm64 fixes from Catalin Marinas:
 "Fixes for duplicate definition of early_console, kernel/time/Kconfig
  include, __flush_dcache_all() set/way computing, debug (locking, bit
  testing).  The of_platform_populate() was moved to an arch_init_call()
  to allow subsys_init_call() drivers to probe the DT."

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
  arm64: debug: fix mdscr.ss check when enabling debug exceptions
  arm64: Do not source kernel/time/Kconfig explicitly
  arm64: mm: Fix operands of clz in __flush_dcache_all
  arm64: Invoke the of_platform_populate() at arch_initcall() level
  arm64: debug: clear mdscr_el1 instead of taking the OS lock
  arm64: Fix duplicate definition of early_console
parents 8f710dd3 3126976b
...@@ -122,8 +122,6 @@ endmenu ...@@ -122,8 +122,6 @@ endmenu
menu "Kernel Features" menu "Kernel Features"
source "kernel/time/Kconfig"
config ARM64_64K_PAGES config ARM64_64K_PAGES
bool "Enable 64KB pages support" bool "Enable 64KB pages support"
help help
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
.macro enable_dbg_if_not_stepping, tmp .macro enable_dbg_if_not_stepping, tmp
mrs \tmp, mdscr_el1 mrs \tmp, mdscr_el1
tbnz \tmp, #1, 9990f tbnz \tmp, #0, 9990f
enable_dbg enable_dbg
9990: 9990:
.endm .endm
......
...@@ -136,8 +136,6 @@ void disable_debug_monitors(enum debug_el el) ...@@ -136,8 +136,6 @@ void disable_debug_monitors(enum debug_el el)
*/ */
static void clear_os_lock(void *unused) static void clear_os_lock(void *unused)
{ {
asm volatile("msr mdscr_el1, %0" : : "r" (0));
isb();
asm volatile("msr oslar_el1, %0" : : "r" (0)); asm volatile("msr oslar_el1, %0" : : "r" (0));
isb(); isb();
} }
......
...@@ -95,7 +95,7 @@ static void early_write(struct console *con, const char *s, unsigned n) ...@@ -95,7 +95,7 @@ static void early_write(struct console *con, const char *s, unsigned n)
} }
} }
static struct console early_console = { static struct console early_console_dev = {
.name = "earlycon", .name = "earlycon",
.write = early_write, .write = early_write,
.flags = CON_PRINTBUFFER | CON_BOOT, .flags = CON_PRINTBUFFER | CON_BOOT,
...@@ -145,7 +145,8 @@ static int __init setup_early_printk(char *buf) ...@@ -145,7 +145,8 @@ static int __init setup_early_printk(char *buf)
early_base = early_io_map(paddr, EARLYCON_IOBASE); early_base = early_io_map(paddr, EARLYCON_IOBASE);
printch = match->printch; printch = match->printch;
register_console(&early_console); early_console = &early_console_dev;
register_console(&early_console_dev);
return 0; return 0;
} }
......
...@@ -282,12 +282,13 @@ void __init setup_arch(char **cmdline_p) ...@@ -282,12 +282,13 @@ void __init setup_arch(char **cmdline_p)
#endif #endif
} }
static int __init arm64_of_clk_init(void) static int __init arm64_device_init(void)
{ {
of_clk_init(NULL); of_clk_init(NULL);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
return 0; return 0;
} }
arch_initcall(arm64_of_clk_init); arch_initcall(arm64_device_init);
static DEFINE_PER_CPU(struct cpu, cpu_data); static DEFINE_PER_CPU(struct cpu, cpu_data);
...@@ -305,13 +306,6 @@ static int __init topology_init(void) ...@@ -305,13 +306,6 @@ static int __init topology_init(void)
} }
subsys_initcall(topology_init); subsys_initcall(topology_init);
static int __init arm64_device_probe(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
return 0;
}
device_initcall(arm64_device_probe);
static const char *hwcap_str[] = { static const char *hwcap_str[] = {
"fp", "fp",
"asimd", "asimd",
......
...@@ -52,7 +52,7 @@ loop1: ...@@ -52,7 +52,7 @@ loop1:
add x2, x2, #4 // add 4 (line length offset) add x2, x2, #4 // add 4 (line length offset)
mov x4, #0x3ff mov x4, #0x3ff
and x4, x4, x1, lsr #3 // find maximum number on the way size and x4, x4, x1, lsr #3 // find maximum number on the way size
clz x5, x4 // find bit position of way size increment clz w5, w4 // find bit position of way size increment
mov x7, #0x7fff mov x7, #0x7fff
and x7, x7, x1, lsr #13 // extract max number of the index size and x7, x7, x1, lsr #13 // extract max number of the index size
loop2: loop2:
......
...@@ -119,8 +119,7 @@ ENTRY(__cpu_setup) ...@@ -119,8 +119,7 @@ ENTRY(__cpu_setup)
mov x0, #3 << 20 mov x0, #3 << 20
msr cpacr_el1, x0 // Enable FP/ASIMD msr cpacr_el1, x0 // Enable FP/ASIMD
mov x0, #1 msr mdscr_el1, xzr // Reset mdscr_el1
msr oslar_el1, x0 // Set the debug OS lock
tlbi vmalle1is // invalidate I + D TLBs tlbi vmalle1is // invalidate I + D TLBs
/* /*
* Memory region attributes for LPAE: * Memory region attributes for LPAE:
......
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