[KJ PATCH] Replacing memcpy(dest,src,PAGE_SIZE) with copy_page(dest,src) in arch/i386/kernel/machine_kexec.c

2007-06-11 Thread Shani Moideen
Hi,
Replacing memcpy(dest,src,PAGE_SIZE) with copy_page(dest,src) in 
arch/i386/kernel/machine_kexec.c.

Signed-off-by: Shani Moideen <[EMAIL PROTECTED]>


diff --git a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c
index 91966ba..ce79a44 100644
--- a/arch/i386/kernel/machine_kexec.c
+++ b/arch/i386/kernel/machine_kexec.c
@@ -110,7 +110,7 @@ NORET_TYPE void machine_kexec(struct kimage *image)
local_irq_disable();
 
control_page = page_address(image->control_code_page);
-   memcpy(control_page, relocate_kernel, PAGE_SIZE);
+   copy_page(control_page, relocate_kernel);
 
page_list[PA_CONTROL_PAGE] = __pa(control_page);
page_list[VA_CONTROL_PAGE] = (unsigned long)relocate_kernel;

-- 
Shani 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[KJ PATCH] Replacing memcpy(dest,src,PAGE_SIZE) with copy_page(dest,src) in arch/i386/mm/init.c

2007-06-11 Thread Shani Moideen
Hi,
Replacing memcpy(dest,src,PAGE_SIZE) with copy_page(dest,src) in 
arch/i386/mm/init.c.

Signed-off-by: Shani Moideen <[EMAIL PROTECTED]>



diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index ae43688..7dc3d46 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -397,7 +397,7 @@ char __nosavedata swsusp_pg_dir[PAGE_SIZE]
 
 static inline void save_pg_dir(void)
 {
-   memcpy(swsusp_pg_dir, swapper_pg_dir, PAGE_SIZE);
+   copy_page(swsusp_pg_dir, swapper_pg_dir);
 }
 #else
 static inline void save_pg_dir(void)

-- 
Regards,
Shani 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[KJ PATCH] Replacing memset(,0,PAGE_SIZE) with clear_page() in mm/memory.c

2007-05-08 Thread Shani Moideen
Hi,

Replacing memset(,0,PAGE_SIZE) with clear_page() in mm/memory.c.

Signed-off-by: Shani Moideen <[EMAIL PROTECTED]>


thanks.


diff --git a/mm/memory.c b/mm/memory.c
index e7066e7..2780d07 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1505,7 +1505,7 @@ static inline void cow_user_page(struct page *dst, struct 
page *src, unsigned lo
 * zeroes.
 */
if (__copy_from_user_inatomic(kaddr, uaddr, PAGE_SIZE))
-   memset(kaddr, 0, PAGE_SIZE);
+   clear_page(kaddr);
kunmap_atomic(kaddr, KM_USER0);
flush_dcache_page(dst);
return;


-- 
Shani 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[KJ PATCH] Replacing memset(,0,PAGE_SIZE) with clear_page() in kernel/kexec.c

2007-05-08 Thread Shani Moideen
Hi,

Replacing memset(,0,PAGE_SIZE) with clear_page() in
kernel/kexec.c 

Signed-off-by: Shani Moideen <[EMAIL PROTECTED]>


thanks.


diff --git a/kernel/kexec.c b/kernel/kexec.c
index 2a59c8a..1a1afdd 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -787,7 +787,7 @@ static int kimage_load_normal_segment(struct kimage *image,

ptr = kmap(page);
/* Start with a clear page */
-   memset(ptr, 0, PAGE_SIZE);
+   clear_page(ptr);
ptr += maddr & ~PAGE_MASK;
mchunk = PAGE_SIZE - (maddr & ~PAGE_MASK);
if (mchunk > mbytes)






-- 
Shani 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[KJ PATCH] Replacing alloc_pages(gfp,0) with alloc_page(gfp) in arch/i386/mm/pageattr.c.

2007-05-09 Thread Shani Moideen
Hi,
 
Replacing alloc_pages(gfp,0) with alloc_page(gfp) in
arch/i386/mm/pageattr.c.

Signed-off-by: Shani Moideen <[EMAIL PROTECTED]>


diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c
index 412ebbd..12f7f14 100644
--- a/arch/i386/mm/pageattr.c
+++ b/arch/i386/mm/pageattr.c
@@ -45,7 +45,7 @@ static struct page *split_large_page(unsigned long address, 
pgprot_t prot,
pte_t *pbase;

spin_unlock_irq(&cpa_lock);
-   base = alloc_pages(GFP_KERNEL, 0);
+   base = alloc_page(GFP_KERNEL);
spin_lock_irq(&cpa_lock);
if (!base) 
return NULL;


-- 
Shani 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[KJ PATCH] Replacing alloc_pages(gfp,0) with alloc_page(gfp) in arch/i386/mm/pgtable.c.

2007-05-09 Thread Shani Moideen
Hi,
 
Replacing alloc_pages(gfp,0) with alloc_page(gfp) in
arch/i386/mm/pgtable.c.

Signed-off-by: Shani Moideen <[EMAIL PROTECTED]>


diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c
index fa0cfbd..5d2b0fb 100644
--- a/arch/i386/mm/pgtable.c
+++ b/arch/i386/mm/pgtable.c
@@ -191,9 +191,9 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned 
long address)
struct page *pte;

 #ifdef CONFIG_HIGHPTE
-   pte = alloc_pages(GFP_KERNEL|__GFP_HIGHMEM|__GFP_REPEAT|__GFP_ZERO, 0);
+   pte = alloc_page(GFP_KERNEL|__GFP_HIGHMEM|__GFP_REPEAT|__GFP_ZERO);
 #else
-   pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
+   pte = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 #endif
return pte;
 }

-- 
Shani 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH]:Replacing current->state with set_current_state in kernel/signal.c

2007-04-24 Thread Shani Moideen
Hi,

Replacing current->state with set_current_state in kernel/signal.c


thanks.

Signed-off-by: Shani Moideen <[EMAIL PROTECTED]>



diff --git a/kernel/signal.c b/kernel/signal.c
index 3670225..44e2cf3 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2596,7 +2596,7 @@ sys_signal(int sig, __sighandler_t handler)
 asmlinkage long
 sys_pause(void)
 {
-   current->state = TASK_INTERRUPTIBLE;
+   set_current_state(TASK_INTERRUPTIBLE);
schedule();
return -ERESTARTNOHAND;
 }
@@ -2622,7 +2622,7 @@ asmlinkage long sys_rt_sigsuspend(sigset_t __user 
*unewset, size_t sigsetsize)
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);

-   current->state = TASK_INTERRUPTIBLE;
+   set_current_state(TASK_INTERRUPTIBLE);
schedule();
set_thread_flag(TIF_RESTORE_SIGMASK);
return -ERESTARTNOHAND;

-- 
Shani 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/