diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 9bbbc85c32134..473c40e4a8b71 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -589,15 +589,23 @@ static void native_machine_emergency_restart(void) int orig_reboot_type = reboot_type; unsigned short mode; - if (reboot_emergency) + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); + if (reboot_emergency) { + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); emergency_vmx_disable_all(); + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); + } + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); tboot_shutdown(TB_SHUTDOWN_REBOOT); + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); + /* Tell the BIOS if we want cold or warm reboot */ mode = reboot_mode == REBOOT_WARM ? 0x1234 : 0; *((unsigned short *)__va(0x472)) = mode; + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); /* * If an EFI capsule has been registered with the firmware then * override the reboot= parameter. @@ -608,8 +616,10 @@ static void native_machine_emergency_restart(void) } for (;;) { + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); /* Could also try the reset bit in the Hammer NB */ switch (reboot_type) { + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); case BOOT_ACPI: acpi_reboot(); mdelay(15); @@ -711,10 +721,12 @@ void native_machine_shutdown(void) #ifdef CONFIG_X86_64 x86_platform.iommu_shutdown(); #endif + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); } static void __machine_emergency_restart(int emergency) { + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); reboot_emergency = emergency; machine_ops.emergency_restart(); } @@ -767,6 +779,7 @@ void machine_power_off(void) void machine_shutdown(void) { + pr_notice("%s - %d reboot_type:%x\n", __FUNCTION__, __LINE__, reboot_type); machine_ops.shutdown(); } diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c index fb27aaad0dee2..910a7c8eaadf0 100644 --- a/drivers/acpi/acpica/hwxface.c +++ b/drivers/acpi/acpica/hwxface.c @@ -57,12 +57,14 @@ acpi_status acpi_reset(void) * compatibility with other ACPI implementations that have allowed * BIOS code with bad register width values to go unnoticed. */ + printk("%s - %d \n", __FUNCTION__, __LINE__); status = acpi_os_write_port((acpi_io_address)reset_reg->address, acpi_gbl_FADT.reset_value, ACPI_RESET_REGISTER_WIDTH); } else { /* Write the reset value to the reset register */ + printk("%s - %d \n", __FUNCTION__, __LINE__); status = acpi_hw_write(acpi_gbl_FADT.reset_value, reset_reg); } diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 45c5c0e45e332..9dd8970b0bc10 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -667,6 +667,7 @@ EXPORT_SYMBOL(acpi_os_read_port); acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width) { + printk("%s - %d port:%x, value:%x width:%x\n", __FUNCTION__, __LINE__, port, value, width); if (width <= 8) { outb(value, port); } else if (width <= 16) { @@ -755,6 +756,7 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u64 value, u32 width) unmap = true; } + printk("%s - %d va:%llx, value:%x\n", __FUNCTION__, __LINE__, virt_addr, value); switch (width) { case 8: writeb(value, virt_addr); diff --git a/drivers/acpi/reboot.c b/drivers/acpi/reboot.c index b79b7c99c237c..fdabe117e21c8 100644 --- a/drivers/acpi/reboot.c +++ b/drivers/acpi/reboot.c @@ -38,21 +38,27 @@ void acpi_reboot(void) struct acpi_generic_address *rr; u8 reset_value; - if (acpi_disabled) + if (acpi_disabled) { + pr_notice("%s - %d \n", __FUNCTION__, __LINE__); return; + } rr = &acpi_gbl_FADT.reset_register; /* ACPI reset register was only introduced with v2 of the FADT */ - if (acpi_gbl_FADT.header.revision < 2) + if (acpi_gbl_FADT.header.revision < 2) { + pr_notice("%s - %d \n", __FUNCTION__, __LINE__); return; + } /* Is the reset register supported? The spec says we should be * checking the bit width and bit offset, but Windows ignores * these fields */ - if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER)) + if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER)) { + pr_notice("%s - %d \n", __FUNCTION__, __LINE__); return; + } reset_value = acpi_gbl_FADT.reset_value; @@ -60,13 +66,17 @@ void acpi_reboot(void) * on a device on bus 0. */ switch (rr->space_id) { case ACPI_ADR_SPACE_PCI_CONFIG: + pr_notice("%s - %d rr->space_id:%x\n", __FUNCTION__, __LINE__, rr->space_id); acpi_pci_reboot(rr, reset_value); + pr_notice("%s - %d rr->space_id:%x\n", __FUNCTION__, __LINE__, rr->space_id); break; case ACPI_ADR_SPACE_SYSTEM_MEMORY: case ACPI_ADR_SPACE_SYSTEM_IO: pr_debug("ACPI MEMORY or I/O RESET_REG.\n"); + pr_notice("%s - %d rr->space_id:%x\n", __FUNCTION__, __LINE__, rr->space_id); acpi_reset(); + pr_notice("%s - %d rr->space_id:%x\n", __FUNCTION__, __LINE__, rr->space_id); break; } @@ -78,5 +88,7 @@ void acpi_reboot(void) * The 15ms delay has been found to be long enough for the system * to reboot on the affected platforms. */ + pr_notice("%s - %d \n", __FUNCTION__, __LINE__); mdelay(15); + pr_notice("%s - %d \n", __FUNCTION__, __LINE__); }