Commit 18d1ca4f authored by Linus Torvalds's avatar Linus Torvalds

Merge http://lia64.bkbits.net/to-linus-2.5

into ppc970.osdl.org:/home/torvalds/v2.5/linux
parents 70b19320 9e2b8d7f
......@@ -245,6 +245,12 @@ config IA64_MCA
Say Y here to enable machine check support for IA-64. If you're
unsure, answer Y.
config IA64_CYCLONE
bool "Support Cyclone(EXA) Time Source"
help
Say Y here to enable support for IBM EXA Cyclone time source.
If you're unsure, answer N.
config PM
bool "Power Management support"
depends on IA64_GENERIC || IA64_DIG || IA64_HP_ZX1
......
......@@ -18,6 +18,7 @@ obj-$(CONFIG_IOSAPIC) += iosapic.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_SMP) += smp.o smpboot.o
obj-$(CONFIG_PERFMON) += perfmon_default_smpl.o
obj-$(CONFIG_IA64_CYCLONE) += cyclone.o
# The gate DSO image is built using a special linker script.
targets += gate.so gate-syms.o
......
......@@ -49,6 +49,8 @@
#include <asm/page.h>
#include <asm/system.h>
#include <asm/numa.h>
#include <asm/sal.h>
#include <asm/cyclone.h>
#define PREFIX "ACPI: "
......@@ -304,6 +306,22 @@ acpi_parse_nmi_src (acpi_table_entry_header *header)
return 0;
}
/* Hook from generic ACPI tables.c */
void __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
if (!strncmp(oem_id, "IBM", 3) &&
(!strncmp(oem_table_id, "SERMOW", 6))){
/* Unfortunatly ITC_DRIFT is not yet part of the
* official SAL spec, so the ITC_DRIFT bit is not
* set by the BIOS on this hardware.
*/
sal_platform_features |= IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT;
/*Start cyclone clock*/
cyclone_setup(0);
}
}
static int __init
acpi_parse_madt (unsigned long phys_addr, unsigned long size)
......@@ -327,6 +345,10 @@ acpi_parse_madt (unsigned long phys_addr, unsigned long size)
ipi_base_addr = (unsigned long) ioremap(acpi_madt->lapic_address, 0);
printk(KERN_INFO PREFIX "Local APIC address 0x%lx\n", ipi_base_addr);
acpi_madt_oem_check(acpi_madt->header.oem_id,
acpi_madt->header.oem_table_id);
return 0;
}
......
#include <linux/smp.h>
#include <linux/time.h>
#include <linux/errno.h>
/* IBM Summit (EXA) Cyclone counter code*/
#define CYCLONE_CBAR_ADDR 0xFEB00CD0
#define CYCLONE_PMCC_OFFSET 0x51A0
#define CYCLONE_MPMC_OFFSET 0x51D0
#define CYCLONE_MPCS_OFFSET 0x51A8
#define CYCLONE_TIMER_FREQ 100000000
int use_cyclone;
int __init cyclone_setup(char *str)
{
use_cyclone = 1;
return 1;
}
static u32* volatile cyclone_timer; /* Cyclone MPMC0 register */
static u32 last_update_cyclone;
static unsigned long offset_base;
static unsigned long get_offset_cyclone(void)
{
u32 now;
unsigned long offset;
/* Read the cyclone timer */
now = readl(cyclone_timer);
/* .. relative to previous update*/
offset = now - last_update_cyclone;
/* convert cyclone ticks to nanoseconds */
offset = (offset*NSEC_PER_SEC)/CYCLONE_TIMER_FREQ;
/* our adjusted time in nanoseconds */
return offset_base + offset;
}
static void update_cyclone(long delta_nsec)
{
u32 now;
unsigned long offset;
/* Read the cyclone timer */
now = readl(cyclone_timer);
/* .. relative to previous update*/
offset = now - last_update_cyclone;
/* convert cyclone ticks to nanoseconds */
offset = (offset*NSEC_PER_SEC)/CYCLONE_TIMER_FREQ;
offset += offset_base;
/* Be careful about signed/unsigned comparisons here: */
if (delta_nsec < 0 || (unsigned long) delta_nsec < offset)
offset_base = offset - delta_nsec;
else
offset_base = 0;
last_update_cyclone = now;
}
static void reset_cyclone(void)
{
offset_base = 0;
last_update_cyclone = readl(cyclone_timer);
}
struct time_interpolator cyclone_interpolator = {
.get_offset = get_offset_cyclone,
.update = update_cyclone,
.reset = reset_cyclone,
.frequency = CYCLONE_TIMER_FREQ,
.drift = -100,
};
int __init init_cyclone_clock(void)
{
u64* reg;
u64 base; /* saved cyclone base address */
u64 offset; /* offset from pageaddr to cyclone_timer register */
int i;
if (!use_cyclone)
return -ENODEV;
printk(KERN_INFO "Summit chipset: Starting Cyclone Counter.\n");
/* find base address */
offset = (CYCLONE_CBAR_ADDR);
reg = (u64*)ioremap_nocache(offset, sizeof(u64));
if(!reg){
printk(KERN_ERR "Summit chipset: Could not find valid CBAR register.\n");
use_cyclone = 0;
return -ENODEV;
}
base = readq(reg);
if(!base){
printk(KERN_ERR "Summit chipset: Could not find valid CBAR value.\n");
use_cyclone = 0;
return -ENODEV;
}
iounmap(reg);
/* setup PMCC */
offset = (base + CYCLONE_PMCC_OFFSET);
reg = (u64*)ioremap_nocache(offset, sizeof(u64));
if(!reg){
printk(KERN_ERR "Summit chipset: Could not find valid PMCC register.\n");
use_cyclone = 0;
return -ENODEV;
}
writel(0x00000001,reg);
iounmap(reg);
/* setup MPCS */
offset = (base + CYCLONE_MPCS_OFFSET);
reg = (u64*)ioremap_nocache(offset, sizeof(u64));
if(!reg){
printk(KERN_ERR "Summit chipset: Could not find valid MPCS register.\n");
use_cyclone = 0;
return -ENODEV;
}
writel(0x00000001,reg);
iounmap(reg);
/* map in cyclone_timer */
offset = (base + CYCLONE_MPMC_OFFSET);
cyclone_timer = (u32*)ioremap_nocache(offset, sizeof(u32));
if(!cyclone_timer){
printk(KERN_ERR "Summit chipset: Could not find valid MPMC register.\n");
use_cyclone = 0;
return -ENODEV;
}
/*quick test to make sure its ticking*/
for(i=0; i<3; i++){
u32 old = readl(cyclone_timer);
int stall = 100;
while(stall--) barrier();
if(readl(cyclone_timer) == old){
printk(KERN_ERR "Summit chipset: Counter not counting! DISABLED\n");
iounmap(cyclone_timer);
cyclone_timer = 0;
use_cyclone = 0;
return -ENODEV;
}
}
/* initialize last tick */
last_update_cyclone = readl(cyclone_timer);
register_time_interpolator(&cyclone_interpolator);
return 0;
}
__initcall(init_cyclone_clock);
......@@ -1416,7 +1416,7 @@ compile_reg (struct unw_state_record *sr, int i, struct unw_script *script)
case UNW_WHERE_FR:
if (rval <= 5)
val = unw.preg_index[UNW_REG_F2 + (rval - 1)];
val = unw.preg_index[UNW_REG_F2 + (rval - 2)];
else if (rval >= 16 && rval <= 31)
val = unw.preg_index[UNW_REG_F16 + (rval - 16)];
else {
......
......@@ -153,8 +153,10 @@ alloc_resource (char *name, struct resource *root, unsigned long start, unsigned
res->end = end;
res->flags = flags;
if (insert_resource(root, res))
if (insert_resource(root, res)) {
kfree(res);
return -EBUSY;
}
return 0;
}
......
......@@ -16,6 +16,7 @@
#include <linux/pci.h>
#include <asm/uaccess.h>
#include <asm/sn/sgi.h>
#include <asm/io.h>
#include <asm/sn/iograph.h>
......
......@@ -12,7 +12,6 @@
#include <asm/sn/types.h>
#include <asm/sn/sgi.h>
#include <asm/sn/driver.h>
#include <asm/sn/iograph.h>
#include <asm/param.h>
#include <asm/sn/pio.h>
#include <asm/sn/xtalk/xwidget.h>
......
This diff is collapsed.
......@@ -127,7 +127,7 @@ sn_pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_hand
/*
* Get hwgraph vertex for the device
*/
device_sysdata = (struct sn_device_sysdata *) hwdev->sysdata;
device_sysdata = SN_DEVICE_SYSDATA(hwdev);
vhdl = device_sysdata->vhdl;
/*
......@@ -240,7 +240,7 @@ sn_pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dire
/*
* Get the hwgraph vertex for the device
*/
device_sysdata = (struct sn_device_sysdata *) hwdev->sysdata;
device_sysdata = SN_DEVICE_SYSDATA(hwdev);
vhdl = device_sysdata->vhdl;
/*
......@@ -367,7 +367,7 @@ sn_pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
/*
* find vertex for the device
*/
device_sysdata = (struct sn_device_sysdata *)hwdev->sysdata;
device_sysdata = SN_DEVICE_SYSDATA(hwdev);
vhdl = device_sysdata->vhdl;
/*
......
......@@ -12,7 +12,6 @@
#include <asm/smp.h>
#include <asm/sn/sgi.h>
#include <asm/sn/io.h>
#include <asm/sn/iograph.h>
#include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h>
#include <asm/sn/sn_private.h>
......
......@@ -27,7 +27,6 @@
#include <asm/hw_irq.h>
#include <asm/sn/types.h>
#include <asm/sn/sgi.h>
#include <asm/sn/iograph.h>
#include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h>
#include <asm/sn/io.h>
......
......@@ -474,8 +474,6 @@ board_serial_number_get(lboard_t *board,char *serial_number)
return(0);
}
#include "asm/sn/sn_private.h"
/*
* Format a module id for printing.
*
......
......@@ -11,12 +11,12 @@
#include <linux/bootmem.h>
#include <asm/sn/sgi.h>
#include <asm/sn/io.h>
#include <asm/sn/iograph.h>
#include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h>
#include <asm/sn/sn_private.h>
#include <asm/sn/klconfig.h>
#include <asm/sn/sn_cpuid.h>
#include <asm/sn/simulator.h>
int maxcpus;
......@@ -69,12 +69,15 @@ void init_platform_nodepda(nodepda_t *npda, cnodeid_t node)
}
void
init_platform_hubinfo(nodepda_t **nodepdaindr) {
init_platform_hubinfo(nodepda_t **nodepdaindr)
{
cnodeid_t cnode;
hubinfo_t hubinfo;
nodepda_t *npda;
extern int numionodes;
if (IS_RUNNING_ON_SIMULATOR())
return;
for (cnode = 0; cnode < numionodes; cnode++) {
npda = nodepdaindr[cnode];
hubinfo = (hubinfo_t)npda->pdinfo;
......
......@@ -30,6 +30,7 @@
#include <asm/sal.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/sn2/shub_mmr.h>
#include <asm/sn/pda.h>
extern irqpda_t *irqpdaindr;
extern cnodeid_t master_node_get(vertex_hdl_t vhdl);
......@@ -216,7 +217,6 @@ static cpuid_t intr_cpu_choose_from_node(cnodeid_t cnode)
{
cpuid_t cpu, best_cpu = CPU_NONE;
int slice, min_count = 1000;
irqpda_t *irqs;
for (slice = CPUS_PER_NODE - 1; slice >= 0; slice--) {
int intrs;
......@@ -227,8 +227,7 @@ static cpuid_t intr_cpu_choose_from_node(cnodeid_t cnode)
if (!cpu_online(cpu))
continue;
irqs = irqpdaindr;
intrs = irqs->num_irq_used;
intrs = pdacpu(cpu)->sn_num_irqs;
if (min_count > intrs) {
min_count = intrs;
......@@ -243,6 +242,7 @@ static cpuid_t intr_cpu_choose_from_node(cnodeid_t cnode)
}
}
}
pdacpu(best_cpu)->sn_num_irqs++;
return best_cpu;
}
......
......@@ -8,7 +8,6 @@
#include <linux/types.h>
#include <asm/sn/sgi.h>
#include <asm/sn/iograph.h>
#include <asm/sn/pci/pciio.h>
#include <asm/sn/pci/pcibr.h>
#include <asm/sn/pci/pcibr_private.h>
......
......@@ -8,7 +8,6 @@
#include <linux/types.h>
#include <asm/sn/sgi.h>
#include <asm/sn/iograph.h>
#include <asm/sn/pci/pciio.h>
#include <asm/sn/pci/pcibr.h>
#include <asm/sn/pci/pcibr_private.h>
......
......@@ -10,7 +10,6 @@
#include <linux/module.h>
#include <asm/sn/sgi.h>
#include <asm/sn/arch.h>
#include <asm/sn/iograph.h>
#include <asm/sn/pci/pciio.h>
#include <asm/sn/pci/pcibr.h>
#include <asm/sn/pci/pcibr_private.h>
......
......@@ -8,7 +8,6 @@
#include <linux/types.h>
#include <asm/sn/sgi.h>
#include <asm/sn/iograph.h>
#include <asm/sn/addrs.h>
#include <asm/sn/pci/pcibr.h>
#include <asm/sn/pci/pcibr_private.h>
......
......@@ -8,7 +8,6 @@
#include <linux/types.h>
#include <asm/sn/sgi.h>
#include <asm/sn/iograph.h>
#include <asm/sn/pci/pciio.h>
#include <asm/sn/pci/pcibr.h>
#include <asm/sn/pci/pcibr_private.h>
......
......@@ -90,10 +90,15 @@ pic_bus1_widget_info_dup(vertex_hdl_t conn_v, vertex_hdl_t peer_conn_v,
peer_widget_info->w_efunc = 0;
peer_widget_info->w_einfo = 0;
peer_widget_info->w_name = kmalloc(strlen(peer_path) + 1, GFP_KERNEL);
if (!peer_widget_info->w_name) {
kfree(peer_widget_info);
return -ENOMEM;
}
strcpy(peer_widget_info->w_name, peer_path);
if (hwgraph_info_add_LBL(peer_conn_v, INFO_LBL_XWIDGET,
(arbitrary_info_t)peer_widget_info) != GRAPH_SUCCESS) {
kfree(peer_widget_info->w_name);
kfree(peer_widget_info);
return 0;
}
......@@ -359,6 +364,9 @@ pic_attach2(vertex_hdl_t xconn_vhdl, void *bridge,
s = dev_to_name(pcibr_vhdl, devnm, MAXDEVNAME);
pcibr_soft->bs_name = kmalloc(strlen(s) + 1, GFP_KERNEL);
if (!pcibr_soft->bs_name)
return -ENOMEM;
strcpy(pcibr_soft->bs_name, s);
pcibr_soft->bs_conn = xconn_vhdl;
......
......@@ -17,7 +17,6 @@
#include <asm/system.h>
#include <asm/sn/sgi.h>
#include <asm/uaccess.h>
#include <asm/sn/iograph.h>
#include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h>
#include <asm/sn/io.h>
......
......@@ -11,7 +11,6 @@
#include <asm/sn/types.h>
#include <asm/sn/sgi.h>
#include <asm/sn/driver.h>
#include <asm/sn/iograph.h>
#include <asm/param.h>
#include <asm/sn/pio.h>
#include <asm/sn/xtalk/xwidget.h>
......
......@@ -16,7 +16,6 @@
#include <asm/delay.h>
#include <asm/sn/sgi.h>
#include <asm/sn/io.h>
#include <asm/sn/iograph.h>
#include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h>
#include <asm/sn/sn_private.h>
......
......@@ -11,7 +11,6 @@
#include <asm/errno.h>
#include <asm/sn/sgi.h>
#include <asm/sn/driver.h>
#include <asm/sn/iograph.h>
#include <asm/sn/hcl.h>
#include <asm/sn/labelcl.h>
#include <asm/sn/xtalk/xtalk.h>
......
......@@ -18,7 +18,6 @@
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/sn/sgi.h>
#include <asm/sn/iograph.h>
#include <asm/sn/hcl.h>
#include <asm/sn/types.h>
#include <asm/sn/pci/pciio.h>
......
......@@ -85,6 +85,7 @@ int numionodes;
u64 master_node_bedrock_address;
static void sn_init_pdas(char **);
static void scan_for_ionodes(void);
static nodepda_t *nodepdaindr[MAX_COMPACT_NODES];
......@@ -131,7 +132,7 @@ char drive_info[4*16];
* may not be initialized yet.
*/
static int
static int __init
pxm_to_nasid(int pxm)
{
int i;
......@@ -358,11 +359,10 @@ sn_setup(char **cmdline_p)
*
* One time setup for Node Data Area. Called by sn_setup().
*/
void
void __init
sn_init_pdas(char **cmdline_p)
{
cnodeid_t cnode;
void scan_for_ionodes(void);
/*
* Make sure that the PDA fits entirely in the same page as the
......@@ -498,7 +498,7 @@ sn_cpu_init(void)
* physical_node_map and the pda and increment numionodes.
*/
void
static void __init
scan_for_ionodes(void)
{
int nasid = 0;
......
#ifndef ASM_IA64_CYCLONE_H
#define ASM_IA64_CYCLONE_H
#ifdef CONFIG_IA64_CYCLONE
extern int use_cyclone;
extern int __init cyclone_setup(char*);
#else /* CONFIG_IA64_CYCLONE */
#define use_cyclone 0
static inline void cyclone_setup(char* s)
{
printk(KERN_ERR "Cyclone Counter: System not configured"
" w/ CONFIG_IA64_CYCLONE.\n");
}
#endif /* CONFIG_IA64_CYCLONE */
#endif /* !ASM_IA64_CYCLONE_H */
......@@ -97,6 +97,8 @@ struct pci_controller {
unsigned int windows;
struct pci_window *window;
void *platform_data;
};
#define PCI_CONTROLLER(busdev) ((struct pci_controller *) busdev->sysdata)
......
......@@ -24,17 +24,16 @@
#define _ASM_IA64_SN_CLKSUPPORT_H
#include <asm/sn/arch.h>
#include <asm/sn/addrs.h>
#include <asm/sn/sn2/addrs.h>
#include <asm/sn/sn2/shubio.h>
#include <asm/sn/sn2/shub_mmr.h>
typedef long clkreg_t;
extern unsigned long sn_rtc_cycles_per_second;
extern unsigned long sn_rtc_per_itc;
#include <asm/sn/addrs.h>
#include <asm/sn/sn2/addrs.h>
#include <asm/sn/sn2/shubio.h>
#include <asm/sn/sn2/shub_mmr.h>
#define RTC_MASK SH_RTC_MASK
#define RTC_COUNTER_ADDR ((clkreg_t*)LOCAL_MMR_ADDR(SH_RTC))
#define RTC_COMPARE_A_ADDR ((clkreg_t*)LOCAL_MMR_ADDR(SH_RTC))
......
......@@ -8,12 +8,6 @@
#ifndef _ASM_IA64_SN_DMAMAP_H
#define _ASM_IA64_SN_DMAMAP_H
#include <asm/sn/types.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions for allocating, freeing, and using DMA maps
*/
......@@ -43,10 +37,6 @@ typedef struct dmamap {
unsigned long dma_virtaddr; /* Beginning virtual address that is mapped */
} dmamap_t;
#ifdef __cplusplus
}
#endif
/* standard flags values for pio_map routines,
* including {xtalk,pciio}_dmamap calls.
* NOTE: try to keep these in step with PIOMAP flags.
......
......@@ -23,10 +23,6 @@ typedef struct device_driver_s *device_driver_t;
/* == Driver thread priority support == */
typedef int ilvl_t;
#ifdef __cplusplus
extern "C" {
#endif
struct eframe_s;
struct piomap;
struct dmamap;
......
......@@ -8,7 +8,6 @@
#ifndef _ASM_IA64_SN_INTR_H
#define _ASM_IA64_SN_INTR_H
#include <linux/config.h>
#include <asm/sn/sn2/intr.h>
extern void sn_send_IPI_phys(long, int, int);
......
......@@ -9,8 +9,6 @@
#ifndef _ASM_IA64_SN_IO_H
#define _ASM_IA64_SN_IO_H
#include <linux/config.h>
#include <asm/sn/addrs.h>
/* Because we only have PCI I/O ports. */
......
This diff is collapsed.
......@@ -20,7 +20,7 @@ struct ioconfig_parm {
void *buffer;
};
struct ascii_moduleid{
struct ascii_moduleid {
unsigned char io_moduleid[8]; /* pci path name */
};
......
......@@ -11,7 +11,7 @@
#include <linux/types.h>
#include <asm/sn/sgi.h>
#if __KERNEL__
#ifdef __KERNEL__
/*
* Basic types required for io error handling interfaces.
......@@ -155,88 +155,5 @@ enum error_class_e {
ERROR_CLASS_BAD_RESP_PKT
};
typedef uint64_t error_class_t;
/*
* Error context which the error action can use.
*/
typedef void *error_context_t;
#define ERROR_CONTEXT_IGNORE ((error_context_t)-1ll)
/*
* Error action type.
*/
typedef error_return_code_t (*error_action_f)( error_context_t);
#define ERROR_ACTION_IGNORE ((error_action_f)-1ll)
/* Typical set of error actions */
typedef struct error_action_set_s {
error_action_f eas_panic;
error_action_f eas_shutdown;
error_action_f eas_abort;
error_action_f eas_retry;
error_action_f eas_failover;
error_action_f eas_log_n_ignore;
error_action_f eas_reset;
} error_action_set_t;
/* Set of priorites for in case mutliple error actions/states
* are trying to be prescribed for a device.
* NOTE : The ordering below encapsulates the priorities. Highest value
* corresponds to highest priority.
*/
enum error_priority_e {
ERROR_PRIORITY_IGNORE,
ERROR_PRIORITY_NONE,
ERROR_PRIORITY_NORMAL,
ERROR_PRIORITY_LOG,
ERROR_PRIORITY_FAILOVER,
ERROR_PRIORITY_RETRY,
ERROR_PRIORITY_ABORT,
ERROR_PRIORITY_SHUTDOWN,
ERROR_PRIORITY_RESTART,
ERROR_PRIORITY_PANIC
};
typedef uint64_t error_priority_t;
/* Error action interfaces */
extern error_return_code_t error_action_set(vertex_hdl_t,
error_action_f,
error_context_t,
error_priority_t);
extern error_return_code_t error_action_perform(vertex_hdl_t);
#define INFO_LBL_ERROR_SKIP_ENV "error_skip_env"
#define v_error_skip_env_get(v, l) \
hwgraph_info_get_LBL(v, INFO_LBL_ERROR_SKIP_ENV, (arbitrary_info_t *)&l)
#define v_error_skip_env_set(v, l, r) \
(r ? \
hwgraph_info_replace_LBL(v, INFO_LBL_ERROR_SKIP_ENV, (arbitrary_info_t)l,0) :\
hwgraph_info_add_LBL(v, INFO_LBL_ERROR_SKIP_ENV, (arbitrary_info_t)l))
#define v_error_skip_env_clear(v) \
hwgraph_info_remove_LBL(v, INFO_LBL_ERROR_SKIP_ENV, 0)
typedef uint64_t counter_t;
extern counter_t error_retry_count_get(vertex_hdl_t);
extern error_return_code_t error_retry_count_set(vertex_hdl_t,counter_t);
extern counter_t error_retry_count_increment(vertex_hdl_t);
extern counter_t error_retry_count_decrement(vertex_hdl_t);
/* Except for the PIO Read error typically the other errors are handled in
* the context of an asynchronous error interrupt.
*/
#define IS_ERROR_INTR_CONTEXT(_ec) ((_ec & IOECODE_DMA) || \
(_ec == IOECODE_PIO_WRITE))
#endif /* __KERNEL__ */
#endif /* _ASM_IA64_SN_IOERROR_HANDLING_H */
......@@ -8,6 +8,8 @@
#ifndef _ASM_IA64_SN_IOGRAPH_H
#define _ASM_IA64_SN_IOGRAPH_H
#include <asm/sn/xtalk/xbow.h> /* For get MAX_PORT_NUM */
/*
* During initialization, platform-dependent kernel code establishes some
* basic elements of the hardware graph. This file contains edge and
......@@ -115,40 +117,13 @@
#define INFO_LBL_XSWITCH_VOL "_xswitch_volunteer"
#define INFO_LBL_XFUNCS "_xtalk_ops" /* ops vector for gio providers */
#define INFO_LBL_XWIDGET "_xwidget"
/* Device/Driver Admin directive labels */
#define ADMIN_LBL_INTR_TARGET "INTR_TARGET" /* Target cpu for device interrupts*/
#define ADMIN_LBL_INTR_SWLEVEL "INTR_SWLEVEL" /* Priority level of the ithread */
#define ADMIN_LBL_DMATRANS_NODE "PCIBUS_DMATRANS_NODE" /* Node used for
* 32-bit Direct
* Mapping I/O
*/
#define ADMIN_LBL_DISABLED "DISABLE" /* Device has been disabled */
#define ADMIN_LBL_DETACH "DETACH" /* Device has been detached */
#define ADMIN_LBL_THREAD_PRI "thread_priority"
/* Driver adminstrator
* hint parameter for
* thread priority
*/
#define ADMIN_LBL_THREAD_CLASS "thread_class"
/* Driver adminstrator
* hint parameter for
* thread priority
* default class
*/
/* Info labels that begin with '_' cannot be overwritten by an attr_set call */
#define INFO_LBL_RESERVED(name) ((name)[0] == '_')
#if defined(__KERNEL__)
#ifdef __KERNEL__
void init_all_devices(void);
#endif /* __KERNEL__ */
#include <asm/sn/sgi.h>
#include <asm/sn/xtalk/xbow.h> /* For get MAX_PORT_NUM */
int io_brick_map_widget(int, int);
int io_path_map_widget(vertex_hdl_t);
/*
* Map a brick's widget number to a meaningful int
......@@ -159,5 +134,4 @@ struct io_brick_map_s {
int ibm_map_wid[MAX_PORT_NUM]; /* wid to int map */
};
#endif /* _ASM_IA64_SN_IOGRAPH_H */
......@@ -8,10 +8,7 @@
* Copyright (C) 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
#include <linux/config.h>
#include <asm/smp.h>
#include <asm/sn/addrs.h>
#include <asm/sn/sn_cpuid.h>
#include <asm/sn/pda.h>
#include <asm/sn/sn2/shub.h>
......@@ -23,7 +20,7 @@
#define LED_ALWAYS_SET 0x00
/*
* Basic macros for flashing the LEDS on an SGI, SN1.
* Basic macros for flashing the LEDS on an SGI SN.
*/
static __inline__ void
......
......@@ -8,12 +8,6 @@
#ifndef _ASM_IA64_SN_MODULE_H
#define _ASM_IA64_SN_MODULE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <asm/semaphore.h>
#include <asm/sn/klconfig.h>
#include <asm/sn/ksys/elsc.h>
......
......@@ -31,14 +31,15 @@
#define MAX_PCI_XWIDGET 256
#define MAX_ATE_MAPS 1024
#define SN_DEVICE_SYSDATA(dev) \
((struct sn_device_sysdata *) \
(((struct pci_controller *) ((dev)->sysdata))->platform_data))
#define IS_PCI32G(dev) ((dev)->dma_mask >= 0xffffffff)
#define IS_PCI32L(dev) ((dev)->dma_mask < 0xffffffff)
#define PCIDEV_VERTEX(pci_dev) \
(((struct sn_device_sysdata *)((pci_dev)->sysdata))->vhdl)
#define PCIBUS_VERTEX(pci_bus) \
(((struct sn_widget_sysdata *)((pci_bus)->sysdata))->vhdl)
((SN_DEVICE_SYSDATA(pci_dev))->vhdl)
struct sn_widget_sysdata {
vertex_hdl_t vhdl;
......@@ -47,6 +48,9 @@ struct sn_widget_sysdata {
struct sn_device_sysdata {
vertex_hdl_t vhdl;
pciio_provider_t *pci_provider;
pciio_intr_t intr_handle;
struct sn_flush_device_list *dma_flush_list;
pciio_piomap_t pio_map[PCI_ROM_RESOURCE];
};
struct ioports_to_tlbs_s {
......
......@@ -13,7 +13,6 @@
#include <linux/config.h>
#include <asm/sn/types.h>
#include <asm/uaccess.h> /* for copy_??_user */
#include <asm/sn/hwgfs.h>
typedef hwgfs_handle_t vertex_hdl_t;
......
......@@ -11,6 +11,7 @@
#include <linux/wait.h>
#include <asm/sn/nodepda.h>
#include <asm/sn/io.h>
#include <asm/sn/iograph.h>
#include <asm/sn/xtalk/xwidget.h>
#include <asm/sn/xtalk/xtalk_private.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