Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e8577a89
Commit
e8577a89
authored
Jan 18, 2004
by
Andrew Morton
Committed by
Linus Torvalds
Jan 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sn: General xtalk.c clean up
From: Pat Gefre <pfg@sgi.com> General xtalk.c clean up
parent
09bf9e5e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
75 deletions
+37
-75
arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c
arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c
+0
-12
arch/ia64/sn/io/sn2/pciio.c
arch/ia64/sn/io/sn2/pciio.c
+0
-12
arch/ia64/sn/io/sn2/pic.c
arch/ia64/sn/io/sn2/pic.c
+0
-1
arch/ia64/sn/io/sn2/xtalk.c
arch/ia64/sn/io/sn2/xtalk.c
+36
-39
include/asm-ia64/sn/pci/pcibr.h
include/asm-ia64/sn/pci/pcibr.h
+1
-1
include/asm-ia64/sn/pci/pciio.h
include/asm-ia64/sn/pci/pciio.h
+0
-5
include/asm-ia64/sn/sn2/shubio.h
include/asm-ia64/sn/sn2/shubio.h
+0
-1
include/asm-ia64/sn/xtalk/xtalk.h
include/asm-ia64/sn/xtalk/xtalk.h
+0
-4
No files found.
arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c
View file @
e8577a89
...
...
@@ -3782,20 +3782,8 @@ pciio_provider_t pcibr_provider =
(
pciio_driver_reg_callback_f
*
)
0
,
(
pciio_driver_unreg_callback_f
*
)
0
,
(
pciio_device_unregister_f
*
)
pcibr_device_unregister
,
(
pciio_dma_enabled_f
*
)
pcibr_dma_enabled
,
};
int
pcibr_dma_enabled
(
vertex_hdl_t
pconn_vhdl
)
{
pciio_info_t
pciio_info
=
pciio_info_get
(
pconn_vhdl
);
pcibr_soft_t
pcibr_soft
=
(
pcibr_soft_t
)
pciio_info_mfast_get
(
pciio_info
);
return
xtalk_dma_enabled
(
pcibr_soft
->
bs_conn
);
}
/*
* pcibr_debug() is used to print pcibr debug messages to the console. A
* user enables tracing by setting the following global variables:
...
...
arch/ia64/sn/io/sn2/pciio.c
View file @
e8577a89
...
...
@@ -90,12 +90,6 @@ get_master_baseio_nasid(void)
return
master_baseio_nasid
;
}
int
hub_dma_enabled
(
vertex_hdl_t
xconn_vhdl
)
{
return
(
0
);
}
int
hub_error_devenable
(
vertex_hdl_t
xconn_vhdl
,
int
devnum
,
int
error_code
)
{
...
...
@@ -1389,12 +1383,6 @@ pciio_slot_inuse(vertex_hdl_t pconn_vhdl)
return
0
;
}
int
pciio_dma_enabled
(
vertex_hdl_t
pconn_vhdl
)
{
return
DEV_FUNC
(
pconn_vhdl
,
dma_enabled
)(
pconn_vhdl
);
}
int
pciio_info_type1_get
(
pciio_info_t
pci_info
)
{
...
...
arch/ia64/sn/io/sn2/pic.c
View file @
e8577a89
...
...
@@ -272,5 +272,4 @@ pciio_provider_t pci_pic_provider =
(
pciio_driver_reg_callback_f
*
)
pcibr_driver_reg_callback
,
(
pciio_driver_unreg_callback_f
*
)
pcibr_driver_unreg_callback
,
(
pciio_device_unregister_f
*
)
pcibr_device_unregister
,
(
pciio_dma_enabled_f
*
)
pcibr_dma_enabled
,
};
arch/ia64/sn/io/sn2/xtalk.c
View file @
e8577a89
...
...
@@ -21,9 +21,9 @@
#include <asm/sn/xtalk/xtalk_private.h>
/*
* Implement
crosstalk
provider operations. The xtalk* layer provides a
* platform-independent interface for
crosstalk
devices. This layer
* switches among the possible implementations of a
crosstalk
adapter.
* Implement
io channel
provider operations. The xtalk* layer provides a
* platform-independent interface for
io channel
devices. This layer
* switches among the possible implementations of a
io channel
adapter.
*
* On platforms with only one possible xtalk provider, macros can be
* set up at the top that cause the table lookups and indirections to
...
...
@@ -35,11 +35,6 @@
char
widget_info_fingerprint
[]
=
"widget_info"
;
#define DEV_FUNC(dev,func) hub_##func
#define CAST_PIOMAP(x) ((hub_piomap_t)(x))
#define CAST_DMAMAP(x) ((hub_dmamap_t)(x))
#define CAST_INTR(x) ((hub_intr_t)(x))
/* =====================================================================
* Function Table of Contents
*/
...
...
@@ -119,6 +114,7 @@ char *xwidget_name_get(vertex_hdl_t);
#define CAST_PIOMAP(x) ((xtalk_piomap_t)(x))
#define CAST_DMAMAP(x) ((xtalk_dmamap_t)(x))
#define CAST_INTR(x) ((xtalk_intr_t)(x))
xtalk_provider_t
*
xwidget_info_pops_get
(
xwidget_info_t
info
);
static
xtalk_provider_t
*
xwidget_to_provider_fns
(
vertex_hdl_t
xconn
)
...
...
@@ -134,6 +130,17 @@ xwidget_to_provider_fns(vertex_hdl_t xconn)
return
(
provider_fns
);
}
xtalk_provider_t
*
xwidget_info_pops_get
(
xwidget_info_t
info
)
{
vertex_hdl_t
master
=
info
->
w_master
;
xtalk_provider_t
*
provider_fns
;
provider_fns
=
xtalk_provider_fns_get
(
master
);
ASSERT
(
provider_fns
!=
NULL
);
return
provider_fns
;
}
#endif
/*
...
...
@@ -271,13 +278,13 @@ xtalk_set_early_piotrans_addr(xtalk_early_piotrans_addr_f *impl)
}
/* xtalk_early_piotrans_addr:
* figure out a PIO address for the "nth"
crosstalk
widget that
* figure out a PIO address for the "nth"
io channel
widget that
* matches the specified part and mfgr number. Returns NULL if
* there is no such widget, or if the requested mapping can not
* be constructed.
* Limitations on which
crosstalk
slots (and busses) are
* Limitations on which
io channel
slots (and busses) are
* checked, and definitions of the ordering of the search across
* the
crosstalk
slots, are defined by the platform.
* the
io channel
slots, are defined by the platform.
*/
caddr_t
xtalk_early_piotrans_addr
(
xwidget_part_num_t
part_num
,
...
...
@@ -316,7 +323,7 @@ null_xtalk_early_piotrans_addr(xwidget_part_num_t part_num,
/* =====================================================================
* DMA MANAGEMENT
*
* For mapping from
crosstalk
space to system
* For mapping from
io channel
space to system
* physical space.
*/
...
...
@@ -413,7 +420,7 @@ xtalk_dmalist_drain(vertex_hdl_t dev, alenlist_t list)
/* =====================================================================
* INTERRUPT MANAGEMENT
*
* Allow
crosstalk
devices to establish interrupts
* Allow
io channel
devices to establish interrupts
*/
/*
...
...
@@ -508,8 +515,8 @@ xtalk_intr_cpu_get(xtalk_intr_t intr_hdl)
* This routine plays two roles during error delivery
* to most widgets: first, the external agent (heart,
* hub, or whatever) calls in with the error and the
* connect point representing the
crosstalk
switch,
* or whatever
crosstalk
device is directly connected
* connect point representing the
io channel
switch,
* or whatever
io channel
device is directly connected
* to the agent.
*
* If there is a switch, it will generally look at the
...
...
@@ -526,6 +533,8 @@ xtalk_error_handler(
ioerror_t
*
ioerror
)
{
xwidget_info_t
xwidget_info
;
char
name
[
MAXDEVNAME
];
xwidget_info
=
xwidget_info_get
(
xconn
);
/* Make sure that xwidget_info is a valid pointer before derefencing it.
...
...
@@ -546,12 +555,7 @@ xtalk_error_handler(
(
mode
==
MODE_DEVREENABLE
))
return
IOERROR_HANDLED
;
#if defined(SUPPORT_PRINTING_V_FORMAT)
printk
(
KERN_WARNING
"Xbow at %v encountered Fatal error"
,
xconn
);
#else
printk
(
KERN_WARNING
"Xbow at 0x%p encountered Fatal error"
,
(
void
*
)
xconn
);
#endif
ioerror_dump
(
"xtalk"
,
error_code
,
mode
,
ioerror
);
printk
(
KERN_WARNING
"Xbow at %s encountered Fatal error"
,
vertex_to_name
(
xconn
,
name
,
MAXDEVNAME
));
return
IOERROR_UNHANDLED
;
}
...
...
@@ -568,24 +572,22 @@ xtalk_error_devenable(vertex_hdl_t xconn_vhdl, int devnum, int error_code)
*/
/*
* Startup a
crosstalk
provider
* Startup a
n io channel
provider
*/
void
xtalk_provider_startup
(
vertex_hdl_t
xtalk_provider
)
{
DEV_FUNC
(
xtalk_provider
,
provider_startup
)
(
xtalk_provider
);
((
xtalk_provider_t
*
)
hwgraph_fastinfo_get
(
xtalk_provider
))
->
provider_startup
(
xtalk_provider
);
}
/*
* Shutdown a
crosstalk
provider
* Shutdown a
n io channel
provider
*/
void
xtalk_provider_shutdown
(
vertex_hdl_t
xtalk_provider
)
{
DEV_FUNC
(
xtalk_provider
,
provider_shutdown
)
(
xtalk_provider
);
((
xtalk_provider_t
*
)
hwgraph_fastinfo_get
(
xtalk_provider
))
->
provider_shutdown
(
xtalk_provider
);
}
/*
...
...
@@ -606,17 +608,12 @@ xtalk_widgetdev_shutdown(vertex_hdl_t xconn_vhdl, int devnum)
return
;
}
int
xtalk_dma_enabled
(
vertex_hdl_t
xconn_vhdl
)
{
return
DEV_FUNC
(
xconn_vhdl
,
dma_enabled
)
(
xconn_vhdl
);
}
/*
* Generic
crosstalk functions, for use with all crosstalk
providers
* and all
crosstalk
devices.
* Generic
io channel functions, for use with all io channel
providers
* and all
io channel
devices.
*/
/*
***** Generic crosstalk interrupt interfaces *****
*/
/*
Generic io channel interrupt interfaces
*/
vertex_hdl_t
xtalk_intr_dev_get
(
xtalk_intr_t
xtalk_intr
)
{
...
...
@@ -647,7 +644,7 @@ xtalk_intr_sfarg_get(xtalk_intr_t xtalk_intr)
return
(
xtalk_intr
->
xi_sfarg
);
}
/*
***** Generic crosstalk pio interfaces *****
*/
/*
Generic io channel pio interfaces
*/
vertex_hdl_t
xtalk_pio_dev_get
(
xtalk_piomap_t
xtalk_piomap
)
{
...
...
@@ -679,7 +676,7 @@ xtalk_pio_kvaddr_get(xtalk_piomap_t xtalk_piomap)
}
/*
***** Generic crosstalk dma interfaces *****
*/
/*
Generic io channel dma interfaces
*/
vertex_hdl_t
xtalk_dma_dev_get
(
xtalk_dmamap_t
xtalk_dmamap
)
{
...
...
@@ -693,7 +690,7 @@ xtalk_dma_target_get(xtalk_dmamap_t xtalk_dmamap)
}
/*
***** Generic crosstalk widget information interfaces *****
*/
/*
Generic io channel widget information interfaces
*/
/* xwidget_info_chk:
* check to see if this vertex is a widget;
...
...
@@ -795,7 +792,7 @@ xwidget_info_name_get(xwidget_info_t xwidget_info)
panic
(
"xwidget_info_name_get: null xwidget_info"
);
return
(
xwidget_info
->
w_name
);
}
/*
***** Generic crosstalk initialization interfaces *****
*/
/*
Generic io channel initialization interfaces
*/
/*
* Associate a set of xtalk_provider functions with a vertex.
...
...
include/asm-ia64/sn/pci/pcibr.h
View file @
e8577a89
...
...
@@ -237,7 +237,7 @@ void pcibr_set_rrb_callback(vertex_hdl_t xconn_vhdl,
rrb_alloc_funct_f
*
func
);
extern
int
pcibr_device_unregister
(
vertex_hdl_t
);
extern
int
pcibr_dma_enabled
(
vertex_hdl_t
);
/*
* Bridge-specific flags that can be set via pcibr_device_flags_set
* and cleared via pcibr_device_flags_clear. Other flags are
...
...
include/asm-ia64/sn/pci/pciio.h
View file @
e8577a89
...
...
@@ -451,9 +451,6 @@ pciio_driver_unreg_callback_f (vertex_hdl_t conn, /* pci connection point */
typedef
int
pciio_device_unregister_f
(
vertex_hdl_t
conn
);
typedef
int
pciio_dma_enabled_f
(
vertex_hdl_t
conn
);
/*
* Adapters that provide a PCI interface adhere to this software interface.
*/
...
...
@@ -502,7 +499,6 @@ typedef struct pciio_provider_s {
pciio_driver_reg_callback_f
*
driver_reg_callback
;
pciio_driver_unreg_callback_f
*
driver_unreg_callback
;
pciio_device_unregister_f
*
device_unregister
;
pciio_dma_enabled_f
*
dma_enabled
;
}
pciio_provider_t
;
/* PCI devices use these standard PCI provider interfaces */
...
...
@@ -702,7 +698,6 @@ extern iopaddr_t pciio_info_rom_base_get(pciio_info_t);
extern
size_t
pciio_info_rom_size_get
(
pciio_info_t
);
extern
int
pciio_info_type1_get
(
pciio_info_t
);
extern
int
pciio_error_handler
(
vertex_hdl_t
,
int
,
ioerror_mode_t
,
ioerror_t
*
);
extern
int
pciio_dma_enabled
(
vertex_hdl_t
);
/**
* sn_pci_set_vchan - Set the requested Virtual Channel bits into the mapped DMA
...
...
include/asm-ia64/sn/sn2/shubio.h
View file @
e8577a89
...
...
@@ -3626,7 +3626,6 @@ extern int hub_ioerror_handler(vertex_hdl_t, int, int, struct io_error_s *);
extern
int
kl_ioerror_handler
(
cnodeid_t
,
cnodeid_t
,
cpuid_t
,
int
,
paddr_t
,
caddr_t
,
ioerror_mode_t
);
extern
int
hub_error_devenable
(
vertex_hdl_t
,
int
,
int
);
extern
int
hub_dma_enabled
(
vertex_hdl_t
);
#endif
/* __ASSEMBLY__ */
#endif
/* _KERNEL */
...
...
include/asm-ia64/sn/xtalk/xtalk.h
View file @
e8577a89
...
...
@@ -234,9 +234,6 @@ xtalk_widgetdev_enable_f (vertex_hdl_t, int);
typedef
void
xtalk_widgetdev_shutdown_f
(
vertex_hdl_t
,
int
);
typedef
int
xtalk_dma_enabled_f
(
vertex_hdl_t
);
/* Error Management */
typedef
int
...
...
@@ -317,7 +314,6 @@ extern xtalk_provider_startup_f xtalk_provider_startup;
extern
xtalk_provider_shutdown_f
xtalk_provider_shutdown
;
extern
xtalk_widgetdev_enable_f
xtalk_widgetdev_enable
;
extern
xtalk_widgetdev_shutdown_f
xtalk_widgetdev_shutdown
;
extern
xtalk_dma_enabled_f
xtalk_dma_enabled
;
extern
xtalk_error_devenable_f
xtalk_error_devenable
;
extern
xtalk_early_piotrans_addr_f
xtalk_early_piotrans_addr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment