Re: [PATCH 2/3] powerpc/pci: move pci_64.c device tree scanning code into pci-common.c

2009-08-21 Thread Benjamin Herrenschmidt
On Thu, 2009-08-20 at 23:30 -0600, Grant Likely wrote: From: Grant Likely grant.lik...@secretlab.ca The PCI device tree scanning code in pci_64.c is some useful functionality. It allows PCI devices to be described in the device tree instead of being probed for, which in turn allows pci

Re: [Bugme-new] [Bug 14021] New: hfsplus caused data loss

2009-08-21 Thread Benjamin Herrenschmidt
On Thu, 2009-08-20 at 15:02 -0700, Andrew Morton wrote: (switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface). Is Roman Zippel still around ? (I added him to the CC list). AFAIK, He maintains HFS and HFS+ (and was the last one to do any major work on

Re: [PATCH 1/5] powerpc/mm: Add MMU features for TLB reservation Paired MAS registers

2009-08-24 Thread Benjamin Herrenschmidt
On Mon, 2009-08-24 at 11:12 -0500, Kumar Gala wrote: Duh. Wasn't looking at the fall through. But is there any reason to even have any of the 6 instructions in the 'virt_page_table_tlb_miss_done' path if we don't have TLBSRX? No, that's what I said in my initial email :-) You can

Re: [PATCH] powerpc: Change archdata dma_data type to dma_addr_t

2009-08-26 Thread Benjamin Herrenschmidt
On Mon, 2009-08-24 at 21:48 +0200, Christoph Hellwig wrote: On Mon, Aug 24, 2009 at 11:17:14AM -0500, Becky Bruce wrote: Previously, this was specified as a void *, but that's not large enough on 32-bit systems with 36-bit physical addressing support. Change the type to dma_addr_t so it

Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h

2009-08-26 Thread Benjamin Herrenschmidt
On Thu, 2009-08-13 at 10:55 +0200, Ingo Molnar wrote: Ok! We could also stage it a bit (one or two weeks) in a separate branch and allow a rebase, should you find any bugs during testing? Allright so after various delays and sidetracking on my side, the patches have been in my -test branch

Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h

2009-08-26 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 13:12 +1000, Benjamin Herrenschmidt wrote: On Thu, 2009-08-13 at 10:55 +0200, Ingo Molnar wrote: Ok! We could also stage it a bit (one or two weeks) in a separate branch and allow a rebase, should you find any bugs during testing? Allright so after various delays

[git pull] Please pull powerpc.git merge branch

2009-08-26 Thread Benjamin Herrenschmidt
Hi Linus ! Here are a couple of last minute patches for 2.6.31. One is a regression fix (afaik) where a PS3 driver gets incorrectly loaded on other platforms and crashes, along with a PS3 defconfig update. The following changes since commit f415c413f458837bd0c27086b79aca889f9435e4: Linus

Re: [v2 PATCH 2/2]: pseries: Implement Pseries Processor Idle idle module.

2009-08-26 Thread Benjamin Herrenschmidt
On Wed, 2009-08-26 at 13:27 +0200, Peter Zijlstra wrote: On Wed, 2009-08-26 at 16:40 +0530, Arun R Bharadwaj wrote: +void (*pm_idle)(void); +EXPORT_SYMBOL_GPL(pm_idle); Seriously.. this caused plenty problems over on x86 and you're doing the exact same dumb thing? I already said I didn't

Re: [PATCH] powerpc: Invoke kdump for system reset exception

2009-08-26 Thread Benjamin Herrenschmidt
On Mon, 2009-08-24 at 08:42 +0530, M. Mohan Kumar wrote: Invoke kdump for system reset exception Dump restart operation from HMC raises system reset exception (0x100) and xmon is invoked(even if kdump kernel is loaded). User has to exit from xmon by saying 'Don't recover' to invoke kdump.

Re: Extending virtio_console to support multiple ports

2009-08-26 Thread Benjamin Herrenschmidt
On Wed, 2009-08-26 at 21:15 +0530, Amit Shah wrote: - Convert hvc's usage of spinlocks to mutexes. I've no idea how this will play out; I'm no expert here. But I did try doing this and so far it all looks OK. No lockups, lockdep warnings, nothing. I have full debugging enabled.

Re: [RFC] Clock binding

2009-08-26 Thread Benjamin Herrenschmidt
On Tue, 2009-08-18 at 14:21 +1000, Benjamin Herrenschmidt wrote: So here's a followup to my discussion about the clock API. Really nobody has a comment here ? :-) Not even Mitch ? Cheers, Ben. I'm cooking up a patch that replace our current primitive implementation in arch/powerpc/kernel

Re: [PATCH] powerpc: add cascade support to xilinx intc controller

2009-08-26 Thread Benjamin Herrenschmidt
On Tue, 2009-08-25 at 00:08 -0600, Grant Likely wrote: From: Grant Likely grant.lik...@secretlab.ca This patch allows the Xilinx intc interrupt controller to be cascaded instead of being the master irqhost. Useful when attaching an FPGA to an SoC that has its own interrupt controller.

Re: [PATCH V2 3/3] powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan()

2009-08-26 Thread Benjamin Herrenschmidt
On Wed, 2009-08-26 at 00:07 -0600, Grant Likely wrote: From: Grant Likely grant.lik...@secretlab.ca The two versions are doing almost exactly the same thing. No need to maintain them as separate files. This patch also has the side effect of making the PCI device tree scanning code

[PATCH] powerpc: Properly start decrementer on BookE secondary CPUs

2009-08-27 Thread Benjamin Herrenschmidt
-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- arch/powerpc/kernel/time.c| 30 ++ arch/powerpc/platforms/85xx/smp.c | 12 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c

[PATCH] lmb: Remove __init from lmb_end_of_DRAM()

2009-08-27 Thread Benjamin Herrenschmidt
a broken 2.6.31 by making this function non-__init and we can revisit later. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- David, you use lmb too, any objection there ? diff --git a/lib/lmb.c b/lib/lmb.c index e4a6482..0343c05 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -429,7

Re: [PATCH -v2 0/7] powerpc: use asm-generic/dma-mapping-common.h

2009-08-27 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 09:22 +0200, Ingo Molnar wrote: ah, yes, they are stable/fine. I've put it into a separate branch for you. Ben, please pull the latest iommu-for-powerpc git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git iommu-for-powerpc And

Re: Extending virtio_console to support multiple ports

2009-08-27 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 10:08 +0100, Alan Cox wrote: - Then, are we certain that there's no case where the tty layer will call us with some lock held or in an atomic context ? To be honest, I've totally lost track of the locking rules in tty land lately so it might well be ok, but something

Re: Question : about difference with bdnz and bdnz+

2009-08-27 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 14:04 +0900, HongWoo Lee wrote: And I have a question about bdnz+ instruction. Through googling, I learned that bdnz does decrement count register and branch if it is still nonzero. But I couldn't find what bdnz+ is. Can anybody explain to me what it is ?? On PowerPC,

Re: spin_is_locked() broken for uniprocessor?

2009-08-27 Thread Benjamin Herrenschmidt
On Wed, 2009-08-19 at 11:41 +0200, Peter Zijlstra wrote: which implies to me that spin_is_locked() will always return false. Is this expected behavior. That's wrong. spin_is_locked should always return true on UP. Surely it's not that simple? Maybe spin_is_lock() should be

Re: [git pull] Please pull powerpc.git merge branch

2009-08-27 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 07:05 -0400, Josh Boyer wrote: On Thu, Aug 27, 2009 at 01:33:48PM +1000, Benjamin Herrenschmidt wrote: Hi Linus ! Here are a couple of last minute patches for 2.6.31. One is a regression fix (afaik) where a PS3 driver gets incorrectly loaded on other platforms

Re: [PATCH 2/4]: CPUIDLE: Introduce architecture independent cpuidle_pm_idle in drivers/cpuidle/cpuidle.c

2009-08-27 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 14:53 +0200, Peter Zijlstra wrote: I'm not quite seeing how this makes anything any better. Not we have 3 function pointers, where 1 should suffice. There's also the question of us having different idle vs. power_save, the former being the entire idle loop, the later

Re: [RFC] Clock binding

2009-08-27 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 11:11 -1000, Mitch Bradley wrote: I refrained from commenting as I didn't want to get involved in an endless argument about goodness. Oh well, I asked for it, didn't it ? :-) Indexed arrays are appropriate for some cases and names are better for others. Names are

