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
7cc6719e
Commit
7cc6719e
authored
Aug 31, 2003
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge redhat.com:/spare/repo/linus-2.6
into redhat.com:/spare/repo/net-drivers-2.6
parents
6b711861
3a97fde4
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
102 additions
and
180 deletions
+102
-180
drivers/ide/ide-io.c
drivers/ide/ide-io.c
+0
-2
drivers/ide/ide-lib.c
drivers/ide/ide-lib.c
+14
-3
drivers/ide/ide-probe.c
drivers/ide/ide-probe.c
+15
-45
drivers/ide/ide.c
drivers/ide/ide.c
+9
-24
drivers/ide/ide_modes.h
drivers/ide/ide_modes.h
+0
-41
drivers/ide/legacy/ali14xx.c
drivers/ide/legacy/ali14xx.c
+0
-2
drivers/ide/legacy/dtc2278.c
drivers/ide/legacy/dtc2278.c
+0
-2
drivers/ide/legacy/ht6560b.c
drivers/ide/legacy/ht6560b.c
+0
-2
drivers/ide/legacy/qd65xx.c
drivers/ide/legacy/qd65xx.c
+0
-1
drivers/ide/legacy/umc8672.c
drivers/ide/legacy/umc8672.c
+0
-2
drivers/ide/pci/aec62xx.c
drivers/ide/pci/aec62xx.c
+0
-1
drivers/ide/pci/alim15x3.c
drivers/ide/pci/alim15x3.c
+0
-1
drivers/ide/pci/cmd640.c
drivers/ide/pci/cmd640.c
+0
-2
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cmd64x.c
+0
-1
drivers/ide/pci/cs5520.c
drivers/ide/pci/cs5520.c
+0
-1
drivers/ide/pci/cs5530.c
drivers/ide/pci/cs5530.c
+0
-1
drivers/ide/pci/cy82c693.c
drivers/ide/pci/cy82c693.c
+1
-2
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt34x.c
+0
-1
drivers/ide/pci/hpt366.c
drivers/ide/pci/hpt366.c
+34
-2
drivers/ide/pci/it8172.c
drivers/ide/pci/it8172.c
+0
-1
drivers/ide/pci/opti621.c
drivers/ide/pci/opti621.c
+0
-1
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_new.c
+0
-1
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/pdc202xx_old.c
+0
-1
drivers/ide/pci/pdcadma.c
drivers/ide/pci/pdcadma.c
+0
-1
drivers/ide/pci/piix.c
drivers/ide/pci/piix.c
+0
-1
drivers/ide/pci/sc1200.c
drivers/ide/pci/sc1200.c
+0
-1
drivers/ide/pci/serverworks.c
drivers/ide/pci/serverworks.c
+0
-1
drivers/ide/pci/siimage.c
drivers/ide/pci/siimage.c
+0
-1
drivers/ide/pci/sis5513.c
drivers/ide/pci/sis5513.c
+0
-1
drivers/ide/pci/sl82c105.c
drivers/ide/pci/sl82c105.c
+0
-1
drivers/ide/pci/slc90e66.c
drivers/ide/pci/slc90e66.c
+0
-1
drivers/ide/pci/triflex.c
drivers/ide/pci/triflex.c
+0
-1
drivers/ide/ppc/mpc8xx.c
drivers/ide/ppc/mpc8xx.c
+0
-1
drivers/ide/ppc/pmac.c
drivers/ide/ppc/pmac.c
+1
-2
include/linux/ide.h
include/linux/ide.h
+19
-19
ipc/msg.c
ipc/msg.c
+2
-2
ipc/sem.c
ipc/sem.c
+4
-4
ipc/shm.c
ipc/shm.c
+3
-3
No files found.
drivers/ide/ide-io.c
View file @
7cc6719e
...
@@ -54,8 +54,6 @@
...
@@ -54,8 +54,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/bitops.h>
#include <asm/bitops.h>
#include "ide_modes.h"
#if (DISK_RECOVERY_TIME > 0)
#if (DISK_RECOVERY_TIME > 0)
#error So the User Has To Fix the Compilation And Stop Hacking Port 0x43. Does anyone ever use this anyway ??
#error So the User Has To Fix the Compilation And Stop Hacking Port 0x43. Does anyone ever use this anyway ??
...
...
drivers/ide/ide-lib.c
View file @
7cc6719e
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/bitops.h>
#include <asm/bitops.h>
#include "ide_modes.h"
/*
/*
* IDE library routines. These are plug in code that most
* IDE library routines. These are plug in code that most
* drivers can use but occasionally may be weird enough
* drivers can use but occasionally may be weird enough
...
@@ -170,7 +168,7 @@ u8 ide_rate_filter (u8 mode, u8 speed)
...
@@ -170,7 +168,7 @@ u8 ide_rate_filter (u8 mode, u8 speed)
BUG
();
BUG
();
return
min
(
speed
,
speed_max
[
mode
]);
return
min
(
speed
,
speed_max
[
mode
]);
#else
/* !CONFIG_BLK_DEV_IDEDMA */
#else
/* !CONFIG_BLK_DEV_IDEDMA */
return
min
(
speed
,
XFER_PIO_4
);
return
min
(
speed
,
(
u8
)
XFER_PIO_4
);
#endif
/* CONFIG_BLK_DEV_IDEDMA */
#endif
/* CONFIG_BLK_DEV_IDEDMA */
}
}
...
@@ -188,6 +186,12 @@ int ide_dma_enable (ide_drive_t *drive)
...
@@ -188,6 +186,12 @@ int ide_dma_enable (ide_drive_t *drive)
EXPORT_SYMBOL
(
ide_dma_enable
);
EXPORT_SYMBOL
(
ide_dma_enable
);
/*
* Standard (generic) timings for PIO modes, from ATA2 specification.
* These timings are for access to the IDE data port register *only*.
* Some drives may specify a mode, while also specifying a different
* value for cycle_time (from drive identification data).
*/
const
ide_pio_timings_t
ide_pio_timings
[
6
]
=
{
const
ide_pio_timings_t
ide_pio_timings
[
6
]
=
{
{
70
,
165
,
600
},
/* PIO Mode 0 */
{
70
,
165
,
600
},
/* PIO Mode 0 */
{
50
,
125
,
383
},
/* PIO Mode 1 */
{
50
,
125
,
383
},
/* PIO Mode 1 */
...
@@ -199,6 +203,13 @@ const ide_pio_timings_t ide_pio_timings[6] = {
...
@@ -199,6 +203,13 @@ const ide_pio_timings_t ide_pio_timings[6] = {
EXPORT_SYMBOL_GPL
(
ide_pio_timings
);
EXPORT_SYMBOL_GPL
(
ide_pio_timings
);
/*
* Shared data/functions for determining best PIO mode for an IDE drive.
* Most of this stuff originally lived in cmd640.c, and changes to the
* ide_pio_blacklist[] table should be made with EXTREME CAUTION to avoid
* breaking the fragile cmd640.c support.
*/
/*
/*
* Black list. Some drives incorrectly report their maximal PIO mode,
* Black list. Some drives incorrectly report their maximal PIO mode,
* at least in respect to CMD640. Here we keep info on some known drives.
* at least in respect to CMD640. Here we keep info on some known drives.
...
...
drivers/ide/ide-probe.c
View file @
7cc6719e
...
@@ -649,10 +649,13 @@ static void hwif_register (ide_hwif_t *hwif)
...
@@ -649,10 +649,13 @@ static void hwif_register (ide_hwif_t *hwif)
/* register with global device tree */
/* register with global device tree */
strlcpy
(
hwif
->
gendev
.
bus_id
,
hwif
->
name
,
BUS_ID_SIZE
);
strlcpy
(
hwif
->
gendev
.
bus_id
,
hwif
->
name
,
BUS_ID_SIZE
);
hwif
->
gendev
.
driver_data
=
hwif
;
hwif
->
gendev
.
driver_data
=
hwif
;
if
(
hwif
->
gendev
.
parent
==
NULL
)
{
if
(
hwif
->
pci_dev
)
if
(
hwif
->
pci_dev
)
hwif
->
gendev
.
parent
=
&
hwif
->
pci_dev
->
dev
;
hwif
->
gendev
.
parent
=
&
hwif
->
pci_dev
->
dev
;
else
else
hwif
->
gendev
.
parent
=
NULL
;
/* Would like to do = &device_legacy */
/* Would like to do = &device_legacy */
hwif
->
gendev
.
parent
=
NULL
;
}
device_register
(
&
hwif
->
gendev
);
device_register
(
&
hwif
->
gendev
);
}
}
...
@@ -770,8 +773,7 @@ void probe_hwif (ide_hwif_t *hwif)
...
@@ -770,8 +773,7 @@ void probe_hwif (ide_hwif_t *hwif)
*/
*/
for
(
unit
=
0
;
unit
<
MAX_DRIVES
;
++
unit
)
{
for
(
unit
=
0
;
unit
<
MAX_DRIVES
;
++
unit
)
{
ide_drive_t
*
drive
=
&
hwif
->
drives
[
unit
];
ide_drive_t
*
drive
=
&
hwif
->
drives
[
unit
];
drive
->
dn
=
((
hwif
->
channel
?
2
:
0
)
+
unit
);
drive
->
dn
=
(
hwif
->
channel
?
2
:
0
)
+
unit
;
hwif
->
drives
[
unit
].
dn
=
((
hwif
->
channel
?
2
:
0
)
+
unit
);
(
void
)
probe_for_drive
(
drive
);
(
void
)
probe_for_drive
(
drive
);
if
(
drive
->
present
&&
!
hwif
->
present
)
{
if
(
drive
->
present
&&
!
hwif
->
present
)
{
hwif
->
present
=
1
;
hwif
->
present
=
1
;
...
@@ -945,15 +947,10 @@ static int ide_init_queue(ide_drive_t *drive)
...
@@ -945,15 +947,10 @@ static int ide_init_queue(ide_drive_t *drive)
if
(
drive
->
disk
)
if
(
drive
->
disk
)
drive
->
disk
->
queue
=
drive
->
queue
;
drive
->
disk
->
queue
=
drive
->
queue
;
return
0
;
/* needs drive->queue to be set */
}
/*
* Setup the drive for request handling.
*/
static
void
ide_init_drive
(
ide_drive_t
*
drive
)
{
ide_toggle_bounce
(
drive
,
1
);
ide_toggle_bounce
(
drive
,
1
);
return
0
;
}
}
/*
/*
...
@@ -1068,10 +1065,9 @@ static int init_irq (ide_hwif_t *hwif)
...
@@ -1068,10 +1065,9 @@ static int init_irq (ide_hwif_t *hwif)
}
}
/*
/*
* Link any new drives into the hwgroup, allocate
* For any present drive:
* the block device queue and initialize the drive.
* - allocate the block device queue
* Note that ide_init_drive sends commands to the new
* - link drive into the hwgroup
* drive.
*/
*/
for
(
index
=
0
;
index
<
MAX_DRIVES
;
++
index
)
{
for
(
index
=
0
;
index
<
MAX_DRIVES
;
++
index
)
{
ide_drive_t
*
drive
=
&
hwif
->
drives
[
index
];
ide_drive_t
*
drive
=
&
hwif
->
drives
[
index
];
...
@@ -1092,7 +1088,6 @@ static int init_irq (ide_hwif_t *hwif)
...
@@ -1092,7 +1088,6 @@ static int init_irq (ide_hwif_t *hwif)
hwgroup
->
drive
->
next
=
drive
;
hwgroup
->
drive
->
next
=
drive
;
}
}
spin_unlock_irq
(
&
ide_lock
);
spin_unlock_irq
(
&
ide_lock
);
ide_init_drive
(
drive
);
}
}
#if !defined(__mc68000__) && !defined(CONFIG_APUS) && !defined(__sparc__)
#if !defined(__mc68000__) && !defined(CONFIG_APUS) && !defined(__sparc__)
...
@@ -1303,31 +1298,6 @@ int hwif_init (ide_hwif_t *hwif)
...
@@ -1303,31 +1298,6 @@ int hwif_init (ide_hwif_t *hwif)
EXPORT_SYMBOL
(
hwif_init
);
EXPORT_SYMBOL
(
hwif_init
);
int
export_ide_init_queue
(
ide_drive_t
*
drive
)
{
if
(
ide_init_queue
(
drive
))
return
1
;
ide_init_drive
(
drive
);
return
0
;
}
EXPORT_SYMBOL
(
export_ide_init_queue
);
u8
export_probe_for_drive
(
ide_drive_t
*
drive
)
{
return
probe_for_drive
(
drive
);
}
EXPORT_SYMBOL
(
export_probe_for_drive
);
int
ideprobe_init
(
void
);
static
ide_module_t
ideprobe_module
=
{
IDE_PROBE_MODULE
,
ideprobe_init
,
NULL
};
int
ideprobe_init
(
void
)
int
ideprobe_init
(
void
)
{
{
unsigned
int
index
;
unsigned
int
index
;
...
@@ -1359,7 +1329,7 @@ int ideprobe_init (void)
...
@@ -1359,7 +1329,7 @@ int ideprobe_init (void)
}
}
}
}
if
(
!
ide_probe
)
if
(
!
ide_probe
)
ide_probe
=
&
ideprobe_
module
;
ide_probe
=
&
ideprobe_
init
;
MOD_DEC_USE_COUNT
;
MOD_DEC_USE_COUNT
;
return
0
;
return
0
;
}
}
...
...
drivers/ide/ide.c
View file @
7cc6719e
...
@@ -161,8 +161,6 @@
...
@@ -161,8 +161,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/bitops.h>
#include <asm/bitops.h>
#include "ide_modes.h"
/* default maximum number of failures */
/* default maximum number of failures */
#define IDE_DEFAULT_MAX_FAILURES 1
#define IDE_DEFAULT_MAX_FAILURES 1
...
@@ -180,7 +178,9 @@ static int initializing; /* set while initializing built-in drivers */
...
@@ -180,7 +178,9 @@ static int initializing; /* set while initializing built-in drivers */
DECLARE_MUTEX
(
ide_cfg_sem
);
DECLARE_MUTEX
(
ide_cfg_sem
);
spinlock_t
ide_lock
__cacheline_aligned_in_smp
=
SPIN_LOCK_UNLOCKED
;
spinlock_t
ide_lock
__cacheline_aligned_in_smp
=
SPIN_LOCK_UNLOCKED
;
#ifdef CONFIG_BLK_DEV_IDEPCI
static
int
ide_scan_direction
;
/* THIS was formerly 2.2.x pci=reverse */
static
int
ide_scan_direction
;
/* THIS was formerly 2.2.x pci=reverse */
#endif
#ifdef CONFIG_IDEDMA_AUTO
#ifdef CONFIG_IDEDMA_AUTO
int
noautodma
=
0
;
int
noautodma
=
0
;
...
@@ -190,11 +190,7 @@ int noautodma = 1;
...
@@ -190,11 +190,7 @@ int noautodma = 1;
EXPORT_SYMBOL
(
noautodma
);
EXPORT_SYMBOL
(
noautodma
);
/*
int
(
*
ide_probe
)(
void
);
* ide_modules keeps track of the available IDE chipset/probe/driver modules.
*/
ide_module_t
*
ide_chipsets
;
ide_module_t
*
ide_probe
;
/*
/*
* This is declared extern in ide.h, for access by other IDE modules:
* This is declared extern in ide.h, for access by other IDE modules:
...
@@ -452,7 +448,7 @@ void ide_probe_module (void)
...
@@ -452,7 +448,7 @@ void ide_probe_module (void)
(
void
)
request_module
(
"ide-probe-mod"
);
(
void
)
request_module
(
"ide-probe-mod"
);
#endif
/* (CONFIG_KMOD) && (CONFIG_BLK_DEV_IDE_MODULE) */
#endif
/* (CONFIG_KMOD) && (CONFIG_BLK_DEV_IDE_MODULE) */
}
else
{
}
else
{
(
void
)
ide_probe
->
init
();
(
void
)
ide_probe
();
}
}
}
}
...
@@ -1045,21 +1041,6 @@ int ide_register_hw (hw_regs_t *hw, ide_hwif_t **hwifp)
...
@@ -1045,21 +1041,6 @@ int ide_register_hw (hw_regs_t *hw, ide_hwif_t **hwifp)
EXPORT_SYMBOL
(
ide_register_hw
);
EXPORT_SYMBOL
(
ide_register_hw
);
/*
* Compatibility function with existing drivers. If you want
* something different, use the function above.
*/
int
ide_register
(
int
arg1
,
int
arg2
,
int
irq
)
{
hw_regs_t
hw
;
ide_init_hwif_ports
(
&
hw
,
(
unsigned
long
)
arg1
,
(
unsigned
long
)
arg2
,
NULL
);
hw
.
irq
=
irq
;
return
ide_register_hw
(
&
hw
,
NULL
);
}
EXPORT_SYMBOL
(
ide_register
);
/*
/*
* Locks for IDE setting functionality
* Locks for IDE setting functionality
*/
*/
...
@@ -1658,11 +1639,15 @@ int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd,
...
@@ -1658,11 +1639,15 @@ int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd,
case
HDIO_SCAN_HWIF
:
case
HDIO_SCAN_HWIF
:
{
{
hw_regs_t
hw
;
int
args
[
3
];
int
args
[
3
];
if
(
!
capable
(
CAP_SYS_RAWIO
))
return
-
EACCES
;
if
(
!
capable
(
CAP_SYS_RAWIO
))
return
-
EACCES
;
if
(
copy_from_user
(
args
,
(
void
*
)
arg
,
3
*
sizeof
(
int
)))
if
(
copy_from_user
(
args
,
(
void
*
)
arg
,
3
*
sizeof
(
int
)))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
ide_register
(
args
[
0
],
args
[
1
],
args
[
2
])
==
-
1
)
ide_init_hwif_ports
(
&
hw
,
(
unsigned
long
)
args
[
0
],
(
unsigned
long
)
args
[
1
],
NULL
);
hw
.
irq
=
args
[
2
];
if
(
ide_register_hw
(
&
hw
,
NULL
)
==
-
1
)
return
-
EIO
;
return
-
EIO
;
return
0
;
return
0
;
}
}
...
...
drivers/ide/ide_modes.h
deleted
100644 → 0
View file @
6b711861
/*
* linux/drivers/ide/ide_modes.h
*
* Copyright (C) 1996 Linus Torvalds, Igor Abramov, and Mark Lord
*/
#ifndef _IDE_MODES_H
#define _IDE_MODES_H
#include <linux/config.h>
/*
* Shared data/functions for determining best PIO mode for an IDE drive.
* Most of this stuff originally lived in cmd640.c, and changes to the
* ide_pio_blacklist[] table should be made with EXTREME CAUTION to avoid
* breaking the fragile cmd640.c support.
*/
/*
* Standard (generic) timings for PIO modes, from ATA2 specification.
* These timings are for access to the IDE data port register *only*.
* Some drives may specify a mode, while also specifying a different
* value for cycle_time (from drive identification data).
*/
typedef
struct
ide_pio_timings_s
{
int
setup_time
;
/* Address setup (ns) minimum */
int
active_time
;
/* Active pulse (ns) minimum */
int
cycle_time
;
/* Cycle time (ns) minimum = (setup + active + recovery) */
}
ide_pio_timings_t
;
typedef
struct
ide_pio_data_s
{
u8
pio_mode
;
u8
use_iordy
;
u8
overridden
;
u8
blacklisted
;
unsigned
int
cycle_time
;
}
ide_pio_data_t
;
u8
ide_get_best_pio_mode
(
ide_drive_t
*
drive
,
u8
mode_wanted
,
u8
max_mode
,
ide_pio_data_t
*
d
);
extern
const
ide_pio_timings_t
ide_pio_timings
[
6
];
#endif
/* _IDE_MODES_H */
drivers/ide/legacy/ali14xx.c
View file @
7cc6719e
...
@@ -54,8 +54,6 @@
...
@@ -54,8 +54,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
/* port addresses for auto-detection */
/* port addresses for auto-detection */
#define ALI_NUM_PORTS 4
#define ALI_NUM_PORTS 4
static
int
ports
[
ALI_NUM_PORTS
]
__initdata
=
{
0x074
,
0x0f4
,
0x034
,
0x0e4
};
static
int
ports
[
ALI_NUM_PORTS
]
__initdata
=
{
0x074
,
0x0f4
,
0x034
,
0x0e4
};
...
...
drivers/ide/legacy/dtc2278.c
View file @
7cc6719e
...
@@ -21,8 +21,6 @@
...
@@ -21,8 +21,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
/*
/*
* Changing this #undef to #define may solve start up problems in some systems.
* Changing this #undef to #define may solve start up problems in some systems.
*/
*/
...
...
drivers/ide/legacy/ht6560b.c
View file @
7cc6719e
...
@@ -53,8 +53,6 @@
...
@@ -53,8 +53,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
/* #define DEBUG */
/* remove comments for DEBUG messages */
/* #define DEBUG */
/* remove comments for DEBUG messages */
/*
/*
...
...
drivers/ide/legacy/qd65xx.c
View file @
7cc6719e
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
#include <asm/system.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
#include "qd65xx.h"
#include "qd65xx.h"
/*
/*
...
...
drivers/ide/legacy/umc8672.c
View file @
7cc6719e
...
@@ -54,8 +54,6 @@
...
@@ -54,8 +54,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
/*
/*
* Default speeds. These can be changed with "auto-tune" and/or hdparm.
* Default speeds. These can be changed with "auto-tune" and/or hdparm.
*/
*/
...
...
drivers/ide/pci/aec62xx.c
View file @
7cc6719e
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
#include "aec62xx.h"
#include "aec62xx.h"
#if defined(DISPLAY_AEC62XX_TIMINGS) && defined(CONFIG_PROC_FS)
#if defined(DISPLAY_AEC62XX_TIMINGS) && defined(CONFIG_PROC_FS)
...
...
drivers/ide/pci/alim15x3.c
View file @
7cc6719e
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
#include "alim15x3.h"
#include "alim15x3.h"
/*
/*
...
...
drivers/ide/pci/cmd640.c
View file @
7cc6719e
...
@@ -115,8 +115,6 @@
...
@@ -115,8 +115,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
/*
/*
* This flag is set in ide.c by the parameter: ide0=cmd640_vlb
* This flag is set in ide.c by the parameter: ide0=cmd640_vlb
*/
*/
...
...
drivers/ide/pci/cmd64x.c
View file @
7cc6719e
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
#include "cmd64x.h"
#include "cmd64x.h"
#if defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS)
#if defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS)
...
...
drivers/ide/pci/cs5520.c
View file @
7cc6719e
...
@@ -51,7 +51,6 @@
...
@@ -51,7 +51,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include "ide_modes.h"
#include "cs5520.h"
#include "cs5520.h"
#if defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS)
#if defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS)
...
...
drivers/ide/pci/cs5530.c
View file @
7cc6719e
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include "ide_modes.h"
#include "cs5530.h"
#include "cs5530.h"
#if defined(DISPLAY_CS5530_TIMINGS) && defined(CONFIG_PROC_FS)
#if defined(DISPLAY_CS5530_TIMINGS) && defined(CONFIG_PROC_FS)
...
...
drivers/ide/pci/cy82c693.c
View file @
7cc6719e
...
@@ -54,7 +54,6 @@
...
@@ -54,7 +54,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
#include "cy82c693.h"
#include "cy82c693.h"
/*
/*
...
@@ -113,7 +112,7 @@ static void compute_clocks (u8 pio, pio_clocks_t *p_pclk)
...
@@ -113,7 +112,7 @@ static void compute_clocks (u8 pio, pio_clocks_t *p_pclk)
/* note: we use the same values for 16bit IOR and IOW
/* note: we use the same values for 16bit IOR and IOW
* those are all the same, since I don't have other
* those are all the same, since I don't have other
* timings than those from ide
_modes.h
* timings than those from ide
-lib.c
*/
*/
p_pclk
->
time_16r
=
(
u8
)
clk1
;
p_pclk
->
time_16r
=
(
u8
)
clk1
;
...
...
drivers/ide/pci/hpt34x.c
View file @
7cc6719e
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include "ide_modes.h"
#include "hpt34x.h"
#include "hpt34x.h"
#if defined(DISPLAY_HPT34X_TIMINGS) && defined(CONFIG_PROC_FS)
#if defined(DISPLAY_HPT34X_TIMINGS) && defined(CONFIG_PROC_FS)
...
...
drivers/ide/pci/hpt366.c
View file @
7cc6719e
...
@@ -62,7 +62,6 @@
...
@@ -62,7 +62,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include "ide_modes.h"
#include "hpt366.h"
#include "hpt366.h"
#if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS)
#if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS)
...
@@ -989,7 +988,40 @@ static void __init init_hwif_hpt366 (ide_hwif_t *hwif)
...
@@ -989,7 +988,40 @@ static void __init init_hwif_hpt366 (ide_hwif_t *hwif)
hwif
->
intrproc
=
&
hpt3xx_intrproc
;
hwif
->
intrproc
=
&
hpt3xx_intrproc
;
hwif
->
maskproc
=
&
hpt3xx_maskproc
;
hwif
->
maskproc
=
&
hpt3xx_maskproc
;
pci_read_config_byte
(
hwif
->
pci_dev
,
0x5a
,
&
ata66
);
/*
* The HPT37x uses the CBLID pins as outputs for MA15/MA16
* address lines to access an external eeprom. To read valid
* cable detect state the pins must be enabled as inputs.
*/
if
(
hpt_minimum_revision
(
dev
,
8
)
&&
PCI_FUNC
(
dev
->
devfn
)
&
1
)
{
/*
* HPT374 PCI function 1
* - set bit 15 of reg 0x52 to enable TCBLID as input
* - set bit 15 of reg 0x56 to enable FCBLID as input
*/
u16
mcr3
,
mcr6
;
pci_read_config_word
(
dev
,
0x52
,
&
mcr3
);
pci_read_config_word
(
dev
,
0x56
,
&
mcr6
);
pci_write_config_word
(
dev
,
0x52
,
mcr3
|
0x8000
);
pci_write_config_word
(
dev
,
0x56
,
mcr6
|
0x8000
);
/* now read cable id register */
pci_read_config_byte
(
dev
,
0x5a
,
&
ata66
);
pci_write_config_word
(
dev
,
0x52
,
mcr3
);
pci_write_config_word
(
dev
,
0x56
,
mcr6
);
}
else
if
(
hpt_minimum_revision
(
dev
,
3
))
{
/*
* HPT370/372 and 374 pcifn 0
* - clear bit 0 of 0x5b to enable P/SCBLID as inputs
*/
u8
scr2
;
pci_read_config_byte
(
dev
,
0x5b
,
&
scr2
);
pci_write_config_byte
(
dev
,
0x5b
,
scr2
&
~
1
);
/* now read cable id register */
pci_read_config_byte
(
dev
,
0x5a
,
&
ata66
);
pci_write_config_byte
(
dev
,
0x5b
,
scr2
);
}
else
{
pci_read_config_byte
(
dev
,
0x5a
,
&
ata66
);
}
#ifdef DEBUG
#ifdef DEBUG
printk
(
"HPT366: reg5ah=0x%02x ATA-%s Cable Port%d
\n
"
,
printk
(
"HPT366: reg5ah=0x%02x ATA-%s Cable Port%d
\n
"
,
...
...
drivers/ide/pci/it8172.c
View file @
7cc6719e
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/it8172/it8172_int.h>
#include <asm/it8172/it8172_int.h>
#include "ide_modes.h"
#include "it8172.h"
#include "it8172.h"
/*
/*
...
...
drivers/ide/pci/opti621.c
View file @
7cc6719e
...
@@ -104,7 +104,6 @@
...
@@ -104,7 +104,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
#include "opti621.h"
#include "opti621.h"
#define OPTI621_MAX_PIO 3
#define OPTI621_MAX_PIO 3
...
...
drivers/ide/pci/pdc202xx_new.c
View file @
7cc6719e
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include "ide_modes.h"
#include "pdc202xx_new.h"
#include "pdc202xx_new.h"
#define PDC202_DEBUG_CABLE 0
#define PDC202_DEBUG_CABLE 0
...
...
drivers/ide/pci/pdc202xx_old.c
View file @
7cc6719e
...
@@ -46,7 +46,6 @@
...
@@ -46,7 +46,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include "ide_modes.h"
#include "pdc202xx_old.h"
#include "pdc202xx_old.h"
#define PDC202_DEBUG_CABLE 0
#define PDC202_DEBUG_CABLE 0
...
...
drivers/ide/pci/pdcadma.c
View file @
7cc6719e
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include "ide_modes.h"
#include "pdcadma.h"
#include "pdcadma.h"
#if defined(DISPLAY_PDCADMA_TIMINGS) && defined(CONFIG_PROC_FS)
#if defined(DISPLAY_PDCADMA_TIMINGS) && defined(CONFIG_PROC_FS)
...
...
drivers/ide/pci/piix.c
View file @
7cc6719e
...
@@ -103,7 +103,6 @@
...
@@ -103,7 +103,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
#include "piix.h"
#include "piix.h"
static
int
no_piix_dma
;
static
int
no_piix_dma
;
...
...
drivers/ide/pci/sc1200.c
View file @
7cc6719e
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include "ide_modes.h"
#include "sc1200.h"
#include "sc1200.h"
#define SC1200_REV_A 0x00
#define SC1200_REV_A 0x00
...
...
drivers/ide/pci/serverworks.c
View file @
7cc6719e
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
#include "serverworks.h"
#include "serverworks.h"
static
u8
svwks_revision
=
0
;
static
u8
svwks_revision
=
0
;
...
...
drivers/ide/pci/siimage.c
View file @
7cc6719e
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
#include "siimage.h"
#include "siimage.h"
#if defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS)
#if defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS)
...
...
drivers/ide/pci/sis5513.c
View file @
7cc6719e
...
@@ -63,7 +63,6 @@
...
@@ -63,7 +63,6 @@
#include <asm/irq.h>
#include <asm/irq.h>
#include "ide-timing.h"
#include "ide-timing.h"
#include "ide_modes.h"
#include "sis5513.h"
#include "sis5513.h"
/* registers layout and init values are chipset family dependant */
/* registers layout and init values are chipset family dependant */
...
...
drivers/ide/pci/sl82c105.c
View file @
7cc6719e
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/dma.h>
#include "ide_modes.h"
#include "sl82c105.h"
#include "sl82c105.h"
#undef DEBUG
#undef DEBUG
...
...
drivers/ide/pci/slc90e66.c
View file @
7cc6719e
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
#include <asm/io.h>
#include <asm/io.h>
#include "ide_modes.h"
#include "slc90e66.h"
#include "slc90e66.h"
#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS)
#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS)
...
...
drivers/ide/pci/triflex.c
View file @
7cc6719e
...
@@ -41,7 +41,6 @@
...
@@ -41,7 +41,6 @@
#include <linux/ide.h>
#include <linux/ide.h>
#include <linux/init.h>
#include <linux/init.h>
#include "ide_modes.h"
#include "triflex.h"
#include "triflex.h"
static
struct
pci_dev
*
triflex_dev
;
static
struct
pci_dev
*
triflex_dev
;
...
...
drivers/ide/ppc/mpc8xx.c
View file @
7cc6719e
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
#include <asm/machdep.h>
#include <asm/machdep.h>
#include <asm/irq.h>
#include <asm/irq.h>
#include "ide_modes.h"
static
int
identify
(
volatile
u8
*
p
);
static
int
identify
(
volatile
u8
*
p
);
static
void
print_fixed
(
volatile
u8
*
p
);
static
void
print_fixed
(
volatile
u8
*
p
);
static
void
print_funcid
(
int
func
);
static
void
print_funcid
(
int
func
);
...
...
drivers/ide/ppc/pmac.c
View file @
7cc6719e
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
#include <linux/adb.h>
#include <linux/adb.h>
#include <linux/pmu.h>
#include <linux/pmu.h>
#endif
#endif
#include "ide_modes.h"
extern
void
ide_do_request
(
ide_hwgroup_t
*
hwgroup
,
int
masked_irq
);
extern
void
ide_do_request
(
ide_hwgroup_t
*
hwgroup
,
int
masked_irq
);
...
@@ -942,7 +941,7 @@ pmac_ide_build_sglist(ide_drive_t *drive, struct request *rq)
...
@@ -942,7 +941,7 @@ pmac_ide_build_sglist(ide_drive_t *drive, struct request *rq)
if
(
hwif
->
sg_dma_active
)
if
(
hwif
->
sg_dma_active
)
BUG
();
BUG
();
nents
=
blk_rq_map_sg
(
&
drive
->
queue
,
rq
,
sg
);
nents
=
blk_rq_map_sg
(
drive
->
queue
,
rq
,
sg
);
if
(
rq_data_dir
(
rq
)
==
READ
)
if
(
rq_data_dir
(
rq
)
==
READ
)
pmif
->
sg_dma_direction
=
PCI_DMA_FROMDEVICE
;
pmif
->
sg_dma_direction
=
PCI_DMA_FROMDEVICE
;
...
...
include/linux/ide.h
View file @
7cc6719e
...
@@ -1242,21 +1242,6 @@ typedef struct ide_driver_s {
...
@@ -1242,21 +1242,6 @@ typedef struct ide_driver_s {
extern
int
generic_ide_ioctl
(
struct
block_device
*
,
unsigned
,
unsigned
long
);
extern
int
generic_ide_ioctl
(
struct
block_device
*
,
unsigned
,
unsigned
long
);
/*
* IDE modules.
*/
#define IDE_CHIPSET_MODULE 0
/* not supported yet */
#define IDE_PROBE_MODULE 1
typedef
int
(
ide_module_init_proc
)(
void
);
typedef
struct
ide_module_s
{
int
type
;
ide_module_init_proc
*
init
;
void
*
info
;
struct
ide_module_s
*
next
;
}
ide_module_t
;
typedef
struct
ide_devices_s
{
typedef
struct
ide_devices_s
{
char
name
[
4
];
/* hdX */
char
name
[
4
];
/* hdX */
unsigned
attached
:
1
;
/* native */
unsigned
attached
:
1
;
/* native */
...
@@ -1274,8 +1259,7 @@ typedef struct ide_devices_s {
...
@@ -1274,8 +1259,7 @@ typedef struct ide_devices_s {
*/
*/
#ifndef _IDE_C
#ifndef _IDE_C
extern
ide_hwif_t
ide_hwifs
[];
/* master data repository */
extern
ide_hwif_t
ide_hwifs
[];
/* master data repository */
extern
ide_module_t
*
ide_chipsets
;
extern
int
(
*
ide_probe
)(
void
);
extern
ide_module_t
*
ide_probe
;
extern
ide_devices_t
*
idedisk
;
extern
ide_devices_t
*
idedisk
;
extern
ide_devices_t
*
idecd
;
extern
ide_devices_t
*
idecd
;
...
@@ -1772,8 +1756,6 @@ extern int ide_hwif_request_regions(ide_hwif_t *hwif);
...
@@ -1772,8 +1756,6 @@ extern int ide_hwif_request_regions(ide_hwif_t *hwif);
extern
void
ide_hwif_release_regions
(
ide_hwif_t
*
hwif
);
extern
void
ide_hwif_release_regions
(
ide_hwif_t
*
hwif
);
extern
void
ide_unregister
(
unsigned
int
index
);
extern
void
ide_unregister
(
unsigned
int
index
);
extern
int
export_ide_init_queue
(
ide_drive_t
*
);
extern
u8
export_probe_for_drive
(
ide_drive_t
*
);
extern
int
probe_hwif_init
(
ide_hwif_t
*
);
extern
int
probe_hwif_init
(
ide_hwif_t
*
);
static
inline
void
*
ide_get_hwifdata
(
ide_hwif_t
*
hwif
)
static
inline
void
*
ide_get_hwifdata
(
ide_hwif_t
*
hwif
)
...
@@ -1794,6 +1776,24 @@ extern char *ide_xfer_verbose(u8 xfer_rate);
...
@@ -1794,6 +1776,24 @@ extern char *ide_xfer_verbose(u8 xfer_rate);
extern
void
ide_toggle_bounce
(
ide_drive_t
*
drive
,
int
on
);
extern
void
ide_toggle_bounce
(
ide_drive_t
*
drive
,
int
on
);
extern
int
ide_set_xfer_rate
(
ide_drive_t
*
drive
,
u8
rate
);
extern
int
ide_set_xfer_rate
(
ide_drive_t
*
drive
,
u8
rate
);
typedef
struct
ide_pio_timings_s
{
int
setup_time
;
/* Address setup (ns) minimum */
int
active_time
;
/* Active pulse (ns) minimum */
int
cycle_time
;
/* Cycle time (ns) minimum = (setup + active + recovery) */
}
ide_pio_timings_t
;
typedef
struct
ide_pio_data_s
{
u8
pio_mode
;
u8
use_iordy
;
u8
overridden
;
u8
blacklisted
;
unsigned
int
cycle_time
;
}
ide_pio_data_t
;
extern
u8
ide_get_best_pio_mode
(
ide_drive_t
*
drive
,
u8
mode_wanted
,
u8
max_mode
,
ide_pio_data_t
*
d
);
extern
const
ide_pio_timings_t
ide_pio_timings
[
6
];
extern
spinlock_t
ide_lock
;
extern
spinlock_t
ide_lock
;
extern
struct
semaphore
ide_cfg_sem
;
extern
struct
semaphore
ide_cfg_sem
;
/*
/*
...
...
ipc/msg.c
View file @
7cc6719e
...
@@ -707,7 +707,7 @@ asmlinkage long sys_msgsnd (int msqid, struct msgbuf *msgp, size_t msgsz, int ms
...
@@ -707,7 +707,7 @@ asmlinkage long sys_msgsnd (int msqid, struct msgbuf *msgp, size_t msgsz, int ms
goto
retry
;
goto
retry
;
}
}
msq
->
q_lspid
=
current
->
p
id
;
msq
->
q_lspid
=
current
->
tg
id
;
msq
->
q_stime
=
get_seconds
();
msq
->
q_stime
=
get_seconds
();
if
(
!
pipelined_send
(
msq
,
msg
))
{
if
(
!
pipelined_send
(
msq
,
msg
))
{
...
@@ -801,7 +801,7 @@ asmlinkage long sys_msgrcv (int msqid, struct msgbuf *msgp, size_t msgsz,
...
@@ -801,7 +801,7 @@ asmlinkage long sys_msgrcv (int msqid, struct msgbuf *msgp, size_t msgsz,
list_del
(
&
msg
->
m_list
);
list_del
(
&
msg
->
m_list
);
msq
->
q_qnum
--
;
msq
->
q_qnum
--
;
msq
->
q_rtime
=
get_seconds
();
msq
->
q_rtime
=
get_seconds
();
msq
->
q_lrpid
=
current
->
p
id
;
msq
->
q_lrpid
=
current
->
tg
id
;
msq
->
q_cbytes
-=
msg
->
m_ts
;
msq
->
q_cbytes
-=
msg
->
m_ts
;
atomic_sub
(
msg
->
m_ts
,
&
msg_bytes
);
atomic_sub
(
msg
->
m_ts
,
&
msg_bytes
);
atomic_dec
(
&
msg_hdrs
);
atomic_dec
(
&
msg_hdrs
);
...
...
ipc/sem.c
View file @
7cc6719e
...
@@ -664,7 +664,7 @@ static int semctl_main(int semid, int semnum, int cmd, int version, union semun
...
@@ -664,7 +664,7 @@ static int semctl_main(int semid, int semnum, int cmd, int version, union semun
for
(
un
=
sma
->
undo
;
un
;
un
=
un
->
id_next
)
for
(
un
=
sma
->
undo
;
un
;
un
=
un
->
id_next
)
un
->
semadj
[
semnum
]
=
0
;
un
->
semadj
[
semnum
]
=
0
;
curr
->
semval
=
val
;
curr
->
semval
=
val
;
curr
->
sempid
=
current
->
p
id
;
curr
->
sempid
=
current
->
tg
id
;
sma
->
sem_ctime
=
get_seconds
();
sma
->
sem_ctime
=
get_seconds
();
/* maybe some queued-up processes were waiting for this */
/* maybe some queued-up processes were waiting for this */
update_queue
(
sma
);
update_queue
(
sma
);
...
@@ -1052,7 +1052,7 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops,
...
@@ -1052,7 +1052,7 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops,
if
(
error
)
if
(
error
)
goto
out_unlock_free
;
goto
out_unlock_free
;
error
=
try_atomic_semop
(
sma
,
sops
,
nsops
,
un
,
current
->
p
id
);
error
=
try_atomic_semop
(
sma
,
sops
,
nsops
,
un
,
current
->
tg
id
);
if
(
error
<=
0
)
if
(
error
<=
0
)
goto
update
;
goto
update
;
...
@@ -1064,7 +1064,7 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops,
...
@@ -1064,7 +1064,7 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops,
queue
.
sops
=
sops
;
queue
.
sops
=
sops
;
queue
.
nsops
=
nsops
;
queue
.
nsops
=
nsops
;
queue
.
undo
=
un
;
queue
.
undo
=
un
;
queue
.
pid
=
current
->
p
id
;
queue
.
pid
=
current
->
tg
id
;
queue
.
id
=
semid
;
queue
.
id
=
semid
;
if
(
alter
)
if
(
alter
)
append_to_queue
(
sma
,
&
queue
);
append_to_queue
(
sma
,
&
queue
);
...
@@ -1206,7 +1206,7 @@ void exit_sem(struct task_struct *tsk)
...
@@ -1206,7 +1206,7 @@ void exit_sem(struct task_struct *tsk)
sem
->
semval
+=
u
->
semadj
[
i
];
sem
->
semval
+=
u
->
semadj
[
i
];
if
(
sem
->
semval
<
0
)
if
(
sem
->
semval
<
0
)
sem
->
semval
=
0
;
/* shouldn't happen */
sem
->
semval
=
0
;
/* shouldn't happen */
sem
->
sempid
=
current
->
p
id
;
sem
->
sempid
=
current
->
tg
id
;
}
}
}
}
sma
->
sem_otime
=
get_seconds
();
sma
->
sem_otime
=
get_seconds
();
...
...
ipc/shm.c
View file @
7cc6719e
...
@@ -89,7 +89,7 @@ static inline void shm_inc (int id) {
...
@@ -89,7 +89,7 @@ static inline void shm_inc (int id) {
if
(
!
(
shp
=
shm_lock
(
id
)))
if
(
!
(
shp
=
shm_lock
(
id
)))
BUG
();
BUG
();
shp
->
shm_atim
=
get_seconds
();
shp
->
shm_atim
=
get_seconds
();
shp
->
shm_lprid
=
current
->
p
id
;
shp
->
shm_lprid
=
current
->
tg
id
;
shp
->
shm_nattch
++
;
shp
->
shm_nattch
++
;
shm_unlock
(
shp
);
shm_unlock
(
shp
);
}
}
...
@@ -136,7 +136,7 @@ static void shm_close (struct vm_area_struct *shmd)
...
@@ -136,7 +136,7 @@ static void shm_close (struct vm_area_struct *shmd)
/* remove from the list of attaches of the shm segment */
/* remove from the list of attaches of the shm segment */
if
(
!
(
shp
=
shm_lock
(
id
)))
if
(
!
(
shp
=
shm_lock
(
id
)))
BUG
();
BUG
();
shp
->
shm_lprid
=
current
->
p
id
;
shp
->
shm_lprid
=
current
->
tg
id
;
shp
->
shm_dtim
=
get_seconds
();
shp
->
shm_dtim
=
get_seconds
();
shp
->
shm_nattch
--
;
shp
->
shm_nattch
--
;
if
(
shp
->
shm_nattch
==
0
&&
if
(
shp
->
shm_nattch
==
0
&&
...
@@ -209,7 +209,7 @@ static int newseg (key_t key, int shmflg, size_t size)
...
@@ -209,7 +209,7 @@ static int newseg (key_t key, int shmflg, size_t size)
if
(
id
==
-
1
)
if
(
id
==
-
1
)
goto
no_id
;
goto
no_id
;
shp
->
shm_cprid
=
current
->
p
id
;
shp
->
shm_cprid
=
current
->
tg
id
;
shp
->
shm_lprid
=
0
;
shp
->
shm_lprid
=
0
;
shp
->
shm_atim
=
shp
->
shm_dtim
=
0
;
shp
->
shm_atim
=
shp
->
shm_dtim
=
0
;
shp
->
shm_ctim
=
get_seconds
();
shp
->
shm_ctim
=
get_seconds
();
...
...
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