Commit b1971acd authored by Len Brown's avatar Len Brown

Merge intel.com:/home/lenb/bk/linux-2.6.0

into intel.com:/home/lenb/bk/linux-acpi-test-2.6.0
parents 84746afe 09095b63
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/ */
#include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
* *
*/ */
#include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
* - We disable half multipliers if ACPI is used on A0 stepping CPUs. * - We disable half multipliers if ACPI is used on A0 stepping CPUs.
*/ */
#include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -191,8 +192,8 @@ static void change_FID(int fid) ...@@ -191,8 +192,8 @@ static void change_FID(int fid)
{ {
union msr_fidvidctl fidvidctl; union msr_fidvidctl fidvidctl;
rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
if (fidvidctl.bits.FID != fid) { if (fidvidctl.bits.FID != fid) {
rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
fidvidctl.bits.SGTC = latency; fidvidctl.bits.SGTC = latency;
fidvidctl.bits.FID = fid; fidvidctl.bits.FID = fid;
fidvidctl.bits.FIDC = 1; fidvidctl.bits.FIDC = 1;
...@@ -205,8 +206,8 @@ static void change_VID(int vid) ...@@ -205,8 +206,8 @@ static void change_VID(int vid)
{ {
union msr_fidvidctl fidvidctl; union msr_fidvidctl fidvidctl;
rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
if (fidvidctl.bits.VID != vid) { if (fidvidctl.bits.VID != vid) {
rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
fidvidctl.bits.VID = vid; fidvidctl.bits.VID = vid;
fidvidctl.bits.VIDC = 1; fidvidctl.bits.VIDC = 1;
wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val); wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include "speedstep-lib.h" #include "speedstep-lib.h"
#define PFX "speedstep-smi: "
/* speedstep system management interface port/command. /* speedstep system management interface port/command.
* *
* These parameters are got from IST-SMI BIOS call. * These parameters are got from IST-SMI BIOS call.
...@@ -65,43 +67,45 @@ static struct cpufreq_frequency_table speedstep_freqs[] = { ...@@ -65,43 +67,45 @@ 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;
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";
command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff);
magic = virt_to_phys(magic_data); magic = virt_to_phys(magic_data);
__asm__ __volatile__( __asm__ __volatile__(
"out %%al, (%%dx)\n" "out %%al, (%%dx)\n"
: "=D" (result) : "=D" (result)
: "a" (command), "b" (function), "c" (0), "d" (smi_port), "D" (0), "S" (magic) : "a" (command), "b" (function), "c" (0), "d" (smi_port), "D" (0), "S" (magic)
); );
return result; return result;
} }
/** /**
* speedstep_smi_get_freqs - get SpeedStep preferred & current freq. * speedstep_smi_get_freqs - get SpeedStep preferred & current freq.
* *
*/ */
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, edi, high_mhz, low_mhz; u32 command, result, edi, high_mhz, low_mhz;
u32 state=0; u32 state=0;
u32 function = GET_SPEEDSTEP_FREQS; u32 function = GET_SPEEDSTEP_FREQS;
command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff);
__asm__ __volatile__("movl $0, %%edi\n" __asm__ __volatile__("movl $0, %%edi\n"
"out %%al, (%%dx)\n" "out %%al, (%%dx)\n"
: "=a" (result), "=b" (high_mhz), "=c" (low_mhz), "=d" (state), "=D" (edi) : "=a" (result), "=b" (high_mhz), "=c" (low_mhz), "=d" (state), "=D" (edi)
: "a" (command), "b" (function), "c" (state), "d" (smi_port), "S" (0) : "a" (command), "b" (function), "c" (state), "d" (smi_port), "S" (0)
); );
*high = high_mhz * 1000; *high = high_mhz * 1000;
*low = low_mhz * 1000; *low = low_mhz * 1000;
return result; return result;
} }
/** /**
* speedstep_get_state - set the SpeedStep state * speedstep_get_state - set the SpeedStep state
* @state: processor frequency state (SPEEDSTEP_LOW or SPEEDSTEP_HIGH) * @state: processor frequency state (SPEEDSTEP_LOW or SPEEDSTEP_HIGH)
...@@ -109,17 +113,17 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high) ...@@ -109,17 +113,17 @@ 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;
command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff);
command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); __asm__ __volatile__("movl $0, %%edi\n"
"out %%al, (%%dx)\n"
: "=a" (result), "=b" (state), "=D" (edi)
: "a" (command), "b" (function), "c" (0), "d" (smi_port), "S" (0)
);
__asm__ __volatile__("movl $0, %%edi\n"
"out %%al, (%%dx)\n"
: "=a" (result), "=b" (state), "=D" (edi)
: "a" (command), "b" (function), "c" (0), "d" (smi_port), "S" (0)
);
return state; return state;
} }
...@@ -130,10 +134,10 @@ static int speedstep_get_state (void) ...@@ -130,10 +134,10 @@ static int speedstep_get_state (void)
*/ */
static void speedstep_set_state (unsigned int state, unsigned int notify) static void speedstep_set_state (unsigned int state, unsigned int notify)
{ {
unsigned int old_state, result, command, new_state; unsigned int old_state, result, command, new_state;
unsigned long flags; unsigned long flags;
struct cpufreq_freqs freqs; struct cpufreq_freqs freqs;
unsigned int function=SET_SPEEDSTEP_STATE; unsigned int function=SET_SPEEDSTEP_STATE;
if (state > 0x1) if (state > 0x1)
return; return;
...@@ -142,7 +146,7 @@ static void speedstep_set_state (unsigned int state, unsigned int notify) ...@@ -142,7 +146,7 @@ static void speedstep_set_state (unsigned int state, unsigned int notify)
freqs.old = speedstep_freqs[old_state].frequency; freqs.old = speedstep_freqs[old_state].frequency;
freqs.new = speedstep_freqs[state].frequency; freqs.new = speedstep_freqs[state].frequency;
freqs.cpu = 0; /* speedstep.c is UP only driver */ freqs.cpu = 0; /* speedstep.c is UP only driver */
if (old_state == state) if (old_state == state)
return; return;
...@@ -152,13 +156,13 @@ static void speedstep_set_state (unsigned int state, unsigned int notify) ...@@ -152,13 +156,13 @@ static void speedstep_set_state (unsigned int state, unsigned int notify)
/* Disable IRQs */ /* Disable IRQs */
local_irq_save(flags); local_irq_save(flags);
command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff);
__asm__ __volatile__( __asm__ __volatile__(
"movl $0, %%edi\n" "movl $0, %%edi\n"
"out %%al, (%%dx)\n" "out %%al, (%%dx)\n"
: "=b" (new_state), "=D" (result) : "=b" (new_state), "=D" (result)
: "a" (command), "b" (function), "c" (state), "d" (smi_port), "S" (0) : "a" (command), "b" (function), "c" (state), "d" (smi_port), "S" (0)
); );
/* enable IRQs */ /* enable IRQs */
local_irq_restore(flags); local_irq_restore(flags);
...@@ -185,10 +189,9 @@ static void speedstep_set_state (unsigned int state, unsigned int notify) ...@@ -185,10 +189,9 @@ static void speedstep_set_state (unsigned int state, unsigned int notify)
* Sets a new CPUFreq policy/freq. * Sets a new CPUFreq policy/freq.
*/ */
static int speedstep_target (struct cpufreq_policy *policy, static int speedstep_target (struct cpufreq_policy *policy,
unsigned int target_freq, unsigned int target_freq, unsigned int relation)
unsigned int relation)
{ {
unsigned int newstate = 0; unsigned int newstate = 0;
if (cpufreq_frequency_table_target(policy, &speedstep_freqs[0], target_freq, relation, &newstate)) if (cpufreq_frequency_table_target(policy, &speedstep_freqs[0], target_freq, relation, &newstate))
return -EINVAL; return -EINVAL;
...@@ -214,8 +217,8 @@ static int speedstep_verify (struct cpufreq_policy *policy) ...@@ -214,8 +217,8 @@ static int speedstep_verify (struct cpufreq_policy *policy)
static int speedstep_cpu_init(struct cpufreq_policy *policy) static int speedstep_cpu_init(struct cpufreq_policy *policy)
{ {
int result; int result;
unsigned int speed,state; unsigned int speed,state;
/* capability check */ /* capability check */
if (policy->cpu != 0) if (policy->cpu != 0)
...@@ -228,25 +231,25 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) ...@@ -228,25 +231,25 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
/* detect low and high frequency */ /* detect low and high frequency */
result = speedstep_smi_get_freqs(&speedstep_freqs[SPEEDSTEP_LOW].frequency, result = speedstep_smi_get_freqs(&speedstep_freqs[SPEEDSTEP_LOW].frequency,
&speedstep_freqs[SPEEDSTEP_HIGH].frequency); &speedstep_freqs[SPEEDSTEP_HIGH].frequency);
if (result) { if (result) {
/* fall back to speedstep_lib.c dection mechanism: try both states out */ /* fall back to speedstep_lib.c dection mechanism: try both states out */
unsigned int speedstep_processor = speedstep_detect_processor(); unsigned int speedstep_processor = speedstep_detect_processor();
dprintk(KERN_INFO "speedstep-smi: could not detect low and high frequencies by SMI call.\n"); dprintk(KERN_INFO PFX "could not detect low and high frequencies by SMI call.\n");
if (!speedstep_processor) if (!speedstep_processor)
return -ENODEV; return -ENODEV;
result = speedstep_get_freqs(speedstep_processor, result = speedstep_get_freqs(speedstep_processor,
&speedstep_freqs[SPEEDSTEP_LOW].frequency, &speedstep_freqs[SPEEDSTEP_LOW].frequency,
&speedstep_freqs[SPEEDSTEP_HIGH].frequency, &speedstep_freqs[SPEEDSTEP_HIGH].frequency,
&speedstep_set_state); &speedstep_set_state);
if (result) { if (result) {
dprintk(KERN_INFO "speedstep-smi: could not detect two different speeds -- aborting.\n"); dprintk(KERN_INFO PFX "could not detect two different speeds -- aborting.\n");
return result; return result;
} else } else
dprintk(KERN_INFO "speedstep-smi: workaround worked.\n"); dprintk(KERN_INFO PFX "workaround worked.\n");
} }
/* get current speed setting */ /* get current speed setting */
...@@ -294,8 +297,14 @@ static struct cpufreq_driver speedstep_driver = { ...@@ -294,8 +297,14 @@ static struct cpufreq_driver speedstep_driver = {
*/ */
static int __init speedstep_init(void) static int __init speedstep_init(void)
{ {
struct cpuinfo_x86 *c = cpu_data;
if (c->x86_vendor != X86_VENDOR_INTEL) {
printk (KERN_INFO PFX "No Intel CPU detected.\n");
return -ENODEV;
}
dprintk("speedstep-smi: signature:0%.8lx, command:0lx%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n", dprintk(KERN_DEBUG PFX "signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n",
ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level); ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level);
......
...@@ -76,7 +76,6 @@ static u32 northbridge_flush_word[NR_CPUS + 1]; ...@@ -76,7 +76,6 @@ static u32 northbridge_flush_word[NR_CPUS + 1];
#define EMERGENCY_PAGES 32 /* = 128KB */ #define EMERGENCY_PAGES 32 /* = 128KB */
#ifdef CONFIG_AGP #ifdef CONFIG_AGP
extern int agp_init(void);
#define AGPEXTERN extern #define AGPEXTERN extern
#else #else
#define AGPEXTERN #define AGPEXTERN
......
...@@ -1403,6 +1403,11 @@ as_insert_request(request_queue_t *q, struct request *rq, int where) ...@@ -1403,6 +1403,11 @@ as_insert_request(request_queue_t *q, struct request *rq, int where)
struct as_data *ad = q->elevator.elevator_data; struct as_data *ad = q->elevator.elevator_data;
struct as_rq *arq = RQ_DATA(rq); struct as_rq *arq = RQ_DATA(rq);
/* barriers must flush the reorder queue */
if (unlikely(rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER)
&& where == ELEVATOR_INSERT_SORT))
where = ELEVATOR_INSERT_BACK;
switch (where) { switch (where) {
case ELEVATOR_INSERT_BACK: case ELEVATOR_INSERT_BACK:
while (ad->next_arq[REQ_SYNC]) while (ad->next_arq[REQ_SYNC])
......
...@@ -618,6 +618,11 @@ deadline_insert_request(request_queue_t *q, struct request *rq, int where) ...@@ -618,6 +618,11 @@ deadline_insert_request(request_queue_t *q, struct request *rq, int where)
struct deadline_data *dd = q->elevator.elevator_data; struct deadline_data *dd = q->elevator.elevator_data;
struct deadline_rq *drq = RQ_DATA(rq); struct deadline_rq *drq = RQ_DATA(rq);
/* barriers must flush the reorder queue */
if (unlikely(rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER)
&& where == ELEVATOR_INSERT_SORT))
where = ELEVATOR_INSERT_BACK;
switch (where) { switch (where) {
case ELEVATOR_INSERT_BACK: case ELEVATOR_INSERT_BACK:
while (deadline_dispatch_requests(dd)) while (deadline_dispatch_requests(dd))
......
...@@ -80,8 +80,8 @@ config AGP_INTEL ...@@ -80,8 +80,8 @@ config AGP_INTEL
tristate "Intel 440LX/BX/GX, I8xx and E7x05 chipset support" tristate "Intel 440LX/BX/GX, I8xx and E7x05 chipset support"
depends on AGP && X86 && !X86_64 depends on AGP && X86 && !X86_64
help help
This option gives you AGP support for the GLX component of This option gives you AGP support for the GLX component of XFree86 4.x
XFree86 4.x on Intel 440LX/BX/GX, 815, 820, 830, 840, 845, 850, 860 on Intel 440LX/BX/GX, 815, 820, 830, 840, 845, 850, 860, 875,
E7205 and E7505 chipsets and full support for the 810, 815, 830M, 845G, E7205 and E7505 chipsets and full support for the 810, 815, 830M, 845G,
852GM, 855GM and 865G integrated graphics chipsets. 852GM, 855GM and 865G integrated graphics chipsets.
......
...@@ -183,7 +183,7 @@ alpha_core_agp_setup(void) ...@@ -183,7 +183,7 @@ alpha_core_agp_setup(void)
alpha_bridge->dev = pdev; alpha_bridge->dev = pdev;
alpha_bridge->mode = agp->capability.lw; alpha_bridge->mode = agp->capability.lw;
printk(KERN_INFO "Detected AGP on hose %d\n", agp->hose->index); printk(KERN_INFO PFX "Detected AGP on hose %d\n", agp->hose->index);
return agp_add_bridge(alpha_bridge); return agp_add_bridge(alpha_bridge);
fail: fail:
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* work is done in the northbridge(s). * work is done in the northbridge(s).
*/ */
#include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -252,15 +253,15 @@ static int __init aperture_valid(u64 aper, u32 size) ...@@ -252,15 +253,15 @@ static int __init aperture_valid(u64 aper, u32 size)
static int not_first_call; static int not_first_call;
u32 pfn, c; u32 pfn, c;
if (aper == 0) { if (aper == 0) {
printk(KERN_ERR "No aperture\n"); printk(KERN_ERR PFX "No aperture\n");
return 0; return 0;
} }
if (size < 32*1024*1024) { if (size < 32*1024*1024) {
printk(KERN_ERR "Aperture too small (%d MB)\n", size>>20); printk(KERN_ERR PFX "Aperture too small (%d MB)\n", size>>20);
return 0; return 0;
} }
if (aper + size > 0xffffffff) { if (aper + size > 0xffffffff) {
printk(KERN_ERR "Aperture out of bounds\n"); printk(KERN_ERR PFX "Aperture out of bounds\n");
return 0; return 0;
} }
pfn = aper >> PAGE_SHIFT; pfn = aper >> PAGE_SHIFT;
...@@ -268,7 +269,7 @@ static int __init aperture_valid(u64 aper, u32 size) ...@@ -268,7 +269,7 @@ static int __init aperture_valid(u64 aper, u32 size)
if (!pfn_valid(pfn + c)) if (!pfn_valid(pfn + c))
break; break;
if (!PageReserved(pfn_to_page(pfn + c))) { if (!PageReserved(pfn_to_page(pfn + c))) {
printk(KERN_ERR "Aperture pointing to RAM\n"); printk(KERN_ERR PFX "Aperture pointing to RAM\n");
return 0; return 0;
} }
} }
...@@ -279,7 +280,7 @@ static int __init aperture_valid(u64 aper, u32 size) ...@@ -279,7 +280,7 @@ static int __init aperture_valid(u64 aper, u32 size)
Maybe better to use pci_assign_resource/pci_enable_device instead trusting Maybe better to use pci_assign_resource/pci_enable_device instead trusting
the bridges? */ the bridges? */
if (!not_first_call && request_mem_region(aper, size, "aperture") < 0) { if (!not_first_call && request_mem_region(aper, size, "aperture") < 0) {
printk(KERN_ERR "Aperture conflicts with PCI mapping.\n"); printk(KERN_ERR PFX "Aperture conflicts with PCI mapping.\n");
return 0; return 0;
} }
...@@ -328,7 +329,7 @@ static __init int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, ...@@ -328,7 +329,7 @@ static __init int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
pci_read_config_dword(agp, 0x10, &aper_low); pci_read_config_dword(agp, 0x10, &aper_low);
pci_read_config_dword(agp, 0x14, &aper_hi); pci_read_config_dword(agp, 0x14, &aper_hi);
aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32); aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32);
printk(KERN_INFO "Aperture from AGP @ %Lx size %u MB\n", aper, 32 << order); printk(KERN_INFO PFX "Aperture from AGP @ %Lx size %u MB\n", aper, 32 << order);
if (order < 0 || !aperture_valid(aper, (32*1024*1024)<<order)) if (order < 0 || !aperture_valid(aper, (32*1024*1024)<<order))
return -1; return -1;
...@@ -347,17 +348,17 @@ static __init int cache_nbs (struct pci_dev *pdev, u32 cap_ptr) ...@@ -347,17 +348,17 @@ static __init int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev)) while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev))
!= NULL) { != NULL) {
if (fix_northbridge(loop_dev, pdev, cap_ptr) < 0) { if (fix_northbridge(loop_dev, pdev, cap_ptr) < 0) {
printk("No usable aperture found.\n"); printk(KERN_INFO PFX "No usable aperture found.\n");
#ifdef __x86_64__ #ifdef __x86_64__
/* should port this to i386 */ /* should port this to i386 */
printk("Consider rebooting with iommu=memaper=2 to get a good aperture.\n"); printk(KERN_INFO PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n");
#endif #endif
return -1; return -1;
} }
hammers[i++] = loop_dev; hammers[i++] = loop_dev;
nr_garts = i; nr_garts = i;
if (i == MAX_HAMMER_GARTS) { if (i == MAX_HAMMER_GARTS) {
printk(KERN_INFO "Too many northbridges for AGP\n"); printk(KERN_INFO PFX "Too many northbridges for AGP\n");
return -1; return -1;
} }
} }
...@@ -495,14 +496,14 @@ int __init agp_amd64_init(void) ...@@ -495,14 +496,14 @@ int __init agp_amd64_init(void)
int err = 0; int err = 0;
if (agp_off) if (agp_off)
return -EINVAL; return -EINVAL;
if (pci_module_init(&agp_amd64_pci_driver) == 0) { if (pci_module_init(&agp_amd64_pci_driver) > 0) {
struct pci_dev *dev; struct pci_dev *dev;
if (!agp_try_unsupported && !agp_try_unsupported_boot) { if (!agp_try_unsupported && !agp_try_unsupported_boot) {
printk(KERN_INFO "No supported AGP bridge found.\n"); printk(KERN_INFO PFX "No supported AGP bridge found.\n");
#ifdef MODULE #ifdef MODULE
printk(KERN_INFO "You can try agp_try_unsupported=1\n"); printk(KERN_INFO PFX "You can try agp_try_unsupported=1\n");
#else #else
printk(KERN_INFO "You can boot with agp=try_unsupported\n"); printk(KERN_INFO PFX "You can boot with agp=try_unsupported\n");
#endif #endif
return -ENODEV; return -ENODEV;
} }
......
...@@ -214,7 +214,7 @@ static int ati_configure(void) ...@@ -214,7 +214,7 @@ static int ati_configure(void)
/* /*
pci_read_config_dword(agp_bridge.dev, AGP_APBASE, &temp); pci_read_config_dword(agp_bridge.dev, AGP_APBASE, &temp);
agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK);
printk(KERN_INFO "IGP320 gart_bus_addr: %x\n", agp_bridge.gart_bus_addr); printk(KERN_INFO PFX "IGP320 gart_bus_addr: %x\n", agp_bridge.gart_bus_addr);
*/ */
OUTREG32(ati_generic_private.registers, ATI_GART_FEATURE_ID, 0x60000); OUTREG32(ati_generic_private.registers, ATI_GART_FEATURE_ID, 0x60000);
...@@ -226,8 +226,6 @@ static int ati_configure(void) ...@@ -226,8 +226,6 @@ static int ati_configure(void)
OUTREG32(ati_generic_private.registers, ATI_GART_BASE, OUTREG32(ati_generic_private.registers, ATI_GART_BASE,
agp_bridge->gatt_bus_addr); agp_bridge->gatt_bus_addr);
/* Flush the tlb */
OUTREG32(ati_generic_private.registers, ATI_GART_CACHE_CNTRL, 1);
return 0; return 0;
} }
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
* TODO: * TODO:
* - Allocate more than order 0 pages to avoid too much linear map splitting. * - Allocate more than order 0 pages to avoid too much linear map splitting.
*/ */
#include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -34,6 +33,7 @@ ...@@ -34,6 +33,7 @@
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/agp_backend.h> #include <linux/agp_backend.h>
#include <linux/agpgart.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <asm/io.h> #include <asm/io.h>
#include "agp.h" #include "agp.h"
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
/* AGP bridge need not be PCI device, but DRM thinks it is. */ /* AGP bridge need not be PCI device, but DRM thinks it is. */
static struct pci_dev fake_bridge_dev; static struct pci_dev fake_bridge_dev;
static int hp_zx1_gart_found;
static struct aper_size_info_fixed hp_zx1_sizes[] = static struct aper_size_info_fixed hp_zx1_sizes[] =
{ {
{0, 0, 0}, /* filled in by hp_zx1_fetch_size() */ {0, 0, 0}, /* filled in by hp_zx1_fetch_size() */
...@@ -386,8 +388,6 @@ hp_zx1_setup (u64 ioc_hpa, u64 lba_hpa) ...@@ -386,8 +388,6 @@ hp_zx1_setup (u64 ioc_hpa, u64 lba_hpa)
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;
int error; int error;
printk(KERN_INFO PFX "Detected HP ZX1 AGP chipset (ioc=%lx, lba=%lx)\n", ioc_hpa, lba_hpa);
error = hp_zx1_ioc_init(ioc_hpa, lba_hpa); error = hp_zx1_ioc_init(ioc_hpa, lba_hpa);
if (error) if (error)
return error; return error;
...@@ -416,7 +416,7 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) ...@@ -416,7 +416,7 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
status = hp_acpi_csr_space(obj, &lba_hpa, &length); status = hp_acpi_csr_space(obj, &lba_hpa, &length);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
return 1; return AE_OK;
/* Look for an enclosing IOC scope and find its CSR space */ /* Look for an enclosing IOC scope and find its CSR space */
handle = obj; handle = obj;
...@@ -436,7 +436,7 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) ...@@ -436,7 +436,7 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
else { else {
printk(KERN_ERR PFX "Detected HP ZX1 " printk(KERN_ERR PFX "Detected HP ZX1 "
"AGP LBA but no IOC.\n"); "AGP LBA but no IOC.\n");
return status; return AE_OK;
} }
} }
} }
...@@ -446,22 +446,28 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) ...@@ -446,22 +446,28 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
} while (ACPI_SUCCESS(status)); } while (ACPI_SUCCESS(status));
if (hp_zx1_setup(sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa)) if (hp_zx1_setup(sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa))
return 1; return AE_OK;
return 0;
printk(KERN_INFO PFX "Detected HP ZX1 %s AGP chipset (ioc=%lx, lba=%lx)\n",
(char *) context, sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa);
hp_zx1_gart_found = 1;
return AE_CTRL_TERMINATE;
} }
static int __init static int __init
agp_hp_init (void) agp_hp_init (void)
{ {
acpi_status status;
status = acpi_get_devices("HWP0003", zx1_gart_probe, "HWP0003 AGP LBA", NULL); acpi_get_devices("HWP0003", zx1_gart_probe, "HWP0003", NULL);
if (!(ACPI_SUCCESS(status))) { if (hp_zx1_gart_found)
agp_bridge->type = NOT_SUPPORTED; return 0;
printk(KERN_INFO PFX "Failed to initialize zx1 AGP.\n");
return -ENODEV; acpi_get_devices("HWP0007", zx1_gart_probe, "HWP0007", NULL);
} if (hp_zx1_gart_found)
return 0; return 0;
return -ENODEV;
} }
static void __exit static void __exit
......
...@@ -445,7 +445,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, ...@@ -445,7 +445,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start,
num_entries = A_SIZE_FIX(temp)->num_entries; num_entries = A_SIZE_FIX(temp)->num_entries;
if (pg_start < intel_i830_private.gtt_entries) { if (pg_start < intel_i830_private.gtt_entries) {
printk (KERN_DEBUG "pg_start == 0x%.8lx,intel_i830_private.gtt_entries == 0x%.8x\n", printk (KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_i830_private.gtt_entries == 0x%.8x\n",
pg_start,intel_i830_private.gtt_entries); pg_start,intel_i830_private.gtt_entries);
printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n"); printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n");
......
...@@ -196,7 +196,7 @@ static void nvidia_tlbflush(struct agp_memory *mem) ...@@ -196,7 +196,7 @@ static void nvidia_tlbflush(struct agp_memory *mem)
pci_read_config_dword(nvidia_private.dev_1, pci_read_config_dword(nvidia_private.dev_1,
NVIDIA_1_WBC, &wbc_reg); NVIDIA_1_WBC, &wbc_reg);
if ((signed)(end - jiffies) <= 0) { if ((signed)(end - jiffies) <= 0) {
printk(KERN_ERR printk(KERN_ERR PFX
"TLB flush took more than 3 seconds.\n"); "TLB flush took more than 3 seconds.\n");
} }
} while (wbc_reg & nvidia_private.wbc_mask); } while (wbc_reg & nvidia_private.wbc_mask);
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
* *
*/ */
#include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
* *
*/ */
#include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/smp.h> #include <linux/smp.h>
......
...@@ -70,7 +70,7 @@ static unsigned char atkbd_set3_keycode[512] = { ...@@ -70,7 +70,7 @@ static unsigned char atkbd_set3_keycode[512] = {
134, 46, 45, 32, 18, 5, 4, 63,135, 57, 47, 33, 20, 19, 6, 64, 134, 46, 45, 32, 18, 5, 4, 63,135, 57, 47, 33, 20, 19, 6, 64,
136, 49, 48, 35, 34, 21, 7, 65,137,100, 50, 36, 22, 8, 9, 66, 136, 49, 48, 35, 34, 21, 7, 65,137,100, 50, 36, 22, 8, 9, 66,
125, 51, 37, 23, 24, 11, 10, 67,126, 52, 53, 38, 39, 25, 12, 68, 125, 51, 37, 23, 24, 11, 10, 67,126, 52, 53, 38, 39, 25, 12, 68,
113,114, 40, 84, 26, 13, 87, 99,100, 54, 28, 27, 43, 84, 88, 70, 113,114, 40, 84, 26, 13, 87, 99, 97, 54, 28, 27, 43, 84, 88, 70,
108,105,119,103,111,107, 14,110, 0, 79,106, 75, 71,109,102,104, 108,105,119,103,111,107, 14,110, 0, 79,106, 75, 71,109,102,104,
82, 83, 80, 76, 77, 72, 69, 98, 0, 96, 81, 0, 78, 73, 55, 85, 82, 83, 80, 76, 77, 72, 69, 98, 0, 96, 81, 0, 78, 73, 55, 85,
89, 90, 91, 92, 74,185,184,182, 0, 0, 0,125,126,127,112, 0, 89, 90, 91, 92, 74,185,184,182, 0, 0, 0,125,126,127,112, 0,
......
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