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
df42471d
Commit
df42471d
authored
Apr 21, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/sparc-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
cacf6489
2c8e5e76
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
26 deletions
+91
-26
drivers/block/ll_rw_blk.c
drivers/block/ll_rw_blk.c
+4
-2
drivers/block/umem.c
drivers/block/umem.c
+66
-23
fs/jfs/jfs_txnmgr.c
fs/jfs/jfs_txnmgr.c
+14
-1
include/linux/umem.h
include/linux/umem.h
+7
-0
No files found.
drivers/block/ll_rw_blk.c
View file @
df42471d
...
@@ -2164,8 +2164,7 @@ int end_that_request_chunk(struct request *req, int uptodate, int nr_bytes)
...
@@ -2164,8 +2164,7 @@ int end_that_request_chunk(struct request *req, int uptodate, int nr_bytes)
void
end_that_request_last
(
struct
request
*
req
)
void
end_that_request_last
(
struct
request
*
req
)
{
{
struct
gendisk
*
disk
=
req
->
rq_disk
;
struct
gendisk
*
disk
=
req
->
rq_disk
;
if
(
req
->
waiting
)
struct
completion
*
waiting
=
req
->
waiting
;
complete
(
req
->
waiting
);
if
(
disk
)
{
if
(
disk
)
{
unsigned
long
duration
=
jiffies
-
req
->
start_time
;
unsigned
long
duration
=
jiffies
-
req
->
start_time
;
...
@@ -2183,6 +2182,9 @@ void end_that_request_last(struct request *req)
...
@@ -2183,6 +2182,9 @@ void end_that_request_last(struct request *req)
disk_stat_dec
(
disk
,
in_flight
);
disk_stat_dec
(
disk
,
in_flight
);
}
}
__blk_put_request
(
req
->
q
,
req
);
__blk_put_request
(
req
->
q
,
req
);
/* Do this LAST! The structure may be freed immediately afterwards */
if
(
waiting
)
complete
(
waiting
);
}
}
int
__init
blk_dev_init
(
void
)
int
__init
blk_dev_init
(
void
)
...
...
drivers/block/umem.c
View file @
df42471d
...
@@ -149,6 +149,7 @@ struct cardinfo {
...
@@ -149,6 +149,7 @@ struct cardinfo {
spinlock_t
lock
;
spinlock_t
lock
;
int
check_batteries
;
int
check_batteries
;
int
flags
;
};
};
static
struct
cardinfo
cards
[
MM_MAXCARDS
];
static
struct
cardinfo
cards
[
MM_MAXCARDS
];
...
@@ -573,7 +574,7 @@ static int mm_make_request(request_queue_t *q, struct bio *bio)
...
@@ -573,7 +574,7 @@ static int mm_make_request(request_queue_t *q, struct bio *bio)
-- mm_interrupt
-- mm_interrupt
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
*/
*/
static
void
mm_interrupt
(
int
irq
,
void
*
__card
,
struct
pt_regs
*
regs
)
static
irqreturn_t
mm_interrupt
(
int
irq
,
void
*
__card
,
struct
pt_regs
*
regs
)
{
{
struct
cardinfo
*
card
=
(
struct
cardinfo
*
)
__card
;
struct
cardinfo
*
card
=
(
struct
cardinfo
*
)
__card
;
unsigned
int
dma_status
;
unsigned
int
dma_status
;
...
@@ -585,13 +586,16 @@ HW_TRACE(0x30);
...
@@ -585,13 +586,16 @@ HW_TRACE(0x30);
if
(
!
(
dma_status
&
(
DMASCR_ERROR_MASK
|
DMASCR_CHAIN_COMPLETE
)))
{
if
(
!
(
dma_status
&
(
DMASCR_ERROR_MASK
|
DMASCR_CHAIN_COMPLETE
)))
{
/* interrupt wasn't for me ... */
/* interrupt wasn't for me ... */
return
;
return
IRQ_NONE
;
}
}
/* clear COMPLETION interrupts */
/* clear COMPLETION interrupts */
if
(
card
->
flags
&
UM_FLAG_NO_BYTE_STATUS
)
writel
(
cpu_to_le32
(
DMASCR_DMA_COMPLETE
|
DMASCR_CHAIN_COMPLETE
),
writel
(
cpu_to_le32
(
DMASCR_DMA_COMPLETE
|
DMASCR_CHAIN_COMPLETE
),
card
->
csr_remap
+
DMA_STATUS_CTRL
);
card
->
csr_remap
+
DMA_STATUS_CTRL
);
else
writeb
((
DMASCR_DMA_COMPLETE
|
DMASCR_CHAIN_COMPLETE
)
>>
16
,
card
->
csr_remap
+
DMA_STATUS_CTRL
+
2
);
/* log errors and clear interrupt status */
/* log errors and clear interrupt status */
if
(
dma_status
&
DMASCR_ANY_ERR
)
{
if
(
dma_status
&
DMASCR_ANY_ERR
)
{
...
@@ -663,6 +667,7 @@ HW_TRACE(0x30);
...
@@ -663,6 +667,7 @@ HW_TRACE(0x30);
HW_TRACE
(
0x36
);
HW_TRACE
(
0x36
);
return
IRQ_HANDLED
;
}
}
/*
/*
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
...
@@ -755,7 +760,8 @@ static void check_all_batteries(unsigned long ptr)
...
@@ -755,7 +760,8 @@ static void check_all_batteries(unsigned long ptr)
{
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
num_cards
;
i
++
)
{
for
(
i
=
0
;
i
<
num_cards
;
i
++
)
if
(
!
(
cards
[
i
].
flags
&
UM_FLAG_NO_BATT
))
{
struct
cardinfo
*
card
=
&
cards
[
i
];
struct
cardinfo
*
card
=
&
cards
[
i
];
spin_lock_bh
(
&
card
->
lock
);
spin_lock_bh
(
&
card
->
lock
);
if
(
card
->
Active
>=
0
)
if
(
card
->
Active
>=
0
)
...
@@ -869,6 +875,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
...
@@ -869,6 +875,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
unsigned
char
mem_present
;
unsigned
char
mem_present
;
unsigned
char
batt_status
;
unsigned
char
batt_status
;
unsigned
int
saved_bar
,
data
;
unsigned
int
saved_bar
,
data
;
int
magic_number
;
if
(
pci_enable_device
(
dev
)
<
0
)
if
(
pci_enable_device
(
dev
)
<
0
)
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -933,12 +940,33 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
...
@@ -933,12 +940,33 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
printk
(
KERN_INFO
"MM%d: MEM area not remapped (CONFIG_MM_MAP_MEMORY not set)
\n
"
,
printk
(
KERN_INFO
"MM%d: MEM area not remapped (CONFIG_MM_MAP_MEMORY not set)
\n
"
,
card
->
card_number
);
card
->
card_number
);
#endif
#endif
if
(
readb
(
card
->
csr_remap
+
MEMCTRLSTATUS_MAGIC
)
!=
MM_MAGIC_VALUE
)
{
switch
(
card
->
dev
->
device
)
{
case
0x5415
:
card
->
flags
|=
UM_FLAG_NO_BYTE_STATUS
|
UM_FLAG_NO_BATTREG
;
magic_number
=
0x59
;
break
;
case
0x5425
:
card
->
flags
|=
UM_FLAG_NO_BYTE_STATUS
;
magic_number
=
0x5C
;
break
;
case
0x6155
:
card
->
flags
|=
UM_FLAG_NO_BYTE_STATUS
|
UM_FLAG_NO_BATTREG
|
UM_FLAG_NO_BATT
;
magic_number
=
0x99
;
break
;
default:
magic_number
=
0x100
;
break
;
}
if
(
readb
(
card
->
csr_remap
+
MEMCTRLSTATUS_MAGIC
)
!=
magic_number
)
{
printk
(
KERN_ERR
"MM%d: Magic number invalid
\n
"
,
card
->
card_number
);
printk
(
KERN_ERR
"MM%d: Magic number invalid
\n
"
,
card
->
card_number
);
ret
=
-
ENOMEM
;
ret
=
-
ENOMEM
;
goto
failed_magic
;
goto
failed_magic
;
}
}
card
->
mm_pages
[
0
].
desc
=
pci_alloc_consistent
(
card
->
dev
,
card
->
mm_pages
[
0
].
desc
=
pci_alloc_consistent
(
card
->
dev
,
PAGE_SIZE
*
2
,
PAGE_SIZE
*
2
,
&
card
->
mm_pages
[
0
].
page_dma
);
&
card
->
mm_pages
[
0
].
page_dma
);
...
@@ -997,6 +1025,10 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
...
@@ -997,6 +1025,10 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
card
->
battery
[
1
].
good
=
!
(
batt_status
&
BATTERY_2_FAILURE
);
card
->
battery
[
1
].
good
=
!
(
batt_status
&
BATTERY_2_FAILURE
);
card
->
battery
[
0
].
last_change
=
card
->
battery
[
1
].
last_change
=
jiffies
;
card
->
battery
[
0
].
last_change
=
card
->
battery
[
1
].
last_change
=
jiffies
;
if
(
card
->
flags
&
UM_FLAG_NO_BATT
)
printk
(
KERN_INFO
"MM%d: Size %d KB
\n
"
,
card
->
card_number
,
card
->
mm_size
);
else
{
printk
(
KERN_INFO
"MM%d: Size %d KB, Battery 1 %s (%s), Battery 2 %s (%s)
\n
"
,
printk
(
KERN_INFO
"MM%d: Size %d KB, Battery 1 %s (%s), Battery 2 %s (%s)
\n
"
,
card
->
card_number
,
card
->
mm_size
,
card
->
card_number
,
card
->
mm_size
,
(
batt_status
&
BATTERY_1_DISABLED
?
"Disabled"
:
"Enabled"
),
(
batt_status
&
BATTERY_1_DISABLED
?
"Disabled"
:
"Enabled"
),
...
@@ -1005,6 +1037,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
...
@@ -1005,6 +1037,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
card
->
battery
[
1
].
good
?
"OK"
:
"FAILURE"
);
card
->
battery
[
1
].
good
?
"OK"
:
"FAILURE"
);
set_fault_to_battery_status
(
card
);
set_fault_to_battery_status
(
card
);
}
pci_read_config_dword
(
dev
,
PCI_BASE_ADDRESS_1
,
&
saved_bar
);
pci_read_config_dword
(
dev
,
PCI_BASE_ADDRESS_1
,
&
saved_bar
);
data
=
0xffffffff
;
data
=
0xffffffff
;
...
@@ -1117,6 +1150,16 @@ static const struct pci_device_id __devinitdata mm_pci_ids[] = { {
...
@@ -1117,6 +1150,16 @@ static const struct pci_device_id __devinitdata mm_pci_ids[] = { {
},
{
},
{
.
vendor
=
PCI_VENDOR_ID_MICRO_MEMORY
,
.
vendor
=
PCI_VENDOR_ID_MICRO_MEMORY
,
.
device
=
PCI_DEVICE_ID_MICRO_MEMORY_5425CN
,
.
device
=
PCI_DEVICE_ID_MICRO_MEMORY_5425CN
,
},
{
.
vendor
=
PCI_VENDOR_ID_MICRO_MEMORY
,
.
device
=
PCI_DEVICE_ID_MICRO_MEMORY_6155
,
},
{
.
vendor
=
0x8086
,
.
device
=
0xB555
,
.
subvendor
=
0x1332
,
.
subdevice
=
0x5460
,
.
class
=
0x050000
,
.
class_mask
=
0
,
},
{
/* end: all zeroes */
}
},
{
/* end: all zeroes */
}
};
};
...
...
fs/jfs/jfs_txnmgr.c
View file @
df42471d
...
@@ -1240,8 +1240,21 @@ int txCommit(tid_t tid, /* transaction identifier */
...
@@ -1240,8 +1240,21 @@ int txCommit(tid_t tid, /* transaction identifier */
* Ensure that inode isn't reused before
* Ensure that inode isn't reused before
* lazy commit thread finishes processing
* lazy commit thread finishes processing
*/
*/
if
(
tblk
->
xflag
&
(
COMMIT_CREATE
|
COMMIT_DELETE
))
if
(
tblk
->
xflag
&
(
COMMIT_CREATE
|
COMMIT_DELETE
))
{
atomic_inc
(
&
tblk
->
ip
->
i_count
);
atomic_inc
(
&
tblk
->
ip
->
i_count
);
/*
* Avoid a rare deadlock
*
* If the inode is locked, we may be blocked in
* jfs_commit_inode. If so, we don't want the
* lazy_commit thread doing the last iput() on the inode
* since that may block on the locked inode. Instead,
* commit the transaction synchronously, so the last iput
* will be done by the calling thread (or later)
*/
if
(
tblk
->
ip
->
i_state
&
I_LOCK
)
tblk
->
xflag
&=
~
COMMIT_LAZY
;
}
ASSERT
((
!
(
tblk
->
xflag
&
COMMIT_DELETE
))
||
ASSERT
((
!
(
tblk
->
xflag
&
COMMIT_DELETE
))
||
((
tblk
->
ip
->
i_nlink
==
0
)
&&
((
tblk
->
ip
->
i_nlink
==
0
)
&&
...
...
include/linux/umem.h
View file @
df42471d
...
@@ -128,4 +128,11 @@ struct mm_dma_desc {
...
@@ -128,4 +128,11 @@ struct mm_dma_desc {
#define PCI_VENDOR_ID_MICRO_MEMORY 0x1332
#define PCI_VENDOR_ID_MICRO_MEMORY 0x1332
#define PCI_DEVICE_ID_MICRO_MEMORY_5415CN 0x5415
#define PCI_DEVICE_ID_MICRO_MEMORY_5415CN 0x5415
#define PCI_DEVICE_ID_MICRO_MEMORY_5425CN 0x5425
#define PCI_DEVICE_ID_MICRO_MEMORY_5425CN 0x5425
#define PCI_DEVICE_ID_MICRO_MEMORY_6155 0x6155
/* bits for card->flags */
#define UM_FLAG_DMA_IN_REGS 1
#define UM_FLAG_NO_BYTE_STATUS 2
#define UM_FLAG_NO_BATTREG 4
#define UM_FLAG_NO_BATT 8
#endif
#endif
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