Commit 994b3fb0 authored by Benjamin LaHaise's avatar Benjamin LaHaise

Merge redhat.com:/md0/linus-2.5 into redhat.com:/md0/aio-2.5

parents ecb796f5 469d2810
...@@ -738,7 +738,7 @@ S: Maintained ...@@ -738,7 +738,7 @@ S: Maintained
IBM ServeRAID RAID DRIVER IBM ServeRAID RAID DRIVER
P: Jack Hammer P: Jack Hammer
P: Dave Jeffrey P: Dave Jeffery
M: ipslinux@adaptec.com M: ipslinux@adaptec.com
W: http://www.developer.ibm.com/welcome/netfinity/serveraid.html W: http://www.developer.ibm.com/welcome/netfinity/serveraid.html
S: Supported S: Supported
......
...@@ -251,6 +251,10 @@ CONFIG_ALPHA_PRIMO ...@@ -251,6 +251,10 @@ CONFIG_ALPHA_PRIMO
CONFIG_ALPHA_GAMMA CONFIG_ALPHA_GAMMA
Say Y if you have an AS 2000 5/xxx or an AS 2100 5/xxx. Say Y if you have an AS 2000 5/xxx or an AS 2100 5/xxx.
CONFIG_ALPHA_EV67
Is this a machine based on the EV67 core? If in doubt, select N here
and the machine will be treated as an EV6.
CONFIG_ALPHA_SRM CONFIG_ALPHA_SRM
There are two different types of booting firmware on Alphas: SRM, There are two different types of booting firmware on Alphas: SRM,
which is command line driven, and ARC, which uses menus and arrow which is command line driven, and ARC, which uses menus and arrow
...@@ -610,3 +614,14 @@ CONFIG_DEBUG_SPINLOCK ...@@ -610,3 +614,14 @@ CONFIG_DEBUG_SPINLOCK
best used in conjunction with the NMI watchdog so that spinlock best used in conjunction with the NMI watchdog so that spinlock
deadlocks are also debuggable. deadlocks are also debuggable.
CONFIG_DEBUG_RWLOCK
If you say Y here then read-write lock processing will count how many
times it has tried to get the lock and issue an error message after
too many attempts. If you suspect a rwlock problem or a kernel
hacker asks for this option then say Y. Otherwise say N.
CONFIG_DEBUG_SEMAPHORE
If you say Y here then semaphore processing will issue lots of
verbose debugging messages. If you suspect a semaphore problem or a
kernel hacker asks for this option then say Y. Otherwise say N.
...@@ -99,30 +99,32 @@ export libs-y ...@@ -99,30 +99,32 @@ export libs-y
MAKEBOOT = $(MAKE) -C arch/alpha/boot MAKEBOOT = $(MAKE) -C arch/alpha/boot
rawboot: rawboot: vmlinux
@$(MAKEBOOT) rawboot @$(MAKEBOOT) rawboot
boot: vmlinux
@$(MAKEBOOT)
# #
# My boot writes directly to a specific disk partition, I doubt most # My boot writes directly to a specific disk partition, I doubt most
# people will want to do that without changes.. # people will want to do that without changes..
# #
msb my-special-boot: msb my-special-boot: vmlinux
@$(MAKEBOOT) msb @$(MAKEBOOT) msb
bootimage: bootimage: vmlinux
@$(MAKEBOOT) bootimage @$(MAKEBOOT) bootimage
srmboot: srmboot: vmlinux
@$(MAKEBOOT) srmboot @$(MAKEBOOT) srmboot
archclean: archclean:
@$(MAKE) -C arch/alpha/kernel clean
@$(MAKEBOOT) clean @$(MAKEBOOT) clean
archmrproper: archmrproper:
rm -f include/asm-alpha/asm_offsets.h rm -f include/asm-alpha/asm_offsets.h
bootpfile: bootpfile: vmlinux
@$(MAKEBOOT) bootpfile @$(MAKEBOOT) bootpfile
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
# Copyright (C) 1994 by Linus Torvalds # Copyright (C) 1994 by Linus Torvalds
# #
LINKFLAGS = -static -T bootloader.lds #-N -relax LINKFLAGS = -static -T bootloader.lds -uvsprintf #-N -relax
CFLAGS := $(CFLAGS) -I$(TOPDIR)/include
.S.s: .S.s:
$(CPP) $(AFLAGS) -traditional -o $*.o $< $(CPP) $(AFLAGS) -traditional -o $*.o $<
......
...@@ -8,8 +8,9 @@ EXTRA_AFLAGS := $(CFLAGS) ...@@ -8,8 +8,9 @@ EXTRA_AFLAGS := $(CFLAGS)
export-objs := alpha_ksyms.o export-objs := alpha_ksyms.o
obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o irq_alpha.o \ obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
signal.o setup.o ptrace.o time.o semaphore.o alpha_ksyms.o irq_alpha.o signal.o setup.o ptrace.o time.o semaphore.o \
alpha_ksyms.o systbls.o
# #
# FIXME! # FIXME!
......
...@@ -161,7 +161,6 @@ EXPORT_SYMBOL(sys_read); ...@@ -161,7 +161,6 @@ EXPORT_SYMBOL(sys_read);
EXPORT_SYMBOL(sys_lseek); EXPORT_SYMBOL(sys_lseek);
EXPORT_SYMBOL(__kernel_execve); EXPORT_SYMBOL(__kernel_execve);
EXPORT_SYMBOL(sys_setsid); EXPORT_SYMBOL(sys_setsid);
EXPORT_SYMBOL(sys_sync);
EXPORT_SYMBOL(sys_wait4); EXPORT_SYMBOL(sys_wait4);
/* Networking helper routines. */ /* Networking helper routines. */
......
This diff is collapsed.
This diff is collapsed.
...@@ -191,26 +191,13 @@ machine_power_off(void) ...@@ -191,26 +191,13 @@ machine_power_off(void)
common_shutdown(LINUX_REBOOT_CMD_POWER_OFF, NULL); common_shutdown(LINUX_REBOOT_CMD_POWER_OFF, NULL);
} }
/* Used by sysrq-p, among others. I don't believe r9-r15 are ever
saved in the context it's used. */
void void
show_regs(struct pt_regs * regs) show_regs(struct pt_regs *regs)
{ {
printk("\n"); dik_show_regs(regs, 0);
printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
printk("ps: %04lx pc: [<%016lx>] CPU %d %s\n",
regs->ps, regs->pc, smp_processor_id(), print_tainted());
printk("rp: [<%016lx>] sp: %p\n", regs->r26, regs+1);
printk(" r0: %016lx r1: %016lx r2: %016lx r3: %016lx\n",
regs->r0, regs->r1, regs->r2, regs->r3);
printk(" r4: %016lx r5: %016lx r6: %016lx r7: %016lx\n",
regs->r4, regs->r5, regs->r6, regs->r7);
printk(" r8: %016lx r16: %016lx r17: %016lx r18: %016lx\n",
regs->r8, regs->r16, regs->r17, regs->r18);
printk("r19: %016lx r20: %016lx r21: %016lx r22: %016lx\n",
regs->r19, regs->r20, regs->r21, regs->r22);
printk("r23: %016lx r24: %016lx r25: %016lx r26: %016lx\n",
regs->r23, regs->r24, regs->r25, regs->r26);
printk("r27: %016lx r28: %016lx r29: %016lx hae: %016lx\n",
regs->r27, regs->r28, regs->gp, regs->hae);
} }
/* /*
......
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
#include <linux/blk.h> #include <linux/blk.h>
#endif #endif
#ifdef CONFIG_MAGIC_SYSRQ
#include <linux/sysrq.h>
#include <linux/reboot.h>
#endif
#include <linux/notifier.h> #include <linux/notifier.h>
extern struct notifier_block *panic_notifier_list; extern struct notifier_block *panic_notifier_list;
static int alpha_panic_event(struct notifier_block *, unsigned long, void *); static int alpha_panic_event(struct notifier_block *, unsigned long, void *);
...@@ -539,6 +544,15 @@ setup_arch(char **cmdline_p) ...@@ -539,6 +544,15 @@ setup_arch(char **cmdline_p)
register_srm_console(); register_srm_console();
} }
#ifdef CONFIG_MAGIC_SYSRQ
/* If we're using SRM, make sysrq-b halt back to the prom,
not auto-reboot. */
if (alpha_using_srm) {
struct sysrq_key_op *op = __sysrq_get_key_op('b');
op->handler = (void *) machine_halt;
}
#endif
/* /*
* Indentify and reconfigure for the current system. * Indentify and reconfigure for the current system.
*/ */
......
This diff is collapsed.
...@@ -51,14 +51,16 @@ obj-$(CONFIG_SMP) += dec_and_lock.o ...@@ -51,14 +51,16 @@ obj-$(CONFIG_SMP) += dec_and_lock.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
__divqu.o: $(ev6)divide.S $(obj)/__divqu.o: $(obj)/$(ev6)divide.S
$(CC) $(AFLAGS) -DDIV -c -o __divqu.o $(ev6)divide.S $(CC) $(AFLAGS) -DDIV -c -o $(obj)/__divqu.o $(obj)/$(ev6)divide.S
__remqu.o: $(ev6)divide.S $(obj)/__remqu.o: $(obj)/$(ev6)divide.S
$(CC) $(AFLAGS) -DREM -c -o __remqu.o $(ev6)divide.S $(CC) $(AFLAGS) -DREM -c -o $(obj)/__remqu.o $(obj)/$(ev6)divide.S
__divlu.o: $(ev6)divide.S $(obj)/__divlu.o: $(obj)/$(ev6)divide.S
$(CC) $(AFLAGS) -DDIV -DINTSIZE -c -o __divlu.o $(ev6)divide.S $(CC) $(AFLAGS) -DDIV -DINTSIZE \
-c -o $(obj)/__divlu.o $(obj)/$(ev6)divide.S
__remlu.o: $(ev6)divide.S $(obj)/__remlu.o: $(obj)/$(ev6)divide.S
$(CC) $(AFLAGS) -DREM -DINTSIZE -c -o __remlu.o $(ev6)divide.S $(CC) $(AFLAGS) -DREM -DINTSIZE \
-c -o $(obj)/__remlu.o $(obj)/$(ev6)divide.S
...@@ -278,7 +278,7 @@ $u_eoc: ...@@ -278,7 +278,7 @@ $u_eoc:
extqh t2, a1, t0 # e0 : extract low bits for last word extqh t2, a1, t0 # e0 : extract low bits for last word
or t1, t0, t1 # e1 : or t1, t0, t1 # e1 :
1: cmpbge zero, t1, t7 1: cmpbge zero, t1, t8
mov t1, t0 mov t1, t0
$u_eocfin: # end-of-count, final word $u_eocfin: # end-of-count, final word
......
...@@ -125,11 +125,10 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -125,11 +125,10 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
goto bad_area; goto bad_area;
if (expand_stack(vma, address)) if (expand_stack(vma, address))
goto bad_area; goto bad_area;
/*
* Ok, we have a good vm_area for this memory access, so /* Ok, we have a good vm_area for this memory access, so
* we can handle it.. we can handle it. */
*/ good_area:
good_area:
if (cause < 0) { if (cause < 0) {
if (!(vma->vm_flags & VM_EXEC)) if (!(vma->vm_flags & VM_EXEC))
goto bad_area; goto bad_area;
...@@ -143,11 +142,9 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -143,11 +142,9 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
} }
survive: survive:
/* /* If for any reason at all we couldn't handle the fault,
* If for any reason at all we couldn't handle the fault, make sure we exit gracefully rather than endlessly redo
* make sure we exit gracefully rather than endlessly redo the fault. */
* the fault.
*/
fault = handle_mm_fault(mm, vma, address, cause > 0); fault = handle_mm_fault(mm, vma, address, cause > 0);
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
...@@ -155,14 +152,11 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -155,14 +152,11 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
goto out_of_memory; goto out_of_memory;
if (fault == 0) if (fault == 0)
goto do_sigbus; goto do_sigbus;
return; return;
/* /* Something tried to access memory that isn't in our memory map.
* Something tried to access memory that isn't in our memory map.. Fix it, but check if it's kernel or user first. */
* Fix it, but check if it's kernel or user first.. bad_area:
*/
bad_area:
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
if (user_mode(regs)) { if (user_mode(regs)) {
...@@ -170,7 +164,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -170,7 +164,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
return; return;
} }
no_context: no_context:
/* Are we prepared to handle this fault as an exception? */ /* Are we prepared to handle this fault as an exception? */
if ((fixup = search_exception_table(regs->pc, regs->gp)) != 0) { if ((fixup = search_exception_table(regs->pc, regs->gp)) != 0) {
unsigned long newpc; unsigned long newpc;
...@@ -183,20 +177,16 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -183,20 +177,16 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
return; return;
} }
/* /* Oops. The kernel tried to access some bad page. We'll have to
* Oops. The kernel tried to access some bad page. We'll have to terminate things with extreme prejudice. */
* terminate things with extreme prejudice.
*/
printk(KERN_ALERT "Unable to handle kernel paging request at " printk(KERN_ALERT "Unable to handle kernel paging request at "
"virtual address %016lx\n", address); "virtual address %016lx\n", address);
die_if_kernel("Oops", regs, cause, (unsigned long*)regs - 16); die_if_kernel("Oops", regs, cause, (unsigned long*)regs - 16);
do_exit(SIGKILL); do_exit(SIGKILL);
/* /* We ran out of memory, or some other thing happened to us that
* We ran out of memory, or some other thing happened to us that made made us unable to handle the page fault gracefully. */
* us unable to handle the page fault gracefully. out_of_memory:
*/
out_of_memory:
if (current->pid == 1) { if (current->pid == 1) {
yield(); yield();
down_read(&mm->mmap_sem); down_read(&mm->mmap_sem);
...@@ -208,18 +198,16 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -208,18 +198,16 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
goto no_context; goto no_context;
do_exit(SIGKILL); do_exit(SIGKILL);
do_sigbus: do_sigbus:
/* /* Send a sigbus, regardless of whether we were in kernel
* Send a sigbus, regardless of whether we were in kernel or user mode. */
* or user mode.
*/
force_sig(SIGBUS, current); force_sig(SIGBUS, current);
if (!user_mode(regs)) if (!user_mode(regs))
goto no_context; goto no_context;
return; return;
#ifdef CONFIG_ALPHA_LARGE_VMALLOC #ifdef CONFIG_ALPHA_LARGE_VMALLOC
vmalloc_fault: vmalloc_fault:
if (user_mode(regs)) { if (user_mode(regs)) {
force_sig(SIGSEGV, current); force_sig(SIGSEGV, current);
return; return;
......
...@@ -58,10 +58,11 @@ SECTIONS ...@@ -58,10 +58,11 @@ SECTIONS
__initcall_end = .; __initcall_end = .;
} }
. = ALIGN(64); .data.percpu ALIGN(64): {
__per_cpu_start = .; __per_cpu_start = .;
.data.percpu : { *(.data.percpu) } *(.data.percpu)
__per_cpu_end = .; __per_cpu_end = .;
}
/* The initial task and kernel stack */ /* The initial task and kernel stack */
.data.init_thread ALIGN(2*8192) : { .data.init_thread ALIGN(2*8192) : {
......
...@@ -1664,14 +1664,6 @@ static int idedisk_resume(struct device *dev, u32 level) ...@@ -1664,14 +1664,6 @@ static int idedisk_resume(struct device *dev, u32 level)
/* This is just a hook for the overall driver tree. /* This is just a hook for the overall driver tree.
*/ */
static struct device_driver idedisk_devdrv = {
.bus = &ide_bus_type,
.name = "IDE disk driver",
.suspend = idedisk_suspend,
.resume = idedisk_resume,
};
static int idedisk_ioctl (ide_drive_t *drive, struct inode *inode, static int idedisk_ioctl (ide_drive_t *drive, struct inode *inode,
struct file *file, unsigned int cmd, unsigned long arg) struct file *file, unsigned int cmd, unsigned long arg)
{ {
...@@ -1717,12 +1709,6 @@ static void idedisk_setup (ide_drive_t *drive) ...@@ -1717,12 +1709,6 @@ static void idedisk_setup (ide_drive_t *drive)
drive->doorlocking = 1; drive->doorlocking = 1;
} }
} }
{
sprintf(drive->disk->disk_dev.name, "ide-disk");
drive->disk->disk_dev.driver = &idedisk_devdrv;
drive->disk->disk_dev.driver_data = drive;
}
#if 1 #if 1
(void) probe_lba_addressing(drive, 1); (void) probe_lba_addressing(drive, 1);
#else #else
...@@ -1806,7 +1792,6 @@ static int idedisk_cleanup (ide_drive_t *drive) ...@@ -1806,7 +1792,6 @@ static int idedisk_cleanup (ide_drive_t *drive)
{ {
struct gendisk *g = drive->disk; struct gendisk *g = drive->disk;
device_unregister(&drive->disk->disk_dev);
if ((drive->id->cfs_enable_2 & 0x3000) && drive->wcache) if ((drive->id->cfs_enable_2 & 0x3000) && drive->wcache)
if (do_idedisk_flushcache(drive)) if (do_idedisk_flushcache(drive))
printk (KERN_INFO "%s: Write Cache FAILED Flushing!\n", printk (KERN_INFO "%s: Write Cache FAILED Flushing!\n",
...@@ -1905,7 +1890,6 @@ static void __exit idedisk_exit (void) ...@@ -1905,7 +1890,6 @@ static void __exit idedisk_exit (void)
static int idedisk_init (void) static int idedisk_init (void)
{ {
ide_register_driver(&idedisk_driver); ide_register_driver(&idedisk_driver);
driver_register(&idedisk_devdrv);
return 0; return 0;
} }
......
...@@ -998,15 +998,6 @@ static void init_gendisk (ide_hwif_t *hwif) ...@@ -998,15 +998,6 @@ static void init_gendisk (ide_hwif_t *hwif)
sprintf(disk->disk_name,"hd%c",'a'+hwif->index*MAX_DRIVES+unit); sprintf(disk->disk_name,"hd%c",'a'+hwif->index*MAX_DRIVES+unit);
disk->minor_shift = PARTN_BITS; disk->minor_shift = PARTN_BITS;
disk->fops = ide_fops; disk->fops = ide_fops;
snprintf(disk->disk_dev.bus_id,BUS_ID_SIZE,"%u.%u",
hwif->index,unit);
snprintf(disk->disk_dev.name,DEVICE_NAME_SIZE,
"%s","IDE Drive");
disk->disk_dev.parent = &hwif->gendev;
disk->disk_dev.bus = &ide_bus_type;
if (hwif->drives[unit].present)
device_register(&disk->disk_dev);
hwif->drives[unit].disk = disk; hwif->drives[unit].disk = disk;
} }
...@@ -1020,6 +1011,20 @@ static void init_gendisk (ide_hwif_t *hwif) ...@@ -1020,6 +1011,20 @@ static void init_gendisk (ide_hwif_t *hwif)
if (hwif->drives[unit].present) if (hwif->drives[unit].present)
hwif->drives[unit].de = devfs_mk_dir(ide_devfs_handle, name, NULL); hwif->drives[unit].de = devfs_mk_dir(ide_devfs_handle, name, NULL);
} }
for (unit = 0; unit < units; ++unit) {
ide_drive_t * drive = &hwif->drives[unit];
snprintf(drive->gendev.bus_id,BUS_ID_SIZE,"%u.%u",
hwif->index,unit);
snprintf(drive->gendev.name,DEVICE_NAME_SIZE,
"%s","IDE Drive");
drive->gendev.parent = &hwif->gendev;
drive->gendev.bus = &ide_bus_type;
if (drive->present)
device_register(&drive->gendev);
}
return; return;
err_kmalloc_gd: err_kmalloc_gd:
......
...@@ -2463,6 +2463,7 @@ int ata_attach(ide_drive_t *drive) ...@@ -2463,6 +2463,7 @@ int ata_attach(ide_drive_t *drive)
if (driver->attach(drive) == 0) { if (driver->attach(drive) == 0) {
if (driver->owner) if (driver->owner)
__MOD_DEC_USE_COUNT(driver->owner); __MOD_DEC_USE_COUNT(driver->owner);
drive->gendev.driver = &driver->gen_driver;
return 0; return 0;
} }
spin_lock(&drivers_lock); spin_lock(&drivers_lock);
...@@ -3422,6 +3423,21 @@ int ide_unregister_subdriver (ide_drive_t *drive) ...@@ -3422,6 +3423,21 @@ int ide_unregister_subdriver (ide_drive_t *drive)
EXPORT_SYMBOL(ide_unregister_subdriver); EXPORT_SYMBOL(ide_unregister_subdriver);
static int ide_drive_remove(struct device * dev)
{
ide_drive_t * drive = container_of(dev,ide_drive_t,gendev);
ide_driver_t * driver = drive->driver;
if (driver) {
if (driver->standby)
driver->standby(drive);
if (driver->cleanup)
driver->cleanup(drive);
}
return 0;
}
int ide_register_driver(ide_driver_t *driver) int ide_register_driver(ide_driver_t *driver)
{ {
struct list_head list; struct list_head list;
...@@ -3440,7 +3456,10 @@ int ide_register_driver(ide_driver_t *driver) ...@@ -3440,7 +3456,10 @@ int ide_register_driver(ide_driver_t *driver)
list_del_init(&drive->list); list_del_init(&drive->list);
ata_attach(drive); ata_attach(drive);
} }
return 0; driver->gen_driver.name = driver->name;
driver->gen_driver.bus = &ide_bus_type;
driver->gen_driver.remove = ide_drive_remove;
return driver_register(&driver->gen_driver);
} }
EXPORT_SYMBOL(ide_register_driver); EXPORT_SYMBOL(ide_register_driver);
...@@ -3491,52 +3510,6 @@ EXPORT_SYMBOL(ide_lock); ...@@ -3491,52 +3510,6 @@ EXPORT_SYMBOL(ide_lock);
EXPORT_SYMBOL(ide_probe); EXPORT_SYMBOL(ide_probe);
EXPORT_SYMBOL(ide_devfs_handle); EXPORT_SYMBOL(ide_devfs_handle);
static int ide_notify_reboot (struct notifier_block *this, unsigned long event, void *x)
{
ide_hwif_t *hwif;
ide_drive_t *drive;
int i, unit;
switch (event) {
case SYS_HALT:
case SYS_POWER_OFF:
case SYS_RESTART:
break;
default:
return NOTIFY_DONE;
}
printk(KERN_INFO "flushing ide devices: ");
for (i = 0; i < MAX_HWIFS; i++) {
hwif = &ide_hwifs[i];
if (!hwif->present)
continue;
for (unit = 0; unit < MAX_DRIVES; ++unit) {
drive = &hwif->drives[unit];
if (!drive->present)
continue;
/* set the drive to standby */
printk("%s ", drive->name);
if (event != SYS_RESTART)
if (drive->driver != NULL && DRIVER(drive)->standby(drive))
continue;
if (drive->driver != NULL && DRIVER(drive)->cleanup(drive))
continue;
}
}
printk("\n");
return NOTIFY_DONE;
}
static struct notifier_block ide_notifier = {
ide_notify_reboot,
NULL,
5
};
struct bus_type ide_bus_type = { struct bus_type ide_bus_type = {
.name = "ide", .name = "ide",
}; };
...@@ -3562,7 +3535,6 @@ int __init ide_init (void) ...@@ -3562,7 +3535,6 @@ int __init ide_init (void)
ide_init_builtin_drivers(); ide_init_builtin_drivers();
initializing = 0; initializing = 0;
register_reboot_notifier(&ide_notifier);
return 0; return 0;
} }
...@@ -3597,7 +3569,6 @@ void cleanup_module (void) ...@@ -3597,7 +3569,6 @@ void cleanup_module (void)
{ {
int index; int index;
unregister_reboot_notifier(&ide_notifier);
for (index = 0; index < MAX_HWIFS; ++index) { for (index = 0; index < MAX_HWIFS; ++index) {
ide_unregister(index); ide_unregister(index);
#if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI) #if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI)
......
...@@ -11,12 +11,11 @@ ...@@ -11,12 +11,11 @@
Do not purchase this card, even as a joke. It's performance is horrible, Do not purchase this card, even as a joke. It's performance is horrible,
and it breaks in many ways. and it breaks in many ways.
The author may be reached as becker@scyld.com, or C/O The original author may be reached as becker@scyld.com, or C/O
Scyld Computing Corporation Scyld Computing Corporation
410 Severn Ave., Suite 210 410 Severn Ave., Suite 210
Annapolis MD 21403 Annapolis MD 21403
Fixed (again!) the missing interrupt locking on TX/RX shifting. Fixed (again!) the missing interrupt locking on TX/RX shifting.
Alan Cox <Alan.Cox@linux.org> Alan Cox <Alan.Cox@linux.org>
...@@ -34,7 +33,16 @@ ...@@ -34,7 +33,16 @@
Cleaned up for 2.3.x because we broke SMP now. Cleaned up for 2.3.x because we broke SMP now.
20000208 Alan Cox <alan@redhat.com> 20000208 Alan Cox <alan@redhat.com>
Check up pass for 2.5. Nothing significant changed
20021009 Alan Cox <alan@redhat.com>
For the avoidance of doubt the "preferred form" of this code is one which
is in an open non patent encumbered format. Where cryptographic key signing
forms part of the process of creating an executable the information
including keys needed to generate an equivalently functional executable
are deemed to be part of the source code.
*/ */
...@@ -88,7 +96,7 @@ ...@@ -88,7 +96,7 @@
*/ */
#define DRV_NAME "3c501" #define DRV_NAME "3c501"
#define DRV_VERSION "2001/11/17" #define DRV_VERSION "2002/10/09"
static const char version[] = static const char version[] =
...@@ -122,113 +130,21 @@ static const char version[] = ...@@ -122,113 +130,21 @@ static const char version[] =
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/init.h> #include <linux/init.h>
#include "3c501.h"
/* A zero-terminated list of I/O addresses to be probed. /* A zero-terminated list of I/O addresses to be probed.
The 3c501 can be at many locations, but here are the popular ones. */ The 3c501 can be at many locations, but here are the popular ones. */
static unsigned int netcard_portlist[] __initdata = { static unsigned int netcard_portlist[] __initdata = {
0x280, 0x300, 0 0x280, 0x300, 0
}; };
/*
* Index to functions.
*/
int el1_probe(struct net_device *dev);
static int el1_probe1(struct net_device *dev, int ioaddr);
static int el_open(struct net_device *dev);
static void el_timeout(struct net_device *dev);
static int el_start_xmit(struct sk_buff *skb, struct net_device *dev);
static void el_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void el_receive(struct net_device *dev);
static void el_reset(struct net_device *dev);
static int el1_close(struct net_device *dev);
static struct net_device_stats *el1_get_stats(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static int netdev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd);
#define EL1_IO_EXTENT 16
#ifndef EL_DEBUG
#define EL_DEBUG 0 /* use 0 for production, 1 for devel., >2 for debug */
#endif /* Anything above 5 is wordy death! */
#define debug el_debug
static int el_debug = EL_DEBUG;
/*
* Board-specific info in dev->priv.
*/
struct net_local
{
struct net_device_stats stats;
int tx_pkt_start; /* The length of the current Tx packet. */
int collisions; /* Tx collisions this packet */
int loading; /* Spot buffer load collisions */
int txing; /* True if card is in TX mode */
spinlock_t lock; /* Serializing lock */
};
#define RX_STATUS (ioaddr + 0x06)
#define RX_CMD RX_STATUS
#define TX_STATUS (ioaddr + 0x07)
#define TX_CMD TX_STATUS
#define GP_LOW (ioaddr + 0x08)
#define GP_HIGH (ioaddr + 0x09)
#define RX_BUF_CLR (ioaddr + 0x0A)
#define RX_LOW (ioaddr + 0x0A)
#define RX_HIGH (ioaddr + 0x0B)
#define SAPROM (ioaddr + 0x0C)
#define AX_STATUS (ioaddr + 0x0E)
#define AX_CMD AX_STATUS
#define DATAPORT (ioaddr + 0x0F)
#define TX_RDY 0x08 /* In TX_STATUS */
#define EL1_DATAPTR 0x08
#define EL1_RXPTR 0x0A
#define EL1_SAPROM 0x0C
#define EL1_DATAPORT 0x0f
/*
* Writes to the ax command register.
*/
#define AX_OFF 0x00 /* Irq off, buffer access on */
#define AX_SYS 0x40 /* Load the buffer */
#define AX_XMIT 0x44 /* Transmit a packet */
#define AX_RX 0x48 /* Receive a packet */
#define AX_LOOP 0x0C /* Loopback mode */
#define AX_RESET 0x80
/*
* Normal receive mode written to RX_STATUS. We must intr on short packets
* to avoid bogus rx lockups.
*/
#define RX_NORM 0xA8 /* 0x68 == all addrs, 0xA8 only to me. */
#define RX_PROM 0x68 /* Senior Prom, uhmm promiscuous mode. */
#define RX_MULT 0xE8 /* Accept multicast packets. */
#define TX_NORM 0x0A /* Interrupt on everything that might hang the chip */
/*
* TX_STATUS register.
*/
#define TX_COLLISION 0x02
#define TX_16COLLISIONS 0x04
#define TX_READY 0x08
#define RX_RUNT 0x08
#define RX_MISSED 0x01 /* Missed a packet due to 3c501 braindamage. */
#define RX_GOOD 0x30 /* Good packet 0x20, or simple overflow 0x10. */
/* /*
* The boilerplate probe code. * The boilerplate probe code.
*/ */
/** /**
* el1_probe: * el1_probe: - probe for a 3c501
* @dev: The device structure passed in to probe. * @dev: The device structure passed in to probe.
* *
* This can be called from two places. The network layer will probe using * This can be called from two places. The network layer will probe using
...@@ -556,7 +472,6 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -556,7 +472,6 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
while(1); while(1);
} }
/** /**
* el_interrupt: * el_interrupt:
...@@ -1072,12 +987,8 @@ void cleanup_module(void) ...@@ -1072,12 +987,8 @@ void cleanup_module(void)
} }
#endif /* MODULE */ #endif /* MODULE */
MODULE_AUTHOR("Donald Becker, Alan Cox");
MODULE_DESCRIPTION("Support for the ancient 3Com 3c501 ethernet card");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
/*
* Local variables:
* compile-command: "gcc -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -m486 -c -o 3c501.o 3c501.c"
* kept-new-versions: 5
* End:
*/
/*
* Index to functions.
*/
int el1_probe(struct net_device *dev);
static int el1_probe1(struct net_device *dev, int ioaddr);
static int el_open(struct net_device *dev);
static void el_timeout(struct net_device *dev);
static int el_start_xmit(struct sk_buff *skb, struct net_device *dev);
static void el_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void el_receive(struct net_device *dev);
static void el_reset(struct net_device *dev);
static int el1_close(struct net_device *dev);
static struct net_device_stats *el1_get_stats(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static int netdev_ioctl (struct net_device *dev, struct ifreq *rq, int cmd);
#define EL1_IO_EXTENT 16
#ifndef EL_DEBUG
#define EL_DEBUG 0 /* use 0 for production, 1 for devel., >2 for debug */
#endif /* Anything above 5 is wordy death! */
#define debug el_debug
static int el_debug = EL_DEBUG;
/*
* Board-specific info in dev->priv.
*/
struct net_local
{
struct net_device_stats stats;
int tx_pkt_start; /* The length of the current Tx packet. */
int collisions; /* Tx collisions this packet */
int loading; /* Spot buffer load collisions */
int txing; /* True if card is in TX mode */
spinlock_t lock; /* Serializing lock */
};
#define RX_STATUS (ioaddr + 0x06)
#define RX_CMD RX_STATUS
#define TX_STATUS (ioaddr + 0x07)
#define TX_CMD TX_STATUS
#define GP_LOW (ioaddr + 0x08)
#define GP_HIGH (ioaddr + 0x09)
#define RX_BUF_CLR (ioaddr + 0x0A)
#define RX_LOW (ioaddr + 0x0A)
#define RX_HIGH (ioaddr + 0x0B)
#define SAPROM (ioaddr + 0x0C)
#define AX_STATUS (ioaddr + 0x0E)
#define AX_CMD AX_STATUS
#define DATAPORT (ioaddr + 0x0F)
#define TX_RDY 0x08 /* In TX_STATUS */
#define EL1_DATAPTR 0x08
#define EL1_RXPTR 0x0A
#define EL1_SAPROM 0x0C
#define EL1_DATAPORT 0x0f
/*
* Writes to the ax command register.
*/
#define AX_OFF 0x00 /* Irq off, buffer access on */
#define AX_SYS 0x40 /* Load the buffer */
#define AX_XMIT 0x44 /* Transmit a packet */
#define AX_RX 0x48 /* Receive a packet */
#define AX_LOOP 0x0C /* Loopback mode */
#define AX_RESET 0x80
/*
* Normal receive mode written to RX_STATUS. We must intr on short packets
* to avoid bogus rx lockups.
*/
#define RX_NORM 0xA8 /* 0x68 == all addrs, 0xA8 only to me. */
#define RX_PROM 0x68 /* Senior Prom, uhmm promiscuous mode. */
#define RX_MULT 0xE8 /* Accept multicast packets. */
#define TX_NORM 0x0A /* Interrupt on everything that might hang the chip */
/*
* TX_STATUS register.
*/
#define TX_COLLISION 0x02
#define TX_16COLLISIONS 0x04
#define TX_READY 0x08
#define RX_RUNT 0x08
#define RX_MISSED 0x01 /* Missed a packet due to 3c501 braindamage. */
#define RX_GOOD 0x30 /* Good packet 0x20, or simple overflow 0x10. */
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#define CPQFCTSSTRUCTS_H #define CPQFCTSSTRUCTS_H
#include <linux/timer.h> // timer declaration in our host data #include <linux/timer.h> // timer declaration in our host data
#include <linux/tqueue.h> // task queue sched
#include <asm/atomic.h> #include <asm/atomic.h>
#include "cpqfcTSioctl.h" #include "cpqfcTSioctl.h"
......
This diff is collapsed.
...@@ -397,13 +397,15 @@ struct IN2000_hostdata { ...@@ -397,13 +397,15 @@ struct IN2000_hostdata {
# define CLISPIN_UNLOCK(host,flags) spin_unlock_irqrestore(host->host_lock, \ # define CLISPIN_UNLOCK(host,flags) spin_unlock_irqrestore(host->host_lock, \
flags) flags)
int in2000_detect(Scsi_Host_Template *) in2000__INIT; static int in2000_detect(Scsi_Host_Template *) in2000__INIT;
int in2000_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); static int in2000_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int in2000_abort(Scsi_Cmnd *); static int in2000_abort(Scsi_Cmnd *);
void in2000_setup(char *, int *) in2000__INIT; static void in2000_setup(char *, int *) in2000__INIT;
int in2000_proc_info(char *, char **, off_t, int, int, int); static int in2000_proc_info(char *, char **, off_t, int, int, int);
int in2000_biosparam(struct scsi_disk *, struct block_device *, int *); static int in2000_biosparam(struct scsi_disk *, struct block_device *, int *);
int in2000_reset(Scsi_Cmnd *, unsigned int); static int in2000_host_reset(Scsi_Cmnd *);
static int in2000_bus_reset(Scsi_Cmnd *);
static int in2000_device_reset(Scsi_Cmnd *);
#define IN2000_CAN_Q 16 #define IN2000_CAN_Q 16
...@@ -411,19 +413,21 @@ int in2000_reset(Scsi_Cmnd *, unsigned int); ...@@ -411,19 +413,21 @@ int in2000_reset(Scsi_Cmnd *, unsigned int);
#define IN2000_CPL 2 #define IN2000_CPL 2
#define IN2000_HOST_ID 7 #define IN2000_HOST_ID 7
#define IN2000 { proc_name: "in2000", /* name of /proc/scsi directory entry */ \ #define IN2000 { proc_name: "in2000", /* name of /proc/scsi directory entry */ \
proc_info: in2000_proc_info, /* pointer to proc info function */ \ proc_info: in2000_proc_info, /* pointer to proc info function */ \
name: "Always IN2000", /* device name */ \ name: "Always IN2000", /* device name */ \
detect: in2000_detect, /* returns number of in2000's found */ \ detect: in2000_detect, /* returns number of in2000's found */ \
queuecommand: in2000_queuecommand, /* queue scsi command, don't wait */ \ queuecommand: in2000_queuecommand, /* queue scsi command, don't wait */ \
abort: in2000_abort, /* abort current command */ \ eh_abort_handler: in2000_abort, /* abort current command */ \
reset: in2000_reset, /* reset scsi bus */ \ eh_bus_reset_handler: in2000_bus_reset, /* reset scsi bus */ \
bios_param: in2000_biosparam, /* figures out BIOS parameters for lilo, etc */ \ eh_device_reset_handler: in2000_device_reset, /* reset scsi device */ \
can_queue: IN2000_CAN_Q, /* max commands we can queue up */ \ eh_host_reset_handler: in2000_host_reset, /* reset scsi hba */ \
this_id: IN2000_HOST_ID, /* host-adapter scsi id */ \ bios_param: in2000_biosparam, /* figures out BIOS parameters for lilo, etc */ \
sg_tablesize: IN2000_SG, /* scatter-gather table size */ \ can_queue: IN2000_CAN_Q, /* max commands we can queue up */ \
cmd_per_lun: IN2000_CPL, /* commands per lun */ \ this_id: IN2000_HOST_ID, /* host-adapter scsi id */ \
use_clustering: DISABLE_CLUSTERING, /* ENABLE_CLUSTERING may speed things up */ \ sg_tablesize: IN2000_SG, /* scatter-gather table size */ \
cmd_per_lun: IN2000_CPL, /* commands per lun */ \
use_clustering: DISABLE_CLUSTERING, /* ENABLE_CLUSTERING may speed things up */ \
} }
#endif /* IN2000_H */ #endif /* IN2000_H */
This diff is collapsed.
/*****************************************************************************/ /*****************************************************************************/
/* ips.h -- driver for the IBM ServeRAID controller */ /* ips.h -- driver for the Adaptec / IBM ServeRAID controller */
/* */ /* */
/* Written By: Keith Mitchell, IBM Corporation */ /* Written By: Keith Mitchell, IBM Corporation */
/* Jack Hammer, Adaptec, Inc. */
/* David Jeffery, Adaptec, Inc. */
/* */ /* */
/* Copyright (C) 1999 IBM Corporation */ /* Copyright (C) 1999 IBM Corporation */
/* Copyright (C) 2003 Adaptec, Inc. */
/* */ /* */
/* This program is free software; you can redistribute it and/or modify */ /* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */ /* it under the terms of the GNU General Public License as published by */
...@@ -40,7 +43,7 @@ ...@@ -40,7 +43,7 @@
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* */ /* */
/* Bugs/Comments/Suggestions should be mailed to: */ /* Bugs/Comments/Suggestions should be mailed to: */
/* ipslinux@us.ibm.com */ /* ipslinux@adaptec.com */
/* */ /* */
/*****************************************************************************/ /*****************************************************************************/
...@@ -84,32 +87,10 @@ ...@@ -84,32 +87,10 @@
((IPS_IS_TROMBONE(ha) || IPS_IS_CLARINET(ha)) && \ ((IPS_IS_TROMBONE(ha) || IPS_IS_CLARINET(ha)) && \
(ips_force_memio))) ? 1 : 0) (ips_force_memio))) ? 1 : 0)
#ifndef VIRT_TO_BUS
#define VIRT_TO_BUS(x) (uint32_t) virt_to_bus((void *) x)
#endif
#ifndef MDELAY #ifndef MDELAY
#define MDELAY mdelay #define MDELAY mdelay
#endif #endif
#ifndef verify_area_20
#define verify_area_20(t,a,sz) (0) /* success */
#endif
#ifndef DECLARE_MUTEX_LOCKED
#define DECLARE_MUTEX_LOCKED(sem) struct semaphore sem = MUTEX_LOCKED;
#endif
/*
* Lock macros
*/
#define IPS_SCB_LOCK(cpu_flags) spin_lock_irqsave(&ha->scb_lock, cpu_flags)
#define IPS_SCB_UNLOCK(cpu_flags) spin_unlock_irqrestore(&ha->scb_lock, cpu_flags)
#define IPS_QUEUE_LOCK(queue) spin_lock_irqsave(&(queue)->lock, (queue)->cpu_flags)
#define IPS_QUEUE_UNLOCK(queue) spin_unlock_irqrestore(&(queue)->lock, (queue)->cpu_flags)
#define IPS_HA_LOCK(cpu_flags) spin_lock_irqsave(&ha->ips_lock, cpu_flags)
#define IPS_HA_UNLOCK(cpu_flags) spin_unlock_irqrestore(&ha->ips_lock, cpu_flags)
/* /*
* Adapter address map equates * Adapter address map equates
*/ */
...@@ -1063,8 +1044,6 @@ typedef struct ips_scb_queue { ...@@ -1063,8 +1044,6 @@ typedef struct ips_scb_queue {
struct ips_scb *head; struct ips_scb *head;
struct ips_scb *tail; struct ips_scb *tail;
int count; int count;
unsigned long cpu_flags;
spinlock_t lock;
} ips_scb_queue_t; } ips_scb_queue_t;
/* /*
...@@ -1074,13 +1053,10 @@ typedef struct ips_wait_queue { ...@@ -1074,13 +1053,10 @@ typedef struct ips_wait_queue {
Scsi_Cmnd *head; Scsi_Cmnd *head;
Scsi_Cmnd *tail; Scsi_Cmnd *tail;
int count; int count;
unsigned long cpu_flags;
spinlock_t lock;
} ips_wait_queue_t; } ips_wait_queue_t;
typedef struct ips_copp_wait_item { typedef struct ips_copp_wait_item {
Scsi_Cmnd *scsi_cmd; Scsi_Cmnd *scsi_cmd;
struct semaphore *sem;
struct ips_copp_wait_item *next; struct ips_copp_wait_item *next;
} ips_copp_wait_item_t; } ips_copp_wait_item_t;
...@@ -1088,8 +1064,6 @@ typedef struct ips_copp_queue { ...@@ -1088,8 +1064,6 @@ typedef struct ips_copp_queue {
struct ips_copp_wait_item *head; struct ips_copp_wait_item *head;
struct ips_copp_wait_item *tail; struct ips_copp_wait_item *tail;
int count; int count;
unsigned long cpu_flags;
spinlock_t lock;
} ips_copp_queue_t; } ips_copp_queue_t;
/* forward decl for host structure */ /* forward decl for host structure */
...@@ -1138,7 +1112,6 @@ typedef struct ips_ha { ...@@ -1138,7 +1112,6 @@ typedef struct ips_ha {
char *ioctl_data; /* IOCTL data area */ char *ioctl_data; /* IOCTL data area */
uint32_t ioctl_datasize; /* IOCTL data size */ uint32_t ioctl_datasize; /* IOCTL data size */
uint32_t cmd_in_progress; /* Current command in progress*/ uint32_t cmd_in_progress; /* Current command in progress*/
unsigned long flags; /* HA flags */
uint8_t waitflag; /* are we waiting for cmd */ uint8_t waitflag; /* are we waiting for cmd */
uint8_t active; uint8_t active;
int ioctl_reset; /* IOCTL Requested Reset Flag */ int ioctl_reset; /* IOCTL Requested Reset Flag */
...@@ -1158,11 +1131,6 @@ typedef struct ips_ha { ...@@ -1158,11 +1131,6 @@ typedef struct ips_ha {
char *ioremap_ptr; /* ioremapped memory pointer */ char *ioremap_ptr; /* ioremapped memory pointer */
ips_hw_func_t func; /* hw function pointers */ ips_hw_func_t func; /* hw function pointers */
struct pci_dev *pcidev; /* PCI device handle */ struct pci_dev *pcidev; /* PCI device handle */
spinlock_t scb_lock;
spinlock_t copp_lock;
spinlock_t ips_lock;
struct semaphore ioctl_sem; /* Semaphore for new IOCTL's */
struct semaphore flash_ioctl_sem; /* Semaphore for Flashing */
char *flash_data; /* Save Area for flash data */ char *flash_data; /* Save Area for flash data */
u8 flash_order; /* Save Area for flash size order */ u8 flash_order; /* Save Area for flash size order */
u32 flash_datasize; /* Save Area for flash data size */ u32 flash_datasize; /* Save Area for flash data size */
...@@ -1195,7 +1163,6 @@ typedef struct ips_scb { ...@@ -1195,7 +1163,6 @@ typedef struct ips_scb {
Scsi_Cmnd *scsi_cmd; Scsi_Cmnd *scsi_cmd;
struct ips_scb *q_next; struct ips_scb *q_next;
ips_scb_callback callback; ips_scb_callback callback;
struct semaphore *sem;
uint32_t sg_busaddr; uint32_t sg_busaddr;
int sg_count; int sg_count;
} ips_scb_t; } ips_scb_t;
......
This diff is collapsed.
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
#include <linux/types.h> #include <linux/types.h>
static int wd7000_set_info (char *buffer, int length, struct Scsi_Host *host); static int wd7000_set_info(char *buffer, int length, struct Scsi_Host *host);
static int wd7000_proc_info (char *buffer, char **start, off_t offset, int length, int hostno, int inout); static int wd7000_proc_info(char *buffer, char **start, off_t offset, int length, int hostno, int inout);
static int wd7000_detect (Scsi_Host_Template *); static int wd7000_detect(Scsi_Host_Template *);
static int wd7000_command (Scsi_Cmnd *); static int wd7000_command(Scsi_Cmnd *);
static int wd7000_queuecommand (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); static int wd7000_queuecommand(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
static int wd7000_abort (Scsi_Cmnd *); static int wd7000_abort(Scsi_Cmnd *);
static int wd7000_bus_reset (Scsi_Cmnd *); static int wd7000_bus_reset(Scsi_Cmnd *);
static int wd7000_host_reset (Scsi_Cmnd *); static int wd7000_host_reset(Scsi_Cmnd *);
static int wd7000_device_reset (Scsi_Cmnd *); static int wd7000_device_reset(Scsi_Cmnd *);
static int wd7000_biosparam (Disk *, struct block_device *, int *); static int wd7000_biosparam(Disk *, struct block_device *, int *);
#ifndef NULL #ifndef NULL
#define NULL 0L #define NULL 0L
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#define PAL_wrperfmon 57 #define PAL_wrperfmon 57
#define PAL_rdusp 58 #define PAL_rdusp 58
#define PAL_whami 60 #define PAL_whami 60
#define PAL_rtsys 61 #define PAL_retsys 61
#define PAL_rti 63 #define PAL_rti 63
#endif /* __ALPHA_PAL_H */ #endif /* __ALPHA_PAL_H */
...@@ -331,19 +331,19 @@ ...@@ -331,19 +331,19 @@
#define __NR_removexattr 391 #define __NR_removexattr 391
#define __NR_lremovexattr 392 #define __NR_lremovexattr 392
#define __NR_fremovexattr 393 #define __NR_fremovexattr 393
#define __NR_futex 394 #define __NR_futex 394
#define __NR_sched_setaffinity 395 #define __NR_sched_setaffinity 395
#define __NR_sched_getaffinity 396 #define __NR_sched_getaffinity 396
#define __NR_tuxcall 397 #define __NR_tuxcall 397
#define __NR_io_setup 398 #define __NR_io_setup 398
#define __NR_io_destroy 399 #define __NR_io_destroy 399
#define __NR_io_getevents 400 #define __NR_io_getevents 400
#define __NR_io_submit 401 #define __NR_io_submit 401
#define __NR_io_cancel 402 #define __NR_io_cancel 402
#define __NR_alloc_hugepages 403 #define __NR_alloc_hugepages 403
#define __NR_free_hugepages 404 #define __NR_free_hugepages 404
#define __NR_exit_group 405 #define __NR_exit_group 405
#define NR_SYSCALLS 406
#if defined(__GNUC__) #if defined(__GNUC__)
...@@ -598,7 +598,7 @@ static inline pid_t waitpid(int pid, int * wait_stat, int flags) ...@@ -598,7 +598,7 @@ static inline pid_t waitpid(int pid, int * wait_stat, int flags)
return sys_wait4(pid, wait_stat, flags, NULL); return sys_wait4(pid, wait_stat, flags, NULL);
} }
#endif #endif /* __KERNEL_SYSCALLS__ */
/* /*
* "Conditional" syscalls * "Conditional" syscalls
......
...@@ -91,7 +91,7 @@ typedef struct siginfo { ...@@ -91,7 +91,7 @@ typedef struct siginfo {
#define __SI_FAULT (3 << 16) #define __SI_FAULT (3 << 16)
#define __SI_CHLD (4 << 16) #define __SI_CHLD (4 << 16)
#define __SI_RT (5 << 16) #define __SI_RT (5 << 16)
#define __SI_CODE(T,N) ((T) << 16 | ((N) & 0xffff)) #define __SI_CODE(T,N) ((T) | ((N) & 0xffff))
#else #else
#define __SI_KILL 0 #define __SI_KILL 0
#define __SI_TIMER 0 #define __SI_TIMER 0
......
...@@ -794,6 +794,7 @@ typedef struct ide_drive_s { ...@@ -794,6 +794,7 @@ typedef struct ide_drive_s {
int lun; /* logical unit */ int lun; /* logical unit */
int crc_count; /* crc counter to reduce drive speed */ int crc_count; /* crc counter to reduce drive speed */
struct list_head list; struct list_head list;
struct device gendev;
struct gendisk *disk; struct gendisk *disk;
} ide_drive_t; } ide_drive_t;
...@@ -1199,6 +1200,7 @@ typedef struct ide_driver_s { ...@@ -1199,6 +1200,7 @@ typedef struct ide_driver_s {
int (*attach)(ide_drive_t *); int (*attach)(ide_drive_t *);
void (*ata_prebuilder)(ide_drive_t *); void (*ata_prebuilder)(ide_drive_t *);
void (*atapi_prebuilder)(ide_drive_t *); void (*atapi_prebuilder)(ide_drive_t *);
struct device_driver gen_driver;
struct list_head drives; struct list_head drives;
struct list_head drivers; struct list_head drivers;
} ide_driver_t; } ide_driver_t;
......
...@@ -798,10 +798,18 @@ asmlinkage unsigned long sys_alarm(unsigned int seconds) ...@@ -798,10 +798,18 @@ asmlinkage unsigned long sys_alarm(unsigned int seconds)
* The Alpha uses getxpid, getxuid, and getxgid instead. Maybe this * The Alpha uses getxpid, getxuid, and getxgid instead. Maybe this
* should be moved into arch/i386 instead? * should be moved into arch/i386 instead?
*/ */
/**
* sys_getpid - return the thread group id of the current process
*
* Note, despite the name, this returns the tgid not the pid. The tgid and
* the pid are identical unless CLONE_THREAD was specified on clone() in
* which case the tgid is the same in all threads of the same group.
*
* This is SMP safe as current->tgid does not change.
*/
asmlinkage long sys_getpid(void) asmlinkage long sys_getpid(void)
{ {
/* This is SMP safe - current->pid doesn't change */
return current->tgid; return current->tgid;
} }
......
...@@ -24,8 +24,9 @@ void __br_write_lock (enum brlock_indices idx) ...@@ -24,8 +24,9 @@ void __br_write_lock (enum brlock_indices idx)
{ {
int i; int i;
preempt_disable();
for (i = 0; i < NR_CPUS; i++) for (i = 0; i < NR_CPUS; i++)
write_lock(&__brlock_array[i][idx]); _raw_write_lock(&__brlock_array[i][idx]);
} }
void __br_write_unlock (enum brlock_indices idx) void __br_write_unlock (enum brlock_indices idx)
...@@ -33,7 +34,8 @@ void __br_write_unlock (enum brlock_indices idx) ...@@ -33,7 +34,8 @@ void __br_write_unlock (enum brlock_indices idx)
int i; int i;
for (i = 0; i < NR_CPUS; i++) for (i = 0; i < NR_CPUS; i++)
write_unlock(&__brlock_array[i][idx]); _raw_write_unlock(&__brlock_array[i][idx]);
preempt_enable();
} }
#else /* ! __BRLOCK_USE_ATOMICS */ #else /* ! __BRLOCK_USE_ATOMICS */
...@@ -48,11 +50,12 @@ void __br_write_lock (enum brlock_indices idx) ...@@ -48,11 +50,12 @@ void __br_write_lock (enum brlock_indices idx)
{ {
int i; int i;
preempt_disable();
again: again:
spin_lock(&__br_write_locks[idx].lock); _raw_spin_lock(&__br_write_locks[idx].lock);
for (i = 0; i < NR_CPUS; i++) for (i = 0; i < NR_CPUS; i++)
if (__brlock_array[i][idx] != 0) { if (__brlock_array[i][idx] != 0) {
spin_unlock(&__br_write_locks[idx].lock); _raw_spin_unlock(&__br_write_locks[idx].lock);
barrier(); barrier();
cpu_relax(); cpu_relax();
goto again; goto again;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment