[PATCH] Fix carry bug in 128-bit unsigned integer adding

2008-01-06 Thread Liu Yu
This bug exists in math emulation for powerpc. The macro define are mainly used by multiplication. When adding two unsigned operands ( r = x + y ), the carry bit can be counted by whether r is less than x. However, when adding three unsigned operands, this method does not work. The original code

[PATCH] Fix remainder calculating bug in single floating point division

2008-01-06 Thread Liu Yu
This bug exists in the emulation of floating point division for powerpc. The original code cannot count the remainder correctly. I can provide a test case to trigger this bug. When use fdiv to count 1.1754941e-38f / 0.999f, the result is expected to be 1.175494e-38f, but we will get

Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-06 Thread Benjamin Herrenschmidt
On Sun, 2008-01-06 at 22:26 +0800, Liu Yu wrote: This bug exists in the emulation of floating point division for powerpc. The original code cannot count the remainder correctly. I can provide a test case to trigger this bug. When use fdiv to count 1.1754941e-38f / 0.999f, the result

Re: Enable RTC for Ebony and Walnut

2008-01-06 Thread Olof Johansson
On Wed, Jan 02, 2008 at 10:42:08PM +1100, David Gibson wrote: On Fri, Dec 21, 2007 at 03:29:22PM -0600, Olof Johansson wrote: Hi, On Fri, Dec 21, 2007 at 01:21:30PM +1100, David Gibson wrote: Index: working-2.6/arch/powerpc/platforms/Kconfig

Re: [patch 2/3] PS3: Add logical performance monitor device support

2008-01-06 Thread Geoff Levand
On 01/05/2008 03:29 AM, Arnd Bergmann wrote: On Saturday 05 January 2008, Geoff Levand wrote: + struct layout { + struct ps3_system_bus_device dev; + } *p; What's the point of this data structure? You don't use the struct anywhere, and it only has one member, so

Re: [patch 3/3] PS3: Add logical performance monitor driver support

2008-01-06 Thread Geoff Levand
On 01/05/2008 03:56 AM, Arnd Bergmann wrote: On Saturday 05 January 2008, Geoff Levand wrote: From: Takashi Yamamoto [EMAIL PROTECTED] Add PS3 logical performance monitor (lpm) device driver. The PS3's LV1 hypervisor provides a Logical Performance Monitor that abstarcts the Cell

Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-06 Thread Benjamin Herrenschmidt
On Sun, 2008-01-06 at 12:44 -0800, Dan Malek wrote: While it's convenient, I still don't think kernel float emulation should be a solution. The tools should generate soft-float for the applications and libraries. I agree, for deployement, it's definitely not a solution, though it's very

Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-06 Thread Dan Malek
On Jan 6, 2008, at 12:07 PM, Benjamin Herrenschmidt wrote: It's nice to see somebody digging in that scary math emu stuff. If you could also get rid of the warnings, it would be perfect :-) Yes, it is :-) I didn't think it would have a life beyond MPC8xx. that this code was lifted

Re: [patch 3/3] PS3: Add logical performance monitor driver support

2008-01-06 Thread Arnd Bergmann
On Sunday 06 January 2008, Geoff Levand wrote: This mutex is documented as the 'open/close' mutex and you use it to prevent concurrent execution of the open and close functions. However, it's unclear what data structures are actually protected by it. I think this is the result of

Re: [PATCH 2/3] Handle absolute pathnames correctly in dtc_open_file.

2008-01-06 Thread Scott Wood
On Sun, Jan 06, 2008 at 02:37:16PM +1100, David Gibson wrote: out: + free((void *)file-dir); That cast shouldn't be there. It generates a constness warning otherwise. I was on the fence over whether to just remove the constness (even though the data is never modified during its

Re: [PATCH 2/3] Look for include files in the directory of the including file.

2008-01-06 Thread Scott Wood
On Fri, Jan 04, 2008 at 03:27:39PM +1100, David Gibson wrote: + newfile = dtc_open_file(filename, searchptr); + if (!newfile) { + yyerrorf(Couldn't open \%s\: %s, +filename, strerror(errno)); + exit(1); Use die() here, that's what it's for.

Re: [PATCH 3/3] Return a non-zero exit code if an error occurs during dts parsing.

2008-01-06 Thread Scott Wood
On Fri, Jan 04, 2008 at 03:30:33PM +1100, David Gibson wrote: This is unequivocally wrong. boot_info should have information about the contents of the blob, not state information like the error. This blob is invalid *is* information about the contents of the blob. If you're going to use an

Re: OProfile callgraph support not working correctly on PPC processors

2008-01-06 Thread Anton Blanchard
Hi, I have been investigating why I have not been able to get callgraph code for OProfile on Cell to work correctly and I am pretty sure that I have run into a problem that is common across all the Power platforms. (At least the other ones I have looked at.) I have a simple test program

Re: [PATCH] Fix remainder calculating bug in single floating point division

2008-01-06 Thread Josh Boyer
On Mon, 07 Jan 2008 07:49:33 +1100 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: On Sun, 2008-01-06 at 12:44 -0800, Dan Malek wrote: While it's convenient, I still don't think kernel float emulation should be a solution. The tools should generate soft-float for the applications and

[PATCH] [POWERPC] Check that the syscall table matches the syscall numbers

2008-01-06 Thread Stephen Rothwell
Also check that __NR_syscalls has been updated appropriately. Hopefully this will catch any out of order additions to the table in the future. Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] --- arch/powerpc/kernel/Makefile | 10 ++ arch/powerpc/kernel/systbl_chk.c | 58

[PATCH update -mm 16/43] powerpc user_regset compat

2008-01-06 Thread Roland McGrath
This patch replaces my 2007-12-20 patch by the same title, and has to take its place in the order of applying that whole series. Further testing revealed a bug that resulted in regset-based core dumps of 32-bit processes on 64-bit kernels having r0..r3 cleared to zero. The fix (interdiff from

How to write a device driver in such a fashion .????

2008-01-06 Thread Misbah khan
Hi all I need your suggession to write a driver with such requirements :- On Initiation by the application of which key is pressed driver should perform the task accordingly. There are 7 keys so seven different task the driver will perform. 1 . I do not want to use any entry point such