Merge tag 'xtensa-20170612' of git://github.com/jcmvbkbc/linux-xtensa
[sfrench/cifs-2.6.git] / arch / xtensa / kernel / setup.c
index 460a226699b4f9c5fea84455ecaff2ac61e00617..33bfa5270d95440cd44c95674073608797e1d131 100644 (file)
@@ -317,8 +317,9 @@ static inline int mem_reserve(unsigned long start, unsigned long end)
 
 void __init setup_arch(char **cmdline_p)
 {
-       strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
        *cmdline_p = command_line;
+       platform_setup(cmdline_p);
+       strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE);
 
        /* Reserve some memory regions */
 
@@ -382,8 +383,6 @@ void __init setup_arch(char **cmdline_p)
 
        unflatten_and_copy_device_tree();
 
-       platform_setup(cmdline_p);
-
 #ifdef CONFIG_SMP
        smp_init_cpus();
 #endif
@@ -453,9 +452,9 @@ void cpu_reset(void)
                        tmpaddr += SZ_512M;
 
                /* Invalidate mapping in the selected temporary area */
-               if (itlb_probe(tmpaddr) & 0x8)
+               if (itlb_probe(tmpaddr) & BIT(ITLB_HIT_BIT))
                        invalidate_itlb_entry(itlb_probe(tmpaddr));
-               if (itlb_probe(tmpaddr + PAGE_SIZE) & 0x8)
+               if (itlb_probe(tmpaddr + PAGE_SIZE) & BIT(ITLB_HIT_BIT))
                        invalidate_itlb_entry(itlb_probe(tmpaddr + PAGE_SIZE));
 
                /*