Commit 6a62de5f authored by Martin Hicks's avatar Martin Hicks Committed by David Mosberger

[PATCH] ia64: SN2 header file cleanups

Here is a patch to clean up some of the Altix header files and includes.

I've run the patch past the appropriate people at SGI and they seem happy
with the changes.
parent 4235198e
......@@ -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>
......
......@@ -9,7 +9,6 @@
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <asm/sn/sgi.h>
#include <asm/sn/iograph.h>
#include <asm/sn/pci/pci_bus_cvlink.h>
#include <asm/sn/sn_cpuid.h>
#include <asm/sn/simulator.h>
......
......@@ -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,7 +11,6 @@
#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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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