Skip to content

Commit

Permalink
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Torvalds committed May 18, 2013
2 parents 8f710dd + 3126976 commit f71df63
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 19 deletions.
2 changes: 0 additions & 2 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ endmenu

menu "Kernel Features"

source "kernel/time/Kconfig"

config ARM64_64K_PAGES
bool "Enable 64KB pages support"
help
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

.macro enable_dbg_if_not_stepping, tmp
mrs \tmp, mdscr_el1
tbnz \tmp, #1, 9990f
tbnz \tmp, #0, 9990f
enable_dbg
9990:
.endm
Expand Down
2 changes: 0 additions & 2 deletions arch/arm64/kernel/debug-monitors.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ void disable_debug_monitors(enum debug_el el)
*/
static void clear_os_lock(void *unused)
{
asm volatile("msr mdscr_el1, %0" : : "r" (0));
isb();
asm volatile("msr oslar_el1, %0" : : "r" (0));
isb();
}
Expand Down
5 changes: 3 additions & 2 deletions arch/arm64/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
.write = early_write,
.flags = CON_PRINTBUFFER | CON_BOOT,
Expand Down Expand Up @@ -145,7 +145,8 @@ static int __init setup_early_printk(char *buf)
early_base = early_io_map(paddr, EARLYCON_IOBASE);

printch = match->printch;
register_console(&early_console);
early_console = &early_console_dev;
register_console(&early_console_dev);

return 0;
}
Expand Down
12 changes: 3 additions & 9 deletions arch/arm64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,13 @@ void __init setup_arch(char **cmdline_p)
#endif
}

static int __init arm64_of_clk_init(void)
static int __init arm64_device_init(void)
{
of_clk_init(NULL);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
return 0;
}
arch_initcall(arm64_of_clk_init);
arch_initcall(arm64_device_init);

static DEFINE_PER_CPU(struct cpu, cpu_data);

Expand All @@ -305,13 +306,6 @@ static int __init topology_init(void)
}
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[] = {
"fp",
"asimd",
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/mm/cache.S
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ loop1:
add x2, x2, #4 // add 4 (line length offset)
mov x4, #0x3ff
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
and x7, x7, x1, lsr #13 // extract max number of the index size
loop2:
Expand Down
3 changes: 1 addition & 2 deletions arch/arm64/mm/proc.S
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ ENTRY(__cpu_setup)

mov x0, #3 << 20
msr cpacr_el1, x0 // Enable FP/ASIMD
mov x0, #1
msr oslar_el1, x0 // Set the debug OS lock
msr mdscr_el1, xzr // Reset mdscr_el1
tlbi vmalle1is // invalidate I + D TLBs
/*
* Memory region attributes for LPAE:
Expand Down

0 comments on commit f71df63

Please sign in to comment.