Skip to content

Commit be093be

Browse files
Russell KingRussell King
authored andcommitted
[ARM] pass reboot command line to arch_reset()
OMAP wishes to pass state to the boot loader upon reboot in order to instruct it whether to wait for USB-based reflashing or not. There is already a facility to do this via the reboot() syscall, except we ignore the string passed to machine_restart(). This patch fixes things to pass this string to arch_reset(). This means that we keep the reboot mode limited to telling the kernel _how_ to perform the reboot which should be independent of what we request the boot loader to do. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 14b6848 commit be093be

50 files changed

Lines changed: 65 additions & 65 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/arm/include/asm/system.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ extern void __show_regs(struct pt_regs *);
9797
extern int cpu_architecture(void);
9898
extern void cpu_init(void);
9999

100-
void arm_machine_restart(char mode);
101-
extern void (*arm_pm_restart)(char str);
100+
void arm_machine_restart(char mode, const char *cmd);
101+
extern void (*arm_pm_restart)(char str, const char *cmd);
102102

103103
#define UDBG_UNDEFINED (1 << 0)
104104
#define UDBG_SYSCALL (1 << 1)

‎arch/arm/kernel/process.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int __init hlt_setup(char *__unused)
8383
__setup("nohlt", nohlt_setup);
8484
__setup("hlt", hlt_setup);
8585

86-
void arm_machine_restart(char mode)
86+
void arm_machine_restart(char mode, const char *cmd)
8787
{
8888
/*
8989
* Clean and disable cache, and turn off interrupts
@@ -100,7 +100,7 @@ void arm_machine_restart(char mode)
100100
/*
101101
* Now call the architecture specific reboot code.
102102
*/
103-
arch_reset(mode);
103+
arch_reset(mode, cmd);
104104

105105
/*
106106
* Whoops - the architecture was unable to reboot.
@@ -120,7 +120,7 @@ EXPORT_SYMBOL(pm_idle);
120120
void (*pm_power_off)(void);
121121
EXPORT_SYMBOL(pm_power_off);
122122

123-
void (*arm_pm_restart)(char str) = arm_machine_restart;
123+
void (*arm_pm_restart)(char str, const char *cmd) = arm_machine_restart;
124124
EXPORT_SYMBOL_GPL(arm_pm_restart);
125125

126126

@@ -195,9 +195,9 @@ void machine_power_off(void)
195195
pm_power_off();
196196
}
197197

198-
void machine_restart(char * __unused)
198+
void machine_restart(char *cmd)
199199
{
200-
arm_pm_restart(reboot_mode);
200+
arm_pm_restart(reboot_mode, cmd);
201201
}
202202

203203
void __show_regs(struct pt_regs *regs)

‎arch/arm/mach-aaec2000/include/mach/system.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static inline void arch_idle(void)
1616
cpu_do_idle();
1717
}
1818

19-
static inline void arch_reset(char mode)
19+
static inline void arch_reset(char mode, const char *cmd)
2020
{
2121
cpu_reset(0);
2222
}

‎arch/arm/mach-at91/include/mach/system.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static inline void arch_idle(void)
4343

4444
void (*at91_arch_reset)(void);
4545

46-
static inline void arch_reset(char mode)
46+
static inline void arch_reset(char mode, const char *cmd)
4747
{
4848
/* call the CPU-specific reset function */
4949
if (at91_arch_reset)

‎arch/arm/mach-clps711x/include/mach/system.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static inline void arch_idle(void)
3232
mov r0, r0");
3333
}
3434

35-
static inline void arch_reset(char mode)
35+
static inline void arch_reset(char mode, const char *cmd)
3636
{
3737
cpu_reset(0);
3838
}

‎arch/arm/mach-davinci/include/mach/system.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static void arch_idle(void)
2121
cpu_do_idle();
2222
}
2323

24-
static void arch_reset(char mode)
24+
static void arch_reset(char mode, const char *cmd)
2525
{
2626
davinci_watchdog_reset();
2727
}

‎arch/arm/mach-ebsa110/include/mach/system.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ static inline void arch_idle(void)
3434
asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
3535
}
3636

37-
#define arch_reset(mode) cpu_reset(0x80000000)
37+
#define arch_reset(mode, cmd) cpu_reset(0x80000000)
3838

3939
#endif

‎arch/arm/mach-ep93xx/include/mach/system.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ static inline void arch_idle(void)
99
cpu_do_idle();
1010
}
1111

12-
static inline void arch_reset(char mode)
12+
static inline void arch_reset(char mode, const char *cmd)
1313
{
1414
u32 devicecfg;
1515

‎arch/arm/mach-footbridge/include/mach/system.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static inline void arch_idle(void)
1818
cpu_do_idle();
1919
}
2020

21-
static inline void arch_reset(char mode)
21+
static inline void arch_reset(char mode, const char *cmd)
2222
{
2323
if (mode == 's') {
2424
/*

‎arch/arm/mach-h720x/include/mach/system.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static void arch_idle(void)
2525
}
2626

2727

28-
static __inline__ void arch_reset(char mode)
28+
static __inline__ void arch_reset(char mode, const char *cmd)
2929
{
3030
CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
3131
}

0 commit comments

Comments
 (0)