Re: [RFC] Clock binding

2009-08-27 Thread Benjamin Herrenschmidt
I agree in general. It has long been a convention of mine to follow the vendor's names as exactly as possible. But that often presents difficulties. Many of them have been touched on in our previous discussion but I'll list some here just to emphasize the problem we face: a)

Re: [RFC] Clock binding

2009-08-27 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 16:36 -1000, Mitch Bradley wrote: The idea of a wiki as a registration authority is a good one, but I'm not volunteering to maintain it :-) here goes my hope :-) Do we have wiki's we could use on power.org or should we aim for a community place ? Anybody has suggestions

Re: lmb: Remove __init from lmb_end_of_DRAM()

2009-08-28 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 19:59 +, Linux Kernel Mailing List wrote: Gitweb: http://git.kernel.org/linus/4f8ee2c9cc0e885d2bb50ef26db66150ab25213e Commit: 4f8ee2c9cc0e885d2bb50ef26db66150ab25213e Parent: cf481442f2e086316ed8a1b3046f00ad23632ac4 Author: Benjamin Herrenschmidt b

Re: [RFC] Clock binding

2009-08-28 Thread Benjamin Herrenschmidt
This is about the 3rd or 4th time this idea has come up over the past couple of years. Maybe this time it will stick? There actually was one set up on power.org, for epapr bindings. I'm still digging around to try to relocate the address, though. We need to double check that indeed the

Re: [RFC] Clock binding

2009-08-28 Thread Benjamin Herrenschmidt
On Fri, 2009-08-28 at 20:24 +0200, Rafal Jaworowski wrote: Grant, When choosing the best location for the bindings page please consider it uniform enough so that various OSes can use it as a reference. We are very much interested in bringing FDT support for embedded FreeBSD (arm,

Re: [PATCH] powermac: thermal control turns system off in normal temperature conditions

2009-08-30 Thread Benjamin Herrenschmidt
On Sun, 2009-08-30 at 20:54 +0200, Bartlomiej Zolnierkiewicz wrote: From: Lyonel Vincent lyo...@ezix.org Subject: [PATCH] powermac: thermal control turns system off in normal temperature conditions On certain PowerMacs, a module (therm_windtunnel) controls various thermal settings (it can

[PATCH] powerpc: Fix some late PowerMac G5 with PCIe ATI graphics

2009-08-30 Thread Benjamin Herrenschmidt
it by fixing up the bridge configuration properly at boot time. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- arch/powerpc/platforms/powermac/pci.c | 60 + include/linux/pci_ids.h |1 + 2 files changed, 61 insertions(+), 0

Re: [PATCH 1/1] powerpc: Fix to handle slb resize across migration

2009-08-31 Thread Benjamin Herrenschmidt
On Fri, 2009-08-28 at 17:06 -0500, Brian King wrote: The SLB can change sizes across a live migration, which was not being handled, resulting in possible machine crashes during migration if migrating to a machine which has a smaller max SLB size than the source machine. Fix this by first

Re: [PATCH] powermac: thermal control turns system off in normal temperature conditions

2009-08-31 Thread Benjamin Herrenschmidt
, 30. August 2009N From:Bartlomiej Zolnierkiewicz bzoln...@gmail.com To: Benjamin Herrenschmidt b...@kernel.crashing.org From: Lyonel Vincent lyo...@ezix.org Subject: [PATCH] powermac: thermal control turns system off in normal temperature conditions On certain PowerMacs

Re: [PATCH 1/5] ucc_geth: Fix NULL pointer dereference in uec_get_ethtool_stats()

2009-08-31 Thread Benjamin Herrenschmidt
On Sun, 2009-08-30 at 21:52 -0700, David Miller wrote: All 5 patches applied to net-next-2.6 I would have liked to have seen at least one powerpc ACK for patch #2 but these were posted more than a week ago, the patch looks pretty reasonable, and we can't wait forever for stuff like this.

[PATCH v2] powerpc: Fix some late PowerMac G5 with PCIe ATI graphics

2009-09-01 Thread Benjamin Herrenschmidt
it by fixing up the bridge configuration properly at boot time. It also fixes a bug where the firmware provides us with an incorrect set of accessible regions in the device-tree. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- diff --git a/arch/powerpc/platforms/powermac/pci.c b

Re: time jumps forward/backwards

2009-09-01 Thread Benjamin Herrenschmidt
On Mon, 2009-08-31 at 23:57 -0400, Benjamin Gamsa wrote: Sean MacLennan wrote: On Mon, 31 Aug 2009 22:20:00 -0400 Benjamin Gamsa b...@somanetworks.com wrote: For what it's worth, the problem occurs even when ntp is not even started. This is grasping, but could it have anything to

Re: [PATCH] powerpc/fsl-booke: Use HW PTE format if CONFIG_PTE_64BIT

2009-09-01 Thread Benjamin Herrenschmidt
On Tue, 2009-09-01 at 20:48 -0500, Kumar Gala wrote: Switch to using the Power ISA defined PTE format when we have a 64-bit PTE. This makes the code handling between fsl-booke and book3e-64 similiar for TLB faults. Additionally this lets use take advantage of the page size encodings and

Re: [PATCH] Fix fake numa on ppc

2009-09-01 Thread Benjamin Herrenschmidt
On Tue, 2009-09-01 at 19:57 +0530, Balbir Singh wrote: Heres the updated patch: Signed-off-by: Ankita Garg ank...@in.ibm.com The thread is too messy. Please Ankita can you re-submit in proper form (ie. subject, cset, signed-off patch) please ? In general, don't mix reply to comments

Re: [PATCH] Fix fake numa on ppc

2009-09-01 Thread Benjamin Herrenschmidt
On Wed, 2009-09-02 at 11:06 +0530, Ankita Garg wrote: Oh! interesting.. cpuless nodes :) I think we need to fix this in the longer run and distribute cpus between fake numa nodes of a real node using some acceptable heuristic. True. Presently this is broken on both x86 and ppc systems.

Re: [PATCH 1/1] powerpc: Fix to handle slb resize across migration

2009-09-02 Thread Benjamin Herrenschmidt
On Fri, 2009-08-28 at 17:06 -0500, Brian King wrote: The SLB can change sizes across a live migration, which was not being handled, resulting in possible machine crashes during migration if migrating to a machine which has a smaller max SLB size than the source machine. Fix this by first

Re: [PATCH] Fix fake numa on ppc

2009-09-02 Thread Benjamin Herrenschmidt
On Tue, 2009-09-01 at 23:03 -0700, David Rientjes wrote: On Wed, 2 Sep 2009, Benjamin Herrenschmidt wrote: Since I'm pretty sure there could be CPU less nodes just like there could be memory-less nodes, it would be good if fake numa could simulate them too :-) You don't want

Re: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-03 Thread Benjamin Herrenschmidt
On Thu, 2009-09-03 at 09:05 +0100, Chris Pringle wrote: Hi Adam, If you have a look in include/asm-ppc/pgtable.h for the following section: #ifdef CONFIG_44x #define _PAGE_BASE(_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_GUARDED) #else #define _PAGE_BASE(_PAGE_PRESENT | _PAGE_ACCESSED)

Re: PPC PCI bus registers

2009-09-03 Thread Benjamin Herrenschmidt
On Wed, 2009-09-02 at 16:44 -0700, Eddie Dawydiuk wrote: Hello, I have a question regarding reading PCI bus registers from a user space application running on a PPC SBC. Seeing as though the PCI bus is little endian and PPC is big endian is it typical that one must perform a byte swap on

Re: [PATCH] powerpc: Fix i8259 interrupt driver kernel crash on ML510

2009-09-03 Thread Benjamin Herrenschmidt
the ack hook for level irqs. Signed-off-by: Roderick Colenbrander thunderbir...@gmail.com Signed-off-by: Grant Likely grant.lik...@secretlab.ca --- Acked-by: Benjamin Herrenschmidt b...@kernel.crashing.org My git trees aren't at hand, so Linus feel free to merge that directly. Cheers, Ben

RE: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-06 Thread Benjamin Herrenschmidt
On Thu, 2009-09-03 at 13:20 +0100, Wrobel Heinz-R39252 wrote: Hi, This doesn't seem right. If we are talking about a single CPU core chip, i.e., just one data cache, then setting M is typically a) useless and could even b) cause a performance penalty depending on a chip's implementation.

RE: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-08 Thread Benjamin Herrenschmidt
. Could you give more details on the consistency problem? It is a good idea to change to the new DMA APIs, but pci_alloc_consistent() should work too Thanks Prodyut On Thu, 2009-09-03 at 19:57 +1000, Benjamin Herrenschmidt wrote: On Thu, 2009-09-03 at 09:05 +0100, Chris Pringle

Re: [PATCH] powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops

2009-09-08 Thread Benjamin Herrenschmidt
On Tue, 2009-09-08 at 14:21 -0500, Kumar Gala wrote: struct smp_ops_t smp_85xx_ops = { + .message_pass = NULL, + .probe = NULL, .kick_cpu = smp_85xx_kick_cpu, + .setup_cpu = NULL, }; Why explicitely setting those to NULL ? Cheers, Ben. -static int __init

RE: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-08 Thread Benjamin Herrenschmidt
too Thanks Prodyut On Thu, 2009-09-03 at 19:57 +1000, Benjamin Herrenschmidt wrote: On Thu, 2009-09-03 at 09:05 +0100, Chris Pringle wrote: Hi Adam, If you have a look in include/asm-ppc/pgtable.h for the following section: #ifdef CONFIG_44x

[PATCH] Don't set DABR on 64-bit BookE, use DAC1 instead

2009-09-08 Thread Benjamin Herrenschmidt
Also remove a duplicate setting of it in the context switch path on BookE. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- arch/powerpc/kernel/process.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch

RE: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-08 Thread Benjamin Herrenschmidt
too Thanks Prodyut On Thu, 2009-09-03 at 19:57 +1000, Benjamin Herrenschmidt wrote: On Thu, 2009-09-03 at 09:05 +0100, Chris Pringle wrote: Hi Adam, If you have a look in include/asm-ppc/pgtable.h for the following section: #ifdef CONFIG_44x

Re: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-10 Thread Benjamin Herrenschmidt
these to the DMA API calls as you suggest. Could you give more details on the consistency problem? It is a good idea to change to the new DMA APIs, but pci_alloc_consistent() should work too Thanks Prodyut On Thu, 2009-09-03 at 19:57 +1000, Benjamin Herrenschmidt wrote

Re: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-10 Thread Benjamin Herrenschmidt
to the new DMA APIs, but pci_alloc_consistent() should work too Thanks Prodyut On Thu, 2009-09-03 at 19:57 +1000, Benjamin Herrenschmidt wrote: On Thu, 2009-09-03 at 09:05 +0100, Chris Pringle wrote: Hi Adam, If you have a look in include/asm-ppc/pgtable.h for the following

Re: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-10 Thread Benjamin Herrenschmidt
. Could you give more details on the consistency problem? It is a good idea to change to the new DMA APIs, but pci_alloc_consistent() should work too Thanks Prodyut On Thu, 2009-09-03 at 19:57 +1000, Benjamin Herrenschmidt wrote: On Thu, 2009-09-03 at 09:05 +0100, Chris

RE: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-10 Thread Benjamin Herrenschmidt
On Thu, 2009-09-10 at 13:30 -0700, Pravin Bathija wrote: There is also a patch that was submitted for 440EPX a couple of years back. The 440EPX SOC causes hangs with Memory Read Multiple (MRM) commands. Whether MRM is used or not depends on the value of PCI_CACHE_LINE_SIZE register. I see

Re: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-10 Thread Benjamin Herrenschmidt
On Fri, 2009-09-11 at 07:12 +0200, Stefan Roese wrote: It's already there. See commit: 5ce4b59653b2c2053cd9a011918ac1e4747f24cc powerpc/4xx: Workaround for PPC440EPx/GRx PCI_28 Errata Ok, that's another way to do it. Will catch nasty drivers who try to write directly rather than clear

[PATCH] powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdline

2009-09-10 Thread Benjamin Herrenschmidt
no problem in having it directly test against DMA_ERROR_CODE instead of using the accessors with a NULL argument for now. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- arch/powerpc/platforms/iseries/mf.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch

RE: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-10 Thread Benjamin Herrenschmidt
On Thu, 2009-09-10 at 22:35 -0700, Pravin Bathija wrote: Thanks Stefan. The whole intention of the patch/hack (or whatever one might call it :) ) was to avoid rogue drivers from setting pci_cache_line_size to non-zero value even though the underlying hardware doesn't support MRM calls.

[git pull] Please pull powerpc.git next branch

2009-09-11 Thread Benjamin Herrenschmidt
): powerpc: Name xpn x fields in HW Hash PTE format Benjamin Herrenschmidt (37): powerpc: Rename exception.h to exception-64s.h powerpc: Use names rather than numbers for SPRGs (v2) powerpc: Remove use of a second scratch SPRG in STAB code powerpc/mm: Fix definitions

Re: AW: PowerPC PCI DMA issues (prefetch/coherency?)

2009-09-11 Thread Benjamin Herrenschmidt
On Fri, 2009-09-11 at 10:17 +0300, Mikhail Zolotaryov wrote: Benjamin Herrenschmidt wrote: On Wed, 2009-09-09 at 17:40 +0300, Mikhail Zolotaryov wrote: Hi Tom, In my case __dma_sync() calls flush_dcache_range() (it's due to alignment) from a tasklet - no OOPS. It uses dcbf

Re: RMO ? (in the prom_init.c)

2009-09-11 Thread Benjamin Herrenschmidt
On Fri, 2009-09-11 at 15:33 +0900, HongWoo Lee wrote: Hi ~ Can anybody tell me what the RMO is ?? in the linux kernel. (arch/powerpc/kernel/prom_init.c) Through googling and guessing, I found Read Memory Only and Relaxed Memory Order. But none of these are not properly understood in the

Re: [RFC] powerpc/irq: Add generic API for setting up cascaded IRQs

2009-09-12 Thread Benjamin Herrenschmidt
On Fri, 2009-09-11 at 23:46 -0600, Grant Likely wrote: From: Grant Likely grant.lik...@secretlab.ca prototype implementation. This probably doesn't work at all right now. Ben, I'm posting this now to get your thoughts before I go too far down this path. Looks ok. I was initially thinking

[PATCH] powerpc/pmc: Don't access lppaca on Book3E

2009-09-12 Thread Benjamin Herrenschmidt
It doesn't exist ! Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- arch/powerpc/include/asm/pmc.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/pmc.h b/arch/powerpc/include/asm/pmc.h index ccc68b5..5a9ede4 100644 --- a/arch

Re: [FTRACE] Enabling function_graph causes OOPS

2009-09-12 Thread Benjamin Herrenschmidt
On Sun, 2009-09-13 at 00:07 -0400, Steven Rostedt wrote: 982: R_PPC64_ADDR16_HIGHEST ftrace_return_to_handler 984: 60 84 00 00 ori r4,r4,0 986: R_PPC64_ADDR16_HIGHER ftrace_return_to_handler 988: 78 84 07 c6 rldicr r4,r4,32,31

Re: [FTRACE] Enabling function_graph causes OOPS

2009-09-13 Thread Benjamin Herrenschmidt
.../... Something is totally messed up here. Could it be that we don't handle R_PPC64_ADDR16_* relocs in arch/powerpc/kernel/modules/module_64.c ? Sachin, do you see a bunch of Unknown ADD relocation in your dmesg ? Ben, The thing is, this is kernel proper. This code is

Re: [2/5] Cleanup management of kmem_caches for pagetables

2009-09-13 Thread Benjamin Herrenschmidt
On Wed, 2009-09-09 at 15:59 +1000, David Gibson wrote: 6 files changed, 73 insertions(+), 108 deletions(-) That's a pretty good start :-) +struct kmem_cache *pgtable_cache[PGF_SHIFT_MASK]; + +void pgtable_cache_add(unsigned shift, void (*ctor)(void *)) +{ + char *name; + unsigned

Re: [FTRACE] Enabling function_graph causes OOPS

2009-09-14 Thread Benjamin Herrenschmidt
On Mon, 2009-09-14 at 06:25 +1000, Benjamin Herrenschmidt wrote: .../... Something is totally messed up here. Could it be that we don't handle R_PPC64_ADDR16_* relocs in arch/powerpc/kernel/modules/module_64.c ? Sachin, do you see a bunch of Unknown ADD relocation

Re: Oops in IDE probing on ppc_440 when PCI is enabled in strapping

2009-09-14 Thread Benjamin Herrenschmidt
On Mon, 2009-09-14 at 15:08 +0200, Ludo Van Put wrote: 2009/9/14 Josh Boyer jwbo...@linux.vnet.ibm.com: On Mon, Sep 14, 2009 at 02:36:15PM +0200, Ludo Van Put wrote: Hi, we're working with a PPC440GX on a board that has a.o. a compact flash slot. We had the PCI subsystem of the ppc

Re: [PATCH] powerpc: Fix bug where perf_counters breaks oprofile

2009-09-14 Thread Benjamin Herrenschmidt
On Mon, 2009-09-14 at 16:43 -0400, Josh Boyer wrote: On Mon, Sep 14, 2009 at 03:14:02PM -0500, Maynard Johnson wrote: Maynard Johnson wrote: Paul Mackerras wrote: Currently there is a bug where if you use oprofile on a pSeries machine, then use perf_counters, then use oprofile again,

[PATCH] powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE

2009-09-14 Thread Benjamin Herrenschmidt
are missing some in the case of a weak function that nobody implements, we'll see if we get false positive and fix it. Signed-off-by: Tony Breeds t...@bakeyournoodle.com Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index

Re: [git pull] Please pull powerpc.git next branch

2009-09-15 Thread Benjamin Herrenschmidt
On Fri, 2009-09-11 at 17:18 +1000, Benjamin Herrenschmidt wrote: Hi Linus ! This is the powerpc batch for 2.6.32. You will notice a bunch of generic swiotlb changes along with corresponding changes to arch/sparc and arch/x86 from Fujita Tomonori. There are due to my tree having pulled

Re: Oops in IDE probing on ppc_440 when PCI is enabled in strapping

2009-09-15 Thread Benjamin Herrenschmidt
On Tue, 2009-09-15 at 10:57 +0200, Ludo Van Put wrote: Thnx for the suggestion, but the ide_insw is in fact of copy of the _insw assembly routine, and it gets passed the effective address, without the _IO_BASE offset. I was thinking about TLB stuff. I'm not a u-boot expert, but could it be

Re: [RFC] powerpc/irq: Add generic API for setting up cascaded IRQs

2009-09-15 Thread Benjamin Herrenschmidt
I'm a reverse polish kind of guy. I preferring 'subject'_'action' over 'action'_'subject' just because it groups like subjects together. But it doesn't matter much, especially in this case where 'subject' is in a group of exactly 1. :-) I'll do whichever you prefer. I just caught

Re: [PATCH] [SCSI] mpt fusion: Fix 32 bit platforms with 64 bit resources

2009-09-15 Thread Benjamin Herrenschmidt
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 5d496a9..d5b0f15 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -1510,11 +1510,12 @@ static int mpt_mapresources(MPT_ADAPTER *ioc) { u8

Re: RFC: delete UART current-speed from 4xx DTS?

2009-09-15 Thread Benjamin Herrenschmidt
On Tue, 2009-09-15 at 11:32 -0400, Josh Boyer wrote: On Tue, Sep 15, 2009 at 10:31:36AM -0400, Paul Gortmaker wrote: One of the guys here was getting a messed up console on a bamboo board (on linux boot), which he traced to the fact that the default dts has a 9600 baudrate coded into it (board

Re: [git pull] Please pull powerpc.git next branch

2009-09-15 Thread Benjamin Herrenschmidt
On Tue, 2009-09-15 at 09:53 -0700, Linus Torvalds wrote: It got a conflict with the AGP merge, but I fixed it up in what _seemed_ to be the obvious manner. But somebody should check out the resulting drivers/char/agp/uninorth-agp.c file. Thanks. Michel, can you dbl check it ? Cheers, Ben.

Re: RFC: delete UART current-speed from 4xx DTS?

2009-09-16 Thread Benjamin Herrenschmidt
Ok, so I think that is related to what I originally hit. I played around with removing the current-speed property on canyonlands today, and noticed that I would get no console output at all unless I specified a baudrate with console=ttyS0,115200. That was sort of contrary to what I found

Re: PPC PCI bus registers

2009-09-16 Thread Benjamin Herrenschmidt
On Wed, 2009-09-16 at 11:58 -0700, Eddie Dawydiuk wrote: I'm not sure I understand. To clarify I have an FPGA connected via the PCI bus which implements several peripherals, I've implemented device drivers for. Currently I am calling ioremap() to get a virtual address corresponding to the

Re: PPC PCI bus registers

2009-09-16 Thread Benjamin Herrenschmidt
On Wed, 2009-09-16 at 15:11 -0700, Eddie Dawydiuk wrote: Benjamin, Out of order execution != out of order storage. ioremap() will give you guarded space which means it cannot be speculatively accessed for example, and you do get -some- guarantees but not that your stores are going to

Re: FPGA access over PCI-E on MPC8536

2009-09-17 Thread Benjamin Herrenschmidt
However when I attempt to access FPGA memory my mmapping it in userspace the read hangs. The same happens in kernel space. Does it happen because FPGA memory is marked as disabled, or because FPGA code is doing something wrong ? Can you access the device in u-boot? That would

Re: 2.6.31-git5 kernel boot hangs on powerpc

2009-09-17 Thread Benjamin Herrenschmidt
On Thu, 2009-09-17 at 16:21 +0530, Sachin Sant wrote: The problem seems to have been introduced with commit ada3fa15057205b7d3f727bba5cd26b5912e350f. Specifically this patch : powerpc64: convert to dynamic percpu allocator If i revert this patch i am able to boot latest git on a powerpc

Re: [PATCH] fix ppc64 build failure on fedora

2009-09-17 Thread Benjamin Herrenschmidt
On Thu, 2009-09-17 at 13:41 -0400, Kyle McMartin wrote: From: Kyle McMartin k...@redhat.com For some reason or another (newer gcc?) on Fedora 12 koji builders we're seeing _restgpr0_$n symbols instead of _restgpr_$n as handled in the prom_init_check.sh file: Checking prom_init.o symbol

Re: [PATCH 1/2] powerpc: rename get_dma_direct_offset get_dma_offset

2009-09-20 Thread Benjamin Herrenschmidt
On Wed, 2009-09-02 at 17:23 -0500, Becky Bruce wrote: #ifdef CONFIG_NOT_COHERENT_CACHE /* @@ -90,6 +89,14 @@ static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) dev-archdata.dma_ops = ops; } +static inline unsigned long get_dma_offset(struct device

Re: [PATCH 2/2] powerpc: Change archdata dma_data to a union

2009-09-20 Thread Benjamin Herrenschmidt
On Wed, 2009-09-02 at 17:23 -0500, Becky Bruce wrote: Sometimes this is used to hold a simple offset, and sometimes it is used to hold a pointer. This patch changes it to a union containing void * and dma_addr_t. get/set accessors are also provided, because it was getting a bit ugly to get

Re: Linux booting issue on powerpc 440x5

2009-09-21 Thread Benjamin Herrenschmidt
On Fri, 2009-09-18 at 09:31 +, Sumesh Kaana wrote: Hi, I am trying to boot linux kernel (2.6.30) on PPC440x5 processor in a custom built board. I am using simple ppc platform. I have a small bootloader which will only copy the simpleImage.myboard.bin to 0x40 location of my

Re: [PATCH] [V1] USB: Add support for Xilinx USB host controller

2009-09-21 Thread Benjamin Herrenschmidt
On Mon, 2009-09-21 at 13:38 -0600, Julie Zhu wrote: + iounmap(hcd-regs); +err_ioremap: + irq_dispose_mapping(irq); You missed that one too :-) I'm actually considering making irq_dispose_mapping() a private API and rename it to something like __irq_dispose_mapping() :-) I think the

Re: [PATCH 1/2] ibm_newemac: Add Support for MAL Interrupt Coalescing

2009-09-21 Thread Benjamin Herrenschmidt
On Mon, 2009-09-21 at 15:47 -0700, Prodyut Hazarika wrote: Support for Hardware Interrupt coalescing in MAL. Coalescing is supported on the newer revs of 460EX/GT and 405EX. The MAL driver falls back to EOB IRQ if coalescing not supported Signed-off-by: Prodyut Hazarika phazar...@amcc.com

RE: [PATCH 1/2] ibm_newemac: Add Support for MAL Interrupt Coalescing

2009-09-21 Thread Benjamin Herrenschmidt
On Mon, 2009-09-21 at 16:49 -0700, Prodyut Hazarika wrote: Hi Ben, Thanks for your comments. What happens if we build a kernel that is supposed to boot with two different variants of 405 or 440 ? We cannot build a kernel with H/W Interrupt coalescing other than in 405EX/460EX/GT.

RE: [PATCH 1/2] ibm_newemac: Add Support for MAL Interrupt Coalescing

2009-09-21 Thread Benjamin Herrenschmidt
On Mon, 2009-09-21 at 17:05 -0700, Prodyut Hazarika wrote: Hi Ben, Thanks again for your comments. Same goes with the SDR register definitions. Prefix them with the SOC name but don't make them conditionally compiled. I will add the base address in the Device tree, and make all register

Re: [LTP] mmapstress03 weirdness? (fwd)

2009-09-21 Thread Benjamin Herrenschmidt
On Mon, 2009-09-21 at 15:40 +0200, Geert Uytterhoeven wrote: With 32-bit userland, this boils down to: | mmap addr 0x7fff size 0x7fff | mmap returned 0x7fff i.e. mmap() succeeds, but (1) the test expects it to fail, so the test returns TFAIL, but (2) ltp-pan still reports

Re: [PATCH 1/2] ibm_newemac: Add Support for MAL Interrupt Coalescing

2009-09-21 Thread Benjamin Herrenschmidt
On Mon, 2009-09-21 at 17:28 -0700, prodyut hazarika wrote: BTW. If you guys are ever going to do another change to MAL, please please plase, add the -one- major missing feature that's causing all the pain and complication in the current design: Add a per-channel interrupt masking option.

RE: [PATCH 1/2] ibm_newemac: Add Support for MAL Interrupt Coalescing

2009-09-21 Thread Benjamin Herrenschmidt
On Mon, 2009-09-21 at 17:53 -0700, Prodyut Hazarika wrote: In the newer revs of 460EX/GT and 405EX, we have Interrupt coalescing both on Tx and Rx per channel (physical not virtual), which can be enabled/disabled per channel via UIC. The Tx/Rx Coalesce mappings are defined in the dts file.

Re: [PATCH] perf_event, powerpc: Fix compilation after big perf_counter rename

2009-09-21 Thread Benjamin Herrenschmidt
On Tue, 2009-09-22 at 09:48 +1000, Paul Mackerras wrote: This fixes two places in the powerpc perf_event (perf_counter) code where 'list_entry' needs to be changed to 'group_entry', but were missed in commit 65abc865 (perf_counter: Rename list_entry - group_entry, counter_list - group_list).

Re: MPC8536 PCI rescan to discover FPGA

2009-09-22 Thread Benjamin Herrenschmidt
On Mon, 2009-09-21 at 09:04 -0700, David Hawkins wrote: This can be made to work using the kernel hot-swap interface. PCI devices have an ENUM# interrupt that they assert when inserted or extracted, and the host hot-swap driver can be hooked up to it. PCI-E may have a similar mechanism, if it

Re: [PATCH] perf_event, powerpc: Fix compilation after big perf_counter rename

2009-09-22 Thread Benjamin Herrenschmidt
On Tue, 2009-09-22 at 09:28 +0200, Ingo Molnar wrote: Nevertheless you are right that i should have caught this particular PowerPC build bug - i missed it - sorry about that! Allright. Well, to help in general, we are setting up a build-bot here too that will build -tip HEAD for at least

Re: [PATCH] Re: [405EX] Bad page map in process ...

2009-09-22 Thread Benjamin Herrenschmidt
On Tue, 2009-09-22 at 11:29 +0200, Weirich, Bernhard wrote: Hello, I found the cause of the problem. My architecture does not define the _PAGE_SPECIAL macro, thus in pte-common.h line 32, it is defined as 0 And then in line 180, since _PAGE_SPECIAL is defined, the macro

Re: [PATCH] Re: [405EX] Bad page map in process ...

2009-09-22 Thread Benjamin Herrenschmidt
On Tue, 2009-09-22 at 20:07 +1000, Benjamin Herrenschmidt wrote: On Tue, 2009-09-22 at 11:29 +0200, Weirich, Bernhard wrote: Hello, I found the cause of the problem. My architecture does not define the _PAGE_SPECIAL macro, thus in pte-common.h line 32, it is defined as 0

Re: powerpc: Move 64bit heap above 1TB on machines with 1TB segments

2009-09-22 Thread Benjamin Herrenschmidt
Unfortunately, I am not sensitive to issues surrounding 1TB segments or how they are currently being used. However, as this clearly helps performance for large amounts of memory, is it worth providing an option to libhugetlbfs to locate 16MB pages above 1TB when they are otherwise being

[PATCH] powerpc/mm: Fix 40x and 8xx vs. _PAGE_SPECIAL

2009-09-22 Thread Benjamin Herrenschmidt
the condition around advertising it. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- Bernhard, Rex, please let me know if that works for you. diff --git a/arch/powerpc/include/asm/pte-40x.h b/arch/powerpc/include/asm/pte-40x.h index 6c3e1f4..ec0b0b0 100644 --- a/arch/powerpc/include/asm

Re: [PATCH 2/2] powerpc/44x: Fix xmon single step on PowerPC 44x

2009-09-23 Thread Benjamin Herrenschmidt
On Wed, 2009-09-23 at 09:51 -0400, Josh Boyer wrote: Prior to the arch/ppc - arch/powerpc transition, xmon had support for single stepping on 4xx boards. The functionality was lost when arch/ppc was removed. This patch restores single step support for 44x boards. Signed-off-by: Josh Boyer

Re: linux booting fails on ppc440x5 with SRAM

2009-09-23 Thread Benjamin Herrenschmidt
On Wed, 2009-09-23 at 20:19 +0530, Vineeth _ wrote: I am trying to port linux on IBM powerpc-440x5. I have this board which has this processor, a 16MB SRAM sits on location 0x0, uart and a flash.I have a simple bootloader which does the following. 1. Initialize the processor (as part of

Re: [PATCH 2/2] powerpc/44x: Fix xmon single step on PowerPC 44x

2009-09-23 Thread Benjamin Herrenschmidt
On Wed, 2009-09-23 at 18:35 -0400, Josh Boyer wrote: Any reason why that couldn't be in CONFIG_BOOKE ? Off the top of my head, no. I haven't tested on 40x yet though. Will try and do that and revise. Does 40x have CONFIG_BOOKE ? I was thinking more about FSL etc... but yeah, 40x is worth

Re: [PATCH v2 0/2] cpu: pseries: Offline state framework.

2009-09-23 Thread Benjamin Herrenschmidt
On Wed, 2009-09-02 at 07:33 +0200, Peter Zijlstra wrote: I'm still thinking this is a bad idea. The OS should only know about online/offline. Use the hypervisor interface to deal with the cpu once its offline. That is, I think this interface you propose is a layering violation. I

  1   2   3   4   5   6   7   8   9   10   >