[PATCH] cell: fix section mismatch warnings
Fix following warnings: WARNING: arch/powerpc/platforms/cell/built-in.o(.devinit.text+0x9c): Section mismatch in reference from the function .cell_setup_phb() to the function .init.text:.iowa_register_bus() WARNING: arch/powerpc/platforms/cell/built-in.o(.devinit.text+0xa4): Section mismatch in reference from the function .cell_setup_phb() to the function .init.text:.io_workaround_init() Signed-off-by: Kou Ishizaki [EMAIL PROTECTED] --- arch/powerpc/platforms/cell/io-workarounds.c |6 +++--- arch/powerpc/platforms/cell/io-workarounds.h |6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c index 3b84e8b..b5f84e8 100644 --- a/arch/powerpc/platforms/cell/io-workarounds.c +++ b/arch/powerpc/platforms/cell/io-workarounds.c @@ -118,7 +118,7 @@ static void iowa_##name at \ #undef DEF_PCI_AC_RET #undef DEF_PCI_AC_NORET -static struct ppc_pci_io __initdata iowa_pci_io = { +static const struct ppc_pci_io __devinitconst iowa_pci_io = { #define DEF_PCI_AC_RET(name, ret, at, al, space, aa) .name = iowa_##name, #define DEF_PCI_AC_NORET(name, at, al, space, aa) .name = iowa_##name, @@ -146,7 +146,7 @@ static void __iomem *iowa_ioremap(unsigned long addr, unsigned long size, } /* Regist new bus to support workaround */ -void __init iowa_register_bus(struct pci_controller *phb, +void __devinit iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops, int (*initfunc)(struct iowa_bus *, void *), void *data) { @@ -173,7 +173,7 @@ void __init iowa_register_bus(struct pci_controller *phb, } /* enable IO workaround */ -void __init io_workaround_init(void) +void __devinit io_workaround_init(void) { static int io_workaround_inited; diff --git a/arch/powerpc/platforms/cell/io-workarounds.h b/arch/powerpc/platforms/cell/io-workarounds.h index 79d8ed3..6efc778 100644 --- a/arch/powerpc/platforms/cell/io-workarounds.h +++ b/arch/powerpc/platforms/cell/io-workarounds.h @@ -31,9 +31,9 @@ struct iowa_bus { void *private; }; -void __init io_workaround_init(void); -void __init iowa_register_bus(struct pci_controller *, struct ppc_pci_io *, - int (*)(struct iowa_bus *, void *), void *); +void __devinit io_workaround_init(void); +void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *, +int (*)(struct iowa_bus *, void *), void *); struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR); struct iowa_bus *iowa_pio_find_bus(unsigned long); -- 1.5.4.1 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [PATCH] Defer processing of interrupts when the CPU wakes from sleepmode
snip This provides a way to defer processing of an interrupt that wakes the processor out of sleep mode. On 32-bit platforms that use an interrupt to wake the processor, we have to have interrupts enabled in hardware at the point where we go to sleep, otherwise the processor will never wake up. However, because interrupts are logically disabled at this point, we don't want to process the interrupt straight away. This is handled by setting the _TLF_SLEEPING flag. When we get an interrupt and _TLF_SLEEPING is set, we firstly clear the MSR_EE (external interrupt enable) bit in the saved MSR value, and secondly we then return to the address in the link register, like we do for _TLF_NAPPING, but without actually handling the interrupt. Note that this is handled somewhat differently on powerbooks, so this new code will only be used on non-Apple machines. Thanks Paul for this patch. The patch looks like very nice. But the users have to be aware of the LINK register (LR) not corrupted. So, does power management patch from Scott Wood need to respin? BTW, why the fast_exception_return does *not* need clear the reservation with stwcx.? Thanks, Dave ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 3/6] [WATCHDOG] mpc83xx_wdt: rename to mpc8xxx_wdt
On Wed, May 14, 2008 at 11:48:05AM +1000, Stephen Rothwell wrote: Hi Anton, On Wed, 14 May 2008 11:45:23 +1000 Stephen Rothwell [EMAIL PROTECTED] wrote: Doing this status with git diff -M --stat would show us if the file was just renamed or if there were some changes as well ... Not that I don't trust you, just for future reference. I use git-format-patch. And -M option would generate the whole patch in the git patch format, which you can not apply with patch(1) (I also recalling that there was someone protesting wrt sending the patches in the git patch format, since not everybody use git). Though, you can still check me if you want to, git generates useful headers in the patch itself: diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c deleted file mode 100644 index 3534ae0..000 diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c new file mode 100644 index 000..3534ae0 The index stuff are hashes. They match. ;-) But sure, it would be great if git-format-patch could generate diffstat in the git format and leave the patch itself patch(1)-compatible. -- Anton Vorontsov email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
ALSA fixes for non-coherent archs (Re: [PATCH] Sam440ep support)
At Tue, 06 May 2008 11:16:22 +0200, Gerhard Pircher wrote: Original-Nachricht Datum: Tue, 06 May 2008 18:48:39 +1000 Von: Benjamin Herrenschmidt [EMAIL PROTECTED] An: Gerhard Pircher [EMAIL PROTECTED] CC: linuxppc-dev@ozlabs.org, Takashi Iwai [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Betreff: Re: [PATCH] Sam440ep support On Tue, 2008-05-06 at 09:51 +0200, Gerhard Pircher wrote: Takashi Iwai posted a preliminary patch a long time ago. I tested it on my machine and it failed with non coherent scatter-gather DMA allocations (I guess almost all ALSA PCI drivers use SG DMA?). How does Alsa allocate such SG ? I can't answer this question. *ducked* :-) Takashi? FYI: I posted the results of the test with Takashi's dma_mmap_coherent patch here: http://ozlabs.org/pipermail/linuxppc-dev/2006-June/024078.html On the other side it looks like this problem does not only affect ALSA. As far as I can tell also some V4L(2) drivers have a problem with mmaping non coherent DMA allocations, but I'm not sure (it's a long time since I did some tests with video cards on my AmigaOne). Naturally I can do some tests, if you or Takashi come up with a new patch. OK, here is another patch for testing. Since I lost my old patch somewhere (and it's not worth to dig the archive), I wrote it up quickly from scratch. This version should cover both SG and non-SG buffers. It's against the latest git tree. The patch adds a hackish verison of dma_mmap_coherent() for some architectures in sound/core/pcm_native.c. I'm not sure whether this works. I just tested it on X86. It'd be appreciated if someone can test this. Also, this disables HDSPM driver for non-X86/IA64 since the driver has own copy and silence methods that are incompatible with the new SG-buffer data. And, yes, I know we need to clean up huge messes in ALSA memory handling routines. But, let's fix obvious bugs before starting a big rewrite... thanks, Takashi --- diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index ae2921d..ccf3dfa 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h @@ -62,6 +62,18 @@ struct snd_dma_buffer { void *private_data; /* private for allocator; don't touch */ }; +/* needs to use dma_mmap_coherent() for pages allocated via + * dma_alloc_coherent() + */ +#ifdef CONFIG_HAS_DMA +#if (defined(CONFIG_PPC32) !defined(CONFIG_CONFIG_NOT_COHERENT_CACHE)) || \ + defined(CONFIG_ARM) || \ + defined(CONFIG_MIPS) || \ + defined(CONFIG_PARISC) +#define SND_NEEDS_DMA_MMAP_COHERENT +#endif /* archs */ +#endif /* CONFIG_HAS_DMA */ + /* * Scatter-Gather generic device pages */ @@ -75,7 +87,9 @@ struct snd_sg_buf { int pages; /* allocated pages */ int tblsize;/* allocated table size */ struct snd_sg_page *table; /* address table */ +#ifndef SND_NEEDS_DMA_MMAP_COHERENT struct page **page_table; /* page table (for vmap/vunmap) */ +#endif struct device *dev; }; diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 51d58cc..2e68420 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -969,10 +969,25 @@ int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm, int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size); int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream); +/* + * SG-buffer + */ #define snd_pcm_substream_sgbuf(substream) ((substream)-runtime-dma_buffer_p-private_data) #define snd_pcm_sgbuf_pages(size) snd_sgbuf_aligned_pages(size) #define snd_pcm_sgbuf_get_addr(sgbuf,ofs) snd_sgbuf_get_addr(sgbuf,ofs) + +#ifdef SND_NEEDS_DMA_MMAP_COHERENT +int snd_pcm_sgbuf_ops_copy(struct snd_pcm_substream *substream, + int channel, snd_pcm_uframes_t pos, + void __user *buf, snd_pcm_uframes_t count); +int snd_pcm_sgbuf_ops_silence(struct snd_pcm_substream *substream, int channel, + snd_pcm_uframes_t pos, snd_pcm_uframes_t count); +#define snd_pcm_sgbuf_ops_page NULL +#else +#define snd_pcm_sgbuf_ops_copy NULL +#define snd_pcm_sgbuf_ops_silence NULL struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigned long offset); +#endif /* handle mmap counter - PCM mmap callback should handle this counter properly */ static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area) diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index ff07b4a..9e57032 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c @@ -306,6 +306,126 @@ int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm, EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages_for_all); +#ifdef SND_NEEDS_DMA_MMAP_COHERENT +/* + * snd_pcm_sgbuf_ops_copy - copy callback for DMA SG-buffer + */ +int snd_pcm_sgbuf_ops_copy(struct snd_pcm_substream *substream, +
Badness seen on 2.6.26-rc2 with lockdep enabled
I see the following error on my power box at boot up. RTAS: event: 14, Type: Platform Error, Severity: 2 [ cut here ] Badness at kernel/lockdep.c:2680 NIP: c00ae538 LR: c00ae51c CTR: REGS: c000e7b139a0 TRAP: 0700 Not tainted (2.6.26-rc2-mm1) MSR: 80029032 EE,ME,IR,DR CR: 2442 XER: 2000 TASK = c000e7644620[411] 'rtasd' THREAD: c000e7b1 CPU: 1 GPR00: c000e7b13c20 c0a55ef0 0001 GPR04: 0001 c004bfb8 2d373130 2d37313031303438 GPR08: 3620 c0ea3018 0020 0001 GPR12: 3620 c0a94600 GPR16: 41c0 c086f400 GPR20: 0001 00e4 0246f400 GPR24: c0a9c498 0008 c004bfb8 c087a5d8 GPR28: c092cd48 0001 c09bb738 c000e7b13c20 NIP [c00ae538] .check_flags+0x9c/0x174 LR [c00ae51c] .check_flags+0x80/0x174 Call Trace: [c000e7b13c20] [c004bc70] .pSeries_log_error+0x5c/0x400 (unreliable) [c000e7b13ca0] [c00b35c0] .lock_release+0x80/0x204 [c000e7b13d50] [c05cfcf8] ._spin_unlock_irqrestore+0x34/0x94 [c000e7b13de0] [c004bfb8] .pSeries_log_error+0x3a4/0x400 [c000e7b13ef0] [c004c218] .rtasd+0x98/0x100 [c000e7b13f90] [c002848c] .kernel_thread+0x4c/0x68 Instruction dump: e92d01b0 8009085c 2f80 40be002c 481f1b9d 6000 2fa3 419e00c4 e93e80f8 8009 2f80 409e00b4 0fe0 48ac 78290464 80090014 possible reason: unannotated irqs-on. irq event stamp: 30 hardirqs last enabled at (29): [c00b1d98] .trace_hardirqs_on+0x1c/0x3 0 hardirqs last disabled at (30): [c00aebac] .trace_hardirqs_off+0x1c/0x 30 softirqs last enabled at (28): [c008bd08] .__do_softirq+0x180/0x1a8 softirqs last disabled at (21): [c0028124] .call_do_softirq+0x14/0x24 -- 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: ALSA fixes for non-coherent archs (Re: [PATCH] Sam440ep support)
Original-Nachricht Datum: Wed, 14 May 2008 14:26:53 +0200 Von: Takashi Iwai [EMAIL PROTECTED] An: Gerhard Pircher [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], linuxppc-dev@ozlabs.org, [EMAIL PROTECTED] Betreff: ALSA fixes for non-coherent archs (Re: [PATCH] Sam440ep support) At Tue, 06 May 2008 11:16:22 +0200, Gerhard Pircher wrote: Naturally I can do some tests, if you or Takashi come up with a new patch. OK, here is another patch for testing. Since I lost my old patch somewhere (and it's not worth to dig the archive), I wrote it up quickly from scratch. This version should cover both SG and non-SG buffers. It's against the latest git tree. Thanks a lot! I'll test it tonight, if I can get the lastest kernel version running on my A1 (2.6.26-rc1 oopsed already on startup and Kumar's fixmap patch for highmem seems to break dma-noncoherent.c). regards, Gerhard -- 249 Spiele für nur 1 Preis. Die GMX Spieleflatrate schon ab 9,90 Euro. Neu: Asterix bei den Olympischen Spielen: http://flat.games.gmx.de ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/1] ehea: Fix use after free on reboot
Fixes the following use after free oops: ehea: Reboot: freeing all eHEA resources Unable to handle kernel paging request for data at address 0x6b6b6b6b6b6b6c5b Faulting instruction address: 0xd0354488 cpu 0x0: Vector: 300 (Data Access) at [c0002ec6f310] pc: d0354488: .ehea_shutdown_single_port+0x50/0x78 [ehea] lr: d035447c: .ehea_shutdown_single_port+0x44/0x78 [ehea] sp: c0002ec6f590 msr: 80009032 dar: 6b6b6b6b6b6b6c5b dsisr: 4000 current = 0xc000281412e0 paca= 0xc06df300 pid = 10930, comm = reboot enter ? for help [c0002ec6f590] d035d64c .ehea_remove+0x44/0x124 [ehea] (unreliable) [c0002ec6f630] c0319f88 .of_platform_device_remove+0x40/0x58 [c0002ec6f6a0] c0291018 .__device_release_driver+0xb0/0xf0 [c0002ec6f730] c0291120 .driver_detach+0xc8/0xfc [c0002ec6f7c0] c028fe24 .bus_remove_driver+0xb4/0x114 [c0002ec6f850] c0291768 .driver_unregister+0x54/0x74 [c0002ec6f8e0] c031a0c8 .of_unregister_driver+0x14/0x28 [c0002ec6f950] c0023ba0 .ibmebus_unregister_driver+0x10/0x24 [c0002ec6f9c0] d0354180 .ehea_reboot_notifier+0x30/0x4c [ehea] [c0002ec6fa40] c03c95a8 .notifier_call_chain+0x5c/0xcc [c0002ec6fae0] c0082cd4 .__blocking_notifier_call_chain+0x70/0xb0 [c0002ec6fb90] c0075cf8 .kernel_restart_prepare+0x24/0x58 [c0002ec6fc10] c0075f0c .kernel_restart+0x20/0x6c [c0002ec6fc90] c0078674 .sys_reboot+0x1d4/0x290 [c0002ec6fe30] c00086ac syscall_exit+0x0/0x40 --- Exception: c01 (System Call) at 0ff63a40 SP (ffceea50) is in userspace Signed-off-by: Brian King [EMAIL PROTECTED] --- linux-2.6-bjking1/drivers/net/ehea/ehea_main.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/net/ehea/ehea_main.c~ehea_useafter_free_fix drivers/net/ehea/ehea_main.c --- linux-2.6/drivers/net/ehea/ehea_main.c~ehea_useafter_free_fix 2008-05-14 09:38:10.0 -0500 +++ linux-2.6-bjking1/drivers/net/ehea/ehea_main.c 2008-05-14 09:38:10.0 -0500 @@ -3177,11 +3177,12 @@ out_err: static void ehea_shutdown_single_port(struct ehea_port *port) { + struct ehea_adapter *adapter = port-adapter; unregister_netdev(port-netdev); ehea_unregister_port(port); kfree(port-mc_list); free_netdev(port-netdev); - port-adapter-active_ports--; + adapter-active_ports--; } static int ehea_setup_ports(struct ehea_adapter *adapter) _ ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 3/6] [WATCHDOG] mpc83xx_wdt: rename to mpc8xxx_wdt
On May 13, 2008, at 10:53 PM, Chen Gong wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Rothwell Sent: 2008?5?14? 9:45 To: Anton Vorontsov Cc: Wood Scott; linuxppc-dev@ozlabs.org; Wim Van Sebroeck; Tabi Timur Subject: Re: [PATCH 3/6] [WATCHDOG] mpc83xx_wdt: rename to mpc8xxx_wdt On Tue, 13 May 2008 18:14:59 +0400 Anton Vorontsov [EMAIL PROTECTED] wrote: Rename the driver because now we support some MPC86xx processors. What I want to know is that what about watchdog for booke(85xx) ? what about it, its still there in the tree (booke_wdt.c). This driver is for a SoC level watchdog that exists on 8xx, 83xx and 8610. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[BUG] 2.6.26-rc2-mm1 - kernel panic at inet_create() on powerpc
Hi Andrew, 2.6.26-rc2-mm1 kernel panics on powerpc, while running ltp test over it. I have attached the gdb output of the pc and lr registers. The patch list_for_each_rcu-must-die-networking.patch points to changes made to the same lines listed by the gdb output. Unable to handle kernel paging request for data at address 0x Faulting instruction address: 0xc0481fa0 cpu 0x0: Vector: 300 (Data Access) at [c000eae37900] pc: c0481fa0: .inet_create+0xb4/0x330 lr: c0413340: .__sock_create+0x190/0x280 sp: c000eae37b80 msr: 80009032 dar: 0 dsisr: 4001 current = 0xc000cd201500 paca= 0xc07c3480 pid = 6462, comm = socket01 enter ? for help [c000eae37c30] c0413340 .__sock_create+0x190/0x280 [c000eae37cf0] c04137e0 .sys_socket+0x40/0x98 [c000eae37d90] c0438e18 .compat_sys_socketcall+0xc0/0x234 [c000eae37e30] c00086b4 syscall_exit+0x0/0x40 --- Exception: c01 (System Call) at 0ff20484 SP (ffc8f770) is in userspace 0xc0481fa0 is in inet_create (net/ipv4/af_inet.c:290). 285 /* Look for the requested type/protocol pair. */ 286 answer = NULL; 287 lookup_protocol: 288 err = -ESOCKTNOSUPPORT; 289 rcu_read_lock(); 290 list_for_each_entry_rcu(answer, inetsw[sock-type], list) { 291 292 /* Check the non-wild match. */ 293 if (protocol == answer-protocol) { 294 if (protocol != IPPROTO_IP) 0xc0413340 is in __sock_create (net/socket.c:1171). 1166goto out_release; 1167 1168/* Now protected by module ref count */ 1169rcu_read_unlock(); 1170 1171err = pf-create(net, sock, protocol); 1172if (err 0) 1173goto out_module_put; 1174 1175/* -- 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] Xilinx: framebuffer: add compatibility for ml507 dvi core.
On Mon, May 12, 2008 at 1:59 PM, Stephen Neuendorffer [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Likely Sent: Monday, May 12, 2008 12:46 PM To: Stephen Neuendorffer Cc: linuxppc-dev@ozlabs.org; git-dev Subject: Re: [PATCH] Xilinx: framebuffer: add compatibility for ml507 dvi core. On Mon, May 12, 2008 at 1:10 PM, Stephen Neuendorffer [EMAIL PROTECTED] wrote: The best possibility that I see is glopping the compatibility information about what cores are compatible with which drivers and generating something. This is moderately better than blindly treating all cores with the same major version as interface compatible, but still has the potential to blindly declare that core versions are compatible when they are not really compatible. That's okay, the device tree conventions provide for that uncertainty. If compatible includes both the *exact* version and the oldest known *compatible* version (the one the drivers know about) then we're in the situation where 99% of the time it just works. For the 1% of the time when mistakes are made we still have the necessary information to write exceptions in the code to work around bad data. This means code only needs to changes when mistakes are discovered, not for every IP core uprev. My argument was that we should do this by truncating the major version, which is also an established standard that cores *should* follow, but you didn't like that. :) It makes at least as much sense as expressing the compatibility of the driver in the tree in terms of compatibility with some other random driver. In the case of the tft core in particular, there *is* no other driver AFAIK. The whole point of compatible is to describe software interfaces... *if* a device is register level backwards compatible with an older already supported device, *then* it is appropriate to claim compatibility with it. True, the TFT core is not the same as the VGA core. But (as your patch suggests) the register interface is backwards compatible. As for truncating the major version; you're right, I don't like it, but that doesn't mean I cannot be swayed. Best argument is to analogize it with a similar SoC situation. A particular SoC (let's say the MPC8349) will have several revisions to it, but none of that is reflected in the device tree. It's just referred to as fsl,mpc8349. Actual silicon revision is obtainable by software from the PVR/SVR if it *really* needs it. The counter example is the MPC5200/MPC5200b where the 'b' version is explicitly specified in the compatible list (see arch/powerpc/boot/dts/lite5200b.dts). The 5200b is 99% compatible with the original 5200, with only a couple of on chip peripherals not being register level compatible. I'm still not completely certain that fsl,mpc5200b-blah was the right decision, but by being conservative early on means that I can still drop most of the 'b' specifiers at some point in the future without breaking board support. What makes me nervous about FPGA IP cores is that the potential for change is much higher than for an SoC. SoC vendors get very angry customers if a silicon uprev breaks their drivers; especially considering that they could very easily have boards with both the old and new silicon. It does not seem to me like there is quite the same level of pressure too keep the register level interface 100% compatible. So this is the pressure point to apply if you want to change my mind. How confident are you that the major (or minor) revision will remain register level compatible? n I *really* don't want to put this into the device tree generator on a case-by-case basis, so unless there is something that can be generated from whatever meta-information EDK has, I think we're going to have to just have the explicit versions in the drivers for the time being. Can we post process the generated device tree with a table of known compatibility strings (or regexps) for adding the older compatible values? I don't expect the list will be particularly long or hard to maintain and the code to do so should be trivial. Ug, that's just pushing the problem around. This seems as much like an argument for putting wildcards in the compatible bindings in the kernel as anything... Not quite. There is a difference between method used to generate the data, and how the data is interpreted by the kernel (the boundary being what data is actually passed to the kernel). If the tool generates bad/inaccurate data, then it is a bug and it should be fixed. Even better, it is a bug that will be found quickly because the device simply won't work if it binds to the wrong driver. I do not want to load knowledge of all those permutation into the kernel image. (But I do agree that my suggestion was rather smelly) As for wildcards, the big problem is that the definition of a wildcard changes over time as new
Re: [BUG] 2.6.26-rc2-mm1 - kernel panic at inet_create() on powerpc
On Wed, May 14, 2008 at 09:04:07PM +0530, Kamalesh Babulal wrote: Hi Andrew, 2.6.26-rc2-mm1 kernel panics on powerpc, while running ltp test over it. I have attached the gdb output of the pc and lr registers. The patch list_for_each_rcu-must-die-networking.patch points to changes made to the same lines listed by the gdb output. Hmmm Does the panic go away when this patch is reverted? Thanx, Paul Unable to handle kernel paging request for data at address 0x Faulting instruction address: 0xc0481fa0 cpu 0x0: Vector: 300 (Data Access) at [c000eae37900] pc: c0481fa0: .inet_create+0xb4/0x330 lr: c0413340: .__sock_create+0x190/0x280 sp: c000eae37b80 msr: 80009032 dar: 0 dsisr: 4001 current = 0xc000cd201500 paca= 0xc07c3480 pid = 6462, comm = socket01 enter ? for help [c000eae37c30] c0413340 .__sock_create+0x190/0x280 [c000eae37cf0] c04137e0 .sys_socket+0x40/0x98 [c000eae37d90] c0438e18 .compat_sys_socketcall+0xc0/0x234 [c000eae37e30] c00086b4 syscall_exit+0x0/0x40 --- Exception: c01 (System Call) at 0ff20484 SP (ffc8f770) is in userspace 0xc0481fa0 is in inet_create (net/ipv4/af_inet.c:290). 285 /* Look for the requested type/protocol pair. */ 286 answer = NULL; 287 lookup_protocol: 288 err = -ESOCKTNOSUPPORT; 289 rcu_read_lock(); 290 list_for_each_entry_rcu(answer, inetsw[sock-type], list) { 291 292 /* Check the non-wild match. */ 293 if (protocol == answer-protocol) { 294 if (protocol != IPPROTO_IP) 0xc0413340 is in __sock_create (net/socket.c:1171). 1166goto out_release; 1167 1168/* Now protected by module ref count */ 1169rcu_read_unlock(); 1170 1171err = pf-create(net, sock, protocol); 1172if (err 0) 1173goto out_module_put; 1174 1175/* -- 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] Xilinx: framebuffer: add compatibility for ml507 dvi core.
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Likely Sent: Wednesday, May 14, 2008 8:35 AM To: Stephen Neuendorffer Cc: linuxppc-dev@ozlabs.org; git-dev Subject: Re: [PATCH] Xilinx: framebuffer: add compatibility for ml507 dvi core. On Mon, May 12, 2008 at 1:59 PM, Stephen Neuendorffer [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Likely Sent: Monday, May 12, 2008 12:46 PM To: Stephen Neuendorffer Cc: linuxppc-dev@ozlabs.org; git-dev Subject: Re: [PATCH] Xilinx: framebuffer: add compatibility for ml507 dvi core. On Mon, May 12, 2008 at 1:10 PM, Stephen Neuendorffer [EMAIL PROTECTED] wrote: The best possibility that I see is glopping the compatibility information about what cores are compatible with which drivers and generating something. This is moderately better than blindly treating all cores with the same major version as interface compatible, but still has the potential to blindly declare that core versions are compatible when they are not really compatible. That's okay, the device tree conventions provide for that uncertainty. If compatible includes both the *exact* version and the oldest known *compatible* version (the one the drivers know about) then we're in the situation where 99% of the time it just works. For the 1% of the time when mistakes are made we still have the necessary information to write exceptions in the code to work around bad data. This means code only needs to changes when mistakes are discovered, not for every IP core uprev. My argument was that we should do this by truncating the major version, which is also an established standard that cores *should* follow, but you didn't like that. :) It makes at least as much sense as expressing the compatibility of the driver in the tree in terms of compatibility with some other random driver. In the case of the tft core in particular, there *is* no other driver AFAIK. The whole point of compatible is to describe software interfaces... *if* a device is register level backwards compatible with an older already supported device, *then* it is appropriate to claim compatibility with it. True, the TFT core is not the same as the VGA core. But (as your patch suggests) the register interface is backwards compatible. Certainly... I don't think the question is how to do it, I think the question is how to systematically get this information from the people who build the cores, rather than having it put in on a case-by-case basis somewhere down the line. This is as much a Xilinx organizational issue as anything. If we *can't* get it in a systematic way, then I see nothing better than putting it explicitly in the compatible list. The current answer that I've gotten from the IP group is that the systematic way to represent this information is through the major/minor version. Specifically: The brief summary is that in a major.minor.letter version string: - a change of the letter guarantees complete backward compatibility - a change of the minor is new or modified behavior. The register interface should remain compatible, although new features may be added. I wouldn't say this guarantees backward compatibility, though, because default values can change or behavior in general can change. - a change of the major is quite likely to lose backward compatibility. As for truncating the major version; you're right, I don't like it, but that doesn't mean I cannot be swayed. Best argument is to analogize it with a similar SoC situation. A particular SoC (let's say the MPC8349) will have several revisions to it, but none of that is reflected in the device tree. It's just referred to as fsl,mpc8349. Actual silicon revision is obtainable by software from the PVR/SVR if it *really* needs it. The counter example is the MPC5200/MPC5200b where the 'b' version is explicitly specified in the compatible list (see arch/powerpc/boot/dts/lite5200b.dts). The 5200b is 99% compatible with the original 5200, with only a couple of on chip peripherals not being register level compatible. I'm still not completely certain that fsl,mpc5200b-blah was the right decision, but by being conservative early on means that I can still drop most of the 'b' specifiers at some point in the future without breaking board support. What makes me nervous about FPGA IP cores is that the potential for change is much higher than for an SoC. SoC vendors get very angry customers if a silicon uprev breaks their drivers; especially considering that they could very easily have boards with both the old and new silicon. It does not seem to me like there is quite the same level of pressure too keep the register level interface 100% compatible. So this is the pressure point to apply if you want to change my mind. How confident are
Re: [BUG] 2.6.26-rc2-mm1 - kernel panic at inet_create() on powerpc
On Wed, May 14, 2008 at 09:07:05AM -0700, Paul E. McKenney wrote: On Wed, May 14, 2008 at 09:04:07PM +0530, Kamalesh Babulal wrote: Hi Andrew, 2.6.26-rc2-mm1 kernel panics on powerpc, while running ltp test over it. I have attached the gdb output of the pc and lr registers. The patch list_for_each_rcu-must-die-networking.patch points to changes made to the same lines listed by the gdb output. Hmmm Does the panic go away when this patch is reverted? Yes. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [BUG] 2.6.26-rc2-mm1 - kernel panic at inet_create() on powerpc
On Thu, May 15, 2008 at 12:05:46AM +0400, Alexey Dobriyan wrote: On Wed, May 14, 2008 at 09:07:05AM -0700, Paul E. McKenney wrote: On Wed, May 14, 2008 at 09:04:07PM +0530, Kamalesh Babulal wrote: Hi Andrew, 2.6.26-rc2-mm1 kernel panics on powerpc, while running ltp test over it. I have attached the gdb output of the pc and lr registers. The patch list_for_each_rcu-must-die-networking.patch points to changes made to the same lines listed by the gdb output. Hmmm Does the panic go away when this patch is reverted? Yes. OK, am awake now, apologies for my confusion. Not sure -what- state I was in when generating and validating the original... Thanx, Paul ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] POWERPC: Remove ioctl.h content picked up from asm-generic/ioctl.h.
Now that asm-generic/ioctl.h allows overriding of the most commonly changed macros, take advantage of that. Signed-off-by: Robert P. J. Day [EMAIL PROTECTED] --- i *think* this results in an equivalent ioctl.h file, but feel free to check it carefully, and tweak if necessary. diff --git a/include/asm-powerpc/ioctl.h b/include/asm-powerpc/ioctl.h index 8eb9984..57d6830 100644 --- a/include/asm-powerpc/ioctl.h +++ b/include/asm-powerpc/ioctl.h @@ -1,69 +1,13 @@ #ifndef _ASM_POWERPC_IOCTL_H #define _ASM_POWERPC_IOCTL_H - -/* - * this was copied from the alpha as it's a bit cleaner there. - * -- Cort - */ - -#define _IOC_NRBITS8 -#define _IOC_TYPEBITS 8 #define _IOC_SIZEBITS 13 #define _IOC_DIRBITS 3 -#define _IOC_NRMASK((1 _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit. - * And this turns out useful to catch old ioctl numbers in header - * files for us. - */ #define _IOC_NONE 1U #define _IOC_READ 2U #define _IOC_WRITE 4U -#define _IOC(dir,type,nr,size) \ - (((dir) _IOC_DIRSHIFT) | \ -((type) _IOC_TYPESHIFT) | \ -((nr)_IOC_NRSHIFT) | \ -((size) _IOC_SIZESHIFT)) - -/* provoke compile error for invalid uses of size argument */ -extern unsigned int __invalid_size_argument_for_IOC; -#define _IOC_TYPECHECK(t) \ - ((sizeof(t) == sizeof(t[1]) \ - sizeof(t) (1 _IOC_SIZEBITS)) ? \ - sizeof(t) : __invalid_size_argument_for_IOC) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) -#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode them.. */ -#define _IOC_DIR(nr) (((nr) _IOC_DIRSHIFT) _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) _IOC_TYPESHIFT) _IOC_TYPEMASK) -#define _IOC_NR(nr)(((nr) _IOC_NRSHIFT) _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) _IOC_SIZESHIFT) _IOC_SIZEMASK) - -/* various drivers, such as the pcmcia stuff, need these... */ -#define IOC_IN (_IOC_WRITE _IOC_DIRSHIFT) -#define IOC_OUT(_IOC_READ _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) +#include asm-generic/ioctl.h #endif /* _ASM_POWERPC_IOCTL_H */ Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry: Have classroom, will lecture. http://crashcourse.ca Waterloo, Ontario, CANADA ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
New-style I2C driver not getting probed because of_register_i2c_devices() is not setting info.driver_name
I'm converting sound/soc/codecs/cs4270.c into a new-style I2C driver, and this driver is not getting probed. I believe the problem is that i2c_device_match() is returning failure, because of this line: return strcmp(client-driver_name, drv-name) == 0; when this line is executed, client-drivername is blank. Therefore, the strcmp never matches. I think this string is blank because when of_register_i2c_devices() in fsl_soc.c calls i2c_register_board_info(), the info.driver_name field is also blank. i2c_new_device() copies info-driver_name to client-driver_name. I don't understand why this code doesn't work for me. Most of the core I2C code has been in place for a year, and I can't see how my driver is different from any other new-style I2C driver that works on OF platforms. Can anyone help me? -- Timur Tabi Linux kernel developer at Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: ALSA fixes for non-coherent archs (Re: [PATCH] Sam440ep support)
Original-Nachricht Datum: Wed, 14 May 2008 14:26:53 +0200 Von: Takashi Iwai [EMAIL PROTECTED] An: Gerhard Pircher [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], linuxppc-dev@ozlabs.org, [EMAIL PROTECTED] Betreff: ALSA fixes for non-coherent archs (Re: [PATCH] Sam440ep support) At Tue, 06 May 2008 11:16:22 +0200, Gerhard Pircher wrote: Naturally I can do some tests, if you or Takashi come up with a new patch. OK, here is another patch for testing. Since I lost my old patch somewhere (and it's not worth to dig the archive), I wrote it up quickly from scratch. This version should cover both SG and non-SG buffers. It's against the latest git tree. The patch adds a hackish verison of dma_mmap_coherent() for some architectures in sound/core/pcm_native.c. I'm not sure whether this works. I just tested it on X86. It'd be appreciated if someone can test this. Also, this disables HDSPM driver for non-X86/IA64 since the driver has own copy and silence methods that are incompatible with the new SG-buffer data. And, yes, I know we need to clean up huge messes in ALSA memory handling routines. But, let's fix obvious bugs before starting a big rewrite... Okay, it seems to work fine so far. No lock-ups or kernel oopses. Tested with kernel v2.6.26-rc2 and a Soundblaster 5.1/EMU10k1 device (which was not working with the old patch) on my non cache coherent G4 system. Thanks again! Gerhard -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] CS4270 node is misplaced in the MPC8610 device tree
The CS4270 is using the second I2C bus, not the first, on the Freescale MPC8610 HPCD, so its node in the device tree belongs under '[EMAIL PROTECTED]' and not '[EMAIL PROTECTED]'. Signed-off-by: Timur Tabi [EMAIL PROTECTED] --- Kumar, this is a must-fix for 2.6.26. The reason this didn't show up before is because the CS4270 driver is an old-style driver, and so it doesn't actually use the device tree to determine the I2C bus/address. arch/powerpc/boot/dts/mpc8610_hpcd.dts | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index 08a780d..771f169 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts @@ -124,13 +124,6 @@ interrupts = 43 2; interrupt-parent = mpic; dfsrr; - - cs4270:[EMAIL PROTECTED] { - compatible = cirrus,cs4270; - reg = 0x4f; - /* MCLK source is a stand-alone oscillator */ - clock-frequency = 12288000; - }; }; [EMAIL PROTECTED] { @@ -142,6 +135,13 @@ interrupts = 43 2; interrupt-parent = mpic; dfsrr; + + cs4270:[EMAIL PROTECTED] { + compatible = cirrus,cs4270; + reg = 0x4f; + /* MCLK source is a stand-alone oscillator */ + clock-frequency = 12288000; + }; }; serial0: [EMAIL PROTECTED] { -- 1.5.5 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 2/4] powerpc: add i2c pins to dts and board setup
From: Jochen Friedrich [EMAIL PROTECTED] Initialize I2C pins on boards with CPM1/CPM2 controllers. Signed-off-by: Jochen Friedrich [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/powerpc/boot/dts/mpc8272ads.dts | 10 ++ arch/powerpc/boot/dts/mpc866ads.dts | 10 ++ arch/powerpc/boot/dts/mpc885ads.dts | 10 ++ arch/powerpc/platforms/82xx/mpc8272_ads.c|4 arch/powerpc/platforms/8xx/mpc86xads_setup.c |4 arch/powerpc/platforms/8xx/mpc885ads_setup.c |3 +++ 6 files changed, 41 insertions(+) diff -puN arch/powerpc/boot/dts/mpc8272ads.dts~powerpc-add-i2c-pins-to-dts-and-board-setup arch/powerpc/boot/dts/mpc8272ads.dts --- a/arch/powerpc/boot/dts/mpc8272ads.dts~powerpc-add-i2c-pins-to-dts-and-board-setup +++ a/arch/powerpc/boot/dts/mpc8272ads.dts @@ -217,6 +217,16 @@ linux,network-index = 1; fsl,cpm-command = 0x16200300; }; + + [EMAIL PROTECTED] { + compatible = fsl,mpc8272-i2c, +fsl,cpm2-i2c, +fsl,cpm-i2c; + reg = 11860 20 8afc 2; + interrupts = 1 8; + interrupt-parent = PIC; + fsl,cpm-command = 2960; + }; }; PIC: [EMAIL PROTECTED] { diff -puN arch/powerpc/boot/dts/mpc866ads.dts~powerpc-add-i2c-pins-to-dts-and-board-setup arch/powerpc/boot/dts/mpc866ads.dts --- a/arch/powerpc/boot/dts/mpc866ads.dts~powerpc-add-i2c-pins-to-dts-and-board-setup +++ a/arch/powerpc/boot/dts/mpc866ads.dts @@ -171,6 +171,16 @@ fsl,cpm-command = ; linux,network-index = 1; }; + + [EMAIL PROTECTED] { + compatible = fsl,mpc866-i2c, +fsl,cpm1-i2c, +fsl,cpm-i2c; + reg = 860 20 3c80 30; + interrupts = 10; + interrupt-parent = CPM_PIC; + fsl,cpm-command = 0010; + }; }; }; diff -puN arch/powerpc/boot/dts/mpc885ads.dts~powerpc-add-i2c-pins-to-dts-and-board-setup arch/powerpc/boot/dts/mpc885ads.dts --- a/arch/powerpc/boot/dts/mpc885ads.dts~powerpc-add-i2c-pins-to-dts-and-board-setup +++ a/arch/powerpc/boot/dts/mpc885ads.dts @@ -215,6 +215,16 @@ fsl,cpm-command = 0x80; linux,network-index = 2; }; + + [EMAIL PROTECTED] { + compatible = fsl,mpc885-i2c, +fsl,cpm1-i2c, +fsl,cpm-i2c; + reg = 860 20 3c80 30; + interrupts = 10; + interrupt-parent = CPM_PIC; + fsl,cpm-command = 0010; + }; }; }; diff -puN arch/powerpc/platforms/82xx/mpc8272_ads.c~powerpc-add-i2c-pins-to-dts-and-board-setup arch/powerpc/platforms/82xx/mpc8272_ads.c --- a/arch/powerpc/platforms/82xx/mpc8272_ads.c~powerpc-add-i2c-pins-to-dts-and-board-setup +++ a/arch/powerpc/platforms/82xx/mpc8272_ads.c @@ -96,6 +96,10 @@ static struct cpm_pin mpc8272_ads_pins[] {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, {2, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, {2, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, + + /* I2C */ + {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, + {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, }; static void __init init_ioports(void) diff -puN arch/powerpc/platforms/8xx/mpc86xads_setup.c~powerpc-add-i2c-pins-to-dts-and-board-setup arch/powerpc/platforms/8xx/mpc86xads_setup.c --- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c~powerpc-add-i2c-pins-to-dts-and-board-setup +++ a/arch/powerpc/platforms/8xx/mpc86xads_setup.c @@ -65,6 +65,10 @@ static struct cpm_pin mpc866ads_pins[] = {CPM_PORTD, 13, CPM_PIN_OUTPUT}, {CPM_PORTD, 14, CPM_PIN_OUTPUT}, {CPM_PORTD, 15, CPM_PIN_OUTPUT}, + + /* I2C */ + {CPM_PORTB, 26, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN}, + {CPM_PORTB, 27, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN}, }; static void __init init_ioports(void) diff -puN arch/powerpc/platforms/8xx/mpc885ads_setup.c~powerpc-add-i2c-pins-to-dts-and-board-setup arch/powerpc/platforms/8xx/mpc885ads_setup.c ---
[patch 1/4] powerpc: fix for OProfile callgraph for Power 64 bit user apps
From: Carl Love [EMAIL PROTECTED] Fix the 64 bit user code backtrace which currently may hang the system. Signed-off-by: Carl Love [EMAIL PROTECTED] Cc: Maynard Johnson [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/powerpc/oprofile/backtrace.c | 33 ++-- 1 file changed, 27 insertions(+), 6 deletions(-) diff -puN arch/powerpc/oprofile/backtrace.c~powerpc-fix-for-oprofile-callgraph-for-power-64-bit-user-apps arch/powerpc/oprofile/backtrace.c --- a/arch/powerpc/oprofile/backtrace.c~powerpc-fix-for-oprofile-callgraph-for-power-64-bit-user-apps +++ a/arch/powerpc/oprofile/backtrace.c @@ -53,19 +53,40 @@ static unsigned int user_getsp32(unsigne #ifdef CONFIG_PPC64 static unsigned long user_getsp64(unsigned long sp, int is_first) { - unsigned long stack_frame[3]; + unsigned long stk_frm_lr; + unsigned long stk_frm_sp; + unsigned long size; + + /* Issue the __copy_from_user_inatomic() third argument currently +* only takes sizes 1, 2, 4 or 8 bytes. Don't read more then the +* first 48 bytes of the stack frame. That is all that is +* guaranteed to exist. Reading more may cause the system to hang. +* +* 64 bit stack frame layout: +* 0-7 bytes is the pointer to previous stack +* 8-15 bytes condition register save area +* 16-23 bytes link register save area +*/ + size = sizeof(unsigned long); + if (!access_ok(VERIFY_READ, (void __user *)sp, size)) + return 0; - if (!access_ok(VERIFY_READ, (void __user *)sp, sizeof(stack_frame))) + if (__copy_from_user_inatomic(stk_frm_sp, (void __user *)sp, + size)) return 0; - if (__copy_from_user_inatomic(stack_frame, (void __user *)sp, - sizeof(stack_frame))) + /* get the LR from the user stack */ + if (!access_ok(VERIFY_READ, (void __user *)(sp+16), size)) + return 0; + + if (__copy_from_user_inatomic(stk_frm_lr, (void __user *)(sp+16), + size)) return 0; if (!is_first) - oprofile_add_trace(STACK_LR64(stack_frame)); + oprofile_add_trace(stk_frm_lr); - return STACK_SP(stack_frame); + return stk_frm_sp; } #endif _ ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 4/4] spufs: convert nopfn to fault
From: Nick Piggin [EMAIL PROTECTED] spufs: convert nopfn to fault Signed-off-by: Nick Piggin [EMAIL PROTECTED] Acked-by: Jeremy Kerr [EMAIL PROTECTED] Cc: Paul Mackerras [EMAIL PROTECTED] Cc: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/powerpc/platforms/cell/spufs/file.c | 98 - arch/powerpc/platforms/cell/spufs/sputrace.c |8 - 2 files changed, 54 insertions(+), 52 deletions(-) diff -puN arch/powerpc/platforms/cell/spufs/file.c~spufs-convert-nopfn-to-fault arch/powerpc/platforms/cell/spufs/file.c --- a/arch/powerpc/platforms/cell/spufs/file.c~spufs-convert-nopfn-to-fault +++ a/arch/powerpc/platforms/cell/spufs/file.c @@ -237,11 +237,13 @@ spufs_mem_write(struct file *file, const return size; } -static unsigned long spufs_mem_mmap_nopfn(struct vm_area_struct *vma, - unsigned long address) +static int +spufs_mem_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct spu_context *ctx = vma-vm_file-private_data; - unsigned long pfn, offset, addr0 = address; + unsigned long address = (unsigned long)vmf-virtual_address; + unsigned long pfn, offset; + #ifdef CONFIG_SPU_FS_64K_LS struct spu_state *csa = ctx-csa; int psize; @@ -259,15 +261,15 @@ static unsigned long spufs_mem_mmap_nopf } #endif /* CONFIG_SPU_FS_64K_LS */ - offset = (address - vma-vm_start) + (vma-vm_pgoff PAGE_SHIFT); + offset = vmf-pgoff PAGE_SHIFT; if (offset = LS_SIZE) - return NOPFN_SIGBUS; + return VM_FAULT_SIGBUS; - pr_debug(spufs_mem_mmap_nopfn address=0x%lx - 0x%lx, offset=0x%lx\n, -addr0, address, offset); + pr_debug(spufs_mem_mmap_fault address=0x%lx, offset=0x%lx\n, + address, offset); if (spu_acquire(ctx)) - return NOPFN_REFAULT; + return VM_FAULT_NOPAGE; if (ctx-state == SPU_STATE_SAVED) { vma-vm_page_prot = __pgprot(pgprot_val(vma-vm_page_prot) @@ -282,12 +284,12 @@ static unsigned long spufs_mem_mmap_nopf spu_release(ctx); - return NOPFN_REFAULT; + return VM_FAULT_NOPAGE; } static struct vm_operations_struct spufs_mem_mmap_vmops = { - .nopfn = spufs_mem_mmap_nopfn, + .fault = spufs_mem_mmap_fault, }; static int spufs_mem_mmap(struct file *file, struct vm_area_struct *vma) @@ -350,20 +352,19 @@ static const struct file_operations spuf #endif }; -static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma, - unsigned long address, +static int spufs_ps_fault(struct vm_area_struct *vma, + struct vm_fault *vmf, unsigned long ps_offs, unsigned long ps_size) { struct spu_context *ctx = vma-vm_file-private_data; - unsigned long area, offset = address - vma-vm_start; + unsigned long area, offset = vmf-pgoff PAGE_SHIFT; int ret = 0; - spu_context_nospu_trace(spufs_ps_nopfn__enter, ctx); + spu_context_nospu_trace(spufs_ps_fault__enter, ctx); - offset += vma-vm_pgoff PAGE_SHIFT; if (offset = ps_size) - return NOPFN_SIGBUS; + return VM_FAULT_SIGBUS; /* * Because we release the mmap_sem, the context may be destroyed while @@ -377,7 +378,7 @@ static unsigned long spufs_ps_nopfn(stru * pages to hand out to the user, but we don't want to wait * with the mmap_sem held. * It is possible to drop the mmap_sem here, but then we need -* to return NOPFN_REFAULT because the mappings may have +* to return VM_FAULT_NOPAGE because the mappings may have * hanged. */ if (spu_acquire(ctx)) @@ -385,14 +386,15 @@ static unsigned long spufs_ps_nopfn(stru if (ctx-state == SPU_STATE_SAVED) { up_read(current-mm-mmap_sem); - spu_context_nospu_trace(spufs_ps_nopfn__sleep, ctx); + spu_context_nospu_trace(spufs_ps_fault__sleep, ctx); ret = spufs_wait(ctx-run_wq, ctx-state == SPU_STATE_RUNNABLE); - spu_context_trace(spufs_ps_nopfn__wake, ctx, ctx-spu); + spu_context_trace(spufs_ps_fault__wake, ctx, ctx-spu); down_read(current-mm-mmap_sem); } else { area = ctx-spu-problem_phys + ps_offs; - vm_insert_pfn(vma, address, (area + offset) PAGE_SHIFT); - spu_context_trace(spufs_ps_nopfn__insert, ctx, ctx-spu); + vm_insert_pfn(vma, (unsigned long)vmf-virtual_address, + (area + offset) PAGE_SHIFT); + spu_context_trace(spufs_ps_fault__insert, ctx, ctx-spu); } if (!ret) @@ -400,18 +402,18 @@ static unsigned
[patch 3/4] macintosh: replace deprecated __initcall with device_initcall
From: Robert P. J. Day [EMAIL PROTECTED] Signed-off-by: Robert P. J. Day [EMAIL PROTECTED] Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED] Cc: Paul Mackerras [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/macintosh/adb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/macintosh/adb.c~macintosh-replace-deprecated-__initcall-with-device_initcall drivers/macintosh/adb.c --- a/drivers/macintosh/adb.c~macintosh-replace-deprecated-__initcall-with-device_initcall +++ a/drivers/macintosh/adb.c @@ -334,7 +334,7 @@ int __init adb_init(void) return 0; } -__initcall(adb_init); +device_initcall(adb_init); static int do_adb_reset_bus(void) _ ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 1/1] fsldma: the MPC8377MDS board device tree node for fsldma driver
From: Zhang Wei [EMAIL PROTECTED] The fsldma driver is tested on MPC8377MDS board. The patch adds fsldma driver support into MPC8377MDS device tree. Signed-off-by: Zhang Wei [EMAIL PROTECTED] Cc: Nelson, Shannon [EMAIL PROTECTED] Cc: Dan Williams [EMAIL PROTECTED] Cc: Kumar Gala [EMAIL PROTECTED] Cc: Paul Mackerras [EMAIL PROTECTED] Cc: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/powerpc/boot/dts/mpc8377_mds.dts | 27 1 file changed, 27 insertions(+) diff -puN arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver arch/powerpc/boot/dts/mpc8377_mds.dts --- a/arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver +++ a/arch/powerpc/boot/dts/mpc8377_mds.dts @@ -295,6 +295,33 @@ }; }; + [EMAIL PROTECTED] { + #address-cells = 1; + #size-cells = 1; + compatible = fsl,mpc8349-dma; + reg = 0x82a8 4; + ranges = 0 0x8100 0x1a8; + interrupt-parent = ipic; + interrupts = 0x47 8; + cell-index = 0; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0 0x80; + }; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0x80 0x80; + }; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0x100 0x80; + }; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0x180 0x28; + }; + }; + /* IPIC * interrupts cell = intr #, sense * sense values match linux IORESOURCE_IRQ_* defines: _ ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch 2/4] powerpc: add i2c pins to dts and board setup
[EMAIL PROTECTED] wrote: From: Jochen Friedrich [EMAIL PROTECTED] Initialize I2C pins on boards with CPM1/CPM2 controllers. Signed-off-by: Jochen Friedrich [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/powerpc/boot/dts/mpc8272ads.dts | 10 ++ arch/powerpc/boot/dts/mpc866ads.dts | 10 ++ arch/powerpc/boot/dts/mpc885ads.dts | 10 ++ arch/powerpc/platforms/82xx/mpc8272_ads.c|4 arch/powerpc/platforms/8xx/mpc86xads_setup.c |4 arch/powerpc/platforms/8xx/mpc885ads_setup.c |3 +++ 6 files changed, 41 insertions(+) diff -puN arch/powerpc/boot/dts/mpc8272ads.dts~powerpc-add-i2c-pins-to-dts-and-board-setup arch/powerpc/boot/dts/mpc8272ads.dts --- a/arch/powerpc/boot/dts/mpc8272ads.dts~powerpc-add-i2c-pins-to-dts-and-board-setup +++ a/arch/powerpc/boot/dts/mpc8272ads.dts @@ -217,6 +217,16 @@ linux,network-index = 1; fsl,cpm-command = 0x16200300; }; + + [EMAIL PROTECTED] { + compatible = fsl,mpc8272-i2c, +fsl,cpm2-i2c, +fsl,cpm-i2c; + reg = 11860 20 8afc 2; + interrupts = 1 8; + interrupt-parent = PIC; + fsl,cpm-command = 2960; + }; As I pointed out earlier, this patch is sticking dts-v0 style constants into a dts-v1 file. It will not work. We also need to document CPM2 i2c as an exception to the normal interpretation of the second resource for a CPM device in booting-without-of.txt. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch 1/1] fsldma: the MPC8377MDS board device tree node for fsldma driver
[EMAIL PROTECTED] wrote: From: Zhang Wei [EMAIL PROTECTED] The fsldma driver is tested on MPC8377MDS board. The patch adds fsldma driver support into MPC8377MDS device tree. Signed-off-by: Zhang Wei [EMAIL PROTECTED] Cc: Nelson, Shannon [EMAIL PROTECTED] Cc: Dan Williams [EMAIL PROTECTED] Cc: Kumar Gala [EMAIL PROTECTED] Cc: Paul Mackerras [EMAIL PROTECTED] Cc: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/powerpc/boot/dts/mpc8377_mds.dts | 27 1 file changed, 27 insertions(+) diff -puN arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver arch/powerpc/boot/dts/mpc8377_mds.dts --- a/arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver +++ a/arch/powerpc/boot/dts/mpc8377_mds.dts @@ -295,6 +295,33 @@ }; }; + [EMAIL PROTECTED] { + #address-cells = 1; + #size-cells = 1; + compatible = fsl,mpc8349-dma; + reg = 0x82a8 4; + ranges = 0 0x8100 0x1a8; + interrupt-parent = ipic; + interrupts = 0x47 8; + cell-index = 0; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0 0x80; + }; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0x80 0x80; + }; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0x100 0x80; + }; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0x180 0x28; + }; According to booting-without-of.txt, the interrupts property should be repeated in each channel. The driver also needs to be fixed to remember whether it registered a DMA-block-level interrupt handler already, and not try to register a channel interrupt. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Patches added to powerpc.git powerpc-next branch
I have added the following patches to the powerpc-next and master branches of the powerpc.git repository. This includes commits pulled from Kumar's tree. Paul. Andy Fleming (2): [POWERPC] 85xx: Add 8568 PHY workarounds to board code [POWERPC] 85xx: Fix some sparse warnings for 85xx MDS Anton Vorontsov (3): [POWERPC] 86xx: mpc8610_hpcd: use ULI526X driver for on-board ethernet [POWERPC] 86xx: mpc8610_hpcd: add support for NOR and NAND flashes [POWERPC] 86xx: mpc8610_hpcd: fix second serial port Becky Bruce (1): [POWERPC] Delete unused fec_8xx net driver Jeremy McNicoll (1): [POWERPC] 85xx: SBC8548 - Add flash support and HW Rev reporting Kumar Gala (1): [POWERPC] Set lower flag bits in regs-trap to indicate debug level exception Michael Ellerman (12): [POWERPC] Move declaration of init_bootmem_done into system.h [POWERPC] Fix sparse warnings in arch/powerpc/mm [POWERPC] Move declaration of tce variables into mmu-hash64.h [POWERPC] Remove duplicate variable definitions in mm/tlb_64.c [POWERPC] sysdev/mpic_msi.c should include sysdev/mpic.h [POWERPC] Add a declaration for xmon() [POWERPC] Move xmon_irq() declaration into xmon.h [POWERPC] Fix sparse warnings in xmon.c [POWERPC] Make cpus_in_xmon static and remove extern mess from hvc_console.c [POWERPC] Fix sparse warnings in arch/powerpc/kernel [POWERPC] pseries/firmware.c should include pseries/pseries.h [POWERPC] Fix sparse warnings in arch/powerpc/platforms/pseries Olaf Hering (1): [POWERPC] Create modalias file in sysfs for of_platform bus Remi Machet (1): [POWERPC] Create of_buses for MV64x60 devices Roel Kluin (2): [POWERPC] mpic_pasemi_msi: Failed allocation unnoticed [POWERPC] mpic_u3msi: Failed allocation unnoticed Roland McGrath (1): [POWERPC] Define and use TLF_RESTORE_SIGMASK Zhang Wei (1): [POWERPC] 83xx: Enable DMA engine on the MPC8377 MDS board. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch 1/1] fsldma: the MPC8377MDS board device tree node for fsldma driver
[adding Li Yang (new fsldma maintainer) to the cc] On Wed, 2008-05-14 at 16:28 -0700, Scott Wood wrote: [EMAIL PROTECTED] wrote: From: Zhang Wei [EMAIL PROTECTED] The fsldma driver is tested on MPC8377MDS board. The patch adds fsldma driver support into MPC8377MDS device tree. Signed-off-by: Zhang Wei [EMAIL PROTECTED] Cc: Nelson, Shannon [EMAIL PROTECTED] Cc: Dan Williams [EMAIL PROTECTED] Cc: Kumar Gala [EMAIL PROTECTED] Cc: Paul Mackerras [EMAIL PROTECTED] Cc: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/powerpc/boot/dts/mpc8377_mds.dts | 27 1 file changed, 27 insertions(+) diff -puN arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver arch/powerpc/boot/dts/mpc8377_mds.dts --- a/arch/powerpc/boot/dts/mpc8377_mds.dts~fsldma-the-mpc8377mds-board-device-tree-node-for-fsldma-driver +++ a/arch/powerpc/boot/dts/mpc8377_mds.dts @@ -295,6 +295,33 @@ }; }; + [EMAIL PROTECTED] { + #address-cells = 1; + #size-cells = 1; + compatible = fsl,mpc8349-dma; + reg = 0x82a8 4; + ranges = 0 0x8100 0x1a8; + interrupt-parent = ipic; + interrupts = 0x47 8; + cell-index = 0; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0 0x80; + }; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0x80 0x80; + }; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0x100 0x80; + }; + [EMAIL PROTECTED] { + compatible = fsl,mpc8349-dma-channel; + reg = 0x180 0x28; + }; According to booting-without-of.txt, the interrupts property should be repeated in each channel. The driver also needs to be fixed to remember whether it registered a DMA-block-level interrupt handler already, and not try to register a channel interrupt. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] list_for_each_rcu must die: networking
All uses of list_for_each_rcu() can be profitably replaced by the easier-to-use list_for_each_entry_rcu(). This patch makes this change for networking, in preparation for removing the list_for_each_rcu() API entirely. Updated to remove the two now-unused variables as noted by Dave Miller, and also to fix my bonehead error detected by Kamalesh Babulal and Alexey Dobriyan. It now passes LTP on POWER. And also has valid SOB. Some days it just doesn't pay to get out of bed... Acked-by: David S. Miller [EMAIL PROTECTED] (lkml.org/lkml/2008/4/23/448) Signed-off-by: Paul E. McKenney [EMAIL PROTECTED] --- 802/psnap.c |4 +--- ipv4/af_inet.c |9 +++-- ipv6/af_inet6.c |9 +++-- 3 files changed, 7 insertions(+), 15 deletions(-) diff -urpNa -X dontdiff linux-2.6.26-rc2/net/802/psnap.c linux-2.6.26-rc2-lfer-net/net/802/psnap.c --- linux-2.6.26-rc2/net/802/psnap.c2008-04-16 19:49:44.0 -0700 +++ linux-2.6.26-rc2-lfer-net/net/802/psnap.c 2008-05-14 13:38:13.0 -0700 @@ -30,11 +30,9 @@ static struct llc_sap *snap_sap; */ static struct datalink_proto *find_snap_client(unsigned char *desc) { - struct list_head *entry; struct datalink_proto *proto = NULL, *p; - list_for_each_rcu(entry, snap_list) { - p = list_entry(entry, struct datalink_proto, node); + list_for_each_entry_rcu(p, snap_list, node) { if (!memcmp(p-type, desc, 5)) { proto = p; break; diff -urpNa -X dontdiff linux-2.6.26-rc2/net/ipv4/af_inet.c linux-2.6.26-rc2-lfer-net/net/ipv4/af_inet.c --- linux-2.6.26-rc2/net/ipv4/af_inet.c 2008-05-14 13:35:32.0 -0700 +++ linux-2.6.26-rc2-lfer-net/net/ipv4/af_inet.c2008-05-14 13:46:26.0 -0700 @@ -267,7 +267,6 @@ static inline int inet_netns_ok(struct n static int inet_create(struct net *net, struct socket *sock, int protocol) { struct sock *sk; - struct list_head *p; struct inet_protosw *answer; struct inet_sock *inet; struct proto *answer_prot; @@ -284,13 +283,12 @@ static int inet_create(struct net *net, sock-state = SS_UNCONNECTED; /* Look for the requested type/protocol pair. */ - answer = NULL; lookup_protocol: err = -ESOCKTNOSUPPORT; rcu_read_lock(); - list_for_each_rcu(p, inetsw[sock-type]) { - answer = list_entry(p, struct inet_protosw, list); + list_for_each_entry_rcu(answer, inetsw[sock-type], list) { + err = 0; /* Check the non-wild match. */ if (protocol == answer-protocol) { if (protocol != IPPROTO_IP) @@ -305,10 +303,9 @@ lookup_protocol: break; } err = -EPROTONOSUPPORT; - answer = NULL; } - if (unlikely(answer == NULL)) { + if (unlikely(err)) { if (try_loading_module 2) { rcu_read_unlock(); /* diff -urpNa -X dontdiff linux-2.6.26-rc2/net/ipv6/af_inet6.c linux-2.6.26-rc2-lfer-net/net/ipv6/af_inet6.c --- linux-2.6.26-rc2/net/ipv6/af_inet6.c2008-05-14 13:35:32.0 -0700 +++ linux-2.6.26-rc2-lfer-net/net/ipv6/af_inet6.c 2008-05-14 13:45:08.0 -0700 @@ -87,7 +87,6 @@ static int inet6_create(struct net *net, struct inet_sock *inet; struct ipv6_pinfo *np; struct sock *sk; - struct list_head *p; struct inet_protosw *answer; struct proto *answer_prot; unsigned char answer_flags; @@ -101,13 +100,12 @@ static int inet6_create(struct net *net, build_ehash_secret(); /* Look for the requested type/protocol pair. */ - answer = NULL; lookup_protocol: err = -ESOCKTNOSUPPORT; rcu_read_lock(); - list_for_each_rcu(p, inetsw6[sock-type]) { - answer = list_entry(p, struct inet_protosw, list); + list_for_each_entry_rcu(answer, inetsw6[sock-type], list) { + err = 0; /* Check the non-wild match. */ if (protocol == answer-protocol) { if (protocol != IPPROTO_IP) @@ -122,10 +120,9 @@ lookup_protocol: break; } err = -EPROTONOSUPPORT; - answer = NULL; } - if (!answer) { + if (err) { if (try_loading_module 2) { rcu_read_unlock(); /* ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch 1/4] powerpc: fix for OProfile callgraph for Power 64 bit user apps
On Wed, 2008-05-14 at 16:12 -0700, [EMAIL PROTECTED] wrote: From: Carl Love [EMAIL PROTECTED] Fix the 64 bit user code backtrace which currently may hang the system. Signed-off-by: Carl Love [EMAIL PROTECTED] Cc: Maynard Johnson [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Hi Carl, I'm a bit confused by this change .. diff -puN arch/powerpc/oprofile/backtrace.c~powerpc-fix-for-oprofile-callgraph-for-power-64-bit-user-apps arch/powerpc/oprofile/backtrace.c --- a/arch/powerpc/oprofile/backtrace.c~powerpc-fix-for-oprofile-callgraph-for-power-64-bit-user-apps +++ a/arch/powerpc/oprofile/backtrace.c @@ -53,19 +53,40 @@ static unsigned int user_getsp32(unsigne #ifdef CONFIG_PPC64 static unsigned long user_getsp64(unsigned long sp, int is_first) { - unsigned long stack_frame[3]; + unsigned long stk_frm_lr; + unsigned long stk_frm_sp; + unsigned long size; + + /* Issue the __copy_from_user_inatomic() third argument currently + * only takes sizes 1, 2, 4 or 8 bytes. Don't read more then the + * first 48 bytes of the stack frame. That is all that is + * guaranteed to exist. Reading more may cause the system to hang. __copy_from_user_inatomic() accepts any value for n, it just has a special case for 1, 2, 4 and 8 - but it should still work for other values. The old code copied 24 bytes from sp, and the new code copies 8 bytes from sp and 8 bytes from sp + 16 - so I don't see where the 48 bytes comes in to it? Also the comment is a little hard to parse, I think you mean Issue: the .., but I read Issue as a verb in that sentence. And Don't read more then should be than. 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 signature.asc Description: This is a digitally signed message part ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch 4/4] spufs: convert nopfn to fault
Thanks for helping out with merging these Andrew. The problem with this is that these nopfn conversions won't work unless the BUG_ON is removed from mm/memory.c (patch 1/ that I sent you). So there is a little dependency chain here. I guess you could send that patch 1 upstream ASAP, and then let the subsequent non trivial patches filter up in their own time. I don't know, just a heads up. On Wed, May 14, 2008 at 04:12:54PM -0700, Andrew Morton wrote: From: Nick Piggin [EMAIL PROTECTED] spufs: convert nopfn to fault Signed-off-by: Nick Piggin [EMAIL PROTECTED] Acked-by: Jeremy Kerr [EMAIL PROTECTED] Cc: Paul Mackerras [EMAIL PROTECTED] Cc: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/powerpc/platforms/cell/spufs/file.c | 98 - arch/powerpc/platforms/cell/spufs/sputrace.c |8 - 2 files changed, 54 insertions(+), 52 deletions(-) diff -puN arch/powerpc/platforms/cell/spufs/file.c~spufs-convert-nopfn-to-fault arch/powerpc/platforms/cell/spufs/file.c --- a/arch/powerpc/platforms/cell/spufs/file.c~spufs-convert-nopfn-to-fault +++ a/arch/powerpc/platforms/cell/spufs/file.c @@ -237,11 +237,13 @@ spufs_mem_write(struct file *file, const return size; } -static unsigned long spufs_mem_mmap_nopfn(struct vm_area_struct *vma, - unsigned long address) +static int +spufs_mem_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct spu_context *ctx = vma-vm_file-private_data; - unsigned long pfn, offset, addr0 = address; + unsigned long address = (unsigned long)vmf-virtual_address; + unsigned long pfn, offset; + #ifdef CONFIG_SPU_FS_64K_LS struct spu_state *csa = ctx-csa; int psize; @@ -259,15 +261,15 @@ static unsigned long spufs_mem_mmap_nopf } #endif /* CONFIG_SPU_FS_64K_LS */ - offset = (address - vma-vm_start) + (vma-vm_pgoff PAGE_SHIFT); + offset = vmf-pgoff PAGE_SHIFT; if (offset = LS_SIZE) - return NOPFN_SIGBUS; + return VM_FAULT_SIGBUS; - pr_debug(spufs_mem_mmap_nopfn address=0x%lx - 0x%lx, offset=0x%lx\n, - addr0, address, offset); + pr_debug(spufs_mem_mmap_fault address=0x%lx, offset=0x%lx\n, + address, offset); if (spu_acquire(ctx)) - return NOPFN_REFAULT; + return VM_FAULT_NOPAGE; if (ctx-state == SPU_STATE_SAVED) { vma-vm_page_prot = __pgprot(pgprot_val(vma-vm_page_prot) @@ -282,12 +284,12 @@ static unsigned long spufs_mem_mmap_nopf spu_release(ctx); - return NOPFN_REFAULT; + return VM_FAULT_NOPAGE; } static struct vm_operations_struct spufs_mem_mmap_vmops = { - .nopfn = spufs_mem_mmap_nopfn, + .fault = spufs_mem_mmap_fault, }; static int spufs_mem_mmap(struct file *file, struct vm_area_struct *vma) @@ -350,20 +352,19 @@ static const struct file_operations spuf #endif }; -static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma, - unsigned long address, +static int spufs_ps_fault(struct vm_area_struct *vma, + struct vm_fault *vmf, unsigned long ps_offs, unsigned long ps_size) { struct spu_context *ctx = vma-vm_file-private_data; - unsigned long area, offset = address - vma-vm_start; + unsigned long area, offset = vmf-pgoff PAGE_SHIFT; int ret = 0; - spu_context_nospu_trace(spufs_ps_nopfn__enter, ctx); + spu_context_nospu_trace(spufs_ps_fault__enter, ctx); - offset += vma-vm_pgoff PAGE_SHIFT; if (offset = ps_size) - return NOPFN_SIGBUS; + return VM_FAULT_SIGBUS; /* * Because we release the mmap_sem, the context may be destroyed while @@ -377,7 +378,7 @@ static unsigned long spufs_ps_nopfn(stru * pages to hand out to the user, but we don't want to wait * with the mmap_sem held. * It is possible to drop the mmap_sem here, but then we need - * to return NOPFN_REFAULT because the mappings may have + * to return VM_FAULT_NOPAGE because the mappings may have * hanged. */ if (spu_acquire(ctx)) @@ -385,14 +386,15 @@ static unsigned long spufs_ps_nopfn(stru if (ctx-state == SPU_STATE_SAVED) { up_read(current-mm-mmap_sem); - spu_context_nospu_trace(spufs_ps_nopfn__sleep, ctx); + spu_context_nospu_trace(spufs_ps_fault__sleep, ctx); ret = spufs_wait(ctx-run_wq, ctx-state == SPU_STATE_RUNNABLE); - spu_context_trace(spufs_ps_nopfn__wake, ctx, ctx-spu); + spu_context_trace(spufs_ps_fault__wake, ctx, ctx-spu); down_read(current-mm-mmap_sem); } else { area =
Re: [patch 4/4] spufs: convert nopfn to fault
On Thu, 15 May 2008 02:53:05 +0200 Nick Piggin [EMAIL PROTECTED] wrote: Thanks for helping out with merging these Andrew. The problem with this is that these nopfn conversions won't work unless the BUG_ON is removed from mm/memory.c (patch 1/ that I sent you). oh. So there is a little dependency chain here. I guess you could send that patch 1 upstream ASAP, and then let the subsequent non trivial patches filter up in their own time. I don't know, just a heads up. OK, I'll include mm-allow-pfnmap-faults.patch in the next linuswards batch. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [PATCH 3/6] [WATCHDOG] mpc83xx_wdt: rename to mpc8xxx_wdt
-Original Message- From: Kumar Gala [mailto:[EMAIL PROTECTED] Sent: 2008?5?14? 23:03 To: Chen Gong Cc: Stephen Rothwell; Anton Vorontsov; Wood Scott; linuxppc-dev@ozlabs.org; Wim Van Sebroeck; Tabi Timur Subject: Re: [PATCH 3/6] [WATCHDOG] mpc83xx_wdt: rename to mpc8xxx_wdt On May 13, 2008, at 10:53 PM, Chen Gong wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Rothwell Sent: 2008?5?14? 9:45 To: Anton Vorontsov Cc: Wood Scott; linuxppc-dev@ozlabs.org; Wim Van Sebroeck; Tabi Timur Subject: Re: [PATCH 3/6] [WATCHDOG] mpc83xx_wdt: rename to mpc8xxx_wdt On Tue, 13 May 2008 18:14:59 +0400 Anton Vorontsov [EMAIL PROTECTED] wrote: Rename the driver because now we support some MPC86xx processors. What I want to know is that what about watchdog for booke(85xx) ? what about it, its still there in the tree (booke_wdt.c). This driver is for a SoC level watchdog that exists on 8xx, 83xx and 8610. Yeah, I know it well, but I'm just afraid it will take confusion for user. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch 1/4] powerpc: fix for OProfile callgraph for Power 64 bit user apps
Michael Ellerman writes: __copy_from_user_inatomic() accepts any value for n, it just has a special case for 1, 2, 4 and 8 - but it should still work for other values. There is a bug in __copy_from_user_inatomic that http://patchwork.ozlabs.org/linuxppc/patch?id=18418 fixes, and I'm about to send that Linus-wards. Carl, to what extent does that fix eliminate the need for the changes in your patch? Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/2] ftrace ppc: add irqs_disabled_flags to ppc
PPC doesn't have the irqs_disabled_flags needed by ftrace. This patch adds it. Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- include/asm-powerpc/hw_irq.h | 10 ++ 1 file changed, 10 insertions(+) Index: linux-sched-devel.git/include/asm-powerpc/hw_irq.h === --- linux-sched-devel.git.orig/include/asm-powerpc/hw_irq.h 2008-05-14 18:12:21.0 -0700 +++ linux-sched-devel.git/include/asm-powerpc/hw_irq.h 2008-05-14 19:24:59.0 -0700 @@ -59,6 +59,11 @@ extern void iseries_handle_interrupts(vo get_paca()-hard_enabled = 0; \ } while(0) +static inline int irqs_disabled_flags(unsigned long flags) +{ + return flags == 0; +} + #else #if defined(CONFIG_BOOKE) @@ -113,6 +118,11 @@ static inline void local_irq_save_ptr(un #define hard_irq_enable() local_irq_enable() #define hard_irq_disable() local_irq_disable() +static inline int irqs_disabled_flags(unsigned long flags) +{ + return (flags MSR_EE) == 0; +} + #endif /* CONFIG_PPC64 */ /* -- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 0/2] ftrace ported to PPC
The following two patches ports ftrace to PowerPC. I tested this on both my PPC64 box as well as my 32bit PowerBook G4. This applies to the latest sched-devel (with some extra hacks to get that to boot on PPC). This also depends on the CFLAGS_REMOVE_foo.o patches I sent earlier. -- Steve ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/2] ftrace: support for PowerPC
This patch adds full support for ftrace for PowerPC (both 64 and 32 bit). This includes dynamic tracing and function filtering. Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/powerpc/Kconfig |5 arch/powerpc/kernel/Makefile | 14 ++ arch/powerpc/kernel/entry_32.S | 130 arch/powerpc/kernel/entry_64.S | 62 +++ arch/powerpc/kernel/ftrace.c | 165 +++ arch/powerpc/kernel/io.c |3 arch/powerpc/kernel/irq.c|6 - arch/powerpc/kernel/setup_32.c | 11 +- arch/powerpc/kernel/setup_64.c |5 arch/powerpc/platforms/powermac/Makefile |5 kernel/trace/trace_selftest.c| 11 +- 11 files changed, 406 insertions(+), 11 deletions(-) Index: linux-sched-devel.git/arch/powerpc/kernel/io.c === --- linux-sched-devel.git.orig/arch/powerpc/kernel/io.c 2008-05-14 19:30:53.0 -0700 +++ linux-sched-devel.git/arch/powerpc/kernel/io.c 2008-05-14 19:31:48.0 -0700 @@ -120,7 +120,8 @@ EXPORT_SYMBOL(_outsl_ns); #define IO_CHECK_ALIGN(v,a) unsigned long)(v)) ((a) - 1)) == 0) -void _memset_io(volatile void __iomem *addr, int c, unsigned long n) +notrace void +_memset_io(volatile void __iomem *addr, int c, unsigned long n) { void *p = (void __force *)addr; u32 lc = c; Index: linux-sched-devel.git/arch/powerpc/kernel/Makefile === --- linux-sched-devel.git.orig/arch/powerpc/kernel/Makefile 2008-05-14 19:30:53.0 -0700 +++ linux-sched-devel.git/arch/powerpc/kernel/Makefile 2008-05-14 19:31:56.0 -0700 @@ -12,6 +12,18 @@ CFLAGS_prom_init.o += -fPIC CFLAGS_btext.o += -fPIC endif +ifdef CONFIG_FTRACE +# Do not trace early boot code +CFLAGS_REMOVE_cputable.o = -pg +CFLAGS_REMOVE_prom_init.o = -pg + +ifdef CONFIG_DYNAMIC_FTRACE +# dynamic ftrace setup. +CFLAGS_REMOVE_ftrace.o = -pg +endif + +endif + obj-y := cputable.o ptrace.o syscalls.o \ irq.o align.o signal_32.o pmc.o vdso.o \ init_task.o process.o systbl.o idle.o \ @@ -79,6 +91,8 @@ obj-$(CONFIG_KEXEC) += machine_kexec.o obj-$(CONFIG_AUDIT)+= audit.o obj64-$(CONFIG_AUDIT) += compat_audit.o +obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o + obj-$(CONFIG_8XX_MINIMAL_FPEMU) += softemu8xx.o ifneq ($(CONFIG_PPC_INDIRECT_IO),y) Index: linux-sched-devel.git/arch/powerpc/platforms/powermac/Makefile === --- linux-sched-devel.git.orig/arch/powerpc/platforms/powermac/Makefile 2008-05-14 19:30:53.0 -0700 +++ linux-sched-devel.git/arch/powerpc/platforms/powermac/Makefile 2008-05-14 19:31:48.0 -0700 @@ -1,5 +1,10 @@ CFLAGS_bootx_init.o+= -fPIC +ifdef CONFIG_FTRACE +# Do not trace early boot code +CFLAGS_REMOVE_bootx_init.o = -pg +endif + obj-y += pic.o setup.o time.o feature.o pci.o \ sleep.o low_i2c.o cache.o pfunc_core.o \ pfunc_base.o Index: linux-sched-devel.git/arch/powerpc/Kconfig === --- linux-sched-devel.git.orig/arch/powerpc/Kconfig 2008-05-14 19:30:50.0 -0700 +++ linux-sched-devel.git/arch/powerpc/Kconfig 2008-05-14 19:31:56.0 -0700 @@ -106,11 +106,12 @@ config PPC bool default y select HAVE_IDE - select HAVE_OPROFILE + select HAVE_IMMEDIATE + select HAVE_FTRACE select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_LMB - select HAVE_IMMEDIATE + select HAVE_OPROFILE config EARLY_PRINTK bool Index: linux-sched-devel.git/arch/powerpc/kernel/entry_32.S === --- linux-sched-devel.git.orig/arch/powerpc/kernel/entry_32.S 2008-05-14 19:30:50.0 -0700 +++ linux-sched-devel.git/arch/powerpc/kernel/entry_32.S2008-05-14 19:31:56.0 -0700 @@ -1035,3 +1035,133 @@ machine_check_in_rtas: /* XXX load up BATs and panic */ #endif /* CONFIG_PPC_RTAS */ + +#ifdef CONFIG_FTRACE +#ifdef CONFIG_DYNAMIC_FTRACE +_GLOBAL(mcount) +_GLOBAL(_mcount) + stwur1,-48(r1) + stw r3, 12(r1) + stw r4, 16(r1) + stw r5, 20(r1) + stw r6, 24(r1) + mflrr3 + stw r7, 28(r1) + mfcrr5 + stw r8, 32(r1) + stw r9, 36(r1) + stw r10,40(r1) + stw r3, 44(r1) + stw r5, 8(r1) + .globl mcount_call +mcount_call: + bl ftrace_stub + nop + lwz r6, 8(r1) +
Re: [patch 3/4] macintosh: replace deprecated __initcall with device_initcall
[EMAIL PROTECTED] writes: -__initcall(adb_init); +device_initcall(adb_init); There's no particular reason why this needs to go in 2.6.26, is there? It looks to me like something that I should queue up for 2.6.27. Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 0/2] ftrace ported to PPC
Steven Rostedt writes: The following two patches ports ftrace to PowerPC. I tested this on both my PPC64 box as well as my 32bit PowerBook G4. Very cool! Thanks. This applies to the latest sched-devel (with some extra hacks to get that to boot on PPC). This also depends on the CFLAGS_REMOVE_foo.o patches I sent earlier. Ingo, when do you intend to send the ftrace stuff to Linus? In the next merge window? Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
linux-next: powercp-next build failure
Hi Paul, Today's linux-next build (sparc64 defconfig) fails like this: drivers/of/device.c: In function `modalias_show': drivers/of/device.c:66: error: implicit declaration of function `of_device_get_modalias' Caused by commit 140b932f8cb6cced10b96860651a198b1b89cbb9 ([POWERPC] Create modalias file in sysfs for of_platform bus) from the powerpc-next tree as there is a definition and declaration of of_device_get_modalias only for powerpc. I reverted that commit for today. -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgp4NniuQD0fY.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] list_for_each_rcu must die: networking
Paul E. McKenney wrote: All uses of list_for_each_rcu() can be profitably replaced by the easier-to-use list_for_each_entry_rcu(). This patch makes this change for networking, in preparation for removing the list_for_each_rcu() API entirely. Updated to remove the two now-unused variables as noted by Dave Miller, and also to fix my bonehead error detected by Kamalesh Babulal and Alexey Dobriyan. It now passes LTP on POWER. And also has valid SOB. Some days it just doesn't pay to get out of bed... Hi Paul, Thanks, the patch fixes the oops. Tested-by: Kamalesh Babulal [EMAIL PROTECTED] Acked-by: David S. Miller [EMAIL PROTECTED] (lkml.org/lkml/2008/4/23/448) Signed-off-by: Paul E. McKenney [EMAIL PROTECTED] --- 802/psnap.c |4 +--- ipv4/af_inet.c |9 +++-- ipv6/af_inet6.c |9 +++-- 3 files changed, 7 insertions(+), 15 deletions(-) diff -urpNa -X dontdiff linux-2.6.26-rc2/net/802/psnap.c linux-2.6.26-rc2-lfer-net/net/802/psnap.c --- linux-2.6.26-rc2/net/802/psnap.c 2008-04-16 19:49:44.0 -0700 +++ linux-2.6.26-rc2-lfer-net/net/802/psnap.c 2008-05-14 13:38:13.0 -0700 @@ -30,11 +30,9 @@ static struct llc_sap *snap_sap; */ static struct datalink_proto *find_snap_client(unsigned char *desc) { - struct list_head *entry; struct datalink_proto *proto = NULL, *p; - list_for_each_rcu(entry, snap_list) { - p = list_entry(entry, struct datalink_proto, node); + list_for_each_entry_rcu(p, snap_list, node) { if (!memcmp(p-type, desc, 5)) { proto = p; break; diff -urpNa -X dontdiff linux-2.6.26-rc2/net/ipv4/af_inet.c linux-2.6.26-rc2-lfer-net/net/ipv4/af_inet.c --- linux-2.6.26-rc2/net/ipv4/af_inet.c 2008-05-14 13:35:32.0 -0700 +++ linux-2.6.26-rc2-lfer-net/net/ipv4/af_inet.c 2008-05-14 13:46:26.0 -0700 @@ -267,7 +267,6 @@ static inline int inet_netns_ok(struct n static int inet_create(struct net *net, struct socket *sock, int protocol) { struct sock *sk; - struct list_head *p; struct inet_protosw *answer; struct inet_sock *inet; struct proto *answer_prot; @@ -284,13 +283,12 @@ static int inet_create(struct net *net, sock-state = SS_UNCONNECTED; /* Look for the requested type/protocol pair. */ - answer = NULL; lookup_protocol: err = -ESOCKTNOSUPPORT; rcu_read_lock(); - list_for_each_rcu(p, inetsw[sock-type]) { - answer = list_entry(p, struct inet_protosw, list); + list_for_each_entry_rcu(answer, inetsw[sock-type], list) { + err = 0; /* Check the non-wild match. */ if (protocol == answer-protocol) { if (protocol != IPPROTO_IP) @@ -305,10 +303,9 @@ lookup_protocol: break; } err = -EPROTONOSUPPORT; - answer = NULL; } - if (unlikely(answer == NULL)) { + if (unlikely(err)) { if (try_loading_module 2) { rcu_read_unlock(); /* diff -urpNa -X dontdiff linux-2.6.26-rc2/net/ipv6/af_inet6.c linux-2.6.26-rc2-lfer-net/net/ipv6/af_inet6.c --- linux-2.6.26-rc2/net/ipv6/af_inet6.c 2008-05-14 13:35:32.0 -0700 +++ linux-2.6.26-rc2-lfer-net/net/ipv6/af_inet6.c 2008-05-14 13:45:08.0 -0700 @@ -87,7 +87,6 @@ static int inet6_create(struct net *net, struct inet_sock *inet; struct ipv6_pinfo *np; struct sock *sk; - struct list_head *p; struct inet_protosw *answer; struct proto *answer_prot; unsigned char answer_flags; @@ -101,13 +100,12 @@ static int inet6_create(struct net *net, build_ehash_secret(); /* Look for the requested type/protocol pair. */ - answer = NULL; lookup_protocol: err = -ESOCKTNOSUPPORT; rcu_read_lock(); - list_for_each_rcu(p, inetsw6[sock-type]) { - answer = list_entry(p, struct inet_protosw, list); + list_for_each_entry_rcu(answer, inetsw6[sock-type], list) { + err = 0; /* Check the non-wild match. */ if (protocol == answer-protocol) { if (protocol != IPPROTO_IP) @@ -122,10 +120,9 @@ lookup_protocol: break; } err = -EPROTONOSUPPORT; - answer = NULL; } - if (!answer) { + if (err) { if (try_loading_module 2) { rcu_read_unlock(); /* -- -- 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 2/2] ftrace: support for PowerPC
From: Steven Rostedt [EMAIL PROTECTED] Date: Wed, 14 May 2008 23:49:44 -0400 +#ifdef CONFIG_FTRACE +#ifdef CONFIG_DYNAMIC_FTRACE +_GLOBAL(mcount) +_GLOBAL(_mcount) + stwur1,-48(r1) + stw r3, 12(r1) + stw r4, 16(r1) + stw r5, 20(r1) + stw r6, 24(r1) + mflrr3 + stw r7, 28(r1) + mfcrr5 + stw r8, 32(r1) + stw r9, 36(r1) + stw r10,40(r1) + stw r3, 44(r1) + stw r5, 8(r1) Yikes, that's really expensive. Can't you do a tail call and let the function you end up calling do all the callee-saved register pops onto the stack? That's what I did on sparc. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: ALSA fixes for non-coherent archs (Re: [PATCH] Sam440ep support)
At Wed, 14 May 2008 23:01:10 +0200, Gerhard Pircher wrote: Original-Nachricht Datum: Wed, 14 May 2008 14:26:53 +0200 Von: Takashi Iwai [EMAIL PROTECTED] An: Gerhard Pircher [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], linuxppc-dev@ozlabs.org, [EMAIL PROTECTED] Betreff: ALSA fixes for non-coherent archs (Re: [PATCH] Sam440ep support) At Tue, 06 May 2008 11:16:22 +0200, Gerhard Pircher wrote: Naturally I can do some tests, if you or Takashi come up with a new patch. OK, here is another patch for testing. Since I lost my old patch somewhere (and it's not worth to dig the archive), I wrote it up quickly from scratch. This version should cover both SG and non-SG buffers. It's against the latest git tree. The patch adds a hackish verison of dma_mmap_coherent() for some architectures in sound/core/pcm_native.c. I'm not sure whether this works. I just tested it on X86. It'd be appreciated if someone can test this. Also, this disables HDSPM driver for non-X86/IA64 since the driver has own copy and silence methods that are incompatible with the new SG-buffer data. And, yes, I know we need to clean up huge messes in ALSA memory handling routines. But, let's fix obvious bugs before starting a big rewrite... Okay, it seems to work fine so far. No lock-ups or kernel oopses. Tested with kernel v2.6.26-rc2 and a Soundblaster 5.1/EMU10k1 device (which was not working with the old patch) on my non cache coherent G4 system. Good to hear. The next step is to move dma_mmap_coherent() to arch/* directories... Takashi ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev