android_kernel_xiaomi_sdm845/arch
Mikael Pettersson 1514ab09ed [x86 setup] APM detection logic bug fix
Starting with kernel 2.6.23-rc1, the i386 APM driver fails
on several of my machines with the message:

apm: BIOS not found

This happens because of a bug in the i386 boot code rewrite
from assembler to C. The original assembly code had the
following code in its APM BIOS presence test (boot/setup.S):

	andw	$0x02, %cx			# Is 32 bit supported?
	je	done_apm_bios			# No 32-bit, no (good) APM BIOS

That is, the code bails out if bit 2 is zero.

In the new C version, this is coded as (boot/apm.c):

	if (cx & 0x02)		/* 32 bits supported? */
		return -1;

Here we see that the test has been accidentally inverted.

The fix is to negate the test. I've verified that this
allows the APM driver to work again on my affected machines.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-25 12:02:21 -07:00
..
alpha some kmalloc/memset ->kzalloc (tree wide) 2007-07-19 10:04:50 -07:00
arm [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
arm26 take declarations of enable_irq() et.al. to linux/interrupt.h 2007-07-22 11:44:00 -07:00
avr32 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds 2007-07-22 11:22:01 -07:00
blackfin some kmalloc/memset ->kzalloc (tree wide) 2007-07-19 10:04:50 -07:00
cris Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2007-07-19 14:28:19 -07:00
frv FRV: work around a possible compiler bug 2007-07-19 10:04:50 -07:00
h8300 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
i386 [x86 setup] APM detection logic bug fix 2007-07-25 12:02:21 -07:00
ia64 ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from source 2007-07-25 01:29:39 -04:00
m32r Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6 2007-07-19 14:24:57 -07:00
m68k take declarations of enable_irq() et.al. to linux/interrupt.h 2007-07-22 11:44:00 -07:00
m68knommu m68knommu: make BOOTPARAM setup common 2007-07-25 11:05:01 -07:00
mips [MIPS] Fix marge error due to conflict in arch/mips/kernel/head.S 2007-07-24 16:02:48 +01:00
parisc define new percpu interface for shared data 2007-07-19 10:04:44 -07:00
powerpc Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc 2007-07-24 20:26:25 -07:00
ppc [POWERPC] mv64x60: Use mutex instead of semaphore 2007-07-22 21:30:58 +10:00
s390 s390: Put allocated ELF notes in read-only data segment 2007-07-19 10:04:47 -07:00
sh clockevents: fix resume logic 2007-07-21 17:49:15 -07:00
sh64 sh64: Flag sh64_get_page() as __init_refok. 2007-07-20 17:46:42 +09:00
sparc [SPARC32]: Fix bug in sparc optimized memset. 2007-07-24 13:41:44 -07:00
sparc64 [SPARC64]: Mark most of initial bootup asm as .text.init.ref_ok 2007-07-24 15:17:33 -07:00
um Merge branch 'request-queue-t' of git://git.kernel.dk/linux-2.6-block 2007-07-24 12:26:44 -07:00
v850 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
x86_64 ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from source 2007-07-25 01:29:39 -04:00
xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2007-07-19 14:28:19 -07:00