Commit 08dcf29e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: fix performance drop for glx
  x86: fix trim mtrr not to setup_memory two times
  x86: GEODE: add missing module.h include
  x86, cpufreq: fix Speedfreq-SMI call that clobbers ECX
  x86: fix memoryless node oops during boot
  x86: add dmi quirk for io_delay
  x86: convert mtrr/generic.c to kernel-doc
  x86: Documentation/i386/IO-APIC.txt: fix description
parents 11320d17 d546b67a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ Every PCI card emits a PCI IRQ, which can be INTA, INTB, INTC or INTD:


These INTA-D PCI IRQs are always 'local to the card', their real meaning
These INTA-D PCI IRQs are always 'local to the card', their real meaning
depends on which slot they are in. If you look at the daisy chaining diagram,
depends on which slot they are in. If you look at the daisy chaining diagram,
a card in slot4, issuing INTA IRQ, it will end up as a signal on PIRQ2 of
a card in slot4, issuing INTA IRQ, it will end up as a signal on PIRQ4 of
the PCI chipset. Most cards issue INTA, this creates optimal distribution
the PCI chipset. Most cards issue INTA, this creates optimal distribution
between the PIRQ lines. (distributing IRQ sources properly is not a
between the PIRQ lines. (distributing IRQ sources properly is not a
necessity, PCI IRQs can be shared at will, but it's a good for performance
necessity, PCI IRQs can be shared at will, but it's a good for performance
+24 −15
Original line number Original line Diff line number Diff line
@@ -63,7 +63,7 @@ static struct cpufreq_frequency_table speedstep_freqs[] = {
 */
 */
static int speedstep_smi_ownership (void)
static int speedstep_smi_ownership (void)
{
{
	u32 command, result, magic;
	u32 command, result, magic, dummy;
	u32 function = GET_SPEEDSTEP_OWNER;
	u32 function = GET_SPEEDSTEP_OWNER;
	unsigned char magic_data[] = "Copyright (c) 1999 Intel Corporation";
	unsigned char magic_data[] = "Copyright (c) 1999 Intel Corporation";


@@ -73,8 +73,11 @@ static int speedstep_smi_ownership (void)
	dprintk("trying to obtain ownership with command %x at port %x\n", command, smi_port);
	dprintk("trying to obtain ownership with command %x at port %x\n", command, smi_port);


	__asm__ __volatile__(
	__asm__ __volatile__(
		"push %%ebp\n"
		"out %%al, (%%dx)\n"
		"out %%al, (%%dx)\n"
		: "=D" (result)
		"pop %%ebp\n"
		: "=D" (result), "=a" (dummy), "=b" (dummy), "=c" (dummy), "=d" (dummy),
			"=S" (dummy)
		: "a" (command), "b" (function), "c" (0), "d" (smi_port),
		: "a" (command), "b" (function), "c" (0), "d" (smi_port),
			"D" (0), "S" (magic)
			"D" (0), "S" (magic)
		: "memory"
		: "memory"
@@ -96,7 +99,7 @@ static int speedstep_smi_ownership (void)
 */
 */
static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)
static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)
{
{
	u32 command, result = 0, edi, high_mhz, low_mhz;
	u32 command, result = 0, edi, high_mhz, low_mhz, dummy;
	u32 state=0;
	u32 state=0;
	u32 function = GET_SPEEDSTEP_FREQS;
	u32 function = GET_SPEEDSTEP_FREQS;


@@ -109,10 +112,12 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)


	dprintk("trying to determine frequencies with command %x at port %x\n", command, smi_port);
	dprintk("trying to determine frequencies with command %x at port %x\n", command, smi_port);


	__asm__ __volatile__("movl $0, %%edi\n"
	__asm__ __volatile__(
		"push %%ebp\n"
		"out %%al, (%%dx)\n"
		"out %%al, (%%dx)\n"
		: "=a" (result), "=b" (high_mhz), "=c" (low_mhz), "=d" (state), "=D" (edi)
		"pop %%ebp"
		: "a" (command), "b" (function), "c" (state), "d" (smi_port), "S" (0)
		: "=a" (result), "=b" (high_mhz), "=c" (low_mhz), "=d" (state), "=D" (edi), "=S" (dummy)
		: "a" (command), "b" (function), "c" (state), "d" (smi_port), "S" (0), "D" (0)
	);
	);


	dprintk("result %x, low_freq %u, high_freq %u\n", result, low_mhz, high_mhz);
	dprintk("result %x, low_freq %u, high_freq %u\n", result, low_mhz, high_mhz);
@@ -135,16 +140,18 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)
static int speedstep_get_state (void)
static int speedstep_get_state (void)
{
{
	u32 function=GET_SPEEDSTEP_STATE;
	u32 function=GET_SPEEDSTEP_STATE;
	u32 result, state, edi, command;
	u32 result, state, edi, command, dummy;


	command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff);
	command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff);


	dprintk("trying to determine current setting with command %x at port %x\n", command, smi_port);
	dprintk("trying to determine current setting with command %x at port %x\n", command, smi_port);


	__asm__ __volatile__("movl $0, %%edi\n"
	__asm__ __volatile__(
		"push %%ebp\n"
		"out %%al, (%%dx)\n"
		"out %%al, (%%dx)\n"
		: "=a" (result), "=b" (state), "=D" (edi)
		"pop %%ebp\n"
		: "a" (command), "b" (function), "c" (0), "d" (smi_port), "S" (0)
		: "=a" (result), "=b" (state), "=D" (edi), "=c" (dummy), "=d" (dummy), "=S" (dummy)
		: "a" (command), "b" (function), "c" (0), "d" (smi_port), "S" (0), "D" (0)
	);
	);


	dprintk("state is %x, result is %x\n", state, result);
	dprintk("state is %x, result is %x\n", state, result);
@@ -160,7 +167,7 @@ static int speedstep_get_state (void)
 */
 */
static void speedstep_set_state (unsigned int state)
static void speedstep_set_state (unsigned int state)
{
{
	unsigned int result = 0, command, new_state;
	unsigned int result = 0, command, new_state, dummy;
	unsigned long flags;
	unsigned long flags;
	unsigned int function=SET_SPEEDSTEP_STATE;
	unsigned int function=SET_SPEEDSTEP_STATE;
	unsigned int retry = 0;
	unsigned int retry = 0;
@@ -182,10 +189,12 @@ static void speedstep_set_state (unsigned int state)
		}
		}
		retry++;
		retry++;
		__asm__ __volatile__(
		__asm__ __volatile__(
			"movl $0, %%edi\n"
			"push %%ebp\n"
			"out %%al, (%%dx)\n"
			"out %%al, (%%dx)\n"
			: "=b" (new_state), "=D" (result)
			"pop %%ebp"
			: "a" (command), "b" (function), "c" (state), "d" (smi_port), "S" (0)
			: "=b" (new_state), "=D" (result), "=c" (dummy), "=a" (dummy),
				"=d" (dummy), "=S" (dummy)
			: "a" (command), "b" (function), "c" (state), "d" (smi_port), "S" (0), "D" (0)
			);
			);
	} while ((new_state != state) && (retry <= SMI_TRIES));
	} while ((new_state != state) && (retry <= SMI_TRIES));


@@ -195,7 +204,7 @@ static void speedstep_set_state (unsigned int state)
	if (new_state == state) {
	if (new_state == state) {
		dprintk("change to %u MHz succeeded after %u tries with result %u\n", (speedstep_freqs[new_state].frequency / 1000), retry, result);
		dprintk("change to %u MHz succeeded after %u tries with result %u\n", (speedstep_freqs[new_state].frequency / 1000), retry, result);
	} else {
	} else {
		printk(KERN_ERR "cpufreq: change failed with new_state %u and result %u\n", new_state, result);
		printk(KERN_ERR "cpufreq: change to state %u failed with new_state %u and result %u\n", state, new_state, result);
	}
	}


	return;
	return;
+23 −19
Original line number Original line Diff line number Diff line
@@ -176,12 +176,13 @@ static inline void k8_enable_fixed_iorrs(void)
}
}


/**
/**
 * Checks and updates an fixed-range MTRR if it differs from the value it
 * set_fixed_range - checks & updates a fixed-range MTRR if it differs from the value it should have
 * should have. If K8 extentions are wanted, update the K8 SYSCFG MSR also.
 * @msr: MSR address of the MTTR which should be checked and updated
 * see AMD publication no. 24593, chapter 7.8.1, page 233 for more information
 * @changed: pointer which indicates whether the MTRR needed to be changed
 * \param msr MSR address of the MTTR which should be checked and updated
 * @msrwords: pointer to the MSR values which the MSR should have
 * \param changed pointer which indicates whether the MTRR needed to be changed
 *
 * \param msrwords pointer to the MSR values which the MSR should have
 * If K8 extentions are wanted, update the K8 SYSCFG MSR also.
 * See AMD publication no. 24593, chapter 7.8.1, page 233 for more information.
 */
 */
static void set_fixed_range(int msr, bool *changed, unsigned int *msrwords)
static void set_fixed_range(int msr, bool *changed, unsigned int *msrwords)
{
{
@@ -199,12 +200,15 @@ static void set_fixed_range(int msr, bool *changed, unsigned int *msrwords)
	}
	}
}
}


int generic_get_free_region(unsigned long base, unsigned long size, int replace_reg)
/**
/*  [SUMMARY] Get a free MTRR.
 * generic_get_free_region - Get a free MTRR.
    <base> The starting (base) address of the region.
 * @base: The starting (base) address of the region.
    <size> The size (in bytes) of the region.
 * @size: The size (in bytes) of the region.
    [RETURNS] The index of the region on success, else -1 on error.
 * @replace_reg: mtrr index to be replaced; set to invalid value if none.
 *
 * Returns: The index of the region on success, else negative on error.
 */
 */
int generic_get_free_region(unsigned long base, unsigned long size, int replace_reg)
{
{
	int i, max;
	int i, max;
	mtrr_type ltype;
	mtrr_type ltype;
@@ -249,8 +253,8 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base,
}
}


/**
/**
 * Checks and updates the fixed-range MTRRs if they differ from the saved set
 * set_fixed_ranges - checks & updates the fixed-range MTRRs if they differ from the saved set
 * \param frs pointer to fixed-range MTRR values, saved by get_fixed_ranges()
 * @frs: pointer to fixed-range MTRR values, saved by get_fixed_ranges()
 */
 */
static int set_fixed_ranges(mtrr_type * frs)
static int set_fixed_ranges(mtrr_type * frs)
{
{
@@ -294,13 +298,13 @@ static bool set_mtrr_var_ranges(unsigned int index, struct mtrr_var_range *vr)


static u32 deftype_lo, deftype_hi;
static u32 deftype_lo, deftype_hi;


static unsigned long set_mtrr_state(void)
/**
/*  [SUMMARY] Set the MTRR state for this CPU.
 * set_mtrr_state - Set the MTRR state for this CPU.
    <state> The MTRR state information to read.
 *
    <ctxt> Some relevant CPU context.
 * NOTE: The CPU must already be in a safe state for MTRR changes.
    [NOTE] The CPU must already be in a safe state for MTRR changes.
 * RETURNS: 0 if no changes made, else a mask indicating what was changed.
    [RETURNS] 0 if no changes made, else a mask indication what was changed.
 */
 */
static unsigned long set_mtrr_state(void)
{
{
	unsigned int i;
	unsigned int i;
	unsigned long change_mask = 0;
	unsigned long change_mask = 0;
+8 −0
Original line number Original line Diff line number Diff line
@@ -76,6 +76,14 @@ static struct dmi_system_id __initdata io_delay_0xed_port_dmi_table[] = {
			DMI_MATCH(DMI_BOARD_NAME, "30B9")
			DMI_MATCH(DMI_BOARD_NAME, "30B9")
		}
		}
	},
	},
	{
		.callback	= dmi_io_delay_0xed_port,
		.ident		= "HP Pavilion dv6000",
		.matches	= {
			DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
			DMI_MATCH(DMI_BOARD_NAME, "30B8")
		}
	},
	{
	{
		.callback	= dmi_io_delay_0xed_port,
		.callback	= dmi_io_delay_0xed_port,
		.ident		= "HP Pavilion tx1000",
		.ident		= "HP Pavilion tx1000",
+1 −0
Original line number Original line Diff line number Diff line
@@ -30,6 +30,7 @@


#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <asm/geode.h>
#include <asm/geode.h>


static struct mfgpt_timer_t {
static struct mfgpt_timer_t {
Loading