Merge branch 'akpm' (updates from Andrew Morton)

Merge second patch-bomb from Andrew Morton:
 - misc fixes
 - audit stuff
 - fanotify/inotify/dnotify things
 - most of the rest of MM.  The new cache shrinker code from Glauber and
   Dave Chinner probably isn't quite stabilized yet.
 - ptrace
 - ipc
 - partitions
 - reboot cleanups
 - add LZ4 decompressor, use it for kernel compression

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (118 commits)
  lib/scatterlist: error handling in __sg_alloc_table()
  scsi_debug: fix do_device_access() with wrap around range
  crypto: talitos: use sg_pcopy_to_buffer()
  lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()
  lib/scatterlist: factor out sg_miter_get_next_page() from sg_miter_next()
  crypto: add lz4 Cryptographic API
  lib: add lz4 compressor module
  arm: add support for LZ4-compressed kernel
  lib: add support for LZ4-compressed kernel
  decompressor: add LZ4 decompressor module
  lib: add weak clz/ctz functions
  reboot: move arch/x86 reboot= handling to generic kernel
  reboot: arm: change reboot_mode to use enum reboot_mode
  reboot: arm: prepare reboot_mode for moving to generic kernel code
  reboot: arm: remove unused restart_mode fields from some arm subarchs
  reboot: unicore32: prepare reboot_mode for moving to generic kernel code
  reboot: x86: prepare reboot_mode for moving to generic kernel code
  reboot: checkpatch.pl the new kernel/reboot.c file
  reboot: move shutdown/reboot related functions to kernel/reboot.c
  reboot: remove -stable friendly PF_THREAD_BOUND define
  ...
This commit is contained in:
Linus Torvalds 2013-07-09 13:33:36 -07:00
commit a82a729f04
238 changed files with 4458 additions and 1688 deletions

View File

