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
4e4d6a6f
Commit
4e4d6a6f
authored
May 15, 2003
by
David S. Miller
Committed by
David S. Miller
May 15, 2003
Browse files
Options
Browse Files
Download
Plain Diff
Merge nuts.ninka.net:/home/davem/src/BK/network-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
f07c72a1
25f38b5d
Changes
35
Show whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
239 additions
and
388 deletions
+239
-388
arch/i386/kernel/cpu/mtrr/if.c
arch/i386/kernel/cpu/mtrr/if.c
+1
-1
arch/i386/kernel/io_apic.c
arch/i386/kernel/io_apic.c
+8
-0
arch/i386/kernel/smpboot.c
arch/i386/kernel/smpboot.c
+2
-0
arch/i386/kernel/sysenter.c
arch/i386/kernel/sysenter.c
+0
-15
arch/i386/mm/hugetlbpage.c
arch/i386/mm/hugetlbpage.c
+0
-4
arch/ia64/ia32/binfmt_elf32.c
arch/ia64/ia32/binfmt_elf32.c
+2
-2
arch/ia64/mm/hugetlbpage.c
arch/ia64/mm/hugetlbpage.c
+1
-4
arch/s390/kernel/compat_exec.c
arch/s390/kernel/compat_exec.c
+2
-3
arch/x86_64/ia32/ia32_binfmt.c
arch/x86_64/ia32/ia32_binfmt.c
+2
-4
drivers/block/DAC960.c
drivers/block/DAC960.c
+120
-187
drivers/block/DAC960.h
drivers/block/DAC960.h
+18
-119
drivers/block/cciss_scsi.c
drivers/block/cciss_scsi.c
+2
-2
drivers/block/loop.c
drivers/block/loop.c
+6
-3
drivers/char/ipmi/ipmi_msghandler.c
drivers/char/ipmi/ipmi_msghandler.c
+4
-4
drivers/char/mem.c
drivers/char/mem.c
+1
-1
drivers/char/pcmcia/synclink_cs.c
drivers/char/pcmcia/synclink_cs.c
+12
-13
drivers/hotplug/acpiphp_glue.c
drivers/hotplug/acpiphp_glue.c
+1
-0
drivers/isdn/i4l/isdn_x25iface.c
drivers/isdn/i4l/isdn_x25iface.c
+2
-0
drivers/isdn/pcbit/drv.c
drivers/isdn/pcbit/drv.c
+1
-0
drivers/md/dm-ioctl.c
drivers/md/dm-ioctl.c
+2
-0
drivers/md/dm-target.c
drivers/md/dm-target.c
+2
-0
drivers/media/radio/miropcm20-rds.c
drivers/media/radio/miropcm20-rds.c
+1
-0
drivers/media/video/bt819.c
drivers/media/video/bt819.c
+1
-0
drivers/media/video/videodev.c
drivers/media/video/videodev.c
+3
-1
drivers/message/i2o/i2o_core.c
drivers/message/i2o/i2o_core.c
+1
-2
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_cmdset_0001.c
+2
-0
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/chips/cfi_cmdset_0002.c
+2
-0
drivers/mtd/chips/sharp.c
drivers/mtd/chips/sharp.c
+3
-1
drivers/net/cs89x0.c
drivers/net/cs89x0.c
+8
-3
fs/exec.c
fs/exec.c
+7
-6
include/asm-i386/mach-visws/mach_apic.h
include/asm-i386/mach-visws/mach_apic.h
+8
-0
include/linux/mm.h
include/linux/mm.h
+8
-3
include/linux/smp.h
include/linux/smp.h
+0
-4
include/linux/spinlock.h
include/linux/spinlock.h
+5
-5
sound/core/info.c
sound/core/info.c
+1
-1
No files found.
arch/i386/kernel/cpu/mtrr/if.c
View file @
4e4d6a6f
...
@@ -49,7 +49,7 @@ mtrr_file_del(unsigned long base, unsigned long size,
...
@@ -49,7 +49,7 @@ mtrr_file_del(unsigned long base, unsigned long size,
struct
file
*
file
,
int
page
)
struct
file
*
file
,
int
page
)
{
{
int
reg
;
int
reg
;
unsigned
int
*
fcount
=
file
->
private_data
;
unsigned
int
*
fcount
=
FILE_FCOUNT
(
file
)
;
if
(
!
page
)
{
if
(
!
page
)
{
if
((
base
&
(
PAGE_SIZE
-
1
))
||
(
size
&
(
PAGE_SIZE
-
1
)))
if
((
base
&
(
PAGE_SIZE
-
1
))
||
(
size
&
(
PAGE_SIZE
-
1
)))
...
...
arch/i386/kernel/io_apic.c
View file @
4e4d6a6f
...
@@ -220,6 +220,14 @@ void clear_IO_APIC_pin(unsigned int apic, unsigned int pin)
...
@@ -220,6 +220,14 @@ void clear_IO_APIC_pin(unsigned int apic, unsigned int pin)
struct
IO_APIC_route_entry
entry
;
struct
IO_APIC_route_entry
entry
;
unsigned
long
flags
;
unsigned
long
flags
;
/* Check delivery_mode to be sure we're not clearing an SMI pin */
spin_lock_irqsave
(
&
ioapic_lock
,
flags
);
*
(((
int
*
)
&
entry
)
+
0
)
=
io_apic_read
(
apic
,
0x10
+
2
*
pin
);
*
(((
int
*
)
&
entry
)
+
1
)
=
io_apic_read
(
apic
,
0x11
+
2
*
pin
);
spin_unlock_irqrestore
(
&
ioapic_lock
,
flags
);
if
(
entry
.
delivery_mode
==
dest_SMI
)
return
;
/*
/*
* Disable it in the IO-APIC irq-routing table:
* Disable it in the IO-APIC irq-routing table:
*/
*/
...
...
arch/i386/kernel/smpboot.c
View file @
4e4d6a6f
...
@@ -1149,7 +1149,9 @@ int __devinit __cpu_up(unsigned int cpu)
...
@@ -1149,7 +1149,9 @@ int __devinit __cpu_up(unsigned int cpu)
void
__init
smp_cpus_done
(
unsigned
int
max_cpus
)
void
__init
smp_cpus_done
(
unsigned
int
max_cpus
)
{
{
#ifdef CONFIG_X86_IO_APIC
setup_ioapic_dest
(
TARGET_CPUS
);
setup_ioapic_dest
(
TARGET_CPUS
);
#endif
zap_low_mappings
();
zap_low_mappings
();
}
}
...
...
arch/i386/kernel/sysenter.c
View file @
4e4d6a6f
...
@@ -21,21 +21,6 @@
...
@@ -21,21 +21,6 @@
extern
asmlinkage
void
sysenter_entry
(
void
);
extern
asmlinkage
void
sysenter_entry
(
void
);
/*
* Create a per-cpu fake "SEP thread" stack, so that we can
* enter the kernel without having to worry about things like
* "current" etc not working (debug traps and NMI's can happen
* before we can switch over to the "real" thread).
*
* Return the resulting fake stack pointer.
*/
struct
fake_sep_struct
{
struct
thread_info
thread
;
struct
task_struct
task
;
unsigned
char
trampoline
[
32
]
__attribute__
((
aligned
(
1024
)));
unsigned
char
stack
[
0
];
}
__attribute__
((
aligned
(
8192
)));
void
enable_sep_cpu
(
void
*
info
)
void
enable_sep_cpu
(
void
*
info
)
{
{
int
cpu
=
get_cpu
();
int
cpu
=
get_cpu
();
...
...
arch/i386/mm/hugetlbpage.c
View file @
4e4d6a6f
...
@@ -20,8 +20,6 @@
...
@@ -20,8 +20,6 @@
#include <asm/tlb.h>
#include <asm/tlb.h>
#include <asm/tlbflush.h>
#include <asm/tlbflush.h>
#include <linux/sysctl.h>
static
long
htlbpagemem
;
static
long
htlbpagemem
;
int
htlbpage_max
;
int
htlbpage_max
;
static
long
htlbzone_pages
;
static
long
htlbzone_pages
;
...
@@ -398,8 +396,6 @@ int set_hugetlb_mem_size(int count)
...
@@ -398,8 +396,6 @@ int set_hugetlb_mem_size(int count)
{
{
int
lcount
;
int
lcount
;
struct
page
*
page
;
struct
page
*
page
;
extern
long
htlbzone_pages
;
extern
struct
list_head
htlbpage_freelist
;
if
(
count
<
0
)
if
(
count
<
0
)
lcount
=
count
;
lcount
=
count
;
...
...
arch/ia64/ia32/binfmt_elf32.c
View file @
4e4d6a6f
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include <linux/config.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <asm/param.h>
#include <asm/param.h>
#include <asm/signal.h>
#include <asm/signal.h>
...
@@ -40,7 +41,6 @@
...
@@ -40,7 +41,6 @@
#define CLOCKS_PER_SEC IA32_CLOCKS_PER_SEC
#define CLOCKS_PER_SEC IA32_CLOCKS_PER_SEC
extern
void
ia64_elf32_init
(
struct
pt_regs
*
regs
);
extern
void
ia64_elf32_init
(
struct
pt_regs
*
regs
);
extern
void
put_dirty_page
(
struct
task_struct
*
tsk
,
struct
page
*
page
,
unsigned
long
address
);
static
void
elf32_set_personality
(
void
);
static
void
elf32_set_personality
(
void
);
...
@@ -200,7 +200,7 @@ ia32_setup_arg_pages (struct linux_binprm *bprm)
...
@@ -200,7 +200,7 @@ ia32_setup_arg_pages (struct linux_binprm *bprm)
struct
page
*
page
=
bprm
->
page
[
i
];
struct
page
*
page
=
bprm
->
page
[
i
];
if
(
page
)
{
if
(
page
)
{
bprm
->
page
[
i
]
=
NULL
;
bprm
->
page
[
i
]
=
NULL
;
put_dirty_page
(
current
,
page
,
stack_base
);
put_dirty_page
(
current
,
page
,
stack_base
,
PAGE_COPY
);
}
}
stack_base
+=
PAGE_SIZE
;
stack_base
+=
PAGE_SIZE
;
}
}
...
...
arch/ia64/mm/hugetlbpage.c
View file @
4e4d6a6f
...
@@ -12,13 +12,12 @@
...
@@ -12,13 +12,12 @@
#include <linux/pagemap.h>
#include <linux/pagemap.h>
#include <linux/smp_lock.h>
#include <linux/smp_lock.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/sysctl.h>
#include <asm/mman.h>
#include <asm/mman.h>
#include <asm/pgalloc.h>
#include <asm/pgalloc.h>
#include <asm/tlb.h>
#include <asm/tlb.h>
#include <asm/tlbflush.h>
#include <asm/tlbflush.h>
#include <linux/sysctl.h>
#define TASK_HPAGE_BASE (REGION_HPAGE << REGION_SHIFT)
#define TASK_HPAGE_BASE (REGION_HPAGE << REGION_SHIFT)
static
long
htlbpagemem
;
static
long
htlbpagemem
;
...
@@ -392,8 +391,6 @@ int set_hugetlb_mem_size(int count)
...
@@ -392,8 +391,6 @@ int set_hugetlb_mem_size(int count)
{
{
int
lcount
;
int
lcount
;
struct
page
*
page
;
struct
page
*
page
;
extern
long
htlbzone_pages
;
extern
struct
list_head
htlbpage_freelist
;
if
(
count
<
0
)
if
(
count
<
0
)
lcount
=
count
;
lcount
=
count
;
...
...
arch/s390/kernel/compat_exec.c
View file @
4e4d6a6f
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include <linux/smp_lock.h>
#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/pagemap.h>
#include <linux/pagemap.h>
#include <linux/mm.h>
#include <linux/highmem.h>
#include <linux/highmem.h>
#include <linux/spinlock.h>
#include <linux/spinlock.h>
#include <linux/binfmts.h>
#include <linux/binfmts.h>
...
@@ -32,8 +33,6 @@
...
@@ -32,8 +33,6 @@
#endif
#endif
extern
void
put_dirty_page
(
struct
task_struct
*
tsk
,
struct
page
*
page
,
unsigned
long
address
);
#undef STACK_TOP
#undef STACK_TOP
#define STACK_TOP TASK31_SIZE
#define STACK_TOP TASK31_SIZE
...
@@ -81,7 +80,7 @@ int setup_arg_pages32(struct linux_binprm *bprm)
...
@@ -81,7 +80,7 @@ int setup_arg_pages32(struct linux_binprm *bprm)
struct
page
*
page
=
bprm
->
page
[
i
];
struct
page
*
page
=
bprm
->
page
[
i
];
if
(
page
)
{
if
(
page
)
{
bprm
->
page
[
i
]
=
NULL
;
bprm
->
page
[
i
]
=
NULL
;
put_dirty_page
(
current
,
page
,
stack_base
);
put_dirty_page
(
current
,
page
,
stack_base
,
PAGE_COPY
);
}
}
stack_base
+=
PAGE_SIZE
;
stack_base
+=
PAGE_SIZE
;
}
}
...
...
arch/x86_64/ia32/ia32_binfmt.c
View file @
4e4d6a6f
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/string.h>
#include <linux/binfmts.h>
#include <linux/binfmts.h>
#include <linux/mm.h>
#include <asm/segment.h>
#include <asm/segment.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/processor.h>
#include <asm/processor.h>
...
@@ -272,9 +273,6 @@ static void elf32_init(struct pt_regs *regs)
...
@@ -272,9 +273,6 @@ static void elf32_init(struct pt_regs *regs)
set_thread_flag
(
TIF_IA32
);
set_thread_flag
(
TIF_IA32
);
}
}
extern
void
put_dirty_page
(
struct
task_struct
*
tsk
,
struct
page
*
page
,
unsigned
long
address
);
int
setup_arg_pages
(
struct
linux_binprm
*
bprm
)
int
setup_arg_pages
(
struct
linux_binprm
*
bprm
)
{
{
unsigned
long
stack_base
;
unsigned
long
stack_base
;
...
@@ -319,7 +317,7 @@ int setup_arg_pages(struct linux_binprm *bprm)
...
@@ -319,7 +317,7 @@ int setup_arg_pages(struct linux_binprm *bprm)
struct
page
*
page
=
bprm
->
page
[
i
];
struct
page
*
page
=
bprm
->
page
[
i
];
if
(
page
)
{
if
(
page
)
{
bprm
->
page
[
i
]
=
NULL
;
bprm
->
page
[
i
]
=
NULL
;
put_dirty_page
(
current
,
page
,
stack_base
);
put_dirty_page
(
current
,
page
,
stack_base
,
PAGE_COPY_EXEC
);
}
}
stack_base
+=
PAGE_SIZE
;
stack_base
+=
PAGE_SIZE
;
}
}
...
...
drivers/block/DAC960.c
View file @
4e4d6a6f
...
@@ -48,8 +48,7 @@
...
@@ -48,8 +48,7 @@
static
DAC960_Controller_T
*
DAC960_Controllers
[
DAC960_MaxControllers
];
static
DAC960_Controller_T
*
DAC960_Controllers
[
DAC960_MaxControllers
];
static
int
DAC960_ControllerCount
;
static
int
DAC960_ControllerCount
;
static
PROC_DirectoryEntry_T
*
DAC960_ProcDirectoryEntry
;
static
struct
proc_dir_entry
*
DAC960_ProcDirectoryEntry
;
static
long
disk_size
(
DAC960_Controller_T
*
p
,
int
drive_nr
)
static
long
disk_size
(
DAC960_Controller_T
*
p
,
int
drive_nr
)
{
{
...
@@ -759,12 +758,15 @@ static void DAC960_ExecuteCommand(DAC960_Command_T *Command)
...
@@ -759,12 +758,15 @@ static void DAC960_ExecuteCommand(DAC960_Command_T *Command)
{
{
DAC960_Controller_T
*
Controller
=
Command
->
Controller
;
DAC960_Controller_T
*
Controller
=
Command
->
Controller
;
DECLARE_COMPLETION
(
Completion
);
DECLARE_COMPLETION
(
Completion
);
unsigned
long
ProcessorF
lags
;
unsigned
long
f
lags
;
Command
->
Completion
=
&
Completion
;
Command
->
Completion
=
&
Completion
;
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorFlags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
DAC960_QueueCommand
(
Command
);
DAC960_QueueCommand
(
Command
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorFlags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
flags
);
if
(
in_interrupt
())
return
;
if
(
in_interrupt
())
return
;
wait_for_completion
(
&
Completion
);
wait_for_completion
(
&
Completion
);
}
}
...
@@ -1132,7 +1134,7 @@ static boolean DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
...
@@ -1132,7 +1134,7 @@ static boolean DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
{
{
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
DAC960_HardwareType_T
hw_type
=
Controller
->
HardwareType
;
DAC960_HardwareType_T
hw_type
=
Controller
->
HardwareType
;
PCI_Device_T
*
PCI_Device
=
Controller
->
PCIDevice
;
struct
pci_dev
*
PCI_Device
=
Controller
->
PCIDevice
;
struct
dma_loaf
*
DmaPages
=
&
Controller
->
DmaPages
;
struct
dma_loaf
*
DmaPages
=
&
Controller
->
DmaPages
;
size_t
DmaPagesSize
;
size_t
DmaPagesSize
;
size_t
CommandMailboxesSize
;
size_t
CommandMailboxesSize
;
...
@@ -1337,7 +1339,7 @@ static boolean DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
...
@@ -1337,7 +1339,7 @@ static boolean DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
*
Controller
)
*
Controller
)
{
{
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
PCI_Device_T
*
PCI_Device
=
Controller
->
PCIDevice
;
struct
pci_dev
*
PCI_Device
=
Controller
->
PCIDevice
;
struct
dma_loaf
*
DmaPages
=
&
Controller
->
DmaPages
;
struct
dma_loaf
*
DmaPages
=
&
Controller
->
DmaPages
;
size_t
DmaPagesSize
;
size_t
DmaPagesSize
;
size_t
CommandMailboxesSize
;
size_t
CommandMailboxesSize
;
...
@@ -1915,8 +1917,8 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
...
@@ -1915,8 +1917,8 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
dma_addr_t
SCSI_NewInquiryUnitSerialNumberDMA
[
DAC960_V1_MaxChannels
];
dma_addr_t
SCSI_NewInquiryUnitSerialNumberDMA
[
DAC960_V1_MaxChannels
];
DAC960_SCSI_Inquiry_UnitSerialNumber_T
*
SCSI_NewInquiryUnitSerialNumberCPU
[
DAC960_V1_MaxChannels
];
DAC960_SCSI_Inquiry_UnitSerialNumber_T
*
SCSI_NewInquiryUnitSerialNumberCPU
[
DAC960_V1_MaxChannels
];
Completion_T
Completions
[
DAC960_V1_MaxChannels
];
struct
completion
Completions
[
DAC960_V1_MaxChannels
];
unsigned
long
ProcessorF
lags
;
unsigned
long
f
lags
;
int
Channel
,
TargetID
;
int
Channel
,
TargetID
;
if
(
!
init_dma_loaf
(
Controller
->
PCIDevice
,
&
local_dma
,
if
(
!
init_dma_loaf
(
Controller
->
PCIDevice
,
&
local_dma
,
...
@@ -1951,7 +1953,7 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
...
@@ -1951,7 +1953,7 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
DAC960_V1_DCDB_T
*
DCDB
=
DCDBs_cpu
[
Channel
];
DAC960_V1_DCDB_T
*
DCDB
=
DCDBs_cpu
[
Channel
];
dma_addr_t
DCDB_dma
=
DCDBs_dma
[
Channel
];
dma_addr_t
DCDB_dma
=
DCDBs_dma
[
Channel
];
DAC960_Command_T
*
Command
=
Controller
->
Commands
[
Channel
];
DAC960_Command_T
*
Command
=
Controller
->
Commands
[
Channel
];
Completion_T
*
Completion
=
&
Completions
[
Channel
];
struct
completion
*
Completion
=
&
Completions
[
Channel
];
init_completion
(
Completion
);
init_completion
(
Completion
);
DAC960_V1_ClearCommand
(
Command
);
DAC960_V1_ClearCommand
(
Command
);
...
@@ -1977,9 +1979,10 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
...
@@ -1977,9 +1979,10 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
DCDB
->
CDB
[
3
]
=
0
;
/* Reserved */
DCDB
->
CDB
[
3
]
=
0
;
/* Reserved */
DCDB
->
CDB
[
4
]
=
sizeof
(
DAC960_SCSI_Inquiry_T
);
DCDB
->
CDB
[
4
]
=
sizeof
(
DAC960_SCSI_Inquiry_T
);
DCDB
->
CDB
[
5
]
=
0
;
/* Control */
DCDB
->
CDB
[
5
]
=
0
;
/* Control */
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorFlags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
DAC960_QueueCommand
(
Command
);
DAC960_QueueCommand
(
Command
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
}
}
/*
/*
* Wait for the problems submitted in the previous loop
* Wait for the problems submitted in the previous loop
...
@@ -1999,7 +2002,7 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
...
@@ -1999,7 +2002,7 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
&
Controller
->
V1
.
InquiryUnitSerialNumber
[
Channel
][
TargetID
];
&
Controller
->
V1
.
InquiryUnitSerialNumber
[
Channel
][
TargetID
];
DAC960_Command_T
*
Command
=
Controller
->
Commands
[
Channel
];
DAC960_Command_T
*
Command
=
Controller
->
Commands
[
Channel
];
DAC960_V1_DCDB_T
*
DCDB
=
DCDBs_cpu
[
Channel
];
DAC960_V1_DCDB_T
*
DCDB
=
DCDBs_cpu
[
Channel
];
Completion_T
*
Completion
=
&
Completions
[
Channel
];
struct
completion
*
Completion
=
&
Completions
[
Channel
];
wait_for_completion
(
Completion
);
wait_for_completion
(
Completion
);
...
@@ -2021,9 +2024,10 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
...
@@ -2021,9 +2024,10 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T
DCDB
->
CDB
[
3
]
=
0
;
/* Reserved */
DCDB
->
CDB
[
3
]
=
0
;
/* Reserved */
DCDB
->
CDB
[
4
]
=
sizeof
(
DAC960_SCSI_Inquiry_UnitSerialNumber_T
);
DCDB
->
CDB
[
4
]
=
sizeof
(
DAC960_SCSI_Inquiry_UnitSerialNumber_T
);
DCDB
->
CDB
[
5
]
=
0
;
/* Control */
DCDB
->
CDB
[
5
]
=
0
;
/* Control */
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorFlags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
DAC960_QueueCommand
(
Command
);
DAC960_QueueCommand
(
Command
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
wait_for_completion
(
Completion
);
wait_for_completion
(
Completion
);
if
(
Command
->
V1
.
CommandStatus
!=
DAC960_V1_NormalCompletion
)
{
if
(
Command
->
V1
.
CommandStatus
!=
DAC960_V1_NormalCompletion
)
{
...
@@ -2457,7 +2461,7 @@ static boolean DAC960_V2_ReportDeviceConfiguration(DAC960_Controller_T
...
@@ -2457,7 +2461,7 @@ static boolean DAC960_V2_ReportDeviceConfiguration(DAC960_Controller_T
static
boolean
DAC960_RegisterBlockDevice
(
DAC960_Controller_T
*
Controller
)
static
boolean
DAC960_RegisterBlockDevice
(
DAC960_Controller_T
*
Controller
)
{
{
int
MajorNumber
=
DAC960_MAJOR
+
Controller
->
ControllerNumber
;
int
MajorNumber
=
DAC960_MAJOR
+
Controller
->
ControllerNumber
;
RequestQueue_T
*
RequestQueue
;
struct
request_queue
*
RequestQueue
;
int
n
;
int
n
;
/*
/*
...
@@ -2642,11 +2646,13 @@ static void DAC960_DetectCleanup(DAC960_Controller_T *Controller)
...
@@ -2642,11 +2646,13 @@ static void DAC960_DetectCleanup(DAC960_Controller_T *Controller)
*/
*/
static
DAC960_Controller_T
*
static
DAC960_Controller_T
*
DAC960_DetectController
(
PCI_Device_T
*
PCI_Device
,
DAC960_DetectController
(
struct
pci_dev
*
PCI_Device
,
const
struct
pci_device_id
*
entry
)
const
struct
pci_device_id
*
entry
)
{
{
struct
DAC960_privdata
*
privdata
=
(
struct
DAC960_privdata
*
)
entry
->
driver_data
;
struct
DAC960_privdata
*
privdata
=
irqreturn_t
(
*
InterruptHandler
)(
int
,
void
*
,
Registers_T
*
)
=
privdata
->
InterruptHandler
;
(
struct
DAC960_privdata
*
)
entry
->
driver_data
;
irqreturn_t
(
*
InterruptHandler
)(
int
,
void
*
,
struct
pt_regs
*
)
=
privdata
->
InterruptHandler
;
unsigned
int
MemoryWindowSize
=
privdata
->
MemoryWindowSize
;
unsigned
int
MemoryWindowSize
=
privdata
->
MemoryWindowSize
;
DAC960_Controller_T
*
Controller
=
NULL
;
DAC960_Controller_T
*
Controller
=
NULL
;
unsigned
char
DeviceFunction
=
PCI_Device
->
devfn
;
unsigned
char
DeviceFunction
=
PCI_Device
->
devfn
;
...
@@ -3001,7 +3007,7 @@ static void DAC960_FinalizeController(DAC960_Controller_T *Controller)
...
@@ -3001,7 +3007,7 @@ static void DAC960_FinalizeController(DAC960_Controller_T *Controller)
{
{
if
(
Controller
->
ControllerInitialized
)
if
(
Controller
->
ControllerInitialized
)
{
{
unsigned
long
ProcessorF
lags
;
unsigned
long
f
lags
;
/*
/*
* Acquiring and releasing lock here eliminates
* Acquiring and releasing lock here eliminates
...
@@ -3019,9 +3025,11 @@ static void DAC960_FinalizeController(DAC960_Controller_T *Controller)
...
@@ -3019,9 +3025,11 @@ static void DAC960_FinalizeController(DAC960_Controller_T *Controller)
* commands that complete from this time on will NOT return
* commands that complete from this time on will NOT return
* their command structure to the free list.
* their command structure to the free list.
*/
*/
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorFlags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
Controller
->
ShutdownMonitoringTimer
=
1
;
Controller
->
ShutdownMonitoringTimer
=
1
;
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorFlags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
flags
);
del_timer_sync
(
&
Controller
->
MonitoringTimer
);
del_timer_sync
(
&
Controller
->
MonitoringTimer
);
if
(
Controller
->
FirmwareType
==
DAC960_V1_Controller
)
if
(
Controller
->
FirmwareType
==
DAC960_V1_Controller
)
{
{
...
@@ -3088,7 +3096,7 @@ DAC960_Probe(struct pci_dev *dev, const struct pci_device_id *entry)
...
@@ -3088,7 +3096,7 @@ DAC960_Probe(struct pci_dev *dev, const struct pci_device_id *entry)
DAC960_Finalize finalizes the DAC960 Driver.
DAC960_Finalize finalizes the DAC960 Driver.
*/
*/
static
void
DAC960_Remove
(
PCI_Device_T
*
PCI_Device
)
static
void
DAC960_Remove
(
struct
pci_dev
*
PCI_Device
)
{
{
int
Controller_Number
=
(
int
)
pci_get_drvdata
(
PCI_Device
);
int
Controller_Number
=
(
int
)
pci_get_drvdata
(
PCI_Device
);
DAC960_Controller_T
*
Controller
=
DAC960_Controllers
[
Controller_Number
];
DAC960_Controller_T
*
Controller
=
DAC960_Controllers
[
Controller_Number
];
...
@@ -3236,8 +3244,8 @@ static void DAC960_V2_QueueReadWriteCommand(DAC960_Command_T *Command)
...
@@ -3236,8 +3244,8 @@ static void DAC960_V2_QueueReadWriteCommand(DAC960_Command_T *Command)
static
boolean
DAC960_ProcessRequest
(
DAC960_Controller_T
*
Controller
,
static
boolean
DAC960_ProcessRequest
(
DAC960_Controller_T
*
Controller
,
boolean
WaitForCommand
)
boolean
WaitForCommand
)
{
{
RequestQueue_T
*
RequestQueue
=
&
Controller
->
RequestQueue
;
struct
request_queue
*
RequestQueue
=
&
Controller
->
RequestQueue
;
IO_Request_T
*
Request
;
struct
request
*
Request
;
DAC960_Command_T
*
Command
;
DAC960_Command_T
*
Command
;
if
(
!
Controller
->
ControllerInitialized
)
if
(
!
Controller
->
ControllerInitialized
)
...
@@ -3293,7 +3301,7 @@ static boolean DAC960_ProcessRequest(DAC960_Controller_T *Controller,
...
@@ -3293,7 +3301,7 @@ static boolean DAC960_ProcessRequest(DAC960_Controller_T *Controller,
static
void
DAC960_queue_partial_rw
(
DAC960_Command_T
*
Command
)
static
void
DAC960_queue_partial_rw
(
DAC960_Command_T
*
Command
)
{
{
DAC960_Controller_T
*
Controller
=
Command
->
Controller
;
DAC960_Controller_T
*
Controller
=
Command
->
Controller
;
IO_Request_T
*
Request
=
Command
->
Request
;
struct
request
*
Request
=
Command
->
Request
;
if
(
Command
->
DmaDirection
==
PCI_DMA_FROMDEVICE
)
if
(
Command
->
DmaDirection
==
PCI_DMA_FROMDEVICE
)
Command
->
CommandType
=
DAC960_ReadRetryCommand
;
Command
->
CommandType
=
DAC960_ReadRetryCommand
;
...
@@ -3324,43 +3332,17 @@ static void DAC960_queue_partial_rw(DAC960_Command_T *Command)
...
@@ -3324,43 +3332,17 @@ static void DAC960_queue_partial_rw(DAC960_Command_T *Command)
return
;
return
;
}
}
/*
DAC960_ProcessRequests attempts to remove as many I/O Requests as possible
from Controller's I/O Request Queue and queue them to the Controller.
*/
static
inline
void
DAC960_ProcessRequests
(
DAC960_Controller_T
*
Controller
)
{
int
Counter
=
0
;
while
(
DAC960_ProcessRequest
(
Controller
,
Counter
++
==
0
))
;
}
/*
/*
DAC960_RequestFunction is the I/O Request Function for DAC960 Controllers.
DAC960_RequestFunction is the I/O Request Function for DAC960 Controllers.
*/
*/
static
void
DAC960_RequestFunction
(
RequestQueue_T
*
RequestQueue
)
static
void
DAC960_RequestFunction
(
struct
request_queue
*
RequestQueue
)
{
{
DAC960_Controller_T
*
Controller
=
int
i
=
0
;
(
DAC960_Controller_T
*
)
RequestQueue
->
queuedata
;
while
(
DAC960_ProcessRequest
(
RequestQueue
->
queuedata
,
(
i
++
==
0
)))
ProcessorFlags_T
ProcessorFlags
;
;
/*
Acquire exclusive access to Controller.
*/
DAC960_AcquireControllerLockRF
(
Controller
,
&
ProcessorFlags
);
/*
Process I/O Requests for Controller.
*/
DAC960_ProcessRequests
(
Controller
);
/*
Release exclusive access to Controller.
*/
DAC960_ReleaseControllerLockRF
(
Controller
,
&
ProcessorFlags
);
}
}
/*
/*
DAC960_ProcessCompletedBuffer performs completion processing for an
DAC960_ProcessCompletedBuffer performs completion processing for an
individual Buffer.
individual Buffer.
...
@@ -3369,7 +3351,7 @@ static void DAC960_RequestFunction(RequestQueue_T *RequestQueue)
...
@@ -3369,7 +3351,7 @@ static void DAC960_RequestFunction(RequestQueue_T *RequestQueue)
static
inline
boolean
DAC960_ProcessCompletedRequest
(
DAC960_Command_T
*
Command
,
static
inline
boolean
DAC960_ProcessCompletedRequest
(
DAC960_Command_T
*
Command
,
boolean
SuccessfulIO
)
boolean
SuccessfulIO
)
{
{
IO_Request_T
*
Request
=
Command
->
Request
;
struct
request
*
Request
=
Command
->
Request
;
int
UpToDate
;
int
UpToDate
;
UpToDate
=
0
;
UpToDate
=
0
;
...
@@ -5174,20 +5156,14 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
...
@@ -5174,20 +5156,14 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
static
irqreturn_t
DAC960_BA_InterruptHandler
(
int
IRQ_Channel
,
static
irqreturn_t
DAC960_BA_InterruptHandler
(
int
IRQ_Channel
,
void
*
DeviceIdentifier
,
void
*
DeviceIdentifier
,
Registers_T
*
InterruptRegisters
)
struct
pt_regs
*
InterruptRegisters
)
{
{
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
DAC960_V2_StatusMailbox_T
*
NextStatusMailbox
;
DAC960_V2_StatusMailbox_T
*
NextStatusMailbox
;
ProcessorFlags_T
ProcessorF
lags
;
unsigned
long
f
lags
;
/*
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
Acquire exclusive access to Controller.
*/
DAC960_AcquireControllerLockIH
(
Controller
,
&
ProcessorFlags
);
/*
Process Hardware Interrupts for Controller.
*/
DAC960_BA_AcknowledgeInterrupt
(
ControllerBaseAddress
);
DAC960_BA_AcknowledgeInterrupt
(
ControllerBaseAddress
);
NextStatusMailbox
=
Controller
->
V2
.
NextStatusMailbox
;
NextStatusMailbox
=
Controller
->
V2
.
NextStatusMailbox
;
while
(
NextStatusMailbox
->
Fields
.
CommandIdentifier
>
0
)
while
(
NextStatusMailbox
->
Fields
.
CommandIdentifier
>
0
)
...
@@ -5210,11 +5186,9 @@ static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel,
...
@@ -5210,11 +5186,9 @@ static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel,
Attempt to remove additional I/O Requests from the Controller's
Attempt to remove additional I/O Requests from the Controller's
I/O Request Queue and queue them to the Controller.
I/O Request Queue and queue them to the Controller.
*/
*/
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
;
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
/*
;
Release exclusive access to Controller.
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_ReleaseControllerLockIH
(
Controller
,
&
ProcessorFlags
);
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
}
}
...
@@ -5226,19 +5200,14 @@ static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel,
...
@@ -5226,19 +5200,14 @@ static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel,
static
irqreturn_t
DAC960_LP_InterruptHandler
(
int
IRQ_Channel
,
static
irqreturn_t
DAC960_LP_InterruptHandler
(
int
IRQ_Channel
,
void
*
DeviceIdentifier
,
void
*
DeviceIdentifier
,
Registers_T
*
InterruptRegisters
)
struct
pt_regs
*
InterruptRegisters
)
{
{
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
DAC960_V2_StatusMailbox_T
*
NextStatusMailbox
;
DAC960_V2_StatusMailbox_T
*
NextStatusMailbox
;
ProcessorFlags_T
ProcessorFlags
;
unsigned
long
flags
;
/*
Acquire exclusive access to Controller.
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_AcquireControllerLockIH
(
Controller
,
&
ProcessorFlags
);
/*
Process Hardware Interrupts for Controller.
*/
DAC960_LP_AcknowledgeInterrupt
(
ControllerBaseAddress
);
DAC960_LP_AcknowledgeInterrupt
(
ControllerBaseAddress
);
NextStatusMailbox
=
Controller
->
V2
.
NextStatusMailbox
;
NextStatusMailbox
=
Controller
->
V2
.
NextStatusMailbox
;
while
(
NextStatusMailbox
->
Fields
.
CommandIdentifier
>
0
)
while
(
NextStatusMailbox
->
Fields
.
CommandIdentifier
>
0
)
...
@@ -5261,11 +5230,9 @@ static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel,
...
@@ -5261,11 +5230,9 @@ static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel,
Attempt to remove additional I/O Requests from the Controller's
Attempt to remove additional I/O Requests from the Controller's
I/O Request Queue and queue them to the Controller.
I/O Request Queue and queue them to the Controller.
*/
*/
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
;
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
/*
;
Release exclusive access to Controller.
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_ReleaseControllerLockIH
(
Controller
,
&
ProcessorFlags
);
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
}
}
...
@@ -5277,19 +5244,14 @@ static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel,
...
@@ -5277,19 +5244,14 @@ static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel,
static
irqreturn_t
DAC960_LA_InterruptHandler
(
int
IRQ_Channel
,
static
irqreturn_t
DAC960_LA_InterruptHandler
(
int
IRQ_Channel
,
void
*
DeviceIdentifier
,
void
*
DeviceIdentifier
,
Registers_T
*
InterruptRegisters
)
struct
pt_regs
*
InterruptRegisters
)
{
{
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
DAC960_V1_StatusMailbox_T
*
NextStatusMailbox
;
DAC960_V1_StatusMailbox_T
*
NextStatusMailbox
;
ProcessorFlags_T
ProcessorFlags
;
unsigned
long
flags
;
/*
Acquire exclusive access to Controller.
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_AcquireControllerLockIH
(
Controller
,
&
ProcessorFlags
);
/*
Process Hardware Interrupts for Controller.
*/
DAC960_LA_AcknowledgeInterrupt
(
ControllerBaseAddress
);
DAC960_LA_AcknowledgeInterrupt
(
ControllerBaseAddress
);
NextStatusMailbox
=
Controller
->
V1
.
NextStatusMailbox
;
NextStatusMailbox
=
Controller
->
V1
.
NextStatusMailbox
;
while
(
NextStatusMailbox
->
Fields
.
Valid
)
while
(
NextStatusMailbox
->
Fields
.
Valid
)
...
@@ -5308,11 +5270,9 @@ static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel,
...
@@ -5308,11 +5270,9 @@ static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel,
Attempt to remove additional I/O Requests from the Controller's
Attempt to remove additional I/O Requests from the Controller's
I/O Request Queue and queue them to the Controller.
I/O Request Queue and queue them to the Controller.
*/
*/
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
;
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
/*
;
Release exclusive access to Controller.
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_ReleaseControllerLockIH
(
Controller
,
&
ProcessorFlags
);
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
}
}
...
@@ -5324,19 +5284,14 @@ static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel,
...
@@ -5324,19 +5284,14 @@ static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel,
static
irqreturn_t
DAC960_PG_InterruptHandler
(
int
IRQ_Channel
,
static
irqreturn_t
DAC960_PG_InterruptHandler
(
int
IRQ_Channel
,
void
*
DeviceIdentifier
,
void
*
DeviceIdentifier
,
Registers_T
*
InterruptRegisters
)
struct
pt_regs
*
InterruptRegisters
)
{
{
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
DAC960_V1_StatusMailbox_T
*
NextStatusMailbox
;
DAC960_V1_StatusMailbox_T
*
NextStatusMailbox
;
ProcessorFlags_T
ProcessorFlags
;
unsigned
long
flags
;
/*
Acquire exclusive access to Controller.
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_AcquireControllerLockIH
(
Controller
,
&
ProcessorFlags
);
/*
Process Hardware Interrupts for Controller.
*/
DAC960_PG_AcknowledgeInterrupt
(
ControllerBaseAddress
);
DAC960_PG_AcknowledgeInterrupt
(
ControllerBaseAddress
);
NextStatusMailbox
=
Controller
->
V1
.
NextStatusMailbox
;
NextStatusMailbox
=
Controller
->
V1
.
NextStatusMailbox
;
while
(
NextStatusMailbox
->
Fields
.
Valid
)
while
(
NextStatusMailbox
->
Fields
.
Valid
)
...
@@ -5355,11 +5310,9 @@ static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel,
...
@@ -5355,11 +5310,9 @@ static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel,
Attempt to remove additional I/O Requests from the Controller's
Attempt to remove additional I/O Requests from the Controller's
I/O Request Queue and queue them to the Controller.
I/O Request Queue and queue them to the Controller.
*/
*/
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
;
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
/*
;
Release exclusive access to Controller.
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_ReleaseControllerLockIH
(
Controller
,
&
ProcessorFlags
);
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
}
}
...
@@ -5371,18 +5324,13 @@ static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel,
...
@@ -5371,18 +5324,13 @@ static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel,
static
irqreturn_t
DAC960_PD_InterruptHandler
(
int
IRQ_Channel
,
static
irqreturn_t
DAC960_PD_InterruptHandler
(
int
IRQ_Channel
,
void
*
DeviceIdentifier
,
void
*
DeviceIdentifier
,
Registers_T
*
InterruptRegisters
)
struct
pt_regs
*
InterruptRegisters
)
{
{
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
ProcessorFlags_T
ProcessorFlags
;
unsigned
long
flags
;
/*
Acquire exclusive access to Controller.
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_AcquireControllerLockIH
(
Controller
,
&
ProcessorFlags
);
/*
Process Hardware Interrupts for Controller.
*/
while
(
DAC960_PD_StatusAvailableP
(
ControllerBaseAddress
))
while
(
DAC960_PD_StatusAvailableP
(
ControllerBaseAddress
))
{
{
DAC960_V1_CommandIdentifier_T
CommandIdentifier
=
DAC960_V1_CommandIdentifier_T
CommandIdentifier
=
...
@@ -5398,11 +5346,9 @@ static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel,
...
@@ -5398,11 +5346,9 @@ static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel,
Attempt to remove additional I/O Requests from the Controller's
Attempt to remove additional I/O Requests from the Controller's
I/O Request Queue and queue them to the Controller.
I/O Request Queue and queue them to the Controller.
*/
*/
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
;
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
/*
;
Release exclusive access to Controller.
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_ReleaseControllerLockIH
(
Controller
,
&
ProcessorFlags
);
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
}
}
...
@@ -5418,18 +5364,13 @@ static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel,
...
@@ -5418,18 +5364,13 @@ static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel,
static
irqreturn_t
DAC960_P_InterruptHandler
(
int
IRQ_Channel
,
static
irqreturn_t
DAC960_P_InterruptHandler
(
int
IRQ_Channel
,
void
*
DeviceIdentifier
,
void
*
DeviceIdentifier
,
Registers_T
*
InterruptRegisters
)
struct
pt_regs
*
InterruptRegisters
)
{
{
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
DeviceIdentifier
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
void
*
ControllerBaseAddress
=
Controller
->
BaseAddress
;
ProcessorFlags_T
ProcessorFlags
;
unsigned
long
flags
;
/*
Acquire exclusive access to Controller.
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_AcquireControllerLockIH
(
Controller
,
&
ProcessorFlags
);
/*
Process Hardware Interrupts for Controller.
*/
while
(
DAC960_PD_StatusAvailableP
(
ControllerBaseAddress
))
while
(
DAC960_PD_StatusAvailableP
(
ControllerBaseAddress
))
{
{
DAC960_V1_CommandIdentifier_T
CommandIdentifier
=
DAC960_V1_CommandIdentifier_T
CommandIdentifier
=
...
@@ -5480,11 +5421,9 @@ static irqreturn_t DAC960_P_InterruptHandler(int IRQ_Channel,
...
@@ -5480,11 +5421,9 @@ static irqreturn_t DAC960_P_InterruptHandler(int IRQ_Channel,
Attempt to remove additional I/O Requests from the Controller's
Attempt to remove additional I/O Requests from the Controller's
I/O Request Queue and queue them to the Controller.
I/O Request Queue and queue them to the Controller.
*/
*/
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
;
while
(
DAC960_ProcessRequest
(
Controller
,
false
))
/*
;
Release exclusive access to Controller.
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_ReleaseControllerLockIH
(
Controller
,
&
ProcessorFlags
);
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
}
}
...
@@ -5547,13 +5486,11 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
...
@@ -5547,13 +5486,11 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
{
{
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
TimerData
;
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
TimerData
;
DAC960_Command_T
*
Command
;
DAC960_Command_T
*
Command
;
ProcessorFlags_T
ProcessorFlags
;
unsigned
long
flags
;
if
(
Controller
->
FirmwareType
==
DAC960_V1_Controller
)
if
(
Controller
->
FirmwareType
==
DAC960_V1_Controller
)
{
{
/*
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
Acquire exclusive access to Controller.
*/
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorFlags
);
/*
/*
Queue a Status Monitoring Command to Controller.
Queue a Status Monitoring Command to Controller.
*/
*/
...
@@ -5561,10 +5498,7 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
...
@@ -5561,10 +5498,7 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
if
(
Command
!=
NULL
)
if
(
Command
!=
NULL
)
DAC960_V1_QueueMonitoringCommand
(
Command
);
DAC960_V1_QueueMonitoringCommand
(
Command
);
else
Controller
->
MonitoringCommandDeferred
=
true
;
else
Controller
->
MonitoringCommandDeferred
=
true
;
/*
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
flags
);
Release exclusive access to Controller.
*/
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorFlags
);
}
}
else
else
{
{
...
@@ -5613,10 +5547,8 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
...
@@ -5613,10 +5547,8 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
}
}
Controller
->
V2
.
StatusChangeCounter
=
StatusChangeCounter
;
Controller
->
V2
.
StatusChangeCounter
=
StatusChangeCounter
;
Controller
->
PrimaryMonitoringTime
=
jiffies
;
Controller
->
PrimaryMonitoringTime
=
jiffies
;
/*
Acquire exclusive access to Controller.
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
*/
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorFlags
);
/*
/*
Queue a Status Monitoring Command to Controller.
Queue a Status Monitoring Command to Controller.
*/
*/
...
@@ -5624,10 +5556,7 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
...
@@ -5624,10 +5556,7 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
if
(
Command
!=
NULL
)
if
(
Command
!=
NULL
)
DAC960_V2_QueueMonitoringCommand
(
Command
);
DAC960_V2_QueueMonitoringCommand
(
Command
);
else
Controller
->
MonitoringCommandDeferred
=
true
;
else
Controller
->
MonitoringCommandDeferred
=
true
;
/*
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
flags
);
Release exclusive access to Controller.
*/
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorFlags
);
/*
/*
Wake up any processes waiting on a Health Status Buffer change.
Wake up any processes waiting on a Health Status Buffer change.
*/
*/
...
@@ -5639,7 +5568,7 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
...
@@ -5639,7 +5568,7 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData)
DAC960_UserIOCTL is the User IOCTL Function for the DAC960 Driver.
DAC960_UserIOCTL is the User IOCTL Function for the DAC960 Driver.
*/
*/
static
int
DAC960_UserIOCTL
(
Inode_T
*
Inode
,
File_T
*
F
ile
,
static
int
DAC960_UserIOCTL
(
struct
inode
*
inode
,
struct
file
*
f
ile
,
unsigned
int
Request
,
unsigned
long
Argument
)
unsigned
int
Request
,
unsigned
long
Argument
)
{
{
int
ErrorCode
=
0
;
int
ErrorCode
=
0
;
...
@@ -5691,7 +5620,7 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
...
@@ -5691,7 +5620,7 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
DAC960_V1_DCDB_T
DCDB
;
DAC960_V1_DCDB_T
DCDB
;
DAC960_V1_DCDB_T
*
DCDB_IOBUF
=
NULL
;
DAC960_V1_DCDB_T
*
DCDB_IOBUF
=
NULL
;
dma_addr_t
DCDB_IOBUFDMA
;
dma_addr_t
DCDB_IOBUFDMA
;
ProcessorFlags_T
ProcessorF
lags
;
unsigned
long
f
lags
;
int
ControllerNumber
,
DataTransferLength
;
int
ControllerNumber
,
DataTransferLength
;
unsigned
char
*
DataTransferBuffer
=
NULL
;
unsigned
char
*
DataTransferBuffer
=
NULL
;
dma_addr_t
DataTransferBufferDMA
;
dma_addr_t
DataTransferBufferDMA
;
...
@@ -5764,7 +5693,7 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
...
@@ -5764,7 +5693,7 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
}
}
if
(
CommandOpcode
==
DAC960_V1_DCDB
)
if
(
CommandOpcode
==
DAC960_V1_DCDB
)
{
{
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
f
lags
);
while
((
Command
=
DAC960_AllocateCommand
(
Controller
))
==
NULL
)
while
((
Command
=
DAC960_AllocateCommand
(
Controller
))
==
NULL
)
DAC960_WaitForCommand
(
Controller
);
DAC960_WaitForCommand
(
Controller
);
while
(
Controller
->
V1
.
DirectCommandActive
[
DCDB
.
Channel
]
while
(
Controller
->
V1
.
DirectCommandActive
[
DCDB
.
Channel
]
...
@@ -5778,7 +5707,7 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
...
@@ -5778,7 +5707,7 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
}
}
Controller
->
V1
.
DirectCommandActive
[
DCDB
.
Channel
]
Controller
->
V1
.
DirectCommandActive
[
DCDB
.
Channel
]
[
DCDB
.
TargetID
]
=
true
;
[
DCDB
.
TargetID
]
=
true
;
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
DAC960_V1_ClearCommand
(
Command
);
DAC960_V1_ClearCommand
(
Command
);
Command
->
CommandType
=
DAC960_ImmediateCommand
;
Command
->
CommandType
=
DAC960_ImmediateCommand
;
memcpy
(
&
Command
->
V1
.
CommandMailbox
,
&
UserCommand
.
CommandMailbox
,
memcpy
(
&
Command
->
V1
.
CommandMailbox
,
&
UserCommand
.
CommandMailbox
,
...
@@ -5789,10 +5718,10 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
...
@@ -5789,10 +5718,10 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
}
}
else
else
{
{
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
f
lags
);
while
((
Command
=
DAC960_AllocateCommand
(
Controller
))
==
NULL
)
while
((
Command
=
DAC960_AllocateCommand
(
Controller
))
==
NULL
)
DAC960_WaitForCommand
(
Controller
);
DAC960_WaitForCommand
(
Controller
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
DAC960_V1_ClearCommand
(
Command
);
DAC960_V1_ClearCommand
(
Command
);
Command
->
CommandType
=
DAC960_ImmediateCommand
;
Command
->
CommandType
=
DAC960_ImmediateCommand
;
memcpy
(
&
Command
->
V1
.
CommandMailbox
,
&
UserCommand
.
CommandMailbox
,
memcpy
(
&
Command
->
V1
.
CommandMailbox
,
&
UserCommand
.
CommandMailbox
,
...
@@ -5803,9 +5732,9 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
...
@@ -5803,9 +5732,9 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
}
}
DAC960_ExecuteCommand
(
Command
);
DAC960_ExecuteCommand
(
Command
);
CommandStatus
=
Command
->
V1
.
CommandStatus
;
CommandStatus
=
Command
->
V1
.
CommandStatus
;
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
f
lags
);
DAC960_DeallocateCommand
(
Command
);
DAC960_DeallocateCommand
(
Command
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
if
(
DataTransferLength
>
0
)
if
(
DataTransferLength
>
0
)
{
{
if
(
copy_to_user
(
UserCommand
.
DataTransferBuffer
,
if
(
copy_to_user
(
UserCommand
.
DataTransferBuffer
,
...
@@ -5848,7 +5777,7 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
...
@@ -5848,7 +5777,7 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
DAC960_Command_T
*
Command
=
NULL
;
DAC960_Command_T
*
Command
=
NULL
;
DAC960_V2_CommandMailbox_T
*
CommandMailbox
;
DAC960_V2_CommandMailbox_T
*
CommandMailbox
;
DAC960_V2_CommandStatus_T
CommandStatus
;
DAC960_V2_CommandStatus_T
CommandStatus
;
ProcessorFlags_T
ProcessorF
lags
;
unsigned
long
f
lags
;
int
ControllerNumber
,
DataTransferLength
;
int
ControllerNumber
,
DataTransferLength
;
int
DataTransferResidue
,
RequestSenseLength
;
int
DataTransferResidue
,
RequestSenseLength
;
unsigned
char
*
DataTransferBuffer
=
NULL
;
unsigned
char
*
DataTransferBuffer
=
NULL
;
...
@@ -5900,10 +5829,10 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
...
@@ -5900,10 +5829,10 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
}
}
memset
(
RequestSenseBuffer
,
0
,
RequestSenseLength
);
memset
(
RequestSenseBuffer
,
0
,
RequestSenseLength
);
}
}
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
f
lags
);
while
((
Command
=
DAC960_AllocateCommand
(
Controller
))
==
NULL
)
while
((
Command
=
DAC960_AllocateCommand
(
Controller
))
==
NULL
)
DAC960_WaitForCommand
(
Controller
);
DAC960_WaitForCommand
(
Controller
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
DAC960_V2_ClearCommand
(
Command
);
DAC960_V2_ClearCommand
(
Command
);
Command
->
CommandType
=
DAC960_ImmediateCommand
;
Command
->
CommandType
=
DAC960_ImmediateCommand
;
CommandMailbox
=
&
Command
->
V2
.
CommandMailbox
;
CommandMailbox
=
&
Command
->
V2
.
CommandMailbox
;
...
@@ -5951,9 +5880,9 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
...
@@ -5951,9 +5880,9 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
CommandStatus
=
Command
->
V2
.
CommandStatus
;
CommandStatus
=
Command
->
V2
.
CommandStatus
;
RequestSenseLength
=
Command
->
V2
.
RequestSenseLength
;
RequestSenseLength
=
Command
->
V2
.
RequestSenseLength
;
DataTransferResidue
=
Command
->
V2
.
DataTransferResidue
;
DataTransferResidue
=
Command
->
V2
.
DataTransferResidue
;
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
f
lags
);
DAC960_DeallocateCommand
(
Command
);
DAC960_DeallocateCommand
(
Command
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
if
(
RequestSenseLength
>
UserCommand
.
RequestSenseLength
)
if
(
RequestSenseLength
>
UserCommand
.
RequestSenseLength
)
RequestSenseLength
=
UserCommand
.
RequestSenseLength
;
RequestSenseLength
=
UserCommand
.
RequestSenseLength
;
if
(
copy_to_user
(
&
UserSpaceUserCommand
->
DataTransferLength
,
if
(
copy_to_user
(
&
UserSpaceUserCommand
->
DataTransferLength
,
...
@@ -6302,12 +6231,13 @@ static boolean DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller,
...
@@ -6302,12 +6231,13 @@ static boolean DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller,
{
{
DAC960_Command_T
*
Command
;
DAC960_Command_T
*
Command
;
DAC960_V1_CommandMailbox_T
*
CommandMailbox
;
DAC960_V1_CommandMailbox_T
*
CommandMailbox
;
ProcessorFlags_T
ProcessorF
lags
;
unsigned
long
f
lags
;
unsigned
char
Channel
,
TargetID
,
LogicalDriveNumber
;
unsigned
char
Channel
,
TargetID
,
LogicalDriveNumber
;
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorFlags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
while
((
Command
=
DAC960_AllocateCommand
(
Controller
))
==
NULL
)
while
((
Command
=
DAC960_AllocateCommand
(
Controller
))
==
NULL
)
DAC960_WaitForCommand
(
Controller
);
DAC960_WaitForCommand
(
Controller
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
Controller
->
UserStatusLength
=
0
;
Controller
->
UserStatusLength
=
0
;
DAC960_V1_ClearCommand
(
Command
);
DAC960_V1_ClearCommand
(
Command
);
Command
->
CommandType
=
DAC960_ImmediateCommand
;
Command
->
CommandType
=
DAC960_ImmediateCommand
;
...
@@ -6497,9 +6427,10 @@ static boolean DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller,
...
@@ -6497,9 +6427,10 @@ static boolean DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller,
}
}
else
DAC960_UserCritical
(
"Illegal User Command: '%s'
\n
"
,
else
DAC960_UserCritical
(
"Illegal User Command: '%s'
\n
"
,
Controller
,
UserCommand
);
Controller
,
UserCommand
);
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorFlags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
DAC960_DeallocateCommand
(
Command
);
DAC960_DeallocateCommand
(
Command
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
return
true
;
return
true
;
}
}
...
@@ -6562,13 +6493,14 @@ static boolean DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller,
...
@@ -6562,13 +6493,14 @@ static boolean DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller,
{
{
DAC960_Command_T
*
Command
;
DAC960_Command_T
*
Command
;
DAC960_V2_CommandMailbox_T
*
CommandMailbox
;
DAC960_V2_CommandMailbox_T
*
CommandMailbox
;
ProcessorFlags_T
ProcessorF
lags
;
unsigned
long
f
lags
;
unsigned
char
Channel
,
TargetID
,
LogicalDriveNumber
;
unsigned
char
Channel
,
TargetID
,
LogicalDriveNumber
;
unsigned
short
LogicalDeviceNumber
;
unsigned
short
LogicalDeviceNumber
;
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorFlags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
while
((
Command
=
DAC960_AllocateCommand
(
Controller
))
==
NULL
)
while
((
Command
=
DAC960_AllocateCommand
(
Controller
))
==
NULL
)
DAC960_WaitForCommand
(
Controller
);
DAC960_WaitForCommand
(
Controller
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
Controller
->
UserStatusLength
=
0
;
Controller
->
UserStatusLength
=
0
;
DAC960_V2_ClearCommand
(
Command
);
DAC960_V2_ClearCommand
(
Command
);
Command
->
CommandType
=
DAC960_ImmediateCommand
;
Command
->
CommandType
=
DAC960_ImmediateCommand
;
...
@@ -6758,9 +6690,10 @@ static boolean DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller,
...
@@ -6758,9 +6690,10 @@ static boolean DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller,
Controller
->
SuppressEnclosureMessages
=
true
;
Controller
->
SuppressEnclosureMessages
=
true
;
else
DAC960_UserCritical
(
"Illegal User Command: '%s'
\n
"
,
else
DAC960_UserCritical
(
"Illegal User Command: '%s'
\n
"
,
Controller
,
UserCommand
);
Controller
,
UserCommand
);
DAC960_AcquireControllerLock
(
Controller
,
&
ProcessorFlags
);
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
flags
);
DAC960_DeallocateCommand
(
Command
);
DAC960_DeallocateCommand
(
Command
);
DAC960_ReleaseControllerLock
(
Controller
,
&
ProcessorF
lags
);
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
f
lags
);
return
true
;
return
true
;
}
}
...
@@ -6893,7 +6826,7 @@ static int DAC960_ProcReadUserCommand(char *Page, char **Start, off_t Offset,
...
@@ -6893,7 +6826,7 @@ static int DAC960_ProcReadUserCommand(char *Page, char **Start, off_t Offset,
DAC960_ProcWriteUserCommand implements writing /proc/rd/cN/user_command.
DAC960_ProcWriteUserCommand implements writing /proc/rd/cN/user_command.
*/
*/
static
int
DAC960_ProcWriteUserCommand
(
File_T
*
F
ile
,
const
char
*
Buffer
,
static
int
DAC960_ProcWriteUserCommand
(
struct
file
*
f
ile
,
const
char
*
Buffer
,
unsigned
long
Count
,
void
*
Data
)
unsigned
long
Count
,
void
*
Data
)
{
{
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
Data
;
DAC960_Controller_T
*
Controller
=
(
DAC960_Controller_T
*
)
Data
;
...
@@ -6921,9 +6854,9 @@ static int DAC960_ProcWriteUserCommand(File_T *File, const char *Buffer,
...
@@ -6921,9 +6854,9 @@ static int DAC960_ProcWriteUserCommand(File_T *File, const char *Buffer,
static
void
DAC960_CreateProcEntries
(
DAC960_Controller_T
*
Controller
)
static
void
DAC960_CreateProcEntries
(
DAC960_Controller_T
*
Controller
)
{
{
PROC_DirectoryEntry_T
*
StatusProcEntry
;
struct
proc_dir_entry
*
StatusProcEntry
;
PROC_DirectoryEntry_T
*
ControllerProcEntry
;
struct
proc_dir_entry
*
ControllerProcEntry
;
PROC_DirectoryEntry_T
*
UserCommandProcEntry
;
struct
proc_dir_entry
*
UserCommandProcEntry
;
if
(
DAC960_ProcDirectoryEntry
==
NULL
)
{
if
(
DAC960_ProcDirectoryEntry
==
NULL
)
{
DAC960_ProcDirectoryEntry
=
proc_mkdir
(
"rd"
,
NULL
);
DAC960_ProcDirectoryEntry
=
proc_mkdir
(
"rd"
,
NULL
);
...
...
drivers/block/DAC960.h
View file @
4e4d6a6f
...
@@ -2203,33 +2203,10 @@ static char
...
@@ -2203,33 +2203,10 @@ static char
DAC960_Message(DAC960_UserCriticalLevel, Format, ##Arguments)
DAC960_Message(DAC960_UserCriticalLevel, Format, ##Arguments)
/*
Define types for some of the structures that interface with the rest
of the Linux Kernel and I/O Subsystem.
*/
typedef
struct
file
File_T
;
typedef
struct
block_device_operations
BlockDeviceOperations_T
;
typedef
struct
completion
Completion_T
;
typedef
struct
hd_geometry
DiskGeometry_T
;
typedef
struct
inode
Inode_T
;
typedef
struct
inode_operations
InodeOperations_T
;
typedef
kdev_t
KernelDevice_T
;
typedef
struct
list_head
ListHead_T
;
typedef
struct
pci_dev
PCI_Device_T
;
typedef
struct
proc_dir_entry
PROC_DirectoryEntry_T
;
typedef
unsigned
long
ProcessorFlags_T
;
typedef
struct
pt_regs
Registers_T
;
typedef
struct
request
IO_Request_T
;
typedef
request_queue_t
RequestQueue_T
;
typedef
struct
super_block
SuperBlock_T
;
typedef
struct
timer_list
Timer_T
;
typedef
wait_queue_head_t
WaitQueue_T
;
struct
DAC960_privdata
{
struct
DAC960_privdata
{
DAC960_HardwareType_T
HardwareType
;
DAC960_HardwareType_T
HardwareType
;
DAC960_FirmwareType_T
FirmwareType
;
DAC960_FirmwareType_T
FirmwareType
;
irqreturn_t
(
*
InterruptHandler
)(
int
,
void
*
,
Registers_T
*
);
irqreturn_t
(
*
InterruptHandler
)(
int
,
void
*
,
struct
pt_regs
*
);
unsigned
int
MemoryWindowSize
;
unsigned
int
MemoryWindowSize
;
};
};
...
@@ -2295,14 +2272,14 @@ typedef struct DAC960_Command
...
@@ -2295,14 +2272,14 @@ typedef struct DAC960_Command
DAC960_CommandType_T
CommandType
;
DAC960_CommandType_T
CommandType
;
struct
DAC960_Controller
*
Controller
;
struct
DAC960_Controller
*
Controller
;
struct
DAC960_Command
*
Next
;
struct
DAC960_Command
*
Next
;
Completion_T
*
Completion
;
struct
completion
*
Completion
;
unsigned
int
LogicalDriveNumber
;
unsigned
int
LogicalDriveNumber
;
unsigned
int
BlockNumber
;
unsigned
int
BlockNumber
;
unsigned
int
BlockCount
;
unsigned
int
BlockCount
;
unsigned
int
SegmentCount
;
unsigned
int
SegmentCount
;
int
DmaDirection
;
int
DmaDirection
;
struct
scatterlist
*
cmd_sglist
;
struct
scatterlist
*
cmd_sglist
;
IO_Request_T
*
Request
;
struct
request
*
Request
;
struct
pci_dev
*
PciDevice
;
struct
pci_dev
*
PciDevice
;
union
{
union
{
struct
{
struct
{
...
@@ -2344,7 +2321,7 @@ typedef struct DAC960_Controller
...
@@ -2344,7 +2321,7 @@ typedef struct DAC960_Controller
DAC960_HardwareType_T
HardwareType
;
DAC960_HardwareType_T
HardwareType
;
DAC960_IO_Address_T
IO_Address
;
DAC960_IO_Address_T
IO_Address
;
DAC960_PCI_Address_T
PCI_Address
;
DAC960_PCI_Address_T
PCI_Address
;
PCI_Device_T
*
PCIDevice
;
struct
pci_dev
*
PCIDevice
;
unsigned
char
ControllerNumber
;
unsigned
char
ControllerNumber
;
unsigned
char
ControllerName
[
4
];
unsigned
char
ControllerName
[
4
];
unsigned
char
ModelName
[
20
];
unsigned
char
ModelName
[
20
];
...
@@ -2383,19 +2360,19 @@ typedef struct DAC960_Controller
...
@@ -2383,19 +2360,19 @@ typedef struct DAC960_Controller
boolean
DriveSpinUpMessageDisplayed
;
boolean
DriveSpinUpMessageDisplayed
;
boolean
MonitoringAlertMode
;
boolean
MonitoringAlertMode
;
boolean
SuppressEnclosureMessages
;
boolean
SuppressEnclosureMessages
;
Timer_T
MonitoringTimer
;
struct
timer_list
MonitoringTimer
;
struct
gendisk
*
disks
[
DAC960_MaxLogicalDrives
];
struct
gendisk
*
disks
[
DAC960_MaxLogicalDrives
];
struct
pci_pool
*
ScatterGatherPool
;
struct
pci_pool
*
ScatterGatherPool
;
DAC960_Command_T
*
FreeCommands
;
DAC960_Command_T
*
FreeCommands
;
unsigned
char
*
CombinedStatusBuffer
;
unsigned
char
*
CombinedStatusBuffer
;
unsigned
char
*
CurrentStatusBuffer
;
unsigned
char
*
CurrentStatusBuffer
;
RequestQueue_T
RequestQueue
;
struct
request_queue
RequestQueue
;
spinlock_t
queue_lock
;
spinlock_t
queue_lock
;
WaitQueue_T
CommandWaitQueue
;
wait_queue_head_t
CommandWaitQueue
;
WaitQueue_T
HealthStatusWaitQueue
;
wait_queue_head_t
HealthStatusWaitQueue
;
DAC960_Command_T
InitialCommand
;
DAC960_Command_T
InitialCommand
;
DAC960_Command_T
*
Commands
[
DAC960_MaxDriverQueueDepth
];
DAC960_Command_T
*
Commands
[
DAC960_MaxDriverQueueDepth
];
PROC_DirectoryEntry_T
*
ControllerProcEntry
;
struct
proc_dir_entry
*
ControllerProcEntry
;
boolean
LogicalDriveInitiallyAccessible
[
DAC960_MaxLogicalDrives
];
boolean
LogicalDriveInitiallyAccessible
[
DAC960_MaxLogicalDrives
];
void
(
*
QueueCommand
)(
DAC960_Command_T
*
Command
);
void
(
*
QueueCommand
)(
DAC960_Command_T
*
Command
);
boolean
(
*
ReadControllerConfiguration
)(
struct
DAC960_Controller
*
);
boolean
(
*
ReadControllerConfiguration
)(
struct
DAC960_Controller
*
);
...
@@ -2595,85 +2572,6 @@ void dma_addr_writeql(dma_addr_t addr, void *write_address)
...
@@ -2595,85 +2572,6 @@ void dma_addr_writeql(dma_addr_t addr, void *write_address)
writel
(
u
.
wl
[
1
],
write_address
+
4
);
writel
(
u
.
wl
[
1
],
write_address
+
4
);
}
}
/*
DAC960_AcquireControllerLock acquires exclusive access to Controller.
Reference the queue_lock through the controller structure,
rather than through the request queue. These macros are
used to mutex on the controller structure during initialization,
BEFORE the request queue is allocated and initialized in
DAC960_RegisterBlockDevice().
*/
static
inline
void
DAC960_AcquireControllerLock
(
DAC960_Controller_T
*
Controller
,
ProcessorFlags_T
*
ProcessorFlags
)
{
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
*
ProcessorFlags
);
}
/*
DAC960_ReleaseControllerLock releases exclusive access to Controller.
*/
static
inline
void
DAC960_ReleaseControllerLock
(
DAC960_Controller_T
*
Controller
,
ProcessorFlags_T
*
ProcessorFlags
)
{
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
*
ProcessorFlags
);
}
/*
DAC960_AcquireControllerLockRF acquires exclusive access to Controller,
but is only called from the request function with the queue lock held.
*/
static
inline
void
DAC960_AcquireControllerLockRF
(
DAC960_Controller_T
*
Controller
,
ProcessorFlags_T
*
ProcessorFlags
)
{
}
/*
DAC960_ReleaseControllerLockRF releases exclusive access to Controller,
but is only called from the request function with the queue lock held.
*/
static
inline
void
DAC960_ReleaseControllerLockRF
(
DAC960_Controller_T
*
Controller
,
ProcessorFlags_T
*
ProcessorFlags
)
{
}
/*
DAC960_AcquireControllerLockIH acquires exclusive access to Controller,
but is only called from the interrupt handler.
*/
static
inline
void
DAC960_AcquireControllerLockIH
(
DAC960_Controller_T
*
Controller
,
ProcessorFlags_T
*
ProcessorFlags
)
{
spin_lock_irqsave
(
&
Controller
->
queue_lock
,
*
ProcessorFlags
);
}
/*
DAC960_ReleaseControllerLockIH releases exclusive access to Controller,
but is only called from the interrupt handler.
*/
static
inline
void
DAC960_ReleaseControllerLockIH
(
DAC960_Controller_T
*
Controller
,
ProcessorFlags_T
*
ProcessorFlags
)
{
spin_unlock_irqrestore
(
&
Controller
->
queue_lock
,
*
ProcessorFlags
);
}
/*
/*
Define the DAC960 BA Series Controller Interface Register Offsets.
Define the DAC960 BA Series Controller Interface Register Offsets.
*/
*/
...
@@ -4230,17 +4128,18 @@ void DAC960_P_To_PD_TranslateReadWriteCommand(DAC960_V1_CommandMailbox_T
...
@@ -4230,17 +4128,18 @@ void DAC960_P_To_PD_TranslateReadWriteCommand(DAC960_V1_CommandMailbox_T
static
void
DAC960_FinalizeController
(
DAC960_Controller_T
*
);
static
void
DAC960_FinalizeController
(
DAC960_Controller_T
*
);
static
void
DAC960_V1_QueueReadWriteCommand
(
DAC960_Command_T
*
);
static
void
DAC960_V1_QueueReadWriteCommand
(
DAC960_Command_T
*
);
static
void
DAC960_V2_QueueReadWriteCommand
(
DAC960_Command_T
*
);
static
void
DAC960_V2_QueueReadWriteCommand
(
DAC960_Command_T
*
);
static
void
DAC960_RequestFunction
(
RequestQueue_T
*
);
static
void
DAC960_RequestFunction
(
struct
request_queue
*
);
static
irqreturn_t
DAC960_BA_InterruptHandler
(
int
,
void
*
,
Registers_T
*
);
static
irqreturn_t
DAC960_BA_InterruptHandler
(
int
,
void
*
,
struct
pt_regs
*
);
static
irqreturn_t
DAC960_LP_InterruptHandler
(
int
,
void
*
,
Registers_T
*
);
static
irqreturn_t
DAC960_LP_InterruptHandler
(
int
,
void
*
,
struct
pt_regs
*
);
static
irqreturn_t
DAC960_LA_InterruptHandler
(
int
,
void
*
,
Registers_T
*
);
static
irqreturn_t
DAC960_LA_InterruptHandler
(
int
,
void
*
,
struct
pt_regs
*
);
static
irqreturn_t
DAC960_PG_InterruptHandler
(
int
,
void
*
,
Registers_T
*
);
static
irqreturn_t
DAC960_PG_InterruptHandler
(
int
,
void
*
,
struct
pt_regs
*
);
static
irqreturn_t
DAC960_PD_InterruptHandler
(
int
,
void
*
,
Registers_T
*
);
static
irqreturn_t
DAC960_PD_InterruptHandler
(
int
,
void
*
,
struct
pt_regs
*
);
static
irqreturn_t
DAC960_P_InterruptHandler
(
int
,
void
*
,
Registers_T
*
);
static
irqreturn_t
DAC960_P_InterruptHandler
(
int
,
void
*
,
struct
pt_regs
*
);
static
void
DAC960_V1_QueueMonitoringCommand
(
DAC960_Command_T
*
);
static
void
DAC960_V1_QueueMonitoringCommand
(
DAC960_Command_T
*
);
static
void
DAC960_V2_QueueMonitoringCommand
(
DAC960_Command_T
*
);
static
void
DAC960_V2_QueueMonitoringCommand
(
DAC960_Command_T
*
);
static
void
DAC960_MonitoringTimerFunction
(
unsigned
long
);
static
void
DAC960_MonitoringTimerFunction
(
unsigned
long
);
static
int
DAC960_UserIOCTL
(
Inode_T
*
,
File_T
*
,
unsigned
int
,
unsigned
long
);
static
int
DAC960_UserIOCTL
(
struct
inode
*
,
struct
file
*
,
unsigned
int
,
unsigned
long
);
static
void
DAC960_Message
(
DAC960_MessageLevel_T
,
unsigned
char
*
,
static
void
DAC960_Message
(
DAC960_MessageLevel_T
,
unsigned
char
*
,
DAC960_Controller_T
*
,
...);
DAC960_Controller_T
*
,
...);
static
void
DAC960_CreateProcEntries
(
DAC960_Controller_T
*
);
static
void
DAC960_CreateProcEntries
(
DAC960_Controller_T
*
);
...
...
drivers/block/cciss_scsi.c
View file @
4e4d6a6f
...
@@ -1046,7 +1046,7 @@ cciss_update_non_disk_devices(int cntl_num, int hostno)
...
@@ -1046,7 +1046,7 @@ cciss_update_non_disk_devices(int cntl_num, int hostno)
}
}
else
{
else
{
printk
(
KERN_ERR
"cciss: Report physical LUNs failed.
\n
"
);
printk
(
KERN_ERR
"cciss: Report physical LUNs failed.
\n
"
);
return
;
goto
out
;
}
}
...
@@ -1091,7 +1091,7 @@ cciss_update_non_disk_devices(int cntl_num, int hostno)
...
@@ -1091,7 +1091,7 @@ cciss_update_non_disk_devices(int cntl_num, int hostno)
}
}
adjust_cciss_scsi_table
(
cntl_num
,
hostno
,
currentsd
,
ncurrent
);
adjust_cciss_scsi_table
(
cntl_num
,
hostno
,
currentsd
,
ncurrent
);
out:
kfree
(
inq_buff
);
kfree
(
inq_buff
);
kfree
(
ld_buff
);
kfree
(
ld_buff
);
return
;
return
;
...
...
drivers/block/loop.c
View file @
4e4d6a6f
...
@@ -651,7 +651,8 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
...
@@ -651,7 +651,8 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
int
lo_flags
=
0
;
int
lo_flags
=
0
;
int
error
;
int
error
;
MOD_INC_USE_COUNT
;
/* This is safe, since we have a reference from open(). */
__module_get
(
THIS_MODULE
);
error
=
-
EBUSY
;
error
=
-
EBUSY
;
if
(
lo
->
lo_state
!=
Lo_unbound
)
if
(
lo
->
lo_state
!=
Lo_unbound
)
...
@@ -751,7 +752,8 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
...
@@ -751,7 +752,8 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
out_putf:
out_putf:
fput
(
file
);
fput
(
file
);
out:
out:
MOD_DEC_USE_COUNT
;
/* This is safe: open() is still holding a reference. */
module_put
(
THIS_MODULE
);
return
error
;
return
error
;
}
}
...
@@ -824,7 +826,8 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev)
...
@@ -824,7 +826,8 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev)
filp
->
f_dentry
->
d_inode
->
i_mapping
->
gfp_mask
=
gfp
;
filp
->
f_dentry
->
d_inode
->
i_mapping
->
gfp_mask
=
gfp
;
lo
->
lo_state
=
Lo_unbound
;
lo
->
lo_state
=
Lo_unbound
;
fput
(
filp
);
fput
(
filp
);
MOD_DEC_USE_COUNT
;
/* This is safe: open() is still holding a reference. */
module_put
(
THIS_MODULE
);
return
0
;
return
0
;
}
}
...
...
drivers/char/ipmi/ipmi_msghandler.c
View file @
4e4d6a6f
...
@@ -174,7 +174,7 @@ struct ipmi_smi
...
@@ -174,7 +174,7 @@ struct ipmi_smi
int
int
ipmi_register_all_cmd_rcvr
(
ipmi_user_t
user
)
ipmi_register_all_cmd_rcvr
(
ipmi_user_t
user
)
{
{
int
flags
;
unsigned
long
flags
;
int
rv
=
-
EBUSY
;
int
rv
=
-
EBUSY
;
write_lock_irqsave
(
&
(
user
->
intf
->
users_lock
),
flags
);
write_lock_irqsave
(
&
(
user
->
intf
->
users_lock
),
flags
);
...
@@ -193,7 +193,7 @@ ipmi_register_all_cmd_rcvr(ipmi_user_t user)
...
@@ -193,7 +193,7 @@ ipmi_register_all_cmd_rcvr(ipmi_user_t user)
int
int
ipmi_unregister_all_cmd_rcvr
(
ipmi_user_t
user
)
ipmi_unregister_all_cmd_rcvr
(
ipmi_user_t
user
)
{
{
int
flags
;
unsigned
long
flags
;
int
rv
=
-
EINVAL
;
int
rv
=
-
EINVAL
;
write_lock_irqsave
(
&
(
user
->
intf
->
users_lock
),
flags
);
write_lock_irqsave
(
&
(
user
->
intf
->
users_lock
),
flags
);
...
@@ -1023,7 +1023,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
...
@@ -1023,7 +1023,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
int
rv
;
int
rv
;
ipmi_smi_t
new_intf
;
ipmi_smi_t
new_intf
;
struct
list_head
*
entry
;
struct
list_head
*
entry
;
unsigned
int
flags
;
unsigned
long
flags
;
/* Make sure the driver is actually initialized, this handles
/* Make sure the driver is actually initialized, this handles
...
@@ -1148,7 +1148,7 @@ int ipmi_unregister_smi(ipmi_smi_t intf)
...
@@ -1148,7 +1148,7 @@ int ipmi_unregister_smi(ipmi_smi_t intf)
int
rv
=
-
ENODEV
;
int
rv
=
-
ENODEV
;
int
i
;
int
i
;
struct
list_head
*
entry
;
struct
list_head
*
entry
;
unsigned
int
flags
;
unsigned
long
flags
;
down_write
(
&
interfaces_sem
);
down_write
(
&
interfaces_sem
);
if
(
list_empty
(
&
(
intf
->
users
)))
if
(
list_empty
(
&
(
intf
->
users
)))
...
...
drivers/char/mem.c
View file @
4e4d6a6f
...
@@ -522,7 +522,7 @@ static loff_t null_lseek(struct file * file, loff_t offset, int orig)
...
@@ -522,7 +522,7 @@ static loff_t null_lseek(struct file * file, loff_t offset, int orig)
*/
*/
static
loff_t
memory_lseek
(
struct
file
*
file
,
loff_t
offset
,
int
orig
)
static
loff_t
memory_lseek
(
struct
file
*
file
,
loff_t
offset
,
int
orig
)
{
{
in
t
ret
;
loff_
t
ret
;
lock_kernel
();
lock_kernel
();
switch
(
orig
)
{
switch
(
orig
)
{
...
...
drivers/char/pcmcia/synclink_cs.c
View file @
4e4d6a6f
/*
/*
* linux/drivers/char/pcmcia/synclink_cs.c
* linux/drivers/char/pcmcia/synclink_cs.c
*
*
* $Id: synclink_cs.c,v 4.
6 2003/04/21 17:46:55
paulkf Exp $
* $Id: synclink_cs.c,v 4.
10 2003/05/13 16:06:03
paulkf Exp $
*
*
* Device driver for Microgate SyncLink PC Card
* Device driver for Microgate SyncLink PC Card
* multiprotocol serial adapter.
* multiprotocol serial adapter.
...
@@ -430,7 +430,7 @@ static void rx_reset_buffers(MGSLPC_INFO *info);
...
@@ -430,7 +430,7 @@ static void rx_reset_buffers(MGSLPC_INFO *info);
static
int
rx_alloc_buffers
(
MGSLPC_INFO
*
info
);
static
int
rx_alloc_buffers
(
MGSLPC_INFO
*
info
);
static
void
rx_free_buffers
(
MGSLPC_INFO
*
info
);
static
void
rx_free_buffers
(
MGSLPC_INFO
*
info
);
static
void
mgslpc_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
static
irqreturn_t
mgslpc_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
/*
/*
* Bottom half interrupt handlers
* Bottom half interrupt handlers
...
@@ -476,6 +476,7 @@ static int cuamajor=0;
...
@@ -476,6 +476,7 @@ static int cuamajor=0;
static
int
debug_level
=
0
;
static
int
debug_level
=
0
;
static
int
maxframe
[
MAX_DEVICE_COUNT
]
=
{
0
,};
static
int
maxframe
[
MAX_DEVICE_COUNT
]
=
{
0
,};
static
int
dosyncppp
[
MAX_DEVICE_COUNT
]
=
{
1
,
1
,
1
,
1
};
/* The old way: bit map of interrupts to choose from */
/* The old way: bit map of interrupts to choose from */
/* This means pick from 15, 14, 12, 11, 10, 9, 7, 5, 4, and 3 */
/* This means pick from 15, 14, 12, 11, 10, 9, 7, 5, 4, and 3 */
...
@@ -492,11 +493,12 @@ MODULE_PARM(ttymajor,"i");
...
@@ -492,11 +493,12 @@ MODULE_PARM(ttymajor,"i");
MODULE_PARM
(
cuamajor
,
"i"
);
MODULE_PARM
(
cuamajor
,
"i"
);
MODULE_PARM
(
debug_level
,
"i"
);
MODULE_PARM
(
debug_level
,
"i"
);
MODULE_PARM
(
maxframe
,
"1-"
__MODULE_STRING
(
MAX_DEVICE_COUNT
)
"i"
);
MODULE_PARM
(
maxframe
,
"1-"
__MODULE_STRING
(
MAX_DEVICE_COUNT
)
"i"
);
MODULE_PARM
(
dosyncppp
,
"1-"
__MODULE_STRING
(
MAX_DEVICE_COUNT
)
"i"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_LICENSE
(
"GPL"
);
static
char
*
driver_name
=
"SyncLink PC Card driver"
;
static
char
*
driver_name
=
"SyncLink PC Card driver"
;
static
char
*
driver_version
=
"$Revision: 4.
6
$"
;
static
char
*
driver_version
=
"$Revision: 4.
10
$"
;
static
struct
tty_driver
serial_driver
,
callout_driver
;
static
struct
tty_driver
serial_driver
,
callout_driver
;
static
int
serial_refcount
;
static
int
serial_refcount
;
...
@@ -574,9 +576,6 @@ static dev_link_t *mgslpc_attach(void)
...
@@ -574,9 +576,6 @@ static dev_link_t *mgslpc_attach(void)
link
->
priv
=
info
;
link
->
priv
=
info
;
/* Initialize the dev_link_t structure */
/* Initialize the dev_link_t structure */
init_timer
(
&
link
->
release
);
link
->
release
.
function
=
&
mgslpc_release
;
link
->
release
.
data
=
(
u_long
)
link
;
/* Interrupt setup */
/* Interrupt setup */
link
->
irq
.
Attributes
=
IRQ_TYPE_EXCLUSIVE
;
link
->
irq
.
Attributes
=
IRQ_TYPE_EXCLUSIVE
;
...
@@ -813,7 +812,7 @@ static int mgslpc_event(event_t event, int priority,
...
@@ -813,7 +812,7 @@ static int mgslpc_event(event_t event, int priority,
link
->
state
&=
~
DEV_PRESENT
;
link
->
state
&=
~
DEV_PRESENT
;
if
(
link
->
state
&
DEV_CONFIG
)
{
if
(
link
->
state
&
DEV_CONFIG
)
{
((
MGSLPC_INFO
*
)
link
->
priv
)
->
stop
=
1
;
((
MGSLPC_INFO
*
)
link
->
priv
)
->
stop
=
1
;
m
od_timer
(
&
link
->
release
,
jiffies
+
HZ
/
20
);
m
gslpc_release
((
u_long
)
link
);
}
}
break
;
break
;
case
CS_EVENT_CARD_INSERTION
:
case
CS_EVENT_CARD_INSERTION
:
...
@@ -1356,7 +1355,7 @@ void ri_change(MGSLPC_INFO *info)
...
@@ -1356,7 +1355,7 @@ void ri_change(MGSLPC_INFO *info)
* dev_id device ID supplied during interrupt registration
* dev_id device ID supplied during interrupt registration
* regs interrupted processor context
* regs interrupted processor context
*/
*/
static
void
mgslpc_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
mgslpc_isr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
MGSLPC_INFO
*
info
=
(
MGSLPC_INFO
*
)
dev_id
;
MGSLPC_INFO
*
info
=
(
MGSLPC_INFO
*
)
dev_id
;
unsigned
short
isr
;
unsigned
short
isr
;
...
@@ -1366,10 +1365,10 @@ static void mgslpc_isr(int irq, void *dev_id, struct pt_regs * regs)
...
@@ -1366,10 +1365,10 @@ static void mgslpc_isr(int irq, void *dev_id, struct pt_regs * regs)
if
(
debug_level
>=
DEBUG_LEVEL_ISR
)
if
(
debug_level
>=
DEBUG_LEVEL_ISR
)
printk
(
"mgslpc_isr(%d) entry.
\n
"
,
irq
);
printk
(
"mgslpc_isr(%d) entry.
\n
"
,
irq
);
if
(
!
info
)
if
(
!
info
)
return
;
return
IRQ_NONE
;
if
(
!
(
info
->
link
.
state
&
DEV_CONFIG
))
if
(
!
(
info
->
link
.
state
&
DEV_CONFIG
))
return
;
return
IRQ_HANDLED
;
spin_lock
(
&
info
->
lock
);
spin_lock
(
&
info
->
lock
);
...
@@ -1459,6 +1458,8 @@ static void mgslpc_isr(int irq, void *dev_id, struct pt_regs * regs)
...
@@ -1459,6 +1458,8 @@ static void mgslpc_isr(int irq, void *dev_id, struct pt_regs * regs)
if
(
debug_level
>=
DEBUG_LEVEL_ISR
)
if
(
debug_level
>=
DEBUG_LEVEL_ISR
)
printk
(
"%s(%d):mgslpc_isr(%d)exit.
\n
"
,
printk
(
"%s(%d):mgslpc_isr(%d)exit.
\n
"
,
__FILE__
,
__LINE__
,
irq
);
__FILE__
,
__LINE__
,
irq
);
return
IRQ_HANDLED
;
}
}
/* Initialize and start device.
/* Initialize and start device.
...
@@ -3113,8 +3114,7 @@ void mgslpc_add_device(MGSLPC_INFO *info)
...
@@ -3113,8 +3114,7 @@ void mgslpc_add_device(MGSLPC_INFO *info)
if
(
info
->
line
<
MAX_DEVICE_COUNT
)
{
if
(
info
->
line
<
MAX_DEVICE_COUNT
)
{
if
(
maxframe
[
info
->
line
])
if
(
maxframe
[
info
->
line
])
info
->
max_frame_size
=
maxframe
[
info
->
line
];
info
->
max_frame_size
=
maxframe
[
info
->
line
];
// info->dosyncppp = dosyncppp[info->line];
info
->
dosyncppp
=
dosyncppp
[
info
->
line
];
info
->
dosyncppp
=
1
;
}
}
mgslpc_device_count
++
;
mgslpc_device_count
++
;
...
@@ -3276,7 +3276,6 @@ static void __exit synclink_cs_exit(void)
...
@@ -3276,7 +3276,6 @@ static void __exit synclink_cs_exit(void)
unregister_pccard_driver
(
&
dev_info
);
unregister_pccard_driver
(
&
dev_info
);
while
(
dev_list
!=
NULL
)
{
while
(
dev_list
!=
NULL
)
{
del_timer
(
&
dev_list
->
release
);
if
(
dev_list
->
state
&
DEV_CONFIG
)
if
(
dev_list
->
state
&
DEV_CONFIG
)
mgslpc_release
((
u_long
)
dev_list
);
mgslpc_release
((
u_long
)
dev_list
);
mgslpc_detach
(
dev_list
);
mgslpc_detach
(
dev_list
);
...
...
drivers/hotplug/acpiphp_glue.c
View file @
4e4d6a6f
...
@@ -203,6 +203,7 @@ register_slot (acpi_handle handle, u32 lvl, void *context, void **rv)
...
@@ -203,6 +203,7 @@ register_slot (acpi_handle handle, u32 lvl, void *context, void **rv)
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
err
(
"failed to register interrupt notify handler
\n
"
);
err
(
"failed to register interrupt notify handler
\n
"
);
kfree
(
newfunc
);
return
status
;
return
status
;
}
}
...
...
drivers/isdn/i4l/isdn_x25iface.c
View file @
4e4d6a6f
...
@@ -222,6 +222,8 @@ int isdn_x25iface_connect_ind(struct concap_proto *cprot)
...
@@ -222,6 +222,8 @@ int isdn_x25iface_connect_ind(struct concap_proto *cprot)
printk
(
KERN_WARNING
printk
(
KERN_WARNING
"isdn_x25iface_connect_ind while unconfigured %s
\n
"
"isdn_x25iface_connect_ind while unconfigured %s
\n
"
,
MY_DEVNAME
(
cprot
->
net_dev
)
);
,
MY_DEVNAME
(
cprot
->
net_dev
)
);
if
(
skb
)
dev_kfree_skb
(
skb
);
return
-
1
;
return
-
1
;
}
}
*
state_p
=
WAN_CONNECTED
;
*
state_p
=
WAN_CONNECTED
;
...
...
drivers/isdn/pcbit/drv.c
View file @
4e4d6a6f
...
@@ -1071,6 +1071,7 @@ static void pcbit_set_msn(struct pcbit_dev *dev, char *list)
...
@@ -1071,6 +1071,7 @@ static void pcbit_set_msn(struct pcbit_dev *dev, char *list)
ptr
->
msn
=
kmalloc
(
len
,
GFP_ATOMIC
);
ptr
->
msn
=
kmalloc
(
len
,
GFP_ATOMIC
);
if
(
!
ptr
->
msn
)
{
if
(
!
ptr
->
msn
)
{
printk
(
KERN_WARNING
"kmalloc failed
\n
"
);
printk
(
KERN_WARNING
"kmalloc failed
\n
"
);
kfree
(
ptr
);
return
;
return
;
}
}
...
...
drivers/md/dm-ioctl.c
View file @
4e4d6a6f
...
@@ -278,6 +278,7 @@ int dm_hash_rename(const char *old, const char *new)
...
@@ -278,6 +278,7 @@ int dm_hash_rename(const char *old, const char *new)
DMWARN
(
"asked to rename to an already existing name %s -> %s"
,
DMWARN
(
"asked to rename to an already existing name %s -> %s"
,
old
,
new
);
old
,
new
);
up_write
(
&
_hash_lock
);
up_write
(
&
_hash_lock
);
kfree
(
new_name
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
...
@@ -289,6 +290,7 @@ int dm_hash_rename(const char *old, const char *new)
...
@@ -289,6 +290,7 @@ int dm_hash_rename(const char *old, const char *new)
DMWARN
(
"asked to rename a non existent device %s -> %s"
,
DMWARN
(
"asked to rename a non existent device %s -> %s"
,
old
,
new
);
old
,
new
);
up_write
(
&
_hash_lock
);
up_write
(
&
_hash_lock
);
kfree
(
new_name
);
return
-
ENXIO
;
return
-
ENXIO
;
}
}
...
...
drivers/md/dm-target.c
View file @
4e4d6a6f
...
@@ -122,6 +122,8 @@ int dm_register_target(struct target_type *t)
...
@@ -122,6 +122,8 @@ int dm_register_target(struct target_type *t)
list_add
(
&
ti
->
list
,
&
_targets
);
list_add
(
&
ti
->
list
,
&
_targets
);
up_write
(
&
_lock
);
up_write
(
&
_lock
);
if
(
rv
)
kfree
(
ti
);
return
rv
;
return
rv
;
}
}
...
...
drivers/media/radio/miropcm20-rds.c
View file @
4e4d6a6f
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/miscdevice.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include "miropcm20-rds-core.h"
#include "miropcm20-rds-core.h"
...
...
drivers/media/video/bt819.c
View file @
4e4d6a6f
...
@@ -167,6 +167,7 @@ static int bt819_attach(struct i2c_adapter *adap, int addr , unsigned long flags
...
@@ -167,6 +167,7 @@ static int bt819_attach(struct i2c_adapter *adap, int addr , unsigned long flags
decoder
=
kmalloc
(
sizeof
(
struct
bt819
),
GFP_KERNEL
);
decoder
=
kmalloc
(
sizeof
(
struct
bt819
),
GFP_KERNEL
);
if
(
decoder
==
NULL
)
{
if
(
decoder
==
NULL
)
{
MOD_DEC_USE_COUNT
;
MOD_DEC_USE_COUNT
;
kfree
(
client
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
...
drivers/media/video/videodev.c
View file @
4e4d6a6f
...
@@ -311,8 +311,10 @@ static void videodev_proc_create_dev (struct video_device *vfd, char *name)
...
@@ -311,8 +311,10 @@ static void videodev_proc_create_dev (struct video_device *vfd, char *name)
return
;
return
;
p
=
create_proc_entry
(
name
,
S_IFREG
|
S_IRUGO
|
S_IWUSR
,
video_dev_proc_entry
);
p
=
create_proc_entry
(
name
,
S_IFREG
|
S_IRUGO
|
S_IWUSR
,
video_dev_proc_entry
);
if
(
!
p
)
if
(
!
p
)
{
kfree
(
d
);
return
;
return
;
}
p
->
data
=
vfd
;
p
->
data
=
vfd
;
p
->
read_proc
=
videodev_proc_read
;
p
->
read_proc
=
videodev_proc_read
;
...
...
drivers/message/i2o/i2o_core.c
View file @
4e4d6a6f
...
@@ -2018,15 +2018,14 @@ static int i2o_systab_send(struct i2o_controller *iop)
...
@@ -2018,15 +2018,14 @@ static int i2o_systab_send(struct i2o_controller *iop)
{
{
printk
(
KERN_ERR
"%s: Unable to set SysTab (status=%#x).
\n
"
,
printk
(
KERN_ERR
"%s: Unable to set SysTab (status=%#x).
\n
"
,
iop
->
name
,
-
ret
);
iop
->
name
,
-
ret
);
kfree
(
privbuf
);
}
}
else
else
{
{
dprintk
(
KERN_INFO
"%s: SysTab set.
\n
"
,
iop
->
name
);
dprintk
(
KERN_INFO
"%s: SysTab set.
\n
"
,
iop
->
name
);
kfree
(
privbuf
);
}
}
i2o_status_get
(
iop
);
// Entered READY state
i2o_status_get
(
iop
);
// Entered READY state
kfree
(
privbuf
);
return
ret
;
return
ret
;
}
}
...
...
drivers/mtd/chips/cfi_cmdset_0001.c
View file @
4e4d6a6f
...
@@ -203,6 +203,7 @@ static struct mtd_info *cfi_intelext_setup(struct map_info *map)
...
@@ -203,6 +203,7 @@ static struct mtd_info *cfi_intelext_setup(struct map_info *map)
if
(
!
mtd
->
eraseregions
)
{
if
(
!
mtd
->
eraseregions
)
{
printk
(
KERN_ERR
"Failed to allocate memory for MTD erase region info
\n
"
);
printk
(
KERN_ERR
"Failed to allocate memory for MTD erase region info
\n
"
);
kfree
(
cfi
->
cmdset_priv
);
kfree
(
cfi
->
cmdset_priv
);
kfree
(
mtd
);
return
NULL
;
return
NULL
;
}
}
...
@@ -227,6 +228,7 @@ static struct mtd_info *cfi_intelext_setup(struct map_info *map)
...
@@ -227,6 +228,7 @@ static struct mtd_info *cfi_intelext_setup(struct map_info *map)
printk
(
KERN_WARNING
"Sum of regions (%lx) != total size of set of interleaved chips (%lx)
\n
"
,
offset
,
devsize
);
printk
(
KERN_WARNING
"Sum of regions (%lx) != total size of set of interleaved chips (%lx)
\n
"
,
offset
,
devsize
);
kfree
(
mtd
->
eraseregions
);
kfree
(
mtd
->
eraseregions
);
kfree
(
cfi
->
cmdset_priv
);
kfree
(
cfi
->
cmdset_priv
);
kfree
(
mtd
);
return
NULL
;
return
NULL
;
}
}
...
...
drivers/mtd/chips/cfi_cmdset_0002.c
View file @
4e4d6a6f
...
@@ -174,6 +174,7 @@ static struct mtd_info *cfi_amdstd_setup(struct map_info *map)
...
@@ -174,6 +174,7 @@ static struct mtd_info *cfi_amdstd_setup(struct map_info *map)
if
(
!
mtd
->
eraseregions
)
{
if
(
!
mtd
->
eraseregions
)
{
printk
(
KERN_WARNING
"Failed to allocate memory for MTD erase region info
\n
"
);
printk
(
KERN_WARNING
"Failed to allocate memory for MTD erase region info
\n
"
);
kfree
(
cfi
->
cmdset_priv
);
kfree
(
cfi
->
cmdset_priv
);
kfree
(
mtd
);
return
NULL
;
return
NULL
;
}
}
...
@@ -197,6 +198,7 @@ static struct mtd_info *cfi_amdstd_setup(struct map_info *map)
...
@@ -197,6 +198,7 @@ static struct mtd_info *cfi_amdstd_setup(struct map_info *map)
printk
(
KERN_WARNING
"Sum of regions (%lx) != total size of set of interleaved chips (%lx)
\n
"
,
offset
,
devsize
);
printk
(
KERN_WARNING
"Sum of regions (%lx) != total size of set of interleaved chips (%lx)
\n
"
,
offset
,
devsize
);
kfree
(
mtd
->
eraseregions
);
kfree
(
mtd
->
eraseregions
);
kfree
(
cfi
->
cmdset_priv
);
kfree
(
cfi
->
cmdset_priv
);
kfree
(
mtd
);
return
NULL
;
return
NULL
;
}
}
#if 0
#if 0
...
...
drivers/mtd/chips/sharp.c
View file @
4e4d6a6f
...
@@ -116,8 +116,10 @@ struct mtd_info *sharp_probe(struct map_info *map)
...
@@ -116,8 +116,10 @@ struct mtd_info *sharp_probe(struct map_info *map)
return
NULL
;
return
NULL
;
sharp
=
kmalloc
(
sizeof
(
*
sharp
),
GFP_KERNEL
);
sharp
=
kmalloc
(
sizeof
(
*
sharp
),
GFP_KERNEL
);
if
(
!
sharp
)
if
(
!
sharp
)
{
kfree
(
mtd
);
return
NULL
;
return
NULL
;
}
memset
(
mtd
,
0
,
sizeof
(
*
mtd
));
memset
(
mtd
,
0
,
sizeof
(
*
mtd
));
...
...
drivers/net/cs89x0.c
View file @
4e4d6a6f
...
@@ -1630,16 +1630,21 @@ static void set_multicast_list(struct net_device *dev)
...
@@ -1630,16 +1630,21 @@ static void set_multicast_list(struct net_device *dev)
}
}
static
int
set_mac_address
(
struct
net_device
*
dev
,
void
*
addr
)
static
int
set_mac_address
(
struct
net_device
*
dev
,
void
*
p
)
{
{
int
i
;
int
i
;
struct
sockaddr
*
addr
=
p
;
if
(
netif_running
(
dev
))
if
(
netif_running
(
dev
))
return
-
EBUSY
;
return
-
EBUSY
;
memcpy
(
dev
->
dev_addr
,
addr
->
sa_data
,
dev
->
addr_len
);
if
(
net_debug
)
{
if
(
net_debug
)
{
printk
(
"%s: Setting MAC address to "
,
dev
->
name
);
printk
(
"%s: Setting MAC address to "
,
dev
->
name
);
for
(
i
=
0
;
i
<
6
;
i
++
)
for
(
i
=
0
;
i
<
dev
->
addr_len
;
i
++
)
printk
(
" %2.2x"
,
dev
->
dev_addr
[
i
]
=
((
unsigned
char
*
)
addr
)[
i
]
);
printk
(
" %2.2x"
,
dev
->
dev_addr
[
i
]);
printk
(
".
\n
"
);
printk
(
".
\n
"
);
}
}
/* set the Ethernet address */
/* set the Ethernet address */
...
...
fs/exec.c
View file @
4e4d6a6f
...
@@ -287,7 +287,8 @@ int copy_strings_kernel(int argc,char ** argv, struct linux_binprm *bprm)
...
@@ -287,7 +287,8 @@ int copy_strings_kernel(int argc,char ** argv, struct linux_binprm *bprm)
*
*
* tsk->mmap_sem is held for writing.
* tsk->mmap_sem is held for writing.
*/
*/
void
put_dirty_page
(
struct
task_struct
*
tsk
,
struct
page
*
page
,
unsigned
long
address
)
void
put_dirty_page
(
struct
task_struct
*
tsk
,
struct
page
*
page
,
unsigned
long
address
,
pgprot_t
prot
)
{
{
pgd_t
*
pgd
;
pgd_t
*
pgd
;
pmd_t
*
pmd
;
pmd_t
*
pmd
;
...
@@ -295,7 +296,8 @@ void put_dirty_page(struct task_struct * tsk, struct page *page, unsigned long a
...
@@ -295,7 +296,8 @@ void put_dirty_page(struct task_struct * tsk, struct page *page, unsigned long a
struct
pte_chain
*
pte_chain
;
struct
pte_chain
*
pte_chain
;
if
(
page_count
(
page
)
!=
1
)
if
(
page_count
(
page
)
!=
1
)
printk
(
KERN_ERR
"mem_map disagrees with %p at %08lx
\n
"
,
page
,
address
);
printk
(
KERN_ERR
"mem_map disagrees with %p at %08lx
\n
"
,
page
,
address
);
pgd
=
pgd_offset
(
tsk
->
mm
,
address
);
pgd
=
pgd_offset
(
tsk
->
mm
,
address
);
pte_chain
=
pte_chain_alloc
(
GFP_KERNEL
);
pte_chain
=
pte_chain_alloc
(
GFP_KERNEL
);
...
@@ -314,7 +316,7 @@ void put_dirty_page(struct task_struct * tsk, struct page *page, unsigned long a
...
@@ -314,7 +316,7 @@ void put_dirty_page(struct task_struct * tsk, struct page *page, unsigned long a
}
}
lru_cache_add_active
(
page
);
lru_cache_add_active
(
page
);
flush_dcache_page
(
page
);
flush_dcache_page
(
page
);
set_pte
(
pte
,
pte_mkdirty
(
pte_mkwrite
(
mk_pte
(
page
,
PAGE_COPY
))));
set_pte
(
pte
,
pte_mkdirty
(
pte_mkwrite
(
mk_pte
(
page
,
prot
))));
pte_chain
=
page_add_rmap
(
page
,
pte
,
pte_chain
);
pte_chain
=
page_add_rmap
(
page
,
pte
,
pte_chain
);
pte_unmap
(
pte
);
pte_unmap
(
pte
);
tsk
->
mm
->
rss
++
;
tsk
->
mm
->
rss
++
;
...
@@ -421,7 +423,8 @@ int setup_arg_pages(struct linux_binprm *bprm)
...
@@ -421,7 +423,8 @@ int setup_arg_pages(struct linux_binprm *bprm)
struct
page
*
page
=
bprm
->
page
[
i
];
struct
page
*
page
=
bprm
->
page
[
i
];
if
(
page
)
{
if
(
page
)
{
bprm
->
page
[
i
]
=
NULL
;
bprm
->
page
[
i
]
=
NULL
;
put_dirty_page
(
current
,
page
,
stack_base
);
put_dirty_page
(
current
,
page
,
stack_base
,
mpnt
->
vm_page_prot
);
}
}
stack_base
+=
PAGE_SIZE
;
stack_base
+=
PAGE_SIZE
;
}
}
...
@@ -434,8 +437,6 @@ int setup_arg_pages(struct linux_binprm *bprm)
...
@@ -434,8 +437,6 @@ int setup_arg_pages(struct linux_binprm *bprm)
#else
#else
#define put_dirty_page(tsk, page, address)
#define setup_arg_pages(bprm) (0)
static
inline
void
free_arg_pages
(
struct
linux_binprm
*
bprm
)
static
inline
void
free_arg_pages
(
struct
linux_binprm
*
bprm
)
{
{
int
i
;
int
i
;
...
...
include/asm-i386/mach-visws/mach_apic.h
View file @
4e4d6a6f
...
@@ -19,6 +19,14 @@
...
@@ -19,6 +19,14 @@
#define check_apicid_used(bitmap, apicid) (bitmap & (1 << apicid))
#define check_apicid_used(bitmap, apicid) (bitmap & (1 << apicid))
#define check_apicid_present(bit) (phys_cpu_present_map & (1 << bit))
#define check_apicid_present(bit) (phys_cpu_present_map & (1 << bit))
#define APIC_ID_MASK (0xF<<24)
static
inline
unsigned
get_apic_id
(
unsigned
long
x
)
{
return
(((
x
)
>>
24
)
&
0xF
);
}
#define GET_APIC_ID(x) get_apic_id(x)
static
inline
int
apic_id_registered
(
void
)
static
inline
int
apic_id_registered
(
void
)
{
{
return
(
test_bit
(
GET_APIC_ID
(
apic_read
(
APIC_ID
)),
return
(
test_bit
(
GET_APIC_ID
(
apic_read
(
APIC_ID
)),
...
...
include/linux/mm.h
View file @
4e4d6a6f
...
@@ -111,10 +111,14 @@ struct vm_area_struct {
...
@@ -111,10 +111,14 @@ struct vm_area_struct {
#define VM_ACCOUNT 0x00100000
/* Is a VM accounted object */
#define VM_ACCOUNT 0x00100000
/* Is a VM accounted object */
#define VM_HUGETLB 0x00400000
/* Huge TLB Page VM */
#define VM_HUGETLB 0x00400000
/* Huge TLB Page VM */
#ifndef VM_STACK_DEFAULT_FLAGS
/* arch can override this */
#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
#endif
#ifdef CONFIG_STACK_GROWSUP
#ifdef CONFIG_STACK_GROWSUP
#define VM_STACK_FLAGS (VM_GROWSUP | VM_
DATA
_DEFAULT_FLAGS | VM_ACCOUNT)
#define VM_STACK_FLAGS (VM_GROWSUP | VM_
STACK
_DEFAULT_FLAGS | VM_ACCOUNT)
#else
#else
#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_
DATA
_DEFAULT_FLAGS | VM_ACCOUNT)
#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_
STACK
_DEFAULT_FLAGS | VM_ACCOUNT)
#endif
#endif
#define VM_READHINTMASK (VM_SEQ_READ | VM_RAND_READ)
#define VM_READHINTMASK (VM_SEQ_READ | VM_RAND_READ)
...
@@ -426,7 +430,8 @@ extern int handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsi
...
@@ -426,7 +430,8 @@ extern int handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsi
extern
int
make_pages_present
(
unsigned
long
addr
,
unsigned
long
end
);
extern
int
make_pages_present
(
unsigned
long
addr
,
unsigned
long
end
);
extern
int
access_process_vm
(
struct
task_struct
*
tsk
,
unsigned
long
addr
,
void
*
buf
,
int
len
,
int
write
);
extern
int
access_process_vm
(
struct
task_struct
*
tsk
,
unsigned
long
addr
,
void
*
buf
,
int
len
,
int
write
);
extern
long
sys_remap_file_pages
(
unsigned
long
start
,
unsigned
long
size
,
unsigned
long
prot
,
unsigned
long
pgoff
,
unsigned
long
nonblock
);
extern
long
sys_remap_file_pages
(
unsigned
long
start
,
unsigned
long
size
,
unsigned
long
prot
,
unsigned
long
pgoff
,
unsigned
long
nonblock
);
void
put_dirty_page
(
struct
task_struct
*
tsk
,
struct
page
*
page
,
unsigned
long
address
,
pgprot_t
prot
);
int
get_user_pages
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
,
unsigned
long
start
,
int
get_user_pages
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
,
unsigned
long
start
,
int
len
,
int
write
,
int
force
,
struct
page
**
pages
,
struct
vm_area_struct
**
vmas
);
int
len
,
int
write
,
int
force
,
struct
page
**
pages
,
struct
vm_area_struct
**
vmas
);
...
...
include/linux/smp.h
View file @
4e4d6a6f
...
@@ -74,10 +74,6 @@ static inline int on_each_cpu(void (*func) (void *info), void *info,
...
@@ -74,10 +74,6 @@ static inline int on_each_cpu(void (*func) (void *info), void *info,
*/
*/
extern
int
smp_threads_ready
;
extern
int
smp_threads_ready
;
extern
volatile
unsigned
long
smp_msg_data
;
extern
volatile
int
smp_src_cpu
;
extern
volatile
int
smp_msg_id
;
#define MSG_ALL_BUT_SELF 0x8000
/* Assume <32768 CPU's */
#define MSG_ALL_BUT_SELF 0x8000
/* Assume <32768 CPU's */
#define MSG_ALL 0x8001
#define MSG_ALL 0x8001
...
...
include/linux/spinlock.h
View file @
4e4d6a6f
...
@@ -79,10 +79,10 @@ typedef struct {
...
@@ -79,10 +79,10 @@ typedef struct {
do { \
do { \
CHECK_LOCK(x); \
CHECK_LOCK(x); \
if ((x)->lock&&(x)->babble) { \
if ((x)->lock&&(x)->babble) { \
(x)->babble--; \
printk("%s:%d: spin_lock(%s:%p) already locked by %s/%d\n", \
printk("%s:%d: spin_lock(%s:%p) already locked by %s/%d\n", \
__FILE__,__LINE__, (x)->module, \
__FILE__,__LINE__, (x)->module, \
(x), (x)->owner, (x)->oline); \
(x), (x)->owner, (x)->oline); \
(x)->babble--; \
} \
} \
(x)->lock = 1; \
(x)->lock = 1; \
(x)->owner = __FILE__; \
(x)->owner = __FILE__; \
...
@@ -95,10 +95,10 @@ typedef struct {
...
@@ -95,10 +95,10 @@ typedef struct {
({ \
({ \
CHECK_LOCK(x); \
CHECK_LOCK(x); \
if ((x)->lock&&(x)->babble) { \
if ((x)->lock&&(x)->babble) { \
(x)->babble--; \
printk("%s:%d: spin_is_locked(%s:%p) already locked by %s/%d\n", \
printk("%s:%d: spin_is_locked(%s:%p) already locked by %s/%d\n", \
__FILE__,__LINE__, (x)->module, \
__FILE__,__LINE__, (x)->module, \
(x), (x)->owner, (x)->oline); \
(x), (x)->owner, (x)->oline); \
(x)->babble--; \
} \
} \
0; \
0; \
})
})
...
@@ -109,10 +109,10 @@ typedef struct {
...
@@ -109,10 +109,10 @@ typedef struct {
({ \
({ \
CHECK_LOCK(x); \
CHECK_LOCK(x); \
if ((x)->lock&&(x)->babble) { \
if ((x)->lock&&(x)->babble) { \
(x)->babble--; \
printk("%s:%d: spin_trylock(%s:%p) already locked by %s/%d\n", \
printk("%s:%d: spin_trylock(%s:%p) already locked by %s/%d\n", \
__FILE__,__LINE__, (x)->module, \
__FILE__,__LINE__, (x)->module, \
(x), (x)->owner, (x)->oline); \
(x), (x)->owner, (x)->oline); \
(x)->babble--; \
} \
} \
(x)->lock = 1; \
(x)->lock = 1; \
(x)->owner = __FILE__; \
(x)->owner = __FILE__; \
...
@@ -124,10 +124,10 @@ typedef struct {
...
@@ -124,10 +124,10 @@ typedef struct {
do { \
do { \
CHECK_LOCK(x); \
CHECK_LOCK(x); \
if ((x)->lock&&(x)->babble) { \
if ((x)->lock&&(x)->babble) { \
(x)->babble--; \
printk("%s:%d: spin_unlock_wait(%s:%p) owned by %s/%d\n", \
printk("%s:%d: spin_unlock_wait(%s:%p) owned by %s/%d\n", \
__FILE__,__LINE__, (x)->module, (x), \
__FILE__,__LINE__, (x)->module, (x), \
(x)->owner, (x)->oline); \
(x)->owner, (x)->oline); \
(x)->babble--; \
}\
}\
} while (0)
} while (0)
...
@@ -135,9 +135,9 @@ typedef struct {
...
@@ -135,9 +135,9 @@ typedef struct {
do { \
do { \
CHECK_LOCK(x); \
CHECK_LOCK(x); \
if (!(x)->lock&&(x)->babble) { \
if (!(x)->lock&&(x)->babble) { \
(x)->babble--; \
printk("%s:%d: spin_unlock(%s:%p) not locked\n", \
printk("%s:%d: spin_unlock(%s:%p) not locked\n", \
__FILE__,__LINE__, (x)->module, (x));\
__FILE__,__LINE__, (x)->module, (x));\
(x)->babble--; \
} \
} \
(x)->lock = 0; \
(x)->lock = 0; \
} while (0)
} while (0)
...
...
sound/core/info.c
View file @
4e4d6a6f
...
@@ -1080,7 +1080,7 @@ snd_info_entry_t *snd_info_create_device(const char *name, unsigned int number,
...
@@ -1080,7 +1080,7 @@ snd_info_entry_t *snd_info_create_device(const char *name, unsigned int number,
entry
->
p
=
p
;
entry
->
p
=
p
;
up
(
&
info_mutex
);
up
(
&
info_mutex
);
if
(
strncmp
(
name
,
"controlC"
,
8
)
=
=
0
)
/* created in sound.c */
if
(
strncmp
(
name
,
"controlC"
,
8
)
!
=
0
)
/* created in sound.c */
devfs_mk_cdev
(
MKDEV
(
_major
,
minor
),
mode
,
"snd/%s"
,
name
);
devfs_mk_cdev
(
MKDEV
(
_major
,
minor
),
mode
,
"snd/%s"
,
name
);
return
entry
;
return
entry
;
}
}
...
...
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