public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] Question about wbinvd
@ 2002-06-04  7:45 Takanori Kawano
  2002-06-04 12:02 ` Matthew Wilcox
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Takanori Kawano @ 2002-06-04  7:45 UTC (permalink / raw)
  To: linux-ia64

Hello,

I have a question about wbinvd in acpi code.

In 2.4.18, wbinvd is implemented in drivers/acpi/include/platform/acgcc.h
 as follows.

static inline void
wbinvd (void)
{
        unsigned long flags, vector, position = 0;
        long status;

        do {
                ia64_clear_ic(flags);
                status = ia64_pal_cache_flush(0x3, (PAL_CACHE_FLUSH_INVALIDATE
                                                    | PAL_CACHE_FLUSH_CHK_INTRS)
,
                                              &position, &vector);
                local_irq_restore(flags);
                if (status = 1) {
                        ia64_eoi();
                        hw_resend_irq(NULL, vector);
                }
        } while (status = 1);
}

I think it may cause infinite loop if PAL_CACHE_FLUSH continues to 
exit for a pending interrupt without flushing any lines. 
Is it correct to call hw_resend_irq as is?

regards,
---
Takanori Kawano
Hitachi Ltd,
Internet Systems Platform Division
t-kawano@ebina.hitachi.co.jp


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Linux-ia64] Question about wbinvd
  2002-06-04  7:45 [Linux-ia64] Question about wbinvd Takanori Kawano
@ 2002-06-04 12:02 ` Matthew Wilcox
  2002-06-04 17:13 ` Grover, Andrew
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2002-06-04 12:02 UTC (permalink / raw)
  To: linux-ia64

On Tue, Jun 04, 2002 at 04:45:42PM +0900, Takanori Kawano wrote:
> I have a question about wbinvd in acpi code.
> 
> In 2.4.18, wbinvd is implemented in drivers/acpi/include/platform/acgcc.h
>  as follows.

If you look at the latest ACPI patch (20020517), you will see:

-       wbinvd();
+       ACPI_FLUSH_CPU_CACHE ();

On i386, ACPI_FLUSH_CPU_CACHE is defined to be wbinvd, but on ia64 it is
defined to be a no-op.  So the wbinvd in the ACPI code is no longer used.
I presume it was decided it is not necessary.

-- 
Revolutions do not require corporate support.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [Linux-ia64] Question about wbinvd
  2002-06-04  7:45 [Linux-ia64] Question about wbinvd Takanori Kawano
  2002-06-04 12:02 ` Matthew Wilcox
@ 2002-06-04 17:13 ` Grover, Andrew
  2002-06-04 18:36 ` David Mosberger
  2002-06-05  5:33 ` Takanori Kawano
  3 siblings, 0 replies; 5+ messages in thread
From: Grover, Andrew @ 2002-06-04 17:13 UTC (permalink / raw)
  To: linux-ia64

> From: Matthew Wilcox [mailto:willy@debian.org] 
> If you look at the latest ACPI patch (20020517), you will see:
> 
> -       wbinvd();
> +       ACPI_FLUSH_CPU_CACHE ();
> 
> On i386, ACPI_FLUSH_CPU_CACHE is defined to be wbinvd, but on 
> ia64 it is
> defined to be a no-op.  So the wbinvd in the ACPI code is no 
> longer used.
> I presume it was decided it is not necessary.

I don't know if it is not necessary or not. We changed it because "wbinvd"
is a IA32-ism. IA64 may need to define ACPI_FLUSH_CPU_CACHE to something
appropriate.

Regards -- Andy


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [Linux-ia64] Question about wbinvd
  2002-06-04  7:45 [Linux-ia64] Question about wbinvd Takanori Kawano
  2002-06-04 12:02 ` Matthew Wilcox
  2002-06-04 17:13 ` Grover, Andrew
@ 2002-06-04 18:36 ` David Mosberger
  2002-06-05  5:33 ` Takanori Kawano
  3 siblings, 0 replies; 5+ messages in thread
From: David Mosberger @ 2002-06-04 18:36 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 4 Jun 2002 10:13:43 -0700, "Grover, Andrew" <andrew.grover@intel.com> said:

  Andy> I don't know if it is not necessary or not. We changed it
  Andy> because "wbinvd" is a IA32-ism. IA64 may need to define
  Andy> ACPI_FLUSH_CPU_CACHE to something appropriate.

The current implementation is most likely broken.  I'm not exactly
sure what the requirements of ACPI_FLUSH_CPU_CACHE are, that's why I'm
saying "most likely".  I suspect it ought to be using the SAL rather
than the PAL flush cache routines (so that off-chip caches get
flushed, too).  Also, IIRC, the latest interpretation of the SAL
cache-flush routines is that they flush the caches only on the CPU
that is making the call.  So, if the intent is to flush all the caches
on all CPUs, an IPI would be needed.

	--david


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Linux-ia64] Question about wbinvd
  2002-06-04  7:45 [Linux-ia64] Question about wbinvd Takanori Kawano
                   ` (2 preceding siblings ...)
  2002-06-04 18:36 ` David Mosberger
@ 2002-06-05  5:33 ` Takanori Kawano
  3 siblings, 0 replies; 5+ messages in thread
From: Takanori Kawano @ 2002-06-05  5:33 UTC (permalink / raw)
  To: linux-ia64

I expect ACPI_FLUSH_CPU_CACHE to use SAL_CACHE_FLUSH because 
there are already some ia64 boxes that have platform(non-processor) 
caches. 

Thanks,
---
Takanori Kawano
Hitachi Ltd,
Internet Systems Platform Division
t-kawano@ebina.hitachi.co.jp

>>>>>> On Tue, 4 Jun 2002 10:13:43 -0700, "Grover, Andrew" <andrew.grover@intel.com> said:
>
>  Andy> I don't know if it is not necessary or not. We changed it
>  Andy> because "wbinvd" is a IA32-ism. IA64 may need to define
>  Andy> ACPI_FLUSH_CPU_CACHE to something appropriate.
>
>The current implementation is most likely broken.  I'm not exactly
>sure what the requirements of ACPI_FLUSH_CPU_CACHE are, that's why I'm
>saying "most likely".  I suspect it ought to be using the SAL rather
>than the PAL flush cache routines (so that off-chip caches get
>flushed, too).  Also, IIRC, the latest interpretation of the SAL
>cache-flush routines is that they flush the caches only on the CPU
>that is making the call.  So, if the intent is to flush all the caches
>on all CPUs, an IPI would be needed.
>
>	--david
>
>_______________________________________________
>Linux-IA64 mailing list
>Linux-IA64@linuxia64.org
>http://lists.linuxia64.org/lists/listinfo/linux-ia64











^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-06-05  5:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-04  7:45 [Linux-ia64] Question about wbinvd Takanori Kawano
2002-06-04 12:02 ` Matthew Wilcox
2002-06-04 17:13 ` Grover, Andrew
2002-06-04 18:36 ` David Mosberger
2002-06-05  5:33 ` Takanori Kawano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox