patch-2.1.121 linux/arch/alpha/kernel/core_cia.c
Next file: linux/arch/alpha/kernel/core_lca.c
Previous file: linux/arch/alpha/kernel/core_apecs.c
Back to the patch index
Back to the overall index
- Lines: 141
- Date:
Sun Sep 6 10:34:33 1998
- Orig file:
v2.1.120/linux/arch/alpha/kernel/core_cia.c
- Orig date:
Tue Aug 18 22:02:02 1998
diff -u --recursive --new-file v2.1.120/linux/arch/alpha/kernel/core_cia.c linux/arch/alpha/kernel/core_cia.c
@@ -30,8 +30,6 @@
* handle the system transaction. Another involves timing. Ho hum.
*/
-extern asmlinkage void wrmces(unsigned long mces);
-
/*
* Machine check reasons. Defined according to PALcode sources
* (osf.h and platform.h).
@@ -155,8 +153,7 @@
value = 0xffffffffU;
mb();
- save_flags(flags); /* avoid getting hit by machine check */
- cli();
+ __save_and_cli(flags); /* avoid getting hit by machine check */
DBGC(("conf_read(addr=0x%lx, type1=%d)\n", addr, type1));
@@ -224,7 +221,7 @@
DBGC(("conf_read(): finished\n"));
- restore_flags(flags);
+ __restore_flags(flags);
return value;
}
@@ -235,8 +232,7 @@
unsigned int stat0;
unsigned int cia_cfg = 0;
- save_flags(flags); /* avoid getting hit by machine check */
- cli();
+ __save_and_cli(flags); /* avoid getting hit by machine check */
/* Reset status register to avoid losing errors. */
stat0 = *(vuip)CIA_IOC_CIA_ERR;
@@ -295,18 +291,17 @@
}
DBGC(("conf_write(): finished\n"));
- restore_flags(flags);
+ __restore_flags(flags);
}
int
-cia_pcibios_read_config_byte (u8 bus, u8 device_fn, u8 where, u8 *value)
+cia_hose_read_config_byte (u8 bus, u8 device_fn, u8 where, u8 *value,
+ struct linux_hose_info *hose)
{
unsigned long addr = CIA_CONF;
unsigned long pci_addr;
unsigned char type1;
- *value = 0xff;
-
if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1))
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -316,16 +311,13 @@
}
int
-cia_pcibios_read_config_word (u8 bus, u8 device_fn, u8 where, u16 *value)
+cia_hose_read_config_word (u8 bus, u8 device_fn, u8 where, u16 *value,
+ struct linux_hose_info *hose)
{
unsigned long addr = CIA_CONF;
unsigned long pci_addr;
unsigned char type1;
- *value = 0xffff;
-
- if (where & 0x1)
- return PCIBIOS_BAD_REGISTER_NUMBER;
if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1))
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -335,15 +327,13 @@
}
int
-cia_pcibios_read_config_dword (u8 bus, u8 device_fn, u8 where, u32 *value)
+cia_hose_read_config_dword (u8 bus, u8 device_fn, u8 where, u32 *value,
+ struct linux_hose_info *hose)
{
unsigned long addr = CIA_CONF;
unsigned long pci_addr;
unsigned char type1;
- *value = 0xffffffff;
- if (where & 0x3)
- return PCIBIOS_BAD_REGISTER_NUMBER;
if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1))
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -353,7 +343,8 @@
}
int
-cia_pcibios_write_config_byte (u8 bus, u8 device_fn, u8 where, u8 value)
+cia_hose_write_config_byte (u8 bus, u8 device_fn, u8 where, u8 value,
+ struct linux_hose_info *hose)
{
unsigned long addr = CIA_CONF;
unsigned long pci_addr;
@@ -368,14 +359,13 @@
}
int
-cia_pcibios_write_config_word (u8 bus, u8 device_fn, u8 where, u16 value)
+cia_hose_write_config_word (u8 bus, u8 device_fn, u8 where, u16 value,
+ struct linux_hose_info *hose)
{
unsigned long addr = CIA_CONF;
unsigned long pci_addr;
unsigned char type1;
- if (where & 0x1)
- return PCIBIOS_BAD_REGISTER_NUMBER;
if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1))
return PCIBIOS_DEVICE_NOT_FOUND;
@@ -385,14 +375,13 @@
}
int
-cia_pcibios_write_config_dword (u8 bus, u8 device_fn, u8 where, u32 value)
+cia_hose_write_config_dword (u8 bus, u8 device_fn, u8 where, u32 value,
+ struct linux_hose_info *hose)
{
unsigned long addr = CIA_CONF;
unsigned long pci_addr;
unsigned char type1;
- if (where & 0x3)
- return PCIBIOS_BAD_REGISTER_NUMBER;
if (mk_conf_addr(bus, device_fn, where, &pci_addr, &type1))
return PCIBIOS_DEVICE_NOT_FOUND;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov