Re: [PATCH 0/6] 8xx MMU fixes

2009-10-08 Thread Rex Feany
Thus spake Joakim Tjernlund (joakim.tjernl...@transmode.se): > Rex Feany wrote on 09/10/2009 02:15:27: > > open("/proc/mounts", O_RDONLY) = 3 > > fstat64(0x3, 0x7fe7e2a8)= 0 > > mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = > > 0x3001f000 >

Re: [RFC PATCH 10/12] of: merge of_*_flat_dt*() functions

2009-10-08 Thread David Gibson
On Tue, Oct 06, 2009 at 10:32:02PM -0600, Grant Likely wrote: > Merge common flattened device tree code between Microblaze and PowerPC And I guess another question is do we want to replace these with a libfdt based implementation. -- David Gibson| I'll have my music baroque,

Re: [RFC PATCH 05/12] of: add common header for flattened device tree representation

2009-10-08 Thread David Gibson
On Tue, Oct 06, 2009 at 10:30:59PM -0600, Grant Likely wrote: > Add a common header file for working with the flattened device tree > data structure and merge the shared data tags used by Microblaze and > PowerPC > > Signed-off-by: Grant Likely > --- > > arch/microblaze/include/asm/prom.h | 1

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Grant Likely
On Thu, Oct 8, 2009 at 4:20 PM, Anton Vorontsov wrote: > On Thu, Oct 08, 2009 at 09:48:50AM -0600, Grant Likely wrote: >> But the focus is still on creating pdata.  If a translator gets too >> big, then sure, split it into a separate file.  Until then, there I >> see no good reason to do so now. >

Re: [PATCH 2/6] 8xx: Update TLB asm so it behaves as linux mm expects.

2009-10-08 Thread Benjamin Herrenschmidt
On Fri, 2009-10-09 at 08:16 +0200, Joakim Tjernlund wrote: > Which will be fixed once I activate: > #if 0 /* Not yet */ > /* Honour kernel RO, User NA */ > andi. r11, r10, _PAGE_USER | _PAGE_RW > bne-cr0, 5f > ori r10,r10, 0x200 /* Extended encoding, bit 22 */ > #

Re: [PATCH/RFC] powerpc: Fix decrementer setup on 1GHz boards

2009-10-08 Thread Benjamin Herrenschmidt
On Fri, 2009-10-09 at 07:28 +0200, Stefan Roese wrote: > > So how could we solve this issue now? Apply my current patch? Any > other suggestions? Well, we probably need your current patch, but I'm not 100% it's enough. We need to check for example that the vDSO code for 32-bit isn't going to go

Re: [PATCH 2/6] 8xx: Update TLB asm so it behaves as linux mm expects.

2009-10-08 Thread Joakim Tjernlund
Benjamin Herrenschmidt wrote on 09/10/2009 02:53:31: > > Subject: > > Re: [PATCH 2/6] 8xx: Update TLB asm so it behaves as linux mm expects. > > On Fri, 2009-10-09 at 00:44 +0200, Joakim Tjernlund wrote: > > > accessed == 1 and present = 0 is impossible, right? > > So basically just copy over acce

Re: [PATCH 0/6] 8xx MMU fixes

2009-10-08 Thread Joakim Tjernlund
Rex Feany wrote on 09/10/2009 02:15:27: > > Thus spake Joakim Tjernlund (joakim.tjernl...@transmode.se): > > > So here we go again. This time I am > > fairly confindent I got most things correct :) > > Also manged to use even less instructions in the > > TLB Miss handlers. > > > > Scott and Rex, f

Re: [PATCH][v2] ibm_newemac: Added 16K Tx FIFO size support for EMAC4

2009-10-08 Thread David Miller
From: Benjamin Herrenschmidt Date: Fri, 09 Oct 2009 13:15:02 +1100 > On Thu, 2009-10-08 at 11:32 -0500, Dave Mitchell wrote: >> Some of the EMAC V4 implementations support 16K Tx FIFOs. This >> patch adds support for this functionality and fixes typos in the >> Tx FIFO size error messages. > > A

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Grant Likely
On Thu, Oct 8, 2009 at 11:14 PM, Wolfram Sang wrote: >> Will check this tomorrow. > > And while doing this and figuring the pro/cons of those methods, I stumbled > over this commit: > >        gpio: pca953x: Get platform_data from OpenFirmware >        (1965d30356c1c65660ba3330927671cfe81acdd5) >

Re: [PATCH/RFC] powerpc: Fix decrementer setup on 1GHz boards

2009-10-08 Thread Stefan Roese
On Thursday 08 October 2009 22:12:56 Benjamin Herrenschmidt wrote: > On Thu, 2009-10-08 at 16:49 +0200, Stefan Roese wrote: > > We noticed that recent kernels didn't boot on our 1GHz Canyonlands 460EX > > boards anymore. As it seems, patch 8d165db1 [powerpc: Improve > > decrementer accuracy] intro

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Wolfram Sang
> Will check this tomorrow. And while doing this and figuring the pro/cons of those methods, I stumbled over this commit: gpio: pca953x: Get platform_data from OpenFirmware (1965d30356c1c65660ba3330927671cfe81acdd5) It looks to me that it missed all people involved in OF/DT-deve

Re: [PATCH][v2] powerpc/4xx: Add 16K FIFO size DTS entries on supported platforms

2009-10-08 Thread Benjamin Herrenschmidt
On Thu, 2009-10-08 at 11:33 -0500, Dave Mitchell wrote: > Adding tx/rx-fifo-size-gige to EMAC fields for evaluation kit DTS > files where appropriate. > > Signed-off-by: Dave Mitchell > Acked-by: Prodyut Hazarika > Acked-by: Victor Gallardo > Acked-by: Loc Ho > --- > v1->v2: local date/time w

Re: [PATCH][v2] ibm_newemac: Added 16K Tx FIFO size support for EMAC4

2009-10-08 Thread Benjamin Herrenschmidt
On Thu, 2009-10-08 at 11:32 -0500, Dave Mitchell wrote: > Some of the EMAC V4 implementations support 16K Tx FIFOs. This > patch adds support for this functionality and fixes typos in the > Tx FIFO size error messages. Acked-by: Benjamin Herrenschmidt --- > Signed-off-by: Dave Mitchell > Acked-

Re: [PATCH 1/2][v2] mm: add notifier in pageblock isolation for balloon drivers

2009-10-08 Thread KAMEZAWA Hiroyuki
On Fri, 2 Oct 2009 13:44:58 -0500 Robert Jennings wrote: > Memory balloon drivers can allocate a large amount of memory which > is not movable but could be freed to accomodate memory hotplug remove. > > Prior to calling the memory hotplug notifier chain the memory in the > pageblock is isolated.

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Benjamin Herrenschmidt
On Thu, 2009-10-08 at 17:36 -0700, Dan Malek wrote: > On Oct 8, 2009, at 3:23 PM, Benjamin Herrenschmidt wrote: > > > << > > • Reference and change bit updates—The MPC850 does not generate an > > exception for > > an R (reference) bit update. In fact, there is no entry for an R > > bit in th

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Benjamin Herrenschmidt
On Fri, 2009-10-09 at 01:01 +0200, Joakim Tjernlund wrote: > Ok, that's my understanding too and I think we had the tlbie in > > update_mmu_cache to do the trick, though the comment is misleading > > making it think that the only reason it's there is for the dcbst > > problem. At least that's my un

Re: [PATCH 2/6] 8xx: Update TLB asm so it behaves as linux mm expects.

2009-10-08 Thread Benjamin Herrenschmidt
On Fri, 2009-10-09 at 00:44 +0200, Joakim Tjernlund wrote: > accessed == 1 and present = 0 is impossible, right? > So basically just copy over accessed to present and > linux mm set both when trapping to C. No, when present = 0, then the rest of the PTE can contain unrelated things, you can't tru

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Dan Malek
On Oct 8, 2009, at 3:23 PM, Benjamin Herrenschmidt wrote: << • Reference and change bit updates—The MPC850 does not generate an exception for an R (reference) bit update. In fact, there is no entry for an R bit in the TLB. The change bit (C) is bit 23 in the level-two descriptor, desc

Re: [PATCH 0/6] 8xx MMU fixes

2009-10-08 Thread Rex Feany
Thus spake Joakim Tjernlund (joakim.tjernl...@transmode.se): > So here we go again. This time I am > fairly confindent I got most things correct :) > Also manged to use even less instructions in the > TLB Miss handlers. > > Scott and Rex, forget previous versions and > try this one out. This pat

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Dan Malek
On Oct 8, 2009, at 1:37 PM, Joakim Tjernlund wrote: Hi, been a long time since I heard from you :) Yeah, hiding among other projects :-) Anyhow, you are welcome to have a look at the patches I have been tossing out. I've been looking, but since I'm not familiar with the current VM implem

Re: [PATCH 1/2][v2] mm: add notifier in pageblock isolation for balloon drivers

2009-10-08 Thread Andrew Morton
On Fri, 2 Oct 2009 13:44:58 -0500 Robert Jennings wrote: > Memory balloon drivers can allocate a large amount of memory which > is not movable but could be freed to accomodate memory hotplug remove. > > Prior to calling the memory hotplug notifier chain the memory in the > pageblock is isolated.

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Joakim Tjernlund
Benjamin Herrenschmidt wrote on 09/10/2009 00:23:48: > > On Thu, 2009-10-08 at 15:08 -0700, Dan Malek wrote: > > Hi Ben. > > > > On Oct 8, 2009, at 1:28 PM, Benjamin Herrenschmidt wrote: > > > > > While you are around ... I have a question :-) > > > > I'll try. Many brain cells have been replaced

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Grant Likely
On Thu, Oct 8, 2009 at 2:48 PM, Wolfram Sang wrote: > >> I think in general, this is the right direction; but I'm not convinced >> that the right pattern or form has been found yet.  What I don't like >> on this particular patch is that it still hooks of-specific stuff into >> an arbitrary point i

Re: [PATCH 2/6] 8xx: Update TLB asm so it behaves as linux mm expects.

2009-10-08 Thread Joakim Tjernlund
Benjamin Herrenschmidt wrote on 08/10/2009 23:04:03: > > On Thu, 2009-10-08 at 15:24 +0200, Joakim Tjernlund wrote: > > > +#define _PAGE_RW 0x0400 /* lsb PP bits, inverted in HW */ > > +#define _PAGE_USER 0x0800 /* msb PP bits */ > > > > + /* r10=(r10&~_PAGE_PRESENT)|((r10&_PAGE_ACCESSED

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Benjamin Herrenschmidt
On Thu, 2009-10-08 at 15:08 -0700, Dan Malek wrote: > Hi Ben. > > On Oct 8, 2009, at 1:28 PM, Benjamin Herrenschmidt wrote: > > > While you are around ... I have a question :-) > > I'll try. Many brain cells have been replaced or lost > over the years :-) Replaced ? You lucky ! I only lose min

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Anton Vorontsov
On Thu, Oct 08, 2009 at 09:48:50AM -0600, Grant Likely wrote: > On Thu, Oct 8, 2009 at 9:10 AM, Anton Vorontsov [...] > > It's *always* a small amound of code, at a start. Then we get > > floppy disk drivers and the tty layer. ;-) > > Holy straw man argument Batman! > > But the focus is still on

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Dan Malek
Hi Ben. On Oct 8, 2009, at 1:28 PM, Benjamin Herrenschmidt wrote: While you are around ... I have a question :-) I'll try. Many brain cells have been replaced or lost over the years :-) Do you happen to remember what the story is with the invalidation of "unpopulated" (aka invalid) entrie

Re: [PATCH 2/6] 8xx: Update TLB asm so it behaves as linux mm expects.

2009-10-08 Thread Benjamin Herrenschmidt
On Thu, 2009-10-08 at 15:24 +0200, Joakim Tjernlund wrote: > +#define _PAGE_RW 0x0400 /* lsb PP bits, inverted in HW */ > +#define _PAGE_USER 0x0800 /* msb PP bits */ > > + /* r10=(r10&~_PAGE_PRESENT)|((r10&_PAGE_ACCESSED)>>5) */ > + rlwimi. r10, r10, 27, 31, 31 > + beq-c

Re: [PATCH 1/6] 8xx: DTLB Error must check for more errors.

