[PATCH 5/9] uprobes: allow arch-specific initialization

2012-10-14 Thread Rabin Vincent
Add a weak function for any architecture-specific initialization. ARM will use this to register the handlers for the undefined instructions it uses to implement uprobes. Signed-off-by: Rabin Vincent --- include/linux/uprobes.h |1 + kernel/events/uprobes.c | 10 ++ 2 files

[PATCH 8/9] ARM: support uprobe handling

2012-10-14 Thread Rabin Vincent
in the table to specify a custom decoder function. Thumb is not handled. Cc: Jon Medhurst Signed-off-by: Rabin Vincent --- arch/arm/include/asm/kprobes.h | 17 +--- arch/arm/include/asm/probes.h| 23 + arch/arm/kernel/kprobes-arm.c| 27 +- arch/arm/kernel/kprobes-common.c

[PATCH 7/9] uprobes: add arch write opcode hook

2012-10-14 Thread Rabin Vincent
Allow arches to write the opcode with a custom function. ARM needs to customize the swbp instruction depending on the condition code of the instruction it replaces. Signed-off-by: Rabin Vincent --- include/linux/uprobes.h |3 +++ kernel/events/uprobes.c |8 +++- 2 files changed, 10

[PATCH 3/9] uprobes: allow ignoring of probe hits

2012-10-14 Thread Rabin Vincent
Allow arches to decided to ignore a probe hit. ARM will use this to only call handlers if the conditions to execute a conditionally executed instruction are satisfied. Signed-off-by: Rabin Vincent --- include/linux/uprobes.h |1 + kernel/events/uprobes.c | 14 +- 2 files

[PATCH 1/9] uprobes: move function declarations out of arch

2012-10-14 Thread Rabin Vincent
It seems odd to keep the function declarations in the arch header where they will need to be copy/pasted verbatim across arches. Move them to the common header. Signed-off-by: Rabin Vincent --- arch/x86/include/asm/uprobes.h |6 -- include/linux/uprobes.h|8 2

[PATCH 1/9] uprobes: move function declarations out of arch

2012-10-14 Thread Rabin Vincent
It seems odd to keep the function declarations in the arch header where they will need to be copy/pasted verbatim across arches. Move them to the common header. Signed-off-by: Rabin Vincent ra...@rab.in --- arch/x86/include/asm/uprobes.h |6 -- include/linux/uprobes.h|8

[PATCH 3/9] uprobes: allow ignoring of probe hits

2012-10-14 Thread Rabin Vincent
Allow arches to decided to ignore a probe hit. ARM will use this to only call handlers if the conditions to execute a conditionally executed instruction are satisfied. Signed-off-by: Rabin Vincent ra...@rab.in --- include/linux/uprobes.h |1 + kernel/events/uprobes.c | 14

[PATCH 7/9] uprobes: add arch write opcode hook

2012-10-14 Thread Rabin Vincent
Allow arches to write the opcode with a custom function. ARM needs to customize the swbp instruction depending on the condition code of the instruction it replaces. Signed-off-by: Rabin Vincent ra...@rab.in --- include/linux/uprobes.h |3 +++ kernel/events/uprobes.c |8 +++- 2 files

[PATCH 8/9] ARM: support uprobe handling

2012-10-14 Thread Rabin Vincent
in the table to specify a custom decoder function. Thumb is not handled. Cc: Jon Medhurst t...@yxit.co.uk Signed-off-by: Rabin Vincent ra...@rab.in --- arch/arm/include/asm/kprobes.h | 17 +--- arch/arm/include/asm/probes.h| 23 + arch/arm/kernel/kprobes-arm.c| 27 +- arch

[PATCH 5/9] uprobes: allow arch-specific initialization

2012-10-14 Thread Rabin Vincent
Add a weak function for any architecture-specific initialization. ARM will use this to register the handlers for the undefined instructions it uses to implement uprobes. Signed-off-by: Rabin Vincent ra...@rab.in --- include/linux/uprobes.h |1 + kernel/events/uprobes.c | 10 ++ 2

[PATCH 9/9] ARM: add uprobes support

2012-10-14 Thread Rabin Vincent
-by: Rabin Vincent ra...@rab.in --- arch/arm/Kconfig |4 + arch/arm/include/asm/ptrace.h |6 ++ arch/arm/include/asm/thread_info.h |5 +- arch/arm/include/asm/uprobes.h | 34 +++ arch/arm/kernel/Makefile |1 + arch/arm/kernel/signal.c

[PATCH 4/9] uprobes: allow arch access to xol slot

2012-10-14 Thread Rabin Vincent
Allow arches to customize how the instruction is filled into the xol slot. ARM will use this to insert an undefined instruction after the real instruction in order to simulate a single step of the instruction without hardware support. Signed-off-by: Rabin Vincent ra...@rab.in --- include/linux

[PATCH 6/9] uprobes: flush cache after xol write

2012-10-14 Thread Rabin Vincent
Flush the cache so that the instructions written to the XOL area are visible. Signed-off-by: Rabin Vincent ra...@rab.in --- kernel/events/uprobes.c |1 + 1 file changed, 1 insertion(+) diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index ca000a9..8c52f93 100644 --- a/kernel

[PATCH 2/9] uprobes: check for single step support

2012-10-14 Thread Rabin Vincent
Check for single step support before calling user_enable_single_step(), since user_enable_single_step() just BUG()s if support does not exist. Needed by ARM. Signed-off-by: Rabin Vincent ra...@rab.in --- kernel/events/uprobes.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

Re: CMA and zone watermarks

2012-10-09 Thread Rabin Vincent
Hi Marek, Minchan, 2012/10/9 Marek Szyprowski : > Could You run your test with latest linux-next kernel? There have been some > patches merged to akpm tree which should fix accounting for free and free > cma pages. I hope it should fix this issue. I've tested with the mentioned patches (which

Re: CMA and zone watermarks

2012-10-09 Thread Rabin Vincent
Hi Marek, Minchan, 2012/10/9 Marek Szyprowski m.szyprow...@samsung.com: Could You run your test with latest linux-next kernel? There have been some patches merged to akpm tree which should fix accounting for free and free cma pages. I hope it should fix this issue. I've tested with the

CMA and zone watermarks

2012-10-08 Thread Rabin Vincent
It appears that when CMA is enabled, the zone watermarks are not properly respected, leading to for example GFP_NOWAIT allocations getting access to the high pools. I ran the following test code which simply allocates pages with GFP_NOWAIT until it fails, and then tries GFP_ATOMIC. Without CMA,

[PATCH] mm: show migration types in show_mem

2012-10-08 Thread Rabin Vincent
*256kB 1*512kB 1*1024kB 1*2048kB 3*4096kB = 16128kB After the patch, it's obvious that the reason is that all of these are in the MIGRATE_CMA (C) freelist: Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 1*256kB (C) 1*512kB (C) 1*1024kB (C) 1*2048kB (C) 3*4096kB (C) = 16128kB Signed-off-by: Rabin

[PATCH] mm: show migration types in show_mem

2012-10-08 Thread Rabin Vincent
*256kB 1*512kB 1*1024kB 1*2048kB 3*4096kB = 16128kB After the patch, it's obvious that the reason is that all of these are in the MIGRATE_CMA (C) freelist: Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 1*256kB (C) 1*512kB (C) 1*1024kB (C) 1*2048kB (C) 3*4096kB (C) = 16128kB Signed-off-by: Rabin

CMA and zone watermarks

2012-10-08 Thread Rabin Vincent
It appears that when CMA is enabled, the zone watermarks are not properly respected, leading to for example GFP_NOWAIT allocations getting access to the high pools. I ran the following test code which simply allocates pages with GFP_NOWAIT until it fails, and then tries GFP_ATOMIC. Without CMA,

Re: [PATCH 3/4] lib: vsprintf: Optimize put_dec_trunc8

2012-09-23 Thread Rabin Vincent
2012/8/3 George Spelvin : > If you're going to have a conditional branch after > each 32x32->64-bit multiply, might as well shrink the code > and make it a loop. > > This also avoids using the long multiply for small integers. > > (This leaves the comments in a confusing state, but that's a

Re: [PATCH 3/4] lib: vsprintf: Optimize put_dec_trunc8

2012-09-23 Thread Rabin Vincent
2012/8/3 George Spelvin li...@horizon.com: If you're going to have a conditional branch after each 32x32-64-bit multiply, might as well shrink the code and make it a loop. This also avoids using the long multiply for small integers. (This leaves the comments in a confusing state, but that's

Re: [PATCH V2] regulator: disable supply regulator if it is enabled for boot-on

2012-08-30 Thread Rabin Vincent
2012/8/29 Laxman Dewangan : > @@ -3614,8 +3615,11 @@ static int __init regulator_init_complete(void) > > mutex_lock(>mutex); > > - if (rdev->use_count) > + if (rdev->use_count) { > + if (rdev->supply && c->boot_on) > +

Re: [PATCH V2] regulator: disable supply regulator if it is enabled for boot-on

2012-08-30 Thread Rabin Vincent
2012/8/29 Laxman Dewangan ldewan...@nvidia.com: @@ -3614,8 +3615,11 @@ static int __init regulator_init_complete(void) mutex_lock(rdev-mutex); - if (rdev-use_count) + if (rdev-use_count) { + if (rdev-supply c-boot_on) +

Re: [PATCH] regulator: disable supply regulator if it is enabled for boot-on

2012-08-28 Thread Rabin Vincent
2012/8/28 Laxman Dewangan : > I tried to reproduce the lockup issue with the following change but not > seeing any lockup issue. Did you enable CONFIG_PROVE_LOCKING? > Also reviewing the change, I am not seeing any call trace where the > recursive locking happening. There's probably no actual

Re: [PATCH] regulator: disable supply regulator if it is enabled for boot-on

2012-08-28 Thread Rabin Vincent
2012/8/28 Laxman Dewangan ldewan...@nvidia.com: I tried to reproduce the lockup issue with the following change but not seeing any lockup issue. Did you enable CONFIG_PROVE_LOCKING? Also reviewing the change, I am not seeing any call trace where the recursive locking happening. There's

Re: [PATCH] regulator: disable supply regulator if it is enabled for boot-on

2012-08-24 Thread Rabin Vincent
On Fri, Aug 24, 2012 at 11:22:05PM +0530, Laxman Dewangan wrote: > I tried to reproduce the issue but could not able to do this. > Can you please send me your board/dt files where you are porviding > platform data for regulator? > This will help me to reproduce the issue. Here's a dts patch:

Re: [PATCH] regulator: disable supply regulator if it is enabled for boot-on

2012-08-24 Thread Rabin Vincent
On Fri, Aug 24, 2012 at 11:22:05PM +0530, Laxman Dewangan wrote: I tried to reproduce the issue but could not able to do this. Can you please send me your board/dt files where you are porviding platform data for regulator? This will help me to reproduce the issue. Here's a dts patch: diff

Re: [PATCH] regulator: disable supply regulator if it is enabled for boot-on

2012-08-14 Thread Rabin Vincent
2012/8/14 Laxman Dewangan : > If supply regulator is enabled because of boot-on (not always-on) > then disable regulator need to be call if regulator have some > user or full constraint has been enabled. > This will make sure that reference count of supply regulator > is in sync with child

Re: "regulator: Enable supply regulator if child rail is enabled" broken?

2012-08-14 Thread Rabin Vincent
2012/8/14 Laxman Dewangan : > Yaah, It is missing the regulator_disable() in regulator_init_complete() for > some cases. > Please let me know if I need to send patch for fixing this issue. Yes, please do. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

"regulator: Enable supply regulator if child rail is enabled" broken?

2012-08-14 Thread Rabin Vincent
It appears that this patch causes incorrect reference counting on supply regulators if the child regulator is enabled with for example boot_on=true: commit b2296bd43e781976743354c668a356b0df98e1da Author: Laxman Dewangan Date: Mon Jan 2 13:08:45 2012 +0530 regulator: Enable supply

regulator: Enable supply regulator if child rail is enabled broken?

2012-08-14 Thread Rabin Vincent
It appears that this patch causes incorrect reference counting on supply regulators if the child regulator is enabled with for example boot_on=true: commit b2296bd43e781976743354c668a356b0df98e1da Author: Laxman Dewangan ldewan...@nvidia.com Date: Mon Jan 2 13:08:45 2012 +0530 regulator:

Re: regulator: Enable supply regulator if child rail is enabled broken?

2012-08-14 Thread Rabin Vincent
2012/8/14 Laxman Dewangan ldewan...@nvidia.com: Yaah, It is missing the regulator_disable() in regulator_init_complete() for some cases. Please let me know if I need to send patch for fixing this issue. Yes, please do. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in

Re: [PATCH] regulator: disable supply regulator if it is enabled for boot-on

2012-08-14 Thread Rabin Vincent
2012/8/14 Laxman Dewangan ldewan...@nvidia.com: If supply regulator is enabled because of boot-on (not always-on) then disable regulator need to be call if regulator have some user or full constraint has been enabled. This will make sure that reference count of supply regulator is in sync

Re: [PATCH] Remove unneeded code in sys_getpriority

2008-02-03 Thread Rabin Vincent
On Sun, Feb 03, 2008 at 10:54:45AM +0100, Frank Seidel wrote: > On Sunday 03 February 2008 04:04, Rabin Vincent wrote: > > This check is not required because the condition is always true. > > ... > > - if (niceval > retval) > > -

Re: [PATCH] Remove unneeded code in sys_getpriority

2008-02-03 Thread Rabin Vincent
On Sun, Feb 03, 2008 at 10:54:45AM +0100, Frank Seidel wrote: On Sunday 03 February 2008 04:04, Rabin Vincent wrote: This check is not required because the condition is always true. ... - if (niceval retval) - retval = niceval

[PATCH] Remove unneeded code in sys_getpriority

2008-02-02 Thread Rabin Vincent
This check is not required because the condition is always true. Signed-off-by: Rabin Vincent <[EMAIL PROTECTED]> --- kernel/sys.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index d1fe71e..a001974 100644 --- a/kernel/sys.c

[PATCH] Remove unneeded code in sys_getpriority

2008-02-02 Thread Rabin Vincent
This check is not required because the condition is always true. Signed-off-by: Rabin Vincent [EMAIL PROTECTED] --- kernel/sys.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index d1fe71e..a001974 100644 --- a/kernel/sys.c +++ b

<    1   2   3   4   5   6