S: D-71679 Asperg
S: Germany
+N: Jan Hubicka
+E: hubicka@freesoft.cz
+E: hubicka@suse.cz
+W: http://www.paru.cas.cz/~hubicka/
+D: Random kernel tweaks and fixes.
+S: Dukelskych bojovniku 1944
+S: Tabor 390 03
+S: Czech Republic
+
N: Gareth Hughes
E: gareth@valinux.com
E: gareth@precisioninsight.com
N: Steven Whitehouse
E: SteveW@ACM.org
-W: http://www-sigproc.eng.cam.ac.uk/~sjw44/
+W: http://www.chygwyn.com/~steve
D: Linux DECnet project: http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html
D: Minor debugging of other networking protocols.
D: Misc bug fixes and filesystem development
SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
- "586" for generic Pentium CPUs, possibly lacking the TSC
(time stamp counter) register.
- - "Pentium" for the Intel Pentium/Pentium MMX.
+ - "Pentium-Classic" for the Intel Pentium/Pentium MMX.
- "Pentium-Pro" for the Intel Pentium Pro/Celeron/Pentium II.
- "Pentium-III" for the Intel Pentium III.
- "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
- "Crusoe" for the Transmeta Crusoe series.
- "Winchip-C6" for original IDT Winchip.
- "Winchip-2" for IDT Winchip 2.
- - "Winchip-2A/3" for IDT Winchips with 3dNow! capabilities.
+ - "Winchip-2A" for IDT Winchips with 3dNow! capabilities.
If you don't know what to do, choose "386".
Work sponsored by SGI
- Updated README from master HTML file
+===============================================================================
+Changes for patch v175
+
+Work sponsored by SGI
+
+- DocBook update for fs/devfs/base.c
+ Thanks to Tim Waugh <twaugh@redhat.com>
+
+- Removed stale fs/tunnel.c (was never used or completed)
+===============================================================================
+Changes for patch v176
+
+Work sponsored by SGI
+
+- Updated ToDo list
+
+- Removed sample modules.conf: now distributed with devfsd
+
+- Updated README from master HTML file
+
+- Ported to kernel 2.4.0-test3-pre4 (which had devfs-patch-v174)
Linux Devfs (Device File System) FAQ
Richard Gooch
-25-JUN-2000
+3-JUL-2000
-----------------------------------------------------------------------------
automatically, so you don't have to worry about this.
Module autoloading
-Another thing to note is that if you want to support module
-autoloading then you need to edit your /etc/modules.conf so
-that things work properly. You should include the sample
-modules.conf file in the
-Documentation/filesystems/devfs directory into your
-/etc/modules.conf to ensure correct operation.
-
-You will also need to configure devfsd to enable module
+You will need to configure devfsd to enable module
autoloading. The following lines should be placed in your
-/etc/devfsd.conf:
+/etc/devfsd.conf file:
LOOKUP .* MODLOAD
+As of devfsd-v1.3.10, a generic /etc/modules.devfs
+configuration file is installed, which is used by the MODLOAD
+action. This should be sufficient for most configurations. If you
+require further configuration, edit your /etc/modules.conf
+file.
+
Mounting root off a devfs device
If you wish to mount root off a devfs device when you pass the
"devfs=only" boot option, then you need to pass in the "root="
Surprised? Yep, so was I. It turns out if you have (as most people
do):
-root =
+root = <device>
then LILO will determine the device number of and will write
Douglas Gilbert has written yet another useful document at
-http://www.torque.net/scsi/linux_scsi_24 which
+http://www.torque.net/scsi/linux_scsi_24/ which
discusses the Linux SCSI subsystem in 2.4.
+Johannes Erdfelt has started a discussion paper on Linux and
+hot-swap devices, describing what the requirements are for a scalable
+solution and how and why he's used devfs+devfsd. Note that this is an
+early draft only, available in plain text form at:
+
+http://johannes.erdfelt.com/hotswap.txt.
+Johannes has promised a HTML version will follow.
+
+
Richard Gooch <rgooch@atnf.csiro.au>
- 18-FEB-2000
+ 3-JUL-2000
This is a list of things to be done for better devfs support in the
Linux kernel. If you'd like to contribute to the devfs, please have a
- Atari floppy driver (drivers/block/ataflop.c)
-- Network block device (drivers/block/nbd.c)
-
- SWIM3 (Super Woz Integrated Machine 3) floppy driver (drivers/block/swim3.c)
- Amiga ZorroII ramdisc driver (drivers/block/z2ram.c)
+++ /dev/null
-# Sample entries for /etc/modules.conf for devfs
-
-###############################################################################
-# Configuration section: change to suit your hardware
-#
-alias /dev/sound sb
-alias /dev/v4l bttv
-alias gen-watchdog pcwd
-alias gen-md raid0
-alias /dev/joysticks joystick
-probeall scsi-hosts sym53c8xx
-
-###############################################################################
-# Generic section: do not change
-#
-# All HDDs
-probeall /dev/discs scsi-hosts sd_mod ide-probe-mod ide-disk DAC960
-
-# All CD-ROMs
-probeall /dev/cdroms scsi-hosts sr_mod ide-probe-mod ide-cd
-
-# All tapes
-probeall /dev/tapes scsi-hosts st ide-probe-mod ide-tape
-
-# All SCSI devices
-probeall /dev/scsi scsi-hosts sd_mod sr_mod st sg
-
-# All IDE devices
-probeall /dev/ide ide-probe-mod ide-disk ide-cd ide-tape ide-floppy
-
-# SCSI HDDs
-probeall /dev/sd scsi-hosts sd_mod
-alias /dev/sd* /dev/sd
-
-# SCSI CD-ROMs
-probeall /dev/sr scsi-hosts sr_mod
-alias /dev/sr* /dev/sr
-
-# SCSI tapes
-probeall /dev/st scsi-hosts st
-alias /dev/st* /dev/st
-alias /dev/nst* /dev/st
-
-# SCSI generic
-probeall /dev/sg scsi-hosts sg
-alias /dev/sg* /dev/sg
-
-# Floppies
-alias /dev/floppy floppy
-alias /dev/fd* floppy
-
-# RAMDISCs
-alias /dev/rd rd
-alias /dev/ram* rd
-
-# Loop devices
-alias /dev/loop* loop
-
-# Meta devices
-alias /dev/md* gen-md
-
-# Parallel port printers
-alias /dev/printers lp
-alias /dev/lp* lp
-
-# Soundcard
-alias /dev/audio /dev/sound
-alias /dev/mixer /dev/sound
-alias /dev/dsp /dev/sound
-alias /dev/dspW /dev/sound
-alias /dev/midi /dev/sound
-
-# Joysticks
-alias /dev/js* /dev/joysticks
-
-# Serial ports
-alias /dev/tts serial
-alias /dev/ttyS* /dev/tts
-alias /dev/cua* /dev/tts
-
-# Miscellaneous devices
-alias /dev/watchdog gen-watchdog # alias for gen-watchdog needed!
-alias /dev/atibm atixlmouse
-alias /dev/inportbm msbusmouse
-alias /dev/logibm busmouse
-
-# PPP devices
-alias /dev/ppp* ppp_generic
-
-# Video capture devices
-alias /dev/video* /dev/v4l
-alias /dev/vbi* /dev/v4l
o Project Home Pages
http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html - Kernel info
- http://linux.dreamtime.org/decnet/ - Userland tools
+ http://linux-decnet.sourceforge.net/ - Userland tools
o FTP sites
ftp://ftp.sucs.swan.ac.uk/pub/Linux/DECnet/
- Mirror of Alexey Kuznetsov's iproute2 package and
other utilities
- ftp://ftp.dreamtime.org/pub/linux/decnet/
+ ftp://linux-decnet.sourceforge.net/pub/linux-decnet/
- Patrick Caulfield's archive of userland tools and
Eduardo Serrat's kernel patches
- Can you use tcpdump to get a trace ? (N.B. Most (all?) versions of
tcpdump don't understand how to dump DECnet properly, so including
the hex listing of the packet contents is _essential_, usually the -x flag.
- You may also need to increase the length grabbed with the -s flag)
+ You may also need to increase the length grabbed with the -s flag. The
+ -e flag also provides very useful information (ethernet MAC addresses))
7) Mailing list
If you are keen to get involved in development, or want to ask questions
about configuration, or even just report bugs, then there is a mailing
-list that you can join: send mail to majordomo@dreamtime.org with
+list that you can join, details are at:
-subscribe linux-decnet
-
-as the body of the message.
+http://sourceforge.net/mail/?group_id=4993
8) Legal Info
P: Steven Whitehouse
M: SteveW@ACM.org
W: http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html
-L: linux-decnet@dreamtime.org
+L: linux-decnet-user@lists.sourceforge.net
S: Maintained
DEVICE NUMBER REGISTRY
FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net
HOSTCC = gcc
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -Werror
CROSS_COMPILE =
DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda_drivers.a
DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.a
+DRIVERS-$(CONFIG_ACPI_INTERPRETER) += drivers/acpi/acpi.o
DRIVERS += $(DRIVERS-y)
dep-files: scripts/mkdep archdep include/linux/version.h
scripts/mkdep init/*.c > .depend
- scripts/mkdep `find $(FINDHPATH) -name SCCS -prune -or -follow -name \*.h ! -name modversions.h -print` > .hdepend
+ scripts/mkdep `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
ifdef CONFIG_MODVERSIONS
"386 CONFIG_M386 \
486 CONFIG_M486 \
586/K5/5x86/6x86/6x86MX CONFIG_M586 \
- Pentium/Pentium-MMX CONFIG_M586TSC \
+ Pentium-Classic/Pentium-MMX CONFIG_M586TSC \
Pentium-Pro/Celeron/Pentium-II CONFIG_M686 \
Pentium-III CONFIG_M686FXSR \
K6/K6-II/K6-III CONFIG_MK6 \
Crusoe CONFIG_MCRUSOE \
Winchip-C6 CONFIG_MWINCHIPC6 \
Winchip-2 CONFIG_MWINCHIP2 \
- Winchip-2A/3 CONFIG_MWINCHIP3D" Pentium-Pro
+ Winchip-2A/Winchip-3 CONFIG_MWINCHIP3D" Pentium-Pro
#
# Define implied options from the CPU selection here
#
define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
define_bool CONFIG_X86_FXSR y
define_bool CONFIG_X86_XMM y
-else
- define_bool CONFIG_X86_FXSR n
fi
if [ "$CONFIG_MK6" = "y" ]; then
define_int CONFIG_X86_L1_CACHE_BYTES 32
bool 'Power Management support' CONFIG_PM
-bool ' ACPI support' CONFIG_ACPI $CONFIG_PM
+dep_bool ' ACPI support' CONFIG_ACPI $CONFIG_PM
if [ "$CONFIG_ACPI" != "n" ]; then
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool ' ACPI interpreter (EXPERIMENTAL)' CONFIG_ACPI_INTERPRETER
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_PGE=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
-# CONFIG_X86_FXSR is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
*
* http://developer.intel.com/design/pentiumii/manuals/243192.htm
*
+ * For more information, go to http://www.urbanmyth.org/microcode
+ *
* 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 the Free Software Foundation; either version
}
wrmsr(0x79, (unsigned int)(m->bits), 0);
- __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx", "cc");
+ __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
rdmsr(0x8B, val[0], val[1]);
req->err = 0;
x86_cap_flags[10] = "sep";
if (c->x86 < 6)
x86_cap_flags[16] = "fcmov";
- x86_cap_flags[16] = "pat";
+ else
+ x86_cap_flags[16] = "pat";
x86_cap_flags[22] = "mmxext";
x86_cap_flags[24] = "fxsr";
x86_cap_flags[30] = "3dnowext";
/* FALLTHRU */
default:
- lock_kernel();
sigaddset(¤t->signal, signr);
recalc_sigpending(current);
current->flags |= PF_SIGNALED;
#include <linux/ptrace.h>
#include <linux/timer.h>
#include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
console_loglevel = 15;
}
-#define DO_ERROR(trapnr, signr, str, name, tsk) \
-asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
-{ \
- tsk->thread.error_code = error_code; \
- tsk->thread.trap_no = trapnr; \
- die_if_no_fixup(str,regs,error_code); \
- force_sig(signr, tsk); \
-}
-
-#define DO_ERROR_INFO(trapnr, signr, str, name, tsk, sicode, siaddr) \
-asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
-{ \
- siginfo_t info; \
- tsk->thread.error_code = error_code; \
- tsk->thread.trap_no = trapnr; \
- die_if_no_fixup(str,regs,error_code); \
- info.si_signo = signr; \
- info.si_errno = 0; \
- info.si_code = sicode; \
- info.si_addr = (void *)siaddr; \
- force_sig_info(signr, &info, tsk); \
-}
-
-#define DO_VM86_ERROR(trapnr, signr, str, name, tsk) \
-asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
-{ \
- lock_kernel(); \
- if (regs->eflags & VM_MASK) { \
- if (!handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, trapnr)) \
- goto out; \
- /* else fall through */ \
- } \
- tsk->thread.error_code = error_code; \
- tsk->thread.trap_no = trapnr; \
- force_sig(signr, tsk); \
- die_if_kernel(str,regs,error_code); \
-out: \
- unlock_kernel(); \
-}
-
-#define DO_VM86_ERROR_INFO(trapnr, signr, str, name, tsk, sicode, siaddr) \
-asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
-{ \
- siginfo_t info; \
- lock_kernel(); \
- if (regs->eflags & VM_MASK) { \
- if (!handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, trapnr)) \
- goto out; \
- /* else fall through */ \
- } \
- tsk->thread.error_code = error_code; \
- tsk->thread.trap_no = trapnr; \
- info.si_signo = signr; \
- info.si_errno = 0; \
- info.si_code = sicode; \
- info.si_addr = (void *)siaddr; \
- force_sig_info(signr, &info, tsk); \
- die_if_kernel(str,regs,error_code); \
-out: \
- unlock_kernel(); \
-}
-
asmlinkage void divide_error(void);
asmlinkage void debug(void);
asmlinkage void nmi(void);
die(str, regs, err);
}
-static void die_if_no_fixup(const char * str, struct pt_regs * regs, long err)
-{
- if (!(regs->eflags & VM_MASK) && !(3 & regs->xcs))
- {
- unsigned long fixup;
- fixup = search_exception_table(regs->eip);
- if (fixup) {
- regs->eip = fixup;
- return;
- }
- die(str, regs, err);
- }
-}
-
static inline unsigned long get_cr2(void)
{
unsigned long address;
return address;
}
-DO_VM86_ERROR_INFO( 0, SIGFPE, "divide error", divide_error, current, FPE_INTDIV, regs->eip)
-DO_VM86_ERROR( 3, SIGTRAP, "int3", int3, current)
-DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow, current)
-DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds, current)
-DO_ERROR_INFO( 6, SIGILL, "invalid operand", invalid_op, current, ILL_ILLOPN, regs->eip)
-DO_VM86_ERROR( 7, SIGSEGV, "device not available", device_not_available, current)
-DO_ERROR( 8, SIGSEGV, "double fault", double_fault, current)
-DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun, current)
-DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS, current)
-DO_ERROR(11, SIGBUS, "segment not present", segment_not_present, current)
-DO_ERROR(12, SIGBUS, "stack segment", stack_segment, current)
-DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, current, BUS_ADRALN, get_cr2())
-DO_ERROR(18, SIGSEGV, "reserved", reserved, current)
+static void inline do_trap(int trapnr, int signr, char *str, int vm86,
+ struct pt_regs * regs, long error_code, siginfo_t *info)
+{
+ if (vm86 && regs->eflags & VM_MASK)
+ goto vm86_trap;
+ if (!(regs->xcs & 3))
+ goto kernel_trap;
+
+ trap_signal: {
+ struct task_struct *tsk = current;
+ tsk->thread.error_code = error_code;
+ tsk->thread.trap_no = trapnr;
+ if (info)
+ force_sig_info(signr, info, tsk);
+ else
+ force_sig(signr, tsk);
+ return;
+ }
+
+ kernel_trap: {
+ unsigned long fixup = search_exception_table(regs->eip);
+ if (fixup)
+ regs->eip = fixup;
+ else
+ die(str, regs, error_code);
+ return;
+ }
+
+ vm86_trap: {
+ int ret = handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, trapnr);
+ if (ret) goto trap_signal;
+ return;
+ }
+}
+
+#define DO_ERROR(trapnr, signr, str, name) \
+asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
+{ \
+ do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \
+}
+
+#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \
+asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
+{ \
+ siginfo_t info; \
+ info.si_signo = signr; \
+ info.si_errno = 0; \
+ info.si_code = sicode; \
+ info.si_addr = (void *)siaddr; \
+ do_trap(trapnr, signr, str, 0, regs, error_code, &info); \
+}
+
+#define DO_VM86_ERROR(trapnr, signr, str, name) \
+asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
+{ \
+ do_trap(trapnr, signr, str, 1, regs, error_code, NULL); \
+}
+
+#define DO_VM86_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \
+asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
+{ \
+ siginfo_t info; \
+ info.si_signo = signr; \
+ info.si_errno = 0; \
+ info.si_code = sicode; \
+ info.si_addr = (void *)siaddr; \
+ do_trap(trapnr, signr, str, 1, regs, error_code, &info); \
+}
+
+DO_VM86_ERROR_INFO( 0, SIGFPE, "divide error", divide_error, FPE_INTDIV, regs->eip)
+DO_VM86_ERROR( 3, SIGTRAP, "int3", int3)
+DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow)
+DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds)
+DO_ERROR_INFO( 6, SIGILL, "invalid operand", invalid_op, ILL_ILLOPN, regs->eip)
+DO_VM86_ERROR( 7, SIGSEGV, "device not available", device_not_available)
+DO_ERROR( 8, SIGSEGV, "double fault", double_fault)
+DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun)
+DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
+DO_ERROR(11, SIGBUS, "segment not present", segment_not_present)
+DO_ERROR(12, SIGBUS, "stack segment", stack_segment)
+DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, get_cr2())
+DO_ERROR(18, SIGSEGV, "reserved", reserved)
asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
{
return;
gp_in_vm86:
- lock_kernel();
handle_vm86_fault((struct kernel_vm86_regs *) regs, error_code);
- unlock_kernel();
return;
gp_in_kernel:
return;
debug_vm86:
- lock_kernel();
handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, 1);
- unlock_kernel();
return;
clear_dr7:
asmlinkage void math_emulate(long arg)
{
- lock_kernel();
printk("math-emulation not enabled and no coprocessor found.\n");
printk("killing %s.\n",current->comm);
force_sig(SIGFPE,current);
schedule();
- unlock_kernel();
}
#endif /* CONFIG_MATH_EMULATION */
struct pt_regs *ret;
unsigned long tmp;
- lock_kernel();
if (!current->thread.vm86_info) {
printk("no vm86_info: BAD\n");
do_exit(SIGSEGV);
tss->esp0 = current->thread.esp0 = current->thread.saved_esp0;
current->thread.saved_esp0 = 0;
ret = KVM86->regs32;
- unlock_kernel();
return ret;
}
struct task_struct *tsk;
int tmp, ret = -EPERM;
- lock_kernel();
tsk = current;
if (tsk->thread.saved_esp0)
goto out;
do_sys_vm86(&info, tsk);
ret = 0; /* we never return here */
out:
- unlock_kernel();
return ret;
}
struct task_struct *tsk;
int tmp, ret;
- lock_kernel();
tsk = current;
switch (subfunction) {
case VM86_REQUEST_IRQ:
do_sys_vm86(&info, tsk);
ret = 0; /* we never return here */
out:
- unlock_kernel();
return ret;
}
tsk->thread.screen_bitmap = info->screen_bitmap;
if (info->flags & VM86_SCREEN_BITMAP)
mark_screen_rdonly(tsk);
- unlock_kernel();
__asm__ __volatile__(
"xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t"
"movl %0,%%esp\n\t"
regs32 = save_v86_state(regs16);
regs32->eax = retval;
- unlock_kernel();
__asm__ __volatile__("movl %0,%%esp\n\t"
"jmp ret_from_sys_call"
: : "r" (regs32), "b" (current));
return_to_32bit(regs, VM86_INTx + (i << 8));
}
-/* This must be called with the kernel lock held. */
int handle_vm86_trap(struct kernel_vm86_regs * regs, long error_code, int trapno)
{
if (VMPI.is_vm86pus) {
return 0;
}
-/* This must be called with the kernel lock held. */
void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code)
{
unsigned char *csp, *ssp;
int irq_bit;
unsigned long flags;
- lock_kernel();
save_flags(flags);
cli();
irq_bit = 1 << intno;
/* else user will poll for IRQs */
out:
restore_flags(flags);
- unlock_kernel();
}
static inline void free_vm86_irq(int irqnumber)
-# $Id: config.in,v 1.94 2000/06/04 22:23:10 anton Exp $
+# $Id: config.in,v 1.98 2000/07/06 01:41:29 davem Exp $
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/config-language.txt.
#
CONFIG_FONT_SUN8x16=y
# CONFIG_FBCON_FONTS is not set
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
#
# Misc Linux/SPARC drivers
#
CONFIG_MD_LINEAR=m
CONFIG_MD_STRIPED=m
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_NBD=m
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=m
CONFIG_EFS_FS=m
+# CONFIG_JFFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_RAMFS is not set
CONFIG_ISO9660_FS=m
# CONFIG_ROOT_NFS is not set
CONFIG_NFSD=m
# CONFIG_NFSD_V3 is not set
-# CONFIG_NFSD_TCP is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_SMB_FS=m
-# $Id: Makefile,v 1.55 2000/05/23 23:09:08 davem Exp $
+# $Id: Makefile,v 1.56 2000/07/06 01:41:29 davem Exp $
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
@echo 'struct task_struct _task;' >> check_asm.c
@echo 'struct mm_struct _mm;' >> check_asm.c
@echo 'struct thread_struct _thread;' >> check_asm.c
+ @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
@echo 'int main(void) {' >> check_asm.c
$(SH) ./check_asm.sh task tmp.i check_asm.c
$(SH) ./check_asm.sh mm tmp.i check_asm.c
@echo 'struct task_struct _task;' >> check_asm.c
@echo 'struct mm_struct _mm;' >> check_asm.c
@echo 'struct thread_struct _thread;' >> check_asm.c
+ @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
@echo 'int main(void) {' >> check_asm.c
$(SH) ./check_asm.sh task tmp.i check_asm.c
$(SH) ./check_asm.sh mm tmp.i check_asm.c
-/* $Id: irq.c,v 1.103 2000/05/09 17:40:13 davem Exp $
+/* $Id: irq.c,v 1.104 2000/06/30 10:18:38 davem Exp $
* arch/sparc/kernel/irq.c: Interrupt request handling routines. On the
* Sparc the IRQ's are basically 'cast in stone'
* and you are supposed to probe the prom's device
}
#ifndef CONFIG_SMP
-unsigned int local_bh_count;
-unsigned int local_irq_count;
+unsigned int __local_bh_count;
+unsigned int __local_irq_count;
#else
/* SMP interrupt locking on Sparc. */
-unsigned int local_bh_count[NR_CPUS];
-unsigned int local_irq_count[NR_CPUS];
+unsigned int __local_bh_count[NR_CPUS];
+unsigned int __local_irq_count[NR_CPUS];
/* Who has global_irq_lock. */
unsigned char global_irq_holder = NO_PROC_ID;
printk("irq: %d [ ", atomic_read(&global_irq_count));
for (i = 0; i < NR_CPUS; i++) {
- printk("%d ", local_irq_count[i]);
+ printk("%d ", __local_irq_count[i]);
}
printk("]\n");
printk("bh: %d [ ", (spin_is_locked(&global_bh_lock) ? 1 : 0));
for (i = 0; i < NR_CPUS; i++) {
- printk("%d ", local_bh_count[cpu]);
+ printk("%d ", __local_bh_count[cpu]);
}
printk("]\n");
* already executing in one..
*/
if (!atomic_read(&global_irq_count)) {
- if (local_bh_count[cpu] || !spin_is_locked(&global_bh_lock))
+ if (__local_bh_count[cpu] || !spin_is_locked(&global_bh_lock))
break;
}
continue;
if (spin_is_locked (&global_irq_lock))
continue;
- if (!local_bh_count[cpu] && spin_is_locked(&global_bh_lock))
+ if (!__local_bh_count[cpu] && spin_is_locked(&global_bh_lock))
continue;
if (spin_trylock(&global_irq_lock))
break;
if ((flags & PSR_PIL) != PSR_PIL) {
int cpu = smp_processor_id();
__cli();
- if (!local_irq_count[cpu])
+ if (!__local_irq_count[cpu])
get_irqlock(cpu);
}
}
{
int cpu = smp_processor_id();
- if (!local_irq_count[cpu])
+ if (!__local_irq_count[cpu])
release_irqlock(cpu);
__sti();
}
retval = 2 + local_enabled;
/* check for global flags if we're not in an interrupt */
- if (!local_irq_count[smp_processor_id()]) {
+ if (!__local_irq_count[smp_processor_id()]) {
if (local_enabled)
retval = 1;
if (global_irq_holder == (unsigned char) smp_processor_id())
-/* $Id: sparc_ksyms.c,v 1.97 2000/05/09 17:40:13 davem Exp $
+/* $Id: sparc_ksyms.c,v 1.99 2000/06/30 10:18:38 davem Exp $
* arch/sparc/kernel/ksyms.c: Sparc specific ksyms support.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
#include <asm/sbus.h>
#include <asm/dma.h>
#endif
+#ifdef CONFIG_PCI
+#include <asm/pci.h>
+#endif
#include <asm/a.out.h>
#include <asm/io-unit.h>
EXPORT_SYMBOL(global_irq_count);
EXPORT_SYMBOL(synchronize_irq);
#endif
-EXPORT_SYMBOL(local_irq_count);
-EXPORT_SYMBOL(local_bh_count);
+EXPORT_SYMBOL(__local_irq_count);
+EXPORT_SYMBOL(__local_bh_count);
EXPORT_SYMBOL(udelay);
EXPORT_SYMBOL(mstk48t02_regs);
EXPORT_SYMBOL(sbus_ioremap);
#endif
#if CONFIG_PCI
-/* We do not have modular drivers for PCI devices yet. */
+/* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
+EXPORT_SYMBOL(ioremap);
+EXPORT_SYMBOL(iounmap);
+
+EXPORT_SYMBOL(insl);
+EXPORT_SYMBOL(outsl);
+EXPORT_SYMBOL(pci_alloc_consistent);
+EXPORT_SYMBOL(pci_free_consistent);
+EXPORT_SYMBOL(pci_map_single);
+EXPORT_SYMBOL(pci_unmap_single);
+EXPORT_SYMBOL(pci_dma_sync_single);
#endif
/* Solaris/SunOS binary compatibility */
/* sparc library symbols */
EXPORT_SYMBOL(bcopy);
EXPORT_SYMBOL_NOVERS(memscan);
-EXPORT_SYMBOL(strlen);
+EXPORT_SYMBOL_NOVERS(strlen);
EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strcpy);
EXPORT_SYMBOL(strncpy);
-/* $Id: sys_sparc.c,v 1.64 2000/06/26 23:20:24 davem Exp $
+/* $Id: sys_sparc.c,v 1.65 2000/07/06 01:41:29 davem Exp $
* linux/arch/sparc/kernel/sys_sparc.c
*
* This file contains various random system calls that
-/* $Id: sys_sunos.c,v 1.126 2000/06/26 23:20:24 davem Exp $
+/* $Id: sys_sunos.c,v 1.128 2000/07/06 01:41:29 davem Exp $
* sys_sunos.c: SunOS specific syscall compatibility support.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
if (!file)
goto out;
+ inode = file->f_dentry->d_inode;
+
socket = &inode->u.socket_i;
local.sin_family = AF_INET;
local.sin_addr.s_addr = INADDR_ANY;
-/* $Id: srmmu.c,v 1.214 2000/06/22 01:28:44 anton Exp $
+/* $Id: srmmu.c,v 1.215 2000/06/30 13:25:28 anton Exp $
* srmmu.c: SRMMU specific routines for memory management.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
void *srmmu_nocache_pool;
void *srmmu_nocache_bitmap;
int srmmu_nocache_low;
-unsigned long srmmu_nocache_used;
+int srmmu_nocache_used;
spinlock_t srmmu_nocache_spinlock;
/* This makes sense. Honest it does - Anton */
return sprintf(buf,
"MMU type\t: %s\n"
"contexts\t: %d\n"
- "nocache total\t: %lu\n"
- "nocache used\t: %lu\n"
+ "nocache total\t: %ld\n"
+ "nocache used\t: %d\n"
, srmmu_name,
num_contexts,
SRMMU_NOCACHE_SIZE,
-/* $Id: sun4c.c,v 1.194 2000/06/05 06:08:45 anton Exp $
+/* $Id: sun4c.c,v 1.195 2000/06/30 13:25:28 anton Exp $
* sun4c.c: Doing in software what should be done in hardware.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
do {
if (pgd_quicklist)
sun4c_free_pgd_slow(sun4c_get_pgd_fast()), freed++;
+ /* Only two level page tables at the moment, sun4 3 level mmu is not supported - Anton */
+#if 0
if (pmd_quicklist)
sun4c_free_pmd_slow(sun4c_get_pmd_fast()), freed++;
+#endif
if (pte_quicklist)
sun4c_free_pte_slow(sun4c_get_pte_fast()), freed++;
} while (pgtable_cache_size > low);
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_sfnames 0 : { *(.debug_sfnames) }
.line 0 : { *(.line) }
- /DISCARD/ : { *(.text.exit) *(.data.exit) }
+ /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) }
}
-# $Id: config.in,v 1.115 2000/06/20 04:36:22 ecd Exp $
+# $Id: config.in,v 1.116 2000/07/06 01:41:29 davem Exp $
# For a description of the syntax of this configuration file,
# see the Configure script.
#
# CONFIG_SPARCAUDIO_DBRI is not set
# CONFIG_SPARCAUDIO_DUMMY is not set
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
#
# Block devices
#
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=m
CONFIG_EFS_FS=m
+# CONFIG_JFFS_FS is not set
CONFIG_CRAMFS=m
CONFIG_RAMFS=m
CONFIG_ISO9660_FS=m
-# $Id: Makefile,v 1.55 2000/05/27 00:49:35 davem Exp $
+# $Id: Makefile,v 1.56 2000/07/06 01:41:29 davem Exp $
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
@echo 'struct task_struct _task;' >> check_asm.c
@echo 'struct mm_struct _mm;' >> check_asm.c
@echo 'struct thread_struct _thread;' >> check_asm.c
+ @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
@echo 'int main(void) {' >> check_asm.c
$(SH) ./check_asm.sh task tmp.i check_asm.c
$(SH) ./check_asm.sh mm tmp.i check_asm.c
@echo 'struct task_struct _task;' >> check_asm.c
@echo 'struct mm_struct _mm;' >> check_asm.c
@echo 'struct thread_struct _thread;' >> check_asm.c
+ @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
@echo 'int main(void) {' >> check_asm.c
$(SH) ./check_asm.sh task tmp.i check_asm.c
$(SH) ./check_asm.sh mm tmp.i check_asm.c
@echo 'struct task_struct _task;' >> check_asm.c
@echo 'struct mm_struct _mm;' >> check_asm.c
@echo 'struct thread_struct _thread;' >> check_asm.c
+ @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
@echo 'int main(void) {' >> check_asm.c
$(SH) ./check_asm.sh task tmp.i check_asm.c
$(SH) ./check_asm.sh mm tmp.i check_asm.c
-/* $Id: irq.c,v 1.88 2000/06/26 19:40:27 davem Exp $
+/* $Id: irq.c,v 1.89 2000/06/30 10:18:38 davem Exp $
* irq.c: UltraSparc IRQ handling/init/registry.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
* lives in the brlock table for cache reasons.
*/
#ifndef CONFIG_SMP
-unsigned int local_irq_count;
-unsigned int local_bh_count;
+unsigned int __local_irq_count;
+unsigned int __local_bh_count;
#else
/* Who has global_irq_lock. */
spinlock_t *lock;
if (!irqs_running() &&
- (local_bh_count || !spin_is_locked(&global_bh_lock)))
+ (local_bh_count(smp_processor_id()) || !spin_is_locked(&global_bh_lock)))
break;
br_write_unlock(BR_GLOBALIRQ_LOCK);
lock = &__br_write_locks[BR_GLOBALIRQ_LOCK].lock;
while (irqs_running() ||
spin_is_locked(lock) ||
- (!local_bh_count && spin_is_locked(&global_bh_lock))) {
+ (!local_bh_count(smp_processor_id()) && spin_is_locked(&global_bh_lock))) {
if (!--count) {
show("wait_on_irq");
count = (~0 >> 1);
if(flags == 0) {
int cpu = smp_processor_id();
__cli();
- if (! local_irq_count)
+ if (! local_irq_count(cpu))
get_irqlock(cpu);
}
}
{
int cpu = smp_processor_id();
- if (! local_irq_count)
+ if (! local_irq_count(cpu))
release_irqlock(cpu);
__sti();
}
__save_flags(flags);
local_enabled = ((flags == 0) ? 1 : 0);
retval = 2 + local_enabled;
- if (! local_irq_count) {
+ if (! local_irq_count(smp_processor_id())) {
if (local_enabled)
retval = 1;
if (global_irq_holder == (unsigned char) smp_processor_id())
-/* $Id: process.c,v 1.107 2000/05/09 17:40:14 davem Exp $
+/* $Id: process.c,v 1.108 2000/06/30 10:18:38 davem Exp $
* arch/sparc64/kernel/process.c
*
* Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu)
spin_lock_irqsave(®dump_lock, flags);
printk("CPU[%d]: local_irq_count[%u] irqs_running[%d]\n",
- smp_processor_id(), local_irq_count, irqs_running());
+ smp_processor_id(),
+ local_irq_count(smp_processor_id()),
+ irqs_running());
#endif
printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x\n", regs->tstate,
regs->tpc, regs->tnpc, regs->y);
-/* $Id: sparc64_ksyms.c,v 1.85 2000/05/23 02:14:25 davem Exp $
+/* $Id: sparc64_ksyms.c,v 1.86 2000/06/30 10:18:38 davem Exp $
* arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
extern int unregister_ioctl32_conversion(unsigned int cmd);
extern int io_remap_page_range(unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space);
-extern void bcopy (const char *, char *, int);
extern int __ashrdi3(int, int);
extern void dump_thread(struct pt_regs *, struct user *);
#endif
#else
-EXPORT_SYMBOL(local_bh_count);
-EXPORT_SYMBOL(local_irq_count);
+EXPORT_SYMBOL(__local_bh_count);
+EXPORT_SYMBOL(__local_irq_count);
#endif
/* rw semaphores */
EXPORT_SYMBOL(__prom_getsibling);
/* sparc library symbols */
-EXPORT_SYMBOL(bcopy);
EXPORT_SYMBOL(__strlen);
#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
EXPORT_SYMBOL(strlen);
-/* $Id: sys_sparc.c,v 1.42 2000/06/26 23:20:24 davem Exp $
+/* $Id: sys_sparc.c,v 1.43 2000/07/06 01:41:29 davem Exp $
* linux/arch/sparc64/kernel/sys_sparc.c
*
* This file contains various random system calls that
-/* $Id: sys_sparc32.c,v 1.153 2000/06/26 23:20:24 davem Exp $
+/* $Id: sys_sparc32.c,v 1.154 2000/07/06 01:41:29 davem Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
-/* $Id: sys_sunos32.c,v 1.50 2000/06/26 23:20:24 davem Exp $
+/* $Id: sys_sunos32.c,v 1.51 2000/07/06 01:41:29 davem Exp $
* sys_sunos32.c: SunOS binary compatability layer on sparc64.
*
* Copyright (C) 1995, 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
-/* $Id: misc.c,v 1.18 2000/05/09 17:40:14 davem Exp $
+/* $Id: misc.c,v 1.19 2000/06/30 10:18:38 davem Exp $
* misc.c: Miscellaneous prom functions that don't belong
* anywhere else.
*
irq_exit(smp_processor_id(), 0);
smp_capture();
#else
- local_irq_count--;
+ local_irq_count(smp_processor_id())--;
#endif
p1275_cmd ("enter", P1275_INOUT(0,0));
irq_enter(smp_processor_id(), 0);
spin_unlock_wait(&__br_write_locks[BR_GLOBALIRQ_LOCK].lock);
#else
- local_irq_count++;
+ local_irq_count(smp_processor_id())++;
#endif
#ifdef CONFIG_SUN_CONSOLE
-/* $Id: fs.c,v 1.19 2000/05/09 04:48:35 davem Exp $
+/* $Id: fs.c,v 1.20 2000/07/06 01:41:30 davem Exp $
* fs.c: fs related syscall emulation for Solaris
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
-/* $Id: misc.c,v 1.27 2000/05/09 17:40:14 davem Exp $
+/* $Id: misc.c,v 1.28 2000/07/06 01:41:30 davem Exp $
* misc.c: Miscelaneous syscall emulation for Solaris
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_sfnames 0 : { *(.debug_sfnames) }
.line 0 : { *(.line) }
- /DISCARD/ : { *(.text.exit) *(.data.exit) }
+ /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) }
}
#ifdef _LINUX
-#include <linux/config.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/ctype.h>
u32 * i;
PRINTD (DBG_REGS, "reading PLX control: ");
for (i = (u32 *) 0x00; i < (u32 *) 0x30; ++i)
- rd_mem (dev, i);
+ rd_mem (dev, (size_t)i);
PRINTD (DBG_REGS, "reading mailboxes: ");
for (i = (u32 *) 0x40; i < (u32 *) 0x60; ++i)
- rd_mem (dev, i);
+ rd_mem (dev, (size_t)i);
PRINTD (DBG_REGS, "reading doorb irqev irqen reset:");
for (i = (u32 *) 0x60; i < (u32 *) 0x70; ++i)
- rd_mem (dev, i);
+ rd_mem (dev, (size_t)i);
}
#else
(void) dev;
dev->number,error);
return -EINVAL;
}
- IF_INIT(printk(DEV_LABEL "(itf %d): rev.%d,realbase=0x%x,irq=%d\n",
+ IF_INIT(printk(DEV_LABEL "(itf %d): rev.%d,realbase=0x%lx,irq=%d\n",
dev->number, revision, real_base, iadev->irq);)
/* find mapping size of board */
dev->number);
return error;
}
- IF_INIT(printk(DEV_LABEL " (itf %d): rev.%d,base=0x%x,irq=%d\n",
+ IF_INIT(printk(DEV_LABEL " (itf %d): rev.%d,base=0x%lx,irq=%d\n",
dev->number, revision, base, iadev->irq);)
/* filling the iphase dev structure */
static int ns_init_card(int i, struct pci_dev *pcidev)
{
int j;
- struct ns_dev *card;
+ struct ns_dev *card=NULL;
unsigned short pci_command;
unsigned char pci_latency;
unsigned error;
#else
static void ida_procinit(int i) {}
static int ida_proc_get_info(char *buffer, char **start, off_t offset,
- int length, int *eof, void *data) {}
+ int length, int *eof, void *data) { return 0;}
#endif
static void ida_geninit(int ctlr)
}
/* locks the driver */
-static int lock_fdc(int drive, int interruptible)
+static int _lock_fdc(int drive, int interruptible, int line)
{
if (!usage_count){
- printk(KERN_ERR "Trying to lock fdc while usage count=0\n");
+ printk(KERN_ERR "Trying to lock fdc while usage count=0 at line %d\n", line);
return -1;
}
if(floppy_grab_irq_and_dma()==-1)
return 0;
}
+#define lock_fdc(drive,interruptible) _lock_fdc(drive,interruptible, __LINE__)
+
#define LOCK_FDC(drive,interruptible) \
if (lock_fdc(drive,interruptible)) return -EINTR;
int aligned_sector_t;
int max_sector, max_size, tracksize, ssize;
+ if(max_buffer_sectors == 0) {
+ printk("VFS: Block I/O scheduled on unopened device\n");
+ return 0;
+ }
+
set_fdc(DRIVE(CURRENT->rq_dev));
raw_cmd = &default_raw_cmd;
static void do_fd_request(request_queue_t * q)
{
+ if(max_buffer_sectors == 0) {
+ printk("VFS: do_fd_request called on non-open device\n");
+ return;
+ }
+
if (usage_count == 0) {
printk("warning: usage count=0, CURRENT=%p exiting\n", CURRENT);
printk("sect=%ld cmd=%d\n", CURRENT->sector, CURRENT->cmd);
return 1;
if (UDP->checkfreq < (int)(jiffies - UDRS->last_checked)) {
+ if(floppy_grab_irq_and_dma()) {
+ return 1;
+ }
+
lock_fdc(drive,0);
poll_drive(0,0);
process_fd_request();
+ floppy_release_irq_and_dma();
}
if (UTESTF(FD_DISK_CHANGED) ||
UTESTF(FD_VERIFY) ||
test_bit(drive, &fake_change) ||
NO_GEOM){
+ if(usage_count == 0) {
+ printk("VFS: revalidate called on non-open device.\n");
+ return -EFAULT;
+ }
lock_fdc(drive,0);
cf = UTESTF(FD_DISK_CHANGED) || UTESTF(FD_VERIFY);
if (!(cf || test_bit(drive, &fake_change) || NO_GEOM)){
size = 1024;
if (!(bh = getblk(dev,0,size))){
process_fd_request();
- return 1;
+ return -ENXIO;
}
if (bh && !buffer_uptodate(bh))
ll_rw_block(READ, 1, &bh);
extern int mac_floppy_init(void);
#endif
+extern int lvm_init(void);
+
/*
* For the allocated request tables
*/
static int ps2esdi_drives = 0;
static struct hd_struct ps2esdi[MAX_HD << 6];
static u_short io_base;
-static struct timer_list esdi_timer = {NULL, NULL, 0, 0L, ps2esdi_reset_timer};
+static struct timer_list esdi_timer = {{NULL, NULL}, 0, 0L, ps2esdi_reset_timer};
static int reset_status;
static int ps2esdi_slot = -1;
int tp720esdi = 0; /* Is it Integrated ESDI of ThinkPad-720? */
static int AztTimeout, AztTries;
static DECLARE_WAIT_QUEUE_HEAD(azt_waitq);
-static struct timer_list delay_timer = { NULL, NULL, 0, 0, NULL };
+static struct timer_list delay_timer = { {NULL, NULL}, 0, 0, NULL };
static struct azt_DiskInfo DiskInfo;
static struct azt_Toc Toc[MAX_TRACKS];
&scd_dops, /* device operations */
NULL, /* link */
NULL, /* handle */
+ 0, /* devfs */
0, /* dev */
0, /* mask */
2, /* maximum speed */
&mcdx_dops, /* device operations */
NULL, /* link */
NULL, /* handle */
+ 0, /* de, devfs */
0, /* dev */
0, /* mask */
2, /* maximum speed */
if (redraw) {
set_origin(currcons);
- set_palette(currcons);
- if (sw->con_switch(vc_cons[currcons].d) && vcmode != KD_GRAPHICS)
+ if (sw->con_switch(vc_cons[currcons].d) && vcmode != KD_GRAPHICS) {
/* Update the screen contents */
+ set_palette(currcons);
do_update_region(currcons, origin, screenbuf_size/2);
+ }
}
set_cursor(currcons);
if (is_switch) {
* kmalloc is not running yet - we use the bootmem allocator.
*/
for (currcons = 0; currcons < MIN_NR_CONSOLES; currcons++) {
- int j, k ;
-
vc_cons[currcons].d = (struct vc_data *)
alloc_bootmem(sizeof(struct vc_data));
vt_cons[currcons] = (struct vt_struct *)
kmalloced = 0;
vc_init(currcons, video_num_lines, video_num_columns,
currcons || !sw->con_save_screen);
- for (j=k=0; j<16; j++) {
- vc_cons[currcons].d->vc_palette[k++] = default_red[j] ;
- vc_cons[currcons].d->vc_palette[k++] = default_grn[j] ;
- vc_cons[currcons].d->vc_palette[k++] = default_blu[j] ;
- }
}
currcons = fg_console = 0;
master_display_fg = vc_cons[currcons].d;
atomic_inc(&q->use_count);
DRM_PROC_PRINT_RET(atomic_dec(&q->use_count),
"%5d/0x%03x %5d %5d"
- " %5d/%c%c/%c%c%c %5d %10d %10d %10d\n",
+ " %5d/%c%c/%c%c%c %5Zd %10d %10d %10d\n",
i,
q->flags,
atomic_read(&q->use_count),
* Al Longyear <longyear@netcom.com>, Paul Mackerras <Paul.Mackerras@cs.anu.edu.au>
*
* Original release 01/11/99
- * ==FILEDATE 19991217==
+ * ==FILEDATE 20000706==
*
* This code is released under the GNU General Public License (GPL)
*
*/
#define HDLC_MAGIC 0x239e
-#define HDLC_VERSION "1.13"
+#define HDLC_VERSION "1.16"
#include <linux/version.h>
#include <linux/config.h>
/* Queues for select() functionality */
wait_queue_head_t read_wait;
wait_queue_head_t write_wait;
+ wait_queue_head_t poll_wait;
int tbusy; /* reentrancy flag for tx wakeup code */
int woke_up;
/* Ensure that the n_hdlcd process is not hanging on select()/poll() */
wake_up_interruptible (&n_hdlc->read_wait);
+ wake_up_interruptible (&n_hdlc->poll_wait);
wake_up_interruptible (&n_hdlc->write_wait);
if (tty != NULL && tty->disc_data == n_hdlc)
register int actual;
unsigned long flags;
N_HDLC_BUF *tbuf;
-
+
if (debuglevel >= DEBUG_LEVEL_INFO)
printk("%s(%d)n_hdlc_send_frames() called\n",__FILE__,__LINE__);
+ check_again:
save_flags(flags);
cli ();
return;
}
n_hdlc->tbusy = 1;
+ n_hdlc->woke_up = 0;
restore_flags(flags);
/* get current transmit buffer or get new transmit */
__FILE__,__LINE__,tbuf,tbuf->count);
/* Send the next block of data to device */
- n_hdlc->woke_up = 0;
tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
actual = tty->driver.write(tty, 0, tbuf->buf, tbuf->count);
/* wait up sleeping writers */
wake_up_interruptible(&n_hdlc->write_wait);
+ wake_up_interruptible(&n_hdlc->poll_wait);
/* get next pending transmit buffer */
tbuf = n_hdlc_buf_get(&n_hdlc->tx_buf_list);
__FILE__,__LINE__,tbuf);
/* buffer not accepted by driver */
-
- /* check if wake up code called since last write call */
- if (n_hdlc->woke_up)
- continue;
-
/* set this buffer as pending buffer */
n_hdlc->tbuf = tbuf;
break;
n_hdlc->tbusy = 0;
restore_flags(flags);
+ if (n_hdlc->woke_up)
+ goto check_again;
+
if (debuglevel >= DEBUG_LEVEL_INFO)
printk("%s(%d)n_hdlc_send_frames() exit\n",__FILE__,__LINE__);
tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
return;
}
-
- if (!n_hdlc->tbuf)
- tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
- else
- n_hdlc_send_frames (n_hdlc, tty);
+
+ n_hdlc_send_frames (n_hdlc, tty);
} /* end of n_hdlc_tty_wakeup() */
/* wake up any blocked reads and perform async signalling */
wake_up_interruptible (&n_hdlc->read_wait);
+ wake_up_interruptible (&n_hdlc->poll_wait);
if (n_hdlc->tty->fasync != NULL)
#if LINUX_VERSION_CODE < VERSION(2,3,0)
kill_fasync (n_hdlc->tty->fasync, SIGIO);
#else
- kill_fasync(&n_hdlc->tty->fasync, SIGIO, POLL_IN);
+ kill_fasync (&n_hdlc->tty->fasync, SIGIO, POLL_IN);
#endif
} /* end of n_hdlc_tty_receive() */
count = maxframe;
}
+ add_wait_queue(&n_hdlc->write_wait, &wait);
+ set_current_state(TASK_INTERRUPTIBLE);
+
/* Allocate transmit buffer */
- tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list);
- if (!tbuf) {
- /* sleep until transmit buffer available */
- add_wait_queue(&n_hdlc->write_wait, &wait);
- while (!tbuf) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule();
-
- n_hdlc = tty2n_hdlc (tty);
- if (!n_hdlc || n_hdlc->magic != HDLC_MAGIC ||
- tty != n_hdlc->tty) {
- printk("n_hdlc_tty_write: %p invalid after wait!\n", n_hdlc);
- error = -EIO;
- break;
- }
+ /* sleep until transmit buffer available */
+ while (!(tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list))) {
+ schedule();
- if (signal_pending(current)) {
- error = -EINTR;
- break;
- }
+ n_hdlc = tty2n_hdlc (tty);
+ if (!n_hdlc || n_hdlc->magic != HDLC_MAGIC ||
+ tty != n_hdlc->tty) {
+ printk("n_hdlc_tty_write: %p invalid after wait!\n", n_hdlc);
+ error = -EIO;
+ break;
+ }
- tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list);
+ if (signal_pending(current)) {
+ error = -EINTR;
+ break;
}
- set_current_state(TASK_RUNNING);
- remove_wait_queue(&n_hdlc->write_wait, &wait);
}
+ set_current_state(TASK_RUNNING);
+ remove_wait_queue(&n_hdlc->write_wait, &wait);
+
if (!error) {
/* Retrieve the user's buffer */
COPY_FROM_USER (error, tbuf->buf, data, count);
* Return Value:
*
* bit mask containing info on which ops will not block
- *
- * Note: Called without the kernel lock held. Which is fine.
*/
static unsigned int n_hdlc_tty_poll (struct tty_struct *tty,
struct file *filp, poll_table * wait)
/* queue current process into any wait queue that */
/* may awaken in the future (read and write) */
#if LINUX_VERSION_CODE < VERSION(2,1,89)
- poll_wait(&n_hdlc->read_wait, wait);
- poll_wait(&n_hdlc->write_wait, wait);
+ poll_wait(&n_hdlc->poll_wait, wait);
#else
- poll_wait(filp, &n_hdlc->read_wait, wait);
- poll_wait(filp, &n_hdlc->write_wait, wait);
+ poll_wait(filp, &n_hdlc->poll_wait, wait);
#endif
/* set bits for operations that wont block */
if(n_hdlc->rx_buf_list.head)
n_hdlc->flags = 0;
init_waitqueue_head(&n_hdlc->read_wait);
+ init_waitqueue_head(&n_hdlc->poll_wait);
init_waitqueue_head(&n_hdlc->write_wait);
return n_hdlc;
/*
* Events that this OSM is interested in
*/
-#define I2OB_EVENT_MASK I2O_EVT_IND_BSA_VOLUME_LOAD | \
- I2O_EVT_IND_BSA_VOLUME_UNLOAD | \
- I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ | \
- I2O_EVT_IND_BSA_CAPACITY_CHANGE
+#define I2OB_EVENT_MASK (I2O_EVT_IND_BSA_VOLUME_LOAD | \
+ I2O_EVT_IND_BSA_VOLUME_UNLOAD | \
+ I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ | \
+ I2O_EVT_IND_BSA_CAPACITY_CHANGE)
/*
struct i2ob_request *next;
struct request *req;
int num;
-} __cacheline_aligned;
+};
/*
* Per IOP requst queue information
config_info_t conf;
cistpl_cftable_entry_t *cfg = &parse.cftable_entry;
cistpl_cftable_entry_t dflt = { 0 };
- int i, pass, last_ret, last_fn, hd, io_base, ctl_base;
+ int i, pass, last_ret, last_fn, hd=-1, io_base, ctl_base;
DEBUG(0, "ide_config(0x%p)\n", link);
const char max_drive = 'a' + ((MAX_HWIFS * MAX_DRIVES) - 1);
const char max_hwif = '0' + (MAX_HWIFS - 1);
+ if (strncmp(s,"ide",3) &&
+ strncmp(s,"idebus",6) &&
+#ifdef CONFIG_BLK_DEV_VIA82CXXX
+ strncmp(s,"splitfifo",9) &&
+#endif /* CONFIG_BLK_DEV_VIA82CXXX */
+ strncmp(s,"hdxlun",6) &&
+ (strncmp(s,"hd",2) && s[2] != '='))
+ return 0;
+
printk("ide_setup: %s", s);
init_ide_data ();
printk(" : Enabled support for IDE doublers\n");
ide_doubler = 1;
- return 0;
+ return 1;
}
#endif /* CONFIG_BLK_DEV_IDEDOUBLER */
if (!strcmp(s, "ide=reverse")) {
ide_scan_direction = 1;
printk(" : Enabled support for IDE inverse scan order.\n");
- return 0;
+ return 1;
}
#endif /* CONFIG_BLK_DEV_IDEPCI */
case 0: goto bad_option;
default:
printk(" -- SUPPORT NOT CONFIGURED IN THIS KERNEL\n");
- return 0;
+ return 1;
}
}
bad_option:
printk(" -- BAD OPTION\n");
- return 0;
+ return 1;
bad_hwif:
printk("-- NOT SUPPORTED ON ide%d", hw);
done:
printk("\n");
- return 0;
+ return 1;
}
/*
return 0;
}
+#ifdef MODULE
+char *options = NULL;
+MODULE_PARM(options,"s");
+
static void __init parse_options (char *line)
{
char *next = line;
while ((line = next) != NULL) {
if ((next = strchr(line,' ')) != NULL)
*next++ = 0;
- if (!strncmp(line,"ide",3) ||
- !strncmp(line,"idebus",6) ||
-#ifdef CONFIG_BLK_DEV_VIA82CXXX
- !strncmp(line,"splitfifo",9) ||
-#endif /* CONFIG_BLK_DEV_VIA82CXXX */
- !strncmp(line,"hdxlun",6) ||
- (!strncmp(line,"hd",2) && line[2] != '='))
- (void) ide_setup(line);
+ if (!ide_setup(line))
+ printk ("Unknown option '%s'\n", line);
}
}
-#ifdef MODULE
-char *options = NULL;
-MODULE_PARM(options,"s");
-
int init_module (void)
{
parse_options(options);
#else /* !MODULE */
-static int parse_ide_setup (char *line)
-{
- parse_options(line);
- /* We MUST return 0 as otherwise no subsequent __setup option works... */
- return 0;
-}
-__setup("", parse_ide_setup);
+__setup("", ide_setup);
#endif /* MODULE */
*
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
extern void capidrv_init(void);
#endif
+extern int act2000_init(void);
+
+
void
isdn_cards_init(void)
{
*/
#include <linux/ppp_defs.h> /* for PPP_PROTOCOL */
+#include <linux/isdn_ppp.h> /* for isdn_ppp info */
extern void isdn_ppp_timer_timeout(void);
extern int isdn_ppp_read(int, struct file *, char *, int);
extern int isdn_ppp_write(int, struct file *, const char *, int);
======================================================================*/
+#include <linux/config.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <linux/types.h>
static inline void block_erase (volatile u_char *addr);
static inline int check_erase(volatile u_char *addr);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#warning This is definitely not SMP safe. Lock the paging mechanism.
#endif
*/
+#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kmod.h>
#include <linux/types.h>
#include <linux/module.h>
-#include <linux/config.h>
#include <linux/mtd/mtd.h>
#define DEBUGLVL debug
#endif
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
/* Linux driver for NAND Flash Translation Layer */
/* (c) 1999 Machine Vision Holdings, Inc. */
-/* Author: David Woodhouse <dwmw2@infradead.org */
-/* $Id: nftl.c,v 1.34 2000/06/07 14:48:52 dwmw2 Exp $ */
+/* Author: David Woodhouse <dwmw2@infradead.org> */
+/* $Id: nftl.c,v 1.35 2000/07/06 14:35:01 dwmw2 Exp $ */
/*
+ The contents of this file are distributed under the GNU Public
+ Licence version 2 ("GPL"). The legal note below refers only to the
+ _use_ of the code in some jurisdictions, and does not in any way
+ affect the copying, distribution and modification of this code,
+ which is permitted under the terms of the GPL.
+
+ Section 0 of the GPL says:
+
+ "Activities other than copying, distribution and modification are not
+ covered by this License; they are outside its scope."
+
+ You may copy, distribute and modify this code to your hearts'
+ content - it's just that in some jurisdictions, you may only _use_
+ it under the terms of the licence below. This puts it in a similar
+ situation to the ISDN code, which you may need telco approval to
+ use, and indeed any code which has uses that may be restricted in
+ law. For example, certain malicious uses of the networking stack
+ may be illegal, but that doesn't prevent the networking code from
+ being under GPL.
+
+ In fact the ISDN case is worse than this, because modification of
+ the code automatically invalidates its approval. Modificiation,
+ unlike usage, _is_ one of the rights which is protected by the
+ GPL. Happily, the law in those places where approval is required
+ doesn't actually prevent you from modifying the code - it's just
+ that you may not be allowed to _use_ it once you've done so - and
+ because usage isn't addressed by the GPL, that's just fine.
+
+ dwmw2@infradead.org
+ 6/7/0
+
LEGAL NOTE: The NFTL format is patented by M-Systems. They have
granted a licence for its use with their DiskOnChip products:
A signed copy of this agreement from M-Systems is kept on file by
Red Hat UK Limited. In the unlikely event that you need access to it,
- please contact dwmw2@redhat.com for assistance.
-*/
+ please contact dwmw2@redhat.com for assistance. */
#define PRERELEASE
#define DEBUGLVL debug
#endif
+#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <asm/errno.h>
printk(KERN_NOTICE "M-Systems NAND Flash Translation Layer driver. (C) 1999 MVHI\n");
#ifdef PRERELEASE
- printk(KERN_INFO"$Id: nftl.c,v 1.34 2000/06/07 14:48:52 dwmw2 Exp $\n");
+ printk(KERN_INFO"$Id: nftl.c,v 1.35 2000/07/06 14:35:01 dwmw2 Exp $\n");
#endif
if (register_blkdev(NFTL_MAJOR, "nftl", &nftl_fops)){
#endif
if (pdev && vci->drv_flags & HAS_CB_FNS) {
- u32 fn_st_addr; /* Cardbus function status space */
+ unsigned long fn_st_addr; /* Cardbus function status space */
fn_st_addr = pci_resource_start (pdev, 2);
if (fn_st_addr)
vp->cb_fn_base = ioremap(fn_st_addr, 128);
- printk(KERN_INFO "%s: CardBus functions mapped %8.8x->%p\n",
+ printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n",
dev->name, fn_st_addr, vp->cb_fn_base);
#if 1 /* AKPM: the 575_cb and 905B LEDs seem OK without this */
if (vortex_pci_tbl[chip_idx].device != 0x5257) {
{
struct net_device *dev = (struct net_device *) data;
struct rtl8139_private *tp = (struct rtl8139_private *) dev->priv;
- void *ioaddr = tp->mmio_addr;
int next_tick = 60 * HZ;
int mii_reg5;
#if 0
if (!tp->duplex_lock && mii_reg5 != 0xffff) {
+ void *ioaddr = tp->mmio_addr;
int duplex = (mii_reg5 & 0x0100)
|| (mii_reg5 & 0x01C0) == 0x0040;
if (tp->full_duplex != duplex) {
#define tigonFwSbssLen 0x38
#define tigonFwBssAddr 0x00015dd0
#define tigonFwBssLen 0x2080
-u32 tigonFwText[];
-u32 tigonFwData[];
-u32 tigonFwRodata[];
#ifndef CONFIG_ACENIC_OMIT_TIGON_I
/* Generated by genfw.c */
u32 tigonFwText[(MAX_TEXT_LEN/4) + 1] __initdata = {
0x0, 0x0, 0x0, 0x2,
0x0, 0x0, 0x30001, 0x1,
0x30201, 0x0, 0x0, 0x0 };
+#else
+#define tigonFwText NULL
+#define tigonFwData NULL
+#define tigonFwRodata NULL
#endif
/* Generated by genfw.c */
#define tigon2FwReleaseMajor 0xc
}
}
- return;
+ return 0;
}
/* It is pretty silly, SIOCSIFHWADDR exists to make this. */
* PPPoE --- PPP over Ethernet (RFC 2516)
*
*
- * Version: 0.5.0
+ * Version: 0.5.1
+ *
+ * 030700 : Fixed connect logic to allow for disconnect
*
* Author: Michal Ostrowski <mostrows@styx.uwaterloo.ca>
*
goto end;
error = -EBUSY;
- if (sk->state & PPPOX_CONNECTED)
+ if ((sk->state & PPPOX_CONNECTED) && sp->sa_addr.pppoe.sid)
goto end;
dev = dev_get_by_name(sp->sa_addr.pppoe.dev);
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/kernel.h>
+#include <net/slhc_vj.h>
#ifdef CONFIG_INET
/* Entire module is for IP only */
#include <asm/system.h>
#include <asm/uaccess.h>
#include <net/checksum.h>
-#include <net/slhc_vj.h>
#include <asm/unaligned.h>
int last_retran;
-/* $Id: sunlance.c,v 1.101 2000/06/19 06:24:46 davem Exp $
+/* $Id: sunlance.c,v 1.102 2000/06/30 10:18:35 davem Exp $
* lance.c: Linux/Sparc/Lance driver
*
* Written 1995, 1996 by Miguel de Icaza
#ifndef MODULE
static int io[PARPORT_MAX+1] __initdata = { [0 ... PARPORT_MAX] = 0 };
+#ifdef CONFIG_PARPORT_PC
static int io_hi[PARPORT_MAX+1] __initdata = { [0 ... PARPORT_MAX] = 0 };
+#endif
static int irq[PARPORT_MAX] __initdata = { [0 ... PARPORT_MAX-1] = PARPORT_IRQ_PROBEONLY };
static int dma[PARPORT_MAX] __initdata = { [0 ... PARPORT_MAX-1] = PARPORT_DMA_NONE };
-/* $Id: audio.c,v 1.52 2000/06/22 11:42:27 davem Exp $
+/* $Id: audio.c,v 1.53 2000/07/06 01:41:34 davem Exp $
* drivers/sbus/audio/audio.c
*
* Copyright 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu)
togo = abuf.size;
if ((togo & 3) || (p & 3)) return -EINVAL;
- uptr = (char *) abuf.data;
+ uptr = (char *) (unsigned long) abuf.data;
if (verify_area(VERIFY_READ, uptr, togo))
return -EFAULT;
while (togo != 0) {
-/* $Id: sab82532.c,v 1.45 2000/05/08 22:23:08 ecd Exp $
+/* $Id: sab82532.c,v 1.46 2000/07/06 01:41:37 davem Exp $
* sab82532.c: ASYNC Driver for the SIEMENS SAB82532 DUSCC.
*
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
static inline void __init show_serial_version(void)
{
- char *revision = "$Revision: 1.45 $";
+ char *revision = "$Revision: 1.46 $";
char *version, *p;
version = strchr(revision, ' ');
-/* $Id: zs.c,v 1.57 2000/04/26 09:36:32 davem Exp $
+/* $Id: zs.c,v 1.58 2000/07/06 01:41:38 davem Exp $
* zs.c: Zilog serial port driver for the Sparc.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
tty_hangup(tty);
}
-
-/*
- * This subroutine is called when the RS_TIMER goes off. It is used
- * by the serial driver to handle ports that do not have an interrupt
- * (irq=0). This doesn't work at all for 16450's, as a sun has a Z8530.
- */
-
-static void zs_timer(void)
-{
- printk("zs_timer called\n");
- prom_halt();
- return;
-}
-
static int startup(struct sun_serial * info)
{
unsigned long flags;
static void show_serial_version(void)
{
- char *revision = "$Revision: 1.57 $";
+ char *revision = "$Revision: 1.58 $";
char *version, *p;
version = strchr(revision, ' ');
static int fdomain_isa_detect( int *irq, int *iobase )
{
int i, j;
- int base;
+ int base = 0xdeadbeef;
int flag = 0;
#if DEBUG_DETECT
};
unsigned int dRegValue;
- unsigned short command;
WORD wBIOS, wBASE;
BYTE bPCIBusNum, bInterrupt, bPCIDeviceNum;
#define pci64_unmap_single(d,a,s,dir) pci_unmap_single((d),(a),(s),(dir))
#define pci64_unmap_sg(d,s,n,dir) pci_unmap_sg((d),(s),(n),(dir))
#if BITS_PER_LONG > 32
-#define pci64_dma_hi32(a) ((u32) (0xffffffff & (a>>32)))
-#define pci64_dma_lo32(a) ((u32) (0xffffffff & (a)))
+#define pci64_dma_hi32(a) ((u32) (0xffffffff & (((u64)(a))>>32)))
+#define pci64_dma_lo32(a) ((u32) (0xffffffff & (((u64)(a)))))
#else
#define pci64_dma_hi32(a) 0
#define pci64_dma_lo32(a) (a)
#include "constants.h"
#include "sd.h"
#include <linux/stat.h>
+#include <scsi/scsicam.h>
#include "dc390.h"
card->abuf1 + card->curPlayPos,
rem);
if (amt > rem)
- nm256_writeBuffer8 (card, buffer, 1, card->abuf1,
+ nm256_writeBuffer8 (card, buffer + rem, 1, card->abuf1,
amt - rem);
}
else
}
-static void trident_free_pcm_channel(struct trident_card *card, int channel)
+static void trident_free_pcm_channel(struct trident_card *card, unsigned int channel)
{
int bank;
card->banks[bank].bitmap &= ~(1 << (channel));
}
-static void ali_free_pcm_channel(struct trident_card *card, int channel)
+static void ali_free_pcm_channel(struct trident_card *card, unsigned int channel)
{
int bank;
#include <linux/init.h>
#include <linux/malloc.h>
#include <linux/lp.h>
-#define DEBUG
+#undef DEBUG
#include <linux/usb.h>
#define USBLP_BUF_SIZE 8192
pci_outb(info, green, DAC_DATA);
pci_outb(info, blue, DAC_DATA);
- if (regno < 16)
+ if (regno < 16) {
switch (default_var.bits_per_pixel) {
#ifdef FBCON_HAS_CFB16
case 16:
#endif
#ifdef FBCON_HAS_CFB32
case 32:
+ { int i;
i = (regno << 8) | regno;
info->fbcon_cmap.cfb32[regno] = (i << 16) | i;
+ }
break;
#endif
}
+ }
return 0;
}
break;
#endif
default:
+ printk(KERN_WARNING "igafb_set_disp: unknown resolution %d\n",
+ default_var.bits_per_pixel);
return;
}
memcpy(&info->dispsw, sw, sizeof(*sw));
dep_tristate ' UMSDOS: Unix-like file system on top of standard MSDOS fs' CONFIG_UMSDOS_FS $CONFIG_MSDOS_FS
dep_tristate ' VFAT (Windows-95) fs support' CONFIG_VFAT_FS $CONFIG_FAT_FS
dep_tristate 'EFS file system support (read only) (EXPERIMENTAL)' CONFIG_EFS_FS $CONFIG_EXPERIMENTAL
-dep_tristate 'Journalling Flash File System (JFFS) support (EXPERIMENTAL)' CONFIG_JFFS_FS $CONFIG_EXPERIMENTAL
+dep_tristate 'Journalling Flash File System (JFFS) support (EXPERIMENTAL)' CONFIG_JFFS_FS $CONFIG_EXPERIMENTAL $CONFIG_MTD
tristate 'Compressed ROM file system support' CONFIG_CRAMFS
tristate 'Simple RAM-based file system support' CONFIG_RAMFS
#endif
struct inode *adfs_iget(struct super_block *sb, struct object_info *obj);
void adfs_read_inode(struct inode *inode);
-void adfs_write_inode(struct inode *inode);
+void adfs_write_inode(struct inode *inode,int unused);
int adfs_notify_change(struct dentry *dentry, struct iattr *attr);
/* map.c */
* The adfs-specific inode data has already been updated by
* adfs_notify_change()
*/
-void adfs_write_inode(struct inode *inode)
+void adfs_write_inode(struct inode *inode, int unused)
{
struct super_block *sb = inode->i_sb;
struct object_info obj;
* we can jump directly to where we left off.
*/
if (filp->private_data && filp->f_version == inode->i_version) {
- i = (s32)filp->private_data;
+ i = (s32)(unsigned long)filp->private_data;
j = 0;
pr_debug("AFFS: readdir() left off=%d\n",i);
}
filp->private_data = (void *)ino;
if (filldir(dirent,name,namelen,filp->f_pos,ino) < 0)
goto readdir_done;
- filp->private_data = (void *)i;
+ filp->private_data = (void *)(unsigned long)i;
affs_brelse(fh_bh);
fh_bh = NULL;
stored++;
}
void
-affs_write_inode(struct inode *inode)
+affs_write_inode(struct inode *inode, int unused)
{
struct buffer_head *bh;
struct file_end *file_end;
brelse(bh);
}
-static void bfs_write_inode(struct inode * inode)
+static void bfs_write_inode(struct inode * inode, int unused)
{
unsigned long ino = inode->i_ino;
kdev_t dev = inode->i_dev;
/**
* is_devfsd_or_child - Test if the current process is devfsd or one of its children.
- * fs_info: The filesystem information.
+ * @fs_info: The filesystem information.
*
* Returns %TRUE if devfsd or child, else %FALSE.
*/
/**
* devfs_unregister - Unregister a device entry.
- * de: A handle previously created by devfs_register() or returned from
+ * @de: A handle previously created by devfs_register() or returned from
* devfs_find_handle(). If this is %NULL the routine does nothing.
*/
#endif
} /* End Function devfs_read_inode */
-static void devfs_write_inode (struct inode *inode)
+static void devfs_write_inode (struct inode *inode, int wait)
{
int index;
struct devfs_entry *de;
/**
* get_vfs_inode - Get a VFS inode.
* @sb: The super block.
- * @di: The devfs inode.
- * @dentry The dentry to register with the devfs inode.
+ * @de: The devfs inode.
+ * @dentry: The dentry to register with the devfs inode.
*
* Returns the inode on success, else %NULL.
*/
{
struct devfs_entry *de;
- lock_kernel();
+ lock_kernel ();
de = get_devfs_entry_from_vfs_inode (inode);
#ifdef CONFIG_DEVFS_DEBUG
if (devfs_debug & DEBUG_D_IPUT)
printk ("%s: d_iput(): dentry: %p inode: %p de: %p de->dentry: %p\n",
DEVFS_NAME, dentry, inode, de, de->inode.dentry);
#endif
- if (de->inode.dentry == dentry)
- {
- de->inode.dentry = NULL;
- }
- unlock_kernel();
+ if (de->inode.dentry == dentry) de->inode.dentry = NULL;
+ unlock_kernel ();
iput (inode);
} /* End Function devfs_d_iput */
/**
* devfs_d_delete - Callback for when all files for a dentry are closed.
- * @detry: The dentry.
+ * @dentry: The dentry.
*/
static int devfs_d_delete (struct dentry *dentry)
struct inode *dir;
struct fs_info *fs_info;
- lock_kernel();
+ lock_kernel ();
dir = dentry->d_parent->d_inode;
fs_info = dir->i_sb->u.generic_sbp;
if (!de || de->registered)
}
if ( wait_for_devfsd_finished (fs_info) ) dentry->d_op = &devfs_dops;
out:
- unlock_kernel();
+ unlock_kernel ();
return 1;
} /* End Function devfs_d_revalidate_wait */
static int devfs_readlink (struct dentry *dentry, char *buffer, int buflen)
{
struct devfs_entry *de;
- lock_kernel();
- de = get_devfs_entry_from_vfs_inode (dentry->d_inode);
- unlock_kernel();
+ lock_kernel ();
+ de = get_devfs_entry_from_vfs_inode (dentry->d_inode);
+ unlock_kernel ();
return vfs_readlink (dentry, buffer, buflen, de->u.symlink.linkname);
} /* End Function devfs_readlink */
static int devfs_follow_link (struct dentry *dentry, struct nameidata *nd)
{
struct devfs_entry *de;
- lock_kernel();
- de = get_devfs_entry_from_vfs_inode (dentry->d_inode);
- unlock_kernel();
+ lock_kernel ();
+ de = get_devfs_entry_from_vfs_inode (dentry->d_inode);
+ unlock_kernel ();
return vfs_follow_link (nd, de->u.symlink.linkname);
} /* End Function devfs_follow_link */
#include "tables.h"
EXPORT_SYMBOL(fat_new_dir);
-EXPORT_SYMBOL(fat_bmap);
EXPORT_SYMBOL(fat_get_block);
-EXPORT_SYMBOL(fat_brelse);
-EXPORT_SYMBOL(fat_cache_inval_inode);
EXPORT_SYMBOL(fat_clear_inode);
EXPORT_SYMBOL(fat_date_unix2dos);
EXPORT_SYMBOL(fat_delete_inode);
-EXPORT_SYMBOL(fat_esc2uni);
-EXPORT_SYMBOL(fat_file_read);
-EXPORT_SYMBOL(fat_file_write);
-EXPORT_SYMBOL(fat_fs_panic);
EXPORT_SYMBOL(fat__get_entry);
-EXPORT_SYMBOL(fat_lock_creation);
EXPORT_SYMBOL(fat_mark_buffer_dirty);
EXPORT_SYMBOL(fat_notify_change);
EXPORT_SYMBOL(fat_parent_ino);
EXPORT_SYMBOL(fat_readdir);
EXPORT_SYMBOL(fat_scan);
EXPORT_SYMBOL(fat_statfs);
-EXPORT_SYMBOL(fat_uni2esc);
-EXPORT_SYMBOL(fat_unlock_creation);
EXPORT_SYMBOL(fat_write_inode);
EXPORT_SYMBOL(register_cvf_format);
EXPORT_SYMBOL(unregister_cvf_format);
EXPORT_SYMBOL(fat_get_cluster);
-EXPORT_SYMBOL(lock_fat);
-EXPORT_SYMBOL(unlock_fat);
EXPORT_SYMBOL(fat_dir_ioctl);
EXPORT_SYMBOL(fat_add_entries);
EXPORT_SYMBOL(fat_dir_empty);
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * $Id: inode-v23.c,v 1.15 2000/06/16 16:23:02 dwmw2 Exp $
+ * $Id: inode-v23.c,v 1.16 2000/07/06 14:38:10 dwmw2 Exp $
*
*
* Ported to Linux 2.3.x and MTD:
* maybe other stuff do to.
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
}
inode->i_ctime = inode->i_mtime = CURRENT_TIME;
mark_inode_dirty(inode);
+ invalidate_inode_pages(inode);
err = written;
out:
*
*/
#define __NO_VERSION__
+#include <linux/config.h>
#include <linux/types.h>
#include <linux/malloc.h>
#include <linux/jffs.h>
*
*/
#define __NO_VERSION__
+#include <linux/config.h>
#include <linux/malloc.h>
#include <linux/blkdev.h>
#include <linux/jffs.h>
if ((len = ntohl(*p++)) != NFS2_FHSIZE) {
printk(KERN_NOTICE
- "lockd: bad fhandle size %x (should be %Zu)\n",
+ "lockd: bad fhandle size %x (should be %d)\n",
len, NFS2_FHSIZE);
return NULL;
}
return;
}
bh = sb->u.minix_sb.s_zmap[zone];
- if (!minix_clear_bit(bit,bh->b_data))
+ if (!minix_test_and_clear_bit(bit,bh->b_data))
printk("free_block (%s:%d): bit already cleared\n",
kdevname(sb->s_dev), block);
else
}
if (!bh || j >= 8192)
return 0;
- if (minix_set_bit(j,bh->b_data)) {
+ if (minix_test_and_set_bit(j,bh->b_data)) {
printk("new_block: bit already set");
DQUOT_FREE_BLOCK(sb, inode, 1);
goto repeat;
bh = inode->i_sb->u.minix_sb.s_imap[ino >> 13];
minix_clear_inode(inode);
clear_inode(inode);
- if (!minix_clear_bit(ino & 8191, bh->b_data))
+ if (!minix_test_and_clear_bit(ino & 8191, bh->b_data))
printk("free_inode: bit %lu already cleared.\n",ino);
mark_buffer_dirty(bh, 1);
}
unlock_super(sb);
return NULL;
}
- if (minix_set_bit(j,bh->b_data)) { /* shouldn't happen */
+ if (minix_test_and_set_bit(j,bh->b_data)) { /* shouldn't happen */
printk("new_inode: bit already set");
iput(inode);
unlock_super(sb);
struct page * page;
struct address_space *mapping = dentry->d_inode->i_mapping;
page = read_cache_page(mapping, 0, (filler_t *)mapping->a_ops->readpage,
- dentry);
+ NULL);
if (IS_ERR(page))
goto sync_fail;
wait_on_page(page);
nfscache = (struct svc_cacherep *)
__get_free_pages(GFP_KERNEL, order);
if (!nfscache) {
- printk (KERN_ERR "nfsd: cannot allocate %d bytes for reply cache\n", i);
+ printk (KERN_ERR "nfsd: cannot allocate %Zd bytes for reply cache\n", i);
return;
}
memset(nfscache, 0, i);
if (!hash_list) {
free_pages ((unsigned long)nfscache, order);
nfscache = NULL;
- printk (KERN_ERR "nfsd: cannot allocate %d bytes for hash list\n", i);
+ printk (KERN_ERR "nfsd: cannot allocate %Zd bytes for hash list\n", i);
return;
}
EXPORT_NO_SYMBOLS;
MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");
-extern int (*do_nfsservctl)(int, void *, void *);
+extern long (*do_nfsservctl)(int, void *, void *);
/*
* Initialize the module
* Extensive rewrite by Neil Brown <neilb@cse.unsw.edu.au> Southern-Spring 1999
*/
-#include <linux/config.h>
#include <linux/sched.h>
#include <linux/malloc.h>
#include <linux/fs.h>
#ifdef CONFIG_NTFS_RW
static void
-ntfs_write_inode (struct inode *ino)
+ntfs_write_inode (struct inode *ino, int unused)
{
ntfs_debug (DEBUG_LINUX, "ntfs:write inode %x\n", ino->i_ino);
ntfs_update_inode (NTFS_LINO2NINO (ino));
#include "check.h"
#include "msdos.h"
+#if CONFIG_BLK_DEV_MD && CONFIG_AUTODETECT_RAID
+extern void md_autodetect_dev(kdev_t dev);
+#endif
+
static int current_minor;
/*
return 0;
}
+#ifdef WTF
static int sync_iblock(struct inode *inode, unsigned short *iblock,
struct buffer_head **bh, int wait)
{
return -1;
return 0;
}
+#endif
static int sync_direct(struct inode *inode, int wait)
{
return err;
}
+#ifdef WTF
static int sync_indirect(struct inode *inode, unsigned short *iblock, int wait)
{
int i;
brelse(dind_bh);
return err;
}
+#endif
-int qnx4_sync_file(struct file *file, struct dentry *dentry)
+int qnx4_sync_file(struct file *file, struct dentry *dentry, int unused)
{
struct inode *inode = dentry->d_inode;
int wait, err = 0;
sb->s_dirt = 0;
}
-static void qnx4_write_inode(struct inode *inode)
+static void qnx4_write_inode(struct inode *inode, int unused)
{
struct qnx4_inode_entry *raw_inode;
int block, ino;
if (status)
{
#ifdef SMBFS_PARANOIA
-printk("smb_file_read: %s/%s validation failed, error=%d\n",
+printk("smb_file_read: %s/%s validation failed, error=%Zd\n",
dentry->d_parent->d_name.name, dentry->d_name.name, status);
#endif
goto out;
if (result)
{
#ifdef SMBFS_PARANOIA
-printk("smb_file_write: %s/%s validation failed, error=%d\n",
+printk("smb_file_write: %s/%s validation failed, error=%Zd\n",
dentry->d_parent->d_name.name, dentry->d_name.name, result);
#endif
goto out;
+++ /dev/null
-/* fs/tunnel.c: utility functions to support VFS tunnelling
-
- Copyright (C) 1999 Richard Gooch
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- Richard Gooch may be reached by email at rgooch@atnf.csiro.au
- The postal address is:
- Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
-
- ChangeLog
-
- 19991121 Richard Gooch <rgooch@atnf.csiro.au>
- Created.
-*/
-#include <linux/types.h>
-#include <linux/errno.h>
-#include <linux/ctype.h>
-#include <linux/module.h>
-#include <linux/fs.h>
-
-
-/*PUBLIC_FUNCTION*/
-struct dentry *vfs_tunnel_lookup (const struct dentry *dentry,
- const struct dentry *parent,
- const struct dentry *covered)
-/* [SUMMARY] Lookup the corresponding dentry in the mounted-over FS.
- <dentry> The dentry which is in the overmounting FS.
- <parent> The parent of the dentry in the mounted-over FS. This may be NULL.
- <covered> The dentry covered by the root dentry of the overmounting FS.
- [RETURNS] A dentry on success, else NULL.
-*/
-{
- struct dentry *root = dentry->d_sb->s_root;
-
- if (covered == root) return NULL;
- if (parent) return lookup_dentry (dentry->d_name.name, parent, 0);
-} /* End Function vfs_tunnel_lookup */
#include <linux/limits.h>
#include <linux/umsdos_fs.h>
#include <linux/malloc.h>
-
-#include <asm/uaccess.h>
+#include <linux/pagemap.h>
#define UMSDOS_SPECIAL_DIRFPOS 3
extern struct dentry *saved_root;
struct dentry *demd;
off_t start_fpos;
int ret = 0;
- struct file new_filp;
+ loff_t pos;
umsdos_startlookup (dir);
goto out_dput;
}
- /* set up our private filp ... */
- fill_new_filp(&new_filp, demd);
- new_filp.f_pos = filp->f_pos;
+ pos = filp->f_pos;
start_fpos = filp->f_pos;
- if (new_filp.f_pos <= UMSDOS_SPECIAL_DIRFPOS + 1)
- new_filp.f_pos = 0;
-Printk (("f_pos %Ld i_size %ld\n", new_filp.f_pos, demd->d_inode->i_size));
+ if (pos <= UMSDOS_SPECIAL_DIRFPOS + 1)
+ pos = 0;
ret = 0;
- while (new_filp.f_pos < demd->d_inode->i_size) {
- off_t cur_f_pos = new_filp.f_pos;
+ while (pos < demd->d_inode->i_size) {
+ off_t cur_f_pos = pos;
struct dentry *dret;
struct inode *inode;
struct umsdos_dirent entry;
struct umsdos_info info;
ret = -EIO;
- if (umsdos_emd_dir_readentry (&new_filp, &entry) != 0)
+ if (umsdos_emd_dir_readentry (demd, &pos, &entry) != 0)
break;
if (entry.name_len == 0)
continue;
if (inode != pseudo_root && !(entry.flags & UMSDOS_HIDDEN)) {
if (filldir (dirbuf, entry.name, entry.name_len,
cur_f_pos, inode->i_ino) < 0) {
- new_filp.f_pos = cur_f_pos;
+ pos = cur_f_pos;
}
Printk(("umsdos_readdir_x: got %s/%s, ino=%ld\n",
dret->d_parent->d_name.name, dret->d_name.name, inode->i_ino));
* (see comments at the beginning), we put back
* the special offset.
*/
- filp->f_pos = new_filp.f_pos;
+ filp->f_pos = pos;
if (filp->f_pos == 0)
filp->f_pos = start_fpos;
out_dput:
struct dentry *dentry_dst;
char *path, *pt;
int len;
- struct file filp;
+ struct address_space *mapping = hlink->d_inode->i_mapping;
+ struct page *page;
-#ifdef UMSDOS_DEBUG_VERBOSE
-printk("umsdos_solve_hlink: following %s/%s\n",
-hlink->d_parent->d_name.name, hlink->d_name.name);
-#endif
+ page=read_cache_page(mapping,0,(filler_t *)mapping->a_ops->readpage,NULL);
+ dentry_dst=(struct dentry *)page;
+ if (IS_ERR(page))
+ goto out;
+ wait_on_page(page);
+ if (!Page_Uptodate(page))
+ goto async_fail;
- dentry_dst = ERR_PTR (-ENOMEM);
+ dentry_dst = ERR_PTR(-ENOMEM);
path = (char *) kmalloc (PATH_MAX, GFP_KERNEL);
if (path == NULL)
- goto out;
+ goto out_release;
+ memcpy(path, (char*)kmap(page), hlink->d_inode->i_size);
+ kunmap(page);
+ page_cache_release(page);
- fill_new_filp (&filp, hlink);
- filp.f_flags = O_RDONLY;
-
- len = umsdos_file_read_kmem (&filp, path, hlink->d_inode->i_size);
- if (len != hlink->d_inode->i_size)
- goto out_noread;
-#ifdef UMSDOS_DEBUG_VERBOSE
-printk ("umsdos_solve_hlink: %s/%s is path %s\n",
-hlink->d_parent->d_name.name, hlink->d_name.name, path);
-#endif
+ len = hlink->d_inode->i_size;
/* start at root dentry */
dentry_dst = dget(base);
} else
printk(KERN_WARNING
"umsdos_solve_hlink: err=%ld\n", PTR_ERR(dentry_dst));
-
-out_free:
kfree (path);
out:
dput(hlink); /* original hlink no longer needed */
return dentry_dst;
-out_noread:
- printk(KERN_WARNING "umsdos_solve_hlink: failed reading pseudolink!\n");
- goto out_free;
+async_fail:
+ dentry_dst = ERR_PTR(-EIO);
+out_release:
+ page_cache_release(page);
+ goto out;
}
#include <linux/msdos_fs.h>
#include <linux/umsdos_fs.h>
#include <linux/dcache.h>
-
-#include <asm/uaccess.h>
+#include <linux/pagemap.h>
#include <asm/delay.h>
-
-/*
- * Read a file into kernel space memory
- * returns how many bytes read (from fat_file_read)
- */
-
-ssize_t umsdos_file_read_kmem ( struct file *filp,
- char *buf,
- size_t count)
+static void copy_entry(struct umsdos_dirent *p, struct umsdos_dirent *q)
{
- ssize_t ret;
- mm_segment_t old_fs = get_fs ();
-
- set_fs (KERNEL_DS);
- ret = fat_file_read (filp, buf, count, &filp->f_pos);
- set_fs (old_fs);
- return ret;
+ p->name_len = q->name_len;
+ p->flags = q->flags;
+ p->nlink = le16_to_cpu (q->nlink);
+ /* FIXME -- 32bit UID/GID issues */
+ p->uid = le16_to_cpu (q->uid);
+ p->gid = le16_to_cpu (q->gid);
+ p->atime = le32_to_cpu (q->atime);
+ p->mtime = le32_to_cpu (q->mtime);
+ p->ctime = le32_to_cpu (q->ctime);
+ p->rdev = le16_to_cpu (q->rdev);
+ p->mode = le16_to_cpu (q->mode);
}
-
-/*
- * Write to file from kernel space.
- * Does the real job, assumes all structures are initialized!
- */
-
-
-ssize_t umsdos_file_write_kmem_real (struct file * filp,
- const char *buf,
- size_t count)
-{
- mm_segment_t old_fs = get_fs ();
- ssize_t ret;
-
- set_fs (KERNEL_DS);
- ret = fat_file_write (filp, buf, count, &filp->f_pos);
- set_fs (old_fs);
- if (ret < 0) {
- printk(KERN_WARNING "umsdos_file_write: ret=%d\n", ret);
- goto out;
- }
-#ifdef UMSDOS_PARANOIA
-if (ret != count)
-printk(KERN_WARNING "umsdos_file_write: count=%u, ret=%u\n", count, ret);
-#endif
-out:
- return ret;
-}
-
-
-/*
- * Write to a file from kernel space.
- */
-
-ssize_t umsdos_file_write_kmem (struct file *filp,
- const char *buf,
- size_t count)
-{
- ssize_t ret;
-
- ret = umsdos_file_write_kmem_real (filp, buf, count);
- return ret;
-}
-
-
-
-/*
- * Write a block of bytes into one EMD file.
- * The block of data is NOT in user space.
- *
- * Return 0 if OK, a negative error code if not.
- *
- * Note: buffer is in kernel memory, not in user space.
- */
-
-ssize_t umsdos_emd_dir_write ( struct file *filp,
- char *buf,
- size_t count)
-{
- int written;
-
-#ifdef __BIG_ENDIAN
- struct umsdos_dirent *d = (struct umsdos_dirent *) buf;
-
- d->nlink = cpu_to_le16 (d->nlink);
- d->uid = cpu_to_le16 (d->uid);
- d->gid = cpu_to_le16 (d->gid);
- d->atime = cpu_to_le32 (d->atime);
- d->mtime = cpu_to_le32 (d->mtime);
- d->ctime = cpu_to_le32 (d->ctime);
- d->rdev = cpu_to_le16 (d->rdev);
- d->mode = cpu_to_le16 (d->mode);
-#endif
-
- filp->f_flags = 0;
-Printk (("umsdos_emd_dir_write /mn/: calling write_kmem with %p, %p, %d, %Ld\n",
-filp, buf, count, filp->f_pos));
- written = umsdos_file_write_kmem (filp, buf, count);
-
-#ifdef __BIG_ENDIAN
- d->nlink = le16_to_cpu (d->nlink);
- d->uid = le16_to_cpu (d->uid);
- d->gid = le16_to_cpu (d->gid);
- d->atime = le32_to_cpu (d->atime);
- d->mtime = le32_to_cpu (d->mtime);
- d->ctime = le32_to_cpu (d->ctime);
- d->rdev = le16_to_cpu (d->rdev);
- d->mode = le16_to_cpu (d->mode);
-#endif
-
-#ifdef UMSDOS_PARANOIA
-if (written != count)
-printk(KERN_ERR "umsdos_emd_dir_write: ERROR: written (%d) != count (%d)\n",
-written, count);
-#endif
-
- return (written != count) ? -EIO : 0;
-}
-
-
-
-/*
- * Read a block of bytes from one EMD file.
- * The block of data is NOT in user space.
- * Return 0 if OK, -EIO if any error.
- */
-/* buffer in kernel memory, not in user space */
-
-ssize_t umsdos_emd_dir_read (struct file *filp, char *buf, size_t count)
-{
- ssize_t sizeread, ret = 0;
-
-#ifdef __BIG_ENDIAN
- struct umsdos_dirent *d = (struct umsdos_dirent *) buf;
-
-#endif
-
- filp->f_flags = 0;
- sizeread = umsdos_file_read_kmem (filp, buf, count);
- if (sizeread != count) {
- printk (KERN_WARNING
- "UMSDOS: EMD problem, pos=%Ld, count=%d, read=%d\n",
- filp->f_pos, count, sizeread);
- ret = -EIO;
- }
-#ifdef __BIG_ENDIAN
- d->nlink = le16_to_cpu (d->nlink);
- d->uid = le16_to_cpu (d->uid);
- d->gid = le16_to_cpu (d->gid);
- d->atime = le32_to_cpu (d->atime);
- d->mtime = le32_to_cpu (d->mtime);
- d->ctime = le32_to_cpu (d->ctime);
- d->rdev = le16_to_cpu (d->rdev);
- d->mode = le16_to_cpu (d->mode);
-#endif
- return ret;
-}
-
-
/*
* Lookup the EMD dentry for a directory.
*
* does not change {d,i}_count
*/
-int umsdos_emd_dir_readentry (struct file *filp, struct umsdos_dirent *entry)
+int umsdos_emd_dir_readentry (struct dentry *demd, loff_t *pos, struct umsdos_dirent *entry)
{
- int ret;
-
- Printk ((KERN_DEBUG "umsdos_emd_dir_readentry /mn/: entering.\n"));
-
- ret = umsdos_emd_dir_read (filp, (char *) entry, UMSDOS_REC_SIZE);
- if (ret == 0) { /* if no error */
- /* Variable size record. Maybe, we have to read some more */
- int recsize = umsdos_evalrecsize (entry->name_len);
-
- if (recsize > UMSDOS_REC_SIZE) {
-Printk ((KERN_DEBUG "umsdos_emd_dir_readentry /mn/: %d > %d!\n",
-recsize, UMSDOS_REC_SIZE));
- ret = umsdos_emd_dir_read (filp,
- ((char *) entry) + UMSDOS_REC_SIZE,
- recsize - UMSDOS_REC_SIZE);
+ struct address_space *mapping = demd->d_inode->i_mapping;
+ struct page *page;
+ struct umsdos_dirent *p;
+ int offs = *pos & ~PAGE_CACHE_MASK;
+ int recsize;
+
+ page = read_cache_page(mapping, *pos>>PAGE_CACHE_SHIFT,
+ (filler_t*)mapping->a_ops->readpage, NULL);
+ if (IS_ERR(page))
+ goto sync_fail;
+ wait_on_page(page);
+ if (!Page_Uptodate(page))
+ goto async_fail;
+ p = (struct umsdos_dirent*)((char*)kmap(page)+offs);
+ recsize = umsdos_evalrecsize(p->name_len);
+ if (offs + recsize > PAGE_CACHE_SIZE) {
+ struct page *page2;
+ int part = ((char*)page_address(page)+PAGE_CACHE_SIZE)-p->spare;
+ page2 = read_cache_page(mapping, 1+(*pos>>PAGE_CACHE_SHIFT),
+ (filler_t*)mapping->a_ops->readpage, NULL);
+ if (IS_ERR(page2)) {
+ kunmap(page);
+ page_cache_release(page);
+ page = page2;
+ goto sync_fail;
}
- }
- Printk (("umsdos_emd_dir_readentry /mn/: ret=%d.\n", ret));
- if (entry && ret == 0) {
-Printk (("umsdos_emd_dir_readentry /mn/: returning len=%d,name=%.*s\n",
-(int) entry->name_len, (int) entry->name_len, entry->name));
- }
- return ret;
+ wait_on_page(page2);
+ if (!Page_Uptodate(page2)) {
+ kunmap(page);
+ page_cache_release(page2);
+ goto async_fail;
+ }
+ memcpy(entry->spare,p->spare,part);
+ memcpy(entry->spare+part,(char*)kmap(page2),
+ recsize+offs-PAGE_CACHE_SIZE);
+ kunmap(page2);
+ page_cache_release(page2);
+ } else
+ memcpy(entry->spare,p->spare,((char*)p+recsize)-p->spare);
+ copy_entry(entry, p);
+ kunmap(page);
+ page_cache_release(page);
+ *pos += recsize;
+ return 0;
+async_fail:
+ page_cache_release(page);
+ page = ERR_PTR(-EIO);
+sync_fail:
+ return PTR_ERR(page);
}
-
/*
* Write an entry in the EMD file.
* Return 0 if OK, -EIO if some error.
struct umsdos_dirent *entry = &info->entry;
struct dentry *emd_dentry;
int ret;
- struct umsdos_dirent entry0;
- struct file filp;
+ struct umsdos_dirent entry0,*p;
+ struct address_space *mapping;
+ struct page *page, *page2 = NULL;
+ int offs;
emd_dentry = umsdos_get_emd_dentry(parent);
ret = PTR_ERR(emd_dentry);
memset (entry->spare, 0, sizeof (entry->spare));
}
- fill_new_filp (&filp, emd_dentry);
- filp.f_pos = info->f_pos;
- filp.f_reada = 0;
- filp.f_flags = O_RDWR;
-
/* write the entry and update the parent timestamps */
- ret = umsdos_emd_dir_write (&filp, (char *) entry, info->recsize);
- if (!ret) {
- dir->i_ctime = dir->i_mtime = CURRENT_TIME;
- mark_inode_dirty(dir);
- } else
- printk ("UMSDOS: problem with EMD file: can't write\n");
+ mapping = emd_dentry->d_inode->i_mapping;
+ offs = info->f_pos & ~PAGE_CACHE_MASK;
+ ret = -ENOMEM;
+ page = grab_cache_page(mapping, info->f_pos>>PAGE_CACHE_SHIFT);
+ if (!page)
+ goto out_dput;
+ p = (struct umsdos_dirent*)((char*)page_address(page)+offs);
+ if (offs + info->recsize > PAGE_CACHE_SIZE) {
+ ret = mapping->a_ops->prepare_write(NULL,page,offs,
+ PAGE_CACHE_SIZE);
+ if (ret)
+ goto out_unlock;
+ page2 = grab_cache_page(mapping,
+ (info->f_pos>>PAGE_CACHE_SHIFT)+1);
+ if (!page2)
+ goto out_unlock2;
+ ret = mapping->a_ops->prepare_write(NULL,page2,0,
+ offs+info->recsize-PAGE_CACHE_SIZE);
+ if (ret)
+ goto out_unlock3;
+ p->name_len = entry->name_len;
+ p->flags = entry->flags;
+ p->nlink = cpu_to_le16(entry->nlink);
+ p->uid = cpu_to_le16(entry->uid);
+ p->gid = cpu_to_le16(entry->gid);
+ p->atime = cpu_to_le32(entry->atime);
+ p->mtime = cpu_to_le32(entry->mtime);
+ p->ctime = cpu_to_le32(entry->ctime);
+ p->rdev = cpu_to_le16(entry->rdev);
+ p->mode = cpu_to_le16(entry->mode);
+ memcpy(p->name,entry->name,
+ ((char*)page_address(page)+PAGE_CACHE_SIZE)-p->spare);
+ memcpy((char*)page_address(page2),
+ entry->spare+PAGE_CACHE_SIZE-offs,
+ offs+info->recsize-PAGE_CACHE_SIZE);
+ ret = mapping->a_ops->commit_write(NULL,page2,0,
+ offs+info->recsize-PAGE_CACHE_SIZE);
+ if (ret)
+ goto out_unlock3;
+ ret = mapping->a_ops->commit_write(NULL,page,offs,
+ PAGE_CACHE_SIZE);
+ UnlockPage(page2);
+ page_cache_release(page2);
+ if (ret)
+ goto out_unlock;
+ } else {
+ ret = mapping->a_ops->prepare_write(NULL,page,offs,
+ info->recsize);
+ if (ret)
+ goto out_unlock;
+ p->name_len = entry->name_len;
+ p->flags = entry->flags;
+ p->nlink = cpu_to_le16(entry->nlink);
+ p->uid = cpu_to_le16(entry->uid);
+ p->gid = cpu_to_le16(entry->gid);
+ p->atime = cpu_to_le32(entry->atime);
+ p->mtime = cpu_to_le32(entry->mtime);
+ p->ctime = cpu_to_le32(entry->ctime);
+ p->rdev = cpu_to_le16(entry->rdev);
+ p->mode = cpu_to_le16(entry->mode);
+ memcpy(p->spare,entry->spare,((char*)p+info->recsize)-p->spare);
+ ret = mapping->a_ops->commit_write(NULL,page,offs,
+ info->recsize);
+ if (ret)
+ goto out_unlock;
+ }
+ UnlockPage(page);
+ page_cache_release(page);
+
+ dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+ mark_inode_dirty(dir);
out_dput:
dput(emd_dentry);
out:
Printk (("umsdos_writeentry /mn/: returning %d...\n", ret));
return ret;
+out_unlock3:
+ UnlockPage(page2);
+ page_cache_release(page2);
+out_unlock2:
+ ClearPageUptodate(page);
+ kunmap(page);
+out_unlock:
+ UnlockPage(page);
+ page_cache_release(page);
+ printk ("UMSDOS: problem with EMD file: can't write\n");
+ goto out_dput;
}
-
-
-#define CHUNK_SIZE (8*UMSDOS_REC_SIZE)
-struct find_buffer {
- char buffer[CHUNK_SIZE];
- int pos; /* read offset in buffer */
- int size; /* Current size of buffer */
- struct file filp;
-};
-
-
-
-/*
- * Fill the read buffer and take care of the bytes remaining inside.
- * Unread bytes are simply moved to the beginning.
- *
- * Return -ENOENT if EOF, 0 if OK, a negative error code if any problem.
- *
- * Note: the caller must hold a lock on the parent directory.
- */
-
-static int umsdos_fillbuf (struct find_buffer *buf)
-{
- struct inode *inode = buf->filp.f_dentry->d_inode;
- int mustmove = buf->size - buf->pos;
- int mustread, remain;
- int ret = -ENOENT;
-
- if (mustmove > 0) {
- memcpy (buf->buffer, buf->buffer + buf->pos, mustmove);
- }
- buf->pos = 0;
- mustread = CHUNK_SIZE - mustmove;
- remain = inode->i_size - buf->filp.f_pos;
- if (remain < mustread)
- mustread = remain;
- if (mustread > 0) {
- ret = umsdos_emd_dir_read (&buf->filp, buf->buffer + mustmove,
- mustread);
- if (ret == 0)
- buf->size = mustmove + mustread;
- } else if (mustmove) {
- buf->size = mustmove;
- ret = 0;
- }
- return ret;
-}
-
-
-
/*
* General search, locate a name in the EMD file or an empty slot to
* store it. if info->entry.name_len == 0, search the first empty
* record, multiple contiguous records are allocated.
*/
-static int umsdos_find (struct dentry *parent, struct umsdos_info *info)
+static int umsdos_find (struct dentry *demd, struct umsdos_info *info)
{
struct umsdos_dirent *entry = &info->entry;
int recsize = info->recsize;
- struct dentry *demd;
struct inode *emd_dir;
int ret = -ENOENT;
- struct find_buffer buf;
struct {
off_t posok; /* Position available to store the entry */
- int found; /* A valid empty position has been found. */
off_t one; /* One empty position -> maybe <- large enough */
- int onesize; /* size of empty region starting at one */
} empty;
+ int found = 0;
+ int empty_size = 0;
+ struct address_space *mapping;
+ filler_t *readpage;
+ struct page *page = NULL;
+ int index = -1;
+ int offs = PAGE_CACHE_SIZE,max_offs = PAGE_CACHE_SIZE;
+ char *p = NULL;
+ loff_t pos = 0;
-Printk (("umsdos_find: locating %s in %s/%s\n",
-entry->name, parent->d_parent->d_name.name, parent->d_name.name));
-
- /*
- * Lookup the EMD file in the parent directory.
- */
- demd = umsdos_get_emd_dentry(parent);
- ret = PTR_ERR(demd);
- if (IS_ERR(demd))
- goto out;
/* make sure there's an EMD file ... */
ret = -ENOENT;
emd_dir = demd->d_inode;
if (!emd_dir)
goto out_dput;
+ mapping = emd_dir->i_mapping;
+ readpage = (filler_t*)mapping->a_ops->readpage;
-Printk(("umsdos_find: found EMD file %s/%s, ino=%p\n",
-demd->d_parent->d_name.name, demd->d_name.name, emd_dir));
-
- fill_new_filp (&buf.filp, demd);
-
- buf.pos = 0;
- buf.size = 0;
-
- empty.found = 0;
empty.posok = emd_dir->i_size;
- empty.onesize = 0;
while (1) {
- struct umsdos_dirent *rentry = (struct umsdos_dirent *)
- (buf.buffer + buf.pos);
- int file_pos = buf.filp.f_pos - buf.size + buf.pos;
-
- if (buf.pos == buf.size) {
- ret = umsdos_fillbuf (&buf);
- if (ret < 0) {
- /* Not found, so note where it can be added */
+ struct umsdos_dirent *rentry;
+ int entry_size;
+
+ if (offs >= max_offs) {
+ if (page) {
+ kunmap(page);
+ page_cache_release(page);
+ }
+ if (pos >= emd_dir->i_size) {
info->f_pos = empty.posok;
break;
}
- } else if (rentry->name_len == 0) {
+ if (++index == (emd_dir->i_size>>PAGE_CACHE_SHIFT))
+ max_offs = emd_dir->i_size & ~PAGE_CACHE_MASK;
+ offs -= PAGE_CACHE_SIZE;
+ page = read_cache_page(mapping,index,readpage,NULL);
+ if (IS_ERR(page))
+ goto sync_fail;
+ wait_on_page(page);
+ if (!Page_Uptodate(page))
+ goto async_fail;
+ p = (char*)kmap(page);
+ }
+
+ rentry = (struct umsdos_dirent *)(p+offs);
+
+ if (rentry->name_len == 0) {
/* We are looking for an empty section at least */
/* as large as recsize. */
if (entry->name_len == 0) {
- info->f_pos = file_pos;
+ info->f_pos = pos;
ret = 0;
break;
- } else if (!empty.found) {
- if (empty.onesize == 0) {
- /* This is the first empty record of a section. */
- empty.one = file_pos;
- }
- /* grow the empty section */
- empty.onesize += UMSDOS_REC_SIZE;
- if (empty.onesize == recsize) {
- /* Here is a large enough section. */
- empty.posok = empty.one;
- empty.found = 1;
- }
}
- buf.pos += UMSDOS_REC_SIZE;
- } else {
- int entry_size = umsdos_evalrecsize (rentry->name_len);
-
- if (buf.pos + entry_size > buf.size) {
- ret = umsdos_fillbuf (&buf);
- if (ret < 0) {
- /* Not found, so note where it can be added */
- info->f_pos = empty.posok;
- break;
- }
- } else {
- empty.onesize = 0; /* Reset the free slot search. */
- if (entry->name_len == rentry->name_len
- && memcmp (entry->name, rentry->name, rentry->name_len) == 0) {
- info->f_pos = file_pos;
- *entry = *rentry;
- ret = 0;
- break;
- } else {
- buf.pos += entry_size;
- }
+ offs += UMSDOS_REC_SIZE;
+ pos += UMSDOS_REC_SIZE;
+ if (found)
+ continue;
+ if (!empty_size)
+ empty.one = pos-UMSDOS_REC_SIZE;
+ empty_size += UMSDOS_REC_SIZE;
+ if (empty_size == recsize) {
+ /* Here is a large enough section. */
+ empty.posok = empty.one;
+ found = 1;
}
+ continue;
}
+
+ entry_size = umsdos_evalrecsize(rentry->name_len);
+ if (entry_size > PAGE_CACHE_SIZE)
+ goto async_fail;
+ empty_size = 0;
+ if (entry->name_len != rentry->name_len)
+ goto skip_it;
+
+ if (entry_size + offs > PAGE_CACHE_SIZE) {
+ /* Sucker spans the page boundary */
+ int len = (p+PAGE_CACHE_SIZE)-rentry->name;
+ struct page *next_page;
+ char *q;
+ next_page = read_cache_page(mapping,index+1,readpage,NULL);
+ if (IS_ERR(next_page)) {
+ page_cache_release(page);
+ page = next_page;
+ goto sync_fail;
+ }
+ wait_on_page(next_page);
+ if (!Page_Uptodate(next_page)) {
+ page_cache_release(page);
+ page = next_page;
+ goto async_fail;
+ }
+ q = (char*)kmap(next_page);
+ if (memcmp(entry->name, rentry->name, len) ||
+ memcmp(entry->name+len, q, entry->name_len-len)) {
+ kunmap(next_page);
+ page_cache_release(next_page);
+ goto skip_it;
+ }
+ kunmap(next_page);
+ page_cache_release(next_page);
+ } else if (memcmp (entry->name, rentry->name, entry->name_len))
+ goto skip_it;
+
+ info->f_pos = pos;
+ copy_entry(entry, rentry);
+ ret = 0;
+ break;
+skip_it:
+ offs+=entry_size;
+ pos+=entry_size;
+ }
+ if (page) {
+ kunmap(page);
+ page_cache_release(page);
}
-Printk(("umsdos_find: ready to mangle %s, len=%d, pos=%ld\n",
-entry->name, entry->name_len, (long)info->f_pos));
umsdos_manglename (info);
out_dput:
dput(demd);
-
-out:
- Printk (("umsdos_find: returning %d\n", ret));
return ret;
+
+async_fail:
+ page_cache_release(page);
+ page = ERR_PTR(-EIO);
+sync_fail:
+ return PTR_ERR(page);
}
int umsdos_newentry (struct dentry *parent, struct umsdos_info *info)
{
int err, ret = -EEXIST;
+ struct dentry *demd = umsdos_get_emd_dentry(parent);
- err = umsdos_find (parent, info);
+ ret = PTR_ERR(demd);
+ if (IS_ERR(ret))
+ goto out;
+ err = umsdos_find (demd, info);
if (err && err == -ENOENT) {
ret = umsdos_writeentry (parent, info, 0);
Printk (("umsdos_writeentry EMD ret = %d\n", ret));
}
+out:
return ret;
}
int umsdos_newhidden (struct dentry *parent, struct umsdos_info *info)
{
int ret;
+ struct dentry *demd = umsdos_get_emd_dentry(parent);
+ ret = PTR_ERR(demd);
+ if (IS_ERR(ret))
+ goto out;
umsdos_parse ("..LINK", 6, info);
info->entry.name_len = 0;
- ret = umsdos_find (parent, info);
+ ret = umsdos_find (demd, info);
if (ret == -ENOENT || ret == 0) {
info->entry.name_len = sprintf (info->entry.name,
"..LINK%ld", info->f_pos);
ret = 0;
}
+out:
return ret;
}
int umsdos_delentry (struct dentry *parent, struct umsdos_info *info, int isdir)
{
int ret;
+ struct dentry *demd = umsdos_get_emd_dentry(parent);
- ret = umsdos_find (parent, info);
+ ret = PTR_ERR(demd);
+ if (IS_ERR(ret))
+ goto out;
+ ret = umsdos_find (demd, info);
if (ret)
goto out;
if (info->entry.name_len == 0)
{
struct dentry *demd;
int ret = 2;
- struct file filp;
+ loff_t pos = 0;
demd = umsdos_get_emd_dentry(dentry);
if (IS_ERR(demd))
if (!demd->d_inode)
goto out_dput;
- fill_new_filp (&filp, demd);
- filp.f_flags = O_RDONLY;
-
ret = 1;
- while (filp.f_pos < demd->d_inode->i_size) {
+ while (pos < demd->d_inode->i_size) {
struct umsdos_dirent entry;
- if (umsdos_emd_dir_readentry (&filp, &entry) != 0) {
+ if (umsdos_emd_dir_readentry (demd, &pos, &entry) != 0) {
ret = 0;
break;
}
out_dput:
dput(demd);
out:
-Printk(("umsdos_isempty: checked %s/%s, empty=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, ret));
-
return ret;
}
int expect)
{
int ret;
+ struct dentry *demd = umsdos_get_emd_dentry(parent);
- ret = umsdos_find (parent, info);
+ ret = PTR_ERR(demd);
+ if (IS_ERR(ret))
+ goto out;
+ ret = umsdos_find (demd, info);
if (ret)
goto out;
#include <linux/stat.h>
#include <linux/umsdos_fs.h>
#include <linux/list.h>
+#include <linux/pagemap.h>
extern struct dentry_operations umsdos_dentry_operations;
static struct dentry *check_pseudo_root(struct super_block *);
-/*
- * Initialize a private filp
- */
-void fill_new_filp (struct file *filp, struct dentry *dentry)
-{
- if (!dentry)
- printk(KERN_ERR "fill_new_filp: NULL dentry!\n");
-
- memset (filp, 0, sizeof (struct file));
- filp->f_reada = 1;
- filp->f_flags = O_RDWR;
- filp->f_dentry = dentry;
- filp->f_op = dentry->d_inode->i_fop;
-}
-
-
-
void UMSDOS_put_inode (struct inode *inode)
{
PRINTK ((KERN_DEBUG
{
struct inode *inode = dentry->d_inode;
struct dentry *demd;
+ struct address_space *mapping;
+ struct page *page;
int ret = 0;
- struct file filp;
- struct umsdos_dirent entry;
+ struct umsdos_dirent *entry;
+ int offs;
Printk(("UMSDOS_notify_change: entering for %s/%s (%d)\n",
dentry->d_parent->d_name.name, dentry->d_name.name, inode->u.umsdos_i.i_patched));
* See emd.c
*/
- fill_new_filp (&filp, demd);
- filp.f_pos = inode->u.umsdos_i.pos;
-Printk(("UMSDOS_notify_change: %s/%s reading at %d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, (int) filp.f_pos));
-
/* Read only the start of the entry since we don't touch the name */
- ret = umsdos_emd_dir_read (&filp, (char *) &entry, UMSDOS_REC_SIZE);
- if (ret) {
- printk(KERN_WARNING
- "umsdos_notify_change: %s/%s EMD read error, ret=%d\n",
- dentry->d_parent->d_name.name, dentry->d_name.name,ret);
+ mapping = demd->d_inode->i_mapping;
+ offs = inode->u.umsdos_i.pos & ~PAGE_CACHE_MASK;
+ ret = -ENOMEM;
+ page=grab_cache_page(mapping,inode->u.umsdos_i.pos>>PAGE_CACHE_SHIFT);
+ if (!page)
goto out_dput;
- }
+ ret=mapping->a_ops->prepare_write(NULL,page,offs,offs+UMSDOS_REC_SIZE);
+ if (ret)
+ goto out_unlock;
+ entry = (struct umsdos_dirent*)((char*)page_address(page)+offs);
if (attr->ia_valid & ATTR_UID)
- entry.uid = attr->ia_uid;
+ entry->uid = cpu_to_le16(attr->ia_uid);
if (attr->ia_valid & ATTR_GID)
- entry.gid = attr->ia_gid;
+ entry->gid = cpu_to_le16(attr->ia_gid);
if (attr->ia_valid & ATTR_MODE)
- entry.mode = attr->ia_mode;
+ entry->mode = cpu_to_le16(attr->ia_mode);
if (attr->ia_valid & ATTR_ATIME)
- entry.atime = attr->ia_atime;
+ entry->atime = cpu_to_le32(attr->ia_atime);
if (attr->ia_valid & ATTR_MTIME)
- entry.mtime = attr->ia_mtime;
+ entry->mtime = cpu_to_le32(attr->ia_mtime);
if (attr->ia_valid & ATTR_CTIME)
- entry.ctime = attr->ia_ctime;
-
- entry.nlink = inode->i_nlink;
- filp.f_pos = inode->u.umsdos_i.pos;
- ret = umsdos_emd_dir_write (&filp, (char *) &entry, UMSDOS_REC_SIZE);
+ entry->ctime = cpu_to_le32(attr->ia_ctime);
+ entry->nlink = cpu_to_le16(inode->i_nlink);
+ ret=mapping->a_ops->commit_write(NULL,page,offs,offs+UMSDOS_REC_SIZE);
if (ret)
printk(KERN_WARNING
"umsdos_notify_change: %s/%s EMD write error, ret=%d\n",
dentry->d_parent->d_name.name, dentry->d_name.name,ret);
- Printk (("notify pos %lu ret %d nlink %d ",
- inode->u.umsdos_i.pos, ret, entry.nlink));
/* #Specification: notify_change / msdos fs
* notify_change operation are done only on the
* EMD file. The msdos fs is not even called.
*/
-#ifdef UMSDOS_DEBUG_VERBOSE
-if (entry.flags & UMSDOS_HIDDEN)
-printk("umsdos_notify_change: %s/%s hidden, nlink=%d, ret=%d\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, entry.nlink, ret);
-#endif
-
+out_unlock:
+ UnlockPage(page);
+ page_cache_release(page);
out_dput:
dput(demd);
out:
struct dentry *dentry = filp->f_dentry;
struct umsdos_ioctl *idata = (struct umsdos_ioctl *) data_ptr;
int ret;
- struct file new_filp;
struct umsdos_ioctl data;
Printk(("UMSDOS_ioctl_dir: %s/%s, cmd=%d, data=%08lx\n",
* Return > 0 if success.
*/
struct dentry *demd;
+ loff_t pos = filp->f_pos;
/* The absence of the EMD is simply seen as an EOF */
demd = umsdos_get_emd_dentry(dentry);
if (!demd->d_inode)
goto read_dput;
- fill_new_filp(&new_filp, demd);
- new_filp.f_pos = filp->f_pos;
- while (new_filp.f_pos < demd->d_inode->i_size) {
- off_t f_pos = new_filp.f_pos;
+ while (pos < demd->d_inode->i_size) {
+ off_t f_pos = pos;
struct umsdos_dirent entry;
struct umsdos_info info;
- ret = umsdos_emd_dir_readentry (&new_filp, &entry);
+ ret = umsdos_emd_dir_readentry (demd, &pos, &entry);
if (ret)
break;
if (entry.name_len <= 0)
break;
}
/* update the original f_pos */
- filp->f_pos = new_filp.f_pos;
+ filp->f_pos = pos;
read_dput:
d_drop(demd);
dput(demd);
const char *symname, int mode, char flags)
{
int ret, len;
- struct file filp;
-
-Printk(("umsdos_symlink: %s/%s to %s\n",
-dentry->d_parent->d_name.name, dentry->d_name.name, symname));
ret = umsdos_create_any (dir, dentry, mode, 0, flags);
if (ret) {
goto out;
}
- fill_new_filp (&filp, dentry);
len = strlen (symname);
- ret = umsdos_file_write_kmem_real (&filp, symname, len);
+ ret = block_symlink(dentry->d_inode, symname, len);
if (ret < 0)
goto out_unlink;
- if (ret != len)
- goto out_error;
- ret = 0;
out:
return ret;
-out_error:
- ret = -EIO;
out_unlink:
printk(KERN_WARNING "umsdos_symlink: write failed, unlinking\n");
UMSDOS_unlink (dir, dentry);
#define ext2_find_next_zero_bit find_next_zero_bit
/* Bitmap functions for the minix filesystem. */
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
#define ext2_find_next_zero_bit find_next_zero_bit
/* Bitmap functions for the minix filesystem. */
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
#define ext2_find_next_zero_bit find_next_zero_bit
/* Bitmap functions for the minix filesystem. */
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
"=b" (*ebx),
"=c" (*ecx),
"=d" (*edx)
- : "a" (op)
- : "cc");
+ : "a" (op));
}
#define ext2_find_next_zero_bit find_next_zero_bit
/* Bitmap functions for the minix filesystem. */
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
}
extern __inline__ int
-minix_set_bit (int nr, void *vaddr)
+minix_test_and_set_bit (int nr, void *vaddr)
{
char retval;
return retval;
}
+#define minix_set_bit(nr,addr) ((void)minix_test_and_set_bit(nr,addr))
+
extern __inline__ int
-minix_clear_bit (int nr, void *vaddr)
+minix_test_and_clear_bit (int nr, void *vaddr)
{
char retval;
* FIXME: These assume that Minix uses the native byte/bitorder.
* This limits the Minix filesystem's value for data exchange very much.
*/
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
* FIXME: These assume that Minix uses the native byte/bitorder.
* This limits the Minix filesystem's value for data exchange very much.
*/
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
}
/* Bitmap functions for the minix filesystem. */
-#define minix_set_bit(nr,addr) ext2_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) ext2_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) ext2_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) ((void)ext2_set_bit(nr,addr))
+#define minix_test_and_clear_bit(nr,addr) ext2_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) ext2_test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size)
/* Bitmap functions for the minix filesystem. */
/* FIXME !!! */
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
#endif
/* Bitmap functions for the minix filesystem. */
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
#define AOFF_task_it_virt_incr 0x000000cc
#define ASIZ_task_it_virt_incr 0x00000004
#define AOFF_task_real_timer 0x000000d0
-#define ASIZ_task_real_timer 0x00000018
-#define AOFF_task_times 0x000000e8
+#define ASIZ_task_real_timer 0x00000014
+#define AOFF_task_times 0x000000e4
#define ASIZ_task_times 0x00000010
-#define AOFF_task_start_time 0x000000f8
+#define AOFF_task_start_time 0x000000f4
#define ASIZ_task_start_time 0x00000004
-#define AOFF_task_per_cpu_utime 0x000000fc
+#define AOFF_task_per_cpu_utime 0x000000f8
#define ASIZ_task_per_cpu_utime 0x00000004
-#define AOFF_task_min_flt 0x00000104
+#define AOFF_task_min_flt 0x00000100
#define ASIZ_task_min_flt 0x00000004
-#define AOFF_task_maj_flt 0x00000108
+#define AOFF_task_maj_flt 0x00000104
#define ASIZ_task_maj_flt 0x00000004
-#define AOFF_task_nswap 0x0000010c
+#define AOFF_task_nswap 0x00000108
#define ASIZ_task_nswap 0x00000004
-#define AOFF_task_cmin_flt 0x00000110
+#define AOFF_task_cmin_flt 0x0000010c
#define ASIZ_task_cmin_flt 0x00000004
-#define AOFF_task_cmaj_flt 0x00000114
+#define AOFF_task_cmaj_flt 0x00000110
#define ASIZ_task_cmaj_flt 0x00000004
-#define AOFF_task_cnswap 0x00000118
+#define AOFF_task_cnswap 0x00000114
#define ASIZ_task_cnswap 0x00000004
-#define AOFF_task_uid 0x00000120
+#define AOFF_task_uid 0x0000011c
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x00000124
+#define AOFF_task_euid 0x00000120
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x00000128
+#define AOFF_task_suid 0x00000124
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x0000012c
+#define AOFF_task_fsuid 0x00000128
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x00000130
+#define AOFF_task_gid 0x0000012c
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x00000134
+#define AOFF_task_egid 0x00000130
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x00000138
+#define AOFF_task_sgid 0x00000134
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x0000013c
+#define AOFF_task_fsgid 0x00000138
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x00000140
+#define AOFF_task_ngroups 0x0000013c
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000144
+#define AOFF_task_groups 0x00000140
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x000001c4
+#define AOFF_task_cap_effective 0x000001c0
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x000001c8
+#define AOFF_task_cap_inheritable 0x000001c4
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x000001cc
+#define AOFF_task_cap_permitted 0x000001c8
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x000001d4
+#define AOFF_task_user 0x000001d0
#define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x000001d8
+#define AOFF_task_rlim 0x000001d4
#define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math 0x00000228
+#define AOFF_task_used_math 0x00000224
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000022a
+#define AOFF_task_comm 0x00000226
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000023c
+#define AOFF_task_link_count 0x00000238
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000240
+#define AOFF_task_tty 0x0000023c
#define ASIZ_task_tty 0x00000004
-#define AOFF_task_semundo 0x00000244
+#define AOFF_task_semundo 0x00000240
#define ASIZ_task_semundo 0x00000004
-#define AOFF_task_semsleeping 0x00000248
+#define AOFF_task_semsleeping 0x00000244
#define ASIZ_task_semsleeping 0x00000004
-#define AOFF_task_thread 0x00000250
+#define AOFF_task_thread 0x00000248
#define ASIZ_task_thread 0x00000380
-#define AOFF_task_fs 0x000005d0
+#define AOFF_task_fs 0x000005c8
#define ASIZ_task_fs 0x00000004
-#define AOFF_task_files 0x000005d4
+#define AOFF_task_files 0x000005cc
#define ASIZ_task_files 0x00000004
-#define AOFF_task_sigmask_lock 0x000005d8
+#define AOFF_task_sigmask_lock 0x000005d0
#define ASIZ_task_sigmask_lock 0x00000004
-#define AOFF_task_sig 0x000005dc
+#define AOFF_task_sig 0x000005d4
#define ASIZ_task_sig 0x00000004
-#define AOFF_task_signal 0x000005e0
+#define AOFF_task_signal 0x000005d8
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x000005e8
+#define AOFF_task_blocked 0x000005e0
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x000005f0
+#define AOFF_task_sigqueue 0x000005e8
#define ASIZ_task_sigqueue 0x00000004
-#define AOFF_task_sigqueue_tail 0x000005f4
+#define AOFF_task_sigqueue_tail 0x000005ec
#define ASIZ_task_sigqueue_tail 0x00000004
-#define AOFF_task_sas_ss_sp 0x000005f8
+#define AOFF_task_sas_ss_sp 0x000005f0
#define ASIZ_task_sas_ss_sp 0x00000004
-#define AOFF_task_sas_ss_size 0x000005fc
+#define AOFF_task_sas_ss_size 0x000005f4
#define ASIZ_task_sas_ss_size 0x00000004
-#define AOFF_task_parent_exec_id 0x00000600
+#define AOFF_task_parent_exec_id 0x000005f8
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x00000604
+#define AOFF_task_self_exec_id 0x000005fc
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_alloc_lock 0x00000608
+#define AOFF_task_alloc_lock 0x00000600
#define ASIZ_task_alloc_lock 0x00000004
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000004
#define AOFF_task_it_virt_incr 0x000000d0
#define ASIZ_task_it_virt_incr 0x00000004
#define AOFF_task_real_timer 0x000000d4
-#define ASIZ_task_real_timer 0x00000018
-#define AOFF_task_times 0x000000ec
+#define ASIZ_task_real_timer 0x00000014
+#define AOFF_task_times 0x000000e8
#define ASIZ_task_times 0x00000010
-#define AOFF_task_start_time 0x000000fc
+#define AOFF_task_start_time 0x000000f8
#define ASIZ_task_start_time 0x00000004
-#define AOFF_task_per_cpu_utime 0x00000100
+#define AOFF_task_per_cpu_utime 0x000000fc
#define ASIZ_task_per_cpu_utime 0x00000080
-#define AOFF_task_min_flt 0x00000200
+#define AOFF_task_min_flt 0x000001fc
#define ASIZ_task_min_flt 0x00000004
-#define AOFF_task_maj_flt 0x00000204
+#define AOFF_task_maj_flt 0x00000200
#define ASIZ_task_maj_flt 0x00000004
-#define AOFF_task_nswap 0x00000208
+#define AOFF_task_nswap 0x00000204
#define ASIZ_task_nswap 0x00000004
-#define AOFF_task_cmin_flt 0x0000020c
+#define AOFF_task_cmin_flt 0x00000208
#define ASIZ_task_cmin_flt 0x00000004
-#define AOFF_task_cmaj_flt 0x00000210
+#define AOFF_task_cmaj_flt 0x0000020c
#define ASIZ_task_cmaj_flt 0x00000004
-#define AOFF_task_cnswap 0x00000214
+#define AOFF_task_cnswap 0x00000210
#define ASIZ_task_cnswap 0x00000004
-#define AOFF_task_uid 0x0000021c
+#define AOFF_task_uid 0x00000218
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x00000220
+#define AOFF_task_euid 0x0000021c
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x00000224
+#define AOFF_task_suid 0x00000220
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x00000228
+#define AOFF_task_fsuid 0x00000224
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x0000022c
+#define AOFF_task_gid 0x00000228
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x00000230
+#define AOFF_task_egid 0x0000022c
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x00000234
+#define AOFF_task_sgid 0x00000230
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x00000238
+#define AOFF_task_fsgid 0x00000234
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x0000023c
+#define AOFF_task_ngroups 0x00000238
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000240
+#define AOFF_task_groups 0x0000023c
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x000002c0
+#define AOFF_task_cap_effective 0x000002bc
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x000002c4
+#define AOFF_task_cap_inheritable 0x000002c0
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x000002c8
+#define AOFF_task_cap_permitted 0x000002c4
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x000002d0
+#define AOFF_task_user 0x000002cc
#define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x000002d4
+#define AOFF_task_rlim 0x000002d0
#define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math 0x00000324
+#define AOFF_task_used_math 0x00000320
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x00000326
+#define AOFF_task_comm 0x00000322
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x00000338
+#define AOFF_task_link_count 0x00000334
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x0000033c
+#define AOFF_task_tty 0x00000338
#define ASIZ_task_tty 0x00000004
-#define AOFF_task_semundo 0x00000340
+#define AOFF_task_semundo 0x0000033c
#define ASIZ_task_semundo 0x00000004
-#define AOFF_task_semsleeping 0x00000344
+#define AOFF_task_semsleeping 0x00000340
#define ASIZ_task_semsleeping 0x00000004
#define AOFF_task_thread 0x00000348
#define ASIZ_task_thread 0x00000380
-/* $Id: bitops.h,v 1.56 2000/05/09 17:40:15 davem Exp $
+/* $Id: bitops.h,v 1.57 2000/06/30 10:18:39 davem Exp $
* bitops.h: Bit string operations on the Sparc.
*
* Copyright 1995 David S. Miller (davem@caip.rutgers.edu)
#define ext2_find_next_zero_bit find_next_zero_le_bit
/* Bitmap functions for the minix filesystem. */
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
-/* $Id: fcntl.h,v 1.12 1999/12/27 06:37:11 anton Exp $ */
+/* $Id: fcntl.h,v 1.13 2000/07/06 01:41:45 davem Exp $ */
#ifndef _SPARC_FCNTL_H
#define _SPARC_FCNTL_H
#include <linux/threads.h>
#ifndef CONFIG_SMP
-extern unsigned int local_irq_count;
+extern unsigned int __local_irq_count;
+#define local_irq_count(cpu) __local_irq_count
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
*/
-#define in_interrupt() ((local_irq_count + local_bh_count) != 0)
+#define in_interrupt() ((__local_irq_count + __local_bh_count) != 0)
-#define hardirq_trylock(cpu) ((void)(cpu), local_irq_count == 0)
+#define hardirq_trylock(cpu) ((void)(cpu), __local_irq_count == 0)
#define hardirq_endlock(cpu) do { (void)(cpu); } while (0)
-#define hardirq_enter(cpu) (local_irq_count++)
-#define hardirq_exit(cpu) (local_irq_count--)
+#define hardirq_enter(cpu) (__local_irq_count++)
+#define hardirq_exit(cpu) (__local_irq_count--)
#define synchronize_irq() barrier()
-#define in_irq() (local_irq_count != 0)
+#define in_irq() (__local_irq_count != 0)
#else
#include <asm/system.h>
#include <asm/smp.h>
-extern unsigned int local_irq_count[NR_CPUS];
+extern unsigned int __local_irq_count[NR_CPUS];
+#define local_irq_count(cpu) __local_irq_count[cpu]
extern unsigned char global_irq_holder;
extern spinlock_t global_irq_lock;
extern atomic_t global_irq_count;
* or hardware interrupt processing?
*/
#define in_interrupt() ({ int __cpu = smp_processor_id(); \
- (local_irq_count[__cpu] + local_bh_count[__cpu] != 0); })
+ (local_irq_count(__cpu) + local_bh_count(__cpu) != 0); })
#define in_irq() ({ int __cpu = smp_processor_id(); \
- (local_irq_count[__cpu] != 0); })
+ (local_irq_count(__cpu) != 0); })
static inline void release_irqlock(int cpu)
{
static inline void hardirq_enter(int cpu)
{
- ++local_irq_count[cpu];
+ ++local_irq_count(cpu);
atomic_inc(&global_irq_count);
}
static inline void hardirq_exit(int cpu)
{
atomic_dec(&global_irq_count);
- --local_irq_count[cpu];
+ --local_irq_count(cpu);
}
static inline int hardirq_trylock(int cpu)
-/* $Id: irq.h,v 1.29 2000/05/09 17:40:15 davem Exp $
+/* $Id: irq.h,v 1.30 2000/06/30 10:18:39 davem Exp $
* irq.h: IRQ registers on the Sparc.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
/* IRQ handler dispatch entry and exit. */
#ifdef CONFIG_SMP
-extern unsigned int local_irq_count[NR_CPUS];
+extern unsigned int __local_irq_count[NR_CPUS];
#define irq_enter(cpu, irq) \
do { hardirq_enter(cpu); \
spin_unlock_wait(&global_irq_lock); \
} while(0)
#define irq_exit(cpu, irq) hardirq_exit(cpu)
#else
-extern unsigned int local_irq_count;
-#define irq_enter(cpu, irq) (local_irq_count++)
-#define irq_exit(cpu, irq) (local_irq_count--)
+extern unsigned int __local_irq_count;
+#define irq_enter(cpu, irq) (__local_irq_count++)
+#define irq_exit(cpu, irq) (__local_irq_count--)
#endif
/* Dave Redman (djhr@tadpole.co.uk)
#ifdef CONFIG_SMP
-extern unsigned int local_bh_count[NR_CPUS];
+extern unsigned int __local_bh_count[NR_CPUS];
+#define local_bh_count(cpu) __local_bh_count[cpu]
-#define local_bh_disable() (local_bh_count[smp_processor_id()]++)
-#define local_bh_enable() (local_bh_count[smp_processor_id()]--)
+#define local_bh_disable() (local_bh_count(smp_processor_id())++)
+#define local_bh_enable() (local_bh_count(smp_processor_id())--)
-#define in_softirq() (local_bh_count[smp_processor_id()] != 0)
+#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
#else
-extern unsigned int local_bh_count;
-#define local_bh_disable() (local_bh_count++)
-#define local_bh_enable() (local_bh_count--)
+extern unsigned int __local_bh_count;
+#define local_bh_count(cpu) __local_bh_count
-#define in_softirq() (local_bh_count != 0)
+#define local_bh_disable() (__local_bh_count++)
+#define local_bh_enable() (__local_bh_count--)
+
+#define in_softirq() (__local_bh_count != 0)
#endif /* SMP */
#define AOFF_task_it_virt_incr 0x00000168
#define ASIZ_task_it_virt_incr 0x00000008
#define AOFF_task_real_timer 0x00000170
-#define ASIZ_task_real_timer 0x00000030
-#define AOFF_task_times 0x000001a0
+#define ASIZ_task_real_timer 0x00000028
+#define AOFF_task_times 0x00000198
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x000001c0
+#define AOFF_task_start_time 0x000001b8
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x000001c8
+#define AOFF_task_per_cpu_utime 0x000001c0
#define ASIZ_task_per_cpu_utime 0x00000008
-#define AOFF_task_min_flt 0x000001d8
+#define AOFF_task_min_flt 0x000001d0
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000001e0
+#define AOFF_task_maj_flt 0x000001d8
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000001e8
+#define AOFF_task_nswap 0x000001e0
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000001f0
+#define AOFF_task_cmin_flt 0x000001e8
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000001f8
+#define AOFF_task_cmaj_flt 0x000001f0
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x00000200
+#define AOFF_task_cnswap 0x000001f8
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x0000020c
+#define AOFF_task_uid 0x00000204
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x00000210
+#define AOFF_task_euid 0x00000208
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x00000214
+#define AOFF_task_suid 0x0000020c
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x00000218
+#define AOFF_task_fsuid 0x00000210
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x0000021c
+#define AOFF_task_gid 0x00000214
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x00000220
+#define AOFF_task_egid 0x00000218
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x00000224
+#define AOFF_task_sgid 0x0000021c
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x00000228
+#define AOFF_task_fsgid 0x00000220
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x0000022c
+#define AOFF_task_ngroups 0x00000224
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000230
+#define AOFF_task_groups 0x00000228
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x000002b0
+#define AOFF_task_cap_effective 0x000002a8
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x000002b4
+#define AOFF_task_cap_inheritable 0x000002ac
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x000002b8
+#define AOFF_task_cap_permitted 0x000002b0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x000002c0
+#define AOFF_task_user 0x000002b8
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x000002c8
+#define AOFF_task_rlim 0x000002c0
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000368
+#define AOFF_task_used_math 0x00000360
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000036a
+#define AOFF_task_comm 0x00000362
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000037c
+#define AOFF_task_link_count 0x00000374
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000380
+#define AOFF_task_tty 0x00000378
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000388
+#define AOFF_task_semundo 0x00000380
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000390
+#define AOFF_task_semsleeping 0x00000388
#define ASIZ_task_semsleeping 0x00000008
-#define AOFF_task_thread 0x000003a0
+#define AOFF_task_thread 0x00000390
#define ASIZ_task_thread 0x00000450
-#define AOFF_task_fs 0x000007f0
+#define AOFF_task_fs 0x000007e0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000007f8
+#define AOFF_task_files 0x000007e8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_sigmask_lock 0x00000800
+#define AOFF_task_sigmask_lock 0x000007f0
#define ASIZ_task_sigmask_lock 0x00000004
-#define AOFF_task_sig 0x00000808
+#define AOFF_task_sig 0x000007f8
#define ASIZ_task_sig 0x00000008
-#define AOFF_task_signal 0x00000810
+#define AOFF_task_signal 0x00000800
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x00000818
+#define AOFF_task_blocked 0x00000808
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000820
+#define AOFF_task_sigqueue 0x00000810
#define ASIZ_task_sigqueue 0x00000008
-#define AOFF_task_sigqueue_tail 0x00000828
+#define AOFF_task_sigqueue_tail 0x00000818
#define ASIZ_task_sigqueue_tail 0x00000008
-#define AOFF_task_sas_ss_sp 0x00000830
+#define AOFF_task_sas_ss_sp 0x00000820
#define ASIZ_task_sas_ss_sp 0x00000008
-#define AOFF_task_sas_ss_size 0x00000838
+#define AOFF_task_sas_ss_size 0x00000828
#define ASIZ_task_sas_ss_size 0x00000008
-#define AOFF_task_parent_exec_id 0x00000840
+#define AOFF_task_parent_exec_id 0x00000830
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x00000844
+#define AOFF_task_self_exec_id 0x00000834
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_alloc_lock 0x00000848
+#define AOFF_task_alloc_lock 0x00000838
#define ASIZ_task_alloc_lock 0x00000004
-#define ASIZ_task 0x00000850
+#define ASIZ_task 0x00000840
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000008
#define AOFF_mm_mmap_avl 0x00000008
#define AOFF_task_it_virt_incr 0x00000168
#define ASIZ_task_it_virt_incr 0x00000008
#define AOFF_task_real_timer 0x00000170
-#define ASIZ_task_real_timer 0x00000030
-#define AOFF_task_times 0x000001a0
+#define ASIZ_task_real_timer 0x00000028
+#define AOFF_task_times 0x00000198
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x000001c0
+#define AOFF_task_start_time 0x000001b8
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x000001c8
+#define AOFF_task_per_cpu_utime 0x000001c0
#define ASIZ_task_per_cpu_utime 0x00000100
-#define AOFF_task_min_flt 0x000003c8
+#define AOFF_task_min_flt 0x000003c0
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000003d0
+#define AOFF_task_maj_flt 0x000003c8
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000003d8
+#define AOFF_task_nswap 0x000003d0
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000003e0
+#define AOFF_task_cmin_flt 0x000003d8
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000003e8
+#define AOFF_task_cmaj_flt 0x000003e0
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000003f0
+#define AOFF_task_cnswap 0x000003e8
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x000003fc
+#define AOFF_task_uid 0x000003f4
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x00000400
+#define AOFF_task_euid 0x000003f8
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x00000404
+#define AOFF_task_suid 0x000003fc
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x00000408
+#define AOFF_task_fsuid 0x00000400
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x0000040c
+#define AOFF_task_gid 0x00000404
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x00000410
+#define AOFF_task_egid 0x00000408
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x00000414
+#define AOFF_task_sgid 0x0000040c
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x00000418
+#define AOFF_task_fsgid 0x00000410
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x0000041c
+#define AOFF_task_ngroups 0x00000414
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000420
+#define AOFF_task_groups 0x00000418
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x000004a0
+#define AOFF_task_cap_effective 0x00000498
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x000004a4
+#define AOFF_task_cap_inheritable 0x0000049c
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x000004a8
+#define AOFF_task_cap_permitted 0x000004a0
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x000004b0
+#define AOFF_task_user 0x000004a8
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x000004b8
+#define AOFF_task_rlim 0x000004b0
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000558
+#define AOFF_task_used_math 0x00000550
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000055a
+#define AOFF_task_comm 0x00000552
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000056c
+#define AOFF_task_link_count 0x00000564
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000570
+#define AOFF_task_tty 0x00000568
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000578
+#define AOFF_task_semundo 0x00000570
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000580
+#define AOFF_task_semsleeping 0x00000578
#define ASIZ_task_semsleeping 0x00000008
-#define AOFF_task_thread 0x00000590
+#define AOFF_task_thread 0x00000580
#define ASIZ_task_thread 0x00000450
-#define AOFF_task_fs 0x000009e0
+#define AOFF_task_fs 0x000009d0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000009e8
+#define AOFF_task_files 0x000009d8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_sigmask_lock 0x000009f0
+#define AOFF_task_sigmask_lock 0x000009e0
#define ASIZ_task_sigmask_lock 0x00000001
-#define AOFF_task_sig 0x000009f8
+#define AOFF_task_sig 0x000009e8
#define ASIZ_task_sig 0x00000008
-#define AOFF_task_signal 0x00000a00
+#define AOFF_task_signal 0x000009f0
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x00000a08
+#define AOFF_task_blocked 0x000009f8
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000a10
+#define AOFF_task_sigqueue 0x00000a00
#define ASIZ_task_sigqueue 0x00000008
-#define AOFF_task_sigqueue_tail 0x00000a18
+#define AOFF_task_sigqueue_tail 0x00000a08
#define ASIZ_task_sigqueue_tail 0x00000008
-#define AOFF_task_sas_ss_sp 0x00000a20
+#define AOFF_task_sas_ss_sp 0x00000a10
#define ASIZ_task_sas_ss_sp 0x00000008
-#define AOFF_task_sas_ss_size 0x00000a28
+#define AOFF_task_sas_ss_size 0x00000a18
#define ASIZ_task_sas_ss_size 0x00000008
-#define AOFF_task_parent_exec_id 0x00000a30
+#define AOFF_task_parent_exec_id 0x00000a20
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x00000a34
+#define AOFF_task_self_exec_id 0x00000a24
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_alloc_lock 0x00000a38
+#define AOFF_task_alloc_lock 0x00000a28
#define ASIZ_task_alloc_lock 0x00000001
-#define ASIZ_task 0x00000a40
+#define ASIZ_task 0x00000a30
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000008
#define AOFF_mm_mmap_avl 0x00000008
#define AOFF_task_it_virt_incr 0x00000170
#define ASIZ_task_it_virt_incr 0x00000008
#define AOFF_task_real_timer 0x00000178
-#define ASIZ_task_real_timer 0x00000030
-#define AOFF_task_times 0x000001a8
+#define ASIZ_task_real_timer 0x00000028
+#define AOFF_task_times 0x000001a0
#define ASIZ_task_times 0x00000020
-#define AOFF_task_start_time 0x000001c8
+#define AOFF_task_start_time 0x000001c0
#define ASIZ_task_start_time 0x00000008
-#define AOFF_task_per_cpu_utime 0x000001d0
+#define AOFF_task_per_cpu_utime 0x000001c8
#define ASIZ_task_per_cpu_utime 0x00000100
-#define AOFF_task_min_flt 0x000003d0
+#define AOFF_task_min_flt 0x000003c8
#define ASIZ_task_min_flt 0x00000008
-#define AOFF_task_maj_flt 0x000003d8
+#define AOFF_task_maj_flt 0x000003d0
#define ASIZ_task_maj_flt 0x00000008
-#define AOFF_task_nswap 0x000003e0
+#define AOFF_task_nswap 0x000003d8
#define ASIZ_task_nswap 0x00000008
-#define AOFF_task_cmin_flt 0x000003e8
+#define AOFF_task_cmin_flt 0x000003e0
#define ASIZ_task_cmin_flt 0x00000008
-#define AOFF_task_cmaj_flt 0x000003f0
+#define AOFF_task_cmaj_flt 0x000003e8
#define ASIZ_task_cmaj_flt 0x00000008
-#define AOFF_task_cnswap 0x000003f8
+#define AOFF_task_cnswap 0x000003f0
#define ASIZ_task_cnswap 0x00000008
-#define AOFF_task_uid 0x00000404
+#define AOFF_task_uid 0x000003fc
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x00000408
+#define AOFF_task_euid 0x00000400
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x0000040c
+#define AOFF_task_suid 0x00000404
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x00000410
+#define AOFF_task_fsuid 0x00000408
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x00000414
+#define AOFF_task_gid 0x0000040c
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x00000418
+#define AOFF_task_egid 0x00000410
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x0000041c
+#define AOFF_task_sgid 0x00000414
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x00000420
+#define AOFF_task_fsgid 0x00000418
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x00000424
+#define AOFF_task_ngroups 0x0000041c
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000428
+#define AOFF_task_groups 0x00000420
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x000004a8
+#define AOFF_task_cap_effective 0x000004a0
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x000004ac
+#define AOFF_task_cap_inheritable 0x000004a4
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x000004b0
+#define AOFF_task_cap_permitted 0x000004a8
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x000004b8
+#define AOFF_task_user 0x000004b0
#define ASIZ_task_user 0x00000008
-#define AOFF_task_rlim 0x000004c0
+#define AOFF_task_rlim 0x000004b8
#define ASIZ_task_rlim 0x000000a0
-#define AOFF_task_used_math 0x00000560
+#define AOFF_task_used_math 0x00000558
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x00000562
+#define AOFF_task_comm 0x0000055a
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x00000574
+#define AOFF_task_link_count 0x0000056c
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000578
+#define AOFF_task_tty 0x00000570
#define ASIZ_task_tty 0x00000008
-#define AOFF_task_semundo 0x00000580
+#define AOFF_task_semundo 0x00000578
#define ASIZ_task_semundo 0x00000008
-#define AOFF_task_semsleeping 0x00000588
+#define AOFF_task_semsleeping 0x00000580
#define ASIZ_task_semsleeping 0x00000008
#define AOFF_task_thread 0x00000590
#define ASIZ_task_thread 0x00000450
-/* $Id: bitops.h,v 1.28 2000/03/27 10:38:56 davem Exp $
+/* $Id: bitops.h,v 1.29 2000/06/30 10:18:39 davem Exp $
* bitops.h: Bit string operations on the V9.
*
* Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
#include <asm/byteorder.h>
-extern long __test_and_set_bit(unsigned long nr, void *addr);
-extern long __test_and_clear_bit(unsigned long nr, void *addr);
-extern long __test_and_change_bit(unsigned long nr, void *addr);
+extern long __test_and_set_bit(unsigned long nr, volatile void *addr);
+extern long __test_and_clear_bit(unsigned long nr, volatile void *addr);
+extern long __test_and_change_bit(unsigned long nr, volatile void *addr);
#define test_and_set_bit(nr,addr) (__test_and_set_bit(nr,addr)!=0)
#define test_and_clear_bit(nr,addr) (__test_and_clear_bit(nr,addr)!=0)
#define find_first_zero_bit(addr, size) \
find_next_zero_bit((addr), (size), 0)
-extern long __test_and_set_le_bit(int nr, void *addr);
-extern long __test_and_clear_le_bit(int nr, void *addr);
+extern long __test_and_set_le_bit(int nr, volatile void *addr);
+extern long __test_and_clear_le_bit(int nr, volatile void *addr);
#define test_and_set_le_bit(nr,addr) (__test_and_set_le_bit(nr,addr)!=0)
#define test_and_clear_le_bit(nr,addr) (__test_and_clear_le_bit(nr,addr)!=0)
#define ext2_find_next_zero_bit find_next_zero_le_bit
/* Bitmap functions for the minix filesystem. */
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) test_and_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) set_bit(nr,addr)
+#define minix_test_and_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
-/* $Id: fcntl.h,v 1.7 2000/01/04 23:54:58 davem Exp $ */
+/* $Id: fcntl.h,v 1.8 2000/07/06 01:41:45 davem Exp $ */
#ifndef _SPARC64_FCNTL_H
#define _SPARC64_FCNTL_H
#include <linux/spinlock.h>
#ifndef CONFIG_SMP
-extern unsigned int local_irq_count;
-#define irq_enter(cpu, irq) (local_irq_count++)
-#define irq_exit(cpu, irq) (local_irq_count--)
+extern unsigned int __local_irq_count;
+#define local_irq_count(cpu) __local_irq_count
+#define irq_enter(cpu, irq) (__local_irq_count++)
+#define irq_exit(cpu, irq) (__local_irq_count--)
#else
-#define local_irq_count (__brlock_array[smp_processor_id()][BR_GLOBALIRQ_LOCK])
+#define local_irq_count(cpu) (__brlock_array[cpu][BR_GLOBALIRQ_LOCK])
#define irq_enter(cpu, irq) br_read_lock(BR_GLOBALIRQ_LOCK)
#define irq_exit(cpu, irq) br_read_unlock(BR_GLOBALIRQ_LOCK)
#endif
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing? On any cpu?
*/
-#define in_interrupt() ((local_irq_count + local_bh_count) != 0)
+#define in_interrupt() ((local_irq_count(smp_processor_id()) + \
+ local_bh_count(smp_processor_id())) != 0)
/* This tests only the local processors hw IRQ context disposition. */
-#define in_irq() (local_irq_count != 0)
+#define in_irq() (local_irq_count(smp_processor_id()) != 0)
#ifndef CONFIG_SMP
-#define hardirq_trylock(cpu) ((void)(cpu), local_irq_count == 0)
+#define hardirq_trylock(cpu) ((void)(cpu), local_irq_count(smp_processor_id()) == 0)
#define hardirq_endlock(cpu) do { (void)(cpu); } while(0)
-#define hardirq_enter(cpu) ((void)(cpu), local_irq_count++)
-#define hardirq_exit(cpu) ((void)(cpu), local_irq_count--)
+#define hardirq_enter(cpu) ((void)(cpu), local_irq_count(smp_processor_id())++)
+#define hardirq_exit(cpu) ((void)(cpu), local_irq_count(smp_processor_id())--)
#define synchronize_irq() barrier()
#include <asm/system.h> /* for membar() */
#ifndef CONFIG_SMP
-extern unsigned int local_bh_count;
+extern unsigned int __local_bh_count;
+#define local_bh_count(cpu) __local_bh_count
#else
-#define local_bh_count (cpu_data[smp_processor_id()].bh_count)
+#define local_bh_count(cpu) (cpu_data[cpu].bh_count)
#endif
-#define local_bh_disable() (local_bh_count++)
-#define local_bh_enable() (local_bh_count--)
+#define local_bh_disable() (local_bh_count(smp_processor_id())++)
+#define local_bh_enable() (local_bh_count(smp_processor_id())--)
-#define in_softirq() (local_bh_count != 0)
+#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
#endif /* !(__SPARC64_SOFTIRQ_H) */
extern int * max_segments[MAX_BLKDEV];
-#define MAX_SECTORS 128
+#define MAX_SECTORS 254
#define MAX_SEGMENTS MAX_SECTORS
struct dentry *umsdos_solve_hlink (struct dentry *hlink);
/* emd.c 22/06/95 00.22.04 */
-ssize_t umsdos_file_write_kmem_real (struct file *filp,
- const char *buf,
- size_t count);
-
-ssize_t umsdos_file_read_kmem (struct file *filp,
- char *buf,
- size_t count);
-ssize_t umsdos_file_write_kmem (struct file *filp,
- const char *buf,
- size_t count);
-ssize_t umsdos_emd_dir_write (struct file *filp,
- char *buf,
- size_t count);
-ssize_t umsdos_emd_dir_read (struct file *filp,
- char *buf,
- size_t count);
struct dentry *umsdos_get_emd_dentry(struct dentry *);
int umsdos_have_emd(struct dentry *);
int umsdos_make_emd(struct dentry *);
-int umsdos_emd_dir_readentry (struct file *, struct umsdos_dirent *);
+int umsdos_emd_dir_readentry (struct dentry *, loff_t *, struct umsdos_dirent *);
int umsdos_newentry (struct dentry *, struct umsdos_info *);
int umsdos_newhidden (struct dentry *, struct umsdos_info *);
int umsdos_delentry (struct dentry *, struct umsdos_info *, int);
* So we duplicate the msdos_inode_info, and add our own info at the
* end.
*
- * For all file type (and directory) the inode has a reference to:
- * the directory which hold this entry: i_dir_owner
- * The EMD file of i_dir_owner: i_emd_owner
* The offset in this EMD file of the entry: pos
*
- * For directory, we also have a reference to the inode of its
- * own EMD file. Also, we have dir_locking_info to help synchronise
+ * For directory, we have dir_locking_info to help synchronise
* file creation and file lookup. See also msdos_fs_i.h for more
* information about msdos_inode_info.
*
struct dir_locking_info dir_info;
int i_patched; /* Inode has been patched */
int i_is_hlink; /* Resolved hardlink inode? */
- unsigned long i_emd_owner; /* Is this the EMD file inode? */
off_t pos; /* Entry offset in the emd_owner file */
- /* The rest is used only if this inode describes a directory */
- struct dentry *i_emd_dentry; /* EMD dentry for this directory */
- unsigned long i_emd_dir; /* Inode of the EMD file */
};
#endif
* means "IP packet".
*/
+
+#include <linux/ip.h>
+#include <linux/tcp.h>
+
/* SLIP compression masks for len/vers byte */
#define SL_TYPE_IP 0x40
#define SL_TYPE_UNCOMPRESSED_TCP 0x70
*/
#ifndef CONFIG_PROC_FS
-static int rif_get_info(char *buffer,char **start, off_t offset, int length) {}
+static int rif_get_info(char *buffer,char **start, off_t offset, int length) { return 0;}
#else
static int rif_get_info(char *buffer,char **start, off_t offset, int length)
{
dn_db->parms.blksize,
dn_db->parms.priority,
dn_db->parms.state, dn_db->parms.name,
- dn_db->router ? dn_addr2asc(dn_eth2dn(dn_db->router->primary_key), router_buf) : "",
- dn_db->peer ? dn_addr2asc(dn_eth2dn(dn_db->peer->primary_key), peer_buf) : "");
+ dn_db->router ? dn_addr2asc(dn_ntohs(*(dn_address *)dn_db->router->primary_key), router_buf) : "",
+ dn_db->peer ? dn_addr2asc(dn_ntohs(*(dn_address *)dn_db->peer->primary_key), peer_buf) : "");
pos = begin + len;
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp_timer.c,v 1.76 2000/05/03 06:37:07 davem Exp $
+ * Version: $Id: tcp_timer.c,v 1.77 2000/06/30 10:18:38 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Version: $Id: af_unix.c,v 1.100 2000/06/26 23:20:27 davem Exp $
+ * Version: $Id: af_unix.c,v 1.101 2000/07/06 01:41:46 davem Exp $
*
* Fixes:
* Linus Torvalds : Assorted bug cures.