Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99371
b: refs/heads/master
c: ebdd561
h: refs/heads/master
i:
  99369: 5fdb435
  99367: e1bd5bd
v: v3
  • Loading branch information
Jan Beulich authored and Thomas Gleixner committed May 25, 2008
1 parent 3d82796 commit 42e184e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c8ab98249fa3cead320ec0ee4cde9960b951989
refs/heads/master: ebdd561a19d7917ac49fff9c355aa4833c504bf1
18 changes: 9 additions & 9 deletions trunk/arch/x86/kernel/reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);

static long no_idt[3];
static const struct desc_ptr no_idt = {};
static int reboot_mode;
enum reboot_type reboot_type = BOOT_KBD;
int reboot_force;
Expand Down Expand Up @@ -201,15 +201,15 @@ core_initcall(reboot_init);
controller to pulse the CPU reset line, which is more thorough, but
doesn't work with at least one type of 486 motherboard. It is easy
to stop this code working; hence the copious comments. */
static unsigned long long
static const unsigned long long
real_mode_gdt_entries [3] =
{
0x0000000000000000ULL, /* Null descriptor */
0x00009a000000ffffULL, /* 16-bit real-mode 64k code at 0x00000000 */
0x000092000100ffffULL /* 16-bit real-mode 64k data at 0x00000100 */
0x00009b000000ffffULL, /* 16-bit real-mode 64k code at 0x00000000 */
0x000093000100ffffULL /* 16-bit real-mode 64k data at 0x00000100 */
};

static struct desc_ptr
static const struct desc_ptr
real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, (long)real_mode_gdt_entries },
real_mode_idt = { 0x3ff, 0 };

Expand All @@ -231,7 +231,7 @@ real_mode_idt = { 0x3ff, 0 };
More could be done here to set up the registers as if a CPU reset had
occurred; hopefully real BIOSs don't assume much. */
static unsigned char real_mode_switch [] =
static const unsigned char real_mode_switch [] =
{
0x66, 0x0f, 0x20, 0xc0, /* movl %cr0,%eax */
0x66, 0x83, 0xe0, 0x11, /* andl $0x00000011,%eax */
Expand All @@ -245,7 +245,7 @@ static unsigned char real_mode_switch [] =
0x24, 0x10, /* f: andb $0x10,al */
0x66, 0x0f, 0x22, 0xc0 /* movl %eax,%cr0 */
};
static unsigned char jump_to_bios [] =
static const unsigned char jump_to_bios [] =
{
0xea, 0x00, 0x00, 0xff, 0xff /* ljmp $0xffff,$0x0000 */
};
Expand All @@ -255,7 +255,7 @@ static unsigned char jump_to_bios [] =
* specified by the code and length parameters.
* We assume that length will aways be less that 100!
*/
void machine_real_restart(unsigned char *code, int length)
void machine_real_restart(const unsigned char *code, int length)
{
local_irq_disable();

Expand Down Expand Up @@ -368,7 +368,7 @@ static void native_machine_emergency_restart(void)
}

case BOOT_TRIPLE:
load_idt((const struct desc_ptr *)&no_idt);
load_idt(&no_idt);
__asm__ __volatile__("int3");

reboot_type = BOOT_KBD;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/reboot_fixups_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct device_fixup {
void (*reboot_fixup)(struct pci_dev *);
};

static struct device_fixup fixups_table[] = {
static const struct device_fixup fixups_table[] = {
{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset },
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset },
{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE, cs5530a_warm_reset },
Expand All @@ -64,7 +64,7 @@ static struct device_fixup fixups_table[] = {
*/
void mach_reboot_fixups(void)
{
struct device_fixup *cur;
const struct device_fixup *cur;
struct pci_dev *dev;
int i;

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-x86/reboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ struct machine_ops {

extern struct machine_ops machine_ops;

void machine_real_restart(unsigned char *code, int length);
void native_machine_crash_shutdown(struct pt_regs *regs);
void native_machine_shutdown(void);
void machine_real_restart(const unsigned char *code, int length);

#endif /* _ASM_REBOOT_H */

0 comments on commit 42e184e

Please sign in to comment.