Commit 238b706d authored by H. Peter Anvin's avatar H. Peter Anvin

[x86 setup] Make struct ist_info cross-architecture, and use in setup code

Make "struct ist_info" valid on both i386 and x86-64, and use the
structure by name in the setup code.  Additionally, "Intel SpeedStep
IST" is redundant, refer to it as IST consistently.
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent f77b1ab3
...@@ -73,15 +73,15 @@ static void keyboard_set_repeat(void) ...@@ -73,15 +73,15 @@ static void keyboard_set_repeat(void)
} }
/* /*
* Get Intel SpeedStep IST information. * Get Intel SpeedStep (IST) information.
*/ */
static void query_speedstep_ist(void) static void query_ist(void)
{ {
asm("int $0x15" asm("int $0x15"
: "=a" (boot_params.speedstep_info[0]), : "=a" (boot_params.ist_info.signature),
"=b" (boot_params.speedstep_info[1]), "=b" (boot_params.ist_info.command),
"=c" (boot_params.speedstep_info[2]), "=c" (boot_params.ist_info.event),
"=d" (boot_params.speedstep_info[3]) "=d" (boot_params.ist_info.perf_level)
: "a" (0x0000e980), /* IST Support */ : "a" (0x0000e980), /* IST Support */
"d" (0x47534943)); /* Request value */ "d" (0x47534943)); /* Request value */
} }
...@@ -144,8 +144,8 @@ void main(void) ...@@ -144,8 +144,8 @@ void main(void)
query_voyager(); query_voyager();
#endif #endif
/* Query SpeedStep IST information */ /* Query Intel SpeedStep (IST) information */
query_speedstep_ist(); query_ist();
/* Query APM information */ /* Query APM information */
#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/screen_info.h> #include <linux/screen_info.h>
#include <linux/apm_bios.h> #include <linux/apm_bios.h>
#include <asm/e820.h>
#include <linux/edd.h> #include <linux/edd.h>
#include <asm/e820.h>
#include <asm/ist.h>
#include <video/edid.h> #include <video/edid.h>
struct setup_header { struct setup_header {
...@@ -59,7 +60,7 @@ struct boot_params { ...@@ -59,7 +60,7 @@ struct boot_params {
struct screen_info screen_info; /* 0x000 */ struct screen_info screen_info; /* 0x000 */
struct apm_bios_info apm_bios_info; /* 0x040 */ struct apm_bios_info apm_bios_info; /* 0x040 */
u8 _pad2[12]; /* 0x054 */ u8 _pad2[12]; /* 0x054 */
u32 speedstep_info[4]; /* 0x060 */ struct ist_info ist_info; /* 0x060 */
u8 _pad3[16]; /* 0x070 */ u8 _pad3[16]; /* 0x070 */
u8 hd0_info[16]; /* obsolete! */ /* 0x080 */ u8 hd0_info[16]; /* obsolete! */ /* 0x080 */
u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ u8 hd1_info[16]; /* obsolete! */ /* 0x090 */
......
...@@ -19,11 +19,13 @@ ...@@ -19,11 +19,13 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/types.h>
struct ist_info { struct ist_info {
unsigned long signature; u32 signature;
unsigned long command; u32 command;
unsigned long event; u32 event;
unsigned long perf_level; u32 perf_level;
}; };
extern struct ist_info ist_info; extern struct ist_info ist_info;
......
#include <asm-i386/ist.h>
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