@ -2681,9 +2681,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
Run specified binary instead of /init from the ramdisk,
used for early userspace startup. See initrd.
reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode
Format: <reboot_mode>[,<reboot_mode2>[,...]]
See arch/*/kernel/reboot.c or arch/*/kernel/process.c
reboot= [KNL]
Format (x86 or x86_64):
[w[arm] | c[old] | h[ard] | s[oft] | g[pio]] \
[[,]s[mp]#### \
[[,]b[ios] | a[cpi] | k[bd] | t[riple] | e[fi] | p[ci]] \
[[,]f[orce]
Where reboot_mode is one of warm (soft) or cold (hard) or gpio,
reboot_type is one of bios, acpi, kbd, triple, efi, or pci,
reboot_force is either force or not specified,
reboot_cpu is s[mp]#### with #### being the processor
to be used for rebooting.
relax_domain_level=
[KNL, SMP] Set scheduler's default relax_domain_level.

View File

@ -510,7 +510,7 @@ Specify "[Dd]efault" to request automatic configuration. Autoconfiguration
will select "node" order in following case.
(1) if the DMA zone does not exist or
(2) if the DMA zone comprises greater than 50% of the available memory or
(3) if any node's DMA zone comprises greater than 60% of its local memory and
(3) if any node's DMA zone comprises greater than 70% of its local memory and
the amount of local memory is big enough.
Otherwise, "zone" order will be selected. Default order is recommended unless

View File

@ -120,8 +120,8 @@ By default kernel tries to use huge zero page on read page fault.
It's possible to disable huge zero page by writing 0 or enable it
back by writing 1:
echo 0 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
echo 1 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
echo 0 >/sys/kernel/mm/transparent_hugepage/use_zero_page
echo 1 >/sys/kernel/mm/transparent_hugepage/use_zero_page
khugepaged will be automatically started when
transparent_hugepage/enabled is set to "always" or "madvise, and it'll

View File

@ -657,9 +657,10 @@ Protocol: 2.08+
uncompressed data should be determined using the standard magic
numbers. The currently supported compression formats are gzip
(magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA
(magic number 5D 00), and XZ (magic number FD 37). The uncompressed
payload is currently always ELF (magic number 7F 45 4C 46).
(magic number 5D 00), XZ (magic number FD 37), and LZ4 (magic number
02 21). The uncompressed payload is currently always ELF (magic
number 7F 45 4C 46).
Field name: payload_length
Type: read
Offset/size: 0x24c/4

View File

@ -9268,6 +9268,13 @@ F: Documentation/networking/z8530drv.txt
F: drivers/net/hamradio/*scc.c
F: drivers/net/hamradio/z8530.h
ZBUD COMPRESSED PAGE ALLOCATOR
M: Seth Jennings <sjenning@linux.vnet.ibm.com>
L: linux-mm@kvack.org
S: Maintained
F: mm/zbud.c
F: include/linux/zbud.h
ZD1211RW WIRELESS DRIVER
M: Daniel Drake <dsd@gentoo.org>
M: Ulrich Kunitz <kune@deine-taler.de>
@ -9290,6 +9297,12 @@ M: "Maciej W. Rozycki" <macro@linux-mips.org>
S: Maintained
F: drivers/tty/serial/zs.*
ZSWAP COMPRESSED SWAP CACHING
M: Seth Jennings <sjenning@linux.vnet.ibm.com>
L: linux-mm@kvack.org
S: Maintained
F: mm/zswap.c
THE REST
M: Linus Torvalds <torvalds@linux-foundation.org>
L: linux-kernel@vger.kernel.org

View File

@ -207,8 +207,10 @@ out_of_memory:
}
up_read(&mm->mmap_sem);
if (user_mode(regs))
do_group_exit(SIGKILL); /* This will never return */
if (user_mode(regs)) {
pagefault_out_of_memory();
return;
}
goto no_context;

View File

@ -41,6 +41,7 @@ config ARM
select HAVE_IDE if PCI || ISA || PCMCIA
select HAVE_IRQ_TIME_ACCOUNTING
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_LZ4
select HAVE_KERNEL_LZMA
select HAVE_KERNEL_LZO
select HAVE_KERNEL_XZ

View File

@ -6,6 +6,7 @@ piggy.gzip
piggy.lzo
piggy.lzma
piggy.xzkern
piggy.lz4
vmlinux
vmlinux.lds

View File

@ -91,6 +91,7 @@ suffix_$(CONFIG_KERNEL_GZIP) = gzip
suffix_$(CONFIG_KERNEL_LZO) = lzo
suffix_$(CONFIG_KERNEL_LZMA) = lzma
suffix_$(CONFIG_KERNEL_XZ) = xzkern
suffix_$(CONFIG_KERNEL_LZ4) = lz4
# Borrowed libfdt files for the ATAG compatibility mode
@ -115,7 +116,7 @@ targets := vmlinux vmlinux.lds \
font.o font.c head.o misc.o $(OBJS)
# Make sure files are removed during clean
extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern \
extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) \
hyp-stub.S

View File

@ -51,6 +51,10 @@ extern char * strstr(const char * s1, const char *s2);
#include "../../../../lib/decompress_unxz.c"
#endif
#ifdef CONFIG_KERNEL_LZ4
#include "../../../../lib/decompress_unlz4.c"
#endif
int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
{
return decompress(input, len, NULL, NULL, output, NULL, error);

View File

@ -0,0 +1,6 @@
.section .piggydata,#alloc
.globl input_data
input_data:
.incbin "arch/arm/boot/compressed/piggy.lz4"
.globl input_data_end
input_data_end:

View File

@ -223,11 +223,12 @@ extern int iop3xx_get_init_atu(void);
#ifndef __ASSEMBLY__
#include <linux/types.h>
#include <linux/reboot.h>
void iop3xx_map_io(void);
void iop_init_cp6_handler(void);
void iop_init_time(unsigned long tickrate);
void iop3xx_restart(char, const char *);
void iop3xx_restart(enum reboot_mode, const char *);
static inline u32 read_tmr0(void)
{

View File

@ -11,6 +11,7 @@
#include <linux/types.h>
#ifndef __ASSEMBLY__
#include <linux/reboot.h>
struct tag;
struct meminfo;
@ -43,7 +44,7 @@ struct machine_desc {
unsigned char reserve_lp0 :1; /* never has lp0 */
unsigned char reserve_lp1 :1; /* never has lp1 */
unsigned char reserve_lp2 :1; /* never has lp2 */
char restart_mode; /* default restart mode */
enum reboot_mode reboot_mode; /* default restart mode */
struct smp_operations *smp; /* SMP operations */
bool (*smp_init)(void);
void (*fixup)(struct tag *, char **,
@ -58,7 +59,7 @@ struct machine_desc {
#ifdef CONFIG_MULTI_IRQ_HANDLER
void (*handle_irq)(struct pt_regs *);
#endif
void (*restart)(char, const char *);
void (*restart)(enum reboot_mode, const char *);
};
/*

View File

@ -6,11 +6,12 @@
#include <linux/compiler.h>
#include <linux/linkage.h>
#include <linux/irqflags.h>
#include <linux/reboot.h>
extern void cpu_init(void);
void soft_restart(unsigned long);
extern void (*arm_pm_restart)(char str, const char *cmd);
extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
extern void (*arm_pm_idle)(void);
#define UDBG_UNDEFINED (1 << 0)

View File

@ -32,6 +32,7 @@
#include <linux/hw_breakpoint.h>
#include <linux/cpuidle.h>
#include <linux/leds.h>
#include <linux/reboot.h>
#include <asm/cacheflush.h>
#include <asm/idmap.h>
@ -113,7 +114,7 @@ void soft_restart(unsigned long addr)
BUG();
}
static void null_restart(char mode, const char *cmd)
static void null_restart(enum reboot_mode reboot_mode, const char *cmd)
{
}
@ -123,7 +124,7 @@ static void null_restart(char mode, const char *cmd)
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
void (*arm_pm_restart)(char str, const char *cmd) = null_restart;
void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = null_restart;
EXPORT_SYMBOL_GPL(arm_pm_restart);
/*
@ -175,16 +176,6 @@ void arch_cpu_idle(void)
default_idle();
}
static char reboot_mode = 'h';
int __init reboot_setup(char *str)
{
reboot_mode = str[0];
return 1;
}
__setup("reboot=", reboot_setup);
/*
* Called by kexec, immediately prior to machine_kexec().
*

View File

@ -886,20 +886,12 @@ long arch_ptrace(struct task_struct *child, long request,
#ifdef CONFIG_HAVE_HW_BREAKPOINT
case PTRACE_GETHBPREGS:
if (ptrace_get_breakpoints(child) < 0)
return -ESRCH;
ret = ptrace_gethbpregs(child, addr,
(unsigned long __user *)data);
ptrace_put_breakpoints(child);
break;
case PTRACE_SETHBPREGS:
if (ptrace_get_breakpoints(child) < 0)
return -ESRCH;
ret = ptrace_sethbpregs(child, addr,
(unsigned long __user *)data);
ptrace_put_breakpoints(child);
break;
#endif

View File

@ -74,7 +74,7 @@ __setup("fpe=", fpe_setup);
extern void paging_init(struct machine_desc *desc);
extern void sanity_check_meminfo(void);
extern void reboot_setup(char *str);
extern enum reboot_mode reboot_mode;
extern void setup_dma_zone(struct machine_desc *desc);
unsigned int processor_id;
@ -861,8 +861,8 @@ void __init setup_arch(char **cmdline_p)
setup_dma_zone(mdesc);
if (mdesc->restart_mode)
reboot_setup(&mdesc->restart_mode);
if (mdesc->reboot_mode != REBOOT_HARD)
reboot_mode = mdesc->reboot_mode;
init_mm.start_code = (unsigned long) _text;
init_mm.end_code = (unsigned long) _etext;

View File

@ -11,6 +11,7 @@
*/
#include <linux/module.h>
#include <linux/reboot.h>
#include <asm/irq.h>
#include <asm/mach/arch.h>
@ -304,7 +305,7 @@ static void at91rm9200_idle(void)
at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK);
}
static void at91rm9200_restart(char mode, const char *cmd)
static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd)
{
/*
* Perform a hardware reset with the use of the Watchdog timer.

View File

@ -10,6 +10,7 @@
#include <linux/clkdev.h>
#include <linux/of.h>
#include <linux/reboot.h>
/* Map io */
extern void __init at91_map_io(void);
@ -60,8 +61,8 @@ extern void at91sam9_idle(void);
/* reset */
extern void at91_ioremap_rstc(u32 base_addr);
extern void at91sam9_alt_restart(char, const char *);
extern void at91sam9g45_restart(char, const char *);
extern void at91sam9_alt_restart(enum reboot_mode, const char *);
extern void at91sam9g45_restart(enum reboot_mode, const char *);
/* shutdown */
extern void at91_ioremap_shdwc(u32 base_addr);

View File

@ -53,7 +53,7 @@ static void bcm2835_setup_restart(void)
WARN(!wdt_regs, "failed to remap watchdog regs");
}
static void bcm2835_restart(char mode, const char *cmd)
static void bcm2835_restart(enum reboot_mode mode, const char *cmd)
{
u32 val;
@ -91,7 +91,7 @@ static void bcm2835_power_off(void)
writel_relaxed(val, wdt_regs + PM_RSTS);
/* Continue with normal reset mechanism */
bcm2835_restart(0, "");
bcm2835_restart(REBOOT_HARD, "");
}
static struct map_desc io_map __initdata = {

View File

@ -384,7 +384,7 @@ void __init clps711x_timer_init(void)
setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
}
void clps711x_restart(char mode, const char *cmd)
void clps711x_restart(enum reboot_mode mode, const char *cmd)
{
soft_restart(0);
}

View File

@ -4,6 +4,8 @@
* Common bits.
*/
#include <linux/reboot.h>
#define CLPS711X_NR_IRQS (33)
#define CLPS711X_NR_GPIO (4 * 8 + 3)
#define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit))
@ -12,5 +14,5 @@ extern void clps711x_map_io(void);
extern void clps711x_init_irq(void);
extern void clps711x_timer_init(void);
extern void clps711x_handle_irq(struct pt_regs *regs);
extern void clps711x_restart(char mode, const char *cmd);
extern void clps711x_restart(enum reboot_mode mode, const char *cmd);
extern void clps711x_init_early(void);

View File

@ -11,6 +11,8 @@
#ifndef __CNS3XXX_CORE_H
#define __CNS3XXX_CORE_H
#include <linux/reboot.h>
extern void cns3xxx_timer_init(void);
#ifdef CONFIG_CACHE_L2X0
@ -22,6 +24,6 @@ static inline void cns3xxx_l2x0_init(void) {}
void __init cns3xxx_map_io(void);
void __init cns3xxx_init_irq(void);
void cns3xxx_power_off(void);
void cns3xxx_restart(char, const char *);
void cns3xxx_restart(enum reboot_mode, const char *);
#endif /* __CNS3XXX_CORE_H */

View File

@ -89,7 +89,7 @@ void cns3xxx_pwr_soft_rst(unsigned int block)
}
EXPORT_SYMBOL(cns3xxx_pwr_soft_rst);
void cns3xxx_restart(char mode, const char *cmd)
void cns3xxx_restart(enum reboot_mode mode, const char *cmd)
{
/*
* To reset, we hit the on-board reset register

View File

@ -16,6 +16,7 @@
#include <linux/serial_8250.h>
#include <linux/ahci_platform.h>
#include <linux/clk.h>
#include <linux/reboot.h>
#include <mach/cputype.h>
#include <mach/common.h>
@ -366,7 +367,7 @@ static struct platform_device da8xx_wdt_device = {
.resource = da8xx_watchdog_resources,
};
void da8xx_restart(char mode, const char *cmd)
void da8xx_restart(enum reboot_mode mode, const char *cmd)
{
struct device *dev;

View File

@ -13,6 +13,7 @@
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/reboot.h>
#include <mach/hardware.h>
#include <linux/platform_data/i2c-davinci.h>
@ -307,7 +308,7 @@ struct platform_device davinci_wdt_device = {
.resource = wdt_resources,
};
void davinci_restart(char mode, const char *cmd)
void davinci_restart(enum reboot_mode mode, const char *cmd)
{
davinci_watchdog_reset(&davinci_wdt_device);
}

View File

@ -14,6 +14,7 @@
#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/reboot.h>
extern void davinci_timer_init(void);
@ -81,7 +82,7 @@ extern struct davinci_soc_info davinci_soc_info;
extern void davinci_common_init(struct davinci_soc_info *soc_info);
extern void davinci_init_ide(void);
void davinci_restart(char mode, const char *cmd);
void davinci_restart(enum reboot_mode mode, const char *cmd);
void davinci_init_late(void);
#ifdef CONFIG_DAVINCI_RESET_CLOCKS

View File

@ -17,6 +17,7 @@
#include <linux/davinci_emac.h>
#include <linux/spi/spi.h>
#include <linux/platform_data/davinci_asp.h>
#include <linux/reboot.h>
#include <linux/videodev2.h>
#include <mach/serial.h>
@ -106,7 +107,7 @@ int da850_register_vpif_display
(struct vpif_display_config *display_config);
int da850_register_vpif_capture
(struct vpif_capture_config *capture_config);
void da8xx_restart(char mode, const char *cmd);
void da8xx_restart(enum reboot_mode mode, const char *cmd);
void da8xx_rproc_reserve_cma(void);
int da8xx_register_rproc(void);

View File

@ -35,6 +35,7 @@
#include <linux/serial_8250.h>
#include <linux/input/matrix_keypad.h>
#include <linux/mfd/ti_ssp.h>
#include <linux/reboot.h>
#include <linux/platform_data/mmc-davinci.h>
#include <linux/platform_data/mtd-davinci.h>
@ -54,7 +55,7 @@ extern struct platform_device tnetv107x_serial_device;
extern void tnetv107x_init(void);
extern void tnetv107x_devices_init(struct tnetv107x_device_info *);
extern void tnetv107x_irq_init(void);
void tnetv107x_restart(char mode, const char *cmd);
void tnetv107x_restart(enum reboot_mode mode, const char *cmd);
#endif

View File

@ -19,6 +19,7 @@
#include <linux/io.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <asm/mach/map.h>
@ -730,7 +731,7 @@ static void tnetv107x_watchdog_reset(struct platform_device *pdev)
__raw_writel(1, &regs->kick);
}
void tnetv107x_restart(char mode, const char *cmd)
void tnetv107x_restart(enum reboot_mode mode, const char *cmd)
{
tnetv107x_watchdog_reset(&tnetv107x_wdt_device);
}

View File

@ -381,7 +381,7 @@ void __init dove_init(void)
dove_xor1_init();
}
void dove_restart(char mode, const char *cmd)
void dove_restart(enum reboot_mode mode, const char *cmd)
{
/*
* Enable soft reset to assert RSTOUTn.

View File

@ -11,6 +11,8 @@
#ifndef __ARCH_DOVE_COMMON_H
#define __ARCH_DOVE_COMMON_H
#include <linux/reboot.h>
struct mv643xx_eth_platform_data;
struct mv_sata_platform_data;
@ -42,6 +44,6 @@ void dove_spi1_init(void);
void dove_i2c_init(void);
void dove_sdio0_init(void);
void dove_sdio1_init(void);
void dove_restart(char, const char *);
void dove_restart(enum reboot_mode, const char *);
#endif

View File

@ -311,7 +311,7 @@ static int __init ebsa110_init(void)
arch_initcall(ebsa110_init);
static void ebsa110_restart(char mode, const char *cmd)
static void ebsa110_restart(enum reboot_mode mode, const char *cmd)
{
soft_restart(0x80000000);
}
@ -321,7 +321,6 @@ MACHINE_START(EBSA110, "EBSA110")
.atag_offset = 0x400,
.reserve_lp0 = 1,
.reserve_lp2 = 1,
.restart_mode = 's',
.map_io = ebsa110_map_io,
.init_early = ebsa110_init_early,
.init_irq = ebsa110_init_irq,

View File

@ -35,6 +35,7 @@
#include <linux/spi/spi.h>
#include <linux/export.h>
#include <linux/irqchip/arm-vic.h>
#include <linux/reboot.h>
#include <mach/hardware.h>
#include <linux/platform_data/video-ep93xx.h>
@ -921,7 +922,7 @@ void __init ep93xx_init_devices(void)
gpio_led_register_device(-1, &ep93xx_led_data);
}
void ep93xx_restart(char mode, const char *cmd)
void ep93xx_restart(enum reboot_mode mode, const char *cmd)
{
/*
* Set then clear the SWRST bit to initiate a software reset

View File

@ -4,6 +4,8 @@
#ifndef __ASSEMBLY__
#include <linux/reboot.h>
struct i2c_gpio_platform_data;
struct i2c_board_info;
struct spi_board_info;
@ -55,7 +57,7 @@ void ep93xx_ide_release_gpio(struct platform_device *pdev);
void ep93xx_init_devices(void);
extern void ep93xx_timer_init(void);
void ep93xx_restart(char, const char *);
void ep93xx_restart(enum reboot_mode, const char *);
void ep93xx_init_late(void);
#ifdef CONFIG_CRUNCH

View File

@ -285,12 +285,12 @@ static struct map_desc exynos5440_iodesc0[] __initdata = {
},
};
void exynos4_restart(char mode, const char *cmd)
void exynos4_restart(enum reboot_mode mode, const char *cmd)
{
__raw_writel(0x1, S5P_SWRESET);
}
void exynos5_restart(char mode, const char *cmd)
void exynos5_restart(enum reboot_mode mode, const char *cmd)
{
struct device_node *np;
u32 val;

View File

@ -12,6 +12,7 @@
#ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H
#define __ARCH_ARM_MACH_EXYNOS_COMMON_H
#include <linux/reboot.h>
#include <linux/of.h>
void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
@ -20,8 +21,8 @@ extern unsigned long xxti_f, xusbxti_f;
struct map_desc;
void exynos_init_io(void);
void exynos4_restart(char mode, const char *cmd);
void exynos5_restart(char mode, const char *cmd);
void exynos4_restart(enum reboot_mode mode, const char *cmd);
void exynos5_restart(enum reboot_mode mode, const char *cmd);
void exynos_init_late(void);
/* ToDo: remove these after migrating legacy exynos4 platforms to dt */

View File

@ -86,7 +86,7 @@ fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi)
MACHINE_START(CATS, "Chalice-CATS")
/* Maintainer: Philip Blundell */
.atag_offset = 0x100,
.restart_mode = 's',
.reboot_mode = REBOOT_SOFT,
.fixup = fixup_cats,
.map_io = footbridge_map_io,
.init_irq = footbridge_init_irq,

View File

@ -198,9 +198,9 @@ void __init footbridge_map_io(void)
}
}
void footbridge_restart(char mode, const char *cmd)
void footbridge_restart(enum reboot_mode mode, const char *cmd)
{
if (mode == 's') {
if (mode == REBOOT_SOFT) {
/* Jump into the ROM */
soft_restart(0x41000000);
} else {

View File

@ -1,3 +1,4 @@
#include <linux/reboot.h>
extern void footbridge_timer_init(void);
extern void isa_timer_init(void);
@ -8,4 +9,4 @@ extern void footbridge_map_io(void);
extern void footbridge_init_irq(void);
extern void isa_init_irq(unsigned int irq);
extern void footbridge_restart(char, const char *);
extern void footbridge_restart(enum reboot_mode, const char *);

View File

@ -634,9 +634,9 @@ fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi)
#endif
}
static void netwinder_restart(char mode, const char *cmd)
static void netwinder_restart(enum reboot_mode mode, const char *cmd)
{
if (mode == 's') {
if (mode == REBOOT_SOFT) {
/* Jump into the ROM */
soft_restart(0x41000000);
} else {

View File

@ -1,8 +1,10 @@
#ifndef __HIGHBANK_CORE_H
#define __HIGHBANK_CORE_H
#include <linux/reboot.h>
extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
extern void highbank_restart(char, const char *);
extern void highbank_restart(enum reboot_mode, const char *);
extern void __iomem *scu_base_addr;
#ifdef CONFIG_PM_SLEEP

View File

@ -15,13 +15,14 @@
*/
#include <linux/io.h>
#include <asm/proc-fns.h>
#include <linux/reboot.h>
#include "core.h"
#include "sysregs.h"
void highbank_restart(char mode, const char *cmd)
void highbank_restart(enum reboot_mode mode, const char *cmd)
{
if (mode == 'h')
if (mode == REBOOT_HARD)
highbank_set_pwr_hard_reset();
else
highbank_set_pwr_soft_reset();

View File

@ -11,6 +11,8 @@
#ifndef __ASM_ARCH_MXC_COMMON_H__
#define __ASM_ARCH_MXC_COMMON_H__
#include <linux/reboot.h>
struct platform_device;
struct pt_regs;
struct clk;
@ -71,7 +73,7 @@ extern int mx53_clocks_init_dt(void);
extern struct platform_device *mxc_register_gpio(char *name, int id,
resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
extern void mxc_set_cpu_type(unsigned int type);
extern void mxc_restart(char, const char *);
extern void mxc_restart(enum reboot_mode, const char *);
extern void mxc_arch_reset_init(void __iomem *);
extern void mxc_arch_reset_init_dt(void);
extern int mx53_revision(void);

View File

@ -27,6 +27,7 @@
#include <linux/of_platform.h>
#include <linux/opp.h>
#include <linux/phy.h>
#include <linux/reboot.h>
#include <linux/regmap.h>
#include <linux/micrel_phy.h>
#include <linux/mfd/syscon.h>
@ -67,7 +68,7 @@ static void __init imx6q_init_revision(void)
mxc_set_cpu_type(rev >> 16 & 0xff);
}
static void imx6q_restart(char mode, const char *cmd)
static void imx6q_restart(enum reboot_mode mode, const char *cmd)
{
struct device_node *np;
void __iomem *wdog_base;

View File

@ -37,7 +37,7 @@ static struct clk *wdog_clk;
/*
* Reset the system. It is called by machine_restart().
*/
void mxc_restart(char mode, const char *cmd)
void mxc_restart(enum reboot_mode mode, const char *cmd)
{
unsigned int wcr_enable;

View File

@ -1,7 +1,8 @@
#include <linux/reboot.h>
#include <linux/amba/serial.h>
extern struct amba_pl010_data ap_uart_data;
void integrator_init_early(void);
int integrator_init(bool is_cp);
void integrator_reserve(void);
void integrator_restart(char, const char *);
void integrator_restart(enum reboot_mode, const char *);
void integrator_init_sysfs(struct device *parent, u32 id);

View File

@ -124,7 +124,7 @@ void __init integrator_reserve(void)
/*
* To reset, we hit the on-board reset register in the system FPGA
*/
void integrator_restart(char mode, const char *cmd)
void integrator_restart(enum reboot_mode mode, const char *cmd)
{
cm_control(CM_CTRL_RESET, CM_CTRL_RESET);
}

View File

@ -2,6 +2,9 @@
#define _IOP13XX_HW_H_
#ifndef __ASSEMBLY__
#include <linux/reboot.h>
/* The ATU offsets can change based on the strapping */
extern u32 iop13xx_atux_pmmr_offset;
extern u32 iop13xx_atue_pmmr_offset;
@ -11,7 +14,7 @@ void iop13xx_map_io(void);
void iop13xx_platform_init(void);
void iop13xx_add_tpmi_devices(void);
void iop13xx_init_irq(void);
void iop13xx_restart(char, const char *);
void iop13xx_restart(enum reboot_mode, const char *);
/* CPUID CP6 R0 Page 0 */
static inline int iop13xx_cpu_id(void)

View File

@ -594,7 +594,7 @@ __setup("iop13xx_init_adma", iop13xx_init_adma_setup);
__setup("iop13xx_init_uart", iop13xx_init_uart_setup);
__setup("iop13xx_init_i2c", iop13xx_init_i2c_setup);
void iop13xx_restart(char mode, const char *cmd)
void iop13xx_restart(enum reboot_mode mode, const char *cmd)
{
/*
* Reset the internal bus (warning both cores are reset)

View File

@ -286,7 +286,7 @@ static void n2100_power_off(void)
;
}
static void n2100_restart(char mode, const char *cmd)
static void n2100_restart(enum reboot_mode mode, const char *cmd)
{
gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);

View File

@ -531,9 +531,9 @@ static void __init ixp4xx_clockevent_init(void)
0xf, 0xfffffffe);
}
void ixp4xx_restart(char mode, const char *cmd)
void ixp4xx_restart(enum reboot_mode mode, const char *cmd)
{
if ( 1 && mode == 's') {
if ( 1 && mode == REBOOT_SOFT) {
/* Jump into ROM at address 0 */
soft_restart(0);
} else {

View File

@ -27,6 +27,7 @@
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>

View File

@ -13,6 +13,8 @@
#ifndef __ASSEMBLY__
#include <linux/reboot.h>
#include <asm/types.h>
#ifndef __ARMEB__
@ -123,7 +125,7 @@ extern void ixp4xx_init_early(void);
extern void ixp4xx_init_irq(void);
extern void ixp4xx_sys_init(void);
extern void ixp4xx_timer_init(void);
extern void ixp4xx_restart(char, const char *);
extern void ixp4xx_restart(enum reboot_mode, const char *);
extern void ixp4xx_pci_preinit(void);
struct pci_sys_data;
extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);

View File

@ -20,6 +20,7 @@
#include <linux/mv643xx_i2c.h>
#include <linux/timex.h>
#include <linux/kexec.h>
#include <linux/reboot.h>
#include <net/dsa.h>
#include <asm/page.h>
#include <asm/mach/map.h>
@ -722,7 +723,7 @@ void __init kirkwood_init(void)
#endif
}
void kirkwood_restart(char mode, const char *cmd)
void kirkwood_restart(enum reboot_mode mode, const char *cmd)
{
/*
* Enable soft reset to assert RSTOUTn.

View File

@ -11,6 +11,8 @@
#ifndef __ARCH_KIRKWOOD_COMMON_H
#define __ARCH_KIRKWOOD_COMMON_H
#include <linux/reboot.h>
struct dsa_platform_data;
struct mv643xx_eth_platform_data;
struct mv_sata_platform_data;
@ -53,7 +55,7 @@ void kirkwood_audio_init(void);
void kirkwood_cpuidle_init(void);
void kirkwood_cpufreq_init(void);
void kirkwood_restart(char, const char *);
void kirkwood_restart(enum reboot_mode, const char *);
void kirkwood_clk_init(void);
/* board init functions for boards not fully converted to fdt */

View File

@ -12,5 +12,5 @@
extern __init void ks8695_map_io(void);
extern __init void ks8695_init_irq(void);
extern void ks8695_restart(char, const char *);
extern void ks8695_restart(enum reboot_mode, const char *);
extern void ks8695_timer_init(void);

View File

@ -154,11 +154,11 @@ void __init ks8695_timer_init(void)
setup_irq(KS8695_IRQ_TIMER1, &ks8695_timer_irq);
}
void ks8695_restart(char mode, const char *cmd)
void ks8695_restart(enum reboot_mode reboot_mode, const char *cmd)
{
unsigned int reg;
if (mode == 's')
if (reboot_mode == REBOOT_SOFT)
soft_restart(0);
/* disable timer0 */

View File

@ -207,11 +207,11 @@ void __init lpc32xx_map_io(void)
iotable_init(lpc32xx_io_desc, ARRAY_SIZE(lpc32xx_io_desc));
}
void lpc23xx_restart(char mode, const char *cmd)
void lpc23xx_restart(enum reboot_mode mode, const char *cmd)
{
switch (mode) {
case 's':
case 'h':
case REBOOT_SOFT:
case REBOOT_HARD:
lpc32xx_watchdog_reset();
break;

View File

@ -21,6 +21,7 @@
#include <mach/board.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
/*
* Other arch specific structures and functions
@ -29,7 +30,7 @@ extern void lpc32xx_timer_init(void);
extern void __init lpc32xx_init_irq(void);
extern void __init lpc32xx_map_io(void);
extern void __init lpc32xx_serial_init(void);
extern void lpc23xx_restart(char, const char *);
extern void lpc23xx_restart(enum reboot_mode, const char *);
/*

View File

@ -47,7 +47,7 @@ void __init mmp_map_io(void)
mmp_chip_id = __raw_readl(MMP_CHIPID);
}
void mmp_restart(char mode, const char *cmd)
void mmp_restart(enum reboot_mode mode, const char *cmd)
{
soft_restart(0);
}

View File

@ -1,10 +1,11 @@
#include <linux/reboot.h>
#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
extern void timer_init(int irq);
extern void __init icu_init_irq(void);
extern void __init mmp_map_io(void);
extern void mmp_restart(char, const char *);
extern void mmp_restart(enum reboot_mode, const char *);
extern void __init pxa168_clk_init(void);
extern void __init pxa910_clk_init(void);
extern void __init mmp2_clk_init(void);

View File

@ -1,9 +1,11 @@
#ifndef __ASM_MACH_PXA168_H
#define __ASM_MACH_PXA168_H
#include <linux/reboot.h>
extern void pxa168_timer_init(void);
extern void __init pxa168_init_irq(void);
extern void pxa168_restart(char, const char *);
extern void pxa168_restart(enum reboot_mode, const char *);
extern void pxa168_clear_keypad_wakeup(void);
#include <linux/i2c.h>

View File

@ -172,7 +172,7 @@ int __init pxa168_add_usb_host(struct mv_usb_platform_data *pdata)
return platform_device_register(&pxa168_device_usb_host);
}
void pxa168_restart(char mode, const char *cmd)
void pxa168_restart(enum reboot_mode mode, const char *cmd)
{
soft_restart(0xffff0000);
}

View File

@ -413,7 +413,7 @@ void __init mv78xx0_init(void)
clk_init();
}
void mv78xx0_restart(char mode, const char *cmd)
void mv78xx0_restart(enum reboot_mode mode, const char *cmd)
{
/*
* Enable soft reset to assert RSTOUTn.

View File

@ -11,6 +11,8 @@
#ifndef __ARCH_MV78XX0_COMMON_H
#define __ARCH_MV78XX0_COMMON_H
#include <linux/reboot.h>
struct mv643xx_eth_platform_data;
struct mv_sata_platform_data;
@ -45,7 +47,7 @@ void mv78xx0_uart1_init(void);
void mv78xx0_uart2_init(void);
void mv78xx0_uart3_init(void);
void mv78xx0_i2c_init(void);
void mv78xx0_restart(char, const char *);
void mv78xx0_restart(enum reboot_mode, const char *);
extern void mv78xx0_timer_init(void);

View File

@ -17,7 +17,9 @@
#define ARMADA_XP_MAX_CPUS 4
void mvebu_restart(char mode, const char *cmd);
#include <linux/reboot.h>
void mvebu_restart(enum reboot_mode mode, const char *cmd);
void armada_370_xp_init_irq(void);
void armada_370_xp_handle_irq(struct pt_regs *regs);

View File

@ -26,6 +26,7 @@
#include <linux/init.h>
#include <linux/of_address.h>
#include <linux/io.h>
#include <linux/reboot.h>
static void __iomem *system_controller_base;
@ -63,7 +64,7 @@ static struct of_device_id of_system_controller_table[] = {
{ /* end of list */ },
};
void mvebu_restart(char mode, const char *cmd)
void mvebu_restart(enum reboot_mode mode, const char *cmd)
{
if (!system_controller_base) {
pr_err("Cannot restart, system-controller not available: check the device tree\n");

View File

@ -20,6 +20,7 @@
#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/irqchip/mxs.h>
#include <linux/reboot.h>
#include <linux/micrel_phy.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
@ -500,7 +501,7 @@ static void __init mxs_machine_init(void)
/*
* Reset the system. It is called by machine_restart().
*/
static void mxs_restart(char mode, const char *cmd)
static void mxs_restart(enum reboot_mode mode, const char *cmd)
{
struct device_node *np;
void __iomem *reset_addr;

View File

@ -24,6 +24,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/irqchip/arm-vic.h>
#include <linux/reboot.h>
#include <mach/hardware.h>
#include <asm/mach/map.h>
#include <mach/netx-regs.h>
@ -187,7 +188,7 @@ static int __init netx_init(void)
subsys_initcall(netx_init);
void netx_restart(char mode, const char *cmd)
void netx_restart(enum reboot_mode mode, const char *cmd)
{
writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES,
NETX_SYSTEM_RES_CR);

View File

@ -17,8 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/reboot.h>
extern void __init netx_map_io(void);
extern void __init netx_init_irq(void);
extern void netx_restart(char, const char *);
extern void netx_restart(enum reboot_mode, const char *);
extern void netx_timer_init(void);

View File

@ -103,7 +103,7 @@ static void __init cpu8815_map_io(void)
iotable_init(cpu8815_io_desc, ARRAY_SIZE(cpu8815_io_desc));
}
static void cpu8815_restart(char mode, const char *cmd)
static void cpu8815_restart(enum reboot_mode mode, const char *cmd)
{
void __iomem *srcbase = ioremap(NOMADIK_SRC_BASE, SZ_4K);

View File

@ -26,6 +26,7 @@
#include <linux/serial_reg.h>
#include <linux/smc91x.h>
#include <linux/export.h>
#include <linux/reboot.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@ -215,7 +216,7 @@ void voiceblue_wdt_ping(void)
gpio_set_value(0, wdt_gpio_state);
}
static void voiceblue_restart(char mode, const char *cmd)
static void voiceblue_restart(enum reboot_mode mode, const char *cmd)
{
/*
* Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28

View File

@ -28,6 +28,7 @@
#include <linux/mtd/mtd.h>
#include <linux/i2c-omap.h>
#include <linux/reboot.h>
#include <plat/i2c.h>
@ -70,7 +71,7 @@ static inline int omap_serial_wakeup_init(void)
void omap1_init_early(void);
void omap1_init_irq(void);
void omap1_init_late(void);
void omap1_restart(char, const char *);
void omap1_restart(enum reboot_mode, const char *);
extern void __init omap_check_revision(void);

View File

@ -3,6 +3,7 @@
*/
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/reboot.h>
#include <mach/hardware.h>
@ -22,7 +23,7 @@
#define OMAP_EXTWARM_RST_SRC_ID_SHIFT 5
void omap1_restart(char mode, const char *cmd)
void omap1_restart(enum reboot_mode mode, const char *cmd)
{
/*
* Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28

View File

@ -6,6 +6,7 @@
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/reboot.h>
#include "common.h"
#include "prm-regbits-33xx.h"
@ -19,7 +20,7 @@
* Resets the SoC. For @cmd, see the 'reboot' syscall in
* kernel/sys.c. No return value.
*/
void am33xx_restart(char mode, const char *cmd)
void am33xx_restart(enum reboot_mode mode, const char *cmd)
{
/* TODO: Handle mode and cmd if necessary */

View File

@ -31,6 +31,7 @@
#include <linux/i2c.h>
#include <linux/i2c/twl.h>
#include <linux/i2c-omap.h>
#include <linux/reboot.h>
#include <asm/proc-fns.h>
@ -119,33 +120,33 @@ static inline void omap_soc_device_init(void)
#endif
#if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430)
void omap2xxx_restart(char mode, const char *cmd);
void omap2xxx_restart(enum reboot_mode mode, const char *cmd);
#else
static inline void omap2xxx_restart(char mode, const char *cmd)
static inline void omap2xxx_restart(enum reboot_mode mode, const char *cmd)
{
}
#endif
#ifdef CONFIG_SOC_AM33XX
void am33xx_restart(char mode, const char *cmd);
void am33xx_restart(enum reboot_mode mode, const char *cmd);
#else
static inline void am33xx_restart(char mode, const char *cmd)
static inline void am33xx_restart(enum reboot_mode mode, const char *cmd)
{
}
#endif
#ifdef CONFIG_ARCH_OMAP3
void omap3xxx_restart(char mode, const char *cmd);
void omap3xxx_restart(enum reboot_mode mode, const char *cmd);
#else
static inline void omap3xxx_restart(char mode, const char *cmd)
static inline void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
{
}
#endif
#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
void omap44xx_restart(char mode, const char *cmd);
void omap44xx_restart(enum reboot_mode mode, const char *cmd);
#else
static inline void omap44xx_restart(char mode, const char *cmd)
static inline void omap44xx_restart(enum reboot_mode mode, const char *cmd)
{
}
#endif

View File

@ -31,7 +31,7 @@ static struct clk *reset_virt_prcm_set_ck, *reset_sys_ck;
* Set the DPLL to bypass so that reboot completes successfully. No
* return value.
*/
void omap2xxx_restart(char mode, const char *cmd)
void omap2xxx_restart(enum reboot_mode mode, const char *cmd)
{
u32 rate;

View File

@ -12,6 +12,7 @@
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/reboot.h>
#include "iomap.h"
#include "common.h"
@ -28,7 +29,7 @@
* Resets the SoC. For @cmd, see the 'reboot' syscall in
* kernel/sys.c. No return value.
*/
void omap3xxx_restart(char mode, const char *cmd)
void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
{
omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
omap3xxx_prm_dpll3_reset(); /* never returns */

View File

@ -23,6 +23,7 @@
#include <linux/export.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/of_address.h>
#include <linux/reboot.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/map.h>

View File

@ -8,6 +8,7 @@
*/
#include <linux/types.h>
#include <linux/reboot.h>
#include "prminst44xx.h"
/**
@ -18,7 +19,7 @@
* Resets the SoC. For @cmd, see the 'reboot' syscall in
* kernel/sys.c. No return value.
*/
void omap44xx_restart(char mode, const char *cmd)
void omap44xx_restart(enum reboot_mode mode, const char *cmd)
{
/* XXX Should save 'cmd' into scratchpad for use after reboot */
omap4_prminst_global_warm_sw_reset(); /* never returns */

View File

@ -347,7 +347,7 @@ void __init orion5x_init(void)
orion5x_wdt_init();
}
void orion5x_restart(char mode, const char *cmd)
void orion5x_restart(enum reboot_mode mode, const char *cmd)
{
/*
* Enable and issue soft reset

View File

@ -1,6 +1,8 @@
#ifndef __ARCH_ORION5X_COMMON_H
#define __ARCH_ORION5X_COMMON_H
#include <linux/reboot.h>
struct dsa_platform_data;
struct mv643xx_eth_platform_data;
struct mv_sata_platform_data;
@ -29,7 +31,7 @@ void orion5x_spi_init(void);
void orion5x_uart0_init(void);
void orion5x_uart1_init(void);
void orion5x_xor_init(void);
void orion5x_restart(char, const char *);
void orion5x_restart(enum reboot_mode, const char *);
/*
* PCIe/PCI functions.

View File

@ -139,7 +139,7 @@ static struct mv_sata_platform_data lschl_sata_data = {
static void lschl_power_off(void)
{
orion5x_restart('h', NULL);
orion5x_restart(REBOOT_HARD, NULL);
}
/*****************************************************************************

View File

@ -185,7 +185,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = {
static void ls_hgl_power_off(void)
{
orion5x_restart('h', NULL);
orion5x_restart(REBOOT_HARD, NULL);
}

View File

@ -185,7 +185,7 @@ static struct mv_sata_platform_data lsmini_sata_data = {
static void lsmini_power_off(void)
{
orion5x_restart('h', NULL);
orion5x_restart(REBOOT_HARD, NULL);
}

View File

@ -11,6 +11,7 @@
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/reboot.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@ -63,7 +64,7 @@ static const char *picoxcell_dt_match[] = {
NULL
};
static void picoxcell_wdt_restart(char mode, const char *cmd)
static void picoxcell_wdt_restart(enum reboot_mode mode, const char *cmd)
{
/*
* Configure the watchdog to reset with the shortest possible timeout

View File

@ -10,6 +10,8 @@
#define __MACH_PRIMA2_COMMON_H__
#include <linux/init.h>
#include <linux/reboot.h>
#include <asm/mach/time.h>
#include <asm/exception.h>
@ -22,7 +24,7 @@ extern void sirfsoc_cpu_die(unsigned int cpu);
extern void __init sirfsoc_of_irq_init(void);
extern void __init sirfsoc_of_clk_init(void);
extern void sirfsoc_restart(char, const char *);
extern void sirfsoc_restart(enum reboot_mode, const char *);
extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs);
#ifndef CONFIG_DEBUG_LL

View File

@ -13,6 +13,7 @@
#include <linux/device.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/reboot.h>
void __iomem *sirfsoc_rstc_base;
static DEFINE_MUTEX(rstc_lock);
@ -84,7 +85,7 @@ int sirfsoc_reset_device(struct device *dev)
#define SIRFSOC_SYS_RST_BIT BIT(31)
void sirfsoc_restart(char mode, const char *cmd)
void sirfsoc_restart(enum reboot_mode mode, const char *cmd)
{
writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
}

View File

@ -663,16 +663,16 @@ static void corgi_poweroff(void)
/* Green LED off tells the bootloader to halt */
gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
pxa_restart('h', NULL);
pxa_restart(REBOOT_HARD, NULL);
}
static void corgi_restart(char mode, const char *cmd)
static void corgi_restart(enum reboot_mode mode, const char *cmd)
{
if (!machine_is_corgi())
/* Green LED on tells the bootloader to reboot */
gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
pxa_restart('h', cmd);
pxa_restart(REBOOT_HARD, cmd);
}
static void __init corgi_init(void)

View File

@ -9,6 +9,8 @@
* published by the Free Software Foundation.
*/
#include <linux/reboot.h>
struct irq_data;
extern void pxa_timer_init(void);
@ -56,4 +58,4 @@ void __init pxa_set_btuart_info(void *info);
void __init pxa_set_stuart_info(void *info);
void __init pxa_set_hwuart_info(void *info);
void pxa_restart(char, const char *);
void pxa_restart(enum reboot_mode, const char *);

View File

@ -37,6 +37,7 @@
#include <linux/wm97xx.h>
#include <linux/mtd/physmap.h>
#include <linux/usb/gpio_vbus.h>
#include <linux/reboot.h>
#include <linux/regulator/max1586.h>
#include <linux/slab.h>
#include <linux/i2c/pxa-i2c.h>
@ -696,13 +697,13 @@ static void mioa701_machine_exit(void);
static void mioa701_poweroff(void)
{
mioa701_machine_exit();
pxa_restart('s', NULL);
pxa_restart(REBOOT_SOFT, NULL);
}
static void mioa701_restart(char c, const char *cmd)
static void mioa701_restart(enum reboot_mode c, const char *cmd)
{
mioa701_machine_exit();
pxa_restart('s', cmd);
pxa_restart(REBOOT_SOFT, cmd);
}
static struct gpio global_gpios[] = {
@ -761,7 +762,6 @@ static void mioa701_machine_exit(void)
MACHINE_START(MIOA701, "MIO A701")
.atag_offset = 0x100,
.restart_mode = 's',
.map_io = &pxa27x_map_io,
.nr_irqs = PXA_NR_IRQS,
.init_irq = &pxa27x_init_irq,

View File

@ -422,7 +422,7 @@ static struct i2c_board_info __initdata poodle_i2c_devices[] = {
static void poodle_poweroff(void)
{
pxa_restart('h', NULL);
pxa_restart(REBOOT_HARD, NULL);
}
static void __init poodle_init(void)

View File

@ -83,7 +83,7 @@ static void do_hw_reset(void)
writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3);
}
void pxa_restart(char mode, const char *cmd)
void pxa_restart(enum reboot_mode mode, const char *cmd)
{
local_irq_disable();
local_fiq_disable();
@ -91,14 +91,14 @@ void pxa_restart(char mode, const char *cmd)
clear_reset_status(RESET_STATUS_ALL);
switch (mode) {
case 's':
case REBOOT_SOFT:
/* Jump into ROM at address 0 */
soft_restart(0);
break;
case 'g':
case REBOOT_GPIO:
do_gpio_reset();
break;
case 'h':
case REBOOT_HARD:
default:
do_hw_reset();
break;

View File

@ -31,6 +31,7 @@
#include <linux/regulator/machine.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/reboot.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
@ -924,10 +925,10 @@ static inline void spitz_i2c_init(void) {}
******************************************************************************/
static void spitz_poweroff(void)
{
pxa_restart('g', NULL);
pxa_restart(REBOOT_GPIO, NULL);
}
static void spitz_restart(char mode, const char *cmd)
static void spitz_restart(enum reboot_mode mode, const char *cmd)
{
uint32_t msc0 = __raw_readl(MSC0);
/* Bootloader magic for a reboot */
@ -979,7 +980,6 @@ static void __init spitz_fixup(struct tag *tags, char **cmdline,
#ifdef CONFIG_MACH_SPITZ
MACHINE_START(SPITZ, "SHARP Spitz")
.restart_mode = 'g',
.fixup = spitz_fixup,
.map_io = pxa27x_map_io,
.nr_irqs = PXA_NR_IRQS,
@ -993,7 +993,6 @@ MACHINE_END
#ifdef CONFIG_MACH_BORZOI
MACHINE_START(BORZOI, "SHARP Borzoi")
.restart_mode = 'g',
.fixup = spitz_fixup,
.map_io = pxa27x_map_io,
.nr_irqs = PXA_NR_IRQS,
@ -1007,7 +1006,6 @@ MACHINE_END
#ifdef CONFIG_MACH_AKITA
MACHINE_START(AKITA, "SHARP Akita")
.restart_mode = 'g',
.fixup = spitz_fixup,
.map_io = pxa27x_map_io,
.nr_irqs = PXA_NR_IRQS,

View File

@ -36,6 +36,7 @@
#include <linux/input/matrix_keypad.h>
#include <linux/i2c/pxa-i2c.h>
#include <linux/usb/gpio_vbus.h>
#include <linux/reboot.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
@ -911,10 +912,10 @@ static struct platform_device *devices[] __initdata = {
static void tosa_poweroff(void)
{
pxa_restart('g', NULL);
pxa_restart(REBOOT_GPIO, NULL);
}
static void tosa_restart(char mode, const char *cmd)
static void tosa_restart(enum reboot_mode mode, const char *cmd)
{
uint32_t msc0 = __raw_readl(MSC0);
@ -969,7 +970,6 @@ static void __init fixup_tosa(struct tag *tags, char **cmdline,
}
MACHINE_START(TOSA, "SHARP Tosa")
.restart_mode = 'g',
.fixup = fixup_tosa,
.map_io = pxa25x_map_io,
.nr_irqs = TOSA_NR_IRQS,

View File

@ -29,6 +29,7 @@
#include <linux/io.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/clk-realview.h>
#include <linux/reboot.h>
#include <mach/hardware.h>
#include <asm/irq.h>
@ -418,7 +419,7 @@ static void __init realview_eb_timer_init(void)
realview_eb_twd_init();
}
static void realview_eb_restart(char mode, const char *cmd)
static void realview_eb_restart(enum reboot_mode mode, const char *cmd)
{
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);

View File

@ -31,6 +31,7 @@
#include <linux/io.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/clk-realview.h>
#include <linux/reboot.h>
#include <mach/hardware.h>
#include <asm/irq.h>
@ -329,7 +330,7 @@ static void __init realview_pb1176_timer_init(void)
realview_timer_init(IRQ_DC1176_TIMER0);
}
static void realview_pb1176_restart(char mode, const char *cmd)
static void realview_pb1176_restart(enum reboot_mode mode, const char *cmd)
{
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);

View File

@ -29,6 +29,7 @@
#include <linux/io.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/clk-realview.h>
#include <linux/reboot.h>
#include <mach/hardware.h>
#include <asm/irq.h>
@ -316,7 +317,7 @@ static void __init realview_pb11mp_timer_init(void)
realview_pb11mp_twd_init();
}
static void realview_pb11mp_restart(char mode, const char *cmd)
static void realview_pb11mp_restart(enum reboot_mode mode, const char *cmd)
{
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);

View File

@ -29,6 +29,7 @@
#include <linux/io.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/platform_data/clk-realview.h>
#include <linux/reboot.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
@ -264,7 +265,7 @@ static void __init realview_pba8_timer_init(void)
realview_timer_init(IRQ_PBA8_TIMER0_1);
}
static void realview_pba8_restart(char mode, const char *cmd)
static void realview_pba8_restart(enum reboot_mode mode, const char *cmd)
{
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);

Some files were not shown because too many files have changed in this diff Show More