Commit c34d6311 authored by David Mosberger's avatar David Mosberger

Merge tiger.hpl.hp.com:/data1/bk/vanilla/linux-2.5

into tiger.hpl.hp.com:/data1/bk/lia64/to-linus-2.5
parents 8f7155ad fb329400
This diff is collapsed.
......@@ -1479,7 +1479,6 @@ ioc_iova_init(struct ioc *ioc)
#ifdef FULL_VALID_PDIR
unsigned long index;
#endif
unsigned int i;
/*
** Firmware programs the base and size of a "safe IOVA space"
......@@ -1574,18 +1573,6 @@ ioc_iova_init(struct ioc *ioc)
/* Enable IOVA translation */
WRITE_REG(ioc->ibase | 1, ioc->ioc_hpa + IOC_IBASE);
READ_REG(ioc->ioc_hpa + IOC_IBASE);
/* Clear ROPE(N)_CONFIG AO bit.
** Disables "NT Ordering" (~= !"Relaxed Ordering")
** Overrides bit 1 in DMA Hint Sets.
** Improves netperf UDP_STREAM by ~10% for tg3 on bcm5701.
*/
for (i=0; i<(8*8); i+=8) {
unsigned long rope_config;
rope_config = READ_REG(ioc->ioc_hpa + IOC_ROPE0_CFG + i);
rope_config &= ~IOC_ROPE_AO;
WRITE_REG(rope_config, ioc->ioc_hpa + IOC_ROPE0_CFG + i);
}
}
static void __init
......@@ -1659,26 +1646,25 @@ ioc_sac_init(struct ioc *ioc)
static void __init
ioc_zx1_init(struct ioc *ioc)
{
unsigned long rope_config;
unsigned int i;
if (ioc->rev < 0x20)
panic(PFX "IOC 2.0 or later required for IOMMU support\n");
ioc->dma_mask = 0xFFFFFFFFFFUL;
if (!iovp_shift) {
/* 64k is max iommu page size */
iovp_shift = min(PAGE_SHIFT, 16);
iovp_size = (1 << iovp_shift);
iovp_mask = ~(iovp_size - 1);
}
}
/* 38 bit memory controller + extra bit for range displaced by MMIO */
ioc->dma_mask = (0x1UL << 39) - 1;
static void __init
ioc_sx1000_init(struct ioc *ioc)
{
if (!iovp_shift) {
iovp_shift = 12; /* 4K for now */
iovp_size = (1 << iovp_shift);
iovp_mask = ~(iovp_size - 1);
/*
** Clear ROPE(N)_CONFIG AO bit.
** Disables "NT Ordering" (~= !"Relaxed Ordering")
** Overrides bit 1 in DMA Hint Sets.
** Improves netperf UDP_STREAM by ~10% for tg3 on bcm5701.
*/
for (i=0; i<(8*8); i+=8) {
rope_config = READ_REG(ioc->ioc_hpa + IOC_ROPE0_CFG + i);
rope_config &= ~IOC_ROPE_AO;
WRITE_REG(rope_config, ioc->ioc_hpa + IOC_ROPE0_CFG + i);
}
}
......@@ -1692,8 +1678,6 @@ struct ioc_iommu {
static struct ioc_iommu ioc_iommu_info[] __initdata = {
{ ZX1_IOC_ID, "zx1", ioc_zx1_init },
{ REO_IOC_ID, "REO", ioc_sx1000_init },
{ SX1000_IOC_ID, "sx1000", ioc_sx1000_init },
};
static struct ioc * __init
......@@ -1718,11 +1702,6 @@ ioc_init(u64 hpa, void *handle)
ioc->rev = READ_REG(ioc->ioc_hpa + IOC_FCLASS) & 0xFFUL;
ioc->dma_mask = 0xFFFFFFFFFFFFFFFFUL; /* conservative */
if (iovp_shift) {
iovp_size = (1 << iovp_shift);
iovp_mask = ~(iovp_size - 1);
}
for (info = ioc_iommu_info; info < ioc_iommu_info + ARRAY_SIZE(ioc_iommu_info); info++) {
if (ioc->func_id == info->func_id) {
ioc->name = info->name;
......@@ -1730,6 +1709,10 @@ ioc_init(u64 hpa, void *handle)
(info->init)(ioc);
}
}
iovp_size = (1 << iovp_shift);
iovp_mask = ~(iovp_size - 1);
DBG_INIT("%s: PAGE_SIZE %ldK, iovp_size %ldK\n", __FUNCTION__,
PAGE_SIZE >> 10, iovp_size >> 10);
......@@ -1929,10 +1912,21 @@ acpi_sba_ioc_add(struct acpi_device *device)
* For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI
* root bridges, and its CSR space includes the IOC function.
*/
if (strncmp("HWP0001", dev_info->hardware_id.value, 7) == 0)
if (strncmp("HWP0001", dev_info->hardware_id.value, 7) == 0) {
hpa += ZX1_IOC_OFFSET;
/* zx1 based systems default to kernel page size iommu pages */
if (!iovp_shift)
iovp_shift = min(PAGE_SHIFT, 16);
}
ACPI_MEM_FREE(dev_info);
/*
* default anything not caught above or specified on cmdline to 4k
* iommu page size
*/
if (!iovp_shift)
iovp_shift = 12;
ioc = ioc_init(hpa, device->handle);
if (!ioc)
return 1;
......
......@@ -636,7 +636,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
#ifdef SIMSERIAL_DEBUG
printk("rs_close: hung_up\n");
#endif
MOD_DEC_USE_COUNT;
local_irq_restore(flags);
return;
}
......@@ -661,7 +660,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
state->count = 0;
}
if (state->count) {
MOD_DEC_USE_COUNT;
local_irq_restore(flags);
return;
}
......@@ -686,7 +684,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
}
info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
wake_up_interruptible(&info->close_wait);
MOD_DEC_USE_COUNT;
}
/*
......@@ -874,17 +871,12 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
int retval, line;
unsigned long page;
MOD_INC_USE_COUNT;
line = tty->index;
if ((line < 0) || (line >= NR_PORTS)) {
MOD_DEC_USE_COUNT;
if ((line < 0) || (line >= NR_PORTS))
return -ENODEV;
}
retval = get_async_struct(line, &info);
if (retval) {
MOD_DEC_USE_COUNT;
if (retval)
return retval;
}
tty->driver_data = info;
info->tty = tty;
......@@ -895,10 +887,8 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
if (!tmp_buf) {
page = get_zeroed_page(GFP_KERNEL);
if (!page) {
/* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
if (!page)
return -ENOMEM;
}
if (tmp_buf)
free_page(page);
else
......@@ -912,7 +902,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
(info->flags & ASYNC_CLOSING)) {
if (info->flags & ASYNC_CLOSING)
interruptible_sleep_on(&info->close_wait);
/* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
#ifdef SERIAL_DO_RESTART
return ((info->flags & ASYNC_HUP_NOTIFY) ?
-EAGAIN : -ERESTARTSYS);
......@@ -926,7 +915,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
*/
retval = startup(info);
if (retval) {
/* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
return retval;
}
......@@ -1042,6 +1030,7 @@ simrs_init (void)
/* Initialize the tty_driver structure */
hp_simserial_driver->owner = THIS_MODULE;
hp_simserial_driver->driver_name = "simserial";
hp_simserial_driver->name = "ttyS";
hp_simserial_driver->major = TTY_MAJOR;
......
......@@ -816,7 +816,7 @@ GLOBAL_ENTRY(ia64_delay_loop)
br.ret.sptk.many rp
END(ia64_delay_loop)
GLOBAL_ENTRY(ia64_invoke_kernel_thread_helper)
GLOBAL_ENTRY(start_kernel_thread)
.prologue
.save rp, r0 // this is the end of the call-chain
.body
......@@ -827,7 +827,7 @@ GLOBAL_ENTRY(ia64_invoke_kernel_thread_helper)
mov out0 = r8
br.call.sptk.many rp = sys_exit;;
1: br.sptk.few 1b // not reached
END(ia64_invoke_kernel_thread_helper)
END(start_kernel_thread)
#ifdef CONFIG_IA64_BRL_EMU
......
......@@ -57,6 +57,21 @@ __u8 isa_irq_to_vector_map[16] = {
};
EXPORT_SYMBOL(isa_irq_to_vector_map);
static inline void
irq_enter (void)
{
preempt_count() += HARDIRQ_OFFSET;
}
static inline void
irq_exit (void)
{
preempt_count() -= IRQ_EXIT_OFFSET;
if (!in_interrupt() && local_softirq_pending())
do_softirq();
preempt_enable_no_resched();
}
int
ia64_alloc_vector (void)
{
......
......@@ -103,8 +103,6 @@ extern void ia64_slave_init_handler (void);
static ia64_mc_info_t ia64_mc_info;
extern struct hw_interrupt_type irq_type_iosapic_level;
struct ia64_mca_tlb_info ia64_mca_tlb_list[NR_CPUS];
#define MAX_CPE_POLL_INTERVAL (15*60*HZ) /* 15 minutes */
......@@ -1253,7 +1251,6 @@ ia64_mca_init(void)
if (irq_to_vector(irq) == cpev) {
desc = irq_descp(irq);
desc->status |= IRQ_PER_CPU;
desc->handler = &irq_type_iosapic_level;
setup_irq(irq, &mca_cpe_irqaction);
}
ia64_mca_register_cpev(cpev);
......
......@@ -574,8 +574,8 @@ ia64_set_personality (struct elf64_hdr *elf_ex, int ibcs2_interpreter)
pid_t
kernel_thread (int (*fn)(void *), void *arg, unsigned long flags)
{
extern void ia64_invoke_kernel_thread_helper (void);
unsigned long *helper_fptr = (unsigned long *) &ia64_invoke_kernel_thread_helper;
extern void start_kernel_thread (void);
unsigned long *helper_fptr = (unsigned long *) &start_kernel_thread;
struct {
struct switch_stack sw;
struct pt_regs pt;
......
......@@ -10,7 +10,6 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/spinlock.h>
#include <linux/string.h>
......@@ -21,6 +20,12 @@
spinlock_t sal_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
unsigned long sal_platform_features;
unsigned short sal_revision;
unsigned short sal_version;
#define SAL_MAJOR(x) ((x) >> 8)
#define SAL_MINOR(x) ((x) & 0xff)
static struct {
void *addr; /* function entry point */
void *gpval; /* gp value to use */
......@@ -86,13 +91,98 @@ ia64_sal_handler_init (void *entry_point, void *gpval)
ia64_sal = (ia64_sal_handler) &pdesc;
}
static void __init
check_versions (struct ia64_sal_systab *systab)
{
sal_revision = (systab->sal_rev_major << 8) | systab->sal_rev_minor;
sal_version = (systab->sal_b_rev_major << 8) | systab->sal_b_rev_minor;
/* Check for broken firmware */
if ((sal_revision == SAL_VERSION_CODE(49, 29))
&& (sal_version == SAL_VERSION_CODE(49, 29)))
{
/*
* Old firmware for zx2000 prototypes have this weird version number,
* reset it to something sane.
*/
sal_revision = SAL_VERSION_CODE(2, 8);
sal_version = SAL_VERSION_CODE(0, 0);
}
}
static void __init
sal_desc_entry_point (void *p)
{
struct ia64_sal_desc_entry_point *ep = p;
ia64_pal_handler_init(__va(ep->pal_proc));
ia64_sal_handler_init(__va(ep->sal_proc), __va(ep->gp));
}
#ifdef CONFIG_SMP
static void __init
set_smp_redirect (int flag)
{
if (no_int_routing)
smp_int_redirect &= ~flag;
else
smp_int_redirect |= flag;
}
#else
#define set_smp_redirect(flag) do { } while (0)
#endif
static void __init
sal_desc_platform_feature (void *p)
{
struct ia64_sal_desc_platform_feature *pf = p;
sal_platform_features = pf->feature_mask;
printk(KERN_INFO "SAL Platform features:");
if (!sal_platform_features) {
printk(" None\n");
return;
}
if (sal_platform_features & IA64_SAL_PLATFORM_FEATURE_BUS_LOCK)
printk(" BusLock");
if (sal_platform_features & IA64_SAL_PLATFORM_FEATURE_IRQ_REDIR_HINT) {
printk(" IRQ_Redirection");
set_smp_redirect(SMP_IRQ_REDIRECTION);
}
if (sal_platform_features & IA64_SAL_PLATFORM_FEATURE_IPI_REDIR_HINT) {
printk(" IPI_Redirection");
set_smp_redirect(SMP_IPI_REDIRECTION);
}
if (sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)
printk(" ITC_Drift");
printk("\n");
}
#ifdef CONFIG_SMP
static void __init
sal_desc_ap_wakeup (void *p)
{
struct ia64_sal_desc_ap_wakeup *ap = p;
switch (ap->mechanism) {
case IA64_SAL_AP_EXTERNAL_INT:
ap_wakeup_vector = ap->vector;
printk(KERN_INFO "SAL: AP wakeup using external interrupt "
"vector 0x%lx\n", ap_wakeup_vector);
break;
default:
printk(KERN_ERR "SAL: AP wakeup mechanism unsupported!\n");
break;
}
}
#else
static void __init sal_desc_ap_wakeup(void *p) { }
#endif
void __init
ia64_sal_init (struct ia64_sal_systab *systab)
{
unsigned long min, max;
char *p;
struct ia64_sal_desc_entry_point *ep;
int i;
if (!systab) {
......@@ -103,86 +193,35 @@ ia64_sal_init (struct ia64_sal_systab *systab)
if (strncmp(systab->signature, "SST_", 4) != 0)
printk(KERN_ERR "bad signature in system table!");
/*
* revisions are coded in BCD, so %x does the job for us
*/
printk(KERN_INFO "SAL v%x.%x: oem=%.32s, product=%.32s\n",
systab->sal_rev_major, systab->sal_rev_minor,
systab->oem_id, systab->product_id);
check_versions(systab);
min = ~0UL;
max = 0;
/* revisions are coded in BCD, so %x does the job for us */
printk(KERN_INFO "SAL %x.%x: %.32s %.32s%sversion %x.%x\n",
SAL_MAJOR(sal_revision), SAL_MINOR(sal_revision),
systab->oem_id, systab->product_id,
systab->product_id[0] ? " " : "",
SAL_MAJOR(sal_version), SAL_MINOR(sal_version));
p = (char *) (systab + 1);
for (i = 0; i < systab->entry_count; i++) {
/*
* The first byte of each entry type contains the type descriptor.
* The first byte of each entry type contains the type
* descriptor.
*/
switch (*p) {
case SAL_DESC_ENTRY_POINT:
ep = (struct ia64_sal_desc_entry_point *) p;
printk(KERN_INFO "SAL: entry: pal_proc=0x%lx, sal_proc=0x%lx\n",
ep->pal_proc, ep->sal_proc);
ia64_pal_handler_init(__va(ep->pal_proc));
ia64_sal_handler_init(__va(ep->sal_proc), __va(ep->gp));
sal_desc_entry_point(p);
break;
case SAL_DESC_PLATFORM_FEATURE:
sal_desc_platform_feature(p);
break;
case SAL_DESC_PTC:
ia64_ptc_domain_info = (ia64_sal_desc_ptc_t *)p;
break;
case SAL_DESC_AP_WAKEUP:
#ifdef CONFIG_SMP
{
struct ia64_sal_desc_ap_wakeup *ap = (void *) p;
switch (ap->mechanism) {
case IA64_SAL_AP_EXTERNAL_INT:
ap_wakeup_vector = ap->vector;
printk(KERN_INFO "SAL: AP wakeup using external interrupt "
"vector 0x%lx\n", ap_wakeup_vector);
break;
default:
printk(KERN_ERR "SAL: AP wakeup mechanism unsupported!\n");
sal_desc_ap_wakeup(p);
break;
}
break;
}
#endif
case SAL_DESC_PLATFORM_FEATURE:
{
struct ia64_sal_desc_platform_feature *pf = (void *) p;
sal_platform_features = pf->feature_mask;
printk(KERN_INFO "SAL: Platform features ");
if (pf->feature_mask & IA64_SAL_PLATFORM_FEATURE_BUS_LOCK)
printk("BusLock ");
if (pf->feature_mask & IA64_SAL_PLATFORM_FEATURE_IRQ_REDIR_HINT) {
printk("IRQ_Redirection ");
#ifdef CONFIG_SMP
if (no_int_routing)
smp_int_redirect &= ~SMP_IRQ_REDIRECTION;
else
smp_int_redirect |= SMP_IRQ_REDIRECTION;
#endif
}
if (pf->feature_mask & IA64_SAL_PLATFORM_FEATURE_IPI_REDIR_HINT) {
printk("IPI_Redirection ");
#ifdef CONFIG_SMP
if (no_int_routing)
smp_int_redirect &= ~SMP_IPI_REDIRECTION;
else
smp_int_redirect |= SMP_IPI_REDIRECTION;
#endif
}
if (pf->feature_mask & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)
printk("ITC_Drift ");
printk("\n");
break;
}
}
p += SAL_DESC_SIZE(*p);
}
}
......@@ -57,17 +57,16 @@ struct pci_fixup pcibios_fixups[1];
((u64)(seg << 24) | (u64)(bus << 16) | \
(u64)(devfn << 8) | (u64)(reg))
static int
pci_sal_read (int seg, int bus, int devfn, int reg, int len, u32 *value)
{
int result = 0;
u64 data = 0;
if (!value || (seg > 255) || (bus > 255) || (devfn > 255) || (reg > 255))
if ((seg > 255) || (bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
result = ia64_sal_pci_config_read(PCI_SAL_ADDRESS(seg, bus, devfn, reg), len, &data);
result = ia64_sal_pci_config_read(PCI_SAL_ADDRESS(seg, bus, devfn, reg), 0, len, &data);
*value = (u32) data;
......@@ -80,15 +79,62 @@ pci_sal_write (int seg, int bus, int devfn, int reg, int len, u32 value)
if ((seg > 255) || (bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;
return ia64_sal_pci_config_write(PCI_SAL_ADDRESS(seg, bus, devfn, reg), len, value);
return ia64_sal_pci_config_write(PCI_SAL_ADDRESS(seg, bus, devfn, reg), 0, len, value);
}
struct pci_raw_ops pci_sal_ops = {
static struct pci_raw_ops pci_sal_ops = {
.read = pci_sal_read,
.write = pci_sal_write
};
struct pci_raw_ops *raw_pci_ops = &pci_sal_ops; /* default to SAL */
/* SAL 3.2 adds support for extended config space. */
#define PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg) \
((u64)(seg << 28) | (u64)(bus << 20) | \
(u64)(devfn << 12) | (u64)(reg))
static int
pci_sal_ext_read (int seg, int bus, int devfn, int reg, int len, u32 *value)
{
int result = 0;
u64 data = 0;
if ((seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095))
return -EINVAL;
result = ia64_sal_pci_config_read(PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg), 1, len, &data);
*value = (u32) data;
return result;
}
static int
pci_sal_ext_write (int seg, int bus, int devfn, int reg, int len, u32 value)
{
if ((seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095))
return -EINVAL;
return ia64_sal_pci_config_write(PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg), 1, len, value);
}
static struct pci_raw_ops pci_sal_ext_ops = {
.read = pci_sal_ext_read,
.write = pci_sal_ext_write
};
struct pci_raw_ops *raw_pci_ops = &pci_sal_ops; /* default to SAL < 3.2 */
static int __init
pci_set_sal_ops (void)
{
if (sal_version >= SAL_VERSION_CODE(3, 2)) {
raw_pci_ops = &pci_sal_ext_ops;
}
return 0;
}
arch_initcall(pci_set_sal_ops);
static int
......@@ -139,7 +185,8 @@ alloc_pci_controller (int seg)
}
static int __devinit
alloc_resource (char *name, struct resource *root, unsigned long start, unsigned long end, unsigned long flags)
alloc_resource (char *name, struct resource *root, unsigned long start, unsigned long end,
unsigned long flags)
{
struct resource *res;
......
......@@ -952,6 +952,7 @@ static void
sn_sal_console_write(struct console *co, const char *s, unsigned count)
{
unsigned long flags;
const char *s1;
BUG_ON(!sn_sal_is_asynch);
......@@ -959,15 +960,36 @@ sn_sal_console_write(struct console *co, const char *s, unsigned count)
* oops, kdb, panic, etc. make sure they get it. */
if (spin_is_locked(&sn_sal_lock)) {
synch_flush_xmit();
/* Output '\r' before each '\n' */
while ((s1 = memchr(s, '\n', count)) != NULL) {
sn_func->sal_puts(s, s1 - s);
sn_func->sal_puts("\r\n", 2);
count -= s1 + 1 - s;
s = s1 + 1;
}
sn_func->sal_puts(s, count);
}
else if (in_interrupt()) {
spin_lock_irqsave(&sn_sal_lock, flags);
synch_flush_xmit();
spin_unlock_irqrestore(&sn_sal_lock, flags);
/* Output '\r' before each '\n' */
while ((s1 = memchr(s, '\n', count)) != NULL) {
sn_func->sal_puts(s, s1 - s);
sn_func->sal_puts("\r\n", 2);
count -= s1 + 1 - s;
s = s1 + 1;
}
sn_func->sal_puts(s, count);
}
else
/* Output '\r' before each '\n' */
while ((s1 = memchr(s, '\n', count)) != NULL) {
sn_sal_write(NULL, 0, s, s1 - s);
sn_sal_write(NULL, 0, "\r\n", 2);
count -= s1 + 1 - s;
s = s1 + 1;
}
sn_sal_write(NULL, 0, s, count);
}
......
......@@ -2,7 +2,7 @@
#define _ASM_IA64_HARDIRQ_H
/*
* Copyright (C) 1998-2002 Hewlett-Packard Co
* Modified 1998-2002, 2004 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
......@@ -86,8 +86,6 @@
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# include <linux/smp_lock.h>
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
......@@ -97,14 +95,6 @@
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \
do { \
preempt_count() -= IRQ_EXIT_OFFSET; \
if (!in_interrupt() && local_softirq_pending()) \
do_softirq(); \
preempt_enable_no_resched(); \
} while (0)
#ifdef CONFIG_SMP
extern void synchronize_irq (unsigned int irq);
#else
......
......@@ -35,6 +35,7 @@
#ifndef __ASSEMBLY__
#include <linux/bcd.h>
#include <linux/spinlock.h>
#include <linux/efi.h>
......@@ -229,6 +230,10 @@ typedef struct ia64_sal_desc_ap_wakeup {
extern ia64_sal_handler ia64_sal;
extern struct ia64_sal_desc_ptc *ia64_ptc_domain_info;
extern unsigned short sal_revision; /* supported SAL spec revision */
extern unsigned short sal_version; /* SAL version; OEM dependent */
#define SAL_VERSION_CODE(major, minor) ((BIN2BCD(major) << 8) | BIN2BCD(minor))
extern const char *ia64_sal_strerror (long status);
extern void ia64_sal_init (struct ia64_sal_systab *sal_systab);
......@@ -741,10 +746,10 @@ ia64_sal_mc_set_params (u64 param_type, u64 i_or_m, u64 i_or_m_val, u64 timeout,
/* Read from PCI configuration space */
static inline s64
ia64_sal_pci_config_read (u64 pci_config_addr, u64 size, u64 *value)
ia64_sal_pci_config_read (u64 pci_config_addr, int type, u64 size, u64 *value)
{
struct ia64_sal_retval isrv;
SAL_CALL(isrv, SAL_PCI_CONFIG_READ, pci_config_addr, size, 0, 0, 0, 0, 0);
SAL_CALL(isrv, SAL_PCI_CONFIG_READ, pci_config_addr, size, type, 0, 0, 0, 0);
if (value)
*value = isrv.v0;
return isrv.status;
......@@ -752,11 +757,11 @@ ia64_sal_pci_config_read (u64 pci_config_addr, u64 size, u64 *value)
/* Write to PCI configuration space */
static inline s64
ia64_sal_pci_config_write (u64 pci_config_addr, u64 size, u64 value)
ia64_sal_pci_config_write (u64 pci_config_addr, int type, u64 size, u64 value)
{
struct ia64_sal_retval isrv;
SAL_CALL(isrv, SAL_PCI_CONFIG_WRITE, pci_config_addr, size, value,
0, 0, 0, 0);
type, 0, 0, 0);
return isrv.status;
}
......
......@@ -20,6 +20,7 @@
#include <asm/sn/vector.h>
#include <asm/sn/slotnum.h>
#include <asm/sn/arch.h>
#include <asm/sn/sgi.h>
typedef uint64_t router_reg_t;
......
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