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
Kirill Smelkov
linux
Commits
3c794096
Commit
3c794096
authored
Nov 02, 2002
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save and restore CIA window configuration data.
parent
0fc1896d
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
115 additions
and
57 deletions
+115
-57
arch/alpha/kernel/core_cia.c
arch/alpha/kernel/core_cia.c
+47
-0
arch/alpha/kernel/core_titan.c
arch/alpha/kernel/core_titan.c
+28
-26
arch/alpha/kernel/core_tsunami.c
arch/alpha/kernel/core_tsunami.c
+27
-26
arch/alpha/kernel/proto.h
arch/alpha/kernel/proto.h
+1
-0
arch/alpha/kernel/sys_alcor.c
arch/alpha/kernel/sys_alcor.c
+2
-0
arch/alpha/kernel/sys_cabriolet.c
arch/alpha/kernel/sys_cabriolet.c
+3
-1
arch/alpha/kernel/sys_miata.c
arch/alpha/kernel/sys_miata.c
+2
-0
arch/alpha/kernel/sys_mikasa.c
arch/alpha/kernel/sys_mikasa.c
+1
-1
arch/alpha/kernel/sys_noritake.c
arch/alpha/kernel/sys_noritake.c
+1
-1
arch/alpha/kernel/sys_ruffian.c
arch/alpha/kernel/sys_ruffian.c
+1
-0
arch/alpha/kernel/sys_sx164.c
arch/alpha/kernel/sys_sx164.c
+1
-1
arch/alpha/kernel/sys_takara.c
arch/alpha/kernel/sys_takara.c
+1
-1
No files found.
arch/alpha/kernel/core_cia.c
View file @
3c794096
...
...
@@ -47,6 +47,15 @@
#define vip volatile int *
/* Save CIA configuration data as the console had it set up. */
struct
{
unsigned
int
w_base
;
unsigned
int
w_mask
;
unsigned
int
t_base
;
}
saved_config
[
4
]
__attribute
((
common
));
/*
* Given a bus, device, and function number, compute resulting
* configuration space address. It is therefore not safe to have
...
...
@@ -648,6 +657,24 @@ do_init_arch(int is_pyxis)
hose
->
dense_io_base
=
CIA_BW_IO
-
IDENT_ADDR
;
}
/* Save CIA configuration data as the console had it set up. */
saved_config
[
0
].
w_base
=
*
(
vip
)
CIA_IOC_PCI_W0_BASE
;
saved_config
[
0
].
w_mask
=
*
(
vip
)
CIA_IOC_PCI_W0_MASK
;
saved_config
[
0
].
t_base
=
*
(
vip
)
CIA_IOC_PCI_T0_BASE
;
saved_config
[
1
].
w_base
=
*
(
vip
)
CIA_IOC_PCI_W1_BASE
;
saved_config
[
1
].
w_mask
=
*
(
vip
)
CIA_IOC_PCI_W1_MASK
;
saved_config
[
1
].
t_base
=
*
(
vip
)
CIA_IOC_PCI_T1_BASE
;
saved_config
[
2
].
w_base
=
*
(
vip
)
CIA_IOC_PCI_W2_BASE
;
saved_config
[
2
].
w_mask
=
*
(
vip
)
CIA_IOC_PCI_W2_MASK
;
saved_config
[
2
].
t_base
=
*
(
vip
)
CIA_IOC_PCI_T2_BASE
;
saved_config
[
3
].
w_base
=
*
(
vip
)
CIA_IOC_PCI_W3_BASE
;
saved_config
[
3
].
w_mask
=
*
(
vip
)
CIA_IOC_PCI_W3_MASK
;
saved_config
[
3
].
t_base
=
*
(
vip
)
CIA_IOC_PCI_T3_BASE
;
/*
* Set up the PCI to main memory translation windows.
*
...
...
@@ -736,6 +763,26 @@ pyxis_init_arch(void)
do_init_arch
(
1
);
}
void
cia_kill_arch
(
int
mode
)
{
*
(
vip
)
CIA_IOC_PCI_W0_BASE
=
saved_config
[
0
].
w_base
;
*
(
vip
)
CIA_IOC_PCI_W0_MASK
=
saved_config
[
0
].
w_mask
;
*
(
vip
)
CIA_IOC_PCI_T0_BASE
=
saved_config
[
0
].
t_base
;
*
(
vip
)
CIA_IOC_PCI_W1_BASE
=
saved_config
[
1
].
w_base
;
*
(
vip
)
CIA_IOC_PCI_W1_MASK
=
saved_config
[
1
].
w_mask
;
*
(
vip
)
CIA_IOC_PCI_T1_BASE
=
saved_config
[
1
].
t_base
;
*
(
vip
)
CIA_IOC_PCI_W2_BASE
=
saved_config
[
2
].
w_base
;
*
(
vip
)
CIA_IOC_PCI_W2_MASK
=
saved_config
[
2
].
w_mask
;
*
(
vip
)
CIA_IOC_PCI_T2_BASE
=
saved_config
[
2
].
t_base
;
*
(
vip
)
CIA_IOC_PCI_W3_BASE
=
saved_config
[
3
].
w_base
;
*
(
vip
)
CIA_IOC_PCI_W3_MASK
=
saved_config
[
3
].
w_mask
;
*
(
vip
)
CIA_IOC_PCI_T3_BASE
=
saved_config
[
3
].
t_base
;
}
void
__init
cia_init_pci
(
void
)
{
...
...
arch/alpha/kernel/core_titan.c
View file @
3c794096
...
...
@@ -27,12 +27,14 @@
unsigned
TITAN_agp
=
0
;
static
struct
/* Save Titan configuration data as the console had it set up. */
struct
{
unsigned
long
wsba
[
4
];
unsigned
long
wsm
[
4
];
unsigned
long
tba
[
4
];
}
saved_
pachip_port
[
4
]
;
}
saved_
config
[
4
]
__attribute__
((
common
))
;
/*
* BIOS32-style PCI interface:
...
...
@@ -289,21 +291,21 @@ titan_init_one_pachip_port(titan_pachip_port *port, int index)
* Save the existing PCI window translations. SRM will
* need them when we go to reboot.
*/
saved_
pachip_port
[
index
].
wsba
[
0
]
=
port
->
wsba
[
0
].
csr
;
saved_
pachip_port
[
index
].
wsm
[
0
]
=
port
->
wsm
[
0
].
csr
;
saved_
pachip_port
[
index
].
tba
[
0
]
=
port
->
tba
[
0
].
csr
;
saved_
config
[
index
].
wsba
[
0
]
=
port
->
wsba
[
0
].
csr
;
saved_
config
[
index
].
wsm
[
0
]
=
port
->
wsm
[
0
].
csr
;
saved_
config
[
index
].
tba
[
0
]
=
port
->
tba
[
0
].
csr
;
saved_
pachip_port
[
index
].
wsba
[
1
]
=
port
->
wsba
[
1
].
csr
;
saved_
pachip_port
[
index
].
wsm
[
1
]
=
port
->
wsm
[
1
].
csr
;
saved_
pachip_port
[
index
].
tba
[
1
]
=
port
->
tba
[
1
].
csr
;
saved_
config
[
index
].
wsba
[
1
]
=
port
->
wsba
[
1
].
csr
;
saved_
config
[
index
].
wsm
[
1
]
=
port
->
wsm
[
1
].
csr
;
saved_
config
[
index
].
tba
[
1
]
=
port
->
tba
[
1
].
csr
;
saved_
pachip_port
[
index
].
wsba
[
2
]
=
port
->
wsba
[
2
].
csr
;
saved_
pachip_port
[
index
].
wsm
[
2
]
=
port
->
wsm
[
2
].
csr
;
saved_
pachip_port
[
index
].
tba
[
2
]
=
port
->
tba
[
2
].
csr
;
saved_
config
[
index
].
wsba
[
2
]
=
port
->
wsba
[
2
].
csr
;
saved_
config
[
index
].
wsm
[
2
]
=
port
->
wsm
[
2
].
csr
;
saved_
config
[
index
].
tba
[
2
]
=
port
->
tba
[
2
].
csr
;
saved_
pachip_port
[
index
].
wsba
[
3
]
=
port
->
wsba
[
3
].
csr
;
saved_
pachip_port
[
index
].
wsm
[
3
]
=
port
->
wsm
[
3
].
csr
;
saved_
pachip_port
[
index
].
tba
[
3
]
=
port
->
tba
[
3
].
csr
;
saved_
config
[
index
].
wsba
[
3
]
=
port
->
wsba
[
3
].
csr
;
saved_
config
[
index
].
wsm
[
3
]
=
port
->
wsm
[
3
].
csr
;
saved_
config
[
index
].
tba
[
3
]
=
port
->
tba
[
3
].
csr
;
/*
* Set up the PCI to main memory translation windows.
...
...
@@ -392,21 +394,21 @@ titan_init_arch(void)
static
void
titan_kill_one_pachip_port
(
titan_pachip_port
*
port
,
int
index
)
{
port
->
wsba
[
0
].
csr
=
saved_
pachip_port
[
index
].
wsba
[
0
];
port
->
wsm
[
0
].
csr
=
saved_
pachip_port
[
index
].
wsm
[
0
];
port
->
tba
[
0
].
csr
=
saved_
pachip_port
[
index
].
tba
[
0
];
port
->
wsba
[
0
].
csr
=
saved_
config
[
index
].
wsba
[
0
];
port
->
wsm
[
0
].
csr
=
saved_
config
[
index
].
wsm
[
0
];
port
->
tba
[
0
].
csr
=
saved_
config
[
index
].
tba
[
0
];
port
->
wsba
[
1
].
csr
=
saved_
pachip_port
[
index
].
wsba
[
1
];
port
->
wsm
[
1
].
csr
=
saved_
pachip_port
[
index
].
wsm
[
1
];
port
->
tba
[
1
].
csr
=
saved_
pachip_port
[
index
].
tba
[
1
];
port
->
wsba
[
1
].
csr
=
saved_
config
[
index
].
wsba
[
1
];
port
->
wsm
[
1
].
csr
=
saved_
config
[
index
].
wsm
[
1
];
port
->
tba
[
1
].
csr
=
saved_
config
[
index
].
tba
[
1
];
port
->
wsba
[
2
].
csr
=
saved_
pachip_port
[
index
].
wsba
[
2
];
port
->
wsm
[
2
].
csr
=
saved_
pachip_port
[
index
].
wsm
[
2
];
port
->
tba
[
2
].
csr
=
saved_
pachip_port
[
index
].
tba
[
2
];
port
->
wsba
[
2
].
csr
=
saved_
config
[
index
].
wsba
[
2
];
port
->
wsm
[
2
].
csr
=
saved_
config
[
index
].
wsm
[
2
];
port
->
tba
[
2
].
csr
=
saved_
config
[
index
].
tba
[
2
];
port
->
wsba
[
3
].
csr
=
saved_
pachip_port
[
index
].
wsba
[
3
];
port
->
wsm
[
3
].
csr
=
saved_
pachip_port
[
index
].
wsm
[
3
];
port
->
tba
[
3
].
csr
=
saved_
pachip_port
[
index
].
tba
[
3
];
port
->
wsba
[
3
].
csr
=
saved_
config
[
index
].
wsba
[
3
];
port
->
wsm
[
3
].
csr
=
saved_
config
[
index
].
wsm
[
3
];
port
->
tba
[
3
].
csr
=
saved_
config
[
index
].
tba
[
3
];
}
static
void
...
...
arch/alpha/kernel/core_tsunami.c
View file @
3c794096
...
...
@@ -26,13 +26,14 @@
#include "proto.h"
#include "pci_impl.h"
/* Save Tsunami configuration data as the console had it set up. */
st
atic
st
ruct
struct
{
unsigned
long
wsba
[
4
];
unsigned
long
wsm
[
4
];
unsigned
long
tba
[
4
];
}
saved_
pchip
[
2
]
;
}
saved_
config
[
2
]
__attribute__
((
common
))
;
/*
* NOTE: Herein lie back-to-back mb instructions. They are magic.
...
...
@@ -293,21 +294,21 @@ tsunami_init_one_pchip(tsunami_pchip *pchip, int index)
* need them when we go to reboot.
*/
saved_
pchip
[
index
].
wsba
[
0
]
=
pchip
->
wsba
[
0
].
csr
;
saved_
pchip
[
index
].
wsm
[
0
]
=
pchip
->
wsm
[
0
].
csr
;
saved_
pchip
[
index
].
tba
[
0
]
=
pchip
->
tba
[
0
].
csr
;
saved_
config
[
index
].
wsba
[
0
]
=
pchip
->
wsba
[
0
].
csr
;
saved_
config
[
index
].
wsm
[
0
]
=
pchip
->
wsm
[
0
].
csr
;
saved_
config
[
index
].
tba
[
0
]
=
pchip
->
tba
[
0
].
csr
;
saved_
pchip
[
index
].
wsba
[
1
]
=
pchip
->
wsba
[
1
].
csr
;
saved_
pchip
[
index
].
wsm
[
1
]
=
pchip
->
wsm
[
1
].
csr
;
saved_
pchip
[
index
].
tba
[
1
]
=
pchip
->
tba
[
1
].
csr
;
saved_
config
[
index
].
wsba
[
1
]
=
pchip
->
wsba
[
1
].
csr
;
saved_
config
[
index
].
wsm
[
1
]
=
pchip
->
wsm
[
1
].
csr
;
saved_
config
[
index
].
tba
[
1
]
=
pchip
->
tba
[
1
].
csr
;
saved_
pchip
[
index
].
wsba
[
2
]
=
pchip
->
wsba
[
2
].
csr
;
saved_
pchip
[
index
].
wsm
[
2
]
=
pchip
->
wsm
[
2
].
csr
;
saved_
pchip
[
index
].
tba
[
2
]
=
pchip
->
tba
[
2
].
csr
;
saved_
config
[
index
].
wsba
[
2
]
=
pchip
->
wsba
[
2
].
csr
;
saved_
config
[
index
].
wsm
[
2
]
=
pchip
->
wsm
[
2
].
csr
;
saved_
config
[
index
].
tba
[
2
]
=
pchip
->
tba
[
2
].
csr
;
saved_
pchip
[
index
].
wsba
[
3
]
=
pchip
->
wsba
[
3
].
csr
;
saved_
pchip
[
index
].
wsm
[
3
]
=
pchip
->
wsm
[
3
].
csr
;
saved_
pchip
[
index
].
tba
[
3
]
=
pchip
->
tba
[
3
].
csr
;
saved_
config
[
index
].
wsba
[
3
]
=
pchip
->
wsba
[
3
].
csr
;
saved_
config
[
index
].
wsm
[
3
]
=
pchip
->
wsm
[
3
].
csr
;
saved_
config
[
index
].
tba
[
3
]
=
pchip
->
tba
[
3
].
csr
;
/*
* Set up the PCI to main memory translation windows.
...
...
@@ -403,21 +404,21 @@ tsunami_init_arch(void)
static
void
tsunami_kill_one_pchip
(
tsunami_pchip
*
pchip
,
int
index
)
{
pchip
->
wsba
[
0
].
csr
=
saved_
pchip
[
index
].
wsba
[
0
];
pchip
->
wsm
[
0
].
csr
=
saved_
pchip
[
index
].
wsm
[
0
];
pchip
->
tba
[
0
].
csr
=
saved_
pchip
[
index
].
tba
[
0
];
pchip
->
wsba
[
0
].
csr
=
saved_
config
[
index
].
wsba
[
0
];
pchip
->
wsm
[
0
].
csr
=
saved_
config
[
index
].
wsm
[
0
];
pchip
->
tba
[
0
].
csr
=
saved_
config
[
index
].
tba
[
0
];
pchip
->
wsba
[
1
].
csr
=
saved_
pchip
[
index
].
wsba
[
1
];
pchip
->
wsm
[
1
].
csr
=
saved_
pchip
[
index
].
wsm
[
1
];
pchip
->
tba
[
1
].
csr
=
saved_
pchip
[
index
].
tba
[
1
];
pchip
->
wsba
[
1
].
csr
=
saved_
config
[
index
].
wsba
[
1
];
pchip
->
wsm
[
1
].
csr
=
saved_
config
[
index
].
wsm
[
1
];
pchip
->
tba
[
1
].
csr
=
saved_
config
[
index
].
tba
[
1
];
pchip
->
wsba
[
2
].
csr
=
saved_
pchip
[
index
].
wsba
[
2
];
pchip
->
wsm
[
2
].
csr
=
saved_
pchip
[
index
].
wsm
[
2
];
pchip
->
tba
[
2
].
csr
=
saved_
pchip
[
index
].
tba
[
2
];
pchip
->
wsba
[
2
].
csr
=
saved_
config
[
index
].
wsba
[
2
];
pchip
->
wsm
[
2
].
csr
=
saved_
config
[
index
].
wsm
[
2
];
pchip
->
tba
[
2
].
csr
=
saved_
config
[
index
].
tba
[
2
];
pchip
->
wsba
[
3
].
csr
=
saved_
pchip
[
index
].
wsba
[
3
];
pchip
->
wsm
[
3
].
csr
=
saved_
pchip
[
index
].
wsm
[
3
];
pchip
->
tba
[
3
].
csr
=
saved_
pchip
[
index
].
tba
[
3
];
pchip
->
wsba
[
3
].
csr
=
saved_
config
[
index
].
wsba
[
3
];
pchip
->
wsm
[
3
].
csr
=
saved_
config
[
index
].
wsm
[
3
];
pchip
->
tba
[
3
].
csr
=
saved_
config
[
index
].
tba
[
3
];
}
void
...
...
arch/alpha/kernel/proto.h
View file @
3c794096
...
...
@@ -24,6 +24,7 @@ extern struct pci_ops cia_pci_ops;
extern
void
cia_init_pci
(
void
);
extern
void
cia_init_arch
(
void
);
extern
void
pyxis_init_arch
(
void
);
extern
void
cia_kill_arch
(
int
);
extern
void
cia_machine_check
(
u64
,
u64
,
struct
pt_regs
*
);
extern
void
cia_pci_tbi
(
struct
pci_controller
*
,
dma_addr_t
,
dma_addr_t
);
...
...
arch/alpha/kernel/sys_alcor.c
View file @
3c794096
...
...
@@ -221,6 +221,8 @@ alcor_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
static
void
alcor_kill_arch
(
int
mode
)
{
cia_kill_arch
(
mode
);
switch
(
mode
)
{
case
LINUX_REBOOT_CMD_RESTART
:
/* Who said DEC engineer's have no sense of humor? ;-) */
...
...
arch/alpha/kernel/sys_cabriolet.c
View file @
3c794096
...
...
@@ -338,7 +338,6 @@ struct alpha_machine_vector cabriolet_mv __initmv = {
init_irq:
cabriolet_init_irq
,
init_rtc:
common_init_rtc
,
init_pci:
cabriolet_init_pci
,
kill_arch:
NULL
,
pci_map_irq:
cabriolet_map_irq
,
pci_swizzle:
common_swizzle
,
};
...
...
@@ -366,6 +365,7 @@ struct alpha_machine_vector eb164_mv __initmv = {
init_irq:
cabriolet_init_irq
,
init_rtc:
common_init_rtc
,
init_pci:
cia_cab_init_pci
,
kill_arch:
cia_kill_arch
,
pci_map_irq:
cabriolet_map_irq
,
pci_swizzle:
common_swizzle
,
};
...
...
@@ -417,6 +417,7 @@ struct alpha_machine_vector lx164_mv __initmv = {
init_irq:
cabriolet_init_irq
,
init_rtc:
common_init_rtc
,
init_pci:
alphapc164_init_pci
,
kill_arch:
cia_kill_arch
,
pci_map_irq:
alphapc164_map_irq
,
pci_swizzle:
common_swizzle
,
};
...
...
@@ -442,6 +443,7 @@ struct alpha_machine_vector pc164_mv __initmv = {
init_irq:
pc164_init_irq
,
init_rtc:
common_init_rtc
,
init_pci:
alphapc164_init_pci
,
kill_arch:
cia_kill_arch
,
pci_map_irq:
alphapc164_map_irq
,
pci_swizzle:
common_swizzle
,
};
...
...
arch/alpha/kernel/sys_miata.c
View file @
3c794096
...
...
@@ -238,6 +238,8 @@ miata_init_pci(void)
static
void
miata_kill_arch
(
int
mode
)
{
cia_kill_arch
(
mode
);
switch
(
mode
)
{
case
LINUX_REBOOT_CMD_RESTART
:
/* Who said DEC engineers have no sense of humor? ;-) */
...
...
arch/alpha/kernel/sys_mikasa.c
View file @
3c794096
...
...
@@ -234,7 +234,6 @@ struct alpha_machine_vector mikasa_mv __initmv = {
init_irq:
mikasa_init_irq
,
init_rtc:
common_init_rtc
,
init_pci:
common_init_pci
,
kill_arch:
NULL
,
pci_map_irq:
mikasa_map_irq
,
pci_swizzle:
common_swizzle
,
};
...
...
@@ -260,6 +259,7 @@ struct alpha_machine_vector mikasa_primo_mv __initmv = {
init_irq:
mikasa_init_irq
,
init_rtc:
common_init_rtc
,
init_pci:
cia_init_pci
,
kill_arch:
cia_kill_arch
,
pci_map_irq:
mikasa_map_irq
,
pci_swizzle:
common_swizzle
,
};
...
...
arch/alpha/kernel/sys_noritake.c
View file @
3c794096
...
...
@@ -316,7 +316,6 @@ struct alpha_machine_vector noritake_mv __initmv = {
init_irq:
noritake_init_irq
,
init_rtc:
common_init_rtc
,
init_pci:
common_init_pci
,
kill_arch:
NULL
,
pci_map_irq:
noritake_map_irq
,
pci_swizzle:
noritake_swizzle
,
};
...
...
@@ -342,6 +341,7 @@ struct alpha_machine_vector noritake_primo_mv __initmv = {
init_irq:
noritake_init_irq
,
init_rtc:
common_init_rtc
,
init_pci:
cia_init_pci
,
kill_arch:
cia_kill_arch
,
pci_map_irq:
noritake_map_irq
,
pci_swizzle:
noritake_swizzle
,
};
...
...
arch/alpha/kernel/sys_ruffian.c
View file @
3c794096
...
...
@@ -85,6 +85,7 @@ ruffian_init_rtc(void)
static
void
ruffian_kill_arch
(
int
mode
)
{
cia_kill_arch
(
mode
);
#if 0
/* This only causes re-entry to ARCSBIOS */
/* Perhaps this works for other PYXIS as well? */
...
...
arch/alpha/kernel/sys_sx164.c
View file @
3c794096
...
...
@@ -172,7 +172,7 @@ struct alpha_machine_vector sx164_mv __initmv = {
init_irq:
sx164_init_irq
,
init_rtc:
common_init_rtc
,
init_pci:
sx164_init_pci
,
kill_arch:
NULL
,
kill_arch:
cia_kill_arch
,
pci_map_irq:
sx164_map_irq
,
pci_swizzle:
common_swizzle
,
};
...
...
arch/alpha/kernel/sys_takara.c
View file @
3c794096
...
...
@@ -286,7 +286,7 @@ struct alpha_machine_vector takara_mv __initmv = {
init_irq:
takara_init_irq
,
init_rtc:
common_init_rtc
,
init_pci:
takara_init_pci
,
kill_arch:
NULL
,
kill_arch:
cia_kill_arch
,
pci_map_irq:
takara_map_irq
,
pci_swizzle:
takara_swizzle
,
};
...
...
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