Commit 90ff4d27 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.21

parent 0983223c
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
----------------------- -----------------------
Maintained by Geert Uytterhoeven <geert@linux-m68k.org> Maintained by Geert Uytterhoeven <geert@linux-m68k.org>
Last revised: November 7, 1998 Last revised: October 7, 1999
0. Introduction 0. Introduction
...@@ -304,7 +304,20 @@ applications, please refer to the following documentation: ...@@ -304,7 +304,20 @@ applications, please refer to the following documentation:
o linux/include/video/ o linux/include/video/
8. Downloading
8. Mailing list
---------------
There's a _development_ mailing list at linux-fbdev@vuser.vu.union.edu,
controlled by majordomo. Send an email with `help' in the message body to
majordomo@vuser.vu.union.edu for subscription information.
The mailing list is archived at
http://www.mail-archive.com/linux-fbdev@vuser.vu.union.edu/
9. Downloading
-------------- --------------
All necessary files can be found at All necessary files can be found at
...@@ -313,8 +326,12 @@ All necessary files can be found at ...@@ -313,8 +326,12 @@ All necessary files can be found at
and on its mirrors. and on its mirrors.
The latest version of fbset can be found at
http://www.cs.kuleuven.ac.be/~geert/bin/
9. Credits 10. Credits
---------- ----------
This readme was written by Geert Uytterhoeven, partly based on the original This readme was written by Geert Uytterhoeven, partly based on the original
......
...@@ -8,9 +8,6 @@ ...@@ -8,9 +8,6 @@
# Copyright (C) 1994 by Linus Torvalds # Copyright (C) 1994 by Linus Torvalds
# #
AS86 =$(CROSS_COMPILE)as86 -0 -a
LD86 =$(CROSS_COMPILE)ld86 -0
BOOT_INCL = $(TOPDIR)/include/linux/config.h \ BOOT_INCL = $(TOPDIR)/include/linux/config.h \
$(TOPDIR)/include/linux/autoconf.h \ $(TOPDIR)/include/linux/autoconf.h \
$(TOPDIR)/include/asm/boot.h $(TOPDIR)/include/asm/boot.h
...@@ -45,40 +42,40 @@ install: $(CONFIGURE) $(BOOTIMAGE) ...@@ -45,40 +42,40 @@ install: $(CONFIGURE) $(BOOTIMAGE)
tools/build: tools/build.c tools/build: tools/build.c
$(HOSTCC) $(HOSTCFLAGS) -o $@ $< -I$(TOPDIR)/include $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -I$(TOPDIR)/include
setup: setup.o bootsect: bootsect.o
$(LD86) -s -o $@ $< $(LD) -Ttext 0x0 -s -oformat binary -o $@ $<
setup.o: setup.s bootsect.o: bootsect.s
$(AS86) -o $@ $< $(AS) -o $@ $<
setup.s: setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h bootsect.s: bootsect.S Makefile $(BOOT_INCL)
$(CPP) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ $(CPP) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@
bsetup: bsetup.o bbootsect: bbootsect.o bsetup
$(LD86) -s -o $@ $< $(LD) -Ttext 0x0 -s -oformat binary $< -R bsetup.o -o $@
bsetup.o: bsetup.s bbootsect.o: bbootsect.s
$(AS86) -o $@ $< $(AS) -o $@ $<
bsetup.s: setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h bbootsect.s: bootsect.S Makefile $(BOOT_INCL)
$(CPP) -D__BIG_KERNEL__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ $(CPP) -D__BIG_KERNEL__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@
bootsect: bootsect.o setup: setup.o
$(LD86) -s -o $@ $< $(LD) -Ttext 0x0 -s -oformat binary -e begtext -o $@ $<
bootsect.o: bootsect.s setup.o: setup.s
$(AS86) -o $@ $< $(AS) -o $@ $<
bootsect.s: bootsect.S Makefile $(BOOT_INCL) setup.s: setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h
$(CPP) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ $(CPP) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@
bbootsect: bbootsect.o bsetup: bsetup.o
$(LD86) -s -o $@ $< $(LD) -Ttext 0x0 -s -oformat binary -e begtext -o $@ $<
bbootsect.o: bbootsect.s bsetup.o: bsetup.s
$(AS86) -o $@ $< $(AS) -o $@ $<
bbootsect.s: bootsect.S Makefile $(BOOT_INCL) bsetup.s: setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h
$(CPP) -D__BIG_KERNEL__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ $(CPP) -D__BIG_KERNEL__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@
dep: dep:
......
This diff is collapsed.
...@@ -39,7 +39,7 @@ piggy.o: $(SYSTEM) ...@@ -39,7 +39,7 @@ piggy.o: $(SYSTEM)
$(OBJCOPY) $(SYSTEM) $$tmppiggy; \ $(OBJCOPY) $(SYSTEM) $$tmppiggy; \
gzip -f -9 < $$tmppiggy > $$tmppiggy.gz; \ gzip -f -9 < $$tmppiggy > $$tmppiggy.gz; \
echo "SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }}" > $$tmppiggy.lnk; \ echo "SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }}" > $$tmppiggy.lnk; \
$(LD) -m elf_i386 -r -o piggy.o -b binary $$tmppiggy.gz -b elf32-i386 -T $$tmppiggy.lnk; \ $(LD) -r -o piggy.o -b binary $$tmppiggy.gz -b elf32-i386 -T $$tmppiggy.lnk; \
rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk
clean: clean:
......
This diff is collapsed.
...@@ -58,27 +58,10 @@ void die(const char * str, ...) ...@@ -58,27 +58,10 @@ void die(const char * str, ...)
exit(1); exit(1);
} }
/* Reading of ld86 output (Minix format) */ void file_open(const char *name)
#define MINIX_HEADER_LEN 32
void minix_open(const char *name)
{ {
static byte hdr[] = { 0x01, 0x03, 0x10, 0x04, 0x20, 0x00, 0x00, 0x00 };
static u32 *lb = (u32 *) buf;
if ((fd = open(name, O_RDONLY, 0)) < 0) if ((fd = open(name, O_RDONLY, 0)) < 0)
die("Unable to open `%s': %m", name); die("Unable to open `%s': %m", name);
if (read(fd, buf, MINIX_HEADER_LEN) != MINIX_HEADER_LEN)
die("%s: Unable to read header", name);
if (memcmp(buf, hdr, sizeof(hdr)) || lb[5])
die("%s: Non-Minix header", name);
if (lb[3])
die("%s: Illegal data segment");
if (lb[4])
die("%s: Illegal bss segment");
if (lb[7])
die("%s: Illegal symbol table");
} }
void usage(void) void usage(void)
...@@ -125,7 +108,7 @@ int main(int argc, char ** argv) ...@@ -125,7 +108,7 @@ int main(int argc, char ** argv)
} }
fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root); fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root);
minix_open(argv[1]); /* Copy the boot sector */ file_open(argv[1]);
i = read(fd, buf, sizeof(buf)); i = read(fd, buf, sizeof(buf));
fprintf(stderr,"Boot sector %d bytes.\n",i); fprintf(stderr,"Boot sector %d bytes.\n",i);
if (i != 512) if (i != 512)
...@@ -138,7 +121,7 @@ int main(int argc, char ** argv) ...@@ -138,7 +121,7 @@ int main(int argc, char ** argv)
die("Write call failed"); die("Write call failed");
close (fd); close (fd);
minix_open(argv[2]); /* Copy the setup code */ file_open(argv[2]); /* Copy the setup code */
for (i=0 ; (c=read(fd, buf, sizeof(buf)))>0 ; i+=c ) for (i=0 ; (c=read(fd, buf, sizeof(buf)))>0 ; i+=c )
if (write(1, buf, c) != c) if (write(1, buf, c) != c)
die("Write call failed"); die("Write call failed");
...@@ -146,8 +129,8 @@ int main(int argc, char ** argv) ...@@ -146,8 +129,8 @@ int main(int argc, char ** argv)
die("read-error on `setup'"); die("read-error on `setup'");
close (fd); close (fd);
setup_sectors = (i + 511) / 512; /* Pad unused space with zeros */ setup_sectors = (i + 511) / 512; /* Pad unused space with zeros */
/* for compatibility with ancient versions of LILO */ /* for compatibility with ancient versions of LILO. */
if (setup_sectors < SETUP_SECTS) if (setup_sectors < SETUP_SECTS)
setup_sectors = SETUP_SECTS; setup_sectors = SETUP_SECTS;
fprintf(stderr, "Setup is %d bytes.\n", i); fprintf(stderr, "Setup is %d bytes.\n", i);
...@@ -161,8 +144,7 @@ int main(int argc, char ** argv) ...@@ -161,8 +144,7 @@ int main(int argc, char ** argv)
i += c; i += c;
} }
if ((fd = open(argv[3], O_RDONLY, 0)) < 0) /* Copy the image itself */ file_open(argv[3]);
die("Unable to open `%s': %m", argv[3]);
if (fstat (fd, &sb)) if (fstat (fd, &sb))
die("Unable to stat `%s': %m", argv[3]); die("Unable to stat `%s': %m", argv[3]);
sz = sb.st_size; sz = sb.st_size;
...@@ -187,7 +169,7 @@ int main(int argc, char ** argv) ...@@ -187,7 +169,7 @@ int main(int argc, char ** argv)
} }
close(fd); close(fd);
if (lseek(1, 497, SEEK_SET) != 497) /* Write sizes to the boot sector */ if (lseek(1, 497, SEEK_SET) != 497) /* Write sizes to the bootsector */
die("Output: seek failed"); die("Output: seek failed");
buf[0] = setup_sectors; buf[0] = setup_sectors;
if (write(1, buf, 1) != 1) if (write(1, buf, 1) != 1)
......
This diff is collapsed.
...@@ -242,6 +242,52 @@ CONFIG_DUMMY=m ...@@ -242,6 +242,52 @@ CONFIG_DUMMY=m
# Ethernet (10 or 100Mbit) # Ethernet (10 or 100Mbit)
# #
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_EISA=y
# CONFIG_PCNET32 is not set
# CONFIG_ACENIC is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
# CONFIG_DE4X5 is not set
# CONFIG_DEC_ELCP is not set
# CONFIG_DGRS is not set
CONFIG_EEXPRESS_PRO100=y
# CONFIG_NE2K_PCI is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
#
# Token Ring driver support
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# PCMCIA network devices
#
CONFIG_PCMCIA_PCNET=y
# CONFIG_PCMCIA_3C589 is not set
CONFIG_PCMCIA_RAYCS=y
CONFIG_PCMCIA_NETCARD=y
# #
# Amateur Radio support # Amateur Radio support
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include "pc_keyb.h" /* mouse enable command.. */ #include <linux/pc_keyb.h> /* mouse enable command.. */
/* /*
...@@ -134,7 +134,7 @@ static void qp_interrupt(int cpl, void *dev_id, struct pt_regs * regs) ...@@ -134,7 +134,7 @@ static void qp_interrupt(int cpl, void *dev_id, struct pt_regs * regs)
} }
queue->head = head; queue->head = head;
if (queue->fasync) if (queue->fasync)
kill_fasync(queue->fasync, SIGIO); kill_fasync(queue->fasync, SIGIO, POLL_IN);
wake_up_interruptible(&queue->proc_list); wake_up_interruptible(&queue->proc_list);
} }
......
...@@ -130,9 +130,9 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then ...@@ -130,9 +130,9 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
bool ' EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA bool ' EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA
if [ "$CONFIG_NET_EISA" = "y" ]; then if [ "$CONFIG_NET_EISA" = "y" ]; then
tristate ' AMD PCnet32 (VLB and PCI) support' CONFIG_PCNET32 tristate ' AMD PCnet32 (VLB and PCI) support' CONFIG_PCNET32
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then # if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
# tristate ' Adaptec Starfire support (EXPERIMENTAL)' CONFIG_ADAPTEC_STARFIRE # tristate ' Adaptec Starfire support (EXPERIMENTAL)' CONFIG_ADAPTEC_STARFIRE
fi # fi
tristate ' Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support' CONFIG_ACENIC tristate ' Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support' CONFIG_ACENIC
if [ "$CONFIG_ACENIC" != "n" ]; then if [ "$CONFIG_ACENIC" != "n" ]; then
bool ' Omit support for old Tigon I based AceNICs' CONFIG_ACENIC_OMIT_TIGON_I bool ' Omit support for old Tigon I based AceNICs' CONFIG_ACENIC_OMIT_TIGON_I
......
...@@ -166,16 +166,9 @@ int imm_detect(Scsi_Host_Template * host) ...@@ -166,16 +166,9 @@ int imm_detect(Scsi_Host_Template * host)
*/ */
imm_hosts[i].mode = IMM_NIBBLE; imm_hosts[i].mode = IMM_NIBBLE;
if (modes & PARPORT_MODE_PCPS2) if (modes & PARPORT_MODE_TRISTATE)
imm_hosts[i].mode = IMM_PS2; imm_hosts[i].mode = IMM_PS2;
if (modes & PARPORT_MODE_PCECPPS2) {
w_ecr(ppb, 0x20);
imm_hosts[i].mode = IMM_PS2;
}
if (modes & PARPORT_MODE_PCECPEPP)
w_ecr(ppb, 0x80);
/* Done configuration */ /* Done configuration */
imm_pb_release(i); imm_pb_release(i);
......
...@@ -459,6 +459,11 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -459,6 +459,11 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
for (i = 0; i < MAX_NR_CONSOLES; i++) for (i = 0; i < MAX_NR_CONSOLES; i++)
set_con2fb_map(i, con2fb.framebuffer); set_con2fb_map(i, con2fb.framebuffer);
return 0; return 0;
case FBIOBLANK:
if (info->blank == 0)
return -EINVAL;
(*info->blank)(arg, info);
return 0;
default: default:
return fb->fb_ioctl(inode, file, cmd, arg, PROC_CONSOLE(info), return fb->fb_ioctl(inode, file, cmd, arg, PROC_CONSOLE(info),
info); info);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/major.h> #include <linux/major.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/blk.h> #include <linux/blk.h>
#include <linux/ide.h> /* IDE xlate */
#include <asm/system.h> #include <asm/system.h>
......
...@@ -37,6 +37,31 @@ extern unsigned char pckbd_sysrq_xlate[128]; ...@@ -37,6 +37,31 @@ extern unsigned char pckbd_sysrq_xlate[128];
#define SYSRQ_KEY 0x54 #define SYSRQ_KEY 0x54
/* resource allocation */
#define kbd_request_region()
#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
"keyboard", NULL)
/* How to access the keyboard macros on this platform. */
#define kbd_read_input() inb(KBD_DATA_REG)
#define kbd_read_status() inb(KBD_STATUS_REG)
#define kbd_write_output(val) outb(val, KBD_DATA_REG)
#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
/* Some stoneage hardware needs delays after some operations. */
#define kbd_pause() do { } while(0)
/*
* Machine specific bits for the PS/2 driver
*/
#define AUX_IRQ 12
#define aux_request_irq(hand, dev_id) \
request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* __ASMalpha_KEYBOARD_H */ #endif /* __ASMalpha_KEYBOARD_H */
...@@ -487,6 +487,15 @@ extern inline long strlen_user(const char *str) ...@@ -487,6 +487,15 @@ extern inline long strlen_user(const char *str)
return access_ok(VERIFY_READ,str,0) ? __strlen_user(str) : 0; return access_ok(VERIFY_READ,str,0) ? __strlen_user(str) : 0;
} }
/* Returns: 0 if exception before NUL or reaching the supplied limit (N),
* a value greater than N if the limit would be exceeded, else strlen. */
extern long __strnlen_user(const char *, long);
extern inline long strnlen_user(const char *str, long n)
{
return access_ok(VERIFY_READ,str,0) ? __strnlen_user(str, n) : 0;
}
/* /*
* About the exception table: * About the exception table:
* *
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
/* #define FBIOSWITCH_MONIBIT 0x460E */ /* #define FBIOSWITCH_MONIBIT 0x460E */
#define FBIOGET_CON2FBMAP 0x460F #define FBIOGET_CON2FBMAP 0x460F
#define FBIOPUT_CON2FBMAP 0x4610 #define FBIOPUT_CON2FBMAP 0x4610
#define FBIOBLANK 0x4611 /* arg: 0 or vesa level + 1 */
#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
#define FB_TYPE_PLANES 1 /* Non interleaved planes */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */
......
...@@ -46,9 +46,6 @@ ...@@ -46,9 +46,6 @@
#ifndef OK_TO_RESET_CONTROLLER /* 1 needed for good error recovery */ #ifndef OK_TO_RESET_CONTROLLER /* 1 needed for good error recovery */
#define OK_TO_RESET_CONTROLLER 1 /* 0 for use with AH2372A/B interface */ #define OK_TO_RESET_CONTROLLER 1 /* 0 for use with AH2372A/B interface */
#endif #endif
#ifndef FAKE_FDISK_FOR_EZDRIVE /* 1 to help linux fdisk with EZDRIVE */
#define FAKE_FDISK_FOR_EZDRIVE 1 /* 0 to reduce kernel size */
#endif
#ifndef FANCY_STATUS_DUMPS /* 1 for human-readable drive errors */ #ifndef FANCY_STATUS_DUMPS /* 1 for human-readable drive errors */
#define FANCY_STATUS_DUMPS 1 /* 0 to reduce kernel size */ #define FANCY_STATUS_DUMPS 1 /* 0 to reduce kernel size */
#endif #endif
...@@ -262,9 +259,7 @@ typedef struct ide_drive_s { ...@@ -262,9 +259,7 @@ typedef struct ide_drive_s {
unsigned nice2 : 1; /* flag: give a share in our own bandwidth */ unsigned nice2 : 1; /* flag: give a share in our own bandwidth */
unsigned doorlocking : 1; /* flag: for removable only: door lock/unlock works */ unsigned doorlocking : 1; /* flag: for removable only: door lock/unlock works */
unsigned autotune : 2; /* 1=autotune, 2=noautotune, 0=default */ unsigned autotune : 2; /* 1=autotune, 2=noautotune, 0=default */
#if FAKE_FDISK_FOR_EZDRIVE unsigned remap_0_to_1 : 2; /* 0=remap if ezdrive, 1=remap, 2=noremap */
unsigned remap_0_to_1 : 1; /* flag: partitioned with ezdrive */
#endif /* FAKE_FDISK_FOR_EZDRIVE */
unsigned ata_flash : 1; /* 1=present, 0=default */ unsigned ata_flash : 1; /* 1=present, 0=default */
byte media; /* disk, cdrom, tape, floppy, ... */ byte media; /* disk, cdrom, tape, floppy, ... */
select_t select; /* basic drive/head select reg value */ select_t select; /* basic drive/head select reg value */
...@@ -282,8 +277,9 @@ typedef struct ide_drive_s { ...@@ -282,8 +277,9 @@ typedef struct ide_drive_s {
byte sect; /* "real" sectors per track */ byte sect; /* "real" sectors per track */
byte bios_head; /* BIOS/fdisk/LILO number of heads */ byte bios_head; /* BIOS/fdisk/LILO number of heads */
byte bios_sect; /* BIOS/fdisk/LILO sectors per track */ byte bios_sect; /* BIOS/fdisk/LILO sectors per track */
unsigned short bios_cyl; /* BIOS/fdisk/LILO number of cyls */ unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */
unsigned short cyl; /* "real" number of cyls */ unsigned int cyl; /* "real" number of cyls */
unsigned long capacity; /* total number of sectors */
unsigned int drive_data; /* for use by tuneproc/selectproc as needed */ unsigned int drive_data; /* for use by tuneproc/selectproc as needed */
void *hwif; /* actually (ide_hwif_t *) */ void *hwif; /* actually (ide_hwif_t *) */
wait_queue_head_t wqueue; /* used to wait for drive in open() */ wait_queue_head_t wqueue; /* used to wait for drive in open() */
...@@ -624,21 +620,19 @@ int ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeou ...@@ -624,21 +620,19 @@ int ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeou
/* /*
* This routine is called from the partition-table code in genhd.c * This routine is called from the partition-table code in genhd.c
* to "convert" a drive to a logical geometry with fewer than 1024 cyls. * to "convert" a drive to a logical geometry with fewer than 1024 cyls.
*
* The second parameter, "xparm", determines exactly how the translation
* will be handled:
* 0 = convert to CHS with fewer than 1024 cyls
* using the same method as Ontrack DiskManager.
* 1 = same as "0", plus offset everything by 63 sectors.
* -1 = similar to "0", plus redirect sector 0 to sector 1.
* >1 = convert to a CHS geometry with "xparm" heads.
*
* Returns 0 if the translation was not possible, if the device was not
* an IDE disk drive, or if a geometry was "forced" on the commandline.
* Returns 1 if the geometry translation was successful.
*/ */
int ide_xlate_1024 (kdev_t, int, int, const char *); int ide_xlate_1024 (kdev_t, int, int, const char *);
/*
* Convert kdev_t structure into ide_drive_t * one.
*/
ide_drive_t *get_info_ptr (kdev_t i_rdev);
/*
* Return the current idea about the total capacity of this drive.
*/
unsigned long current_capacity (ide_drive_t *drive);
/* /*
* Start a reset operation for an IDE interface. * Start a reset operation for an IDE interface.
* The caller should return immediately after invoking this. * The caller should return immediately after invoking this.
......
...@@ -823,8 +823,8 @@ extern inline int task_on_runqueue(struct task_struct *p) ...@@ -823,8 +823,8 @@ extern inline int task_on_runqueue(struct task_struct *p)
extern inline void unhash_process(struct task_struct *p) extern inline void unhash_process(struct task_struct *p)
{ {
if (task_on_runqueue(p)) BUG(); if (task_on_runqueue(p)) BUG();
nr_threads--;
write_lock_irq(&tasklist_lock); write_lock_irq(&tasklist_lock);
nr_threads--;
unhash_pid(p); unhash_pid(p);
REMOVE_LINKS(p); REMOVE_LINKS(p);
write_unlock_irq(&tasklist_lock); write_unlock_irq(&tasklist_lock);
......
...@@ -326,6 +326,7 @@ struct tty_struct { ...@@ -326,6 +326,7 @@ struct tty_struct {
#define TTY_HW_COOK_OUT 14 #define TTY_HW_COOK_OUT 14
#define TTY_HW_COOK_IN 15 #define TTY_HW_COOK_IN 15
#define TTY_PTY_LOCK 16 #define TTY_PTY_LOCK 16
#define TTY_NO_WRITE_SPLIT 17
#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
......
...@@ -592,6 +592,12 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs) ...@@ -592,6 +592,12 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
struct task_struct *p; struct task_struct *p;
DECLARE_MUTEX_LOCKED(sem); DECLARE_MUTEX_LOCKED(sem);
if (clone_flags & CLONE_PID) {
/* This is only allowed from the boot up thread */
if (current->pid)
return -EPERM;
}
current->vfork_sem = &sem; current->vfork_sem = &sem;
p = alloc_task_struct(); p = alloc_task_struct();
...@@ -610,8 +616,9 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs) ...@@ -610,8 +616,9 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
} }
/* /*
* Counter atomicity is protected by * Counter increases are protected by
* the kernel lock * the kernel lock so nr_threads can't
* increase under us (but it may decrease).
*/ */
if (nr_threads >= max_threads) if (nr_threads >= max_threads)
goto bad_fork_cleanup_count; goto bad_fork_cleanup_count;
...@@ -711,9 +718,9 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs) ...@@ -711,9 +718,9 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
write_lock_irq(&tasklist_lock); write_lock_irq(&tasklist_lock);
SET_LINKS(p); SET_LINKS(p);
hash_pid(p); hash_pid(p);
nr_threads++;
write_unlock_irq(&tasklist_lock); write_unlock_irq(&tasklist_lock);
nr_threads++;
wake_up_process(p); /* do this last */ wake_up_process(p); /* do this last */
++total_forks; ++total_forks;
...@@ -735,8 +742,6 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs) ...@@ -735,8 +742,6 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
__MOD_DEC_USE_COUNT(p->exec_domain->module); __MOD_DEC_USE_COUNT(p->exec_domain->module);
if (p->binfmt && p->binfmt->module) if (p->binfmt && p->binfmt->module)
__MOD_DEC_USE_COUNT(p->binfmt->module); __MOD_DEC_USE_COUNT(p->binfmt->module);
nr_threads--;
bad_fork_cleanup_count: bad_fork_cleanup_count:
if (p->user) if (p->user)
free_uid(p); free_uid(p);
......
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