Re: 2.6.24-rc8-mm1 Kernel oops will running kernbench
Hi Andrew, Following oops was seen while running kernbench on one of test machine (power4+ box). I tried reproducing the oops but was unsuccessful. I will try to reproduce the oops with debug info compiled. Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=32 NUMA pSeries Modules linked in: NIP: 4570 LR: 0fc42dc0 CTR: REGS: c0077b6bf8c0 TRAP: 0300 Not tainted (2.6.24-rc8-mm1-autotest) MSR: 80001000 ME CR: 28022422 XER: DAR: c0077b6bfce0, DSISR: 0a00 TASK = c00773164c40[19588] 'as' THREAD: c0077b6bc000 CPU: 1 GPR00: 4000 c0077b6bfb40 7346 d032 GPR04: 043a 000c 0004 GPR08: 0fd278c8 48022424 c0077b6bfe30 998be2321500 GPR12: 80001030 c05f6280 1003 1003 GPR16: 1003 1005 1006aac0 10053cd0 GPR20: 0fe0 1005 1005 GPR24: 0ff8 0fe8 0062 0fd27490 GPR28: 0fd274c8 10099420 0fd25ff4 1009a400 NIP [4570] 0x4570 LR [0fc42dc0] 0xfc42dc0 Call Trace: [c0077b6bfb40] [c0077b292000] 0xc0077b292000 (unreliable) Instruction dump: 4800 41820008 4810 f92101a0 -- Thanks Regards, Kamalesh Babulal, Linux Technology Center, IBM, ISTL. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: 2.6.24-rc8-mm1 Kernel oops will running kernbench
Andrew Morton writes: On Fri, 18 Jan 2008 14:06:00 +0530 Kamalesh Babulal [EMAIL PROTECTED] wrote: Hi Andrew, Following oops was seen while running kernbench on one of test machine (power4+ box). I tried reproducing the oops but was unsuccessful. I will try to reproduce the oops with debug info compiled. Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=32 NUMA pSeries Modules linked in: NIP: 4570 LR: 0fc42dc0 CTR: REGS: c0077b6bf8c0 TRAP: 0300 Not tainted (2.6.24-rc8-mm1-autotest) MSR: 80001000 ME CR: 28022422 XER: DAR: c0077b6bfce0, DSISR: 0a00 TASK = c00773164c40[19588] 'as' THREAD: c0077b6bc000 CPU: 1 GPR00: 4000 c0077b6bfb40 7346 d032 GPR04: 043a 000c 0004 GPR08: 0fd278c8 48022424 c0077b6bfe30 998be2321500 GPR12: 80001030 c05f6280 1003 1003 GPR16: 1003 1005 1006aac0 10053cd0 GPR20: 0fe0 1005 1005 GPR24: 0ff8 0fe8 0062 0fd27490 GPR28: 0fd274c8 10099420 0fd25ff4 1009a400 NIP [4570] 0x4570 LR [0fc42dc0] 0xfc42dc0 Call Trace: [c0077b6bfb40] [c0077b292000] 0xc0077b292000 (unreliable) Instruction dump: 4800 41820008 4810 f92101a0 odd. Where did the stack trace go? It's there, it's just really really short (one line). The link register is in userspace and the stack pointer looks to be right at the top of a kernel stack area. The trap was a data access exception which is very odd given that the machine is in real mode (MMU off) with the pc at 0x4570. Actually it looks like the machine probably got a data access exception somewhere (probably in userspace, probably a page fault or similar) and then got another exception before it had finished saving the state from the first exception. Kamalesh, do you still have the vmlinux? If so could you disassemble the area from say 0x4500 to 0x4600, and find out what is the closest symbol before 0xc0004570 from System.map, and show us those? Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] add modalias info to mv643xx_eth.ko
mv643xx_eth has an platform modalias file in sysfs. But the module itself has no alias: line. Autoloading fails without the alias info in the module. Signed-off-by: Olaf Hering [EMAIL PROTECTED] --- drivers/net/mv643xx_eth.c |1 + 1 file changed, 1 insertion(+) --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -2099,6 +2099,7 @@ MODULE_LICENSE(GPL); MODULE_AUTHOR( Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani and Dale Farnsworth); MODULE_DESCRIPTION(Ethernet driver for Marvell MV643XX); +MODULE_ALIAS(platform:mv643xx_eth); /* * The second part is the low level driver of the gigE ethernet ports. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: 2.6.24-rc8-mm1 Kernel oops will running kernbench
Paul Mackerras wrote: Andrew Morton writes: On Fri, 18 Jan 2008 14:06:00 +0530 Kamalesh Babulal [EMAIL PROTECTED] wrote: Hi Andrew, Following oops was seen while running kernbench on one of test machine (power4+ box). I tried reproducing the oops but was unsuccessful. I will try to reproduce the oops with debug info compiled. Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=32 NUMA pSeries Modules linked in: NIP: 4570 LR: 0fc42dc0 CTR: REGS: c0077b6bf8c0 TRAP: 0300 Not tainted (2.6.24-rc8-mm1-autotest) MSR: 80001000 ME CR: 28022422 XER: DAR: c0077b6bfce0, DSISR: 0a00 TASK = c00773164c40[19588] 'as' THREAD: c0077b6bc000 CPU: 1 GPR00: 4000 c0077b6bfb40 7346 d032 GPR04: 043a 000c 0004 GPR08: 0fd278c8 48022424 c0077b6bfe30 998be2321500 GPR12: 80001030 c05f6280 1003 1003 GPR16: 1003 1005 1006aac0 10053cd0 GPR20: 0fe0 1005 1005 GPR24: 0ff8 0fe8 0062 0fd27490 GPR28: 0fd274c8 10099420 0fd25ff4 1009a400 NIP [4570] 0x4570 LR [0fc42dc0] 0xfc42dc0 Call Trace: [c0077b6bfb40] [c0077b292000] 0xc0077b292000 (unreliable) Instruction dump: 4800 41820008 4810 f92101a0 odd. Where did the stack trace go? Only this much was captured in the serial console. It's there, it's just really really short (one line). The link register is in userspace and the stack pointer looks to be right at the top of a kernel stack area. The trap was a data access exception which is very odd given that the machine is in real mode (MMU off) with the pc at 0x4570. Actually it looks like the machine probably got a data access exception somewhere (probably in userspace, probably a page fault or similar) and then got another exception before it had finished saving the state from the first exception. Kamalesh, do you still have the vmlinux? If so could you disassemble the area from say 0x4500 to 0x4600, and find out what is the closest symbol before 0xc0004570 from System.map, and show us those? Paul. -- I tried reproducing the problem and was successful with following trace in which the pc is at 0x4570 as the above one Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=32 NUMA pSeries Modules linked in: NIP: 4570 LR: 0ff0288c CTR: 0ff013e0 REGS: c0077e61f8c0 TRAP: 0300 Not tainted (2.6.24-rc8-mm1-autotest) MSR: 80001000 ME CR: 28000422 XER: DAR: c0077e61fce0, DSISR: 0a00 TASK = c0077207f880[23480] 'cc1' THREAD: c0077e61c000 CPU: 3 GPR00: 4000 c0077e61fb40 0088 d032 GPR04: 0088 030c fefefeff 7f7f7f7f GPR08: 8000 44000428 c0077e61fe30 998be2321500 GPR12: 80001030 c05f6680 1003 1003 GPR16: 105b 105b 1044 105b GPR20: 105b 105b 105b 105b GPR24: 105b 105b 105b ffa11b24 GPR28: 0ffebff4 0ffec408 NIP [4570] 0x4570 LR [0ff0288c] 0xff0288c Call Trace: [c0077e61fb40] [c0077e61fcf0] 0xc0077e61fcf0 (unreliable) [c0077e61fbd0] [1044] 0x1044 Instruction dump: 4800 41820008 4810 f92101a0 The disassembled vmlinux from 0x4500 to 0x4600 c0004500: f9 4d 01 68 std r10,360(r13) c0004504: 48 02 89 f9 bl c002cefc .slb_allocate_realmode c0004508: e9 4d 01 68 ld r10,360(r13) c000450c: e8 6d 01 60 ld r3,352(r13) c0004510: 81 2d 01 5c lwz r9,348(r13) c0004514: 7d 48 03 a6 mtlrr10 c0004518: 71 8a 00 02 andi. r10,r12,2 c000451c: 41 82 00 28 beq-c0004544 unrecov_slb c0004520: 7d 38 01 20 mtocrf 128,r9 c0004524: 7d 30 11 20 mtocrf 1,r9 c0004528: e9 2d 01 20 ld r9,288(r13) c000452c: e9 4d 01 28 ld r10,296(r13) c0004530: e9 6d 01 30 ld r11,304(r13) c0004534: e9 8d 01 38 ld r12,312(r13) c0004538: e9 ad 01 40 ld
Re: 2.6.24-rc8-mm1 Kernel oops will running kernbench
Kamalesh Babulal writes: NIP: 4570 LR: 0fc42dc0 CTR: REGS: c0077b6bf8c0 TRAP: 0300 Not tainted (2.6.24-rc8-mm1-autotest) MSR: 80001000 ME CR: 28022422 XER: DAR: c0077b6bfce0, DSISR: 0a00 Actually, how much RAM does this machine have? If it has less than 32GB, then the problem is that the kernel stack pointer is bogus. (How it got to be bogus is the interesting question, of course. :) Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)
* Michael Ellerman [EMAIL PROTECTED] [2008-01-18 16:44:58]: On Fri, 2008-01-18 at 16:34 +1100, Michael Ellerman wrote: On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: Changelog 1. Get rid of the constant 5 (based on comments from [EMAIL PROTECTED]) 2. Implement suggestions from Olof Johannson 3. Check if cmdline is NULL in fake_numa_create_new_node() Tested with additional parameters from Olof numa=debug,fake= numa=foo,fake=bar I'm not sure why yet, but git bisect tells me it's this patch that's causing the for-2.6.25 tree to explode on boot on cell machines. This fixes it, although I'm a little worried about some of the removals/movings of node_set_online() in the patch. diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 1666e7d..dcedc26 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -49,7 +49,6 @@ static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn, static unsigned int fake_nid = 0; static unsigned long long curr_boundary = 0; - *nid = fake_nid; if (!p) return 0; @@ -60,6 +59,7 @@ static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn, if (mem curr_boundary) return 0; + *nid = fake_nid; curr_boundary = mem; if ((end_pfn PAGE_SHIFT) mem) { This patch makes sense, ideally fake_numa_create_new_node() should just be a no-op in the case of machines with real NUMA nodes. -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)
* Michael Ellerman [EMAIL PROTECTED] [2008-01-18 16:55:03]: On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake NUMA nodes can be specified using the following command line option Comments are as always welcome! Here's some :) Thanks! diff -puN arch/powerpc/mm/numa.c~ppc-fake-numa-easy arch/powerpc/mm/numa.c --- linux-2.6.24-rc4-mm1/arch/powerpc/mm/numa.c~ppc-fake-numa-easy 2007-12-07 21:25:55.0 +0530 +++ linux-2.6.24-rc4-mm1-balbir/arch/powerpc/mm/numa.c 2007-12-08 03:19:46.0 +0530 @@ -24,6 +24,8 @@ static int numa_enabled = 1; +static char *cmdline __initdata; Can you call this fake_numa_args or something, cmdline is a bit generic. I could if it makes code easier to understand. Will put it in my TODO list. @@ -39,6 +41,43 @@ static bootmem_data_t __initdata plat_no static int min_common_depth; static int n_mem_addr_cells, n_mem_size_cells; +static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn, + unsigned int *nid) +{ + unsigned long long mem; + char *p = cmdline; + static unsigned int fake_nid = 0; + static unsigned long long curr_boundary = 0; + + *nid = fake_nid; As I mentioned in my other email I think this is broken, you unconditionally overwrite *nid, even if no fake numa was specified? Aah.. OK.. looks like a BUG. I'll also respond to your other email. + if (!p) + return 0; + + mem = memparse(p, p); + if (!mem) + return 0; + + if (mem curr_boundary) + return 0; + + curr_boundary = mem; + + if ((end_pfn PAGE_SHIFT) mem) { + /* +* Skip commas and spaces +*/ + while (*p == ',' || *p == ' ' || *p == '\t') + p++; + + cmdline = p; + fake_nid++; + *nid = fake_nid; + dbg(created new fake_node with id %d\n, fake_nid); + return 1; + } + return 0; +} + static void __cpuinit map_cpu_to_node(int cpu, int node) { numa_cpu_lookup_table[cpu] = node; @@ -344,12 +383,14 @@ static void __init parse_drconf_memory(s if (nid == 0x || nid = MAX_NUMNODES) nid = default_nid; } - node_set_online(nid); size = numa_enforce_memory_limit(start, lmb_size); if (!size) continue; + fake_numa_create_new_node(((start + size) PAGE_SHIFT), nid); + node_set_online(nid); I can't convince myself that this is 100% ok, the moving of node_set_online(). At the very least it's a change in behaviour, previously we would online the node regardless of the memory limit. Hmm.. this can be reverted, but do we gain anything by enabling nodes, even though we are over the memory limit? add_active_range(nid, start PAGE_SHIFT, (start PAGE_SHIFT) + (size PAGE_SHIFT)); } @@ -429,7 +470,6 @@ new_range: nid = of_node_to_nid_single(memory); if (nid 0) nid = default_nid; - node_set_online(nid); if (!(size = numa_enforce_memory_limit(start, size))) { if (--ranges) @@ -438,6 +478,9 @@ new_range: continue; } + fake_numa_create_new_node(((start + size) PAGE_SHIFT), nid); + node_set_online(nid); Ditto previous comment. Yes, point noted. Thanks for your review and problem report. cheers -- Michael Ellerman OzLabs, IBM Australia Development Lab wwweb: http://michael.ellerman.id.au phone: +61 2 6212 1183 (tie line 70 21183) We do not inherit the earth from our ancestors, we borrow it from our children. - S.M.A.R.T Person -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [PATCH 0/3] UCC TDM driver for MPC83xx platforms
Hello All The TDM driver just now does not have a proper framework. Probably the interface cannot be generalised as such. Hence we could not decide whether it would be right to think of a TDM framework. Infact the interface this TDM driver(for MPC8323ERDB) supplies may not be usable for some other client as such. Please suggest on this. But you are right as far as Freescale PowerPC platforms are concerned which have TDM devices. Like, 8315 also has a TDM driver which also exposes similar interface as 8323 because the client it is talking to is the same. Following is the small description of the TDM driver along with interface details: The dts file keeps a track of the TDM devices present on the board. Depending on them the TDM driver initializes those many driver instances while coming up. The driver on the upper level can plug to more than one tdm clients depending on the availablity of TDM devices. At every new request of the TDM client to bind with a TDM device, a free driver instance is allocated to the client. The interface can be described as follows. tdm_register_client(struct tdm_client *) This API returns a pointer to the structure tdm_client which is of type struct tdm_client { u32 driver_handle; u32 (*tdm_read)(u32 driver_handle, short chn_id, short *pcm_buffer, short len); u32 (*tdm_write)(u32 driver_handle, short chn_id, short *pcm_buffer, short len); wait_queue_head_t *wakeup_event; } It consists of: - driver_handle: It is basically to identify the particular TDM device/driver instance. - tdm_read: It is a function pointer returned by the TDM driver to be used to read TDM data form a particular TDM channel. - tdm_write: It is a function pointer returned by the TDM driver to be used to write TDM data to a particular TDM channel. - wakeup_event: It is address of a wait_queue event on which the client keeps on sleeping, and the TDM driver wakes it up periodically. The driver is configured to wake up the client after every 10ms. Once the TDM client gets registered to a TDM driver instance and a TDM device, it interfaces with the driver using tdm_read, tdm_write and wakeup_event. Note: The TDM driver can be used by only kernel level modules. The driver does not expose any file interface for User Applications. Can be compared to the spi driver which interfaces with the SPI clients through some APIs. I need your feedback on the interface details. Some changes were suggested by Andrew for 32 bit tdm handle which I will modify.(Thanks Andrew) Please give your ideas about a TDM framework in the kernel and the interface. Waiting for your feedback. Thanks and Regards Poonam -Original Message- From: Kumar Gala [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 15, 2008 9:01 AM To: Andrew Morton Cc: Phillips Kim; Aggrwal Poonam; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; Barkowski Michael; Kalra Ashish; Cutler Richard Subject: Re: [PATCH 0/3] UCC TDM driver for MPC83xx platforms On Jan 14, 2008, at 3:15 PM, Andrew Morton wrote: On Mon, 14 Jan 2008 12:00:51 -0600 Kim Phillips [EMAIL PROTECTED] wrote: On Thu, 10 Jan 2008 21:41:20 -0700 Aggrwal Poonam [EMAIL PROTECTED] wrote: Hello All I am waiting for more feedback on the patches. If there are no objections please consider them for 2.6.25. if this isn't going to go through Alessandro Rubini/misc drivers, can it go through the akpm/mm tree? That would work. But it might be more appropriate to go Kumar- paulus-Linus. I'm ok w/taking the arch/powerpc bits, but Im a bit concerned about the driver itself. I'm wondering if we need a TDM framework in the kernel. I guess if Poonam could possibly describe how this driver is actually used that would be helpful. I see we have 8315 with a discrete TDM block and I'm guessing 82xx/85xx based CPM parts of some form of TDM as well. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)
* Michael Ellerman [EMAIL PROTECTED] [2008-01-18 16:34:53]: On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: Changelog 1. Get rid of the constant 5 (based on comments from [EMAIL PROTECTED]) 2. Implement suggestions from Olof Johannson 3. Check if cmdline is NULL in fake_numa_create_new_node() Tested with additional parameters from Olof numa=debug,fake= numa=foo,fake=bar I'm not sure why yet, but git bisect tells me it's this patch that's causing the for-2.6.25 tree to explode on boot on cell machines. Hi, Do you boot with numa=options on your machine? Could I have your machine configuration? Any OOPS/log would be helpful. -- Warm Regards, Balbir Singh Linux Technology Center IBM, ISTL ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: 2.6.24-rc8-mm1 Kernel oops will running kernbench
Paul Mackerras wrote: Kamalesh Babulal writes: NIP: 4570 LR: 0fc42dc0 CTR: REGS: c0077b6bf8c0 TRAP: 0300 Not tainted (2.6.24-rc8-mm1-autotest) MSR: 80001000 ME CR: 28022422 XER: DAR: c0077b6bfce0, DSISR: 0a00 Actually, how much RAM does this machine have? If it has less than 32GB, then the problem is that the kernel stack pointer is bogus. (How it got to be bogus is the interesting question, of course. :) Paul. Hi Paul, The machine has around 30GB of RAM, do you want me to try, by taking the git-powerpc.patch out of the series and try reproducing the oops. -- Thanks Regards, Kamalesh Babulal, Linux Technology Center, IBM, ISTL. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [PATCH 0/3] UCC TDM driver for MPC83xx platforms
On Fri, 2008-01-18 at 17:28 +0530, Aggrwal Poonam wrote: Hello All The TDM driver just now does not have a proper framework. Probably the interface cannot be generalised as such. Hence we could not decide whether it would be right to think of a TDM framework. Infact the interface this TDM driver(for MPC8323ERDB) supplies may not be usable for some other client as such. Please suggest on this. But you are right as far as Freescale PowerPC platforms are concerned which have TDM devices. Like, 8315 also has a TDM driver which also exposes similar interface as 8323 because the client it is talking to is the same. Following is the small description of the TDM driver along with interface details: The dts file keeps a track of the TDM devices present on the board. Depending on them the TDM driver initializes those many driver instances while coming up. The driver on the upper level can plug to more than one tdm clients depending on the availablity of TDM devices. At every new request of the TDM client to bind with a TDM device, a free driver instance is allocated to the client. The interface can be described as follows. tdm_register_client(struct tdm_client *) This API returns a pointer to the structure tdm_client which is of type struct tdm_client { u32 driver_handle; u32 (*tdm_read)(u32 driver_handle, short chn_id, short *pcm_buffer, short len); u32 (*tdm_write)(u32 driver_handle, short chn_id, short *pcm_buffer, short len); wait_queue_head_t *wakeup_event; } It consists of: - driver_handle: It is basically to identify the particular TDM device/driver instance. - tdm_read: It is a function pointer returned by the TDM driver to be used to read TDM data form a particular TDM channel. - tdm_write: It is a function pointer returned by the TDM driver to be used to write TDM data to a particular TDM channel. - wakeup_event: It is address of a wait_queue event on which the client keeps on sleeping, and the TDM driver wakes it up periodically. The driver is configured to wake up the client after every 10ms. Once the TDM client gets registered to a TDM driver instance and a TDM device, it interfaces with the driver using tdm_read, tdm_write and wakeup_event. Note: The TDM driver can be used by only kernel level modules. The driver does not expose any file interface for User Applications. Can be compared to the spi driver which interfaces with the SPI clients through some APIs. I need your feedback on the interface details. Some changes were suggested by Andrew for 32 bit tdm handle which I will modify.(Thanks Andrew) Please give your ideas about a TDM framework in the kernel and the interface. Waiting for your feedback. Thanks and Regards Poonam Hi Poonam I may have to write a HDLC over QMC driver for 832x in the near future. Although I haven't looked at much at the UCCs programming i/f I noticed that QMC is supposed to run over TDM. Is your TDM driver suitable for hooking up such a driver on top? Jocke ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [alsa-devel] [PATCH v3] [POWERPC] Update MPC8610 HPCD to support audio drivers
On Jan 18, 2008, at 8:48 AM, Timur Tabi wrote: Kumar Gala wrote: Can you respin this. It doesn't apply cleanly to my tree. Ok, but I have a feeling that the merge between alsa-git and powerpc- git is going to be ugly. Really, it would seem ok in that the powerpc stuff is only touch files under arch/powerpc. So as long as the alsa is only touching files in drivers/ I think we'll be ok. 8610 my bitch a bit until the two exist in one place. My merge conflict was because of updates/changes to booting-without- of.txt - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/2] mpc82xx: Embedded Planet EP8248E support
On Fri, Jan 18, 2008 at 12:07:07PM +0100, Sergej Stepanov wrote: + /* Serial port/SCC1 */ + scc1: [EMAIL PROTECTED] { + device_type = serial; + compatible = fsl,mpc8248-scc-uart, +fsl,cpm2-scc-uart; + reg = 0x11a00 0x20 0x8000 0x100; + interrupts = 40 8; are you sure with 40 as interrupt? has not it be 28(hex) here? This is a version 1 dts file -- the default base is decimal. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: 2.6.24-rc8-mm1 Kernel oops will running kernbench
Paul Mackerras writes: Kamalesh Babulal writes: I tried reproducing the problem and was successful with following trace in which the pc is at 0x4570 as the above one What did you do to trigger it? c0004544 unrecov_slb: c0004544: 71 8a 40 00 andi. r10,r12,16384 c0004548: 7c 2a 0b 78 mr r10,r1 c000454c: 38 21 fd 10 addir1,r1,-752 c0004550: 41 82 00 08 beq-c0004558 unrecov_slb+0x14 c0004554: e8 2d 01 a8 ld r1,424(r13) c0004558: 2c a1 00 00 cmpdi cr1,r1,0 c000455c: 40 84 00 08 bge-cr1,c0004564 unrecov_slb+0x20 c0004560: 48 00 00 10 b c0004570 unrecov_slb+0x2c c0004564: 38 20 41 00 li r1,16640 c0004568: b0 2d 01 c8 sth r1,456(r13) c000456c: 4b ff fb 18 b c0004084 bad_stack c0004570: f9 21 01 a0 std r9,416(r1) So it's in the code that gets called on an unrecoverable SLB fault. That's bad, we should never get those. Does this happen with mainline too, or only with -rc8-mm1? I don't understand why we should start seeing this problem unless something has changed in arch/powerpc/kernel or arch/powerpc/mm (well I suppose a bug somewhere else could cause memory corruption which might be able to lead to this). The reason we get the fault here instead of a nice oops is that unrecov_slb is supposed to be called after the switch to virtual mode, but no code was added when the real mode slb handling was added. However, its not simply adding code, as iSeries calls the same slb reload code in virtual mode (as it always runs virtual), so the code will have to check if translation is already on. (I had found this in a previous audit, but as Paul said, its not supposed to happen, and I haven't pursued a patch). Does it still happen if you take git-powerpc.patch out of the series? Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 6/7] [POWERPC] Get rid of conditional includes of board specific setup
Directly include mpc885ads.h from mpc885ads_setup.c. Now we can get rid of the arch dependent includes in mpc8xx.h. Signed-off-by: Jochen Friedrich [EMAIL PROTECTED] --- arch/powerpc/platforms/8xx/mpc885ads_setup.c |2 + include/asm-powerpc/mpc8xx.h | 29 - 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c index ae69e93..426b897 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c @@ -40,6 +40,8 @@ #include asm/fs_pd.h #include asm/udbg.h +#include mpc885ads.h + static u32 __iomem *bcsr, *bcsr5; #ifdef CONFIG_PCMCIA_M8XX diff --git a/include/asm-powerpc/mpc8xx.h b/include/asm-powerpc/mpc8xx.h index 2af9fcb..afdb89f 100644 --- a/include/asm-powerpc/mpc8xx.h +++ b/include/asm-powerpc/mpc8xx.h @@ -1,14 +1,16 @@ -/* This is the single file included by all MPC8xx build options. - * Since there are many different boards and no standard configuration, - * we have a unique include file for each. Rather than change every - * file that has to include MPC8xx configuration, they all include - * this one and the configuration switching is done here. +/* + * Prototypes, etc. for the Freescale MPC8xx embedded cpu chips + * May need to be cleaned as the port goes on ... + * + * Copyright (C) 2008 Jochen Friedrich [EMAIL PROTECTED] + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed as is without any warranty of any + * kind, whether express or implied. */ -#ifdef __KERNEL__ #ifndef __CONFIG_8xx_DEFS #define __CONFIG_8xx_DEFS - #ifdef CONFIG_8xx extern void mpc8xx_restart(char *cmd); @@ -18,22 +20,9 @@ extern void mpc8xx_get_rtc_time(struct rtc_time *tm); extern void mpc8xx_pics_init(void); extern unsigned int mpc8xx_get_irq(void); -#ifdef CONFIG_FADS -#include platforms/fads.h -#endif - -#if defined(CONFIG_MPC86XADS) -#include platforms/8xx/mpc86xads.h -#endif - -#if defined(CONFIG_MPC885ADS) -#include platforms/8xx/mpc885ads.h -#endif - #ifdef CONFIG_PCMCIA_M8XX extern struct mpc8xx_pcmcia_ops m8xx_pcmcia_ops; #endif #endif /* CONFIG_8xx */ #endif /* __CONFIG_8xx_DEFS */ -#endif /* __KERNEL__ */ -- 1.5.3.8 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 4/7] [POWERPC] Remove declaration of m8xx_pic_init.
m8xx_pic_init is declared in ppc8xx_pic.h but defined nowhere in the ppc tree. Remove it. Signed-off-by: Jochen Friedrich [EMAIL PROTECTED] --- arch/ppc/syslib/ppc8xx_pic.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/ppc/syslib/ppc8xx_pic.h b/arch/ppc/syslib/ppc8xx_pic.h index d7d9f65..53bcd97 100644 --- a/arch/ppc/syslib/ppc8xx_pic.h +++ b/arch/ppc/syslib/ppc8xx_pic.h @@ -6,7 +6,6 @@ extern struct hw_interrupt_type ppc8xx_pic; -void m8xx_pic_init(void); void m8xx_do_IRQ(struct pt_regs *regs, intcpu); int m8xx_get_irq(struct pt_regs *regs); -- 1.5.3.8 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v4] [POWERPC] Update MPC8610 HPCD to support audio drivers
On Fri, 18 Jan 2008, Timur Tabi wrote: Update the MPC8610 HPCD files to support the audio driver. Update booting-without-of.txt with information on the SSI device. Signed-off-by: Timur Tabi [EMAIL PROTECTED] --- Rebased for Kumar's repo. Documentation/powerpc/booting-without-of.txt | 41 ++ arch/powerpc/boot/dts/mpc8610_hpcd.dts | 113 +- arch/powerpc/configs/mpc8610_hpcd_defconfig | 171 +- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 15 +++ 4 files changed, 336 insertions(+), 4 deletions(-) applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[RFC/PATCH 0/2] mpc5200: tidy up the device tree bindings
These two patches make the device tree bindings for 5200 platforms more robust and match closer with the generic names recommended practice. Please review and comment. Cheers, g. -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [alsa-devel] [PATCH v3] [POWERPC] Update MPC8610 HPCD to support audio drivers
Kumar Gala wrote: Can you respin this. It doesn't apply cleanly to my tree. Ok, but I have a feeling that the merge between alsa-git and powerpc-git is going to be ugly. -- Timur Tabi Linux kernel developer at Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: 2.6.24-rc8-mm1: powerpc oopses
On Fri, 2008-01-18 at 18:23 +0100, Mariusz Kozlowski wrote: Hello, Do we need `offset' at all? Looks like no. I wonder if there's a good argument for adding a pte_offset_val() which would let us do: pteval = pte_offset_val(pmd, addr); and shrink the map/unmap window and overhead here and possibly elsewhere? Anyway, updated but still untested patch now with revealing comment: I patched the ppc32 kernel with this and run tests on /proc. This patch helps. No more BUGs and oopses :) Thanks, Andrew's already queued it up. -- Mathematics is the supreme nostalgia of our time. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 12/16] PS3: Add logical performance monitor device support
Add PS3 logical performance monitor device support to the PS3 system-bus and platform device registration routines. Signed-off-by: Geoff Levand [EMAIL PROTECTED] --- v2: o Add enum ps3_lpm_tb_type. o Remove redundant enclosing structure and return proper error codes from ps3_register_lpm_devices(). v3: o Add lpm.node_id to struct ps3_system_bus_device. o Cleanup repository discovery logic. arch/powerpc/platforms/ps3/device-init.c | 85 +++ arch/powerpc/platforms/ps3/system-bus.c |5 + include/asm-powerpc/ps3.h|8 ++ 3 files changed, 98 insertions(+) create mode 100644 arch/powerpc/platforms/ps3/lpm.c --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c @@ -31,6 +31,89 @@ #include platform.h +static int __init ps3_register_lpm_devices(void) +{ + int result; + u64 tmp1; + u64 tmp2; + struct ps3_system_bus_device *dev; + + pr_debug( - %s:%d\n, __func__, __LINE__); + + dev = kzalloc(sizeof(*dev), GFP_KERNEL); + if (!dev) + return -ENOMEM; + + dev-match_id = PS3_MATCH_ID_LPM; + dev-dev_type = PS3_DEVICE_TYPE_LPM; + + /* The current lpm driver only supports a single BE processor. */ + + result = ps3_repository_read_be_node_id(0, dev-lpm.node_id); + + if (result) { + pr_debug(%s:%d: ps3_repository_read_be_node_id failed \n, + __func__, __LINE__); + goto fail_read_repo; + } + + result = ps3_repository_read_lpm_privileges(dev-lpm.node_id, tmp1, + dev-lpm.rights); + + if (result) { + pr_debug(%s:%d: ps3_repository_read_lpm_privleges failed \n, + __func__, __LINE__); + goto fail_read_repo; + } + + lv1_get_logical_partition_id(tmp2); + + if (tmp1 != tmp2) { + pr_debug(%s:%d: wrong lpar\n, + __func__, __LINE__); + result = -ENODEV; + goto fail_rights; + } + + if (!(dev-lpm.rights PS3_LPM_RIGHTS_USE_LPM)) { + pr_debug(%s:%d: don't have rights to use lpm\n, + __func__, __LINE__); + result = -EPERM; + goto fail_rights; + } + + pr_debug(%s:%d: pu_id %lu, rights %lu(%lxh)\n, + __func__, __LINE__, dev-lpm.pu_id, dev-lpm.rights, + dev-lpm.rights); + + result = ps3_repository_read_pu_id(0, dev-lpm.pu_id); + + if (result) { + pr_debug(%s:%d: ps3_repository_read_pu_id failed \n, + __func__, __LINE__); + goto fail_read_repo; + } + + result = ps3_system_bus_device_register(dev); + + if (result) { + pr_debug(%s:%d ps3_system_bus_device_register failed\n, + __func__, __LINE__); + goto fail_register; + } + + pr_debug( - %s:%d\n, __func__, __LINE__); + return 0; + + +fail_register: +fail_rights: +fail_read_repo: + kfree(dev); + pr_debug( - %s:%d: failed\n, __func__, __LINE__); + return result; +} + /** * ps3_setup_gelic_device - Setup and register a gelic device instance. * @@ -827,6 +910,8 @@ static int __init ps3_register_devices(v ps3_register_sound_devices(); + ps3_register_lpm_devices(); + pr_debug( - %s:%d\n, __func__, __LINE__); return 0; } --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c @@ -715,6 +715,7 @@ int ps3_system_bus_device_register(struc static unsigned int dev_ioc0_count; static unsigned int dev_sb_count; static unsigned int dev_vuart_count; + static unsigned int dev_lpm_count; if (!dev-core.parent) dev-core.parent = ps3_system_bus; @@ -737,6 +738,10 @@ int ps3_system_bus_device_register(struc snprintf(dev-core.bus_id, sizeof(dev-core.bus_id), vuart_%02x, ++dev_vuart_count); break; + case PS3_DEVICE_TYPE_LPM: + snprintf(dev-core.bus_id, sizeof(dev-core.bus_id), + lpm_%02x, ++dev_lpm_count); + break; default: BUG(); }; --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h @@ -317,6 +317,7 @@ enum ps3_match_id { PS3_MATCH_ID_STOR_FLASH = 8, PS3_MATCH_ID_SOUND = 9, PS3_MATCH_ID_GRAPHICS = 10, + PS3_MATCH_ID_LPM= 11, }; #define PS3_MODULE_ALIAS_EHCI ps3:1 @@ -329,11 +330,13 @@ enum ps3_match_id { #define PS3_MODULE_ALIAS_STOR_FLASH ps3:8 #define PS3_MODULE_ALIAS_SOUND ps3:9 #define PS3_MODULE_ALIAS_GRAPHICS ps3:10 +#define PS3_MODULE_ALIAS_LPMps3:11 enum ps3_system_bus_device_type { PS3_DEVICE_TYPE_IOC0 = 1,
[patch 11/16] PS3: Add logical performance monitor repository routines
From: Takashi Yamamoto [EMAIL PROTECTED] Add repository routines for the PS3 Logical Performance Monitor. Signed-off-by: Takashi Yamamoto [EMAIL PROTECTED] Signed-off-by: Geoff Levand [EMAIL PROTECTED] --- v2: o Correct Yamamoto-san's mail addr. v3: o Change num_pu and pu_id to type u64. o Add comments to describe some symbol names. arch/powerpc/platforms/ps3/platform.h | 12 +++-- arch/powerpc/platforms/ps3/repository.c | 75 +++- 2 files changed, 83 insertions(+), 4 deletions(-) --- a/arch/powerpc/platforms/ps3/platform.h +++ b/arch/powerpc/platforms/ps3/platform.h @@ -180,10 +180,10 @@ int ps3_repository_read_stor_dev_region( unsigned int dev_index, unsigned int region_index, unsigned int *region_id, u64 *region_start, u64 *region_size); -/* repository pu and memory info */ +/* repository logical pu and memory info */ -int ps3_repository_read_num_pu(unsigned int *num_pu); -int ps3_repository_read_ppe_id(unsigned int *pu_index, unsigned int *ppe_id); +int ps3_repository_read_num_pu(u64 *num_pu); +int ps3_repository_read_pu_id(unsigned int pu_index, u64 *pu_id); int ps3_repository_read_rm_base(unsigned int ppe_id, u64 *rm_base); int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size); int ps3_repository_read_region_total(u64 *region_total); @@ -194,9 +194,15 @@ int ps3_repository_read_mm_info(u64 *rm_ int ps3_repository_read_num_be(unsigned int *num_be); int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id); +int ps3_repository_read_be_id(u64 node_id, u64 *be_id); int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq); int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq); +/* repository performance monitor info */ + +int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar, + u64 *rights); + /* repository 'Other OS' area */ int ps3_repository_read_boot_dat_addr(u64 *lpar_addr); --- a/arch/powerpc/platforms/ps3/repository.c +++ b/arch/powerpc/platforms/ps3/repository.c @@ -711,6 +711,35 @@ int ps3_repository_read_stor_dev_region( return result; } +/** + * ps3_repository_read_num_pu - Number of logical PU processors for this lpar. + */ + +int ps3_repository_read_num_pu(u64 *num_pu) +{ + *num_pu = 0; + return read_node(PS3_LPAR_ID_CURRENT, + make_first_field(bi, 0), + make_field(pun, 0), + 0, 0, + num_pu, NULL); +} + +/** + * ps3_repository_read_pu_id - Read the logical PU id. + * @pu_index: Zero based index. + * @pu_id: The logical PU id. + */ + +int ps3_repository_read_pu_id(unsigned int pu_index, u64 *pu_id) +{ + return read_node(PS3_LPAR_ID_CURRENT, + make_first_field(bi, 0), + make_field(pu, pu_index), + 0, 0, + pu_id, NULL); +} + int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size) { return read_node(PS3_LPAR_ID_CURRENT, @@ -883,6 +912,10 @@ int ps3_repository_read_boot_dat_info(u6 : ps3_repository_read_boot_dat_size(size); } +/** + * ps3_repository_read_num_be - Number of physical BE processors in the system. + */ + int ps3_repository_read_num_be(unsigned int *num_be) { int result; @@ -898,6 +931,12 @@ int ps3_repository_read_num_be(unsigned return result; } +/** + * ps3_repository_read_be_node_id - Read the physical BE processor node id. + * @be_index: Zero based index. + * @node_id: The BE processor node id. + */ + int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id) { return read_node(PS3_LPAR_ID_PME, @@ -908,6 +947,22 @@ int ps3_repository_read_be_node_id(unsig node_id, NULL); } +/** + * ps3_repository_read_be_id - Read the physical BE processor id. + * @node_id: The BE processor node id. + * @be_id: The BE processor id. + */ + +int ps3_repository_read_be_id(u64 node_id, u64 *be_id) +{ + return read_node(PS3_LPAR_ID_PME, + make_first_field(be, 0), + node_id, + 0, + 0, + be_id, NULL); +} + int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq) { return read_node(PS3_LPAR_ID_PME, @@ -924,11 +979,29 @@ int ps3_repository_read_be_tb_freq(unsig u64 node_id; *tb_freq = 0; - result = ps3_repository_read_be_node_id(0, node_id); + result = ps3_repository_read_be_node_id(be_index, node_id); return result ? result : ps3_repository_read_tb_freq(node_id, tb_freq); } +int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar, + u64 *rights) +{ + int result; + u64 node_id; + + *lpar = 0; + *rights = 0; + result = ps3_repository_read_be_node_id(be_index, node_id); + return result ? result + : read_node(PS3_LPAR_ID_PME, +
[patch 16/16] PS3: Update ps3_defconfig
Update ps3_defconfig. Signed-off-by: Geoff Levand [EMAIL PROTECTED] --- arch/powerpc/configs/ps3_defconfig | 49 ++--- 1 file changed, 35 insertions(+), 14 deletions(-) --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc4 -# Tue Dec 4 22:49:57 2007 +# Linux kernel version: 2.6.24-rc8 +# Wed Jan 16 14:31:21 2008 # CONFIG_PPC64=y @@ -103,6 +103,7 @@ CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB is not set +CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 @@ -154,7 +155,6 @@ CONFIG_PPC_PS3=y # CONFIG_PS3_ADVANCED is not set CONFIG_PS3_HTAB_SIZE=20 # CONFIG_PS3_DYNAMIC_DMA is not set -CONFIG_PS3_USE_LPAR_ADDR=y CONFIG_PS3_VUART=y CONFIG_PS3_PS3AV=y CONFIG_PS3_SYS_MANAGER=y @@ -162,6 +162,7 @@ CONFIG_PS3_STORAGE=y CONFIG_PS3_DISK=y CONFIG_PS3_ROM=y CONFIG_PS3_FLASH=y +CONFIG_PS3_LPM=m CONFIG_PPC_CELL=y # CONFIG_PPC_CELL_NATIVE is not set # CONFIG_PPC_IBM_CELL_BLADE is not set @@ -225,7 +226,7 @@ CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SPARSEMEM_VMEMMAP=y +# CONFIG_SPARSEMEM_VMEMMAP is not set CONFIG_MEMORY_HOTPLUG=y CONFIG_MEMORY_HOTPLUG_SPARSE=y CONFIG_SPLIT_PTLOCK_CPUS=4 @@ -338,7 +339,26 @@ CONFIG_IPV6_SIT=y # CONFIG_NET_PKTGEN is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set -# CONFIG_BT is not set +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y +# CONFIG_BT_HCIUART is not set +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +# CONFIG_BT_HCIVHCI is not set # CONFIG_AF_RXRPC is not set # @@ -666,14 +686,14 @@ CONFIG_LOGO_LINUX_CLUT224=y # # Sound # -CONFIG_SOUND=y +CONFIG_SOUND=m # # Advanced Linux Sound Architecture # -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set @@ -702,7 +722,7 @@ CONFIG_SND_VERBOSE_PROCFS=y # # ALSA PowerPC devices # -CONFIG_SND_PS3=y +CONFIG_SND_PS3=m CONFIG_SND_PS3_DEFAULT_START_DELAY=2000 # @@ -747,7 +767,7 @@ CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y +CONFIG_USB=m # CONFIG_USB_DEBUG is not set # @@ -761,13 +781,13 @@ CONFIG_USB_DEVICEFS=y # # USB Host Controller Drivers # -CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD=m # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set # CONFIG_USB_EHCI_TT_NEWSCHED is not set CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y # CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_HCD_PPC_OF is not set # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y @@ -1033,7 +1053,8 @@ CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y CONFIG_INSTRUMENTATION=y -# CONFIG_PROFILING is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=m # CONFIG_KPROBES is not set # CONFIG_MARKERS is not set -- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 15/16] PS3: Revove use lpar address workaround
Remove the PS3 workaround needed to support sparsemem SPU mappings. The SPU mappings no longer use sparsemem, so this workaround is no longer needed. Signed-off-by: Geoff Levand [EMAIL PROTECTED] --- arch/powerpc/platforms/ps3/Kconfig | 11 --- arch/powerpc/platforms/ps3/mm.c| 16 include/asm-powerpc/sparsemem.h|5 - 3 files changed, 4 insertions(+), 28 deletions(-) --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/powerpc/platforms/ps3/Kconfig @@ -61,17 +61,6 @@ config PS3_DYNAMIC_DMA This support is mainly for Linux kernel development. If unsure, say N. -config PS3_USE_LPAR_ADDR - depends on PPC_PS3 EXPERIMENTAL - bool PS3 use lpar address space - default y - help - This option is solely for experimentation by experts. Disables - translation of lpar addresses. SPE support currently won't work - without this set to y. - - If you have any doubt, choose the default y. - config PS3_VUART depends on PPC_PS3 tristate --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c @@ -36,11 +36,6 @@ #endif enum { -#if defined(CONFIG_PS3_USE_LPAR_ADDR) - USE_LPAR_ADDR = 1, -#else - USE_LPAR_ADDR = 0, -#endif #if defined(CONFIG_PS3_DYNAMIC_DMA) USE_DYNAMIC_DMA = 1, #else @@ -137,11 +132,8 @@ static struct map map; unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr) { BUG_ON(is_kernel_addr(phys_addr)); - if (USE_LPAR_ADDR) - return phys_addr; - else - return (phys_addr map.rm.size || phys_addr = map.total) - ? phys_addr : phys_addr + map.r1.offset; + return (phys_addr map.rm.size || phys_addr = map.total) + ? phys_addr : phys_addr + map.r1.offset; } EXPORT_SYMBOL(ps3_mm_phys_to_lpar); @@ -309,7 +301,7 @@ static int __init ps3_mm_add_memory(void BUG_ON(!mem_init_done); - start_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size; + start_addr = map.rm.size; start_pfn = start_addr PAGE_SHIFT; nr_pages = (map.r1.size + PAGE_SIZE - 1) PAGE_SHIFT; @@ -1007,7 +999,7 @@ static int dma_sb_region_create_linear(s if (r-offset + r-len map.rm.size) { /* Map (part of) 2nd RAM chunk */ - virt_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size; + virt_addr = map.rm.size; len = r-len; if (r-offset = map.rm.size) virt_addr += r-offset - map.rm.size; --- a/include/asm-powerpc/sparsemem.h +++ b/include/asm-powerpc/sparsemem.h @@ -10,13 +10,8 @@ */ #define SECTION_SIZE_BITS 24 -#if defined(CONFIG_PS3_USE_LPAR_ADDR) -#define MAX_PHYSADDR_BITS 47 -#define MAX_PHYSMEM_BITS47 -#else #define MAX_PHYSADDR_BITS 44 #define MAX_PHYSMEM_BITS44 -#endif #ifdef CONFIG_MEMORY_HOTPLUG extern void create_section_mapping(unsigned long start, unsigned long end); -- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 13/16] PS3: Add logical performance monitor driver support
From: Takashi Yamamoto [EMAIL PROTECTED] Add PS3 logical performance monitor (lpm) device driver. The PS3's LV1 hypervisor provides a Logical Performance Monitor that abstracts the Cell processor's performance monitor features for use by guest operating systems. Signed-off-by: Takashi Yamamoto [EMAIL PROTECTED] Signed-off-by: Geoff Levand [EMAIL PROTECTED] --- v2: o Correct Yamamoto-san's mail addr. o Text cleanups. o Added more comments explaining lpm operation. o Split SRPN_BKMK into separate patch. o Use get_hard_smp_processor_id() in ps3_get_hw_thread_id(). o Split ps3_copy_trace_buffer() into ps3_lpm_copy_tb() and ps3_lpm_copy_tb_to_user(). o Replace mutex with atomic_t in ps3_lpm_open()/ps3_lpm_close(). o General cleanup of ps3_lpm_open()/ps3_lpm_close(). v3: o Add BE node_id to struct lpm_priv. o Change some dev_err() to dev_dbg(). o Fix kzalloc() bug. o Text fix 'lost' - 'loss'. o Use lpm_priv-node_id with lv1_construct_lpm(). arch/powerpc/platforms/ps3/Kconfig | 13 drivers/ps3/Makefile |1 drivers/ps3/ps3-lpm.c | 1248 + include/asm-powerpc/ps3.h | 62 + 4 files changed, 1324 insertions(+) create mode 100644 arch/powerpc/platforms/ps3/ps3-lpm.c --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/powerpc/platforms/ps3/Kconfig @@ -138,4 +138,17 @@ config PS3_FLASH be disabled on the kernel command line using ps3flash=off, to not allocate this fixed buffer. +config PS3_LPM + tristate PS3 Logical Performance Monitor support + depends on PPC_PS3 + help + Include support for the PS3 Logical Performance Monitor. + + This support is required to use the logical performance monitor + of the PS3's LV1 hypervisor. + + If you intend to use the advanced performance monitoring and + profiling support of the Cell processor with programs like + oprofile and perfmon2, then say Y or M, otherwise say N. + endmenu --- a/drivers/ps3/Makefile +++ b/drivers/ps3/Makefile @@ -4,3 +4,4 @@ ps3av_mod-objs += ps3av.o ps3av_cmd.o obj-$(CONFIG_PPC_PS3) += sys-manager-core.o obj-$(CONFIG_PS3_SYS_MANAGER) += ps3-sys-manager.o obj-$(CONFIG_PS3_STORAGE) += ps3stor_lib.o +obj-$(CONFIG_PS3_LPM) += ps3-lpm.o --- /dev/null +++ b/drivers/ps3/ps3-lpm.c @@ -0,0 +1,1248 @@ +/* + * PS3 Logical Performance Monitor. + * + * Copyright (C) 2007 Sony Computer Entertainment Inc. + * Copyright 2007 Sony Corp. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include linux/kernel.h +#include linux/module.h +#include linux/interrupt.h +#include linux/uaccess.h +#include asm/ps3.h +#include asm/lv1call.h +#include asm/cell-pmu.h + + +/* BOOKMARK tag macros */ +#define PS3_PM_BOOKMARK_START0x8000ULL +#define PS3_PM_BOOKMARK_STOP 0x4000ULL +#define PS3_PM_BOOKMARK_TAG_KERNEL 0x1000ULL +#define PS3_PM_BOOKMARK_TAG_USER 0x3000ULL +#define PS3_PM_BOOKMARK_TAG_MASK_HI 0xF000ULL +#define PS3_PM_BOOKMARK_TAG_MASK_LO 0x0F00ULL + +/* CBE PM CONTROL register macros */ +#define PS3_PM_CONTROL_PPU_TH0_BOOKMARK 0x1000 +#define PS3_PM_CONTROL_PPU_TH1_BOOKMARK 0x0800 +#define PS3_PM_CONTROL_PPU_COUNT_MODE_MASK 0x000C +#define PS3_PM_CONTROL_PPU_COUNT_MODE_PROBLEM0x0008 +#define PS3_WRITE_PM_MASK0xULL + +/* CBE PM START STOP register macros */ +#define PS3_PM_START_STOP_PPU_TH0_BOOKMARK_START 0x0200 +#define PS3_PM_START_STOP_PPU_TH1_BOOKMARK_START 0x0100 +#define PS3_PM_START_STOP_PPU_TH0_BOOKMARK_STOP 0x0002 +#define PS3_PM_START_STOP_PPU_TH1_BOOKMARK_STOP 0x0001 +#define PS3_PM_START_STOP_START_MASK 0xFF00 +#define PS3_PM_START_STOP_STOP_MASK 0x00FF + +/* CBE PM COUNTER register macres */ +#define PS3_PM_COUNTER_MASK_HI 0xULL +#define PS3_PM_COUNTER_MASK_LO 0xULL + +/* BASE SIGNAL GROUP NUMBER macros */ +#define PM_ISLAND2_BASE_SIGNAL_GROUP_NUMBER 0 +#define PM_ISLAND2_SIGNAL_GROUP_NUMBER1 6 +#define
Re: [PATCH/RFCv2] [POWERPC] Add support for freescale watchdog to CPM serial driver.
Kumar Gala wrote: So I'll ask, what serial input are you waiting for from the boot wrapper? The bootwrapper has a command line editing prompt. It's fairly gratuitous in the presence of semi-decent firmware, but it's there nonetheless. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
External audio clock with MPC5200B
Has anyone tried using an external audio clock chip with the MPC5200B? We've discovered that the on-chip clock dividers aren't flexible enough and have too much error in the final frequencies. The level of error is ok for iPod type use but not for playing broadcast music. 192K sample rate is totally messed up with a 2.7% error. Note to chip designers - USB and 44.1Khz are not compatible frequencies and can't share the same PLL without FractionalN dividers on the audio clock. Freescale MX31/MX21 both have separate PLLs for UBS and audio. -- Jon Smirl [EMAIL PROTECTED] ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH/RFCv2] [POWERPC] Add support for freescale watchdog to CPM serial driver.
Hi Kumar, Ok now that makes sense, thanks So I'll ask, what serial input are you waiting for from the boot wrapper? It's the editor for the kernel command line. Thanks, Jochen ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] fsl_soc: Fix get_immrbase() to use ranges, rather than reg.
On Mon, 14 Jan 2008, Scott Wood wrote: The reg property in fsl soc nodes should be removed. Signed-off-by: Scott Wood [EMAIL PROTECTED] --- arch/powerpc/sysdev/fsl_soc.c | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) applied. (dropped the size == 12 check). - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH/RFCv2] [POWERPC] Add support for freescale watchdog to CPM serial driver.
On Jan 18, 2008, at 2:40 PM, Alan Cox wrote: On Fri, 18 Jan 2008 19:47:43 +0100 Jochen Friedrich [EMAIL PROTECTED] wrote: Hi Alan, If a freescale watchdog device node is present, reset the watchdog while waiting for serial input. Why ? We normally rely on user space for watchdog management as only the fact user space is behaving really proves a box is happy ? This is in the boot wrapper code, not in the linux kernel. Ok now that makes sense, thanks So I'll ask, what serial input are you waiting for from the boot wrapper? - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: crash in kmem_cache_init
On Fri, 18 Jan 2008, Christoph Lameter wrote: Memoryless nodes: Set N_NORMAL_MEMORY for a node if we do not support HIGHMEM If !CONFIG_HIGHMEM then enum node_states { #ifdef CONFIG_HIGHMEM N_HIGH_MEMORY, /* The node has regular or high memory */ #else N_HIGH_MEMORY = N_NORMAL_MEMORY, #endif So for_each_online_node(nid) { pg_data_t *pgdat = NODE_DATA(nid); free_area_init_node(nid, pgdat, NULL, find_min_pfn_for_node(nid), NULL); /* Any memory on that node */ if (pgdat-node_present_pages) node_set_state(nid, N_HIGH_MEMORY); ^^^ sets N_NORMAL_MEMORY check_for_regular_memory(pgdat); } ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 05/10] powerpc: Add crash kernel support for 85xx
On Dec 14, 2007, at 11:23 AM, Dale Farnsworth wrote: On Fri, Dec 14, 2007 at 10:48:58AM -0600, Kumar Gala wrote: On Nov 22, 2007, at 9:46 AM, Dale Farnsworth wrote: Add the ability to build a ppc_85xx kernel to run at a physical address of 32MB. Signed-off-by: Dale Farnsworth [EMAIL PROTECTED] --- arch/powerpc/Kconfig |2 +- arch/powerpc/kernel/head_fsl_booke.S | 23 ++- arch/powerpc/mm/fsl_booke_mmu.c |6 +++--- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 805b4d1..d405298 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -253,7 +253,7 @@ config KEXEC config CRASH_DUMP bool Build a kdump crash kernel (EXPERIMENTAL) - depends on PPC_MULTIPLATFORM EXPERIMENTAL + depends on (PPC_MULTIPLATFORM || PPC_85xx) EXPERIMENTAL help Build a kernel suitable for use as a kdump capture kernel. The kernel will be linked at a different address than normal, and diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/ kernel/head_fsl_booke.S index 4b98227..1c9685f 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S @@ -41,6 +41,12 @@ #include asm/asm-offsets.h #include head_booke.h +#ifdef CONFIG_CRASH_DUMP +#define INITIAL_BOOKE_PAGESZ (BOOKE_PAGESZ_64M) +#else +#define INITIAL_BOOKE_PAGESZ (BOOKE_PAGESZ_16M) +#endif I'm ok with bumping the first page to 64M in all cases. OK, I'll make that change in the next rev. Thanks. I'm about to commit a version of this patch, why did you need to bump to 64M? snip The rest looks good. Does this mean we can boot a e500 kernel at a non-zero physical address? (can we run or is the non-zero phy just for a short period of init time). Yes, with this series of patches, we can boot and run with a classic ppc or e500 kernel at 32MB physical (0xc200 virtual). Note that on classic, we still need memory at phys 0 for the exception vectors. On e500 IIRC, we don't use the vectors at phys 0, but we still write the trampoline vectors there. I just didn't bother making that conditional. trampoline vectors? I'll post an updated series soon, with hopes of getting it into 2.6.25 - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/4] IB/ehca: Prevent RDMA-related connection failures
thanks, applied 1-4. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: crash in kmem_cache_init
On 1/18/08, Christoph Lameter [EMAIL PROTECTED] wrote: Could you try this patch? Memoryless nodes: Set N_NORMAL_MEMORY for a node if we do not support HIGHMEM It seems that we only scan through zones to set N_NORMAL_MEMORY only if CONFIG_HIGHMEM and CONFIG_NUMA are set. We need to set N_NORMAL_MEMORY in the !CONFIG_HIGHMEM case. I'm testing this exact patch right now on the machine Mel saw the issues with. Thanks, Nish ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: crash in kmem_cache_init
Could you try this patch? Memoryless nodes: Set N_NORMAL_MEMORY for a node if we do not support HIGHMEM It seems that we only scan through zones to set N_NORMAL_MEMORY only if CONFIG_HIGHMEM and CONFIG_NUMA are set. We need to set N_NORMAL_MEMORY in the !CONFIG_HIGHMEM case. Signed-off-by: Christoph Lameter [EMAIL PROTECTED] Index: linux-2.6/mm/page_alloc.c === --- linux-2.6.orig/mm/page_alloc.c 2008-01-18 14:08:41.0 -0800 +++ linux-2.6/mm/page_alloc.c 2008-01-18 14:13:34.0 -0800 @@ -3812,7 +3812,6 @@ restart: /* Any regular memory on that node ? */ static void check_for_regular_memory(pg_data_t *pgdat) { -#ifdef CONFIG_HIGHMEM enum zone_type zone_type; for (zone_type = 0; zone_type = ZONE_NORMAL; zone_type++) { @@ -3820,7 +3819,6 @@ static void check_for_regular_memory(pg_ if (zone-present_pages) node_set_state(zone_to_nid(zone), N_NORMAL_MEMORY); } -#endif } /** ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: crash in kmem_cache_init
On (18/01/08 10:47), Christoph Lameter didst pronounce: On Thu, 17 Jan 2008, Olaf Hering wrote: early_node_map[1] active PFN ranges 1:0 - 892928 Could not find start_pfn for node 0 Corrupted min_pfn? Doubtful. Node 0 has no memory but it is still being initialised. Still, I looked closer at what is going on when that message gets displayed and I see this in free_area_init_nodes() for_each_online_node(nid) { pg_data_t *pgdat = NODE_DATA(nid); free_area_init_node(nid, pgdat, NULL, find_min_pfn_for_node(nid), NULL); /* Any memory on that node */ if (pgdat-node_present_pages) node_set_state(nid, N_HIGH_MEMORY); check_for_regular_memory(pgdat); } This Any memory on that node thing is new and it says if there is any memory on the node, set N_HIGH_MEMORY. Fine I guess, I haven't tracked these changes closely. It calls check_for_regular_memory() which looks like static void check_for_regular_memory(pg_data_t *pgdat) { #ifdef CONFIG_HIGHMEM enum zone_type zone_type; for (zone_type = 0; zone_type = ZONE_NORMAL; zone_type++) { struct zone *zone = pgdat-node_zones[zone_type]; if (zone-present_pages) node_set_state(zone_to_nid(zone), N_NORMAL_MEMORY); } #endif } i.e. go through the other zones and if any of them have memory, set N_NORMAL_MEMORY. But... it only does this on CONFIG_HIGHMEM which on PPC64 is not going to be set so N_NORMAL_MEMORY never gets set on POWER That sounds bad. [EMAIL PROTECTED]:~/git/linux-2.6/mm$ grep -n N_NORMAL_MEMORY slab.c 1593: for_each_node_state(nid, N_NORMAL_MEMORY) { 1971: for_each_node_state(node, N_NORMAL_MEMORY) { 2102: for_each_node_state(node, N_NORMAL_MEMORY) { 3818: for_each_node_state(node, N_NORMAL_MEMORY) { and one of them is in kmem_cache_init(). That seems very significant. Christoph, can you think of possibilities of where N_NORMAL_MEMORY not being set would cause trouble for slab? -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 02/16] PS3: Make bus_id and dev_id u64
From: Geert Uytterhoeven [EMAIL PROTECTED] Change the PS3 bus_id and dev_id from type unsigned int to u64. These IDs are 64-bit in the repository, and the special storage notification device has a device ID of ULONG_MAX. Signed-off-by: Geert Uytterhoeven [EMAIL PROTECTED] Signed-off-by: Geoff Levand [EMAIL PROTECTED] --- arch/powerpc/platforms/ps3/device-init.c |4 ++-- arch/powerpc/platforms/ps3/mm.c |8 arch/powerpc/platforms/ps3/platform.h| 12 ++-- arch/powerpc/platforms/ps3/repository.c | 21 - arch/powerpc/platforms/ps3/system-bus.c | 14 +++--- drivers/net/ps3_gelic_net.c |4 ++-- include/asm-powerpc/ps3.h|4 ++-- 7 files changed, 31 insertions(+), 36 deletions(-) --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c @@ -297,7 +297,7 @@ static int ps3_storage_wait_for_device(c u64 dev_port; } *notify_event; - pr_debug( - %s:%u: (%u:%u:%u)\n, __func__, __LINE__, repo-bus_id, + pr_debug( - %s:%u: (%lu:%lu:%u)\n, __func__, __LINE__, repo-bus_id, repo-dev_id, repo-dev_type); buf = kzalloc(512, GFP_KERNEL); @@ -384,7 +384,7 @@ static int ps3_storage_wait_for_device(c if (notify_event-dev_id == repo-dev_id notify_event-dev_type == PS3_DEV_TYPE_NOACCESS) { - pr_debug(%s:%u: no access: dev_id %u\n, __func__, + pr_debug(%s:%u: no access: dev_id %lu\n, __func__, __LINE__, repo-dev_id); break; } --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c @@ -359,7 +359,7 @@ static unsigned long dma_sb_lpar_to_bus( static void __maybe_unused _dma_dump_region(const struct ps3_dma_region *r, const char *func, int line) { - DBG(%s:%d: dev%u:%u\n, func, line, r-dev-bus_id, + DBG(%s:%d: dev%lu:%lu\n, func, line, r-dev-bus_id, r-dev-dev_id); DBG(%s:%d: page_size %u\n, func, line, r-page_size); DBG(%s:%d: bus_addr %lxh\n, func, line, r-bus_addr); @@ -394,7 +394,7 @@ struct dma_chunk { static void _dma_dump_chunk (const struct dma_chunk* c, const char* func, int line) { - DBG(%s:%d: r.dev%u:%u\n, func, line, + DBG(%s:%d: r.dev%lu:%lu\n, func, line, c-region-dev-bus_id, c-region-dev-dev_id); DBG(%s:%d: r.bus_addr %lxh\n, func, line, c-region-bus_addr); DBG(%s:%d: r.page_size %u\n, func, line, c-region-page_size); @@ -658,7 +658,7 @@ static int dma_sb_region_create(struct p BUG_ON(!r); if (!r-dev-bus_id) { - pr_info(%s:%d: %u:%u no dma\n, __func__, __LINE__, + pr_info(%s:%d: %lu:%lu no dma\n, __func__, __LINE__, r-dev-bus_id, r-dev-dev_id); return 0; } @@ -724,7 +724,7 @@ static int dma_sb_region_free(struct ps3 BUG_ON(!r); if (!r-dev-bus_id) { - pr_info(%s:%d: %u:%u no dma\n, __func__, __LINE__, + pr_info(%s:%d: %lu:%lu no dma\n, __func__, __LINE__, r-dev-bus_id, r-dev-dev_id); return 0; } --- a/arch/powerpc/platforms/ps3/platform.h +++ b/arch/powerpc/platforms/ps3/platform.h @@ -95,7 +95,7 @@ enum ps3_dev_type { int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str, u64 *value); -int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id); +int ps3_repository_read_bus_id(unsigned int bus_index, u64 *bus_id); int ps3_repository_read_bus_type(unsigned int bus_index, enum ps3_bus_type *bus_type); int ps3_repository_read_bus_num_dev(unsigned int bus_index, @@ -119,7 +119,7 @@ enum ps3_reg_type { int ps3_repository_read_dev_str(unsigned int bus_index, unsigned int dev_index, const char *dev_str, u64 *value); int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index, - unsigned int *dev_id); + u64 *dev_id); int ps3_repository_read_dev_type(unsigned int bus_index, unsigned int dev_index, enum ps3_dev_type *dev_type); int ps3_repository_read_dev_intr(unsigned int bus_index, @@ -138,12 +138,12 @@ int ps3_repository_read_dev_reg(unsigned /* repository bus enumerators */ struct ps3_repository_device { - enum ps3_bus_type bus_type; unsigned int bus_index; - unsigned int bus_id; - enum ps3_dev_type dev_type; unsigned int dev_index; - unsigned int dev_id; + enum ps3_bus_type bus_type; + enum ps3_dev_type dev_type; + u64 bus_id; + u64 dev_id; }; static inline struct ps3_repository_device *ps3_repository_bump_device( --- a/arch/powerpc/platforms/ps3/repository.c +++ b/arch/powerpc/platforms/ps3/repository.c @@ -168,18 +168,15 @@ int
Re: [PATCH/RFCv2] [POWERPC] Add support for freescale watchdog to CPM serial driver.
On Fri, 18 Jan 2008 19:47:43 +0100 Jochen Friedrich [EMAIL PROTECTED] wrote: Hi Alan, If a freescale watchdog device node is present, reset the watchdog while waiting for serial input. Why ? We normally rely on user space for watchdog management as only the fact user space is behaving really proves a box is happy ? This is in the boot wrapper code, not in the linux kernel. Ok now that makes sense, thanks ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [RFC/PATCH 1/2] [POWERPC] mpc5200: normalize compatible property bindings
Looks fine to me. Grant Likely wrote: From: Grant Likely [EMAIL PROTECTED] Update MPC5200 drivers to also look for compatible properties in the form fsl,mpc5200-* to better conform to open firmware generic names recommended practice as published here: http://www.openfirmware.org/1275/practice/gnames/gnamv14a.html This patch should *not* break compatibility with older device trees which do not use the 'fsl,' prefix. The drivers will still bind against the older names also. Signed-off-by: Grant Likely [EMAIL PROTECTED] --- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH v4] [POWERPC] Update MPC8610 HPCD to support audio drivers
Update the MPC8610 HPCD files to support the audio driver. Update booting-without-of.txt with information on the SSI device. Signed-off-by: Timur Tabi [EMAIL PROTECTED] --- Rebased for Kumar's repo. Documentation/powerpc/booting-without-of.txt | 41 ++ arch/powerpc/boot/dts/mpc8610_hpcd.dts | 113 +- arch/powerpc/configs/mpc8610_hpcd_defconfig | 171 +- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 15 +++ 4 files changed, 336 insertions(+), 4 deletions(-) diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index a13d457..6ac726d 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt @@ -56,6 +56,7 @@ Table of Contents m) Chipselect/Local Bus n) 4xx/Axon EMAC ethernet nodes o) Xilinx IP cores + p) Freescale Synchronous Serial Interface VII - Specifying interrupt information for devices 1) interrupts property @@ -2575,6 +2576,46 @@ platforms are moved over to use the flattened-device-tree model. Requred properties: - current-speed : Baud rate of uartlite +p) Freescale Synchronous Serial Interface + + The SSI is a serial device that communicates with audio codecs. It can + be programmed in AC97, I2S, left-justified, or right-justified modes. + + Required properties: + - compatible : compatible list, containing fsl,ssi + - cell-index : the SSI, 0 = SSI1, 1 = SSI2, and so on + - reg : offset and length of the register set for the device + - interrupts : a b where a is the interrupt number and b is a +field that represents an encoding of the sense and + level information for the interrupt. This should be + encoded based on the information in section 2) + depending on the type of interrupt controller you + have. + - interrupt-parent : the phandle for the interrupt controller that +services interrupts for this device. + - fsl,mode: the operating mode for the SSI interface + i2s-slave - I2S mode, SSI is clock slave + i2s-master - I2S mode, SSI is clock master + lj-slave - left-justified mode, SSI is clock slave + lj-master - l.j. mode, SSI is clock master + rj-slave - right-justified mode, SSI is clock slave + rj-master - r.j., SSI is clock master + ac97-slave - AC97 mode, SSI is clock slave + ac97-master - AC97 mode, SSI is clock master + + Optional properties: + - codec-handle: phandle to a 'codec' node that defines an audio + codec connected to this SSI. This node is typically + a child of an I2C or other control node. + + Child 'codec' node required properties: + - compatible : compatible list, contains the name of the codec + + Child 'codec' node optional properties: + - clock-frequency : The frequency of the input clock, which typically +comes from an on-board dedicated oscillator. + + More devices will be defined as this spec matures. VII - Specifying interrupt information for devices diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index 01040a7..d98715c 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts @@ -1,7 +1,7 @@ /* * MPC8610 HPCD Device Tree Source * - * Copyright 2007 Freescale Semiconductor Inc. + * Copyright 2007-2008 Freescale Semiconductor Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License Version 2 as published @@ -49,6 +49,7 @@ #size-cells = 1; #interrupt-cells = 2; device_type = soc; + compatible = fsl,mpc8610-immr, simple-bus; ranges = 0 e000 0010; reg = e000 1000; bus-frequency = 0; @@ -62,6 +63,13 @@ interrupts = 2b 2; interrupt-parent = mpic; dfsrr; + +cs4270:[EMAIL PROTECTED] { + compatible = cirrus,cs4270; +reg = 4f; + /* MCLK source is a stand-alone oscillator */ + clock-frequency = bb8000; +}; }; [EMAIL PROTECTED] { @@ -111,6 +119,109 @@ reg = e 1000;
[PATCH 2/7] [POWERPC] Rename m8xx_pic_init to mpc8xx_pics_init
m8xx_pic_init calls both mpc8xx_pic_init and cpm_pic_init. Renaming the function to use the same name space as the rest of the mpc8xx specific funtions and to be more meaningful. Signed-off-by: Jochen Friedrich [EMAIL PROTECTED] --- arch/powerpc/platforms/8xx/ep88xc.c |2 +- arch/powerpc/platforms/8xx/m8xx_setup.c |4 ++-- arch/powerpc/platforms/8xx/mpc86xads_setup.c |2 +- arch/powerpc/platforms/8xx/mpc885ads_setup.c |2 +- arch/powerpc/sysdev/commproc.h |2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/8xx/ep88xc.c b/arch/powerpc/platforms/8xx/ep88xc.c index c518b6c..c883c31 100644 --- a/arch/powerpc/platforms/8xx/ep88xc.c +++ b/arch/powerpc/platforms/8xx/ep88xc.c @@ -166,7 +166,7 @@ define_machine(ep88xc) { .name = Embedded Planet EP88xC, .probe = ep88xc_probe, .setup_arch = ep88xc_setup_arch, - .init_IRQ = m8xx_pic_init, + .init_IRQ = mpc8xx_pics_init, .get_irq= mpc8xx_get_irq, .restart = mpc8xx_restart, .calibrate_decr = mpc8xx_calibrate_decr, diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c index ba645c2..1337457 100644 --- a/arch/powerpc/platforms/8xx/m8xx_setup.c +++ b/arch/powerpc/platforms/8xx/m8xx_setup.c @@ -237,13 +237,13 @@ static void cpm_cascade(unsigned int irq, struct irq_desc *desc) desc-chip-eoi(irq); } -/* Initialize the internal interrupt controller. The number of +/* Initialize the internal interrupt controllers. The number of * interrupts supported can vary with the processor type, and the * 82xx family can have up to 64. * External interrupts can be either edge or level triggered, and * need to be initialized by the appropriate driver. */ -void __init m8xx_pic_init(void) +void __init mpc8xx_pics_init(void) { int irq; diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c index d2927a4..dea1df1 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c @@ -139,7 +139,7 @@ define_machine(mpc86x_ads) { .name = MPC86x ADS, .probe = mpc86xads_probe, .setup_arch = mpc86xads_setup_arch, - .init_IRQ = m8xx_pic_init, + .init_IRQ = mpc8xx_pics_init, .get_irq= mpc8xx_get_irq, .restart= mpc8xx_restart, .calibrate_decr = mpc8xx_calibrate_decr, diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c index 2cf1b6a..8f2aa04 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c @@ -275,7 +275,7 @@ define_machine(mpc885_ads) { .name = Freescale MPC885 ADS, .probe = mpc885ads_probe, .setup_arch = mpc885ads_setup_arch, - .init_IRQ = m8xx_pic_init, + .init_IRQ = mpc8xx_pics_init, .get_irq= mpc8xx_get_irq, .restart= mpc8xx_restart, .calibrate_decr = mpc8xx_calibrate_decr, diff --git a/arch/powerpc/sysdev/commproc.h b/arch/powerpc/sysdev/commproc.h index 9155ba4..f481adf 100644 --- a/arch/powerpc/sysdev/commproc.h +++ b/arch/powerpc/sysdev/commproc.h @@ -6,7 +6,7 @@ extern void mpc8xx_restart(char *cmd); extern void mpc8xx_calibrate_decr(void); extern int mpc8xx_set_rtc_time(struct rtc_time *tm); extern void mpc8xx_get_rtc_time(struct rtc_time *tm); -extern void m8xx_pic_init(void); +extern void mpc8xx_pics_init(void); extern unsigned int mpc8xx_get_irq(void); #endif -- 1.5.3.8 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 04/16] PS3: Use the HVs storage device notification mechanism properly
From: Geert Uytterhoeven [EMAIL PROTECTED] The PS3 hypervisor has a storage device notification mechanism to wait until a storage device is ready. Unfortunately the storage device probing code used this mechanism in an incorrect way, needing a polling loop and handling of devices that are not yet ready. This change corrects this by: - First waiting for the reception of an asynchronous notification that a new storage device became ready, - Then looking up the storage device in the device repository. On shutdown, the storage probe thread is stopped and the storage notification device is closed using a reboot notifier. Signed-off-by: Geert Uytterhoeven [EMAIL PROTECTED] Signed-off-by: Geoff Levand [EMAIL PROTECTED] --- arch/powerpc/platforms/ps3/device-init.c | 422 --- arch/powerpc/platforms/ps3/platform.h|2 arch/powerpc/platforms/ps3/repository.c | 29 -- 3 files changed, 221 insertions(+), 232 deletions(-) --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c @@ -23,6 +23,7 @@ #include linux/kernel.h #include linux/kthread.h #include linux/init.h +#include linux/reboot.h #include asm/firmware.h #include asm/lv1call.h @@ -238,166 +239,6 @@ static int __init ps3_setup_vuart_device return result; } -static int ps3stor_wait_for_completion(u64 dev_id, u64 tag, - unsigned int timeout) -{ - int result = -1; - unsigned int retries = 0; - u64 status; - - for (retries = 0; retries timeout; retries++) { - result = lv1_storage_check_async_status(dev_id, tag, status); - if (!result) - break; - - msleep(1); - } - - if (result) - pr_debug(%s:%u: check_async_status: %s, status %lx\n, -__func__, __LINE__, ps3_result(result), status); - - return result; -} - -/** - * ps3_storage_wait_for_device - Wait for a storage device to become ready. - * @repo: The repository device to wait for. - * - * Uses the hypervisor's storage device notification mechanism to wait until - * a storage device is ready. The device notification mechanism uses a - * psuedo device (id = -1) to asynchronously notify the guest when storage - * devices become ready. The notification device has a block size of 512 - * bytes. - */ - -static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo) -{ - int error = -ENODEV; - int result; - const u64 notification_dev_id = (u64)-1LL; - const unsigned int timeout = HZ; - u64 lpar; - u64 tag; - void *buf; - enum ps3_notify_type { - notify_device_ready = 0, - notify_region_probe = 1, - notify_region_update = 2, - }; - struct { - u64 operation_code; /* must be zero */ - u64 event_mask; /* OR of 1UL enum ps3_notify_type */ - } *notify_cmd; - struct { - u64 event_type; /* enum ps3_notify_type */ - u64 bus_id; - u64 dev_id; - u64 dev_type; - u64 dev_port; - } *notify_event; - - pr_debug( - %s:%u: (%lu:%lu:%u)\n, __func__, __LINE__, repo-bus_id, -repo-dev_id, repo-dev_type); - - buf = kzalloc(512, GFP_KERNEL); - if (!buf) - return -ENOMEM; - - lpar = ps3_mm_phys_to_lpar(__pa(buf)); - notify_cmd = buf; - notify_event = buf; - - result = lv1_open_device(repo-bus_id, notification_dev_id, 0); - if (result) { - printk(KERN_ERR %s:%u: lv1_open_device %s\n, __func__, - __LINE__, ps3_result(result)); - goto fail_free; - } - - /* Setup and write the request for device notification. */ - - notify_cmd-operation_code = 0; /* must be zero */ - notify_cmd-event_mask = 1UL notify_region_probe; - - result = lv1_storage_write(notification_dev_id, 0, 0, 1, 0, lpar, - tag); - if (result) { - printk(KERN_ERR %s:%u: write failed %s\n, __func__, __LINE__, - ps3_result(result)); - goto fail_close; - } - - /* Wait for the write completion */ - - result = ps3stor_wait_for_completion(notification_dev_id, tag, -timeout); - if (result) { - printk(KERN_ERR %s:%u: write not completed %s\n, __func__, - __LINE__, ps3_result(result)); - goto fail_close; - } - - /* Loop here processing the requested notification events. */ - - while (1) { - memset(notify_event, 0, sizeof(*notify_event)); - - result = lv1_storage_read(notification_dev_id, 0, 0, 1, 0, - lpar, tag); -
[patch 06/16] PS3: Kill unused ps3_repository_bump_device()
From: Geert Uytterhoeven [EMAIL PROTECTED] PS3: Kill unused routine ps3_repository_bump_device(). Signed-off-by: Geert Uytterhoeven [EMAIL PROTECTED] Signed-off-by: Geoff Levand [EMAIL PROTECTED] --- arch/powerpc/platforms/ps3/platform.h |6 -- 1 files changed, 6 deletions(-) --- a/arch/powerpc/platforms/ps3/platform.h +++ b/arch/powerpc/platforms/ps3/platform.h @@ -144,12 +144,6 @@ struct ps3_repository_device { u64 dev_id; }; -static inline struct ps3_repository_device *ps3_repository_bump_device( - struct ps3_repository_device *repo) -{ - repo-dev_index++; - return repo; -} int ps3_repository_find_device(struct ps3_repository_device *repo); int ps3_repository_find_device_by_id(struct ps3_repository_device *repo, u64 bus_id, u64 dev_id); -- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev