diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-09-08 18:41:49 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-09-08 18:41:49 -0700 |
| commit | d4cddb795d19f1ed3bdaa216f8be4e8b1034843c (patch) | |
| tree | decaab32244e646d049e4663789505fbaad2b8ba /include/linux | |
| parent | f9506f4d7e4d06ca6f7006d8156ef6ba08ff1f1d (diff) | |
| parent | b32c3a0cc6c27e43c1b6dbbc840bbd569c5f84cc (diff) | |
Merge bk://thebsh.namesys.com/bk/reiser3-linux-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blkdev.h | 3 | ||||
| -rw-r--r-- | include/linux/genhd.h | 33 | ||||
| -rw-r--r-- | include/linux/highmem.h | 4 | ||||
| -rw-r--r-- | include/linux/ide.h | 3 | ||||
| -rw-r--r-- | include/linux/init_task.h | 5 | ||||
| -rw-r--r-- | include/linux/pci.h | 10 | ||||
| -rw-r--r-- | include/linux/preempt.h | 10 | ||||
| -rw-r--r-- | include/linux/raid/md.h | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 53 |
9 files changed, 71 insertions, 51 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 9f1ac6d07fe8..a11b6181c76f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -281,10 +281,7 @@ struct sec_size { extern struct sec_size * blk_sec[MAX_BLKDEV]; extern struct blk_dev_struct blk_dev[MAX_BLKDEV]; -extern void grok_partitions(kdev_t dev, long size); -extern int wipe_partitions(kdev_t dev); extern void register_disk(struct gendisk *dev, kdev_t first, unsigned minors, struct block_device_operations *ops, long size); -extern void check_partition(struct gendisk *disk, struct block_device *bdev); extern void generic_make_request(struct bio *bio); extern inline request_queue_t *bdev_get_queue(struct block_device *bdev); extern void blk_put_request(struct request *); diff --git a/include/linux/genhd.h b/include/linux/genhd.h index fd9f5a8d7c06..ecd747fbe569 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -62,11 +62,12 @@ struct hd_struct { unsigned long start_sect; unsigned long nr_sects; devfs_handle_t de; /* primary (master) devfs entry */ - int number; /* stupid old code wastes space */ struct device hd_driverfs_dev; /* support driverfs hiearchy */ }; #define GENHD_FL_REMOVABLE 1 +#define GENHD_FL_DRIVERFS 2 +#define GENHD_FL_DEVFS 4 struct gendisk { int major; /* major number of driver */ @@ -76,24 +77,35 @@ struct gendisk { get real minor */ struct hd_struct *part; /* [indexed by minor] */ - int nr_real; /* number of real devices */ - struct gendisk *next; struct block_device_operations *fops; - - devfs_handle_t *de_arr; /* one per physical disc */ - struct device **driverfs_dev_arr;/* support driverfs hierarchy */ - char *flags; /* one per physical disc */ + sector_t capacity; + + int flags; + int number; /* devfs crap */ + devfs_handle_t de; /* more of the same */ + devfs_handle_t disk_de; /* piled higher and deeper */ + struct device *driverfs_dev; + struct device disk_dev; }; /* drivers/block/genhd.c */ extern void add_gendisk(struct gendisk *gp); extern void del_gendisk(struct gendisk *gp); +extern void unlink_gendisk(struct gendisk *gp); extern struct gendisk *get_gendisk(kdev_t dev); static inline unsigned long get_start_sect(struct block_device *bdev) { return bdev->bd_offset; } +static inline sector_t get_capacity(struct gendisk *disk) +{ + return disk->capacity; +} +static inline void set_capacity(struct gendisk *disk, sector_t size) +{ + disk->capacity = size; +} #endif /* __KERNEL__ */ @@ -242,11 +254,10 @@ struct unixware_disklabel { #ifdef __KERNEL__ -char *disk_name (struct gendisk *hd, int minor, char *buf); +char *disk_name (struct gendisk *hd, int part, char *buf); -extern void devfs_register_partitions (struct gendisk *dev, int minor, - int unregister); -extern void driverfs_remove_partitions (struct gendisk *hd, int minor); +extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); +extern void update_partition(struct gendisk *disk, int part); static inline unsigned int disk_index (kdev_t dev) { diff --git a/include/linux/highmem.h b/include/linux/highmem.h index b389a75be5d7..370177037315 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -24,8 +24,8 @@ static inline void *kmap(struct page *page) { return page_address(page); } #define kunmap(page) do { (void) (page); } while (0) -#define kmap_atomic(page,idx) kmap(page) -#define kunmap_atomic(page,idx) kunmap(page) +#define kmap_atomic(page, idx) page_address(page) +#define kunmap_atomic(addr, idx) do { } while (0) #endif /* CONFIG_HIGHMEM */ diff --git a/include/linux/ide.h b/include/linux/ide.h index 98a2db1db397..1843237adf4a 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -506,7 +506,6 @@ typedef struct ide_drive_s { unsigned int drive_data; /* for use by tuneproc/selectproc as needed */ struct hwif_s *hwif; /* actually (ide_hwif_t *) */ struct hd_driveid *id; /* drive model identification info */ - struct hd_struct *part; /* drive partition table */ char name[4]; /* drive name, such as "hda" */ struct ide_driver_s *driver; /* (ide_driver_t *) */ void *driver_data; /* extra driver data */ @@ -528,6 +527,7 @@ typedef struct ide_drive_s { unsigned int failures; /* current failure count */ unsigned int max_failures; /* maximum allowed failure count */ struct list_head list; + struct gendisk *disk; } ide_drive_t; /* @@ -714,7 +714,6 @@ typedef struct hwif_s { */ hw_regs_t hw; /* Hardware info */ ide_drive_t drives[MAX_DRIVES]; /* drive info */ - struct gendisk *gd[MAX_DRIVES];/* gendisk structure */ int addressing; /* hosts addressing */ void (*tuneproc)(ide_drive_t *, byte); /* routine to tune PIO mode for drives */ int (*speedproc)(ide_drive_t *, byte); /* routine to retune DMA modes for drives */ diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 80a57914bccc..bdf03241a009 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -29,10 +29,11 @@ .mmlist = LIST_HEAD_INIT(name.mmlist), \ } -#define INIT_SIGNALS { \ +#define INIT_SIGNALS(sig) { \ .count = ATOMIC_INIT(1), \ .action = { {{0,}}, }, \ - .siglock = SPIN_LOCK_UNLOCKED \ + .siglock = SPIN_LOCK_UNLOCKED, \ + .shared_pending = { NULL, &sig.shared_pending.head, {{0}}}, \ } /* diff --git a/include/linux/pci.h b/include/linux/pci.h index 3c76341f02bf..b82ec8e41174 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -386,6 +386,9 @@ struct pci_dev { int ro; /* ISAPnP: read only */ unsigned short regs; /* ISAPnP: supported registers */ + /* These fields are used by common fixups */ + unsigned short transparent:1; /* Transparent PCI bridge */ + int (*prepare)(struct pci_dev *dev); /* ISAPnP hooks */ int (*activate)(struct pci_dev *dev); int (*deactivate)(struct pci_dev *dev); @@ -406,6 +409,10 @@ struct pci_dev { #define PCI_ROM_RESOURCE 6 #define PCI_BRIDGE_RESOURCES 7 #define PCI_NUM_RESOURCES 11 + +#ifndef PCI_BUS_NUM_RESOURCES +#define PCI_BUS_NUM_RESOURCES 4 +#endif #define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ @@ -415,7 +422,8 @@ struct pci_bus { struct list_head children; /* list of child buses */ struct list_head devices; /* list of devices on this bus */ struct pci_dev *self; /* bridge device as seen by parent */ - struct resource *resource[4]; /* address space routed to this bus */ + struct resource *resource[PCI_BUS_NUM_RESOURCES]; + /* address space routed to this bus */ struct pci_ops *ops; /* configuration access functions */ void *sysdata; /* hook for sys-specific extension */ diff --git a/include/linux/preempt.h b/include/linux/preempt.h index b4ff1a7c881c..1b227b3c8ccb 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -48,9 +48,6 @@ do { \ preempt_check_resched(); \ } while (0) -#define inc_preempt_count_non_preempt() do { } while (0) -#define dec_preempt_count_non_preempt() do { } while (0) - #else #define preempt_disable() do { } while (0) @@ -58,13 +55,6 @@ do { \ #define preempt_enable() do { } while (0) #define preempt_check_resched() do { } while (0) -/* - * Sometimes we want to increment the preempt count, but we know that it's - * already incremented if the kernel is compiled for preemptibility. - */ -#define inc_preempt_count_non_preempt() inc_preempt_count() -#define dec_preempt_count_non_preempt() dec_preempt_count() - #endif #endif /* __LINUX_PREEMPT_H */ diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index a9cca6e4da8f..f95cdf658a39 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h @@ -61,7 +61,6 @@ #define MD_PATCHLEVEL_VERSION 0 extern int md_size[MAX_MD_DEVS]; -extern struct hd_struct md_hd_struct[MAX_MD_DEVS]; extern char * partition_name (kdev_t dev); extern inline char * bdev_partition_name (struct block_device *bdev) diff --git a/include/linux/sched.h b/include/linux/sched.h index 896b7f59941c..bd7073fdefaf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -211,6 +211,11 @@ struct signal_struct { atomic_t count; struct k_sigaction action[_NSIG]; spinlock_t siglock; + + /* current thread group signal load-balancing target: */ + task_t *curr_target; + + struct sigpending shared_pending; }; /* @@ -356,7 +361,7 @@ struct task_struct { spinlock_t sigmask_lock; /* Protects signal and blocked */ struct signal_struct *sig; - sigset_t blocked; + sigset_t blocked, real_blocked, shared_unblocked; struct sigpending pending; unsigned long sas_ss_sp; @@ -431,6 +436,7 @@ extern void set_cpus_allowed(task_t *p, unsigned long new_mask); extern void set_user_nice(task_t *p, long nice); extern int task_prio(task_t *p); extern int task_nice(task_t *p); +extern int task_curr(task_t *p); extern int idle_cpu(int cpu); void yield(void); @@ -535,7 +541,7 @@ extern void proc_caches_init(void); extern void flush_signals(struct task_struct *); extern void flush_signal_handlers(struct task_struct *); extern void sig_exit(int, int, struct siginfo *); -extern int dequeue_signal(sigset_t *, siginfo_t *); +extern int dequeue_signal(struct sigpending *pending, sigset_t *mask, siginfo_t *info); extern void block_all_signals(int (*notifier)(void *priv), void *priv, sigset_t *mask); extern void unblock_all_signals(void); @@ -654,6 +660,7 @@ extern void exit_thread(void); extern void exit_mm(struct task_struct *); extern void exit_files(struct task_struct *); extern void exit_sighand(struct task_struct *); +extern void remove_thread_group(struct task_struct *tsk, struct signal_struct *sig); extern void reparent_to_init(void); extern void daemonize(void); @@ -786,8 +793,29 @@ static inline struct task_struct *younger_sibling(struct task_struct *p) #define for_each_thread(task) \ for (task = next_thread(current) ; task != current ; task = next_thread(task)) -#define next_thread(p) \ - list_entry((p)->thread_group.next, struct task_struct, thread_group) +static inline task_t *next_thread(task_t *p) +{ + if (!p->sig) + BUG(); +#if CONFIG_SMP + if (!spin_is_locked(&p->sig->siglock) && + !rwlock_is_locked(&tasklist_lock)) + BUG(); +#endif + return list_entry((p)->thread_group.next, task_t, thread_group); +} + +static inline task_t *prev_thread(task_t *p) +{ + if (!p->sig) + BUG(); +#if CONFIG_SMP + if (!spin_is_locked(&p->sig->siglock) && + !rwlock_is_locked(&tasklist_lock)) + BUG(); +#endif + return list_entry((p)->thread_group.prev, task_t, thread_group); +} #define thread_group_leader(p) (p->pid == p->tgid) @@ -903,21 +931,8 @@ static inline void cond_resched(void) This is required every time the blocked sigset_t changes. Athread cathreaders should have t->sigmask_lock. */ -static inline void recalc_sigpending_tsk(struct task_struct *t) -{ - if (has_pending_signals(&t->pending.signal, &t->blocked)) - set_tsk_thread_flag(t, TIF_SIGPENDING); - else - clear_tsk_thread_flag(t, TIF_SIGPENDING); -} - -static inline void recalc_sigpending(void) -{ - if (has_pending_signals(¤t->pending.signal, ¤t->blocked)) - set_thread_flag(TIF_SIGPENDING); - else - clear_thread_flag(TIF_SIGPENDING); -} +extern FASTCALL(void recalc_sigpending_tsk(struct task_struct *t)); +extern void recalc_sigpending(void); /* * Wrappers for p->thread_info->cpu access. No-op on UP. |
