Skip to contentSkip to conversation

ISA DMA suspend for x86_64

PATCH Andi Kleen 4 participants 9 messages Jul 1, 2005 – Jul 6, 2005 10 messages not in the archive

lore
Share & tools
lore

Andi Kleen

author
#10 lore raw
In reply to a message not in the archive
Quoted 7 lines · Pierre Ossman

Reset the ISA DMA controller into a known state after a suspend. Primary concern was reenabling the cascading DMA channel (4).

Word of warning, I haven't tested this platform since I don't have any x86_64 hardware. But it shouldn't differ from i386.

This is identical to the i386 version isn't it? Please just reuse the i386 version then in the Makefile.

And the whole thing should be probably dependent on CONFIG_SOFTWARE_SUSPEND

-Andi

#11 lore raw
Quoted 10 lines · Andi Kleen
Quoted 7 lines · Pierre Ossman

Reset the ISA DMA controller into a known state after a suspend. Primary concern was reenabling the cascading DMA channel (4).

Word of warning, I haven't tested this platform since I don't have any x86_64 hardware. But it shouldn't differ from i386.

Quoted 6 lines

This is identical to the i386 version isn't it? Please just reuse the i386 version then in the Makefile.

And the whole thing should be probably dependent on CONFIG_SOFTWARE_SUSPEND

-Andi

CONFIG_SOFTWARE_SUSPEND is only suspend-to-disk. There are other power management states that may need to be included (e.g. ACPI S1-S3).

Thanks,
Adam

#12 lore raw
In reply to Andi Kleen
Quoted 5 lines · Andi Kleen

This is identical to the i386 version isn't it? Please just reuse the i386 version then in the Makefile.

Ok. Done and attached.

Quoted 4 lines

And the whole thing should be probably dependent on CONFIG_SOFTWARE_SUSPEND

I used i8259.c as an example and it includes its suspend routines in all cases. Also, the problem this patch solves is for suspend-to-ram, not suspend-to-disk (i.e. software suspend).

Rgds
Pierre

arch/x86_64/kernel/Makefile +2 -1
Index: linux-wbsd/arch/x86_64/kernel/Makefile
===================================================================
@@ -7,7 +7,8 @@
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
 		x8664_ksyms.o i387.o syscall.o vsyscall.o \
-		setup64.o bootflag.o e820.o reboot.o quirks.o
+		setup64.o bootflag.o e820.o reboot.o quirks.o \
+		../../i386/kernel/i8237.o
 
 obj-$(CONFIG_X86_MCE)         += mce.o
 obj-$(CONFIG_X86_MCE_INTEL)	+= mce_intel.o
author
#13 lore raw
Quoted 3 lines

I used i8259.c as an example and it includes its suspend routines in all cases. Also, the problem this patch solves is for suspend-to-ram, not suspend-to-disk (i.e. software suspend).

Hmm, it would be better if that all was CONFIG_ able. But ok.

arch/x86_64/kernel/Makefile line 11

Quoted 11 lines

Index: linux-wbsd/arch/x86_64/kernel/Makefile
===================================================================

arch/x86_64/kernel/Makefile +2 -1
@@ -7,7 +7,8 @@
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
 		x8664_ksyms.o i387.o syscall.o vsyscall.o \
-		setup64.o bootflag.o e820.o reboot.o quirks.o
+		setup64.o bootflag.o e820.o reboot.o quirks.o \
+		../../i386/kernel/i8237.o

I think that will break in builds with separate objdirs. You'll need to do it like the other files (see the end of the Makefile)

-Andi

#14 lore raw
Quoted 6 lines · Andi Kleen

I think that will break in builds with separate objdirs. You'll need to do it like the other files (see the end of the Makefile)

Like this?

Rgds
Pierre

arch/x86_64/kernel/Makefile +1 -0
Index: linux-wbsd/arch/x86_64/kernel/Makefile
===================================================================
@@ -44,3 +45,4 @@
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
 quirks-y			+= ../../i386/kernel/quirks.o
+i8237-y				+= ../../i386/kernel/i8237.o
author
#15 lore raw
Quoted 1 line

Like this?

You still need to add it to the obj-ys

-Andi

Quoted 14 lines

Rgds
Pierre

Index: linux-wbsd/arch/x86_64/kernel/Makefile
===================================================================

arch/x86_64/kernel/Makefile +1 -0
@@ -44,3 +45,4 @@
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
 quirks-y			+= ../../i386/kernel/quirks.o
+i8237-y				+= ../../i386/kernel/i8237.o
#16 lore raw
Quoted 8 lines · Andi Kleen
Quoted 3 lines

Like this?

You still need to add it to the obj-ys

Ah, sorry. Not quite familiar with how the kernel's build system works. Is it more correct this time? =)

Rgds
Pierre

arch/x86_64/kernel/Makefile +2 -1
Index: linux-wbsd/arch/x86_64/kernel/Makefile
===================================================================
@@ -7,7 +7,7 @@
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
 		x8664_ksyms.o i387.o syscall.o vsyscall.o \
-		setup64.o bootflag.o e820.o reboot.o quirks.o
+		setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o
 
 obj-$(CONFIG_X86_MCE)         += mce.o
 obj-$(CONFIG_X86_MCE_INTEL)	+= mce_intel.o
@@ -44,3 +45,4 @@
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
 intel_cacheinfo-y		+= ../../i386/kernel/cpu/intel_cacheinfo.o
 quirks-y			+= ../../i386/kernel/quirks.o
+i8237-y				+= ../../i386/kernel/i8237.o
author
#17 lore raw
Quoted 6 lines · Pierre Ossman
Quoted 4 lines · Andi Kleen
Quoted 3 lines

Like this?

Quoted 7 lines
Quoted 4 lines

You still need to add it to the obj-ys

Ah, sorry. Not quite familiar with how the kernel's build system works. Is it more correct this time? =)

Yes, looks good now. Thanks.

But I can't apply it before the i386 part didn't go in.

-Andi

#18 lore raw
In reply to Andi Kleen

Hi!

Quoted 5 lines
Quoted 3 lines

I used i8259.c as an example and it includes its suspend routines in all cases. Also, the problem this patch solves is for suspend-to-ram, not suspend-to-disk (i.e. software suspend).

Hmm, it would be better if that all was CONFIG_ able. But ok.

I'll intoduce CONFIG_SLEEP for this, and it is already okay to make it conditional on CONFIG_PM.

Pavel

Signature · 1 line
teflon -- maybe it is a trademark, but it should not be.