Re: fixmap problem on PA11 hardware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave,

On 10/31/21 23:47, John David Anglin wrote:
> My sense is the invalidate patch isn't correct.  The main difference between pdc and fdc is that
> it is optional whether pdc writes the cache line back to memory when it's dirty at priority 0.

That's true, nevertheless I've seen different behaviour on real hardware.

It might be, that:

-	flush_kernel_vmap_range((void *)fixmap, (p-fixmap) * sizeof(*p));
+	invalidate_kernel_vmap_range((void *)fixmap, (p-fixmap) * sizeof(*p));
(here the flush might be sufficient)
 	if (mapped)
 		patch_unmap(FIX_TEXT_POKE0, &flags);
+	invalidate_kernel_vmap_range((void *)start, end - start);
(but here the pdc is necessary to actually drop data from I-cache)
 	flush_icache_range(start, end);

I can test tomorrow...

> Note also that flush_kernel_vmap_range and invalidate_kernel_vmap_range both have this hunk
> which may behave differently:
>
>         if ((!IS_ENABLED(CONFIG_SMP) || !arch_irqs_disabled()) &&
>             (unsigned long)size >= parisc_cache_flush_threshold) {
>                 flush_tlb_kernel_range(start, end);
>                 flush_data_cache();
>                 return;
>         }

Yes, but even when patching 4 bytes the patch above did worked (and
parisc_cache_flush_threshold was bigger).

Helge

>
> Dave
>
> On 2021-10-31 5:22 p.m., Helge Deller wrote:
>> On 10/27/21 22:14, John David Anglin wrote:
>>> On 2021-10-27 3:09 p.m., Helge Deller wrote:
>>>> In the archives I found this old thread, which might be related:
>>>> https://www.spinics.net/lists/linux-parisc/msg09391.html
>>> These seems unlikely as both 7100LC and 7300LC are PA-RISC 1.1 processors (1.1c vs. 1.1e).  Big difference
>>> seems to be cache.
>> Yes, there were at least two problems.
>> I just sent two patches to the list which fix the crashes.
>> But FTRACE still doesn't work on PA1.x machines as expected,
>> while the same code seems to work on PA2.x machines (running the same 32bit kernel).
>
>





[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux