LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/5] [MIPS] unexport a few symbols in MIPS-specific code
@ 2008-04-01 23:58 Dmitri Vorobiev
2008-04-01 23:58 ` [PATCH 1/5] [MIPS] unexport copy_user_highpage() Dmitri Vorobiev
` (5 more replies)
0 siblings, 6 replies; 15+ messages in thread
From: Dmitri Vorobiev @ 2008-04-01 23:58 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
Hi Ralf,
A few exported symbols in MIPS-specific code can be unexported,
and this series of patches does so.
This series was tested using a custom config that was produced
by running `make allmodconfig', after which the CONFIG_VORTEX
option was manually turned off. The patches I am submitting do
not touch the code affected by this option, however. Setting
this options on leads to unbuildable kernel independently of
whether the patches are applied.
Additionally, the entire patchset was tested at runtime by
booting the Malta 4Kc board up to the shell prompt and
inserting the `oprofile.ko' kernel module. The tests were
successful.
Thanks,
Dmitri
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/5] [MIPS] unexport copy_user_highpage()
2008-04-01 23:58 [PATCH 0/5] [MIPS] unexport a few symbols in MIPS-specific code Dmitri Vorobiev
@ 2008-04-01 23:58 ` Dmitri Vorobiev
2008-04-04 7:19 ` Ralf Baechle
2008-04-01 23:58 ` [PATCH 2/5] [MIPS] unexport copy_to_user_page() Dmitri Vorobiev
` (4 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Dmitri Vorobiev @ 2008-04-01 23:58 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
The copy_user_highpage() routine has no users outside of the
core kernel code, so exporting this symbol is pointless.
This patch removes EXPORT_SYMBOL(copy_user_highpage).
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mm/init.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index c7aed13..71e5962 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -229,8 +229,6 @@ void copy_user_highpage(struct page *to, struct page *from,
smp_wmb();
}
-EXPORT_SYMBOL(copy_user_highpage);
-
void copy_to_user_page(struct vm_area_struct *vma,
struct page *page, unsigned long vaddr, void *dst, const void *src,
unsigned long len)
--
1.5.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/5] [MIPS] unexport copy_to_user_page()
2008-04-01 23:58 [PATCH 0/5] [MIPS] unexport a few symbols in MIPS-specific code Dmitri Vorobiev
2008-04-01 23:58 ` [PATCH 1/5] [MIPS] unexport copy_user_highpage() Dmitri Vorobiev
@ 2008-04-01 23:58 ` Dmitri Vorobiev
2008-04-04 7:20 ` Ralf Baechle
2008-04-01 23:58 ` [PATCH 3/5] [MIPS] unexport copy_from_user_page() Dmitri Vorobiev
` (3 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Dmitri Vorobiev @ 2008-04-01 23:58 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
The copy_to_user_page() function is called only in the core kernel
code. Therefore, there is no need to export it. This patch removes
EXPORT_SYMBOL(copy_to_user_page).
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mm/init.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 71e5962..6b9d54b 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -247,8 +247,6 @@ void copy_to_user_page(struct vm_area_struct *vma,
flush_cache_page(vma, vaddr, page_to_pfn(page));
}
-EXPORT_SYMBOL(copy_to_user_page);
-
void copy_from_user_page(struct vm_area_struct *vma,
struct page *page, unsigned long vaddr, void *dst, const void *src,
unsigned long len)
--
1.5.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/5] [MIPS] unexport copy_from_user_page()
2008-04-01 23:58 [PATCH 0/5] [MIPS] unexport a few symbols in MIPS-specific code Dmitri Vorobiev
2008-04-01 23:58 ` [PATCH 1/5] [MIPS] unexport copy_user_highpage() Dmitri Vorobiev
2008-04-01 23:58 ` [PATCH 2/5] [MIPS] unexport copy_to_user_page() Dmitri Vorobiev
@ 2008-04-01 23:58 ` Dmitri Vorobiev
2008-04-04 7:20 ` Ralf Baechle
2008-04-01 23:58 ` [PATCH 4/5] [MIPS] unexport rtc_mips_set_time() Dmitri Vorobiev
` (2 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Dmitri Vorobiev @ 2008-04-01 23:58 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
No users for the copy_from_user_page() routine exist outside of the
core kernel code. Therefore, EXPORT_SYMBOL(copy_from_user_page) is
useless, and this patch removes it.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/mm/init.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 6b9d54b..ff61184 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -263,9 +263,6 @@ void copy_from_user_page(struct vm_area_struct *vma,
}
}
-EXPORT_SYMBOL(copy_from_user_page);
-
-
#ifdef CONFIG_HIGHMEM
unsigned long highstart_pfn, highend_pfn;
--
1.5.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/5] [MIPS] unexport rtc_mips_set_time()
2008-04-01 23:58 [PATCH 0/5] [MIPS] unexport a few symbols in MIPS-specific code Dmitri Vorobiev
` (2 preceding siblings ...)
2008-04-01 23:58 ` [PATCH 3/5] [MIPS] unexport copy_from_user_page() Dmitri Vorobiev
@ 2008-04-01 23:58 ` Dmitri Vorobiev
2008-04-04 7:20 ` Ralf Baechle
2008-04-01 23:58 ` [PATCH 5/5] [MIPS] unexport null_perf_irq() and make it static Dmitri Vorobiev
2008-04-02 15:51 ` [PATCH 6/5] [MIPS] op_model_mipsxx.c: make the save_perf_irq variable static Dmitri Vorobiev
5 siblings, 1 reply; 15+ messages in thread
From: Dmitri Vorobiev @ 2008-04-01 23:58 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
No users for the rtc_mips_set_time() routine exist outside of the
core kernel code. Therefore, EXPORT_SYMBOL(rtc_mips_set_time) is
useless, and this patch removes it.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/kernel/time.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index b45a709..d70ce5c 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -38,7 +38,6 @@ int __weak rtc_mips_set_time(unsigned long sec)
{
return 0;
}
-EXPORT_SYMBOL(rtc_mips_set_time);
int __weak rtc_mips_set_mmss(unsigned long nowtime)
{
--
1.5.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/5] [MIPS] unexport null_perf_irq() and make it static
2008-04-01 23:58 [PATCH 0/5] [MIPS] unexport a few symbols in MIPS-specific code Dmitri Vorobiev
` (3 preceding siblings ...)
2008-04-01 23:58 ` [PATCH 4/5] [MIPS] unexport rtc_mips_set_time() Dmitri Vorobiev
@ 2008-04-01 23:58 ` Dmitri Vorobiev
2008-04-02 12:38 ` Atsushi Nemoto
2008-04-04 7:20 ` Ralf Baechle
2008-04-02 15:51 ` [PATCH 6/5] [MIPS] op_model_mipsxx.c: make the save_perf_irq variable static Dmitri Vorobiev
5 siblings, 2 replies; 15+ messages in thread
From: Dmitri Vorobiev @ 2008-04-01 23:58 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
This patch unexports the null_perf_irq() symbol, and simultaneously
makes this function static.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
arch/mips/kernel/time.c | 4 +---
arch/mips/oprofile/op_impl.h | 1 -
arch/mips/oprofile/op_model_mipsxx.c | 5 ++++-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index d70ce5c..1f467d5 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -49,13 +49,11 @@ int update_persistent_clock(struct timespec now)
return rtc_mips_set_mmss(now.tv_sec);
}
-int null_perf_irq(void)
+static int null_perf_irq(void)
{
return 0;
}
-EXPORT_SYMBOL(null_perf_irq);
-
int (*perf_irq)(void) = null_perf_irq;
EXPORT_SYMBOL(perf_irq);
diff --git a/arch/mips/oprofile/op_impl.h b/arch/mips/oprofile/op_impl.h
index fa6b4aa..2bfc17c 100644
--- a/arch/mips/oprofile/op_impl.h
+++ b/arch/mips/oprofile/op_impl.h
@@ -10,7 +10,6 @@
#ifndef OP_IMPL_H
#define OP_IMPL_H 1
-extern int null_perf_irq(void);
extern int (*perf_irq)(void);
/* Per-counter configuration as set via oprofilefs. */
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c
index ccbea22..12e840f 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -31,6 +31,8 @@
#define M_COUNTER_OVERFLOW (1UL << 31)
+int (*save_perf_irq)(void);
+
#ifdef CONFIG_MIPS_MT_SMP
#define WHAT (M_TC_EN_VPE | M_PERFCTL_VPEID(smp_processor_id()))
#define vpe_id() smp_processor_id()
@@ -355,6 +357,7 @@ static int __init mipsxx_init(void)
return -ENODEV;
}
+ save_perf_irq = perf_irq;
perf_irq = mipsxx_perfcount_handler;
return 0;
@@ -367,7 +370,7 @@ static void mipsxx_exit(void)
counters = counters_per_cpu_to_total(counters);
reset_counters(counters);
- perf_irq = null_perf_irq;
+ perf_irq = save_perf_irq;
}
struct op_mips_model op_model_mipsxx_ops = {
--
1.5.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] [MIPS] unexport null_perf_irq() and make it static
2008-04-01 23:58 ` [PATCH 5/5] [MIPS] unexport null_perf_irq() and make it static Dmitri Vorobiev
@ 2008-04-02 12:38 ` Atsushi Nemoto
2008-04-02 12:45 ` Dmitri Vorobiev
2008-04-04 7:20 ` Ralf Baechle
1 sibling, 1 reply; 15+ messages in thread
From: Atsushi Nemoto @ 2008-04-02 12:38 UTC (permalink / raw)
To: dmitri.vorobiev; +Cc: linux-mips, ralf, linux-kernel
On Wed, 2 Apr 2008 03:58:38 +0400, Dmitri Vorobiev <dmitri.vorobiev@gmail.com> wrote:
> --- a/arch/mips/oprofile/op_model_mipsxx.c
> +++ b/arch/mips/oprofile/op_model_mipsxx.c
> @@ -31,6 +31,8 @@
>
> #define M_COUNTER_OVERFLOW (1UL << 31)
>
> +int (*save_perf_irq)(void);
This should be another target of "make it static" patch :-)
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] [MIPS] unexport null_perf_irq() and make it static
2008-04-02 12:38 ` Atsushi Nemoto
@ 2008-04-02 12:45 ` Dmitri Vorobiev
0 siblings, 0 replies; 15+ messages in thread
From: Dmitri Vorobiev @ 2008-04-02 12:45 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips, ralf, linux-kernel
Atsushi Nemoto пишет:
> On Wed, 2 Apr 2008 03:58:38 +0400, Dmitri Vorobiev <dmitri.vorobiev@gmail.com> wrote:
>> --- a/arch/mips/oprofile/op_model_mipsxx.c
>> +++ b/arch/mips/oprofile/op_model_mipsxx.c
>> @@ -31,6 +31,8 @@
>>
>> #define M_COUNTER_OVERFLOW (1UL << 31)
>>
>> +int (*save_perf_irq)(void);
>
> This should be another target of "make it static" patch :-)
Indeed. Thank you for noticing that.
>
> ---
> Atsushi Nemoto
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 6/5] [MIPS] op_model_mipsxx.c: make the save_perf_irq variable static
2008-04-01 23:58 [PATCH 0/5] [MIPS] unexport a few symbols in MIPS-specific code Dmitri Vorobiev
` (4 preceding siblings ...)
2008-04-01 23:58 ` [PATCH 5/5] [MIPS] unexport null_perf_irq() and make it static Dmitri Vorobiev
@ 2008-04-02 15:51 ` Dmitri Vorobiev
5 siblings, 0 replies; 15+ messages in thread
From: Dmitri Vorobiev @ 2008-04-02 15:51 UTC (permalink / raw)
To: linux-mips, ralf, linux-kernel
The function pointer save_perf_irq introduced by the previous
patch in this series can become static.
Thanks for Atsushi Nemoto for pointing out the possibility.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
Hi Ralf,
If you find that the series is worth it, please pick up this
patch too. Thank you.
Dmitri
arch/mips/oprofile/op_model_mipsxx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c
index 12e840f..0a11727 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -31,7 +31,7 @@
#define M_COUNTER_OVERFLOW (1UL << 31)
-int (*save_perf_irq)(void);
+static int (*save_perf_irq)(void);
#ifdef CONFIG_MIPS_MT_SMP
#define WHAT (M_TC_EN_VPE | M_PERFCTL_VPEID(smp_processor_id()))
--
1.5.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 1/5] [MIPS] unexport copy_user_highpage()
2008-04-01 23:58 ` [PATCH 1/5] [MIPS] unexport copy_user_highpage() Dmitri Vorobiev
@ 2008-04-04 7:19 ` Ralf Baechle
0 siblings, 0 replies; 15+ messages in thread
From: Ralf Baechle @ 2008-04-04 7:19 UTC (permalink / raw)
To: Dmitri Vorobiev; +Cc: linux-mips, linux-kernel
On Wed, Apr 02, 2008 at 03:58:34AM +0400, Dmitri Vorobiev wrote:
> The copy_user_highpage() routine has no users outside of the
> core kernel code, so exporting this symbol is pointless.
> This patch removes EXPORT_SYMBOL(copy_user_highpage).
>
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Queued for 2.6.26. Thanks,
Ralf
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] [MIPS] unexport copy_to_user_page()
2008-04-01 23:58 ` [PATCH 2/5] [MIPS] unexport copy_to_user_page() Dmitri Vorobiev
@ 2008-04-04 7:20 ` Ralf Baechle
0 siblings, 0 replies; 15+ messages in thread
From: Ralf Baechle @ 2008-04-04 7:20 UTC (permalink / raw)
To: Dmitri Vorobiev; +Cc: linux-mips, linux-kernel
On Wed, Apr 02, 2008 at 03:58:35AM +0400, Dmitri Vorobiev wrote:
> The copy_to_user_page() function is called only in the core kernel
> code. Therefore, there is no need to export it. This patch removes
> EXPORT_SYMBOL(copy_to_user_page).
>
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Queued for 2.6.26. Thanks,
Ralf
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/5] [MIPS] unexport copy_from_user_page()
2008-04-01 23:58 ` [PATCH 3/5] [MIPS] unexport copy_from_user_page() Dmitri Vorobiev
@ 2008-04-04 7:20 ` Ralf Baechle
0 siblings, 0 replies; 15+ messages in thread
From: Ralf Baechle @ 2008-04-04 7:20 UTC (permalink / raw)
To: Dmitri Vorobiev; +Cc: linux-mips, linux-kernel
On Wed, Apr 02, 2008 at 03:58:36AM +0400, Dmitri Vorobiev wrote:
> No users for the copy_from_user_page() routine exist outside of the
> core kernel code. Therefore, EXPORT_SYMBOL(copy_from_user_page) is
> useless, and this patch removes it.
>
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Queued for 2.6.26. Thanks,
Ralf
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/5] [MIPS] unexport rtc_mips_set_time()
2008-04-01 23:58 ` [PATCH 4/5] [MIPS] unexport rtc_mips_set_time() Dmitri Vorobiev
@ 2008-04-04 7:20 ` Ralf Baechle
0 siblings, 0 replies; 15+ messages in thread
From: Ralf Baechle @ 2008-04-04 7:20 UTC (permalink / raw)
To: Dmitri Vorobiev; +Cc: linux-mips, linux-kernel
On Wed, Apr 02, 2008 at 03:58:37AM +0400, Dmitri Vorobiev wrote:
> No users for the rtc_mips_set_time() routine exist outside of the
> core kernel code. Therefore, EXPORT_SYMBOL(rtc_mips_set_time) is
> useless, and this patch removes it.
>
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Queued for 2.6.26. Thanks,
Ralf
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] [MIPS] unexport null_perf_irq() and make it static
2008-04-01 23:58 ` [PATCH 5/5] [MIPS] unexport null_perf_irq() and make it static Dmitri Vorobiev
2008-04-02 12:38 ` Atsushi Nemoto
@ 2008-04-04 7:20 ` Ralf Baechle
2008-04-05 1:29 ` Dmitri Vorobiev
1 sibling, 1 reply; 15+ messages in thread
From: Ralf Baechle @ 2008-04-04 7:20 UTC (permalink / raw)
To: Dmitri Vorobiev; +Cc: linux-mips, linux-kernel
On Wed, Apr 02, 2008 at 03:58:38AM +0400, Dmitri Vorobiev wrote:
> This patch unexports the null_perf_irq() symbol, and simultaneously
> makes this function static.
>
> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
Queued for 2.6.26 with your static fix folded in. Thanks,
Ralf
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/5] [MIPS] unexport null_perf_irq() and make it static
2008-04-04 7:20 ` Ralf Baechle
@ 2008-04-05 1:29 ` Dmitri Vorobiev
0 siblings, 0 replies; 15+ messages in thread
From: Dmitri Vorobiev @ 2008-04-05 1:29 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, linux-kernel
Ralf Baechle пишет:
> On Wed, Apr 02, 2008 at 03:58:38AM +0400, Dmitri Vorobiev wrote:
>
>> This patch unexports the null_perf_irq() symbol, and simultaneously
>> makes this function static.
>>
>> Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
>
> Queued for 2.6.26 with your static fix folded in. Thanks,
Thanks for picking the patches up.
Dmitri
>
> Ralf
>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-04-05 1:31 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-01 23:58 [PATCH 0/5] [MIPS] unexport a few symbols in MIPS-specific code Dmitri Vorobiev
2008-04-01 23:58 ` [PATCH 1/5] [MIPS] unexport copy_user_highpage() Dmitri Vorobiev
2008-04-04 7:19 ` Ralf Baechle
2008-04-01 23:58 ` [PATCH 2/5] [MIPS] unexport copy_to_user_page() Dmitri Vorobiev
2008-04-04 7:20 ` Ralf Baechle
2008-04-01 23:58 ` [PATCH 3/5] [MIPS] unexport copy_from_user_page() Dmitri Vorobiev
2008-04-04 7:20 ` Ralf Baechle
2008-04-01 23:58 ` [PATCH 4/5] [MIPS] unexport rtc_mips_set_time() Dmitri Vorobiev
2008-04-04 7:20 ` Ralf Baechle
2008-04-01 23:58 ` [PATCH 5/5] [MIPS] unexport null_perf_irq() and make it static Dmitri Vorobiev
2008-04-02 12:38 ` Atsushi Nemoto
2008-04-02 12:45 ` Dmitri Vorobiev
2008-04-04 7:20 ` Ralf Baechle
2008-04-05 1:29 ` Dmitri Vorobiev
2008-04-02 15:51 ` [PATCH 6/5] [MIPS] op_model_mipsxx.c: make the save_perf_irq variable static Dmitri Vorobiev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).