Commit 5e7ec984 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] x86_64: resource layout fix

Greg's tree changes the order of fields in struct reasource, causing x86_64 to
explode nastily.  Fix.

Cc: Greg KH <greg@kroah.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d14a38a4
......@@ -111,15 +111,24 @@ extern char _text, _etext, _edata, _end;
char command_line[COMMAND_LINE_SIZE];
struct resource standard_io_resources[] = {
{ "dma1", 0x00, 0x1f, IORESOURCE_BUSY | IORESOURCE_IO },
{ "pic1", 0x20, 0x21, IORESOURCE_BUSY | IORESOURCE_IO },
{ "timer0", 0x40, 0x43, IORESOURCE_BUSY | IORESOURCE_IO },
{ "timer1", 0x50, 0x53, IORESOURCE_BUSY | IORESOURCE_IO },
{ "keyboard", 0x60, 0x6f, IORESOURCE_BUSY | IORESOURCE_IO },
{ "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY | IORESOURCE_IO },
{ "pic2", 0xa0, 0xa1, IORESOURCE_BUSY | IORESOURCE_IO },
{ "dma2", 0xc0, 0xdf, IORESOURCE_BUSY | IORESOURCE_IO },
{ "fpu", 0xf0, 0xff, IORESOURCE_BUSY | IORESOURCE_IO }
{ .name = "dma1", .start = 0x00, .end = 0x1f,
.flags = IORESOURCE_BUSY | IORESOURCE_IO },
{ .name = "pic1", .start = 0x20, .end = 0x21,
.flags = IORESOURCE_BUSY | IORESOURCE_IO },
{ .name = "timer0", .start = 0x40, .end = 0x43,
.flags = IORESOURCE_BUSY | IORESOURCE_IO },
{ .name = "timer1", .start = 0x50, .end = 0x53,
.flags = IORESOURCE_BUSY | IORESOURCE_IO },
{ .name = "keyboard", .start = 0x60, .end = 0x6f,
.flags = IORESOURCE_BUSY | IORESOURCE_IO },
{ .name = "dma page reg", .start = 0x80, .end = 0x8f,
.flags = IORESOURCE_BUSY | IORESOURCE_IO },
{ .name = "pic2", .start = 0xa0, .end = 0xa1,
.flags = IORESOURCE_BUSY | IORESOURCE_IO },
{ .name = "dma2", .start = 0xc0, .end = 0xdf,
.flags = IORESOURCE_BUSY | IORESOURCE_IO },
{ .name = "fpu", .start = 0xf0, .end = 0xff,
.flags = IORESOURCE_BUSY | IORESOURCE_IO }
};
#define STANDARD_IO_RESOURCES \
......@@ -127,28 +136,66 @@ struct resource standard_io_resources[] = {
#define IORESOURCE_RAM (IORESOURCE_BUSY | IORESOURCE_MEM)
struct resource data_resource = { "Kernel data", 0, 0, IORESOURCE_RAM };
struct resource code_resource = { "Kernel code", 0, 0, IORESOURCE_RAM };
struct resource data_resource = {
.name = "Kernel data",
.start = 0,
.end = 0,
.flags = IORESOURCE_RAM,
};
struct resource code_resource = {
.name = "Kernel code",
.start = 0,
.end = 0,
.flags = IORESOURCE_RAM,
};
#define IORESOURCE_ROM (IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM)
static struct resource system_rom_resource = { "System ROM", 0xf0000, 0xfffff, IORESOURCE_ROM };
static struct resource extension_rom_resource = { "Extension ROM", 0xe0000, 0xeffff, IORESOURCE_ROM };
static struct resource system_rom_resource = {
.name = "System ROM",
.start = 0xf0000,
.end = 0xfffff,
.flags = IORESOURCE_ROM,
};
static struct resource extension_rom_resource = {
.name = "Extension ROM",
.start = 0xe0000,
.end = 0xeffff,
.flags = IORESOURCE_ROM,
};
static struct resource adapter_rom_resources[] = {
{ "Adapter ROM", 0xc8000, 0, IORESOURCE_ROM },
{ "Adapter ROM", 0, 0, IORESOURCE_ROM },
{ "Adapter ROM", 0, 0, IORESOURCE_ROM },
{ "Adapter ROM", 0, 0, IORESOURCE_ROM },
{ "Adapter ROM", 0, 0, IORESOURCE_ROM },
{ "Adapter ROM", 0, 0, IORESOURCE_ROM }
{ .name = "Adapter ROM", .start = 0xc8000, .end = 0,
.flags = IORESOURCE_ROM },
{ .name = "Adapter ROM", .start = 0, .end = 0,
.flags = IORESOURCE_ROM },
{ .name = "Adapter ROM", .start = 0, .end = 0,
.flags = IORESOURCE_ROM },
{ .name = "Adapter ROM", .start = 0, .end = 0,
.flags = IORESOURCE_ROM },
{ .name = "Adapter ROM", .start = 0, .end = 0,
.flags = IORESOURCE_ROM },
{ .name = "Adapter ROM", .start = 0, .end = 0,
.flags = IORESOURCE_ROM }
};
#define ADAPTER_ROM_RESOURCES \
(sizeof adapter_rom_resources / sizeof adapter_rom_resources[0])
static struct resource video_rom_resource = { "Video ROM", 0xc0000, 0xc7fff, IORESOURCE_ROM };
static struct resource video_ram_resource = { "Video RAM area", 0xa0000, 0xbffff, IORESOURCE_RAM };
static struct resource video_rom_resource = {
.name = "Video ROM",
.start = 0xc0000,
.end = 0xc7fff,
.flags = IORESOURCE_ROM,
};
static struct resource video_ram_resource = {
.name = "Video RAM area",
.start = 0xa0000,
.end = 0xbffff,
.flags = IORESOURCE_RAM,
};
#define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment