Commit 27cd7e0f authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-sound.bkbits.net/linux-sound

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents f319c809 c4620fd6
......@@ -278,6 +278,18 @@ and <size> parameters are provided to do partial page mapping, it is
recommended that you never use these unless you really know what the
cache width is.
int
dma_error(dma_addr_t dma_addr)
int
pci_dma_error(dma_addr_t dma_addr)
In some circumstances dma_map_single and dma_map_page will fail to create
a mapping. A driver can check for these errors by testing the returned
dma address with dma_error(). A non zero return value means the mapping
could not be created and the driver should take appropriate action (eg
reduce current DMA mapping usage or delay and try again later).
int
dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
enum dma_data_direction direction)
......@@ -292,6 +304,15 @@ than <nents> passed in if the block layer determines that some
elements of the scatter/gather list are physically adjacent and thus
may be mapped with a single entry).
Please note that the sg cannot be mapped again if it has been mapped once.
The mapping process is allowed to destroy information in the sg.
As with the other mapping interfaces, dma_map_sg can fail. When it
does, 0 is returned and a driver must take appropriate action. It is
critical that the driver do something, in the case of a block driver
aborting the request or even oopsing is better than doing nothing and
corrupting the filesystem.
void
dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
enum dma_data_direction direction)
......
......@@ -519,7 +519,7 @@ consecutive sglist entries can be merged into one provided the first one
ends and the second one starts on a page boundary - in fact this is a huge
advantage for cards which either cannot do scatter-gather or have very
limited number of scatter-gather entries) and returns the actual number
of sg entries it mapped them to.
of sg entries it mapped them to. On failure 0 is returned.
Then you should loop count times (note: this can be less than nents times)
and use sg_dma_address() and sg_dma_len() macros where you previously
......@@ -842,6 +842,27 @@ to "Closing".
2) More to come...
Handling Errors
DMA address space is limited on some architectures and an allocation
failure can be determined by:
- checking if pci_alloc_consistent returns NULL or pci_map_sg returns 0
- checking the returned dma_addr_t of pci_map_single and pci_map_page
by using pci_dma_error():
dma_addr_t dma_handle;
dma_handle = pci_map_single(dev, addr, size, direction);
if (pci_dma_error(dma_handle)) {
/*
* reduce current DMA mapping usage,
* delay and try again later or
* reset driver.
*/
}
Closing
This document, and the API itself, would not be in it's current
......
......@@ -51,6 +51,13 @@ Licensing: The code must be released to us under the
to be useful to other communities such as BSD you may well
wish to release under multiple licenses.
Copyright: The copyright owner must agree to use of GPL.
It's best if the submitter and copyright owner
are the same person/entity. If not, the name of
the person/entity authorizing use of GPL should be
listed in case it's necessary to verify the will of
the copright owner.
Interfaces: If your driver uses existing interfaces and behaves like
other drivers in the same class it will be much more likely
to be accepted than if it invents gratuitous new ones.
......
......@@ -261,7 +261,7 @@ A userspace daemon, devfsd, exists to allow for automatic creation and
management of symbolic links from the devfs name space to the conventional
names. More details on devfs can be found on the DEVFS home site at
<http://www.atnf.csiro.au/~rgooch/linux/> or in the file kernel
documentation files, .../linux/Documentation/filesystems/devfs/REAME.
documentation files, .../linux/Documentation/filesystems/devfs/README.
If you are using devfs, existing devices are automatically created within
the devfs name space. Normal devices will be tts/F0 - tts/F255 and callout
......
Summary of empty_zero_page layout (kernel point of view)
Summary of boot_params layout (kernel point of view)
( collected by Hans Lermen and Martin Mares )
The contents of empty_zero_page are used to pass parameters from the
The contents of boot_params are used to pass parameters from the
16-bit realmode code of the kernel to the 32-bit part. References/settings
to it mainly are in:
......@@ -76,9 +76,3 @@ Offset Type Description
0x2d0 - 0x600 E820MAP
0x600 - 0x7ff EDDBUF (setup.S) for disk signature read sector
0x600 - 0x7eb EDDBUF (setup.S) for edd data
0x800 string, 2K max COMMAND_LINE, the kernel commandline as
copied using CL_OFFSET.
Note: this will be copied once more by setup.c
into a local buffer which is only 256 bytes long.
( #define COMMAND_LINE_SIZE 256 )
......@@ -55,8 +55,9 @@ Build and install the new kernel and modules.
--------------------------------------
This version of the bonding driver requires updated ifenslave program. The
original one from extreme-linux and beowulf will not work. Kernels 2.4.12
and above include the updated version of ifenslave.c in Documentation/network
directory. For older kernels, please follow the links at the end of this file.
and above include the updated version of ifenslave.c in
Documentation/networking directory. For older kernels, please follow the
links at the end of this file.
IMPORTANT!!! If you are running on Redhat 7.1 or greater, you need
to be careful because /usr/include/linux is no longer a symbolic link
......
......@@ -495,8 +495,8 @@ config SMP
Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
Management" code will be disabled if you say Y here.
See also the <file:Documentation/smp.tex>,
<file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
See also the <file:Documentation/smp.txt>,
<file:Documentation/i386/IO-APIC.txt>,
<file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
<http://www.tldp.org/docs.html#howto>.
......
......@@ -351,7 +351,7 @@ config CPU_FREQ_INTEGRATOR
help
This enables the CPUfreq driver for ARM Integrator CPUs.
For details, take a look at linux/Documentation/cpufreq.
For details, take a look at linux/Documentation/cpu-freq.
If in doubt, say Y.
......
......@@ -454,8 +454,8 @@ config SMP
Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
Management" code will be disabled if you say Y here.
See also the <file:Documentation/smp.tex>,
<file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
See also the <file:Documentation/smp.txt>,
<file:Documentation/i386/IO-APIC.txt>,
<file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
<http://www.tldp.org/docs.html#howto>.
......@@ -637,16 +637,7 @@ config X86_CPUID
with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
/dev/cpu/31/cpuid.
config EDD
tristate "BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)"
depends on EXPERIMENTAL
help
Say Y or M here if you want to enable BIOS Enhanced Disk Drive
Services real mode BIOS calls to determine which disk
BIOS tries boot from. This information is then exported via driverfs.
This option is experimental, but believed to be safe,
and most disk controller BIOS vendors do not yet implement this feature.
source "drivers/firmware/Kconfig"
choice
prompt "High Memory Support"
......
/*
* BIOS Enhanced Disk Drive support
* by Matt Domsch <Matt_Domsch@dell.com> October 2002
* conformant to T13 Committee www.t13.org
* projects 1572D, 1484D, 1386D, 1226DT
* disk signature read by Matt Domsch <Matt_Domsch@dell.com>
* and Andrew Wilks <Andrew_Wilks@dell.com> September 2003
* legacy CHS retreival by Patrick J. LoPresti <patl@users.sourceforge.net>
* March 2004
*/
#include <linux/edd.h>
#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
# Read the first sector of device 80h and store the 4-byte signature
movl $0xFFFFFFFF, %eax
movl %eax, (DISK80_SIG_BUFFER) # assume failure
movb $READ_SECTORS, %ah
movb $1, %al # read 1 sector
movb $0x80, %dl # from device 80
movb $0, %dh # at head 0
movw $1, %cx # cylinder 0, sector 0
pushw %es
pushw %ds
popw %es
movw $EDDBUF, %bx
pushw %dx # work around buggy BIOSes
stc # work around buggy BIOSes
int $0x13
sti # work around buggy BIOSes
popw %dx
jc disk_sig_done
movl (EDDBUF+MBR_SIG_OFFSET), %eax
movl %eax, (DISK80_SIG_BUFFER) # store success
disk_sig_done:
popw %es
# Do the BIOS Enhanced Disk Drive calls
# This consists of two calls:
# int 13h ah=41h "Check Extensions Present"
# int 13h ah=48h "Get Device Parameters"
# int 13h ah=08h "Legacy Get Device Parameters"
#
# A buffer of size EDDMAXNR*(EDDEXTSIZE+EDDPARMSIZE) is reserved for our use
# in the boot_params at EDDBUF. The first four bytes of which are
# used to store the device number, interface support map and version
# results from fn41. The next four bytes are used to store the legacy
# cylinders, heads, and sectors from fn08. The following 74 bytes are used to
# store the results from fn48. Starting from device 80h, fn41, then fn48
# are called and their results stored in EDDBUF+n*(EDDEXTSIZE+EDDPARMIZE).
# Then the pointer is incremented to store the data for the next call.
# This repeats until either a device doesn't exist, or until EDDMAXNR
# devices have been stored.
# The one tricky part is that ds:si always points EDDEXTSIZE bytes into
# the structure, and the fn41 and fn08 results are stored at offsets
# from there. This removes the need to increment the pointer for
# every store, and leaves it ready for the fn48 call.
# A second one-byte buffer, EDDNR, in the boot_params stores
# the number of BIOS devices which exist, up to EDDMAXNR.
# In setup.c, copy_edd() stores both boot_params buffers away
# for later use, as they would get overwritten otherwise.
# This code is sensitive to the size of the structs in edd.h
edd_start:
# %ds points to the bootsector
# result buffer for fn48
movw $EDDBUF+EDDEXTSIZE, %si # in ds:si, fn41 results
# kept just before that
movb $0, (EDDNR) # zero value at EDDNR
movb $0x80, %dl # BIOS device 0x80
edd_check_ext:
movb $CHECKEXTENSIONSPRESENT, %ah # Function 41
movw $EDDMAGIC1, %bx # magic
int $0x13 # make the call
jc edd_done # no more BIOS devices
cmpw $EDDMAGIC2, %bx # is magic right?
jne edd_next # nope, next...
movb %dl, %ds:-8(%si) # store device number
movb %ah, %ds:-7(%si) # store version
movw %cx, %ds:-6(%si) # store extensions
incb (EDDNR) # note that we stored something
edd_get_device_params:
movw $EDDPARMSIZE, %ds:(%si) # put size
movw $0x0, %ds:2(%si) # work around buggy BIOSes
movb $GETDEVICEPARAMETERS, %ah # Function 48
int $0x13 # make the call
# Don't check for fail return
# it doesn't matter.
edd_get_legacy_chs:
xorw %ax, %ax
movw %ax, %ds:-4(%si)
movw %ax, %ds:-2(%si)
# Ralf Brown's Interrupt List says to set ES:DI to
# 0000h:0000h "to guard against BIOS bugs"
pushw %es
movw %ax, %es
movw %ax, %di
pushw %dx # legacy call clobbers %dl
movb $LEGACYGETDEVICEPARAMETERS, %ah # Function 08
int $0x13 # make the call
jc edd_legacy_done # failed
movb %cl, %al # Low 6 bits are max
andb $0x3F, %al # sector number
movb %al, %ds:-1(%si) # Record max sect
movb %dh, %ds:-2(%si) # Record max head number
movb %ch, %al # Low 8 bits of max cyl
shr $6, %cl
movb %cl, %ah # High 2 bits of max cyl
movw %ax, %ds:-4(%si)
edd_legacy_done:
popw %dx
popw %es
movw %si, %ax # increment si
addw $EDDPARMSIZE+EDDEXTSIZE, %ax
movw %ax, %si
edd_next:
incb %dl # increment to next device
cmpb $EDDMAXNR, (EDDNR) # Out of space?
jb edd_check_ext # keep looping
edd_done:
#endif
......@@ -44,15 +44,6 @@
*
* New A20 code ported from SYSLINUX by H. Peter Anvin. AMD Elan bugfixes
* by Robert Schwebel, December 2001 <robert@schwebel.de>
*
* BIOS Enhanced Disk Drive support
* by Matt Domsch <Matt_Domsch@dell.com> October 2002
* conformant to T13 Committee www.t13.org
* projects 1572D, 1484D, 1386D, 1226DT
* disk signature read by Matt Domsch <Matt_Domsch@dell.com>
* and Andrew Wilks <Andrew_Wilks@dell.com> September 2003
* legacy CHS retreival by Patrick J. LoPresti <patl@users.sourceforge.net>
* March 2004
*/
#include <linux/config.h>
......@@ -61,7 +52,6 @@
#include <linux/compile.h>
#include <asm/boot.h>
#include <asm/e820.h>
#include <asm/edd.h>
#include <asm/page.h>
/* Signature words to ensure LILO loaded us right */
......@@ -581,120 +571,7 @@ no_32_apm_bios:
done_apm_bios:
#endif
#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
# Read the first sector of device 80h and store the 4-byte signature
movl $0xFFFFFFFF, %eax
movl %eax, (DISK80_SIG_BUFFER) # assume failure
movb $READ_SECTORS, %ah
movb $1, %al # read 1 sector
movb $0x80, %dl # from device 80
movb $0, %dh # at head 0
movw $1, %cx # cylinder 0, sector 0
pushw %es
pushw %ds
popw %es
movw $EDDBUF, %bx
pushw %dx # work around buggy BIOSes
stc # work around buggy BIOSes
int $0x13
sti # work around buggy BIOSes
popw %dx
jc disk_sig_done
movl (EDDBUF+MBR_SIG_OFFSET), %eax
movl %eax, (DISK80_SIG_BUFFER) # store success
disk_sig_done:
popw %es
# Do the BIOS Enhanced Disk Drive calls
# This consists of two calls:
# int 13h ah=41h "Check Extensions Present"
# int 13h ah=48h "Get Device Parameters"
# int 13h ah=08h "Legacy Get Device Parameters"
#
# A buffer of size EDDMAXNR*(EDDEXTSIZE+EDDPARMSIZE) is reserved for our use
# in the empty_zero_page at EDDBUF. The first four bytes of which are
# used to store the device number, interface support map and version
# results from fn41. The next four bytes are used to store the legacy
# cylinders, heads, and sectors from fn08. The following 74 bytes are used to
# store the results from fn48. Starting from device 80h, fn41, then fn48
# are called and their results stored in EDDBUF+n*(EDDEXTSIZE+EDDPARMIZE).
# Then the pointer is incremented to store the data for the next call.
# This repeats until either a device doesn't exist, or until EDDMAXNR
# devices have been stored.
# The one tricky part is that ds:si always points EDDEXTSIZE bytes into
# the structure, and the fn41 and fn08 results are stored at offsets
# from there. This removes the need to increment the pointer for
# every store, and leaves it ready for the fn48 call.
# A second one-byte buffer, EDDNR, in the empty_zero_page stores
# the number of BIOS devices which exist, up to EDDMAXNR.
# In setup.c, copy_edd() stores both empty_zero_page buffers away
# for later use, as they would get overwritten otherwise.
# This code is sensitive to the size of the structs in edd.h
edd_start:
# %ds points to the bootsector
# result buffer for fn48
movw $EDDBUF+EDDEXTSIZE, %si # in ds:si, fn41 results
# kept just before that
movb $0, (EDDNR) # zero value at EDDNR
movb $0x80, %dl # BIOS device 0x80
edd_check_ext:
movb $CHECKEXTENSIONSPRESENT, %ah # Function 41
movw $EDDMAGIC1, %bx # magic
int $0x13 # make the call
jc edd_done # no more BIOS devices
cmpw $EDDMAGIC2, %bx # is magic right?
jne edd_next # nope, next...
movb %dl, %ds:-8(%si) # store device number
movb %ah, %ds:-7(%si) # store version
movw %cx, %ds:-6(%si) # store extensions
incb (EDDNR) # note that we stored something
edd_get_device_params:
movw $EDDPARMSIZE, %ds:(%si) # put size
movw $0x0, %ds:2(%si) # work around buggy BIOSes
movb $GETDEVICEPARAMETERS, %ah # Function 48
int $0x13 # make the call
# Don't check for fail return
# it doesn't matter.
edd_get_legacy_chs:
xorw %ax, %ax
movw %ax, %ds:-4(%si)
movw %ax, %ds:-2(%si)
# Ralf Brown's Interrupt List says to set ES:DI to
# 0000h:0000h "to guard against BIOS bugs"
pushw %es
movw %ax, %es
movw %ax, %di
pushw %dx # legacy call clobbers %dl
movb $LEGACYGETDEVICEPARAMETERS, %ah # Function 08
int $0x13 # make the call
jc edd_legacy_done # failed
movb %cl, %al # Low 6 bits are max
andb $0x3F, %al # sector number
movb %al, %ds:-1(%si) # Record max sect
movb %dh, %ds:-2(%si) # Record max head number
movb %ch, %al # Low 8 bits of max cyl
shr $6, %cl
movb %cl, %ah # High 2 bits of max cyl
movw %ax, %ds:-4(%si)
edd_legacy_done:
popw %dx
popw %es
movw %si, %ax # increment si
addw $EDDPARMSIZE+EDDEXTSIZE, %ax
movw %ax, %si
edd_next:
incb %dl # increment to next device
cmpb $EDDMAXNR, (EDDNR) # Out of space?
jb edd_check_ext # keep looping
edd_done:
#endif
#include "edd.S"
# Now we want to move to protected mode ...
cmpw $0, %cs:realmode_swtch
......
......@@ -25,7 +25,6 @@ obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o
obj-$(CONFIG_X86_IO_APIC) += io_apic.o
obj-$(CONFIG_X86_NUMAQ) += numaq.o
obj-$(CONFIG_X86_SUMMIT_NUMA) += summit.o
obj-$(CONFIG_EDD) += edd.o
obj-$(CONFIG_MODULES) += module.o
obj-y += sysenter.o vsyscall.o
obj-$(CONFIG_ACPI_SRAT) += srat.o
......
......@@ -18,12 +18,7 @@
#include <asm/cache.h>
#include <asm/thread_info.h>
#include <asm/asm_offsets.h>
#define OLD_CL_MAGIC_ADDR 0x90020
#define OLD_CL_MAGIC 0xA33F
#define OLD_CL_BASE_ADDR 0x90000
#define OLD_CL_OFFSET 0x90022
#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
#include <asm/setup.h>
/*
* References to members of the new_cpu_data structure.
......@@ -195,22 +190,15 @@ ENTRY(startup_32_smp)
call setup_idt
/*
* Copy bootup parameters out of the way. First 2kB of
* _empty_zero_page is for boot parameters, second 2kB
* is for the command line.
*
* Copy bootup parameters out of the way.
* Note: %esi still has the pointer to the real-mode data.
*/
movl $empty_zero_page,%edi
movl $512,%ecx
movl $boot_params,%edi
movl $(PARAM_SIZE/4),%ecx
cld
rep
movsl
xorl %eax,%eax
movl $512,%ecx
rep
stosl
movl empty_zero_page+NEW_CL_POINTER,%esi
movl boot_params+NEW_CL_POINTER,%esi
andl %esi,%esi
jnz 2f # New command line protocol
cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR
......@@ -218,8 +206,8 @@ ENTRY(startup_32_smp)
movzwl OLD_CL_OFFSET,%esi
addl $(OLD_CL_BASE_ADDR),%esi
2:
movl $empty_zero_page+2048,%edi
movl $512,%ecx
movl $saved_command_line,%edi
movl $(COMMAND_LINE_SIZE/4),%ecx
rep
movsl
1:
......
......@@ -176,10 +176,13 @@ EXPORT_SYMBOL_GPL(unset_nmi_callback);
#undef memcpy
#undef memset
#undef memcmp
extern void * memset(void *,int,__kernel_size_t);
extern void * memcpy(void *,const void *,__kernel_size_t);
extern int memcmp(const void *,const void *,__kernel_size_t);
EXPORT_SYMBOL_NOVERS(memcpy);
EXPORT_SYMBOL_NOVERS(memset);
EXPORT_SYMBOL_NOVERS(memcmp);
#ifdef CONFIG_HAVE_DEC_LOCK
EXPORT_SYMBOL(atomic_dec_and_lock);
......
......@@ -20,7 +20,7 @@ EXPORT_SYMBOL(init_mm);
/*
* Initial thread structure.
*
* We need to make sure that this is 8192-byte aligned due to the
* We need to make sure that this is THREAD_SIZE aligned due to the
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
......
......@@ -38,10 +38,10 @@
#include <linux/module.h>
#include <linux/efi.h>
#include <linux/init.h>
#include <linux/edd.h>
#include <video/edid.h>
#include <asm/e820.h>
#include <asm/mpspec.h>
#include <asm/edd.h>
#include <asm/setup.h>
#include <asm/arch_hooks.h>
#include <asm/sections.h>
......@@ -130,6 +130,8 @@ unsigned long saved_videomode;
static char command_line[COMMAND_LINE_SIZE];
char saved_command_line[COMMAND_LINE_SIZE];
unsigned char __initdata boot_params[PARAM_SIZE];
static struct resource code_resource = { "Kernel code", 0x100000, 0 };
static struct resource data_resource = { "Kernel data", 0, 0 };
......@@ -456,7 +458,7 @@ EXPORT_SYMBOL(edd_disk80_sig);
#endif
/**
* copy_edd() - Copy the BIOS EDD information
* from empty_zero_page into a safe place.
* from boot_params into a safe place.
*
*/
static inline void copy_edd(void)
......@@ -485,12 +487,11 @@ static void __init setup_memory_region(void)
static void __init parse_cmdline_early (char ** cmdline_p)
{
char c = ' ', *to = command_line, *from = COMMAND_LINE;
char c = ' ', *to = command_line, *from = saved_command_line;
int len = 0;
int userdef = 0;
/* Save unparsed command line copy for /proc/cmdline */
memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
for (;;) {
......
......@@ -3,7 +3,8 @@
*/
#include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(startup_32)
......@@ -48,7 +49,7 @@ SECTIONS
_edata = .; /* End of data section */
. = ALIGN(8192); /* init_task */
. = ALIGN(THREAD_SIZE); /* init_task */
.data.init_task : { *(.data.init_task) }
/* will be freed after init */
......
......@@ -474,9 +474,6 @@ void __init mem_init(void)
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
#endif
/* clear the zero-page */
memset(empty_zero_page, 0, PAGE_SIZE);
/* this will put all low memory onto the freelists */
totalram_pages += __free_all_bootmem();
......
......@@ -1209,9 +1209,8 @@ config SMP
People using multiprocessor machines who say Y here should also say
Y to "Enhanced Real Time Clock Support", below.
See also the <file:Documentation/smp.tex>,
<file:Documentation/smp.txt> and the SMP-HOWTO available at
<http://www.tldp.org/docs.html#howto>.
See also the <file:Documentation/smp.txt> and the SMP-HOWTO
available at <http://www.tldp.org/docs.html#howto>.
If you don't know what to do here, say N.
......
......@@ -131,10 +131,9 @@ config SMP
singleprocessor machines. On a singleprocessor machine, the kernel
will run faster if you say N here.
See also the <file:Documentation/smp.tex>,
<file:Documentation/smp.txt>, <file:Documentation/nmi_watchdog.txt>
and the SMP-HOWTO available at
<http://www.tldp.org/docs.html#howto>.
See also the <file:Documentation/smp.txt>,
<file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available
at <http://www.tldp.org/docs.html#howto>.
If you don't know what to do here, say N.
......
......@@ -163,7 +163,7 @@ config CPU_FREQ
fly. This is a nice method to save battery power on notebooks,
because the lower the clock speed, the less power the CPU consumes.
For more information, take a look at linux/Documentation/cpufreq or
For more information, take a look at linux/Documentation/cpu-freq or
at <http://www.brodo.de/cpufreq/>
If in doubt, say N.
......
......@@ -292,7 +292,24 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
addi r6,r4,-THREAD /* Convert THREAD to 'current' */
std r6,PACACURRENT(r13) /* Set new 'current' */
ld r1,KSP(r4) /* Load new stack pointer */
ld r8,KSP(r4) /* new stack pointer */
BEGIN_FTR_SECTION
clrrdi r6,r8,28 /* get its ESID */
clrrdi r9,r1,28 /* get current sp ESID */
clrldi. r0,r6,2 /* is new ESID c00000000? */
cmpd cr1,r6,r9 /* or is new ESID the same as current ESID? */
cror eq,4*cr1+eq,eq
beq 2f /* if yes, don't slbie it */
oris r6,r6,0x0800 /* set C (class) bit */
slbie r6
2:
END_FTR_SECTION_IFSET(CPU_FTR_SLB)
clrrdi r7,r8,THREAD_SHIFT /* base of new stack */
addi r7,r7,THREAD_SIZE-INT_FRAME_SIZE
mr r1,r8 /* start using new stack pointer */
std r7,PACAKSAVE(r13)
ld r6,_CCR(r1)
mtcrf 0xFF,r6
......@@ -357,7 +374,6 @@ _GLOBAL(ret_from_except)
addi r0,r1,INT_FRAME_SIZE /* size of frame */
ld r4,PACACURRENT(r13)
std r0,THREAD+KSP(r4) /* save kernel stack pointer */
std r1,PACAKSAVE(r13) /* save exception stack pointer */
/*
* r13 is our per cpu area, only restore it if we are returning to
......@@ -388,6 +404,10 @@ restore:
4: stb r5,PACAPROCENABLED(r4)
#endif
ld r3,_MSR(r1)
andi. r3,r3,MSR_RI
beq- unrecov_restore
ld r3,_CTR(r1)
ld r0,_LINK(r1)
mtctr r3
......@@ -439,6 +459,11 @@ do_work:
bl .do_signal
b .ret_from_except
unrecov_restore:
addi r3,r1,STACK_FRAME_OVERHEAD
bl .unrecoverable_exception
b unrecov_restore
#ifdef CONFIG_PPC_PSERIES
/*
* On CHRP, the Run-Time Abstraction Services (RTAS) have to be
......
......@@ -275,14 +275,15 @@ _GLOBAL(__secondary_hold)
mfspr r22,SPRG1; /* Save r21 in exc. frame */ \
std r22,EX_R21(r21); \
std r21,PACAEXCSP(r20); /* update exception stack ptr */ \
/* iff no protection flt */ \
ld r22,EX_SRR1(r21); /* Get SRR1 from exc. frame */ \
andi. r22,r22,MSR_PR; /* Set CR for later branch */ \
mr r22,r1; /* Save r1 */ \
subi r1,r1,INT_FRAME_SIZE; /* alloc frame on kernel stack */ \
beq- 1f; \
ld r1,PACAKSAVE(r20); /* kernel stack to use */ \
1: std r22,GPR1(r1); /* save r1 in stackframe */ \
1: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \
bge cr1,bad_stack; /* abort if it is */ \
std r22,GPR1(r1); /* save r1 in stackframe */ \
std r22,0(r1); /* make stack chain pointer */ \
std r23,_CCR(r1); /* save CR in stackframe */ \
ld r22,EX_R20(r21); /* move r20 to stackframe */ \
......@@ -610,12 +611,68 @@ __end_stab:
#else
STD_EXCEPTION_COMMON(0x1700, AltivecAssist, .UnknownException )
#endif
/*
* Here the exception frame is filled out and we have detected that
* the kernel stack pointer is bad. R23 contains the saved CR, r20
* points to the paca, r21 points to the exception frame, and r22
* contains the (bad) kernel stack pointer.
* We switch to using the paca guard page as an emergency stack,
* save the registers on there, and call kernel_bad_stack(),
* which panics.
*/
bad_stack:
addi r1,r20,8192-64-INT_FRAME_SIZE
std r22,GPR1(r1)
std r23,_CCR(r1)
ld r22,EX_R20(r21)
std r22,GPR20(r1)
ld r23,EX_R21(r21)
std r23,GPR21(r1)
ld r22,EX_R22(r21)
std r22,GPR22(r1)
ld r23,EX_R23(r21)
std r23,GPR23(r1)
ld r23,EX_DAR(r21)
std r23,_DAR(r1)
lwz r22,EX_DSISR(r21)
std r22,_DSISR(r1)
lwz r23,EX_TRAP(r21)
std r23,TRAP(r1)
ld r22,EX_SRR0(r21)
ld r23,EX_SRR1(r21)
std r22,_NIP(r1)
std r23,_MSR(r1)
addi r21,r21,-EXC_FRAME_SIZE
std r21,PACAEXCSP(r20)
mflr r22
std r22,_LINK(r1)
mfctr r23
std r23,_CTR(r1)
mfspr r22,XER
std r22,_XER(r1)
SAVE_GPR(0, r1)
SAVE_10GPRS(2, r1)
SAVE_8GPRS(12, r1)
SAVE_8GPRS(24, r1)
addi r21,r1,INT_FRAME_SIZE
std r21,0(r1)
li r22,0
std r22,0(r21)
ld r2,PACATOC(r20)
mr r13,r20
1: addi r3,r1,STACK_FRAME_OVERHEAD
bl .kernel_bad_stack
b 1b
/*
* Return from an exception which is handled without calling
* save_remaining_regs. The caller is assumed to have done
* EXCEPTION_PROLOG_COMMON.
*/
fast_exception_return:
andi. r3,r23,MSR_RI /* check if RI is set */
beq- unrecov_fer
ld r3,_CCR(r1)
ld r4,_LINK(r1)
ld r5,_CTR(r1)
......@@ -639,6 +696,14 @@ fast_exception_return:
ld r1,GPR1(r1)
rfid
unrecov_fer:
li r6,0x4000
li r20,0
bl .save_remaining_regs
1: addi r3,r1,STACK_FRAME_OVERHEAD
bl .unrecoverable_exception
b 1b
/*
* Here r20 points to the PACA, r21 to the exception frame,
* r23 contains the saved CR.
......@@ -996,6 +1061,11 @@ _GLOBAL(do_stab_bolted)
ld r21,PACAEXCSP(r20) /* Get the exception frame pointer */
addi r21,r21,EXC_FRAME_SIZE
lwz r23,EX_CCR(r21) /* get saved CR */
ld r22,EX_SRR1(r21)
andi. r22,r22,MSR_RI
beq- unrecov_stab
/* note that this is almost identical to maskable_exception_exit */
mtcr r23 /* restore CR */
......@@ -1014,6 +1084,15 @@ _GLOBAL(do_stab_bolted)
mfspr r21,SPRG1
rfid
unrecov_stab:
EXCEPTION_PROLOG_COMMON
li r6,0x4100
li r20,0
bl .save_remaining_regs
1: addi r3,r1,STACK_FRAME_OVERHEAD
bl .unrecoverable_exception
b 1b
/*
* r20 points to the PACA, r21 to the exception frame,
* r23 contains the saved CR.
......@@ -1052,15 +1131,23 @@ SLB_NUM_ENTRIES = 64
slbmfee r21,r22
srdi r21,r21,27
/*
* This is incorrect (r1 is not the kernel stack) if we entered
* from userspace but there is no critical window from userspace
* so this should be OK. Also if we cast out the userspace stack
* segment while in userspace we will fault it straight back in.
* Use paca->ksave as the value of the kernel stack pointer,
* because this is valid at all times.
* The >> 27 (rather than >> 28) is so that the LSB is the
* valid bit - this way we check valid and ESID in one compare.
* In order to completely close the tiny race in the context
* switch (between updating r1 and updating paca->ksave),
* we check against both r1 and paca->ksave.
*/
srdi r23,r1,27
ori r23,r23,1
cmpd r23,r21
beq- 1b
ld r23,PACAKSAVE(r20)
srdi r23,r23,27
ori r23,r23,1
cmpd r23,r21
beq- 1b
/* r20 = paca, r22 = entry */
......@@ -1117,6 +1204,10 @@ END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE)
lwz r23,EX_CCR(r21) /* get saved CR */
/* note that this is almost identical to maskable_exception_exit */
ld r22,EX_SRR1(r21)
andi. r22,r22,MSR_RI
beq- unrecov_stab
/*
* Until everyone updates binutils hardwire the POWER4 optimised
* single field mtcrf
......@@ -1190,9 +1281,8 @@ _GLOBAL(save_remaining_regs)
/*
* Indicate that r1 contains the kernel stack and
* get the Kernel TOC and CURRENT pointers from the paca
* get the Kernel TOC pointer from the paca
*/
std r22,PACAKSAVE(r13) /* r1 is now kernel sp */
ld r2,PACATOC(r13) /* Get Kernel TOC pointer */
/*
......@@ -1764,7 +1854,6 @@ _GLOBAL(__secondary_start)
std r2,PACATOC(r13)
li r6,0
std r6,PACAKSAVE(r13)
stb r6,PACAPROCENABLED(r13)
#ifndef CONFIG_PPC_ISERIES
......@@ -1783,6 +1872,7 @@ _GLOBAL(__secondary_start)
ldx r1,r3,r28
addi r1,r1,THREAD_SIZE
subi r1,r1,STACK_FRAME_OVERHEAD
std r1,PACAKSAVE(r13)
ld r3,PACASTABREAL(r13) /* get raddr of segment table */
ori r4,r3,1 /* turn on valid bit */
......@@ -2055,7 +2145,7 @@ _STATIC(start_here_common)
std r2,PACATOC(r13)
li r5,0
std r0,PACAKSAVE(r13)
std r1,PACAKSAVE(r13)
/* Restore the parms passed in from the bootloader. */
mr r3,r31
......
......@@ -44,16 +44,6 @@
#include "pci.h"
/* Only used to pass OF initialization data set in prom.c into the main
* kernel code -- data ultimately copied into regular tce tables.
*/
extern struct _of_tce_table of_tce_table[];
extern struct pci_controller *hose_head;
extern struct pci_controller **hose_tail;
static void tce_build_pSeries(struct iommu_table *tbl, long index,
long npages, unsigned long uaddr,
int direction)
......@@ -97,13 +87,23 @@ static void tce_free_pSeries(struct iommu_table *tbl, long index, long npages)
}
static void iommu_buses_init(void)
{
struct pci_controller* phb;
struct device_node *dn, *first_dn;
int num_slots, num_slots_ilog2;
int first_phb = 1;
unsigned long tcetable_ilog2;
/*
* We default to a TCE table that maps 2GB (4MB table, 22 bits),
* however some machines have a 3GB IO hole and for these we
* create a table that maps 1GB (2MB table, 21 bits)
*/
if (io_hole_start < 0x80000000UL)
tcetable_ilog2 = 21;
else
tcetable_ilog2 = 22;
/* XXX Should we be using pci_root_buses instead? -ojn
*/
......@@ -119,7 +119,7 @@ static void iommu_buses_init(void)
if ((1<<num_slots_ilog2) != num_slots)
num_slots_ilog2++;
phb->dma_window_size = 1 << (22 - num_slots_ilog2);
phb->dma_window_size = 1 << (tcetable_ilog2 - num_slots_ilog2);
/* Reserve 16MB of DMA space on the first PHB.
* We should probably be more careful and use firmware props.
......@@ -167,7 +167,7 @@ static void iommu_table_setparms(struct pci_controller *phb,
{
phandle node;
unsigned long i;
struct _of_tce_table *oft;
struct of_tce_table *oft;
node = ((struct device_node *)(phb->arch_data))->node;
......
......@@ -161,28 +161,6 @@ struct task_struct *__switch_to(struct task_struct *prev,
local_irq_save(flags);
last = _switch(old_thread, new_thread);
/*
* force our kernel stack out of the ERAT and SLB, this is to
* avoid the race where we it hangs around in the ERAT but not the
* SLB and the ERAT gets invalidated at just the wrong moment by
* another CPU doing a tlbie.
*
* We definitely dont want to flush our bolted segment, so check
* for that first.
*/
if ((cur_cpu_spec->cpu_features & CPU_FTR_SLB) &&
GET_ESID(__get_SP()) != GET_ESID(PAGE_OFFSET)) {
union {
unsigned long word0;
slb_dword0 data;
} esid_data;
esid_data.word0 = 0;
/* class bit is in valid field for slbie instruction */
esid_data.data.v = 1;
esid_data.data.esid = GET_ESID(__get_SP());
asm volatile("isync; slbie %0; isync" : : "r" (esid_data));
}
local_irq_restore(flags);
return last;
......
......@@ -146,8 +146,8 @@ extern struct rtas_t rtas;
extern unsigned long klimit;
extern struct lmb lmb;
#define MAX_PHB 16 * 3 // 16 Towers * 3 PHBs/tower
struct _of_tce_table of_tce_table[MAX_PHB + 1] = {{0, 0, 0}};
#define MAX_PHB (32 * 6) /* 32 drawers * 6 PHBs/drawer */
struct of_tce_table of_tce_table[MAX_PHB + 1];
char *bootpath = 0;
char *bootdevice = 0;
......@@ -808,7 +808,7 @@ prom_initialize_tce_table(void)
unsigned long i, table = 0;
unsigned long base, vbase, align;
unsigned int minalign, minsize;
struct _of_tce_table *prom_tce_table = RELOC(of_tce_table);
struct of_tce_table *prom_tce_table = RELOC(of_tce_table);
unsigned long tce_entry, *tce_entryp;
#ifdef DEBUG_PROM
......@@ -817,6 +817,12 @@ prom_initialize_tce_table(void)
/* Search all nodes looking for PHBs. */
for (node = 0; prom_next_node(&node); ) {
if (table == MAX_PHB) {
prom_print(RELOC("WARNING: PCI host bridge ignored, "
"need to increase MAX_PHB\n"));
continue;
}
compatible[0] = 0;
type[0] = 0;
model[0] = 0;
......@@ -856,20 +862,21 @@ prom_initialize_tce_table(void)
minsize = 4UL << 20;
}
/* Even though we read what OF wants, we just set the table
/*
* Even though we read what OF wants, we just set the table
* size to 4 MB. This is enough to map 2GB of PCI DMA space.
* By doing this, we avoid the pitfalls of trying to DMA to
* MMIO space and the DMA alias hole.
*/
/*
*
* On POWER4, firmware sets the TCE region by assuming
* each TCE table is 8MB. Using this memory for anything
* else will impact performance, so we always allocate 8MB.
* Anton
*
* XXX FIXME use a cpu feature here
*/
minsize = 8UL << 20;
if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p))
minsize = 8UL << 20;
else
minsize = 4UL << 20;
/* Align to the greater of the align or size */
align = max(minalign, minsize);
......
......@@ -511,6 +511,32 @@ AltivecAssistException(struct pt_regs *regs)
}
#endif /* CONFIG_ALTIVEC */
/*
* We enter here if we get an unrecoverable exception, that is, one
* that happened at a point where the RI (recoverable interrupt) bit
* in the MSR is 0. This indicates that SRR0/1 are live, and that
* we therefore lost state by taking this exception.
*/
void unrecoverable_exception(struct pt_regs *regs)
{
printk(KERN_EMERG "Unrecoverable exception %lx at %lx\n",
regs->trap, regs->nip);
debugger(regs);
die("Unrecoverable exception", regs, SIGABRT);
}
/*
* We enter here if we discover during exception entry that we are
* running in supervisor mode with a userspace value in the stack pointer.
*/
void kernel_bad_stack(struct pt_regs *regs)
{
printk(KERN_EMERG "Bad kernel stack pointer %lx at %lx\n",
regs->gpr[1], regs->nip);
debugger(regs);
die("Bad kernel stack pointer", regs, SIGABRT);
}
void __init trap_init(void)
{
}
......@@ -15,6 +15,7 @@
#include <linux/mmzone.h>
#include <linux/module.h>
#include <asm/lmb.h>
#include <asm/machdep.h>
#if 1
#define dbg(args...) udbg_printf(args)
......@@ -65,6 +66,11 @@ static int __init parse_numa_properties(void)
int depth;
int max_domain = 0;
if (strstr(saved_command_line, "numa=off")) {
printk(KERN_WARNING "NUMA disabled by user\n");
return -1;
}
cpu = of_find_node_by_type(NULL, "cpu");
if (!cpu)
goto err;
......
......@@ -89,9 +89,8 @@ config SMP
singleprocessor machines. On a singleprocessor machine, the kernel
will run faster if you say N here.
See also the <file:Documentation/smp.tex>,
<file:Documentation/smp.txt> and the SMP-HOWTO available at
<http://www.tldp.org/docs.html#howto>.
See also the <file:Documentation/smp.txt> and the SMP-HOWTO
available at <http://www.tldp.org/docs.html#howto>.
Even if you don't know what to do here, say Y.
......
......@@ -483,10 +483,9 @@ config SMP
People using multiprocessor machines who say Y here should also say
Y to "Enhanced Real Time Clock Support", below.
See also the <file:Documentation/smp.tex>,
<file:Documentation/smp.txt>, <file:Documentation/nmi_watchdog.txt>
and the SMP-HOWTO available at
<http://www.tldp.org/docs.html#howto>.
See also the <file:Documentation/smp.txt>,
<file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available
at <http://www.tldp.org/docs.html#howto>.
If you don't know what to do here, say N.
......@@ -522,7 +521,7 @@ config CPU_FREQ
CPU clock scaling allows you to change the clock speed of the
running CPU on the fly.
For details, take a look at <file:Documentation/cpufreq>.
For details, take a look at <file:Documentation/cpu-freq>.
If unsure, say N.
......@@ -543,7 +542,7 @@ config SH_CPU_FREQ
This adds the cpufreq driver for SuperH. At present, only
the SH-4 is supported.
For details, take a look at <file:Documentation/cpufreq>.
For details, take a look at <file:Documentation/cpu-freq>.
If unsure, say N.
......
......@@ -103,8 +103,8 @@ config SMP
Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
Management" code will be disabled if you say Y here.
See also the <file:Documentation/smp.tex>,
<file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
See also the <file:Documentation/smp.txt>,
<file:Documentation/i386/IO-APIC.txt>,
<file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
<http://www.tldp.org/docs.html#howto>.
......
......@@ -37,7 +37,7 @@
#define curptr g6
#define NR_SYSCALLS 272 /* Each OS is different... */
#define NR_SYSCALLS 273 /* Each OS is different... */
/* These are just handy. */
#define _SV save %sp, -STACKFRAME_SZ, %sp
......
......@@ -107,8 +107,8 @@ config SMP
Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
Management" code will be disabled if you say Y here.
See also the <file:Documentation/smp.tex>,
<file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
See also the <file:Documentation/smp.txt>,
<file:Documentation/i386/IO-APIC.txt>,
<file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
<http://www.tldp.org/docs.html#howto>.
......@@ -139,7 +139,7 @@ config CPU_FREQ
fly. Currently there are only sparc64 drivers for UltraSPARC-III
and UltraSPARC-IIe processors.
For details, take a look at linux/Documentation/cpufreq.
For details, take a look at linux/Documentation/cpu-freq.
If in doubt, say N.
......@@ -159,7 +159,7 @@ config US3_FREQ
help
This adds the CPUFreq driver for UltraSPARC-III processors.
For details, take a look at linux/Documentation/cpufreq.
For details, take a look at linux/Documentation/cpu-freq.
If in doubt, say N.
......@@ -169,7 +169,7 @@ config US2E_FREQ
help
This adds the CPUFreq driver for UltraSPARC-IIe processors.
For details, take a look at linux/Documentation/cpufreq.
For details, take a look at linux/Documentation/cpu-freq.
If in doubt, say N.
......
......@@ -26,7 +26,7 @@
#define curptr g6
#define NR_SYSCALLS 272 /* Each OS is different... */
#define NR_SYSCALLS 273 /* Each OS is different... */
.text
.align 32
......
......@@ -49,3 +49,4 @@ obj-$(CONFIG_ISDN) += isdn/
obj-$(CONFIG_MCA) += mca/
obj-$(CONFIG_EISA) += eisa/
obj-$(CONFIG_CPU_FREQ) += cpufreq/
obj-y += firmware/
......@@ -7,6 +7,7 @@
#include <linux/init.h>
#include <linux/cpu.h>
#include <linux/topology.h>
#include <linux/device.h>
struct sysdev_class cpu_sysdev_class = {
......@@ -14,6 +15,46 @@ struct sysdev_class cpu_sysdev_class = {
};
EXPORT_SYMBOL(cpu_sysdev_class);
#ifdef CONFIG_HOTPLUG_CPU
static ssize_t show_online(struct sys_device *dev, char *buf)
{
struct cpu *cpu = container_of(dev, struct cpu, sysdev);
return sprintf(buf, "%u\n", !!cpu_online(cpu->sysdev.id));
}
static ssize_t store_online(struct sys_device *dev, const char *buf,
size_t count)
{
struct cpu *cpu = container_of(dev, struct cpu, sysdev);
ssize_t ret;
switch (buf[0]) {
case '0':
ret = cpu_down(cpu->sysdev.id);
break;
case '1':
ret = cpu_up(cpu->sysdev.id);
break;
default:
ret = -EINVAL;
}
if (ret >= 0)
ret = count;
return ret;
}
static SYSDEV_ATTR(online, 0600, show_online, store_online);
static void __init register_cpu_control(struct cpu *cpu)
{
sysdev_create_file(&cpu->sysdev, &attr_online);
}
#else /* ... !CONFIG_HOTPLUG_CPU */
static inline void register_cpu_control(struct cpu *cpu)
{
}
#endif /* CONFIG_HOTPLUG_CPU */
/*
* register_cpu - Setup a driverfs device for a CPU.
......@@ -34,6 +75,8 @@ int __init register_cpu(struct cpu *cpu, int num, struct node *root)
error = sysfs_create_link(&root->sysdev.kobj,
&cpu->sysdev.kobj,
kobject_name(&cpu->sysdev.kobj));
if (!error)
register_cpu_control(cpu);
return error;
}
......
......@@ -44,6 +44,7 @@ obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o
obj-$(CONFIG_RAW_DRIVER) += raw.o
obj-$(CONFIG_SGI_L1_SERIAL) += sn_serial.o
obj-$(CONFIG_VIOCONS) += viocons.o
obj-$(CONFIG_VIOTAPE) += viotape.o
obj-$(CONFIG_PRINTER) += lp.o
obj-$(CONFIG_TIPAR) += tipar.o
......
......@@ -1249,7 +1249,7 @@ i2RetryFlushOutput(i2ChanStrPtr pCh)
}
if ( old_flags & STOPFL_FLAG ) {
if ( 1 == i2QueueCommands(PTYPE_INLINE, pCh, 0, 1, CMD_STOPFL) > 0 ) {
if (1 == i2QueueCommands(PTYPE_INLINE, pCh, 0, 1, CMD_STOPFL)) {
old_flags = 0; // Success - clear flags
}
......
......@@ -1640,9 +1640,8 @@ random_read(struct file * file, char * buf, size_t nbytes, loff_t *ppos)
/*
* If we gave the user some bytes, update the access time.
*/
if (count != 0) {
update_atime(file->f_dentry->d_inode);
}
if (count)
file_accessed(file);
return (count ? count : retval);
}
......
......@@ -129,7 +129,7 @@ static int ec_read16(u8 addr, u16 *value) {
}
/* Initializes the device - this comes from the AML code in the ACPI bios */
static void __devinit sonypi_type1_srs(void) {
static void sonypi_type1_srs(void) {
u32 v;
pci_read_config_dword(sonypi_device.dev, SONYPI_G10A, &v);
......@@ -151,7 +151,7 @@ static void __devinit sonypi_type1_srs(void) {
pci_write_config_dword(sonypi_device.dev, SONYPI_G10A, v);
}
static void __devinit sonypi_type2_srs(void) {
static void sonypi_type2_srs(void) {
if (sonypi_ec_write(SONYPI_SHIB, (sonypi_device.ioport1 & 0xFF00) >> 8))
printk(KERN_WARNING "ec_write failed\n");
if (sonypi_ec_write(SONYPI_SLOB, sonypi_device.ioport1 & 0x00FF))
......
......@@ -37,7 +37,7 @@
#ifdef __KERNEL__
#define SONYPI_DRIVER_MAJORVERSION 1
#define SONYPI_DRIVER_MINORVERSION 21
#define SONYPI_DRIVER_MINORVERSION 22
#define SONYPI_DEVICE_MODEL_TYPE1 1
#define SONYPI_DEVICE_MODEL_TYPE2 2
......
This diff is collapsed.
#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt.
#
menu "Firmware Drivers"
config EDD
tristate "BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)"
depends on EXPERIMENTAL
help
Say Y or M here if you want to enable BIOS Enhanced Disk Drive
Services real mode BIOS calls to determine which disk
BIOS tries boot from. This information is then exported via driverfs.
This option is experimental, but believed to be safe,
and most disk controller BIOS vendors do not yet implement this feature.
endmenu
#
# Makefile for the linux kernel.
#
obj-$(CONFIG_EDD) += edd.o
......@@ -52,7 +52,7 @@
#include <linux/pci.h>
#include <linux/device.h>
#include <linux/blkdev.h>
#include <asm/edd.h>
#include <linux/edd.h>
/* FIXME - this really belongs in include/scsi/scsi.h */
#include <../drivers/scsi/scsi.h>
#include <../drivers/scsi/hosts.h>
......@@ -658,7 +658,7 @@ struct edd_match_data {
* edd_match_scsidev()
* @edev - EDD device is a known SCSI device
* @sd - scsi_device with host who's parent is a PCI controller
*
*
* returns 1 if a match is found, 0 if not.
*/
static int edd_match_scsidev(struct device * dev, void * d)
......@@ -682,7 +682,7 @@ static int edd_match_scsidev(struct device * dev, void * d)
* edd_find_matching_device()
* @edev - edd_device to match
*
* Search the SCSI devices for a drive that matches the EDD
* Search the SCSI devices for a drive that matches the EDD
* device descriptor we have. If we find a match, return it,
* otherwise, return NULL.
*/
......
......@@ -539,6 +539,7 @@ static struct pci_device_id aec62xx_pci_tbl[] = {
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
{ 0, },
};
MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl);
static struct pci_driver driver = {
.name = "AEC62xx IDE",
......
......@@ -880,6 +880,7 @@ static struct pci_device_id alim15x3_pci_tbl[] = {
{ PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0, },
};
MODULE_DEVICE_TABLE(pci, alim15x3_pci_tbl);
static struct pci_driver driver = {
.name = "ALI15x3 IDE",
......
......@@ -467,6 +467,7 @@ static struct pci_device_id amd74xx_pci_tbl[] = {
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12 },
{ 0, },
};
MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl);
static struct pci_driver driver = {
.name = "AMD IDE",
......
......@@ -493,6 +493,7 @@ static struct pci_device_id atiixp_pci_tbl[] = {
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
static struct pci_driver driver = {
.name = "ATIIXP IDE",
......
......@@ -760,6 +760,7 @@ static struct pci_device_id cmd64x_pci_tbl[] = {
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, cmd64x_pci_tbl);
static struct pci_driver driver = {
.name = "CMD64x IDE",
......
......@@ -299,6 +299,7 @@ static struct pci_device_id cs5520_pci_tbl[] = {
{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, cs5520_pci_tbl);
static struct pci_driver driver = {
.name = "CyrixIDE",
......
......@@ -417,6 +417,7 @@ static struct pci_device_id cs5530_pci_tbl[] = {
{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, cs5530_pci_tbl);
static struct pci_driver driver = {
.name = "CS5530 IDE",
......
......@@ -441,6 +441,7 @@ static struct pci_device_id cy82c693_pci_tbl[] = {
{ PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, cy82c693_pci_tbl);
static struct pci_driver driver = {
.name = "Cypress IDE",
......
......@@ -134,6 +134,7 @@ static struct pci_device_id generic_pci_tbl[] = {
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237_SATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, generic_pci_tbl);
static struct pci_driver driver = {
.name = "PCI IDE",
......
......@@ -336,6 +336,7 @@ static struct pci_device_id hpt34x_pci_tbl[] = {
{ PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT343, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, hpt34x_pci_tbl);
static struct pci_driver driver = {
.name = "HPT34x IDE",
......
......@@ -1255,6 +1255,7 @@ static struct pci_device_id hpt366_pci_tbl[] = {
{ PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT374, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, hpt366_pci_tbl);
static struct pci_driver driver = {
.name = "HPT366 IDE",
......
......@@ -300,6 +300,7 @@ static struct pci_device_id it8172_pci_tbl[] = {
{ PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_IT8172G, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, it8172_pci_tbl);
static struct pci_driver driver = {
.name = "IT8172IDE",
......
......@@ -230,6 +230,7 @@ static struct pci_device_id ns87415_pci_tbl[] = {
{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, ns87415_pci_tbl);
static struct pci_driver driver = {
.name = "NS87415IDE",
......
......@@ -367,6 +367,7 @@ static struct pci_device_id opti621_pci_tbl[] = {
{ PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, opti621_pci_tbl);
static struct pci_driver driver = {
.name = "Opti621 IDE",
......
......@@ -530,6 +530,7 @@ static struct pci_device_id pdc202new_pci_tbl[] = {
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20277, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, pdc202new_pci_tbl);
static struct pci_driver driver = {
.name = "Promise IDE",
......
......@@ -898,6 +898,7 @@ static struct pci_device_id pdc202xx_pci_tbl[] = {
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20267, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, pdc202xx_pci_tbl);
static struct pci_driver driver = {
.name = "Promise Old IDE",
......
......@@ -807,6 +807,7 @@ static struct pci_device_id piix_pci_tbl[] = {
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 20},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, piix_pci_tbl);
static struct pci_driver driver = {
.name = "PIIX IDE",
......
......@@ -68,6 +68,7 @@ static struct pci_device_id rz1000_pci_tbl[] = {
{ PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_RZ1001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, rz1000_pci_tbl);
static struct pci_driver driver = {
.name = "RZ1000 IDE",
......
......@@ -558,6 +558,7 @@ static struct pci_device_id sc1200_pci_tbl[] = {
{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, sc1200_pci_tbl);
static struct pci_driver driver = {
.name = "SC1200 IDE",
......
......@@ -809,6 +809,7 @@ static struct pci_device_id svwks_pci_tbl[] = {
{ PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, svwks_pci_tbl);
static struct pci_driver driver = {
.name = "Serverworks IDE",
......
......@@ -790,6 +790,7 @@ static struct pci_device_id sgiioc4_pci_tbl[] = {
PCI_ANY_ID, 0x0b4000, 0xFFFFFF, 0},
{0}
};
MODULE_DEVICE_TABLE(pci, sgiioc4_pci_tbl);
static struct pci_driver driver = {
.name = "SGI-IOC4 IDE",
......
......@@ -1196,6 +1196,7 @@ static struct pci_device_id siimage_pci_tbl[] = {
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, siimage_pci_tbl);
static struct pci_driver driver = {
.name = "SiI IDE",
......
......@@ -957,6 +957,7 @@ static struct pci_device_id sis5513_pci_tbl[] = {
{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, sis5513_pci_tbl);
static struct pci_driver driver = {
.name = "SIS IDE",
......
......@@ -494,6 +494,7 @@ static struct pci_device_id sl82c105_pci_tbl[] = {
{ PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, sl82c105_pci_tbl);
static struct pci_driver driver = {
.name = "W82C105 IDE",
......
......@@ -377,6 +377,7 @@ static struct pci_device_id slc90e66_pci_tbl[] = {
{ PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, slc90e66_pci_tbl);
static struct pci_driver driver = {
.name = "SLC90e66 IDE",
......
......@@ -37,5 +37,6 @@ static struct pci_device_id triflex_pci_tbl[] = {
PCI_ANY_ID, 0, 0, 0 },
{ 0, },
};
MODULE_DEVICE_TABLE(pci, triflex_pci_tbl);
#endif /* TRIFLEX_H */
......@@ -408,6 +408,7 @@ static struct pci_device_id trm290_pci_tbl[] = {
{ PCI_VENDOR_ID_TEKRAM, PCI_DEVICE_ID_TEKRAM_DC290, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, trm290_pci_tbl);
static struct pci_driver driver = {
.name = "TRM290 IDE",
......
......@@ -621,6 +621,7 @@ static struct pci_device_id via_pci_tbl[] = {
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, via_pci_tbl);
static struct pci_driver driver = {
.name = "VIA IDE",
......
......@@ -160,13 +160,15 @@ static void rvfree(void * mem, unsigned long size) {
}
}
/* return a page table pointing to N pages of locked memory
/*
* return a page table pointing to N pages of locked memory
*
* NOTE: The meye device expects dma_addr_t size to be 32 bits
* (the toc must be exactly 1024 entries each of them being 4 bytes
* in size, the whole result being 4096 bytes). We're using here
* dma_addr_t for corectness but the compilation of this driver is
* disabled for HIGHMEM64G=y, where sizeof(dma_addr_t) != 4 */
* dma_addr_t for correctness but the compilation of this driver is
* disabled for HIGHMEM64G=y, where sizeof(dma_addr_t) != 4
*/
static int ptable_alloc(void) {
dma_addr_t *pt;
int i;
......
......@@ -31,7 +31,7 @@
#define _MEYE_PRIV_H_
#define MEYE_DRIVER_MAJORVERSION 1
#define MEYE_DRIVER_MINORVERSION 8
#define MEYE_DRIVER_MINORVERSION 9
#include <linux/config.h>
#include <linux/types.h>
......
......@@ -458,7 +458,7 @@ static inline int wait_cfg(struct net_device *dev, struct i596_cmd *cmd, int del
static void i596_display_data(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
struct i596_cmd *cmd;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
......@@ -528,7 +528,7 @@ static irqreturn_t i596_error(int irq, void *dev_id, struct pt_regs *regs)
static inline void init_rx_bufs(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
int i;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
......@@ -579,7 +579,7 @@ static inline void init_rx_bufs(struct net_device *dev)
static inline void remove_rx_bufs(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
struct i596_rbd *rbd;
int i;
......@@ -593,7 +593,7 @@ static inline void remove_rx_bufs(struct net_device *dev)
static void rebuild_rx_bufs(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
int i;
/* Ensure rx frame/buffer descriptors are tidy */
......@@ -612,7 +612,7 @@ static void rebuild_rx_bufs(struct net_device *dev)
static int init_i596_mem(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
#if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET)
short ioaddr = dev->base_addr;
#endif
......@@ -765,7 +765,7 @@ static int init_i596_mem(struct net_device *dev)
static inline int i596_rx(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
int frames = 0;
......@@ -960,7 +960,7 @@ static inline void i596_reset(struct net_device *dev, struct i596_private *lp, i
static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
int ioaddr = dev->base_addr;
unsigned long flags;
......@@ -1030,7 +1030,7 @@ static int i596_open(struct net_device *dev)
static void i596_tx_timeout (struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
int ioaddr = dev->base_addr;
/* Transmitter timeout, serious problems. */
......@@ -1059,7 +1059,7 @@ static void i596_tx_timeout (struct net_device *dev)
static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
struct tx_cmd *tx_cmd;
struct i596_tbd *tbd;
short length = skb->len;
......@@ -1245,7 +1245,7 @@ struct net_device * __init i82596_probe(int unit)
dev->priv = (void *)(dev->mem_start);
lp = netdev_priv(dev);
lp = dev->priv;
DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n",
dev->name, (unsigned long)lp,
sizeof(struct i596_private), (unsigned long)&lp->scb));
......@@ -1305,7 +1305,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
ioaddr = dev->base_addr;
lp = netdev_priv(dev);
lp = dev->priv;
spin_lock (&lp->lock);
......@@ -1448,7 +1448,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static int i596_close(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
unsigned long flags;
netif_stop_queue(dev);
......@@ -1495,7 +1495,7 @@ static int i596_close(struct net_device *dev)
static struct net_device_stats *
i596_get_stats(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
return &lp->stats;
}
......@@ -1506,7 +1506,7 @@ static struct net_device_stats *
static void set_multicast_list(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
int config = 0, cnt;
DEB(DEB_MULTI,printk(KERN_DEBUG "%s: set multicast list, %d entries, promisc %s, allmulti %s\n",
......
......@@ -2048,8 +2048,8 @@ config SK98LIN
If you want to compile this driver as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read Documentation/modules.txt. This is recommended.
The module will be called sk98lin. This is recommended.
say M here and read Documentation/kbuild/modules.txt. The module will
be called sk98lin. This is recommended.
config TIGON3
tristate "Broadcom Tigon3 support"
......
......@@ -238,7 +238,7 @@ int __init iph5526_probe(struct net_device *dev)
static int __init iph5526_probe_pci(struct net_device *dev)
{
struct fc_info *fi = netdev_priv(dev);
struct fc_info *fi = dev->priv;
fi->dev = dev;
dev->base_addr = fi->base_addr;
dev->irq = fi->irq;
......@@ -2908,7 +2908,7 @@ static int iph5526_close(struct net_device *dev)
static void iph5526_timeout(struct net_device *dev)
{
struct fc_info *fi = netdev_priv(dev);
struct fc_info *fi = dev->priv;
printk(KERN_WARNING "%s: timed out on send.\n", dev->name);
fi->fc_stats.rx_dropped++;
dev->trans_start = jiffies;
......@@ -2917,7 +2917,7 @@ static void iph5526_timeout(struct net_device *dev)
static int iph5526_send_packet(struct sk_buff *skb, struct net_device *dev)
{
struct fc_info *fi = netdev_priv(dev);
struct fc_info *fi = dev->priv;
int status = 0;
short type = 0;
u_long flags;
......@@ -3688,7 +3688,7 @@ int count = 0, j;
static struct net_device_stats * iph5526_get_stats(struct net_device *dev)
{
struct fc_info *fi = netdev_priv(dev);
struct fc_info *fi = dev->priv;
return (struct net_device_stats *) &fi->fc_stats;
}
......
......@@ -426,7 +426,7 @@ static inline void CA(struct net_device *dev)
static inline void MPU_PORT(struct net_device *dev, int c, dma_addr_t x)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
u32 v = (u32) (c) | (u32) (x);
u16 a, b;
......@@ -481,7 +481,7 @@ static inline int wait_cmd(struct net_device *dev, struct i596_private *lp, int
static void i596_display_data(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
struct i596_cmd *cmd;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
......@@ -541,7 +541,7 @@ static void i596_error(int irq, void *dev_id, struct pt_regs *regs)
static inline void init_rx_bufs(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
int i;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
......@@ -595,7 +595,7 @@ static inline void init_rx_bufs(struct net_device *dev)
static inline void remove_rx_bufs(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
struct i596_rbd *rbd;
int i;
......@@ -612,7 +612,7 @@ static inline void remove_rx_bufs(struct net_device *dev)
static void rebuild_rx_bufs(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
int i;
/* Ensure rx frame/buffer descriptors are tidy */
......@@ -633,7 +633,7 @@ static void rebuild_rx_bufs(struct net_device *dev)
static int init_i596_mem(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
unsigned long flags;
disable_irq(dev->irq); /* disable IRQs from LAN */
......@@ -727,7 +727,7 @@ static int init_i596_mem(struct net_device *dev)
static inline int i596_rx(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
int frames = 0;
......@@ -940,7 +940,7 @@ static inline void i596_reset(struct net_device *dev, struct i596_private *lp)
static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
unsigned long flags;
DEB(DEB_ADDCMD,printk("i596_add_cmd cmd_head %p\n", lp->cmd_head));
......@@ -988,7 +988,7 @@ static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd)
device list */
static int i596_test(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
volatile int *tint;
u32 data;
......@@ -1042,7 +1042,7 @@ static int i596_open(struct net_device *dev)
static void i596_tx_timeout (struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
/* Transmitter timeout, serious problems. */
DEB(DEB_ERRORS,printk("%s: transmit timed out, status resetting.\n",
......@@ -1071,7 +1071,7 @@ static void i596_tx_timeout (struct net_device *dev)
static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
struct tx_cmd *tx_cmd;
struct i596_tbd *tbd;
short length = skb->len;
......@@ -1220,7 +1220,7 @@ static int __devinit i82596_probe(struct net_device *dev,
dev->priv = (void *)(dev->mem_start);
lp = netdev_priv(dev);
lp = dev->priv;
DEB(DEB_INIT,printk ("%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n",
dev->name, (unsigned long)lp,
sizeof(struct i596_private), (unsigned long)&lp->scb));
......@@ -1250,7 +1250,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
return IRQ_NONE;
}
lp = netdev_priv(dev);
lp = dev->priv;
spin_lock (&lp->lock);
......@@ -1396,7 +1396,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static int i596_close(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
unsigned long flags;
netif_stop_queue(dev);
......@@ -1430,7 +1430,7 @@ static int i596_close(struct net_device *dev)
static struct net_device_stats *
i596_get_stats(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
return &lp->stats;
}
......@@ -1441,7 +1441,7 @@ static struct net_device_stats *
static void set_multicast_list(struct net_device *dev)
{
struct i596_private *lp = netdev_priv(dev);
struct i596_private *lp = dev->priv;
int config = 0, cnt;
DEB(DEB_MULTI,printk("%s: set multicast list, %d entries, promisc %s, allmulti %s\n", dev->name, dev->mc_count, dev->flags & IFF_PROMISC ? "ON" : "OFF", dev->flags & IFF_ALLMULTI ? "ON" : "OFF"));
......@@ -1541,7 +1541,7 @@ lan_init_chip(struct parisc_device *dev)
retval = register_netdev(netdevice);
if (retval) {
struct i596_private *lp = netdev_priv(netdevice);
struct i596_private *lp = netdevice->priv;
printk(KERN_WARNING __FILE__ ": register_netdevice ret'd %d\n", retval);
dma_free_noncoherent(lp->dev, sizeof(struct i596_private),
(void *)netdevice->mem_start, lp->dma_addr);
......@@ -1595,7 +1595,7 @@ static void __exit lasi_82596_exit(void)
unregister_netdev(netdevice);
lp = netdev_priv(netdevice);
lp = netdevice->priv;
dma_free_noncoherent(lp->dev, sizeof(struct i596_private),
(void *)netdevice->mem_start, lp->dma_addr);
free_netdev(netdevice);
......
......@@ -179,7 +179,7 @@ static dev_link_t *com20020_attach(void)
memset(info, 0, sizeof(struct com20020_dev_t));
memset(link, 0, sizeof(struct dev_link_t));
lp = netdev_priv(dev);
lp = dev->priv;
lp->timeout = timeout;
lp->backplane = backplane;
lp->clockp = clockp;
......@@ -394,7 +394,7 @@ static void com20020_config(dev_link_t *link)
goto failed;
}
lp = netdev_priv(dev);
lp = dev->priv;
lp->card_name = "PCMCIA COM20020";
lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */
......@@ -492,7 +492,7 @@ static int com20020_event(event_t event, int priority,
pcmcia_request_configuration(link->handle, &link->conf);
if (link->open) {
int ioaddr = dev->base_addr;
struct arcnet_local *lp = netdev_priv(dev);
struct arcnet_local *lp = dev->priv;
ARCRESET;
}
}
......
......@@ -722,6 +722,10 @@ static void pcnet_config(dev_link_t *link)
link->dev = &info->node;
link->state &= ~DEV_CONFIG_PENDING;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = ei_poll;
#endif
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n");
link->dev = NULL;
......
......@@ -151,7 +151,7 @@ static inline void seeq_load_eaddr(struct net_device *dev,
static int seeq_init_ring(struct net_device *dev)
{
struct sgiseeq_private *sp = netdev_priv(dev);
struct sgiseeq_private *sp = dev->priv;
volatile struct sgiseeq_init_block *ib = &sp->srings;
int i;
......@@ -423,7 +423,7 @@ static inline void sgiseeq_tx(struct net_device *dev, struct sgiseeq_private *sp
static irqreturn_t sgiseeq_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *) dev_id;
struct sgiseeq_private *sp = netdev_priv(dev);
struct sgiseeq_private *sp = dev->priv;
struct hpc3_ethregs *hregs = sp->hregs;
struct sgiseeq_regs *sregs = sp->sregs;
......@@ -445,7 +445,7 @@ static irqreturn_t sgiseeq_interrupt(int irq, void *dev_id, struct pt_regs *regs
static int sgiseeq_open(struct net_device *dev)
{
struct sgiseeq_private *sp = netdev_priv(dev);
struct sgiseeq_private *sp = dev->priv;
struct sgiseeq_regs *sregs = sp->sregs;
int err = init_seeq(dev, sp, sregs);
......@@ -459,7 +459,7 @@ static int sgiseeq_open(struct net_device *dev)
static int sgiseeq_close(struct net_device *dev)
{
struct sgiseeq_private *sp = netdev_priv(dev);
struct sgiseeq_private *sp = dev->priv;
struct sgiseeq_regs *sregs = sp->sregs;
netif_stop_queue(dev);
......@@ -472,7 +472,7 @@ static int sgiseeq_close(struct net_device *dev)
static inline int sgiseeq_reset(struct net_device *dev)
{
struct sgiseeq_private *sp = netdev_priv(dev);
struct sgiseeq_private *sp = dev->priv;
struct sgiseeq_regs *sregs = sp->sregs;
int err;
......@@ -494,7 +494,7 @@ void sgiseeq_my_reset(void)
static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct sgiseeq_private *sp = netdev_priv(dev);
struct sgiseeq_private *sp = dev->priv;
struct hpc3_ethregs *hregs = sp->hregs;
unsigned long flags;
struct sgiseeq_tx_desc *td;
......@@ -560,7 +560,7 @@ static void timeout(struct net_device *dev)
static struct net_device_stats *sgiseeq_get_stats(struct net_device *dev)
{
struct sgiseeq_private *sp = netdev_priv(dev);
struct sgiseeq_private *sp = dev->priv;
return &sp->stats;
}
......@@ -710,7 +710,7 @@ static void __exit sgiseeq_exit(void)
struct net_device *next, *dev = root_sgiseeq_dev;
while (dev) {
sp = netdev_priv(dev);
sp = dev->priv;
next = sp->next_module;
unregister_netdev(dev);
free_irq(dev->irq, dev);
......
......@@ -8,7 +8,7 @@
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
Please refer to Documentation/DocBook/tulip.{pdf,ps,html}
Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html}
for more information on this driver, or visit the project
Web page at http://sourceforge.net/projects/tulip/
......
......@@ -8,7 +8,7 @@
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
Please refer to Documentation/DocBook/tulip.{pdf,ps,html}
Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html}
for more information on this driver, or visit the project
Web page at http://sourceforge.net/projects/tulip/
......
......@@ -8,7 +8,7 @@
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
Please refer to Documentation/DocBook/tulip.{pdf,ps,html}
Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html}
for more information on this driver, or visit the project
Web page at http://sourceforge.net/projects/tulip/
......
......@@ -8,7 +8,7 @@
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
Please refer to Documentation/DocBook/tulip.{pdf,ps,html}
Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html}
for more information on this driver, or visit the project
Web page at http://sourceforge.net/projects/tulip/
......
......@@ -8,7 +8,7 @@
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
Please refer to Documentation/DocBook/tulip.{pdf,ps,html}
Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html}
for more information on this driver, or visit the project
Web page at http://sourceforge.net/projects/tulip/
......
......@@ -9,7 +9,7 @@
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
Please refer to Documentation/DocBook/tulip.{pdf,ps,html}
Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html}
for more information on this driver, or visit the project
Web page at http://sourceforge.net/projects/tulip/
......
......@@ -8,7 +8,7 @@
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
Please refer to Documentation/DocBook/tulip.{pdf,ps,html}
Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html}
for more information on this driver, or visit the project
Web page at http://sourceforge.net/projects/tulip/
......
......@@ -7,7 +7,7 @@
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
Please refer to Documentation/DocBook/tulip.{pdf,ps,html}
Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html}
for more information on this driver, or visit the project
Web page at http://sourceforge.net/projects/tulip/
......
......@@ -8,7 +8,7 @@
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
Please refer to Documentation/DocBook/tulip.{pdf,ps,html}
Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html}
for more information on this driver, or visit the project
Web page at http://sourceforge.net/projects/tulip/
......
......@@ -119,7 +119,7 @@ struct comx_debugflags_struct comx_debugflags[] = {
int comx_debug(struct net_device *dev, char *fmt, ...)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
char *page,*str;
va_list args;
int len;
......@@ -162,7 +162,7 @@ int comx_debug(struct net_device *dev, char *fmt, ...)
int comx_debug_skb(struct net_device *dev, struct sk_buff *skb, char *msg)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
if (!ch->debug_area) return 0;
if (!skb) comx_debug(dev, "%s: %s NULL skb\n\n", dev->name, msg);
......@@ -175,7 +175,7 @@ int comx_debug_bytes(struct net_device *dev, unsigned char *bytes, int len,
char *msg)
{
int pos = 0;
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
if (!ch->debug_area) return 0;
......@@ -207,7 +207,7 @@ int comx_debug_bytes(struct net_device *dev, unsigned char *bytes, int len,
static void comx_loadavg_timerfun(unsigned long d)
{
struct net_device *dev = (struct net_device *)d;
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
ch->avg_bytes[ch->loadavg_counter] = ch->current_stats->rx_bytes;
ch->avg_bytes[ch->loadavg_counter + ch->loadavg_size] =
......@@ -222,7 +222,7 @@ static void comx_loadavg_timerfun(unsigned long d)
static void comx_reset_timerfun(unsigned long d)
{
struct net_device *dev = (struct net_device *)d;
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
if(!(ch->line_status & (PROTO_LOOP | PROTO_UP))) {
if(test_and_set_bit(0,&ch->reset_pending) && ch->HW_reset) {
......@@ -236,7 +236,7 @@ static void comx_reset_timerfun(unsigned long d)
static int comx_open(struct net_device *dev)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
struct proc_dir_entry *comxdir = ch->procdir->subdir;
int ret=0;
......@@ -268,7 +268,7 @@ static int comx_open(struct net_device *dev)
static int comx_close(struct net_device *dev)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
struct proc_dir_entry *comxdir = ch->procdir->subdir;
int ret = -ENODEV;
......@@ -303,7 +303,7 @@ static int comx_close(struct net_device *dev)
void comx_status(struct net_device *dev, int status)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
#if 0
if(status & (PROTO_UP | PROTO_LOOP)) {
......@@ -321,7 +321,7 @@ void comx_status(struct net_device *dev, int status)
static int comx_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
int rc;
if (skb->len > dev->mtu + dev->hard_header_len) {
......@@ -342,7 +342,7 @@ static int comx_xmit(struct sk_buff *skb, struct net_device *dev)
static int comx_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type, void *daddr, void *saddr, unsigned len)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
if (ch->LINE_header) {
return (ch->LINE_header(skb, dev, type, daddr, saddr, len));
......@@ -354,7 +354,7 @@ static int comx_header(struct sk_buff *skb, struct net_device *dev,
static int comx_rebuild_header(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
if (ch->LINE_rebuild_header) {
return(ch->LINE_rebuild_header(skb));
......@@ -365,7 +365,7 @@ static int comx_rebuild_header(struct sk_buff *skb)
int comx_rx(struct net_device *dev, struct sk_buff *skb)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
if (ch->debug_flags & DEBUG_COMX_RX) {
comx_debug_skb(dev, skb, "comx_rx skb");
......@@ -379,7 +379,7 @@ int comx_rx(struct net_device *dev, struct sk_buff *skb)
static struct net_device_stats *comx_stats(struct net_device *dev)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
return ch->current_stats;
}
......@@ -387,7 +387,7 @@ static struct net_device_stats *comx_stats(struct net_device *dev)
void comx_lineup_func(unsigned long d)
{
struct net_device *dev = (struct net_device *)d;
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
del_timer(&ch->lineup_timer);
clear_bit(0, &ch->lineup_pending);
......@@ -405,7 +405,7 @@ void comx_lineup_func(unsigned long d)
static int comx_statistics(struct net_device *dev, char *page)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
int len = 0;
int tmp;
int i = 0;
......@@ -472,7 +472,7 @@ static int comx_statistics(struct net_device *dev, char *page)
static int comx_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
if (ch->LINE_ioctl) {
return(ch->LINE_ioctl(dev, ifr, cmd));
......@@ -535,7 +535,7 @@ static int comx_read_proc(char *page, char **start, off_t off, int count,
{
struct proc_dir_entry *file = (struct proc_dir_entry *)data;
struct net_device *dev = file->parent->data;
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
int len = 0;
if (strcmp(file->name, FILENAME_STATUS) == 0) {
......@@ -599,7 +599,7 @@ static int comx_write_proc(struct file *file, const char *buffer, u_long count,
{
struct proc_dir_entry *entry = (struct proc_dir_entry *)data;
struct net_device *dev = (struct net_device *)entry->parent->data;
struct comx_channel *ch = netdev_priv(dev);
struct comx_channel *ch = dev->priv;
char *page;
struct comx_hardware *hw = comx_channels;
struct comx_protocol *line = comx_lines;
......@@ -821,7 +821,7 @@ static int comx_mkdir(struct inode *dir, struct dentry *dentry, int mode)
if (register_netdevice(dev)) {
goto cleanup_filename_debug;
}
ch = netdev_priv(dev);
ch = dev->priv;
if((ch->if_ptr = (void *)kmalloc(sizeof(struct ppp_device),
GFP_KERNEL)) == NULL) {
goto cleanup_register;
......@@ -874,7 +874,7 @@ static int comx_rmdir(struct inode *dir, struct dentry *dentry)
lock_kernel();
dev = entry->data;
ch = netdev_priv(dev);
ch = dev->priv;
if (dev->flags & IFF_UP) {
printk(KERN_ERR "%s: down interface before removing it\n", dev->name);
unlock_kernel();
......
......@@ -639,7 +639,7 @@ static void sppp_channel_delete(struct channel_data *chan)
static int cosa_sppp_open(struct net_device *d)
{
struct channel_data *chan = netdev_priv(d);
struct channel_data *chan = d->priv;
int err;
unsigned long flags;
......@@ -679,7 +679,7 @@ static int cosa_sppp_open(struct net_device *d)
static int cosa_sppp_tx(struct sk_buff *skb, struct net_device *dev)
{
struct channel_data *chan = netdev_priv(dev);
struct channel_data *chan = dev->priv;
netif_stop_queue(dev);
......@@ -690,7 +690,7 @@ static int cosa_sppp_tx(struct sk_buff *skb, struct net_device *dev)
static void cosa_sppp_timeout(struct net_device *dev)
{
struct channel_data *chan = netdev_priv(dev);
struct channel_data *chan = dev->priv;
if (test_bit(RXBIT, &chan->cosa->rxtx)) {
chan->stats.rx_errors++;
......@@ -709,7 +709,7 @@ static void cosa_sppp_timeout(struct net_device *dev)
static int cosa_sppp_close(struct net_device *d)
{
struct channel_data *chan = netdev_priv(d);
struct channel_data *chan = d->priv;
unsigned long flags;
netif_stop_queue(d);
......@@ -789,7 +789,7 @@ static int sppp_tx_done(struct channel_data *chan, int size)
static struct net_device_stats *cosa_net_stats(struct net_device *dev)
{
struct channel_data *chan = netdev_priv(dev);
struct channel_data *chan = dev->priv;
return &chan->stats;
}
......@@ -1205,7 +1205,7 @@ static int cosa_sppp_ioctl(struct net_device *dev, struct ifreq *ifr,
int cmd)
{
int rv;
struct channel_data *chan = netdev_priv(dev);
struct channel_data *chan = dev->priv;
rv = cosa_ioctl_common(chan->cosa, chan, cmd, (unsigned long)ifr->ifr_data);
if (rv == -ENOIOCTLCMD) {
return sppp_do_ioctl(dev, ifr, cmd);
......
......@@ -577,6 +577,7 @@ islpci_alloc_memory(islpci_private *priv)
if (!(skb = dev_alloc_skb(MAX_FRAGMENT_SIZE_RX + 2))) {
/* error allocating an sk_buff structure elements */
printk(KERN_ERR "Error allocating skb.\n");
skb = NULL;
goto out_free;
}
/* add the new allocated sk_buff to the buffer array */
......@@ -711,7 +712,7 @@ islpci_setup(struct pci_dev *pdev)
#endif
/* allocate a private device structure to the network device */
priv = ndev->priv;
priv = netdev_priv(ndev);
priv->ndev = ndev;
priv->pdev = pdev;
......
......@@ -53,6 +53,8 @@
#include <linux/spinlock.h>
#include <linux/kmod.h>
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/cpu.h>
#include <scsi/scsi_host.h>
#include "scsi.h"
......@@ -1130,6 +1132,38 @@ int scsi_device_cancel(struct scsi_device *sdev, int recovery)
return 0;
}
#ifdef CONFIG_HOTPLUG_CPU
static int scsi_cpu_notify(struct notifier_block *self,
unsigned long action, void *hcpu)
{
int cpu = (unsigned long)hcpu;
switch(action) {
case CPU_DEAD:
/* Drain scsi_done_q. */
local_irq_disable();
list_splice_init(&per_cpu(scsi_done_q, cpu),
&__get_cpu_var(scsi_done_q));
raise_softirq_irqoff(SCSI_SOFTIRQ);
local_irq_enable();
break;
default:
break;
}
return NOTIFY_OK;
}
static struct notifier_block __devinitdata scsi_cpu_nb = {
.notifier_call = scsi_cpu_notify,
};
#define register_scsi_cpu() register_cpu_notifier(&scsi_cpu_nb)
#define unregister_scsi_cpu() unregister_cpu_notifier(&scsi_cpu_nb)
#else
#define register_scsi_cpu()
#define unregister_scsi_cpu()
#endif /* CONFIG_HOTPLUG_CPU */
MODULE_DESCRIPTION("SCSI core");
MODULE_LICENSE("GPL");
......@@ -1164,6 +1198,7 @@ static int __init init_scsi(void)
devfs_mk_dir("scsi");
open_softirq(SCSI_SOFTIRQ, scsi_softirq, NULL);
register_scsi_cpu();
printk(KERN_NOTICE "SCSI subsystem initialized\n");
return 0;
......@@ -1191,6 +1226,7 @@ static void __exit exit_scsi(void)
devfs_remove("scsi");
scsi_exit_procfs();
scsi_exit_queue();
unregister_scsi_cpu();
}
subsys_initcall(init_scsi);
......
......@@ -390,7 +390,7 @@ static int __devinit serial_pnp_guess_board(struct pnp_dev *dev, int *flags)
return -ENODEV;
}
static int
static int __devinit
serial_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id)
{
struct serial_struct serial_req;
......@@ -420,7 +420,7 @@ serial_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id)
}
static void serial_pnp_remove(struct pnp_dev * dev)
static void __devexit serial_pnp_remove(struct pnp_dev * dev)
{
int line = (int)pnp_get_drvdata(dev);
if (line)
......
......@@ -202,4 +202,4 @@ config USB_W9968CF
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called w9968cf.o. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
module, say M here and read <file:Documentation/kbuild/modules.txt>.
......@@ -3024,6 +3024,26 @@ init_buffer_head(void *data, kmem_cache_t *cachep, unsigned long flags)
}
}
#ifdef CONFIG_HOTPLUG_CPU
static void buffer_exit_cpu(int cpu)
{
int i;
struct bh_lru *b = &per_cpu(bh_lrus, cpu);
for (i = 0; i < BH_LRU_SIZE; i++) {
brelse(b->bhs[i]);
b->bhs[i] = NULL;
}
}
static int buffer_cpu_notify(struct notifier_block *self,
unsigned long action, void *hcpu)
{
if (action == CPU_DEAD)
buffer_exit_cpu((unsigned long)hcpu);
return NOTIFY_OK;
}
#endif /* CONFIG_HOTPLUG_CPU */
void __init buffer_init(void)
{
......@@ -3041,6 +3061,7 @@ void __init buffer_init(void)
*/
nrpages = (nr_free_buffer_pages() * 10) / 100;
max_buffer_heads = nrpages * (PAGE_SIZE / sizeof(struct buffer_head));
hotcpu_notifier(buffer_cpu_notify, 0);
}
EXPORT_SYMBOL(__bforget);
......
......@@ -512,7 +512,7 @@ int coda_readdir(struct file *coda_file, void *dirent, filldir_t filldir)
ret = -ENOENT;
if (!IS_DEADDIR(host_inode)) {
ret = host_file->f_op->readdir(host_file, filldir, dirent);
update_atime(host_inode);
file_accessed(host_file);
}
}
out:
......
......@@ -293,11 +293,11 @@ static long do_fcntl(unsigned int fd, unsigned int cmd,
err = dupfd(filp, arg);
break;
case F_GETFD:
err = get_close_on_exec(fd);
err = get_close_on_exec(fd) ? FD_CLOEXEC : 0;
break;
case F_SETFD:
err = 0;
set_close_on_exec(fd, arg&1);
set_close_on_exec(fd, arg & FD_CLOEXEC);
break;
case F_GETFL:
err = filp->f_flags;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment