lkml.org 
[lkml]   [2017]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: x86/pti: smp_processor_id() called while preemptible in resume-from-sleep
On Sat, 30 Dec 2017, Linus Torvalds wrote:
> On Sat, Dec 30, 2017 at 10:20 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> So I'd suggest moving the preempt_disable() up to the top of that
> function, regardless of whether we could then remove that seemingly
> stale TLB flush in that crazy
> smpboot_setup/restore_warm_reset_vector() dance...

Regardless of the other bogosity, I did some digging and had to go back
into the 2.1 aera to find the reason for this local_flush_tlb(). That old
code manipulated swapper_pg_dir in do_boot_cpu.

+ local_flush_tlb();
+ SMP_PRINTK(("1.\n"));
+ *((volatile unsigned short *) phys_to_virt(0x469)) = ((unsigned long)stack)>>4;
+ SMP_PRINTK(("2.\n"));
+ *((volatile unsigned short *) phys_to_virt(0x467)) = 0;
+ SMP_PRINTK(("3.\n"));
+
+ maincfg=swapper_pg_dir[0];
+ ((unsigned long *)swapper_pg_dir)[0]=0x102007;

.....

+ swapper_pg_dir[0]=maincfg;
+ local_flush_tlb();

That pagetable fiddling dissappeared long ago, but the flush stayed around
forever.

Thanks,

tglx

\
 
 \ /
  Last update: 2017-12-30 20:42    [W:0.052 / U:1.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site