Re: [PATCH] powerpc: Rework I$/D$ coherency (v2)

2009-02-07 Thread Benjamin Herrenschmidt
On Sat, 2009-02-07 at 00:22 -0800, David Miller wrote: > From: Benjamin Herrenschmidt > Date: Mon, 02 Feb 2009 11:10:24 +1100 > > > +/* has to be a macro because of include dependencies */ > > +static inline int is_exec_fault(void) > > +{ > > + return current->thread.regs && TRAP(current->threa

Re: [PATCH] powerpc: Rework I$/D$ coherency (v2)

2009-02-07 Thread David Miller
From: Benjamin Herrenschmidt Date: Mon, 02 Feb 2009 11:10:24 +1100 > +/* has to be a macro because of include dependencies */ > +static inline int is_exec_fault(void) > +{ > + return current->thread.regs && TRAP(current->thread.regs) == 0x400; > +} Nice macro :-)

[PATCH] powerpc: Rework I$/D$ coherency (v2)

2009-02-01 Thread Benjamin Herrenschmidt
This patch reworks the way we do I and D cache coherency on PowerPC. The "old" way was split in 3 different parts depending on the processor type: - Hash with per-page exec support (64-bit and >= POWER4 only) does it at hashing time, by preventing exec on unclean pages and cleaning pages on ex