Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
OpenBMC Firmware
talos-obmc-linux
Commits
c36ad397
Commit
c36ad397
authored
19 years ago
by
Jeff Garzik
Browse files
Options
Download
Plain Diff
Merge /spare/repo/linux-2.6/
parents
c903e41e
99f95e52
Changes
101
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
367 additions
and
362 deletions
+367
-362
Documentation/Changes
Documentation/Changes
+18
-6
Documentation/pcmcia/devicetable.txt
Documentation/pcmcia/devicetable.txt
+64
-0
Documentation/pcmcia/driver-changes.txt
Documentation/pcmcia/driver-changes.txt
+51
-0
arch/sparc64/kernel/auxio.c
arch/sparc64/kernel/auxio.c
+1
-1
arch/sparc64/kernel/entry.S
arch/sparc64/kernel/entry.S
+4
-112
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/irq.c
+50
-121
arch/sparc64/kernel/semaphore.c
arch/sparc64/kernel/semaphore.c
+8
-4
arch/sparc64/kernel/sparc64_ksyms.c
arch/sparc64/kernel/sparc64_ksyms.c
+0
-1
arch/sparc64/kernel/trampoline.S
arch/sparc64/kernel/trampoline.S
+2
-1
arch/sparc64/lib/U1memcpy.S
arch/sparc64/lib/U1memcpy.S
+53
-50
arch/sparc64/lib/VISsave.S
arch/sparc64/lib/VISsave.S
+13
-2
arch/sparc64/lib/atomic.S
arch/sparc64/lib/atomic.S
+26
-16
arch/sparc64/lib/bitops.S
arch/sparc64/lib/bitops.S
+20
-11
arch/sparc64/lib/debuglocks.c
arch/sparc64/lib/debuglocks.c
+4
-2
arch/sparc64/lib/dec_and_lock.S
arch/sparc64/lib/dec_and_lock.S
+4
-2
arch/sparc64/lib/rwsem.S
arch/sparc64/lib/rwsem.S
+10
-5
arch/sparc64/mm/init.c
arch/sparc64/mm/init.c
+4
-2
arch/sparc64/mm/ultra.S
arch/sparc64/mm/ultra.S
+2
-1
drivers/block/cfq-iosched.c
drivers/block/cfq-iosched.c
+24
-25
drivers/bluetooth/bluecard_cs.c
drivers/bluetooth/bluecard_cs.c
+9
-0
No files found.
Documentation/Changes
View file @
c36ad397
...
@@ -44,9 +44,9 @@ running, the suggested command should tell you.
...
@@ -44,9 +44,9 @@ running, the suggested command should tell you.
Again, keep in mind that this list assumes you are already
Again, keep in mind that this list assumes you are already
functionally running a Linux 2.4 kernel. Also, not all tools are
functionally running a Linux 2.4 kernel. Also, not all tools are
necessary on all systems; obviously, if you don't have any
PCMCIA (PC
necessary on all systems; obviously, if you don't have any
ISDN
Card)
hardware, for example, you probably needn't concern yourself
hardware, for example, you probably needn't concern yourself
with
with pcmcia-c
s.
isdn4k-util
s.
o Gnu C 2.95.3 # gcc --version
o Gnu C 2.95.3 # gcc --version
o Gnu make 3.79.1 # make --version
o Gnu make 3.79.1 # make --version
...
@@ -57,6 +57,7 @@ o e2fsprogs 1.29 # tune2fs
...
@@ -57,6 +57,7 @@ o e2fsprogs 1.29 # tune2fs
o jfsutils 1.1.3 # fsck.jfs -V
o jfsutils 1.1.3 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
o xfsprogs 2.6.0 # xfs_db -V
o xfsprogs 2.6.0 # xfs_db -V
o pcmciautils 001
o pcmcia-cs 3.1.21 # cardmgr -V
o pcmcia-cs 3.1.21 # cardmgr -V
o quota-tools 3.09 # quota -V
o quota-tools 3.09 # quota -V
o PPP 2.4.0 # pppd --version
o PPP 2.4.0 # pppd --version
...
@@ -186,13 +187,20 @@ architecture independent and any version from 2.0.0 onward should
...
@@ -186,13 +187,20 @@ architecture independent and any version from 2.0.0 onward should
work correctly with this version of the XFS kernel code (2.6.0 or
work correctly with this version of the XFS kernel code (2.6.0 or
later is recommended, due to some significant improvements).
later is recommended, due to some significant improvements).
PCMCIAutils
-----------
PCMCIAutils replaces pcmcia-cs (see below). It properly sets up
PCMCIA sockets at system startup and loads the appropriate modules
for 16-bit PCMCIA devices if the kernel is modularized and the hotplug
subsystem is used.
Pcmcia-cs
Pcmcia-cs
---------
---------
PCMCIA (PC Card) support is now partially implemented in the main
PCMCIA (PC Card) support is now partially implemented in the main
kernel source.
Pay attention when you recompile your kernel ;-).
kernel source.
The "pcmciautils" package (see above) replaces pcmcia-cs
Also, be sure to upgrade to the latest pcmcia-cs release
.
for newest kernels
.
Quota-tools
Quota-tools
-----------
-----------
...
@@ -349,9 +357,13 @@ Xfsprogs
...
@@ -349,9 +357,13 @@ Xfsprogs
--------
--------
o <ftp://oss.sgi.com/projects/xfs/download/>
o <ftp://oss.sgi.com/projects/xfs/download/>
Pcmciautils
-----------
o <ftp://ftp.kernel.org/pub/linux/utils/kernel/pcmcia/>
Pcmcia-cs
Pcmcia-cs
---------
---------
o <
f
tp://pcmcia-cs.sourceforge.net/
pub/pcmcia-cs/pcmcia-cs-3.1.21.tar.gz
>
o <
ht
tp://pcmcia-cs.sourceforge.net/>
Quota-tools
Quota-tools
----------
----------
...
...
This diff is collapsed.
Click to expand it.
Documentation/pcmcia/devicetable.txt
0 → 100644
View file @
c36ad397
Matching of PCMCIA devices to drivers is done using one or more of the
following criteria:
- manufactor ID
- card ID
- product ID strings _and_ hashes of these strings
- function ID
- device function (actual and pseudo)
You should use the helpers in include/pcmcia/device_id.h for generating the
struct pcmcia_device_id[] entries which match devices to drivers.
If you want to match product ID strings, you also need to pass the crc32
hashes of the string to the macro, e.g. if you want to match the product ID
string 1, you need to use
PCMCIA_DEVICE_PROD_ID1("some_string", 0x(hash_of_some_string)),
If the hash is incorrect, the kernel will inform you about this in "dmesg"
upon module initialization, and tell you of the correct hash.
You can determine the hash of the product ID strings by running
"pcmcia-modalias %n.%m" [%n being replaced with the socket number and %m being
replaced with the device function] from pcmciautils. It generates a string
in the following form:
pcmcia:m0149cC1ABf06pfn00fn00pa725B842DpbF1EFEE84pc0877B627pd00000000
The hex value after "pa" is the hash of product ID string 1, after "pb" for
string 2 and so on.
Alternatively, you can use this small tool to determine the crc32 hash.
simply pass the string you want to evaluate as argument to this program,
e.g.
$ ./crc32hash "Dual Speed"
-------------------------------------------------------------------------
/* crc32hash.c - derived from linux/lib/crc32.c, GNU GPL v2 */
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
unsigned int crc32(unsigned char const *p, unsigned int len)
{
int i;
unsigned int crc = 0;
while (len--) {
crc ^= *p++;
for (i = 0; i < 8; i++)
crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0);
}
return crc;
}
int main(int argc, char **argv) {
unsigned int result;
if (argc != 2) {
printf("no string passed as argument\n");
return -1;
}
result = crc32(argv[1], strlen(argv[1]));
printf("0x%x\n", result);
return 0;
}
This diff is collapsed.
Click to expand it.
Documentation/pcmcia/driver-changes.txt
0 → 100644
View file @
c36ad397
This file details changes in 2.6 which affect PCMCIA card driver authors:
* in-kernel device<->driver matching
PCMCIA devices and their correct drivers can now be matched in
kernelspace. See 'devicetable.txt' for details.
* Device model integration (as of 2.6.11)
A struct pcmcia_device is registered with the device model core,
and can be used (e.g. for SET_NETDEV_DEV) by using
handle_to_dev(client_handle_t * handle).
* Convert internal I/O port addresses to unsigned long (as of 2.6.11)
ioaddr_t should be replaced by kio_addr_t in PCMCIA card drivers.
* irq_mask and irq_list parameters (as of 2.6.11)
The irq_mask and irq_list parameters should no longer be used in
PCMCIA card drivers. Instead, it is the job of the PCMCIA core to
determine which IRQ should be used. Therefore, link->irq.IRQInfo2
is ignored.
* client->PendingEvents is gone (as of 2.6.11)
client->PendingEvents is no longer available.
* client->Attributes are gone (as of 2.6.11)
client->Attributes is unused, therefore it is removed from all
PCMCIA card drivers
* core functions no longer available (as of 2.6.11)
The following functions have been removed from the kernel source
because they are unused by all in-kernel drivers, and no external
driver was reported to rely on them:
pcmcia_get_first_region()
pcmcia_get_next_region()
pcmcia_modify_window()
pcmcia_set_event_mask()
pcmcia_get_first_window()
pcmcia_get_next_window()
* device list iteration upon module removal (as of 2.6.10)
It is no longer necessary to iterate on the driver's internal
client list and call the ->detach() function upon module removal.
* Resource management. (as of 2.6.8)
Although the PCMCIA subsystem will allocate resources for cards,
it no longer marks these resources busy. This means that driver
authors are now responsible for claiming your resources as per
other drivers in Linux. You should use request_region() to mark
your IO regions in-use, and request_mem_region() to mark your
memory regions in-use. The name argument should be a pointer to
your driver name. Eg, for pcnet_cs, name should point to the
string "pcnet_cs".
This diff is collapsed.
Click to expand it.
arch/sparc64/kernel/auxio.c
View file @
c36ad397
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#include <asm/ebus.h>
#include <asm/ebus.h>
#include <asm/auxio.h>
#include <asm/auxio.h>
/* This cannot be static, as it is referenced in
entry.S
*/
/* This cannot be static, as it is referenced in
irq.c
*/
void
__iomem
*
auxio_register
=
NULL
;
void
__iomem
*
auxio_register
=
NULL
;
enum
auxio_type
{
enum
auxio_type
{
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/kernel/entry.S
View file @
c36ad397
...
@@ -271,8 +271,9 @@ cplus_fptrap_insn_1:
...
@@ -271,8 +271,9 @@ cplus_fptrap_insn_1:
fmuld
%f0
,
%f2
,
%f26
fmuld
%f0
,
%f2
,
%f26
faddd
%f0
,
%f2
,
%f28
faddd
%f0
,
%f2
,
%f28
fmuld
%f0
,
%f2
,
%f30
fmuld
%f0
,
%f2
,
%f30
membar
#
Sync
b
,
pt
%
xcc
,
fpdis_exit
b
,
pt
%
xcc
,
fpdis_exit
membar
#
Sync
nop
2
:
andcc
%
g5
,
FPRS_DU
,
%
g0
2
:
andcc
%
g5
,
FPRS_DU
,
%
g0
bne
,
pt
%
icc
,
3
f
bne
,
pt
%
icc
,
3
f
fzero
%f32
fzero
%f32
...
@@ -301,8 +302,9 @@ cplus_fptrap_insn_2:
...
@@ -301,8 +302,9 @@ cplus_fptrap_insn_2:
fmuld
%f32
,
%f34
,
%f58
fmuld
%f32
,
%f34
,
%f58
faddd
%f32
,
%f34
,
%f60
faddd
%f32
,
%f34
,
%f60
fmuld
%f32
,
%f34
,
%f62
fmuld
%f32
,
%f34
,
%f62
membar
#
Sync
ba
,
pt
%
xcc
,
fpdis_exit
ba
,
pt
%
xcc
,
fpdis_exit
membar
#
Sync
nop
3
:
mov
SECONDARY_CONTEXT
,
%
g3
3
:
mov
SECONDARY_CONTEXT
,
%
g3
add
%
g6
,
TI_FPREGS
,
%
g1
add
%
g6
,
TI_FPREGS
,
%
g1
ldxa
[%
g3
]
ASI_DMMU
,
%
g5
ldxa
[%
g3
]
ASI_DMMU
,
%
g5
...
@@ -699,116 +701,6 @@ utrap_ill:
...
@@ -699,116 +701,6 @@ utrap_ill:
ba
,
pt
%
xcc
,
rtrap
ba
,
pt
%
xcc
,
rtrap
clr
%
l6
clr
%
l6
#ifdef CONFIG_BLK_DEV_FD
.
globl
floppy_hardint
floppy_hardint
:
wr
%
g0
,
(
1
<<
11
),
%
clear_softint
sethi
%
hi
(
doing_pdma
),
%
g1
ld
[%
g1
+
%
lo
(
doing_pdma
)],
%
g2
brz
,
pn
%
g2
,
floppy_dosoftint
sethi
%
hi
(
fdc_status
),
%
g3
ldx
[%
g3
+
%
lo
(
fdc_status
)],
%
g3
sethi
%
hi
(
pdma_vaddr
),
%
g5
ldx
[%
g5
+
%
lo
(
pdma_vaddr
)],
%
g4
sethi
%
hi
(
pdma_size
),
%
g5
ldx
[%
g5
+
%
lo
(
pdma_size
)],
%
g5
next_byte
:
lduba
[%
g3
]
ASI_PHYS_BYPASS_EC_E
,
%
g7
andcc
%
g7
,
0x80
,
%
g0
be
,
pn
%
icc
,
floppy_fifo_emptied
andcc
%
g7
,
0x20
,
%
g0
be
,
pn
%
icc
,
floppy_overrun
andcc
%
g7
,
0x40
,
%
g0
be
,
pn
%
icc
,
floppy_write
sub
%
g5
,
1
,
%
g5
inc
%
g3
lduba
[%
g3
]
ASI_PHYS_BYPASS_EC_E
,
%
g7
dec
%
g3
orcc
%
g0
,
%
g5
,
%
g0
stb
%
g7
,
[%
g4
]
bne
,
pn
%
xcc
,
next_byte
add
%
g4
,
1
,
%
g4
b
,
pt
%
xcc
,
floppy_tdone
nop
floppy_write
:
ldub
[%
g4
],
%
g7
orcc
%
g0
,
%
g5
,
%
g0
inc
%
g3
stba
%
g7
,
[%
g3
]
ASI_PHYS_BYPASS_EC_E
dec
%
g3
bne
,
pn
%
xcc
,
next_byte
add
%
g4
,
1
,
%
g4
floppy_tdone
:
sethi
%
hi
(
pdma_vaddr
),
%
g1
stx
%
g4
,
[%
g1
+
%
lo
(
pdma_vaddr
)]
sethi
%
hi
(
pdma_size
),
%
g1
stx
%
g5
,
[%
g1
+
%
lo
(
pdma_size
)]
sethi
%
hi
(
auxio_register
),
%
g1
ldx
[%
g1
+
%
lo
(
auxio_register
)],
%
g7
lduba
[%
g7
]
ASI_PHYS_BYPASS_EC_E
,
%
g5
or
%
g5
,
AUXIO_AUX1_FTCNT
,
%
g5
/*
andn
%
g5
,
AUXIO_AUX1_MASK
,
%
g5
*/
stba
%
g5
,
[%
g7
]
ASI_PHYS_BYPASS_EC_E
andn
%
g5
,
AUXIO_AUX1_FTCNT
,
%
g5
/*
andn
%
g5
,
AUXIO_AUX1_MASK
,
%
g5
*/
nop
; nop; nop; nop; nop; nop;
nop
; nop; nop; nop; nop; nop;
stba
%
g5
,
[%
g7
]
ASI_PHYS_BYPASS_EC_E
sethi
%
hi
(
doing_pdma
),
%
g1
b
,
pt
%
xcc
,
floppy_dosoftint
st
%
g0
,
[%
g1
+
%
lo
(
doing_pdma
)]
floppy_fifo_emptied
:
sethi
%
hi
(
pdma_vaddr
),
%
g1
stx
%
g4
,
[%
g1
+
%
lo
(
pdma_vaddr
)]
sethi
%
hi
(
pdma_size
),
%
g1
stx
%
g5
,
[%
g1
+
%
lo
(
pdma_size
)]
sethi
%
hi
(
irq_action
),
%
g1
or
%
g1
,
%
lo
(
irq_action
),
%
g1
ldx
[%
g1
+
(
11
<<
3
)],
%
g3
!
irqaction
[
floppy_irq
]
ldx
[%
g3
+
0x08
],
%
g4
!
action
->
flags
>>
48
==
ino
sethi
%
hi
(
ivector_table
),
%
g3
srlx
%
g4
,
48
,
%
g4
or
%
g3
,
%
lo
(
ivector_table
),
%
g3
sllx
%
g4
,
5
,
%
g4
ldx
[%
g3
+
%
g4
],
%
g4
!
&
ivector_table
[
ino
]
ldx
[%
g4
+
0x10
],
%
g4
!
bucket
->
iclr
stwa
%
g0
,
[%
g4
]
ASI_PHYS_BYPASS_EC_E
!
ICLR_IDLE
membar
#
Sync
!
probably
not
needed
...
retry
floppy_overrun
:
sethi
%
hi
(
pdma_vaddr
),
%
g1
stx
%
g4
,
[%
g1
+
%
lo
(
pdma_vaddr
)]
sethi
%
hi
(
pdma_size
),
%
g1
stx
%
g5
,
[%
g1
+
%
lo
(
pdma_size
)]
sethi
%
hi
(
doing_pdma
),
%
g1
st
%
g0
,
[%
g1
+
%
lo
(
doing_pdma
)]
floppy_dosoftint
:
rdpr
%
pil
,
%
g2
wrpr
%
g0
,
15
,
%
pil
sethi
%
hi
(
109
f
),
%
g7
b
,
pt
%
xcc
,
etrap_irq
109
:
or
%
g7
,
%
lo
(
109
b
),
%
g7
mov
11
,
%
o0
mov
0
,
%
o1
call
sparc_floppy_irq
add
%
sp
,
PTREGS_OFF
,
%
o2
b
,
pt
%
xcc
,
rtrap_irq
nop
#endif /* CONFIG_BLK_DEV_FD */
/
*
XXX
Here
is
stuff
we
still
need
to
write
...
-
DaveM
XXX
*/
/
*
XXX
Here
is
stuff
we
still
need
to
write
...
-
DaveM
XXX
*/
.
globl
netbsd_syscall
.
globl
netbsd_syscall
netbsd_syscall
:
netbsd_syscall
:
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/kernel/irq.c
View file @
c36ad397
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/cache.h>
#include <asm/cache.h>
#include <asm/cpudata.h>
#include <asm/cpudata.h>
#include <asm/auxio.h>
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
static
void
distribute_irqs
(
void
);
static
void
distribute_irqs
(
void
);
...
@@ -834,137 +835,65 @@ void handler_irq(int irq, struct pt_regs *regs)
...
@@ -834,137 +835,65 @@ void handler_irq(int irq, struct pt_regs *regs)
}
}
#ifdef CONFIG_BLK_DEV_FD
#ifdef CONFIG_BLK_DEV_FD
extern
void
floppy_interrupt
(
int
irq
,
void
*
dev_cookie
,
struct
pt_regs
*
regs
);
extern
irqreturn_t
floppy_interrupt
(
int
,
void
*
,
struct
pt_regs
*
);
;
void
sparc_floppy_irq
(
int
irq
,
void
*
dev_cookie
,
struct
pt_regs
*
regs
)
/* XXX No easy way to include asm/floppy.h XXX */
{
extern
unsigned
char
*
pdma_vaddr
;
struct
irqaction
*
action
=
*
(
irq
+
irq_action
);
extern
unsigned
long
pdma_size
;
struct
ino_bucket
*
bucket
;
extern
volatile
int
doing_pdma
;
int
cpu
=
smp_processor_id
();
extern
unsigned
long
fdc_status
;
irq_enter
();
kstat_this_cpu
.
irqs
[
irq
]
++
;
*
(
irq_work
(
cpu
,
irq
))
=
0
;
bucket
=
get_ino_in_irqaction
(
action
)
+
ivector_table
;
bucket
->
flags
|=
IBF_INPROGRESS
;
floppy_interrupt
(
irq
,
dev_cookie
,
regs
);
upa_writel
(
ICLR_IDLE
,
bucket
->
iclr
);
bucket
->
flags
&=
~
IBF_INPROGRESS
;
irq_exit
();
}
#endif
/* The following assumes that the branch lies before the place we
* are branching to. This is the case for a trap vector...
* You have been warned.
*/
#define SPARC_BRANCH(dest_addr, inst_addr) \
(0x10800000 | ((((dest_addr)-(inst_addr))>>2)&0x3fffff))
#define SPARC_NOP (0x01000000)
static
void
install_fast_irq
(
unsigned
int
cpu_irq
,
irqreturn_t
sparc_floppy_irq
(
int
irq
,
void
*
dev_cookie
,
struct
pt_regs
*
regs
)
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
))
{
{
extern
unsigned
long
sparc64_ttable_tl0
;
if
(
likely
(
doing_pdma
))
{
unsigned
long
ttent
=
(
unsigned
long
)
&
sparc64_ttable_tl0
;
void
__iomem
*
stat
=
(
void
__iomem
*
)
fdc_status
;
unsigned
int
*
insns
;
unsigned
char
*
vaddr
=
pdma_vaddr
;
unsigned
long
size
=
pdma_size
;
ttent
+=
0x820
;
u8
val
;
ttent
+=
(
cpu_irq
-
1
)
<<
5
;
insns
=
(
unsigned
int
*
)
ttent
;
while
(
size
)
{
insns
[
0
]
=
SPARC_BRANCH
(((
unsigned
long
)
handler
),
val
=
readb
(
stat
);
((
unsigned
long
)
&
insns
[
0
]));
if
(
unlikely
(
!
(
val
&
0x80
)))
{
insns
[
1
]
=
SPARC_NOP
;
pdma_vaddr
=
vaddr
;
__asm__
__volatile__
(
"membar #StoreStore; flush %0"
:
:
"r"
(
ttent
));
pdma_size
=
size
;
}
return
IRQ_HANDLED
;
}
int
request_fast_irq
(
unsigned
int
irq
,
if
(
unlikely
(
!
(
val
&
0x20
)))
{
irqreturn_t
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
pdma_vaddr
=
vaddr
;
unsigned
long
irqflags
,
const
char
*
name
,
void
*
dev_id
)
pdma_size
=
size
;
{
doing_pdma
=
0
;
struct
irqaction
*
action
;
goto
main_interrupt
;
struct
ino_bucket
*
bucket
=
__bucket
(
irq
);
}
unsigned
long
flags
;
if
(
val
&
0x40
)
{
/* read */
/* No pil0 dummy buckets allowed here. */
*
vaddr
++
=
readb
(
stat
+
1
);
if
(
bucket
<
&
ivector_table
[
0
]
||
}
else
{
bucket
>=
&
ivector_table
[
NUM_IVECS
])
{
unsigned
char
data
=
*
vaddr
++
;
unsigned
int
*
caller
;
__asm__
__volatile__
(
"mov %%i7, %0"
:
"=r"
(
caller
));
printk
(
KERN_CRIT
"request_fast_irq: Old style IRQ registry attempt "
"from %p, irq %08x.
\n
"
,
caller
,
irq
);
return
-
EINVAL
;
}
if
(
!
handler
)
return
-
EINVAL
;
if
((
bucket
->
pil
==
0
)
||
(
bucket
->
pil
==
14
))
{
/* write */
printk
(
"request_fast_irq: Trying to register shared IRQ 0 or 14.
\n
"
);
writeb
(
data
,
stat
+
1
);
return
-
EBUSY
;
}
}
size
--
;
}
spin_lock_irqsave
(
&
irq_action_lock
,
flags
);
pdma_vaddr
=
vaddr
;
pdma_size
=
size
;
action
=
*
(
bucket
->
pil
+
irq_action
);
/* Send Terminal Count pulse to floppy controller. */
if
(
action
)
{
val
=
readb
(
auxio_register
);
if
(
action
->
flags
&
SA_SHIRQ
)
val
|=
AUXIO_AUX1_FTCNT
;
panic
(
"Trying to register fast irq when already shared.
\n
"
);
writeb
(
val
,
auxio_register
);
if
(
irqflags
&
SA_SHIRQ
)
val
&=
AUXIO_AUX1_FTCNT
;
panic
(
"Trying to register fast irq as shared.
\n
"
);
writeb
(
val
,
auxio_register
);
printk
(
"request_fast_irq: Trying to register yet already owned.
\n
"
);
spin_unlock_irqrestore
(
&
irq_action_lock
,
flags
);
return
-
EBUSY
;
}
/*
doing_pdma
=
0
;
* We do not check for SA_SAMPLE_RANDOM in this path. Neither do we
* support smp intr affinity in this path.
*/
if
(
irqflags
&
SA_STATIC_ALLOC
)
{
if
(
static_irq_count
<
MAX_STATIC_ALLOC
)
action
=
&
static_irqaction
[
static_irq_count
++
];
else
printk
(
"Request for IRQ%d (%s) SA_STATIC_ALLOC failed "
"using kmalloc
\n
"
,
bucket
->
pil
,
name
);
}
if
(
action
==
NULL
)
action
=
(
struct
irqaction
*
)
kmalloc
(
sizeof
(
struct
irqaction
),
GFP_ATOMIC
);
if
(
!
action
)
{
spin_unlock_irqrestore
(
&
irq_action_lock
,
flags
);
return
-
ENOMEM
;
}
}
install_fast_irq
(
bucket
->
pil
,
handler
);
bucket
->
irq_info
=
action
;
main_interrupt:
bucket
->
flags
|=
IBF_ACTIVE
;
return
floppy_interrupt
(
irq
,
dev_cookie
,
regs
);
action
->
handler
=
handler
;
action
->
flags
=
irqflags
;
action
->
dev_id
=
NULL
;
action
->
name
=
name
;
action
->
next
=
NULL
;
put_ino_in_irqaction
(
action
,
irq
);
put_smpaff_in_irqaction
(
action
,
CPU_MASK_NONE
);
*
(
bucket
->
pil
+
irq_action
)
=
action
;
enable_irq
(
irq
);
spin_unlock_irqrestore
(
&
irq_action_lock
,
flags
);
#ifdef CONFIG_SMP
distribute_irqs
();
#endif
return
0
;
}
}
EXPORT_SYMBOL
(
sparc_floppy_irq
);
#endif
/* We really don't need these at all on the Sparc. We only have
/* We really don't need these at all on the Sparc. We only have
* stubs here because they are exported to modules.
* stubs here because they are exported to modules.
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/kernel/semaphore.c
View file @
c36ad397
...
@@ -32,8 +32,9 @@ static __inline__ int __sem_update_count(struct semaphore *sem, int incr)
...
@@ -32,8 +32,9 @@ static __inline__ int __sem_update_count(struct semaphore *sem, int incr)
" add %1, %4, %1
\n
"
" add %1, %4, %1
\n
"
" cas [%3], %0, %1
\n
"
" cas [%3], %0, %1
\n
"
" cmp %0, %1
\n
"
" cmp %0, %1
\n
"
" membar #StoreLoad | #StoreStore
\n
"
" bne,pn %%icc, 1b
\n
"
" bne,pn %%icc, 1b
\n
"
"
membar #StoreLoad | #StoreStore
\n
"
"
nop
\n
"
:
"=&r"
(
old_count
),
"=&r"
(
tmp
),
"=m"
(
sem
->
count
)
:
"=&r"
(
old_count
),
"=&r"
(
tmp
),
"=m"
(
sem
->
count
)
:
"r"
(
&
sem
->
count
),
"r"
(
incr
),
"m"
(
sem
->
count
)
:
"r"
(
&
sem
->
count
),
"r"
(
incr
),
"m"
(
sem
->
count
)
:
"cc"
);
:
"cc"
);
...
@@ -71,8 +72,9 @@ void up(struct semaphore *sem)
...
@@ -71,8 +72,9 @@ void up(struct semaphore *sem)
" cmp %%g1, %%g7
\n
"
" cmp %%g1, %%g7
\n
"
" bne,pn %%icc, 1b
\n
"
" bne,pn %%icc, 1b
\n
"
" addcc %%g7, 1, %%g0
\n
"
" addcc %%g7, 1, %%g0
\n
"
" membar #StoreLoad | #StoreStore
\n
"
" ble,pn %%icc, 3f
\n
"
" ble,pn %%icc, 3f
\n
"
"
membar #StoreLoad | #StoreStore
\n
"
"
nop
\n
"
"2:
\n
"
"2:
\n
"
" .subsection 2
\n
"
" .subsection 2
\n
"
"3: mov %0, %%g1
\n
"
"3: mov %0, %%g1
\n
"
...
@@ -128,8 +130,9 @@ void __sched down(struct semaphore *sem)
...
@@ -128,8 +130,9 @@ void __sched down(struct semaphore *sem)
" cmp %%g1, %%g7
\n
"
" cmp %%g1, %%g7
\n
"
" bne,pn %%icc, 1b
\n
"
" bne,pn %%icc, 1b
\n
"
" cmp %%g7, 1
\n
"
" cmp %%g7, 1
\n
"
" membar #StoreLoad | #StoreStore
\n
"
" bl,pn %%icc, 3f
\n
"
" bl,pn %%icc, 3f
\n
"
"
membar #StoreLoad | #StoreStore
\n
"
"
nop
\n
"
"2:
\n
"
"2:
\n
"
" .subsection 2
\n
"
" .subsection 2
\n
"
"3: mov %0, %%g1
\n
"
"3: mov %0, %%g1
\n
"
...
@@ -233,8 +236,9 @@ int __sched down_interruptible(struct semaphore *sem)
...
@@ -233,8 +236,9 @@ int __sched down_interruptible(struct semaphore *sem)
" cmp %%g1, %%g7
\n
"
" cmp %%g1, %%g7
\n
"
" bne,pn %%icc, 1b
\n
"
" bne,pn %%icc, 1b
\n
"
" cmp %%g7, 1
\n
"
" cmp %%g7, 1
\n
"
" membar #StoreLoad | #StoreStore
\n
"
" bl,pn %%icc, 3f
\n
"
" bl,pn %%icc, 3f
\n
"
"
membar #StoreLoad | #StoreStore
\n
"
"
nop
\n
"
"2:
\n
"
"2:
\n
"
" .subsection 2
\n
"
" .subsection 2
\n
"
"3: mov %2, %%g1
\n
"
"3: mov %2, %%g1
\n
"
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/kernel/sparc64_ksyms.c
View file @
c36ad397
...
@@ -227,7 +227,6 @@ EXPORT_SYMBOL(__flush_dcache_range);
...
@@ -227,7 +227,6 @@ EXPORT_SYMBOL(__flush_dcache_range);
EXPORT_SYMBOL
(
mostek_lock
);
EXPORT_SYMBOL
(
mostek_lock
);
EXPORT_SYMBOL
(
mstk48t02_regs
);
EXPORT_SYMBOL
(
mstk48t02_regs
);
EXPORT_SYMBOL
(
request_fast_irq
);
#ifdef CONFIG_SUN_AUXIO
#ifdef CONFIG_SUN_AUXIO
EXPORT_SYMBOL
(
auxio_set_led
);
EXPORT_SYMBOL
(
auxio_set_led
);
EXPORT_SYMBOL
(
auxio_set_lte
);
EXPORT_SYMBOL
(
auxio_set_lte
);
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/kernel/trampoline.S
View file @
c36ad397
...
@@ -98,8 +98,9 @@ startup_continue:
...
@@ -98,8 +98,9 @@ startup_continue:
sethi
%
hi
(
prom_entry_lock
),
%
g2
sethi
%
hi
(
prom_entry_lock
),
%
g2
1
:
ldstub
[%
g2
+
%
lo
(
prom_entry_lock
)],
%
g1
1
:
ldstub
[%
g2
+
%
lo
(
prom_entry_lock
)],
%
g1
membar
#
StoreLoad
|
#
StoreStore
brnz
,
pn
%
g1
,
1
b
brnz
,
pn
%
g1
,
1
b
membar
#
StoreLoad
|
#
StoreStore
nop
sethi
%
hi
(
p1275buf
),
%
g2
sethi
%
hi
(
p1275buf
),
%
g2
or
%
g2
,
%
lo
(
p1275buf
),
%
g2
or
%
g2
,
%
lo
(
p1275buf
),
%
g2
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/lib/U1memcpy.S
View file @
c36ad397
...
@@ -87,14 +87,17 @@
...
@@ -87,14 +87,17 @@
#define LOOP_CHUNK3(src, dest, len, branch_dest) \
#define LOOP_CHUNK3(src, dest, len, branch_dest) \
MAIN_LOOP_CHUNK
(
src
,
dest
,
f32
,
f48
,
len
,
branch_dest
)
MAIN_LOOP_CHUNK
(
src
,
dest
,
f32
,
f48
,
len
,
branch_dest
)
#define DO_SYNC membar #Sync;
#define STORE_SYNC(dest, fsrc) \
#define STORE_SYNC(dest, fsrc) \
EX_ST
(
STORE_BLK
(%
fsrc
,
%
dest
))
; \
EX_ST
(
STORE_BLK
(%
fsrc
,
%
dest
))
; \
add
%
dest
,
0x40
,
%
dest
;
add
%
dest
,
0x40
,
%
dest
; \
DO_SYNC
#define STORE_JUMP(dest, fsrc, target) \
#define STORE_JUMP(dest, fsrc, target) \
EX_ST
(
STORE_BLK
(%
fsrc
,
%
dest
))
; \
EX_ST
(
STORE_BLK
(%
fsrc
,
%
dest
))
; \
add
%
dest
,
0x40
,
%
dest
; \
add
%
dest
,
0x40
,
%
dest
; \
ba
,
pt
%
xcc
,
target
;
ba
,
pt
%
xcc
,
target
; \
nop
;
#define FINISH_VISCHUNK(dest, f0, f1, left) \
#define FINISH_VISCHUNK(dest, f0, f1, left) \
subcc
%
left
,
8
,
%
left
;\
subcc
%
left
,
8
,
%
left
;\
...
@@ -239,17 +242,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
...
@@ -239,17 +242,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
ba
,
pt
%
xcc
,
1
b
+
4
ba
,
pt
%
xcc
,
1
b
+
4
faligndata
%f0
,
%f2
,
%f48
faligndata
%f0
,
%f2
,
%f48
1
:
FREG_FROB
(
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
)
1
:
FREG_FROB
(
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
)
FREG_FROB
(
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
)
STORE_JUMP
(
o0
,
f48
,
40
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
40
f
)
2
:
FREG_FROB
(
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
)
2
:
FREG_FROB
(
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
)
FREG_FROB
(
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
)
STORE_JUMP
(
o0
,
f48
,
48
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
48
f
)
3
:
FREG_FROB
(
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
)
3
:
FREG_FROB
(
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
)
FREG_FROB
(
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
)
STORE_JUMP
(
o0
,
f48
,
56
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
56
f
)
1
:
FREG_FROB
(
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
)
1
:
FREG_FROB
(
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
...
@@ -260,17 +263,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
...
@@ -260,17 +263,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
ba
,
pt
%
xcc
,
1
b
+
4
ba
,
pt
%
xcc
,
1
b
+
4
faligndata
%f2
,
%f4
,
%f48
faligndata
%f2
,
%f4
,
%f48
1
:
FREG_FROB
(
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
)
1
:
FREG_FROB
(
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
)
FREG_FROB
(
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
)
STORE_JUMP
(
o0
,
f48
,
41
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
41
f
)
2
:
FREG_FROB
(
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
)
2
:
FREG_FROB
(
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
)
FREG_FROB
(
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
)
STORE_JUMP
(
o0
,
f48
,
49
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
49
f
)
3
:
FREG_FROB
(
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
)
3
:
FREG_FROB
(
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
)
FREG_FROB
(
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
)
STORE_JUMP
(
o0
,
f48
,
57
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
57
f
)
1
:
FREG_FROB
(
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
)
1
:
FREG_FROB
(
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
...
@@ -281,17 +284,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
...
@@ -281,17 +284,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
ba
,
pt
%
xcc
,
1
b
+
4
ba
,
pt
%
xcc
,
1
b
+
4
faligndata
%f4
,
%f6
,
%f48
faligndata
%f4
,
%f6
,
%f48
1
:
FREG_FROB
(
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
)
1
:
FREG_FROB
(
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
)
FREG_FROB
(
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
)
STORE_JUMP
(
o0
,
f48
,
42
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
42
f
)
2
:
FREG_FROB
(
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
)
2
:
FREG_FROB
(
f36
,
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
)
FREG_FROB
(
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
)
STORE_JUMP
(
o0
,
f48
,
50
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
50
f
)
3
:
FREG_FROB
(
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
)
3
:
FREG_FROB
(
f4
,
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
)
FREG_FROB
(
f20
,
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
)
STORE_JUMP
(
o0
,
f48
,
58
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
58
f
)
1
:
FREG_FROB
(
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
)
1
:
FREG_FROB
(
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
...
@@ -302,17 +305,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
...
@@ -302,17 +305,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
ba
,
pt
%
xcc
,
1
b
+
4
ba
,
pt
%
xcc
,
1
b
+
4
faligndata
%f6
,
%f8
,
%f48
faligndata
%f6
,
%f8
,
%f48
1
:
FREG_FROB
(
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
)
1
:
FREG_FROB
(
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
)
FREG_FROB
(
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
)
STORE_JUMP
(
o0
,
f48
,
43
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
43
f
)
2
:
FREG_FROB
(
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
)
2
:
FREG_FROB
(
f38
,
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
)
FREG_FROB
(
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
)
STORE_JUMP
(
o0
,
f48
,
51
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
51
f
)
3
:
FREG_FROB
(
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
)
3
:
FREG_FROB
(
f6
,
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
)
FREG_FROB
(
f22
,
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
)
STORE_JUMP
(
o0
,
f48
,
59
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
59
f
)
1
:
FREG_FROB
(
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
)
1
:
FREG_FROB
(
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
...
@@ -323,17 +326,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
...
@@ -323,17 +326,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
ba
,
pt
%
xcc
,
1
b
+
4
ba
,
pt
%
xcc
,
1
b
+
4
faligndata
%f8
,
%f10
,
%f48
faligndata
%f8
,
%f10
,
%f48
1
:
FREG_FROB
(
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
)
1
:
FREG_FROB
(
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
)
FREG_FROB
(
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
)
STORE_JUMP
(
o0
,
f48
,
44
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
44
f
)
2
:
FREG_FROB
(
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
)
2
:
FREG_FROB
(
f40
,
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
)
FREG_FROB
(
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
)
STORE_JUMP
(
o0
,
f48
,
52
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
52
f
)
3
:
FREG_FROB
(
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
)
3
:
FREG_FROB
(
f8
,
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
)
FREG_FROB
(
f24
,
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
)
STORE_JUMP
(
o0
,
f48
,
60
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
60
f
)
1
:
FREG_FROB
(
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
)
1
:
FREG_FROB
(
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
...
@@ -344,17 +347,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
...
@@ -344,17 +347,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
ba
,
pt
%
xcc
,
1
b
+
4
ba
,
pt
%
xcc
,
1
b
+
4
faligndata
%f10
,
%f12
,
%f48
faligndata
%f10
,
%f12
,
%f48
1
:
FREG_FROB
(
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
)
1
:
FREG_FROB
(
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
)
FREG_FROB
(
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
)
STORE_JUMP
(
o0
,
f48
,
45
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
45
f
)
2
:
FREG_FROB
(
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
)
2
:
FREG_FROB
(
f42
,
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
)
FREG_FROB
(
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
)
STORE_JUMP
(
o0
,
f48
,
53
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
53
f
)
3
:
FREG_FROB
(
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
)
3
:
FREG_FROB
(
f10
,
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
)
FREG_FROB
(
f26
,
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
)
STORE_JUMP
(
o0
,
f48
,
61
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
61
f
)
1
:
FREG_FROB
(
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
)
1
:
FREG_FROB
(
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
...
@@ -365,17 +368,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
...
@@ -365,17 +368,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
ba
,
pt
%
xcc
,
1
b
+
4
ba
,
pt
%
xcc
,
1
b
+
4
faligndata
%f12
,
%f14
,
%f48
faligndata
%f12
,
%f14
,
%f48
1
:
FREG_FROB
(
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
)
1
:
FREG_FROB
(
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
)
FREG_FROB
(
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
)
STORE_JUMP
(
o0
,
f48
,
46
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
46
f
)
2
:
FREG_FROB
(
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
)
2
:
FREG_FROB
(
f44
,
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
)
FREG_FROB
(
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
)
STORE_JUMP
(
o0
,
f48
,
54
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
54
f
)
3
:
FREG_FROB
(
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
)
3
:
FREG_FROB
(
f12
,
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
)
FREG_FROB
(
f28
,
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
)
STORE_JUMP
(
o0
,
f48
,
62
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
62
f
)
1
:
FREG_FROB
(
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
)
1
:
FREG_FROB
(
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
LOOP_CHUNK1
(
o1
,
o0
,
GLOBAL_SPARE
,
1
f
)
...
@@ -386,17 +389,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
...
@@ -386,17 +389,17 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
ba
,
pt
%
xcc
,
1
b
+
4
ba
,
pt
%
xcc
,
1
b
+
4
faligndata
%f14
,
%f16
,
%f48
faligndata
%f14
,
%f16
,
%f48
1
:
FREG_FROB
(
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
)
1
:
FREG_FROB
(
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
)
FREG_FROB
(
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
)
STORE_JUMP
(
o0
,
f48
,
47
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
47
f
)
2
:
FREG_FROB
(
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
)
2
:
FREG_FROB
(
f46
,
f0
,
f2
,
f4
,
f6
,
f8
,
f10
,
f12
,
f14
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
)
FREG_FROB
(
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
)
STORE_JUMP
(
o0
,
f48
,
55
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
55
f
)
3
:
FREG_FROB
(
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
)
3
:
FREG_FROB
(
f14
,
f16
,
f18
,
f20
,
f22
,
f24
,
f26
,
f28
,
f30
)
STORE_SYNC
(
o0
,
f48
)
membar
#
Sync
STORE_SYNC
(
o0
,
f48
)
FREG_FROB
(
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
)
FREG_FROB
(
f30
,
f32
,
f34
,
f36
,
f38
,
f40
,
f42
,
f44
,
f46
)
STORE_JUMP
(
o0
,
f48
,
63
f
)
membar
#
Sync
STORE_JUMP
(
o0
,
f48
,
63
f
)
40
:
FINISH_VISCHUNK
(
o0
,
f0
,
f2
,
g3
)
40
:
FINISH_VISCHUNK
(
o0
,
f0
,
f2
,
g3
)
41
:
FINISH_VISCHUNK
(
o0
,
f2
,
f4
,
g3
)
41
:
FINISH_VISCHUNK
(
o0
,
f2
,
f4
,
g3
)
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/lib/VISsave.S
View file @
c36ad397
...
@@ -72,7 +72,11 @@ vis1: ldub [%g6 + TI_FPSAVED], %g3
...
@@ -72,7 +72,11 @@ vis1: ldub [%g6 + TI_FPSAVED], %g3
stda
%f48
,
[%
g3
+
%
g1
]
ASI_BLK_P
stda
%f48
,
[%
g3
+
%
g1
]
ASI_BLK_P
5
:
membar
#
Sync
5
:
membar
#
Sync
jmpl
%
g7
+
%
g0
,
%
g0
ba
,
pt
%
xcc
,
80
f
nop
.
align
32
80
:
jmpl
%
g7
+
%
g0
,
%
g0
nop
nop
6
:
ldub
[%
g3
+
TI_FPSAVED
],
%
o5
6
:
ldub
[%
g3
+
TI_FPSAVED
],
%
o5
...
@@ -87,8 +91,11 @@ vis1: ldub [%g6 + TI_FPSAVED], %g3
...
@@ -87,8 +91,11 @@ vis1: ldub [%g6 + TI_FPSAVED], %g3
stda
%f32
,
[%
g2
+
%
g1
]
ASI_BLK_P
stda
%f32
,
[%
g2
+
%
g1
]
ASI_BLK_P
stda
%f48
,
[%
g3
+
%
g1
]
ASI_BLK_P
stda
%f48
,
[%
g3
+
%
g1
]
ASI_BLK_P
membar
#
Sync
membar
#
Sync
jmpl
%
g7
+
%
g0
,
%
g0
ba
,
pt
%
xcc
,
80
f
nop
.
align
32
80
:
jmpl
%
g7
+
%
g0
,
%
g0
nop
nop
.
align
32
.
align
32
...
@@ -126,6 +133,10 @@ VISenterhalf:
...
@@ -126,6 +133,10 @@ VISenterhalf:
stda
%f0
,
[%
g2
+
%
g1
]
ASI_BLK_P
stda
%f0
,
[%
g2
+
%
g1
]
ASI_BLK_P
stda
%f16
,
[%
g3
+
%
g1
]
ASI_BLK_P
stda
%f16
,
[%
g3
+
%
g1
]
ASI_BLK_P
membar
#
Sync
membar
#
Sync
ba
,
pt
%
xcc
,
4
f
nop
.
align
32
4
:
and
%
o5
,
FPRS_DU
,
%
o5
4
:
and
%
o5
,
FPRS_DU
,
%
o5
jmpl
%
g7
+
%
g0
,
%
g0
jmpl
%
g7
+
%
g0
,
%
g0
wr
%
o5
,
FPRS_FEF
,
%
fprs
wr
%
o5
,
FPRS_FEF
,
%
fprs
This diff is collapsed.
Click to expand it.
arch/sparc64/lib/atomic.S
View file @
c36ad397
...
@@ -7,18 +7,6 @@
...
@@ -7,18 +7,6 @@
#include <linux/config.h>
#include <linux/config.h>
#include <asm/asi.h>
#include <asm/asi.h>
/
*
On
SMP
we
need
to
use
memory
barriers
to
ensure
*
correct
memory
operation
ordering
,
nop
these
out
*
for
uniprocessor
.
*/
#ifdef CONFIG_SMP
#define ATOMIC_PRE_BARRIER membar #StoreLoad | #LoadLoad
#define ATOMIC_POST_BARRIER membar #StoreLoad | #StoreStore
#else
#define ATOMIC_PRE_BARRIER nop
#define ATOMIC_POST_BARRIER nop
#endif
.
text
.
text
/
*
Two
versions
of
the
atomic
routines
,
one
that
/
*
Two
versions
of
the
atomic
routines
,
one
that
...
@@ -52,6 +40,24 @@ atomic_sub: /* %o0 = decrement, %o1 = atomic_ptr */
...
@@ -52,6 +40,24 @@ atomic_sub: /* %o0 = decrement, %o1 = atomic_ptr */
nop
nop
.
size
atomic_sub
,
.
-
atomic_sub
.
size
atomic_sub
,
.
-
atomic_sub
/
*
On
SMP
we
need
to
use
memory
barriers
to
ensure
*
correct
memory
operation
ordering
,
nop
these
out
*
for
uniprocessor
.
*/
#ifdef CONFIG_SMP
#define ATOMIC_PRE_BARRIER membar #StoreLoad | #LoadLoad;
#define ATOMIC_POST_BARRIER \
ba
,
pt
%
xcc
,
80
b
; \
membar
#
StoreLoad
|
#
StoreStore
80
:
retl
nop
#else
#define ATOMIC_PRE_BARRIER
#define ATOMIC_POST_BARRIER
#endif
.
globl
atomic_add_ret
.
globl
atomic_add_ret
.
type
atomic_add_ret
,#
function
.
type
atomic_add_ret
,#
function
atomic_add_ret
:
/
*
%
o0
=
increment
,
%
o1
=
atomic_ptr
*/
atomic_add_ret
:
/
*
%
o0
=
increment
,
%
o1
=
atomic_ptr
*/
...
@@ -62,9 +68,10 @@ atomic_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
...
@@ -62,9 +68,10 @@ atomic_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
cmp
%
g1
,
%
g7
cmp
%
g1
,
%
g7
bne
,
pn
%
icc
,
1
b
bne
,
pn
%
icc
,
1
b
add
%
g7
,
%
o0
,
%
g7
add
%
g7
,
%
o0
,
%
g7
sra
%
g7
,
0
,
%
o0
ATOMIC_POST_BARRIER
ATOMIC_POST_BARRIER
retl
retl
sra
%
g7
,
0
,
%
o0
nop
.
size
atomic_add_ret
,
.
-
atomic_add_ret
.
size
atomic_add_ret
,
.
-
atomic_add_ret
.
globl
atomic_sub_ret
.
globl
atomic_sub_ret
...
@@ -77,9 +84,10 @@ atomic_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */
...
@@ -77,9 +84,10 @@ atomic_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */
cmp
%
g1
,
%
g7
cmp
%
g1
,
%
g7
bne
,
pn
%
icc
,
1
b
bne
,
pn
%
icc
,
1
b
sub
%
g7
,
%
o0
,
%
g7
sub
%
g7
,
%
o0
,
%
g7
sra
%
g7
,
0
,
%
o0
ATOMIC_POST_BARRIER
ATOMIC_POST_BARRIER
retl
retl
sra
%
g7
,
0
,
%
o0
nop
.
size
atomic_sub_ret
,
.
-
atomic_sub_ret
.
size
atomic_sub_ret
,
.
-
atomic_sub_ret
.
globl
atomic64_add
.
globl
atomic64_add
...
@@ -118,9 +126,10 @@ atomic64_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
...
@@ -118,9 +126,10 @@ atomic64_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
cmp
%
g1
,
%
g7
cmp
%
g1
,
%
g7
bne
,
pn
%
xcc
,
1
b
bne
,
pn
%
xcc
,
1
b
add
%
g7
,
%
o0
,
%
g7
add
%
g7
,
%
o0
,
%
g7
mov
%
g7
,
%
o0
ATOMIC_POST_BARRIER
ATOMIC_POST_BARRIER
retl
retl
mov
%
g7
,
%
o0
nop
.
size
atomic64_add_ret
,
.
-
atomic64_add_ret
.
size
atomic64_add_ret
,
.
-
atomic64_add_ret
.
globl
atomic64_sub_ret
.
globl
atomic64_sub_ret
...
@@ -133,7 +142,8 @@ atomic64_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */
...
@@ -133,7 +142,8 @@ atomic64_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */
cmp
%
g1
,
%
g7
cmp
%
g1
,
%
g7
bne
,
pn
%
xcc
,
1
b
bne
,
pn
%
xcc
,
1
b
sub
%
g7
,
%
o0
,
%
g7
sub
%
g7
,
%
o0
,
%
g7
mov
%
g7
,
%
o0
ATOMIC_POST_BARRIER
ATOMIC_POST_BARRIER
retl
retl
mov
%
g7
,
%
o0
nop
.
size
atomic64_sub_ret
,
.
-
atomic64_sub_ret
.
size
atomic64_sub_ret
,
.
-
atomic64_sub_ret
This diff is collapsed.
Click to expand it.
arch/sparc64/lib/bitops.S
View file @
c36ad397
...
@@ -7,20 +7,26 @@
...
@@ -7,20 +7,26 @@
#include <linux/config.h>
#include <linux/config.h>
#include <asm/asi.h>
#include <asm/asi.h>
.
text
/
*
On
SMP
we
need
to
use
memory
barriers
to
ensure
/
*
On
SMP
we
need
to
use
memory
barriers
to
ensure
*
correct
memory
operation
ordering
,
nop
these
out
*
correct
memory
operation
ordering
,
nop
these
out
*
for
uniprocessor
.
*
for
uniprocessor
.
*/
*/
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
#define BITOP_PRE_BARRIER membar #StoreLoad | #LoadLoad
#define BITOP_PRE_BARRIER membar #StoreLoad | #LoadLoad
#define BITOP_POST_BARRIER membar #StoreLoad | #StoreStore
#define BITOP_POST_BARRIER \
ba
,
pt
%
xcc
,
80
b
; \
membar
#
StoreLoad
|
#
StoreStore
80
:
retl
nop
#else
#else
#define BITOP_PRE_BARRIER
nop
#define BITOP_PRE_BARRIER
#define BITOP_POST_BARRIER
nop
#define BITOP_POST_BARRIER
#endif
#endif
.
text
.
globl
test_and_set_bit
.
globl
test_and_set_bit
.
type
test_and_set_bit
,#
function
.
type
test_and_set_bit
,#
function
test_and_set_bit
:
/
*
%
o0
=
nr
,
%
o1
=
addr
*/
test_and_set_bit
:
/
*
%
o0
=
nr
,
%
o1
=
addr
*/
...
@@ -37,10 +43,11 @@ test_and_set_bit: /* %o0=nr, %o1=addr */
...
@@ -37,10 +43,11 @@ test_and_set_bit: /* %o0=nr, %o1=addr */
cmp
%
g7
,
%
g1
cmp
%
g7
,
%
g1
bne
,
pn
%
xcc
,
1
b
bne
,
pn
%
xcc
,
1
b
and
%
g7
,
%
o2
,
%
g2
and
%
g7
,
%
o2
,
%
g2
BITOP_POST_BARRIER
clr
%
o0
clr
%
o0
movrne
%
g2
,
1
,
%
o0
BITOP_POST_BARRIER
retl
retl
movrne
%
g2
,
1
,
%
o0
nop
.
size
test_and_set_bit
,
.
-
test_and_set_bit
.
size
test_and_set_bit
,
.
-
test_and_set_bit
.
globl
test_and_clear_bit
.
globl
test_and_clear_bit
...
@@ -59,10 +66,11 @@ test_and_clear_bit: /* %o0=nr, %o1=addr */
...
@@ -59,10 +66,11 @@ test_and_clear_bit: /* %o0=nr, %o1=addr */
cmp
%
g7
,
%
g1
cmp
%
g7
,
%
g1
bne
,
pn
%
xcc
,
1
b
bne
,
pn
%
xcc
,
1
b
and
%
g7
,
%
o2
,
%
g2
and
%
g7
,
%
o2
,
%
g2
BITOP_POST_BARRIER
clr
%
o0
clr
%
o0
movrne
%
g2
,
1
,
%
o0
BITOP_POST_BARRIER
retl
retl
movrne
%
g2
,
1
,
%
o0
nop
.
size
test_and_clear_bit
,
.
-
test_and_clear_bit
.
size
test_and_clear_bit
,
.
-
test_and_clear_bit
.
globl
test_and_change_bit
.
globl
test_and_change_bit
...
@@ -81,10 +89,11 @@ test_and_change_bit: /* %o0=nr, %o1=addr */
...
@@ -81,10 +89,11 @@ test_and_change_bit: /* %o0=nr, %o1=addr */
cmp
%
g7
,
%
g1
cmp
%
g7
,
%
g1
bne
,
pn
%
xcc
,
1
b
bne
,
pn
%
xcc
,
1
b
and
%
g7
,
%
o2
,
%
g2
and
%
g7
,
%
o2
,
%
g2
BITOP_POST_BARRIER
clr
%
o0
clr
%
o0
movrne
%
g2
,
1
,
%
o0
BITOP_POST_BARRIER
retl
retl
movrne
%
g2
,
1
,
%
o0
nop
.
size
test_and_change_bit
,
.
-
test_and_change_bit
.
size
test_and_change_bit
,
.
-
test_and_change_bit
.
globl
set_bit
.
globl
set_bit
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/lib/debuglocks.c
View file @
c36ad397
...
@@ -252,8 +252,9 @@ void _do_write_lock (rwlock_t *rw, char *str)
...
@@ -252,8 +252,9 @@ void _do_write_lock (rwlock_t *rw, char *str)
" andn %%g1, %%g3, %%g7
\n
"
" andn %%g1, %%g3, %%g7
\n
"
" casx [%0], %%g1, %%g7
\n
"
" casx [%0], %%g1, %%g7
\n
"
" cmp %%g1, %%g7
\n
"
" cmp %%g1, %%g7
\n
"
" membar #StoreLoad | #StoreStore
\n
"
" bne,pn %%xcc, 1b
\n
"
" bne,pn %%xcc, 1b
\n
"
"
membar #StoreLoad | #StoreStore
"
"
nop
"
:
/* no outputs */
:
/* no outputs */
:
"r"
(
&
(
rw
->
lock
))
:
"r"
(
&
(
rw
->
lock
))
:
"g3"
,
"g1"
,
"g7"
,
"cc"
,
"memory"
);
:
"g3"
,
"g1"
,
"g7"
,
"cc"
,
"memory"
);
...
@@ -351,8 +352,9 @@ int _do_write_trylock (rwlock_t *rw, char *str)
...
@@ -351,8 +352,9 @@ int _do_write_trylock (rwlock_t *rw, char *str)
" andn %%g1, %%g3, %%g7
\n
"
" andn %%g1, %%g3, %%g7
\n
"
" casx [%0], %%g1, %%g7
\n
"
" casx [%0], %%g1, %%g7
\n
"
" cmp %%g1, %%g7
\n
"
" cmp %%g1, %%g7
\n
"
" membar #StoreLoad | #StoreStore
\n
"
" bne,pn %%xcc, 1b
\n
"
" bne,pn %%xcc, 1b
\n
"
"
membar #StoreLoad | #StoreStore
"
"
nop
"
:
/* no outputs */
:
/* no outputs */
:
"r"
(
&
(
rw
->
lock
))
:
"r"
(
&
(
rw
->
lock
))
:
"g3"
,
"g1"
,
"g7"
,
"cc"
,
"memory"
);
:
"g3"
,
"g1"
,
"g7"
,
"cc"
,
"memory"
);
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/lib/dec_and_lock.S
View file @
c36ad397
...
@@ -48,8 +48,9 @@ start_to_zero:
...
@@ -48,8 +48,9 @@ start_to_zero:
#endif
#endif
to_zero
:
to_zero
:
ldstub
[%
o1
],
%
g3
ldstub
[%
o1
],
%
g3
membar
#
StoreLoad
|
#
StoreStore
brnz
,
pn
%
g3
,
spin_on_lock
brnz
,
pn
%
g3
,
spin_on_lock
membar
#
StoreLoad
|
#
StoreStore
nop
loop2
:
cas
[%
o0
],
%
g2
,
%
g7
/*
ASSERT
(
g7
==
0
)
*/
loop2
:
cas
[%
o0
],
%
g2
,
%
g7
/*
ASSERT
(
g7
==
0
)
*/
cmp
%
g2
,
%
g7
cmp
%
g2
,
%
g7
...
@@ -71,8 +72,9 @@ loop2: cas [%o0], %g2, %g7 /* ASSERT(g7 == 0) */
...
@@ -71,8 +72,9 @@ loop2: cas [%o0], %g2, %g7 /* ASSERT(g7 == 0) */
nop
nop
spin_on_lock
:
spin_on_lock
:
ldub
[%
o1
],
%
g3
ldub
[%
o1
],
%
g3
membar
#
LoadLoad
brnz
,
pt
%
g3
,
spin_on_lock
brnz
,
pt
%
g3
,
spin_on_lock
membar
#
LoadLoad
nop
ba
,
pt
%
xcc
,
to_zero
ba
,
pt
%
xcc
,
to_zero
nop
nop
nop
nop
This diff is collapsed.
Click to expand it.
arch/sparc64/lib/rwsem.S
View file @
c36ad397
...
@@ -17,8 +17,9 @@ __down_read:
...
@@ -17,8 +17,9 @@ __down_read:
bne
,
pn
%
icc
,
1
b
bne
,
pn
%
icc
,
1
b
add
%
g7
,
1
,
%
g7
add
%
g7
,
1
,
%
g7
cmp
%
g7
,
0
cmp
%
g7
,
0
membar
#
StoreLoad
|
#
StoreStore
bl
,
pn
%
icc
,
3
f
bl
,
pn
%
icc
,
3
f
membar
#
StoreLoad
|
#
StoreStore
nop
2
:
2
:
retl
retl
nop
nop
...
@@ -57,8 +58,9 @@ __down_write:
...
@@ -57,8 +58,9 @@ __down_write:
cmp
%
g3
,
%
g7
cmp
%
g3
,
%
g7
bne
,
pn
%
icc
,
1
b
bne
,
pn
%
icc
,
1
b
cmp
%
g7
,
0
cmp
%
g7
,
0
membar
#
StoreLoad
|
#
StoreStore
bne
,
pn
%
icc
,
3
f
bne
,
pn
%
icc
,
3
f
membar
#
StoreLoad
|
#
StoreStore
nop
2
:
retl
2
:
retl
nop
nop
3
:
3
:
...
@@ -97,8 +99,9 @@ __up_read:
...
@@ -97,8 +99,9 @@ __up_read:
cmp
%
g1
,
%
g7
cmp
%
g1
,
%
g7
bne
,
pn
%
icc
,
1
b
bne
,
pn
%
icc
,
1
b
cmp
%
g7
,
0
cmp
%
g7
,
0
membar
#
StoreLoad
|
#
StoreStore
bl
,
pn
%
icc
,
3
f
bl
,
pn
%
icc
,
3
f
membar
#
StoreLoad
|
#
StoreStore
nop
2
:
retl
2
:
retl
nop
nop
3
:
sethi
%
hi
(
RWSEM_ACTIVE_MASK
),
%
g1
3
:
sethi
%
hi
(
RWSEM_ACTIVE_MASK
),
%
g1
...
@@ -126,8 +129,9 @@ __up_write:
...
@@ -126,8 +129,9 @@ __up_write:
bne
,
pn
%
icc
,
1
b
bne
,
pn
%
icc
,
1
b
sub
%
g7
,
%
g1
,
%
g7
sub
%
g7
,
%
g1
,
%
g7
cmp
%
g7
,
0
cmp
%
g7
,
0
membar
#
StoreLoad
|
#
StoreStore
bl
,
pn
%
icc
,
3
f
bl
,
pn
%
icc
,
3
f
membar
#
StoreLoad
|
#
StoreStore
nop
2
:
2
:
retl
retl
nop
nop
...
@@ -151,8 +155,9 @@ __downgrade_write:
...
@@ -151,8 +155,9 @@ __downgrade_write:
bne
,
pn
%
icc
,
1
b
bne
,
pn
%
icc
,
1
b
sub
%
g7
,
%
g1
,
%
g7
sub
%
g7
,
%
g1
,
%
g7
cmp
%
g7
,
0
cmp
%
g7
,
0
membar
#
StoreLoad
|
#
StoreStore
bl
,
pn
%
icc
,
3
f
bl
,
pn
%
icc
,
3
f
membar
#
StoreLoad
|
#
StoreStore
nop
2
:
2
:
retl
retl
nop
nop
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/mm/init.c
View file @
c36ad397
...
@@ -136,8 +136,9 @@ static __inline__ void set_dcache_dirty(struct page *page, int this_cpu)
...
@@ -136,8 +136,9 @@ static __inline__ void set_dcache_dirty(struct page *page, int this_cpu)
"or %%g1, %0, %%g1
\n\t
"
"or %%g1, %0, %%g1
\n\t
"
"casx [%2], %%g7, %%g1
\n\t
"
"casx [%2], %%g7, %%g1
\n\t
"
"cmp %%g7, %%g1
\n\t
"
"cmp %%g7, %%g1
\n\t
"
"membar #StoreLoad | #StoreStore
\n\t
"
"bne,pn %%xcc, 1b
\n\t
"
"bne,pn %%xcc, 1b
\n\t
"
"
membar #StoreLoad | #StoreStore
"
"
nop
"
:
/* no outputs */
:
/* no outputs */
:
"r"
(
mask
),
"r"
(
non_cpu_bits
),
"r"
(
&
page
->
flags
)
:
"r"
(
mask
),
"r"
(
non_cpu_bits
),
"r"
(
&
page
->
flags
)
:
"g1"
,
"g7"
);
:
"g1"
,
"g7"
);
...
@@ -157,8 +158,9 @@ static __inline__ void clear_dcache_dirty_cpu(struct page *page, unsigned long c
...
@@ -157,8 +158,9 @@ static __inline__ void clear_dcache_dirty_cpu(struct page *page, unsigned long c
" andn %%g7, %1, %%g1
\n\t
"
" andn %%g7, %1, %%g1
\n\t
"
"casx [%2], %%g7, %%g1
\n\t
"
"casx [%2], %%g7, %%g1
\n\t
"
"cmp %%g7, %%g1
\n\t
"
"cmp %%g7, %%g1
\n\t
"
"membar #StoreLoad | #StoreStore
\n\t
"
"bne,pn %%xcc, 1b
\n\t
"
"bne,pn %%xcc, 1b
\n\t
"
"
membar #StoreLoad | #StoreStore
\n
"
"
nop
\n
"
"2:"
"2:"
:
/* no outputs */
:
/* no outputs */
:
"r"
(
cpu
),
"r"
(
mask
),
"r"
(
&
page
->
flags
),
:
"r"
(
cpu
),
"r"
(
mask
),
"r"
(
&
page
->
flags
),
...
...
This diff is collapsed.
Click to expand it.
arch/sparc64/mm/ultra.S
View file @
c36ad397
...
@@ -266,8 +266,9 @@ __cheetah_flush_tlb_pending: /* 22 insns */
...
@@ -266,8 +266,9 @@ __cheetah_flush_tlb_pending: /* 22 insns */
andn
%
o3
,
1
,
%
o3
andn
%
o3
,
1
,
%
o3
stxa
%
g0
,
[%
o3
]
ASI_IMMU_DEMAP
stxa
%
g0
,
[%
o3
]
ASI_IMMU_DEMAP
2
:
stxa
%
g0
,
[%
o3
]
ASI_DMMU_DEMAP
2
:
stxa
%
g0
,
[%
o3
]
ASI_DMMU_DEMAP
membar
#
Sync
brnz
,
pt
%
o1
,
1
b
brnz
,
pt
%
o1
,
1
b
membar
#
Sync
nop
stxa
%
g2
,
[%
o4
]
ASI_DMMU
stxa
%
g2
,
[%
o4
]
ASI_DMMU
flush
%
g6
flush
%
g6
wrpr
%
g0
,
0
,
%
tl
wrpr
%
g0
,
0
,
%
tl
...
...
This diff is collapsed.
Click to expand it.
drivers/block/cfq-iosched.c
View file @
c36ad397
...
@@ -300,7 +300,6 @@ CFQ_CRQ_FNS(requeued);
...
@@ -300,7 +300,6 @@ CFQ_CRQ_FNS(requeued);
static
struct
cfq_queue
*
cfq_find_cfq_hash
(
struct
cfq_data
*
,
unsigned
int
,
unsigned
short
);
static
struct
cfq_queue
*
cfq_find_cfq_hash
(
struct
cfq_data
*
,
unsigned
int
,
unsigned
short
);
static
void
cfq_dispatch_sort
(
request_queue_t
*
,
struct
cfq_rq
*
);
static
void
cfq_dispatch_sort
(
request_queue_t
*
,
struct
cfq_rq
*
);
static
void
cfq_put_cfqd
(
struct
cfq_data
*
cfqd
);
static
void
cfq_put_cfqd
(
struct
cfq_data
*
cfqd
);
static
inline
int
cfq_pending_requests
(
struct
cfq_data
*
cfqd
);
#define process_sync(tsk) ((tsk)->flags & PF_SYNCWRITE)
#define process_sync(tsk) ((tsk)->flags & PF_SYNCWRITE)
...
@@ -348,6 +347,28 @@ static struct request *cfq_find_rq_hash(struct cfq_data *cfqd, sector_t offset)
...
@@ -348,6 +347,28 @@ static struct request *cfq_find_rq_hash(struct cfq_data *cfqd, sector_t offset)
return
NULL
;
return
NULL
;
}
}
static
inline
int
cfq_pending_requests
(
struct
cfq_data
*
cfqd
)
{
return
!
list_empty
(
&
cfqd
->
queue
->
queue_head
)
||
cfqd
->
busy_queues
;
}
/*
* scheduler run of queue, if there are requests pending and no one in the
* driver that will restart queueing
*/
static
inline
void
cfq_schedule_dispatch
(
struct
cfq_data
*
cfqd
)
{
if
(
!
cfqd
->
rq_in_driver
&&
cfq_pending_requests
(
cfqd
))
kblockd_schedule_work
(
&
cfqd
->
unplug_work
);
}
static
int
cfq_queue_empty
(
request_queue_t
*
q
)
{
struct
cfq_data
*
cfqd
=
q
->
elevator
->
elevator_data
;
return
!
cfq_pending_requests
(
cfqd
);
}
/*
/*
* Lifted from AS - choose which of crq1 and crq2 that is best served now.
* Lifted from AS - choose which of crq1 and crq2 that is best served now.
* We choose the request that is closest to the head right now. Distance
* We choose the request that is closest to the head right now. Distance
...
@@ -1071,16 +1092,6 @@ cfq_prio_to_maxrq(struct cfq_data *cfqd, struct cfq_queue *cfqq)
...
@@ -1071,16 +1092,6 @@ cfq_prio_to_maxrq(struct cfq_data *cfqd, struct cfq_queue *cfqq)
return
2
*
(
base_rq
+
base_rq
*
(
CFQ_PRIO_LISTS
-
1
-
cfqq
->
ioprio
));
return
2
*
(
base_rq
+
base_rq
*
(
CFQ_PRIO_LISTS
-
1
-
cfqq
->
ioprio
));
}
}
/*
* scheduler run of queue, if there are requests pending and no one in the
* driver that will restart queueing
*/
static
inline
void
cfq_schedule_dispatch
(
struct
cfq_data
*
cfqd
)
{
if
(
!
cfqd
->
rq_in_driver
&&
cfq_pending_requests
(
cfqd
))
kblockd_schedule_work
(
&
cfqd
->
unplug_work
);
}
/*
/*
* get next queue for service
* get next queue for service
*/
*/
...
@@ -1846,18 +1857,6 @@ cfq_insert_request(request_queue_t *q, struct request *rq, int where)
...
@@ -1846,18 +1857,6 @@ cfq_insert_request(request_queue_t *q, struct request *rq, int where)
}
}
}
}
static
inline
int
cfq_pending_requests
(
struct
cfq_data
*
cfqd
)
{
return
!
list_empty
(
&
cfqd
->
queue
->
queue_head
)
||
cfqd
->
busy_queues
;
}
static
int
cfq_queue_empty
(
request_queue_t
*
q
)
{
struct
cfq_data
*
cfqd
=
q
->
elevator
->
elevator_data
;
return
!
cfq_pending_requests
(
cfqd
);
}
static
void
cfq_completed_request
(
request_queue_t
*
q
,
struct
request
*
rq
)
static
void
cfq_completed_request
(
request_queue_t
*
q
,
struct
request
*
rq
)
{
{
struct
cfq_rq
*
crq
=
RQ_DATA
(
rq
);
struct
cfq_rq
*
crq
=
RQ_DATA
(
rq
);
...
@@ -1952,7 +1951,7 @@ __cfq_may_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq,
...
@@ -1952,7 +1951,7 @@ __cfq_may_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq,
{
{
#if 1
#if 1
if
((
cfq_cfqq_wait_request
(
cfqq
)
||
cfq_cfqq_must_alloc
(
cfqq
))
&&
if
((
cfq_cfqq_wait_request
(
cfqq
)
||
cfq_cfqq_must_alloc
(
cfqq
))
&&
!
cfq_cfqq_must_alloc_slice
)
{
!
cfq_cfqq_must_alloc_slice
(
cfqq
)
)
{
cfq_mark_cfqq_must_alloc_slice
(
cfqq
);
cfq_mark_cfqq_must_alloc_slice
(
cfqq
);
return
ELV_MQUEUE_MUST
;
return
ELV_MQUEUE_MUST
;
}
}
...
@@ -1969,7 +1968,7 @@ __cfq_may_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq,
...
@@ -1969,7 +1968,7 @@ __cfq_may_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq,
* only allow 1 ELV_MQUEUE_MUST per slice, otherwise we
* only allow 1 ELV_MQUEUE_MUST per slice, otherwise we
* can quickly flood the queue with writes from a single task
* can quickly flood the queue with writes from a single task
*/
*/
if
(
rw
==
READ
||
!
cfq_cfqq_must_alloc_slice
)
{
if
(
rw
==
READ
||
!
cfq_cfqq_must_alloc_slice
(
cfqq
)
)
{
cfq_mark_cfqq_must_alloc_slice
(
cfqq
);
cfq_mark_cfqq_must_alloc_slice
(
cfqq
);
return
ELV_MQUEUE_MUST
;
return
ELV_MQUEUE_MUST
;
}
}
...
...
This diff is collapsed.
Click to expand it.
drivers/bluetooth/bluecard_cs.c
View file @
c36ad397
...
@@ -1089,6 +1089,14 @@ static int bluecard_event(event_t event, int priority, event_callback_args_t *ar
...
@@ -1089,6 +1089,14 @@ static int bluecard_event(event_t event, int priority, event_callback_args_t *ar
return
0
;
return
0
;
}
}
static
struct
pcmcia_device_id
bluecard_ids
[]
=
{
PCMCIA_DEVICE_PROD_ID12
(
"BlueCard"
,
"LSE041"
,
0xbaf16fbf
,
0x657cc15e
),
PCMCIA_DEVICE_PROD_ID12
(
"BTCFCARD"
,
"LSE139"
,
0xe3987764
,
0x2524b59c
),
PCMCIA_DEVICE_PROD_ID12
(
"WSS"
,
"LSE039"
,
0x0a0736ec
,
0x24e6dfab
),
PCMCIA_DEVICE_NULL
};
MODULE_DEVICE_TABLE
(
pcmcia
,
bluecard_ids
);
static
struct
pcmcia_driver
bluecard_driver
=
{
static
struct
pcmcia_driver
bluecard_driver
=
{
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
.
drv
=
{
.
drv
=
{
...
@@ -1096,6 +1104,7 @@ static struct pcmcia_driver bluecard_driver = {
...
@@ -1096,6 +1104,7 @@ static struct pcmcia_driver bluecard_driver = {
},
},
.
attach
=
bluecard_attach
,
.
attach
=
bluecard_attach
,
.
detach
=
bluecard_detach
,
.
detach
=
bluecard_detach
,
.
id_table
=
bluecard_ids
,
};
};
static
int
__init
init_bluecard_cs
(
void
)
static
int
__init
init_bluecard_cs
(
void
)
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
6
Next
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