2.6.22-rcX Transmeta/APM regression
Hardware: Fujitsu Lifebook P-2040, TM5800 800 MHz processor 2.6.21: Closing the lid causes APM suspend. Opening it resumes just fine. 2.6.22-rc5/-rc6: On resume, backlight comes on, but system is otherwise
frozen. Nothing happens until I hold the power button to force a power off.
I'm trying to bisect, but there's a large range of commits which crash on boot in init_transmeta, which is slowing me down.
However, I did manage to find a kernel version that gives an error message instead of a blank screen, which might be useful. I can even switch VTs and type into the shell afterwards, but actually trying to do anything hangs. Which includes anything like run a command to capture this to a file or another machine on the network, even if I took care to cache the necessary executables and libraries before suspending.
So the following is transcribed by hand.
general protection fault: 0000 [#1] Modules linked in: CPU: 0 EIP: 0060:[<c0108c59>] Not tainted VLI EFLAGS: 00010246 (2.6.21-gba7cc09c #16)
EIP is at get_fixed_ranges+0x9/0x60
eax: c0338d24 ebx: c03589a0 ecx: 00000250 edx: 00000000
esi: c0338d24 edi: 0000000a ebp: 00000000 esp: cefa4f5c
ds: 007b es: 007b fs: 0000 gs: 000 ss: 0068
Process kapmd (pid: 70, ti=cefa4000 task=cef89550 task.ti=cefa4000)
Stack: c03589a0 c010b1a0 c0238e4d c010b1a0 0000000a 00000000 c010addf c010b1a0
0000000a 00000000 c010b5f1 cefa4fc4 cefa4fc0 cefa4fbc cefa4fb8 cefa4fb8
00000001 e45a3b0f 00000000 cef89550 c0110f20 c02f53e4 c02f5e34 c010b1a0
Call Trace:
[<c010b1a0>] apm+0x0/0x500
[<c0238e4d>] __save_process_rstate+0xd/0x50
[<c010b1a0>] apm+0x0/0x500
[<c010addf>] suspend+0x1f/0xb0
[<c010b1a0>] apm+0x0/0x500
[<c010b5f1>] apm+0x451/0x500
[<c0110f20>] default_wake_function+0x0/0x10
[<c010b1a0>] apm+0x0/0x500
[<c010b1a0>] apm+0x0/0x500
[<c01217f9>] kthread+0x39/0x60
[<c01217c0>] kthread+0x0/0x60
[<c0102fe7>] kernel_thread_helper+0x7/0x10
=======================
Code: 46 83 c7 04 39 ee 0f 8c 40 ff ff ff 83 c4 3c 31 c0 5b 5e 5f 5d c3 90 90 90
90 90 90 90 90 90 90 90 90 56 b9 50 02 00 00 53 89 c6 <0f> 32 89 06 89 d0 b1 58
31 d2 89 46 04 0f 32 89 46 08 89 d0 b1
EIP: [<c0108c59>] get_fixed_ranges+0x9/0x60 SS:ESP 0068:cefa4f5cThe init_transmeta crash looks like the following:
Calibrating delay using timer specific routine.. 1630.69 BogoMIPS (lpj=8153474) Mount-cache hash table entries: 512
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (32 bytes/line)
CPU: L2 Cache: 512K (128 bytes/line)
CPU: Processor revision 1.4.1.0, 800 MHz
CPU: Code Morphing Software revision 4.2.6-8-168
CPU: 20010703 00:29 official release 4.2.6#2 general protection fault: 0000 [#1] Modules linked in: CPU: 0 EIP: 0060:[<c03142f5>] Not tainted VLI EFLAGS: 00010286 (2.6.21-g1e7371c1 #18)
EIP is at init_transmeta+0x1d5/0x230
eax: ffffffff ebx: 00000000 ecx: 80860004 edx: ffffffff
esi: ffffffff edi: 00000000 ebp: 80860004 esp: c030fed0
ds: 007b es: 007b fs: 0000 gs: 0000 ss: 0068
Process swapper (pid: 0, ti=c030f000 task=c02ed280 task.ti=c030f000)
Stack: c02b5c52 c030ff1b 00000002 00000006 00000008 000000a8 cefc2600 00000246
00000000 00000000 c030d2e0 00000320 00000020 00000000 00000000 c01b553f
00000000 00000000 32000000 30313030 20333037 323a3030 666f2039 69636966 /* "20010703 00:29 offici" */
Call Trace:
[<c01b553f>] idr_get_new_above_int+0x10f/0x1f0
[<c0312eee>] identify_cpu+0x20e/0x370
[<c01b562d>] idr_get_new+0xd/0x30
[<c0173e10>] proc_register+0x30/0xe0
[<c031307d>] identify_boot_cpu+0xd/0x20
[<c0313318>] check_bugs+0x8/0x100
[<c03109a3>] start_kernel+0x203/0x210
[<c0310420>] unknown_bootoption+0x0/0x210
=======================
Code: 00 c6 84 24 8b 00 00 00 00 89 7c 24 04 c7 04 24 52 5c 2b c0 ed 8d fc df ff
bd 04 00 86 80 89 e9 0f 32 89 c6 93 c8 ff 89 d7 89 c2 <0f> 30 31 c9 b8 01 00 00
00 0f a2 8b 44 24 28 89 e9 89 50 0c b8
EIP: [<c03142f5>] init_transmeta+0x1d5/0x230 SS:ESP 0068:c030fed0
Kernel panic - not syncing: Attempted to kill the idle task!Quoted 6 lines · On 06/27/2007 11:31 AM, [email protected] wrote:
Hardware: Fujitsu Lifebook P-2040, TM5800 800 MHz processor 2.6.21: Closing the lid causes APM suspend. Opening it resumes just fine. 2.6.22-rc5/-rc6: On resume, backlight comes on, but system is otherwise
frozen. Nothing happens until I hold the power button to force a power off.
.config and contents of /proc/cpuinfo would be helpful...
Quoted 1 line
.config and contents of
/proc/cpuinfowould be helpful...
Apologies! I'm still working on the bisection, but...
The following is from 2.6.21-gae1ee11b, which works.
$ cat /tmp/cpuinfo processor : 0 vendor_id : GenuineTMx86 cpu family : 6 model : 4 model name : Transmeta(tm) Crusoe(tm) Processor TM5800 stepping : 3 cpu MHz : 300.000 cache size : 512 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr cx8 sep cmov mmx longrun lrti constant_tsc bogomips : 1608.38 clflush size : 32 $ lspci -nn 00:00.0 Host bridge [0600]: Transmeta Corporation LongRun Northbridge [1279:0395] (rev 01) 00:00.1 RAM memory [0500]: Transmeta Corporation SDRAM controller [1279:0396] 00:00.2 RAM memory [0500]: Transmeta Corporation BIOS scratchpad [1279:0397] 00:02.0 USB Controller [0c03]: ALi Corporation USB 1.1 Controller [10b9:5237] (rev 03) 00:04.0 Multimedia audio controller [0401]: ALi Corporation M5451 PCI AC-Link Controller Audio Device [10b9:5451] (rev 01) 00:06.0 Bridge [0680]: ALi Corporation M7101 Power Management Controller [PMU] [10b9:7101] 00:07.0 ISA bridge [0601]: ALi Corporation M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+] [10b9:1533] 00:0c.0 CardBus bridge [0607]: Texas Instruments PCI1410 PC card Cardbus Controller [104c:ac50] (rev 01) 00:0f.0 IDE interface [0101]: ALi Corporation M5229 IDE [10b9:5229] (rev c3) 00:12.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ [10ec:8139] (rev 10) 00:13.0 FireWire (IEEE 1394) [0c00]: Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link) [104c:8026] 00:14.0 VGA compatible controller [0300]: ATI Technologies Inc Rage Mobility P/M [1002:4c52] (rev 64) $ grep ^CONFIG /usr/src/linux/.config CONFIG_X86_32=y CONFIG_GENERIC_TIME=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y CONFIG_ZONE_DMA=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_IKCONFIG=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_UID16=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_KMOD=y CONFIG_BLOCK=y CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y CONFIG_DEFAULT_CFQ=y CONFIG_DEFAULT_IOSCHED="cfq" CONFIG_TICK_ONESHOT=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y CONFIG_X86_PC=y CONFIG_MCRUSOE=y CONFIG_X86_CMPXCHG=y CONFIG_X86_L1_CACHE_SHIFT=5 CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_X86_WP_WORKS_OK=y CONFIG_X86_INVLPG=y CONFIG_X86_BSWAP=y CONFIG_X86_POPAD_OK=y CONFIG_X86_CMPXCHG64=y CONFIG_X86_TSC=y CONFIG_HPET_TIMER=y CONFIG_PREEMPT_NONE=y CONFIG_X86_UP_APIC=y CONFIG_X86_UP_IOAPIC=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_VM86=y CONFIG_X86_MSR=y CONFIG_X86_CPUID=y CONFIG_NOHIGHMEM=y CONFIG_PAGE_OFFSET=0xC0000000 CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_ZONE_DMA_FLAG=1 CONFIG_MTRR=y CONFIG_SECCOMP=y CONFIG_HZ_100=y CONFIG_HZ=100 CONFIG_PHYSICAL_START=0x100000 CONFIG_PHYSICAL_ALIGN=0x100000 CONFIG_PM=y CONFIG_PM_DEBUG=y CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION="/dev/hda2" CONFIG_APM=y CONFIG_APM_CPU_IDLE=y CONFIG_APM_DISPLAY_BLANK=y CONFIG_APM_RTC_IS_GMT=y CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_DEBUG=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_X86_LONGRUN=y CONFIG_PCI=y CONFIG_PCI_GOANY=y CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y CONFIG_ISA_DMA_API=y CONFIG_PCCARD=y CONFIG_PCMCIA=y CONFIG_PCMCIA_LOAD_CIS=y CONFIG_PCMCIA_IOCTL=y CONFIG_CARDBUS=y CONFIG_YENTA=y CONFIG_YENTA_O2=y CONFIG_YENTA_RICOH=y CONFIG_YENTA_TI=y CONFIG_YENTA_ENE_TUNE=y CONFIG_YENTA_TOSHIBA=y CONFIG_PCCARD_NONSTATIC=y CONFIG_BINFMT_ELF=y CONFIG_NET=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y CONFIG_INET=y CONFIG_IP_FIB_HASH=y CONFIG_SYN_COOKIES=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" CONFIG_IEEE80211=m CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y CONFIG_BLK_DEV_LOOP=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 CONFIG_IDE=y CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_BLK_DEV_IDECD=y CONFIG_IDE_GENERIC=y CONFIG_BLK_DEV_IDEPCI=y CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_ALI15X3=y CONFIG_BLK_DEV_IDEDMA=y CONFIG_SCSI=m CONFIG_BLK_DEV_SD=m CONFIG_NETDEVICES=y CONFIG_DUMMY=y CONFIG_NET_ETHERNET=y CONFIG_MII=y CONFIG_NET_PCI=y CONFIG_8139TOO=y CONFIG_NET_PCMCIA=y CONFIG_PPP=m CONFIG_PPP_FILTER=y CONFIG_PPP_ASYNC=m CONFIG_PPP_DEFLATE=m CONFIG_PPP_BSDCOMP=m CONFIG_SLHC=m CONFIG_INPUT=y CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1280 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 CONFIG_INPUT_EVDEV=y CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y CONFIG_SERIO=y CONFIG_SERIO_I8042=y CONFIG_SERIO_LIBPS2=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y CONFIG_SERIAL_8250=m CONFIG_SERIAL_8250_PCI=m CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 CONFIG_SERIAL_CORE=m CONFIG_UNIX98_PTYS=y CONFIG_AGP=y CONFIG_DRM=y CONFIG_DRM_R128=m CONFIG_HWMON=y CONFIG_VGA_CONSOLE=y CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y CONFIG_SOUND=y CONFIG_SND=m CONFIG_SND_TIMER=m CONFIG_SND_PCM=m CONFIG_SND_RAWMIDI=m CONFIG_SND_SEQUENCER=m CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m CONFIG_SND_SEQUENCER_OSS=y CONFIG_SND_VERBOSE_PROCFS=y CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_MPU401_UART=m CONFIG_SND_AC97_CODEC=m CONFIG_SND_ALI5451=m CONFIG_AC97_BUS=m CONFIG_HID=y CONFIG_USB_HID=m CONFIG_USB_HIDDEV=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=y CONFIG_USB_DEVICEFS=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_STORAGE=m CONFIG_USB_SERIAL=y CONFIG_USB_SERIAL_GENERIC=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y CONFIG_JBD=y CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y CONFIG_DNOTIFY=y CONFIG_ISO9660_FS=y CONFIG_JOLIET=y CONFIG_UDF_FS=y CONFIG_UDF_NLS=y CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" CONFIG_PROC_FS=y CONFIG_PROC_SYSCTL=y CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_RAMFS=y CONFIG_CRAMFS=y CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFSD=m CONFIG_NFSD_V3=y CONFIG_LOCKD=m CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=m CONFIG_NFS_COMMON=y CONFIG_SUNRPC=m CONFIG_MSDOS_PARTITION=y CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=m CONFIG_NLS_ASCII=m CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_15=m CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_EARLY_PRINTK=y CONFIG_4KSTACKS=y CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y CONFIG_DOUBLEFAULT=y CONFIG_CRYPTO=y CONFIG_CRYPTO_ALGAPI=m CONFIG_CRYPTO_BLKCIPHER=m CONFIG_CRYPTO_MANAGER=m CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_CBC=m CONFIG_CRYPTO_PCBC=m CONFIG_CRYPTO_AES=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_DEV_GEODE=m CONFIG_BITREVERSE=y CONFIG_CRC_CCITT=y CONFIG_CRC32=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_X86_BIOS_REBOOT=y CONFIG_KTIME_SCALAR=y
Okay, after a ridiculous amount of bisecting and recompiling and rebooting...
First I had to find out that the kernel stops booting as ofbf50467204: "i386: Use per-cpu GDT immediately on boot" (With theis commit, it silently stops booting. The GP fault I posted earlier comes a little later, but I didn't bother finding it.)
and starts again as ofb0b73cb41d: "i386: msr.h: be paranoid about types and parentheses"
However, one commit before the former suspends properly, and the latter fails to suspend (exactly the same problem at get_fixed_ranges+0x9/0x60), so I had to bisect further between the two, backporting the msr.h changes across the msr-index.h splitoff.
Anyway, the patch which introduces the problem is the aptly named 3ebad:3ebad59056: [PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending
2.6.22-rc6 plus that one commit reverted successfully does APM suspend (and resume) for me.
Okay, after a ridiculous amount of bisecting and recompiling and rebooting...
First I had to find out that the kernel stops booting as ofbf50467204: "i386: Use per-cpu GDT immediately on boot" (With theis commit, it silently stops booting. The GP fault I posted earlier comes a little later, but I didn't bother finding it.)
and starts again as ofb0b73cb41d: "i386: msr.h: be paranoid about types and parentheses"
However, one commit before the former suspends properly, and the latter fails to suspend (exactly the same problem at get_fixed_ranges+0x9/0x60), so I had to bisect further between the two, backporting the msr.h changes across the msr-index.h splitoff.
Anyway, the patch which introduces the problem is the aptly named 3ebad:3ebad59056: [PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending
2.6.22-rc6 plus that one commit reverted successfully does APM suspend (and resume) for me.
Quoted 6 lines · [email protected] wrote:
Anyway, the patch which introduces the problem is the aptly named 3ebad:
3ebad59056: [PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending2.6.22-rc6 plus that one commit reverted successfully does APM suspend (and resume) for me.
Okay, I would guess that that patch probably touches MTRRs without actually verify that the CPU *has* MTRRs -- the Transmeta Crusoe CPU doesn't have MTRRs.
-hpa
Quoted 5 lines · On Sat, 30 Jun 2007 00:06:36 -0400 "H. Peter Anvin" <[email protected]> wrote:
Quoted 4 lines · [email protected] wrote:
Anyway, the patch which introduces the problem is the aptly named 3ebad:
3ebad59056: [PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending
Quoted 7 lines
Quoted 2 lines
2.6.22-rc6 plus that one commit reverted successfully does APM suspend (and resume) for me.
Okay, I would guess that that patch probably touches MTRRs without actually verify that the CPU *has* MTRRs -- the Transmeta Crusoe CPU doesn't have MTRRs.
This?
arch/i386/kernel/cpu/mtrr/generic.c renamed from arch/i386/kernel/cpu/mtrr/generic.c~i386-mtrr-crash-fix +2 -1
@@ -65,7 +65,8 @@ get_fixed_ranges(mtrr_type * frs)void mtrr_save_fixed_ranges (void *info) { -get_fixed_ranges (mtrr_state.fixed_ranges); +if (cpu_has_mtrr) +get_fixed_ranges (mtrr_state.fixed_ranges); }static void print_fixed (unsigned base,unsigned step,const mtrr_type *types)
_
Quoted 6 lines · On Saturday 30 June 2007 05:03, [email protected] wrote:
Anyway, the patch which introduces the problem is the aptly named 3ebad:
3ebad59056: [PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending2.6.22-rc6 plus that one commit reverted successfully does APM suspend (and resume) for me.
Mr.Linux, Does that patch fix it?
-Andi
i386: Check if CPU has MTRRs before trying to save them
arch/i386/kernel/cpu/mtrr/main.c +4 -1
@@ -734,8 +734,11 @@ void mtrr_ap_init(void)*/ void mtrr_save_state (void ) { -int cpu =get_cpu (); +int cpu; +if (!cpu_has_mtrr) +return ; + cpu =get_cpu ();if (cpu ==0 )mtrr_save_fixed_ranges (NULL );else
Responding to various proposed fixes:
Quoted 7 lines
Index:
linux/arch/i386/kernel/cpu/mtrr/main.c
===================================================================arch/i386/kernel/cpu/mtrr/main.c +0
-0@@ -734,8 +734,11 @@ void mtrr_ap_init(void)*/ void mtrr_save_state (void )
arch/i386/kernel/cpu/mtrr/main.c void mtrr_ap_init(void) · line 744
Quoted 10 lines
arch/i386/kernel/cpu/mtrr/main.c +4
-1{ -int cpu =get_cpu (); +int cpu; +if (!cpu_has_mtrr) +return ; + cpu =get_cpu ();if (cpu ==0 )mtrr_save_fixed_ranges (NULL );else
This does not change the symptoms in any way.
arch/i386/kernel/cpu/mtrr/generic.c get_fixed_ranges(mtrr_type * frs) · line 72
Quoted 12 lines
arch/i386/kernel/cpu/mtrr/generic.c renamed from arch/i386/kernel/cpu/mtrr/generic.c~i386-mtrr-crash-fix +2
-1@@ -65,7 +65,8 @@ get_fixed_ranges(mtrr_type * frs)void mtrr_save_fixed_ranges (void *info) { -get_fixed_ranges (mtrr_state.fixed_ranges); +if (cpu_has_mtrr) +get_fixed_ranges (mtrr_state.fixed_ranges); }static void print_fixed (unsigned base,unsigned step,const mtrr_type *types)
This works great, thanks! Please consider the regression diagnosed and fixed.
Quoted 11 lines · On 30 Jun 2007 14:57:06 -0400 [email protected] wrote:
Quoted 11 lines
arch/i386/kernel/cpu/mtrr/generic.c renamed from arch/i386/kernel/cpu/mtrr/generic.c~i386-mtrr-crash-fix +2
-1@@ -65,7 +65,8 @@ get_fixed_ranges(mtrr_type * frs)void mtrr_save_fixed_ranges (void *info) { -get_fixed_ranges (mtrr_state.fixed_ranges); +if (cpu_has_mtrr) +get_fixed_ranges (mtrr_state.fixed_ranges); }
Quoted 3 lines
arch/i386/kernel/cpu/mtrr/generic.c get_fixed_ranges(mtrr_type * frs) · line 72
Quoted 1 line
arch/i386/kernel/cpu/mtrr/generic.c renamed from arch/i386/kernel/cpu/mtrr/generic.c~i386-mtrr-crash-fix +0
-0static void print_fixed (unsigned base,unsigned step,const mtrr_type *types)This works great, thanks! Please consider the regression diagnosed and fixed.
OK, thanks. I'll scoot that linuswards later today.
Quoted 11 lines · On 30 Jun 2007 14:57:06 -0400 [email protected] wrote:
Quoted 11 lines
arch/i386/kernel/cpu/mtrr/generic.c renamed from arch/i386/kernel/cpu/mtrr/generic.c~i386-mtrr-crash-fix +2
-1@@ -65,7 +65,8 @@ get_fixed_ranges(mtrr_type * frs)void mtrr_save_fixed_ranges (void *info) { -get_fixed_ranges (mtrr_state.fixed_ranges); +if (cpu_has_mtrr) +get_fixed_ranges (mtrr_state.fixed_ranges); }
Quoted 3 lines
arch/i386/kernel/cpu/mtrr/generic.c get_fixed_ranges(mtrr_type * frs) · line 72
Quoted 1 line
arch/i386/kernel/cpu/mtrr/generic.c renamed from arch/i386/kernel/cpu/mtrr/generic.c~i386-mtrr-crash-fix +0
-0static void print_fixed (unsigned base,unsigned step,const mtrr_type *types)This works great, thanks! Please consider the regression diagnosed and fixed.
OK, thanks. I'll scoot that linuswards later today.