Commit 0713f029 authored by Linus Torvalds's avatar Linus Torvalds

v2.5.2.1.1 -> v2.5.2.2

- Al Viro: fix new_inode() allocation
- undo initcall update
- cciss driver update
parent 468e6d17
...@@ -1097,8 +1097,6 @@ void __init ecard_init(void) ...@@ -1097,8 +1097,6 @@ void __init ecard_init(void)
ecard_proc_init(); ecard_proc_init();
} }
subsys_initcall(ecard_init);
EXPORT_SYMBOL(ecard_startfind); EXPORT_SYMBOL(ecard_startfind);
EXPORT_SYMBOL(ecard_find); EXPORT_SYMBOL(ecard_find);
EXPORT_SYMBOL(ecard_readchunk); EXPORT_SYMBOL(ecard_readchunk);
......
...@@ -311,8 +311,6 @@ void __init mca_init(void) ...@@ -311,8 +311,6 @@ void __init mca_init(void)
#endif #endif
} }
subsys_initcall(mca_init);
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void mca_handle_nmi_slot(int slot, int check_flag) static void mca_handle_nmi_slot(int slot, int check_flag)
......
...@@ -48,15 +48,7 @@ SECTIONS ...@@ -48,15 +48,7 @@ SECTIONS
.setup.init : { *(.setup.init) } .setup.init : { *(.setup.init) }
__setup_end = .; __setup_end = .;
__initcall_start = .; __initcall_start = .;
.initcall.init : { .initcall.init : { *(.initcall.init) }
*(.initcall1.init)
*(.initcall2.init)
*(.initcall3.init)
*(.initcall4.init)
*(.initcall5.init)
*(.initcall6.init)
*(.initcall7.init)
}
__initcall_end = .; __initcall_end = .;
. = ALIGN(4096); . = ALIGN(4096);
__init_end = .; __init_end = .;
......
...@@ -535,8 +535,6 @@ void __init ppc_init(void) ...@@ -535,8 +535,6 @@ void __init ppc_init(void)
} }
} }
subsys_initcall(ppc_init);
/* Warning, IO base is not yet inited */ /* Warning, IO base is not yet inited */
void __init setup_arch(char **cmdline_p) void __init setup_arch(char **cmdline_p)
{ {
......
This diff is collapsed.
...@@ -46,6 +46,8 @@ struct ctlr_info ...@@ -46,6 +46,8 @@ struct ctlr_info
__u32 board_id; __u32 board_id;
ulong vaddr; ulong vaddr;
__u32 paddr; __u32 paddr;
unsigned long io_mem_addr;
unsigned long io_mem_length;
CfgTable_struct *cfgtable; CfgTable_struct *cfgtable;
int intr; int intr;
...@@ -53,6 +55,7 @@ struct ctlr_info ...@@ -53,6 +55,7 @@ struct ctlr_info
int commands_outstanding; int commands_outstanding;
int max_outstanding; /* Debug */ int max_outstanding; /* Debug */
int num_luns; int num_luns;
int highest_lun;
int usage_count; /* number of opens all all minor devices */ int usage_count; /* number of opens all all minor devices */
// information about each logical volume // information about each logical volume
......
...@@ -124,6 +124,12 @@ typedef struct _ReadCapdata_struct ...@@ -124,6 +124,12 @@ typedef struct _ReadCapdata_struct
#define CCISS_READ 0x28 // Read(10) #define CCISS_READ 0x28 // Read(10)
#define CCISS_WRITE 0x2a // Write(10) #define CCISS_WRITE 0x2a // Write(10)
// BMIC commands
#define BMIC_READ 0x26
#define BMIC_WRITE 0x27
#define BMIC_CACHE_FLUSH 0xc2
#define CCISS_CACHE_FLUSH 0x01 //C2 was already being used by CCISS
//Command List Structure //Command List Structure
typedef union _SCSI3Addr_struct { typedef union _SCSI3Addr_struct {
struct { struct {
......
...@@ -1709,11 +1709,7 @@ int __init blk_dev_init(void) ...@@ -1709,11 +1709,7 @@ int __init blk_dev_init(void)
printk("block: %d slots per queue, batch=%d\n", queue_nr_requests, batch_requests); printk("block: %d slots per queue, batch=%d\n", queue_nr_requests, batch_requests);
blk_max_low_pfn = max_low_pfn; blk_max_low_pfn = max_low_pfn;
#ifdef CONFIG_HIGHMEM
blk_max_pfn = max_pfn; blk_max_pfn = max_pfn;
#else
blk_max_pfn = max_low_pfn;
#endif
#if defined(CONFIG_IDE) && defined(CONFIG_BLK_DEV_IDE) #if defined(CONFIG_IDE) && defined(CONFIG_BLK_DEV_IDE)
ide_init(); /* this MUST precede hd_init */ ide_init(); /* this MUST precede hd_init */
......
...@@ -208,8 +208,6 @@ void __init dio_init(void) ...@@ -208,8 +208,6 @@ void __init dio_init(void)
} }
} }
subsys_initcall(dio_init);
/* Bear in mind that this is called in the very early stages of initialisation /* Bear in mind that this is called in the very early stages of initialisation
* in order to get the virtual address of the serial port for the console... * in order to get the virtual address of the serial port for the console...
*/ */
......
...@@ -1039,5 +1039,3 @@ void __init nubus_init(void) ...@@ -1039,5 +1039,3 @@ void __init nubus_init(void)
nubus_proc_init(); nubus_proc_init();
#endif #endif
} }
subsys_initcall(nubus_init);
...@@ -1929,7 +1929,7 @@ pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t dma) ...@@ -1929,7 +1929,7 @@ pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t dma)
} }
static int __devinit pci_init(void) void __devinit pci_init(void)
{ {
struct pci_dev *dev; struct pci_dev *dev;
...@@ -1942,7 +1942,6 @@ static int __devinit pci_init(void) ...@@ -1942,7 +1942,6 @@ static int __devinit pci_init(void)
#ifdef CONFIG_PM #ifdef CONFIG_PM
pm_register(PM_PCI_DEV, 0, pci_pm_callback); pm_register(PM_PCI_DEV, 0, pci_pm_callback);
#endif #endif
return 0;
} }
static int __devinit pci_setup(char *str) static int __devinit pci_setup(char *str)
...@@ -1960,8 +1959,6 @@ static int __devinit pci_setup(char *str) ...@@ -1960,8 +1959,6 @@ static int __devinit pci_setup(char *str)
return 1; return 1;
} }
subsys_initcall(pci_init);
__setup("pci=", pci_setup); __setup("pci=", pci_setup);
EXPORT_SYMBOL(pci_read_config_byte); EXPORT_SYMBOL(pci_read_config_byte);
......
...@@ -966,10 +966,13 @@ int __init init_pcmcia_ds(void) ...@@ -966,10 +966,13 @@ int __init init_pcmcia_ds(void)
return 0; return 0;
} }
late_initcall(init_pcmcia_ds);
#ifdef MODULE #ifdef MODULE
int __init init_module(void)
{
return init_pcmcia_ds();
}
void __exit cleanup_module(void) void __exit cleanup_module(void)
{ {
int i; int i;
......
...@@ -2356,10 +2356,13 @@ int __init isapnp_init(void) ...@@ -2356,10 +2356,13 @@ int __init isapnp_init(void)
return 0; return 0;
} }
subsys_initcall(isapnp_init);
#ifdef MODULE #ifdef MODULE
int init_module(void)
{
return isapnp_init();
}
void cleanup_module(void) void cleanup_module(void)
{ {
if (isapnp_detected) if (isapnp_detected)
......
...@@ -509,5 +509,3 @@ void __init sbus_init(void) ...@@ -509,5 +509,3 @@ void __init sbus_init(void)
} }
#endif #endif
} }
subsys_initcall(sbus_init);
...@@ -236,8 +236,6 @@ void __init tc_init(void) ...@@ -236,8 +236,6 @@ void __init tc_init(void)
} }
} }
subsys_initcall(tc_init);
EXPORT_SYMBOL(search_tc_card); EXPORT_SYMBOL(search_tc_card);
EXPORT_SYMBOL(claim_tc_card); EXPORT_SYMBOL(claim_tc_card);
EXPORT_SYMBOL(release_tc_card); EXPORT_SYMBOL(release_tc_card);
......
...@@ -170,7 +170,6 @@ void __init zorro_init(void) ...@@ -170,7 +170,6 @@ void __init zorro_init(void)
m68k_memory[i].addr+m68k_memory[i].size, 0); m68k_memory[i].addr+m68k_memory[i].size, 0);
} }
subsys_initcall(zorro_init);
EXPORT_SYMBOL(zorro_find_device); EXPORT_SYMBOL(zorro_find_device);
EXPORT_SYMBOL(zorro_unused_z2ram); EXPORT_SYMBOL(zorro_unused_z2ram);
......
...@@ -220,17 +220,19 @@ static int block_fsync(struct file *filp, struct dentry *dentry, int datasync) ...@@ -220,17 +220,19 @@ static int block_fsync(struct file *filp, struct dentry *dentry, int datasync)
static struct super_block *bd_read_super(struct super_block *sb, void *data, int silent) static struct super_block *bd_read_super(struct super_block *sb, void *data, int silent)
{ {
static struct super_operations sops = {}; static struct super_operations sops = {};
struct inode *root = new_inode(sb); struct inode *root;
if (!root)
return NULL;
root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR;
root->i_uid = root->i_gid = 0;
root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME;
sb->s_maxbytes = ~0ULL; sb->s_maxbytes = ~0ULL;
sb->s_blocksize = 1024; sb->s_blocksize = 1024;
sb->s_blocksize_bits = 10; sb->s_blocksize_bits = 10;
sb->s_magic = 0x62646576; sb->s_magic = 0x62646576;
sb->s_op = &sops; sb->s_op = &sops;
root = new_inode(sb);
if (!root)
return NULL;
root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR;
root->i_uid = root->i_gid = 0;
root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME;
sb->s_root = d_alloc(NULL, &(const struct qstr) { "bdev:", 5, 0 }); sb->s_root = d_alloc(NULL, &(const struct qstr) { "bdev:", 5, 0 });
if (!sb->s_root) { if (!sb->s_root) {
iput(root); iput(root);
......
...@@ -139,6 +139,11 @@ struct super_block *devpts_read_super(struct super_block *s, void *data, ...@@ -139,6 +139,11 @@ struct super_block *devpts_read_super(struct super_block *s, void *data,
printk("devpts: called with bogus options\n"); printk("devpts: called with bogus options\n");
goto fail_free; goto fail_free;
} }
s->u.generic_sbp = (void *) sbi;
s->s_blocksize = 1024;
s->s_blocksize_bits = 10;
s->s_magic = DEVPTS_SUPER_MAGIC;
s->s_op = &devpts_sops;
inode = new_inode(s); inode = new_inode(s);
if (!inode) if (!inode)
...@@ -153,11 +158,6 @@ struct super_block *devpts_read_super(struct super_block *s, void *data, ...@@ -153,11 +158,6 @@ struct super_block *devpts_read_super(struct super_block *s, void *data,
inode->i_fop = &devpts_root_operations; inode->i_fop = &devpts_root_operations;
inode->i_nlink = 2; inode->i_nlink = 2;
s->u.generic_sbp = (void *) sbi;
s->s_blocksize = 1024;
s->s_blocksize_bits = 10;
s->s_magic = DEVPTS_SUPER_MAGIC;
s->s_op = &devpts_sops;
s->s_root = d_alloc_root(inode); s->s_root = d_alloc_root(inode);
if (s->s_root) if (s->s_root)
return s; return s;
......
...@@ -608,16 +608,18 @@ static struct super_operations pipefs_ops = { ...@@ -608,16 +608,18 @@ static struct super_operations pipefs_ops = {
static struct super_block * pipefs_read_super(struct super_block *sb, void *data, int silent) static struct super_block * pipefs_read_super(struct super_block *sb, void *data, int silent)
{ {
struct inode *root = new_inode(sb); struct inode *root;
sb->s_blocksize = 1024;
sb->s_blocksize_bits = 10;
sb->s_magic = PIPEFS_MAGIC;
sb->s_op = &pipefs_ops;
root = new_inode(sb);
if (!root) if (!root)
return NULL; return NULL;
root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR; root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR;
root->i_uid = root->i_gid = 0; root->i_uid = root->i_gid = 0;
root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME; root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME;
sb->s_blocksize = 1024;
sb->s_blocksize_bits = 10;
sb->s_magic = PIPEFS_MAGIC;
sb->s_op = &pipefs_ops;
sb->s_root = d_alloc(NULL, &(const struct qstr) { "pipe:", 5, 0 }); sb->s_root = d_alloc(NULL, &(const struct qstr) { "pipe:", 5, 0 });
if (!sb->s_root) { if (!sb->s_root) {
iput(root); iput(root);
......
...@@ -184,6 +184,11 @@ typedef struct _IOCTL_Command_struct { ...@@ -184,6 +184,11 @@ typedef struct _IOCTL_Command_struct {
#define CCISS_GETDRIVVER _IOR(CCISS_IOC_MAGIC, 9, DriverVer_type) #define CCISS_GETDRIVVER _IOR(CCISS_IOC_MAGIC, 9, DriverVer_type)
#define CCISS_REVALIDVOLS _IO(CCISS_IOC_MAGIC, 10) #define CCISS_REVALIDVOLS _IO(CCISS_IOC_MAGIC, 10)
#define CCISS_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 11, IOCTL_Command_struct) #define CCISS_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 11, IOCTL_Command_struct)
#define CCISS_DEREGDISK _IO(CCISS_IOC_MAGIC, 12)
/* no longer used... use REGNEWD instead */
#define CCISS_REGNEWDISK _IOW(CCISS_IOC_MAGIC, 13, int)
#define CCISS_REGNEWD _IO(CCISS_IOC_MAGIC, 14)
#endif #endif
...@@ -50,26 +50,8 @@ typedef void (*exitcall_t)(void); ...@@ -50,26 +50,8 @@ typedef void (*exitcall_t)(void);
extern initcall_t __initcall_start, __initcall_end; extern initcall_t __initcall_start, __initcall_end;
/* initcalls are now grouped by functionality into separate #define __initcall(fn) \
* subsections. Ordering inside the subsections is determined static initcall_t __initcall_##fn __init_call = fn
* by link order.
* For backwards compatability, initcall() puts the call in
* the device init subsection.
*/
#define __define_initcall(level,fn) \
static initcall_t __initcall_##fn __attribute__ ((unused,__section__ (".initcall" level ".init"))) = fn
#define early_arch_initcall(fn) __define_initcall("1",fn)
#define mem_initcall(fn) __define_initcall("2",fn)
#define subsys_initcall(fn) __define_initcall("3",fn)
#define arch_initcall(fn) __define_initcall("4",fn)
#define fs_initcall(fn) __define_initcall("5",fn)
#define device_initcall(fn) __define_initcall("6",fn)
#define late_initcall(fn) __define_initcall("7",fn)
#define __initcall(fn) device_initcall(fn)
#define __exitcall(fn) \ #define __exitcall(fn) \
static exitcall_t __exitcall_##fn __exit_call = fn static exitcall_t __exitcall_##fn __exit_call = fn
...@@ -98,7 +80,7 @@ extern struct kernel_param __setup_start, __setup_end; ...@@ -98,7 +80,7 @@ extern struct kernel_param __setup_start, __setup_end;
#define __initdata __attribute__ ((__section__ (".data.init"))) #define __initdata __attribute__ ((__section__ (".data.init")))
#define __exitdata __attribute__ ((unused, __section__ (".data.exit"))) #define __exitdata __attribute__ ((unused, __section__ (".data.exit")))
#define __initsetup __attribute__ ((unused,__section__ (".setup.init"))) #define __initsetup __attribute__ ((unused,__section__ (".setup.init")))
#define __init_call(level) __attribute__ ((unused,__section__ (".initcall" level ".init"))) #define __init_call __attribute__ ((unused,__section__ (".initcall.init")))
#define __exit_call __attribute__ ((unused,__section__ (".exitcall.exit"))) #define __exit_call __attribute__ ((unused,__section__ (".exitcall.exit")))
/* For assembly routines */ /* For assembly routines */
...@@ -159,14 +141,6 @@ typedef void (*__cleanup_module_func_t)(void); ...@@ -159,14 +141,6 @@ typedef void (*__cleanup_module_func_t)(void);
#define __setup(str,func) /* nothing */ #define __setup(str,func) /* nothing */
#define early_arch_initcall(fn) module_init(fn)
#define mem_initcall(fn) module_init(fn)
#define subsys_initcall(fn) module_init(fn)
#define arch_initcall(fn) module_init(fn)
#define fs_initcall(fn) module_init(fn)
#define device_initcall(fn) module_init(fn)
#define late_initcall(fn) module_init(fn)
#endif #endif
#ifdef CONFIG_HOTPLUG #ifdef CONFIG_HOTPLUG
......
...@@ -525,6 +525,7 @@ int pcibios_find_device (unsigned short vendor, unsigned short dev_id, ...@@ -525,6 +525,7 @@ int pcibios_find_device (unsigned short vendor, unsigned short dev_id,
/* Generic PCI functions used internally */ /* Generic PCI functions used internally */
void pci_init(void);
int pci_bus_exists(const struct list_head *list, int nr); int pci_bus_exists(const struct list_head *list, int nr);
struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata); struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata);
struct pci_bus *pci_alloc_primary_bus(int bus); struct pci_bus *pci_alloc_primary_bus(int bus);
......
...@@ -38,10 +38,35 @@ ...@@ -38,10 +38,35 @@
#include <asm/ccwcache.h> #include <asm/ccwcache.h>
#endif #endif
#ifdef CONFIG_PCI
#include <linux/pci.h>
#endif
#ifdef CONFIG_DIO
#include <linux/dio.h>
#endif
#ifdef CONFIG_ZORRO
#include <linux/zorro.h>
#endif
#ifdef CONFIG_MTRR #ifdef CONFIG_MTRR
# include <asm/mtrr.h> # include <asm/mtrr.h>
#endif #endif
#ifdef CONFIG_NUBUS
#include <linux/nubus.h>
#endif
#ifdef CONFIG_ISAPNP
#include <linux/isapnp.h>
#endif
#ifdef CONFIG_IRDA
extern int irda_proto_init(void);
extern int irda_device_init(void);
#endif
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
#include <asm/smp.h> #include <asm/smp.h>
#endif #endif
...@@ -67,8 +92,10 @@ extern void sock_init(void); ...@@ -67,8 +92,10 @@ extern void sock_init(void);
extern void fork_init(unsigned long); extern void fork_init(unsigned long);
extern void mca_init(void); extern void mca_init(void);
extern void sbus_init(void); extern void sbus_init(void);
extern void ppc_init(void);
extern void sysctl_init(void); extern void sysctl_init(void);
extern void signals_init(void); extern void signals_init(void);
extern int init_pcmcia_ds(void);
extern void free_initmem(void); extern void free_initmem(void);
...@@ -76,6 +103,8 @@ extern void free_initmem(void); ...@@ -76,6 +103,8 @@ extern void free_initmem(void);
extern void tc_init(void); extern void tc_init(void);
#endif #endif
extern void ecard_init(void);
#if defined(CONFIG_SYSVIPC) #if defined(CONFIG_SYSVIPC)
extern void ipc_init(void); extern void ipc_init(void);
#endif #endif
...@@ -461,11 +490,50 @@ static void __init do_basic_setup(void) ...@@ -461,11 +490,50 @@ static void __init do_basic_setup(void)
/* bring up the device tree */ /* bring up the device tree */
device_driver_init(); device_driver_init();
#ifdef CONFIG_PCI
pci_init();
#endif
#ifdef CONFIG_SBUS
sbus_init();
#endif
#if defined(CONFIG_PPC)
ppc_init();
#endif
#ifdef CONFIG_MCA
mca_init();
#endif
#ifdef CONFIG_ARCH_ACORN
ecard_init();
#endif
#ifdef CONFIG_ZORRO
zorro_init();
#endif
#ifdef CONFIG_DIO
dio_init();
#endif
#ifdef CONFIG_NUBUS
nubus_init();
#endif
#ifdef CONFIG_ISAPNP
isapnp_init();
#endif
#ifdef CONFIG_TC
tc_init();
#endif
/* Networking initialization needs a process context */ /* Networking initialization needs a process context */
sock_init(); sock_init();
start_context_thread(); start_context_thread();
do_initcalls(); do_initcalls();
#ifdef CONFIG_IRDA
irda_proto_init();
irda_device_init(); /* Must be done after protocol initialization */
#endif
#ifdef CONFIG_PCMCIA
init_pcmcia_ds(); /* Do this last */
#endif
} }
extern void prepare_namespace(void); extern void prepare_namespace(void);
......
...@@ -2590,11 +2590,14 @@ int __init irda_proto_init(void) ...@@ -2590,11 +2590,14 @@ int __init irda_proto_init(void)
register_netdevice_notifier(&irda_dev_notifier); register_netdevice_notifier(&irda_dev_notifier);
irda_init(); irda_init();
irda_device_init(); #ifdef MODULE
irda_device_init(); /* Called by init/main.c when non-modular */
#endif
return 0; return 0;
} }
#ifdef MODULE
late_initcall(irda_proto_init); module_init(irda_proto_init); /* If non-module, called from init/main.c */
#endif
/* /*
* Function irda_proto_cleanup (void) * Function irda_proto_cleanup (void)
......
...@@ -278,16 +278,17 @@ static struct super_operations sockfs_ops = { ...@@ -278,16 +278,17 @@ static struct super_operations sockfs_ops = {
static struct super_block * sockfs_read_super(struct super_block *sb, void *data, int silent) static struct super_block * sockfs_read_super(struct super_block *sb, void *data, int silent)
{ {
struct inode *root = new_inode(sb); struct inode *root;
sb->s_blocksize = 1024;
sb->s_blocksize_bits = 10;
sb->s_magic = SOCKFS_MAGIC;
sb->s_op = &sockfs_ops;
root = new_inode(sb);
if (!root) if (!root)
return NULL; return NULL;
root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR; root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR;
root->i_uid = root->i_gid = 0; root->i_uid = root->i_gid = 0;
root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME; root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME;
sb->s_blocksize = 1024;
sb->s_blocksize_bits = 10;
sb->s_magic = SOCKFS_MAGIC;
sb->s_op = &sockfs_ops;
sb->s_root = d_alloc(NULL, &(const struct qstr) { "socket:", 7, 0 }); sb->s_root = d_alloc(NULL, &(const struct qstr) { "socket:", 7, 0 });
if (!sb->s_root) { if (!sb->s_root) {
iput(root); iput(root);
......
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