* [PATCH] MIPS: idle: Remove leftover __pastwait symbol and its references
@ 2014-09-16 12:57 ` Markos Chandras
0 siblings, 0 replies; 3+ messages in thread
From: Markos Chandras @ 2014-09-16 12:57 UTC (permalink / raw)
To: linux-mips; +Cc: Markos Chandras
The __pastwait symbol was only used by the address_is_in_r4k_wait_irqoff
function but this is no longer used since the SMTC removal in commit
b633648c5ad3 ('MIPS: MT: Remove SMTC support'). That symbol also led to
build failures under certain random configuration due to the way the
compiler compiled the r4k_wait_irqoff function. If that function was
called multiple times, the __pastwait symbol was redefined breaking the
build like this:
CHK include/generated/compile.h
CC arch/mips/kernel/idle.o
{standard input}: Assembler messages:
{standard input}:527: Error: symbol `__pastwait' is already defined
Link: http://www.linux-mips.org/archives/linux-mips/2009-06/msg00282.html
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
arch/mips/include/asm/idle.h | 7 -------
arch/mips/kernel/idle.c | 3 ---
2 files changed, 10 deletions(-)
diff --git a/arch/mips/include/asm/idle.h b/arch/mips/include/asm/idle.h
index d9f932de80e9..1c967abd545c 100644
--- a/arch/mips/include/asm/idle.h
+++ b/arch/mips/include/asm/idle.h
@@ -8,19 +8,12 @@ extern void (*cpu_wait)(void);
extern void r4k_wait(void);
extern asmlinkage void __r4k_wait(void);
extern void r4k_wait_irqoff(void);
-extern void __pastwait(void);
static inline int using_rollback_handler(void)
{
return cpu_wait == r4k_wait;
}
-static inline int address_is_in_r4k_wait_irqoff(unsigned long addr)
-{
- return addr >= (unsigned long)r4k_wait_irqoff &&
- addr < (unsigned long)__pastwait;
-}
-
extern int mips_cpuidle_wait_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index);
diff --git a/arch/mips/kernel/idle.c b/arch/mips/kernel/idle.c
index 09ce45980758..0b9082b6b683 100644
--- a/arch/mips/kernel/idle.c
+++ b/arch/mips/kernel/idle.c
@@ -68,9 +68,6 @@ void r4k_wait_irqoff(void)
" wait \n"
" .set pop \n");
local_irq_enable();
- __asm__(
- " .globl __pastwait \n"
- "__pastwait: \n");
}
/*
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] MIPS: idle: Remove leftover __pastwait symbol and its references
@ 2014-09-16 12:57 ` Markos Chandras
0 siblings, 0 replies; 3+ messages in thread
From: Markos Chandras @ 2014-09-16 12:57 UTC (permalink / raw)
To: linux-mips; +Cc: Markos Chandras
The __pastwait symbol was only used by the address_is_in_r4k_wait_irqoff
function but this is no longer used since the SMTC removal in commit
b633648c5ad3 ('MIPS: MT: Remove SMTC support'). That symbol also led to
build failures under certain random configuration due to the way the
compiler compiled the r4k_wait_irqoff function. If that function was
called multiple times, the __pastwait symbol was redefined breaking the
build like this:
CHK include/generated/compile.h
CC arch/mips/kernel/idle.o
{standard input}: Assembler messages:
{standard input}:527: Error: symbol `__pastwait' is already defined
Link: http://www.linux-mips.org/archives/linux-mips/2009-06/msg00282.html
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
arch/mips/include/asm/idle.h | 7 -------
arch/mips/kernel/idle.c | 3 ---
2 files changed, 10 deletions(-)
diff --git a/arch/mips/include/asm/idle.h b/arch/mips/include/asm/idle.h
index d9f932de80e9..1c967abd545c 100644
--- a/arch/mips/include/asm/idle.h
+++ b/arch/mips/include/asm/idle.h
@@ -8,19 +8,12 @@ extern void (*cpu_wait)(void);
extern void r4k_wait(void);
extern asmlinkage void __r4k_wait(void);
extern void r4k_wait_irqoff(void);
-extern void __pastwait(void);
static inline int using_rollback_handler(void)
{
return cpu_wait == r4k_wait;
}
-static inline int address_is_in_r4k_wait_irqoff(unsigned long addr)
-{
- return addr >= (unsigned long)r4k_wait_irqoff &&
- addr < (unsigned long)__pastwait;
-}
-
extern int mips_cpuidle_wait_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index);
diff --git a/arch/mips/kernel/idle.c b/arch/mips/kernel/idle.c
index 09ce45980758..0b9082b6b683 100644
--- a/arch/mips/kernel/idle.c
+++ b/arch/mips/kernel/idle.c
@@ -68,9 +68,6 @@ void r4k_wait_irqoff(void)
" wait \n"
" .set pop \n");
local_irq_enable();
- __asm__(
- " .globl __pastwait \n"
- "__pastwait: \n");
}
/*
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: idle: Remove leftover __pastwait symbol and its references
2014-09-16 12:57 ` Markos Chandras
(?)
@ 2014-10-23 17:29 ` Ralf Baechle
-1 siblings, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2014-10-23 17:29 UTC (permalink / raw)
To: Markos Chandras; +Cc: linux-mips
On Tue, Sep 16, 2014 at 01:57:08PM +0100, Markos Chandras wrote:
> The __pastwait symbol was only used by the address_is_in_r4k_wait_irqoff
> function but this is no longer used since the SMTC removal in commit
> b633648c5ad3 ('MIPS: MT: Remove SMTC support'). That symbol also led to
> build failures under certain random configuration due to the way the
> compiler compiled the r4k_wait_irqoff function. If that function was
> called multiple times, the __pastwait symbol was redefined breaking the
> build like this:
Applied. If this problems show up again on older kernels that still have
SMTC we still can cook up a different fix.
> CHK include/generated/compile.h
> CC arch/mips/kernel/idle.o
> {standard input}: Assembler messages:
> {standard input}:527: Error: symbol `__pastwait' is already defined
>
> Link: http://www.linux-mips.org/archives/linux-mips/2009-06/msg00282.html
When posting any kind of reference please always use the permanent links.
Applied,
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-23 17:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-16 12:57 [PATCH] MIPS: idle: Remove leftover __pastwait symbol and its references Markos Chandras
2014-09-16 12:57 ` Markos Chandras
2014-10-23 17:29 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.