2009-10-08 Thread Benjamin Herrenschmidt
On Thu, 2009-10-08 at 15:24 +0200, Joakim Tjernlund wrote: > DataTLBError currently does: > if ((err & 0x0200) == 0) > DSI(); > This won't handle a store with no valid translation. > Change this to > if ((err & 0x4800) != 0) > DSI(); > that is, branch to DSI if either !permission

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Wolfram Sang
> I think in general, this is the right direction; but I'm not convinced > that the right pattern or form has been found yet. What I don't like > on this particular patch is that it still hooks of-specific stuff into > an arbitrary point in the probe routine. > > I'd like to see some pattern for

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Benjamin Herrenschmidt
> One could try clearing the store bit in the page fault handler, but then > that might cause a loop. > Not sure it has any practical meaning though. > > Anyhow, you are welcome to have a look at the patches I have been tossing out. The store bit in do_page_fault() is -very- important (and the o

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Benjamin Herrenschmidt
On Thu, 2009-10-08 at 21:22 +0200, Joakim Tjernlund wrote: > Benjamin Herrenschmidt wrote on 07/10/2009 > 23:18:05: > > > > On Wed, 2009-10-07 at 22:46 +0200, Joakim Tjernlund wrote: > > > 8xx sometimes need to load a invalid/non-present TLBs in > > > it DTLB asm handler. > > > These must be inva

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Joakim Tjernlund
Dan Malek wrote on 08/10/2009 22:11:07: > > > On Oct 8, 2009, at 12:22 PM, Joakim Tjernlund wrote: > > > hare are comments in the kernel that dcbst wrongly > > generates TLB Errors with store set on 8xx. Is this really so? > > Should dcbst always trap as a load? Hi, been a long time since I hea

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Benjamin Herrenschmidt
Hoy Dan ! While you are around ... I have a question :-) Do you happen to remember what the story is with the invalidation of "unpopulated" (aka invalid) entries ? IE. We create those in the 8xx TLB miss when the PTE is !present (or the PMD is absent). Those then cause a TLB error on the next ac

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Wolfram Sang
> No, this goes beyond PPC/OF. The real issue is that it is no longer a > safe assumption that pdata will be a static data structure in platform > code. The number of possible data sources is going to get larger, not > smaller. OF is just one. UEFI is another. Translating that data > into pdat

Re: [PATCH 2/6] 8xx: get rid of _PAGE_HWWRITE dependency in MMU.

2009-10-08 Thread Benjamin Herrenschmidt
On Thu, 2009-10-08 at 08:45 +0200, Joakim Tjernlund wrote: > > Generic code should sort it out in handle_mm_fault() (or earlier if it > > can't find a VMA at all). > > How can it? You need to know more that just read and write. It does. It's going to look for the VMA, which will tell it what is

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Benjamin Herrenschmidt
On Thu, 2009-10-08 at 13:11 -0700, Dan Malek wrote: > > There are many comments written about 8xx as various > behavior was discovered. Worse, some of these details > would be different among the different processor versions. > You need to be careful and test as many different part > versions as

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Dan Malek
On Oct 8, 2009, at 12:22 PM, Joakim Tjernlund wrote: hare are comments in the kernel that dcbst wrongly generates TLB Errors with store set on 8xx. Is this really so? Should dcbst always trap as a load? There are many comments written about 8xx as various behavior was discovered. Worse, some

Re: [PATCH/RFC] powerpc: Fix decrementer setup on 1GHz boards

2009-10-08 Thread Benjamin Herrenschmidt
On Thu, 2009-10-08 at 16:49 +0200, Stefan Roese wrote: > We noticed that recent kernels didn't boot on our 1GHz Canyonlands 460EX > boards anymore. As it seems, patch 8d165db1 [powerpc: Improve > decrementer accuracy] introduced this problem. The routine div_sc() > overflows with shift = 32 resulti

Re: [PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Joakim Tjernlund
Benjamin Herrenschmidt wrote on 07/10/2009 23:18:05: > > On Wed, 2009-10-07 at 22:46 +0200, Joakim Tjernlund wrote: > > 8xx sometimes need to load a invalid/non-present TLBs in > > it DTLB asm handler. > > These must be invalidated separaly as linux mm don't. > > not sure about the dsisr test here

Re: Crash in the kernel panic linux mpc 832x

2009-10-08 Thread Scott Wood
On Wed, Sep 16, 2009 at 03:02:33PM -, nanda wrote: > Hi, > Iam getting the below crash on new board tested on MPC832x using > linux-2.6.24, please let me what could be the problem on the same. > Does it infer any information on the exception? Please try running the latest kernel. > # Oo

Re: SMU-base PowerMac and server_mode

2009-10-08 Thread Romain Goyet
Ahem, that's pretty bad :'( How comes noone uses that ? - Romain On Wed, Oct 7, 2009 at 6:33 PM, Olof Johansson wrote: > On Wed, Oct 07, 2009 at 01:25:13PM +0200, Romain Goyet wrote: > > On Tue, Oct 6, 2009 at 6:07 PM, Olof Johansson wrote: > > > > Yeah, I had one but I have since lost it. I

Re: [RFC PATCH 00/12] Merge common OpenFirmware device tree code

2009-10-08 Thread Kjetil Oftedal
On Wed, 7 Oct 2009, David Miller wrote: From: Chris Newport Date: Thu, 8 Oct 2009 02:29:25 +0100 (BST) Sun4d has never had SMP support and Wrong. this is apparantly problematic due to Cray interlectual property causing a lack of bus documentation. XBUS documentation is not available, b

Re: [PATCH 2/2][v2] powerpc: Make the CMM memory hotplug aware

2009-10-08 Thread Gerald Schaefer
Hi, I am currently working on the s390 port for the cmm + hotplug patch, and I'm a little confused about the memory allocation policy, see below. Is it correct that the balloon cannot grow into ZONE_MOVABLE, while the pages for the balloon page list can? Robert Jennings wrote: @@ -110,6 +125,9

[PATCH][v2] powerpc/4xx: Add 16K FIFO size DTS entries on supported platforms

2009-10-08 Thread Dave Mitchell
Adding tx/rx-fifo-size-gige to EMAC fields for evaluation kit DTS files where appropriate. Signed-off-by: Dave Mitchell Acked-by: Prodyut Hazarika Acked-by: Victor Gallardo Acked-by: Loc Ho --- v1->v2: local date/time was out-of-sync and thus mail was as well arch/powerpc/boot/dts/canyonlan

[PATCH][v2] ibm_newemac: Added 16K Tx FIFO size support for EMAC4

2009-10-08 Thread Dave Mitchell
Some of the EMAC V4 implementations support 16K Tx FIFOs. This patch adds support for this functionality and fixes typos in the Tx FIFO size error messages. Signed-off-by: Dave Mitchell Acked-by: Prodyut Hazarika Acked-by: Victor Gallardo Acked-by: Loc Ho --- v1->v2: local date/time was out-o

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Grant Likely
On Thu, Oct 8, 2009 at 9:10 AM, Anton Vorontsov wrote: > On Thu, Oct 08, 2009 at 08:53:46AM -0600, Grant Likely wrote: > [...] >> Please don't.  It is such a small amount of code, > > It's *always* a small amound of code, at a start. Then we get > floppy disk drivers and the tty layer. ;-) Holy s

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Anton Vorontsov
On Thu, Oct 08, 2009 at 08:53:46AM -0600, Grant Likely wrote: [...] > Please don't. It is such a small amount of code, It's *always* a small amound of code, at a start. Then we get floppy disk drivers and the tty layer. ;-) [...] > Driver writers shouldn't have to > write anything more than a ti

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Grant Likely
On Thu, Oct 8, 2009 at 8:33 AM, Anton Vorontsov wrote: > On Thu, Oct 08, 2009 at 04:04:32PM +0200, Wolfram Sang wrote: >> As Anton introduced archdata support, I wondered if this is a suitable way to >> handle the platform_data/devicetree_property-dualism (at least for some >> drivers). > > Yes, w

[PATCH] Ftrace : fix function_graph tracer OOPS

2009-10-08 Thread Sachin Sant
Enabling function graph causes oops due to usage of LOAD_REG_IMMEDIATE(). As explained by Ben the usage of LOAD_REG_IMMEDIATE generates relocs that are not supported when CONFIG_RELOCATABLE is set. Switch to LOAD_REG_ADDR(). Signed-off-by : Sachin Sant --- Enabling function graph causes oops

[PATCH/RFC] powerpc: Fix decrementer setup on 1GHz boards

2009-10-08 Thread Stefan Roese
We noticed that recent kernels didn't boot on our 1GHz Canyonlands 460EX boards anymore. As it seems, patch 8d165db1 [powerpc: Improve decrementer accuracy] introduced this problem. The routine div_sc() overflows with shift = 32 resulting in this incorrect setup: time_init: decrementer frequency =

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Grant Likely
On Thu, Oct 8, 2009 at 8:04 AM, Wolfram Sang wrote: > As Anton introduced archdata support, I wondered if this is a suitable way to > handle the platform_data/devicetree_property-dualism (at least for some > drivers). I think in general, this is the right direction; but I'm not convinced that the

Re: [RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Anton Vorontsov
On Thu, Oct 08, 2009 at 04:04:32PM +0200, Wolfram Sang wrote: > As Anton introduced archdata support, I wondered if this is a suitable way to > handle the platform_data/devicetree_property-dualism (at least for some > drivers). Yes, we handle OF in a similar way for mmc_spi driver. Though, [...]

[RFC] misc/at24: add experimental OF support for the generic eeprom driver

2009-10-08 Thread Wolfram Sang
As Anton introduced archdata support, I wondered if this is a suitable way to handle the platform_data/devicetree_property-dualism (at least for some drivers). If considered suitable, I would document the bindings properly. I really think that pagesize deserves its own property as it is specific t

[PATCH 4/6] 8xx: Tag DAR with 0x00f0 to catch buggy instructions.

2009-10-08 Thread Joakim Tjernlund
dcbz, dcbf, dcbi, dcbst and icbi do not set DAR when they cause a DTLB Error. Dectect this by tagging DAR with 0x00f0 at every exception exit that modifies DAR. Test for DAR=0x00f0 in DataTLBError and bail to handle_page_fault(). --- arch/powerpc/kernel/head_8xx.S | 15 ++- 1 files c

[PATCH 6/6] 8xx: start using dcbX instructions in various copy routines

2009-10-08 Thread Joakim Tjernlund
Now that 8xx can fixup dcbX instructions, start using them where possible like every other PowerPc arch do. --- arch/powerpc/kernel/misc_32.S | 18 -- arch/powerpc/lib/copy_32.S| 24 2 files changed, 0 insertions(+), 42 deletions(-) diff --git a/ar

[PATCH 2/6] 8xx: Update TLB asm so it behaves as linux mm expects.

2009-10-08 Thread Joakim Tjernlund
Update the TLB asm to make proper use of _PAGE_DIRY and _PAGE_ACCESSED. Get rid of _PAGE_HWWRITE too. Pros: - I/D TLB Miss never needs to write to the linux pte. - _PAGE_ACCESSED is only set on TLB Error fixing accounting - _PAGE_DIRTY is mapped to 0x100, the changed bit, and is set directly

[PATCH 1/6] 8xx: DTLB Error must check for more errors.

2009-10-08 Thread Joakim Tjernlund
DataTLBError currently does: if ((err & 0x0200) == 0) DSI(); This won't handle a store with no valid translation. Change this to if ((err & 0x4800) != 0) DSI(); that is, branch to DSI if either !permission or !translation. --- arch/powerpc/kernel/head_8xx.S |4 ++-- 1 files c

[PATCH 5/6] 8xx: Fixup DAR from buggy dcbX instructions.

2009-10-08 Thread Joakim Tjernlund
This is an assembler version to fixup DAR not being set by dcbX, icbi instructions. There are two versions, one uses selfmodifing code, the other uses a jump table but is much bigger(default). --- arch/powerpc/kernel/head_8xx.S | 146 +++- 1 files changed, 145

[PATCH 3/6] 8xx: invalidate non present TLBs

2009-10-08 Thread Joakim Tjernlund
8xx sometimes need to load a invalid/non-present TLBs in it DTLB asm handler. These must be invalidated separaly as linux mm don't. --- arch/powerpc/mm/fault.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 76

[PATCH 0/6] 8xx MMU fixes

2009-10-08 Thread Joakim Tjernlund
So here we go again. This time I am fairly confindent I got most things correct :) Also manged to use even less instructions in the TLB Miss handlers. Scott and Rex, forget previous versions and try this one out. Once this works we can discuss further enchantments. Joakim Tjernlund (6): 8xx: D

Re: [PATCH 2/2][v2] powerpc: Make the CMM memory hotplug aware

2009-10-08 Thread Robert Jennings
* Gerald Schaefer (gera...@linux.vnet.ibm.com) wrote: > Hi, > > I am currently working on the s390 port for the cmm + hotplug > patch, and I'm a little confused about the memory allocation > policy, see below. Is it correct that the balloon cannot grow > into ZONE_MOVABLE, while the pages for the b

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Vaidyanathan Srinivasan
* Peter Zijlstra [2009-10-08 14:25:37]: > On Thu, 2009-10-08 at 17:31 +0530, Arun R Bharadwaj wrote: > > > > > Uhm, no, it would mean ACPI putting its idle routines on the same level > > > as all others. > > > > > > > Putting them all on the same level would mean, we need an > > enable/disable

[PATCH] powerpc/4xx: Add 16K FIFO size DTS entries on supported platforms

2009-10-08 Thread Dave Mitchell
Adding tx/rx-fifo-size-gige to EMAC fields for evaluation kit DTS files where appropriate. Signed-off-by: Dave Mitchell Acked-by: Prodyut Hazarika Acked-by: Victor Gallardo Acked-by: Loc Ho --- arch/powerpc/boot/dts/canyonlands.dts |2 ++ arch/powerpc/boot/dts/eiger.dts |6 +

[PATCH] ibm_newemac: Added 16K Tx FIFO size support for EMAC4

2009-10-08 Thread Dave Mitchell
Some of the EMAC V4 implementations support 16K Tx FIFOs. This patch adds support for this functionality and fixes typos in the Tx FIFO size error messages. Signed-off-by: Dave Mitchell Acked-by: Prodyut Hazarika Acked-by: Victor Gallardo Acked-by: Loc Ho --- drivers/net/ibm_newemac/core.c |

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Peter Zijlstra
On Thu, 2009-10-08 at 17:31 +0530, Arun R Bharadwaj wrote: > > > Uhm, no, it would mean ACPI putting its idle routines on the same level > > as all others. > > > > Putting them all on the same level would mean, we need an > enable/disable routine to enable only the currently active routines. Wh

[PATCH] net: Fix OF platform drivers coldplug/hotplug when compiled as modules

2009-10-08 Thread Anton Vorontsov
Some OF platform drivers are missing module device tables, so they won't load automatically on boot. This patch fixes the issue by adding proper MODULE_DEVICE_TABLE() macros to the drivers. Signed-off-by: Anton Vorontsov --- drivers/net/can/sja1000/sja1000_of_platform.c |1 + drivers/net/fec

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Arun R Bharadwaj
* Peter Zijlstra [2009-10-08 13:25:10]: > On Thu, 2009-10-08 at 16:31 +0530, Arun R Bharadwaj wrote: > > * Peter Zijlstra [2009-10-08 12:50:33]: > > > > > On Thu, 2009-10-08 at 16:12 +0530, Arun R Bharadwaj wrote: > > > > > > > > > So cpuidle didn't already have a list of idle functions it tak

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Peter Zijlstra
On Thu, 2009-10-08 at 16:31 +0530, Arun R Bharadwaj wrote: > * Peter Zijlstra [2009-10-08 12:50:33]: > > > On Thu, 2009-10-08 at 16:12 +0530, Arun R Bharadwaj wrote: > > > > > > > So cpuidle didn't already have a list of idle functions it takes an > > > > appropriate one from? > > > > > > > >

Re: Nested function in drivers/of/of_mdio.c

2009-10-08 Thread Gabriel Paubert
On Thu, Oct 08, 2009 at 10:45:12AM +0200, Jérôme Pouiller wrote: > I did some grep on codebase. I have not found any other instances of > nested functions, but my regexps are not enough to be 100% sure. >From Documentation/CodingStyle, written by the Head Penguin himself: "Heretic people all ove

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Arun R Bharadwaj
* Peter Zijlstra [2009-10-08 12:50:33]: > On Thu, 2009-10-08 at 16:12 +0530, Arun R Bharadwaj wrote: > > > > > So cpuidle didn't already have a list of idle functions it takes an > > > appropriate one from? > > > > > > > No.. As of now, cpuidle supported only one _set_ of idle states that > >

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Peter Zijlstra
On Thu, 2009-10-08 at 16:12 +0530, Arun R Bharadwaj wrote: > > > So cpuidle didn't already have a list of idle functions it takes an > > appropriate one from? > > > > No.. As of now, cpuidle supported only one _set_ of idle states that > can be registered. So in this one set, it would choose the

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Arun R Bharadwaj
* Peter Zijlstra [2009-10-08 12:36:02]: > On Thu, 2009-10-08 at 15:20 +0530, Arun R Bharadwaj wrote: > > * Arun R Bharadwaj [2009-10-08 15:18:28]: > > > > Implement a list based registering mechanism for architectures which > > have multiple sets of idle routines which are to be registered. > >

Re: [v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Peter Zijlstra
On Thu, 2009-10-08 at 15:20 +0530, Arun R Bharadwaj wrote: > * Arun R Bharadwaj [2009-10-08 15:18:28]: > > Implement a list based registering mechanism for architectures which > have multiple sets of idle routines which are to be registered. > > Currently, in x86 it is done by merely setting pm_

[v8 PATCH 8/8]: POWER: Enable default_idle when power_save=off.

2009-10-08 Thread Arun R Bharadwaj
* Arun R Bharadwaj [2009-10-08 15:18:28]: This patch enables default_idle when power_save=off kernel boot option is specified. Earlier, this was done by setting ppc_md.power_save = NULL and hence HMT_low() and HMT_very_low() was called. Now this is defined under default_idle() and hence by setti

[v8 PATCH 7/8]: pSeries: implement pSeries processor idle module.

2009-10-08 Thread Arun R Bharadwaj
* Arun R Bharadwaj [2009-10-08 15:18:28]: This patch creates arch/powerpc/platforms/pseries/processor_idle.c, which implements the cpuidle infrastructure for pseries. It implements a pseries_cpuidle_loop() which would be the main idle loop called from cpu_idle(). It makes decision of entering eit

[v8 PATCH 6/8]: POWER: add a default_idle idle loop for POWER.

2009-10-08 Thread Arun R Bharadwaj
* Arun R Bharadwaj [2009-10-08 15:18:28]: In arch/powerpc/kernel/idle.c create a default_idle() routine by moving the failover condition of the cpu_idle() idle loop. This is needed by cpuidle infrastructure to call default_idle when other idle routines are not yet registered. Functionality remain

[v8 PATCH 5/8]: pSeries/cpuidle: remove dedicate/shared idle loops, which will be moved to arch/powerpc/platforms/pseries/processor_idle.c

2009-10-08 Thread Arun R Bharadwaj
* Arun R Bharadwaj [2009-10-08 15:18:28]: This patch removes the routines, pseries_shared_idle_sleep and pseries_dedicated_idle_sleep, since this is implemented as a part of arch/powerpc/platform/pseries/processor_idle.c Also, similar to x86, call cpuidle_idle_call from cpu_idle() idle loop inst

[v8 PATCH 4/8]: POWER: enable cpuidle for POWER.

2009-10-08 Thread Arun R Bharadwaj
* Arun R Bharadwaj [2009-10-08 15:18:28]: This patch enables the cpuidle option in Kconfig for pSeries. Currently cpuidle infrastructure is enabled only for x86 and ARM. This code is almost completely borrowed from x86 to enable cpuidle for pSeries. Signed-off-by: Arun R Bharadwaj --- arch/po

[v8 PATCH 3/8]: x86: refactor x86 idle power management code and remove all instances of pm_idle.

2009-10-08 Thread Arun R Bharadwaj
* Arun R Bharadwaj [2009-10-08 15:18:28]: This patch cleans up x86 of all instances of pm_idle. pm_idle which was earlier called from cpu_idle() idle loop is replaced by cpuidle_idle_call. x86 also registers to cpuidle when the idle routine is selected, by populating the cpuidle_device data str

[v8 PATCH 2/8]: cpuidle: implement a list based approach to register a set of idle routines.

2009-10-08 Thread Arun R Bharadwaj
* Arun R Bharadwaj [2009-10-08 15:18:28]: Implement a list based registering mechanism for architectures which have multiple sets of idle routines which are to be registered. Currently, in x86 it is done by merely setting pm_idle = idle_routine and managing this pm_idle pointer is messy. To giv

[v8 PATCH 1/8]: cpuidle: cleanup drivers/cpuidle/cpuidle.c

2009-10-08 Thread Arun R Bharadwaj
* Arun R Bharadwaj [2009-10-08 15:18:28]: This patch cleans up drivers/cpuidle/cpuidle.c Earlier cpuidle assumed pm_idle as the default idle loop. Break that assumption and make it more generic. cpuidle_idle_call() which is the main idle loop of cpuidle is to be called by architectures which have

[v8 PATCH 0/8]: cpuidle: Cleanup cpuidle/ Introduce cpuidle to POWER.

2009-10-08 Thread Arun R Bharadwaj
Hi Please consider this for inclusion into the testing tree. This patchset introduces cpuidle infrastructure to POWER, prototyping for pSeries, and also does a major refactoring of current x86 idle power management and a cleanup of cpuidle infrastructure. Earlier discussions on the same can be f

Re: Nested function in drivers/of/of_mdio.c

2009-10-08 Thread Jérôme Pouiller
I did some grep on codebase. I have not found any other instances of nested functions, but my regexps are not enough to be 100% sure. On Wednesday 07 October 2009 18:23:04 v...@vsbe.com wrote: > Guys, are there other instances of nested C functions in the codebase > or was this the first attempt?

Re: [PATCH] Remove nested function

2009-10-08 Thread David Miller
From: Jérôme Pouiller Date: Thu, 8 Oct 2009 10:34:23 +0200 > Some toolchains dislike nested function definition, so we define function > match > outside of of_phy_find_device. > > Signed-off-by: Jérôme Pouiller Acked-by: David S. Miller ___ Linuxp

[PATCH] Remove nested function

2009-10-08 Thread Jérôme Pouiller
Some toolchains dislike nested function definition, so we define function match outside of of_phy_find_device. Signed-off-by: Jérôme Pouiller --- drivers/of/of_mdio.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c