* [POWERPC] [RFC] Fix 8xx tlbie definition
@ 2007-11-16 17:28 Josh Boyer
2007-11-16 21:06 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 7+ messages in thread
From: Josh Boyer @ 2007-11-16 17:28 UTC (permalink / raw)
To: vitb, benh; +Cc: linuxppc-dev
Git commit e701d269aa28996f3502780951fe1b12d5d66b49 introduced an incorrect
definition for _tlbie on PowerPC 8xx platforms. Only the address should be
passed to the function. This patch corrects the definition of _tlbie and the
related tlb flushing functions for 8xx.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Index: linux-2.6/include/asm-powerpc/tlbflush.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/tlbflush.h
+++ linux-2.6/include/asm-powerpc/tlbflush.h
@@ -28,19 +28,33 @@
#include <linux/mm.h>
+#if defined(CONFIG_8xx)
+/* 8xx doesn't use PID for TLB invalidates */
+extern void _tlbie(unsigned address);
+#define _tlbia() asm volatile ("tlbia; sync" : : : "memory")
+
+static inline void flush_tlb_page(struct vm_area_struct *vma,
+ unsigned long vmaddr)
+{
+ _tlbie(vmaddr);
+}
+
+static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
+ unsigned long vmaddr)
+{
+ _tlbie(vmaddr);
+}
+
+#else /* 4xx or FSL_BOOKE */
+
extern void _tlbie(unsigned long address, unsigned int pid);
-#if defined(CONFIG_40x) || defined(CONFIG_8xx)
+#if defined(CONFIG_40x)
#define _tlbia() asm volatile ("tlbia; sync" : : : "memory")
#else /* CONFIG_44x || CONFIG_FSL_BOOKE */
extern void _tlbia(void);
#endif
-static inline void flush_tlb_mm(struct mm_struct *mm)
-{
- _tlbia();
-}
-
static inline void flush_tlb_page(struct vm_area_struct *vma,
unsigned long vmaddr)
{
@@ -53,6 +67,13 @@ static inline void flush_tlb_page_nohash
_tlbie(vmaddr, vma->vm_mm->context.id);
}
+#endif /* CONFIG_8xx */
+
+static inline void flush_tlb_mm(struct mm_struct *mm)
+{
+ _tlbia();
+}
+
static inline void flush_tlb_range(struct vm_area_struct *vma,
unsigned long start, unsigned long end)
{
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [POWERPC] [RFC] Fix 8xx tlbie definition
2007-11-16 17:28 [POWERPC] [RFC] Fix 8xx tlbie definition Josh Boyer
@ 2007-11-16 21:06 ` Benjamin Herrenschmidt
2007-11-16 21:29 ` Kumar Gala
2007-11-16 22:28 ` Vitaly Bordug
0 siblings, 2 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-16 21:06 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
On Fri, 2007-11-16 at 11:28 -0600, Josh Boyer wrote:
> Git commit e701d269aa28996f3502780951fe1b12d5d66b49 introduced an incorrect
> definition for _tlbie on PowerPC 8xx platforms. Only the address should be
> passed to the function. This patch corrects the definition of _tlbie and the
> related tlb flushing functions for 8xx.
>
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
That conflicts with the patch I posted to fix it differently (I kept the
additional argument).
Which one do we take ?
Ben.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [POWERPC] [RFC] Fix 8xx tlbie definition
2007-11-16 21:06 ` Benjamin Herrenschmidt
@ 2007-11-16 21:29 ` Kumar Gala
2007-11-16 22:28 ` Vitaly Bordug
1 sibling, 0 replies; 7+ messages in thread
From: Kumar Gala @ 2007-11-16 21:29 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
On Nov 16, 2007, at 3:06 PM, Benjamin Herrenschmidt wrote:
>
> On Fri, 2007-11-16 at 11:28 -0600, Josh Boyer wrote:
>> Git commit e701d269aa28996f3502780951fe1b12d5d66b49 introduced an
>> incorrect
>> definition for _tlbie on PowerPC 8xx platforms. Only the address
>> should be
>> passed to the function. This patch corrects the definition of
>> _tlbie and the
>> related tlb flushing functions for 8xx.
>>
>> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
>
> That conflicts with the patch I posted to fix it differently (I kept
> the
> additional argument).
>
> Which one do we take ?
Let's make _tlbia/_tlbie consistent on all archs.
- k
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [POWERPC] [RFC] Fix 8xx tlbie definition
2007-11-16 21:06 ` Benjamin Herrenschmidt
2007-11-16 21:29 ` Kumar Gala
@ 2007-11-16 22:28 ` Vitaly Bordug
2007-11-17 1:05 ` Benjamin Herrenschmidt
1 sibling, 1 reply; 7+ messages in thread
From: Vitaly Bordug @ 2007-11-16 22:28 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
On Sat, 17 Nov 2007 08:06:29 +1100
Benjamin Herrenschmidt wrote:
>
> On Fri, 2007-11-16 at 11:28 -0600, Josh Boyer wrote:
> > Git commit e701d269aa28996f3502780951fe1b12d5d66b49 introduced an
> > incorrect definition for _tlbie on PowerPC 8xx platforms. Only the
> > address should be passed to the function. This patch corrects the
> > definition of _tlbie and the related tlb flushing functions for 8xx.
> >
> > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
>
> That conflicts with the patch I posted to fix it differently (I kept
> the additional argument).
>
Where can I grab it to give a try? My linuxppc archive is silent for some reason..
> Which one do we take ?
>
If your solution will work out, I'd agree with Kumar to have this thing consistent.
If not - It might be cheapier just to fix it this gross way, to keep 8xx stuff running.
--
Sincerely, Vitaly
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [POWERPC] [RFC] Fix 8xx tlbie definition
2007-11-16 22:28 ` Vitaly Bordug
@ 2007-11-17 1:05 ` Benjamin Herrenschmidt
2007-11-17 17:06 ` Josh Boyer
0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-17 1:05 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev
On Sat, 2007-11-17 at 01:28 +0300, Vitaly Bordug wrote:
> On Sat, 17 Nov 2007 08:06:29 +1100
> Benjamin Herrenschmidt wrote:
>
> >
> > On Fri, 2007-11-16 at 11:28 -0600, Josh Boyer wrote:
> > > Git commit e701d269aa28996f3502780951fe1b12d5d66b49 introduced an
> > > incorrect definition for _tlbie on PowerPC 8xx platforms. Only the
> > > address should be passed to the function. This patch corrects the
> > > definition of _tlbie and the related tlb flushing functions for 8xx.
> > >
> > > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> >
> > That conflicts with the patch I posted to fix it differently (I kept
> > the additional argument).
> >
>
> Where can I grab it to give a try? My linuxppc archive is silent for some reason..
Looks like I may have failed to post it ... weird, I was sure I posted
that days ago, when Olof first mentioned the breakage. I'll check &
resend.
> > Which one do we take ?
> >
>
> If your solution will work out, I'd agree with Kumar to have this thing consistent.
> If not - It might be cheapier just to fix it this gross way, to keep 8xx stuff running.
Ben.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [POWERPC] [RFC] Fix 8xx tlbie definition
2007-11-17 1:05 ` Benjamin Herrenschmidt
@ 2007-11-17 17:06 ` Josh Boyer
2007-11-18 16:51 ` Kumar Gala
0 siblings, 1 reply; 7+ messages in thread
From: Josh Boyer @ 2007-11-17 17:06 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
On Sat, 17 Nov 2007 12:05:47 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Sat, 2007-11-17 at 01:28 +0300, Vitaly Bordug wrote:
> > On Sat, 17 Nov 2007 08:06:29 +1100
> > Benjamin Herrenschmidt wrote:
> >
> > >
> > > On Fri, 2007-11-16 at 11:28 -0600, Josh Boyer wrote:
> > > > Git commit e701d269aa28996f3502780951fe1b12d5d66b49 introduced an
> > > > incorrect definition for _tlbie on PowerPC 8xx platforms. Only the
> > > > address should be passed to the function. This patch corrects the
> > > > definition of _tlbie and the related tlb flushing functions for 8xx.
> > > >
> > > > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> > >
> > > That conflicts with the patch I posted to fix it differently (I kept
> > > the additional argument).
> > >
> >
> > Where can I grab it to give a try? My linuxppc archive is silent for some reason..
>
> Looks like I may have failed to post it ... weird, I was sure I posted
> that days ago, when Olof first mentioned the breakage. I'll check &
> resend.
I never saw it. If I had, I wouldn't have bothered to post my own
version :)
> > > Which one do we take ?
> > >
> >
> > If your solution will work out, I'd agree with Kumar to have this thing consistent.
> > If not - It might be cheapier just to fix it this gross way, to keep 8xx stuff running.
Consistency is fine with me. I was going for quick and dirty to make
sure it wasn't broken in .24.
josh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [POWERPC] [RFC] Fix 8xx tlbie definition
2007-11-17 17:06 ` Josh Boyer
@ 2007-11-18 16:51 ` Kumar Gala
0 siblings, 0 replies; 7+ messages in thread
From: Kumar Gala @ 2007-11-18 16:51 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
>>> Where can I grab it to give a try? My linuxppc archive is silent
>>> for some reason..
>>
>> Looks like I may have failed to post it ... weird, I was sure I
>> posted
>> that days ago, when Olof first mentioned the breakage. I'll check &
>> resend.
>
> I never saw it. If I had, I wouldn't have bothered to post my own
> version :)
we still haven't seen ben's version :)
- k
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-11-18 16:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-16 17:28 [POWERPC] [RFC] Fix 8xx tlbie definition Josh Boyer
2007-11-16 21:06 ` Benjamin Herrenschmidt
2007-11-16 21:29 ` Kumar Gala
2007-11-16 22:28 ` Vitaly Bordug
2007-11-17 1:05 ` Benjamin Herrenschmidt
2007-11-17 17:06 ` Josh Boyer
2007-11-18 16:51 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).