diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-m68k/local.h | 6 | ||||
| -rw-r--r-- | include/asm-m68k/sections.h | 6 | ||||
| -rw-r--r-- | include/asm-m68k/system.h | 7 | ||||
| -rw-r--r-- | include/asm-x86_64/bitops.h | 2 | ||||
| -rw-r--r-- | include/asm-x86_64/mpspec.h | 45 | ||||
| -rw-r--r-- | include/asm-x86_64/percpu.h | 5 | ||||
| -rw-r--r-- | include/asm-x86_64/processor.h | 1 | ||||
| -rw-r--r-- | include/asm-x86_64/smp.h | 1 | ||||
| -rw-r--r-- | include/asm-x86_64/suspend.h | 2 | ||||
| -rw-r--r-- | include/asm-x86_64/topology.h | 11 | ||||
| -rw-r--r-- | include/linux/fs.h | 23 | ||||
| -rw-r--r-- | include/linux/genhd.h | 2 | ||||
| -rw-r--r-- | include/linux/ide.h | 38 | ||||
| -rw-r--r-- | include/linux/kdev_t.h | 15 | ||||
| -rw-r--r-- | include/linux/nfsd/nfsfh.h | 4 | ||||
| -rw-r--r-- | include/linux/nfsd/state.h | 10 | ||||
| -rw-r--r-- | include/linux/tpqic02.h | 6 | ||||
| -rw-r--r-- | include/linux/tty.h | 2 |
18 files changed, 117 insertions, 69 deletions
diff --git a/include/asm-m68k/local.h b/include/asm-m68k/local.h new file mode 100644 index 000000000000..6c259263e1f0 --- /dev/null +++ b/include/asm-m68k/local.h @@ -0,0 +1,6 @@ +#ifndef _ASM_M68K_LOCAL_H +#define _ASM_M68K_LOCAL_H + +#include <asm-generic/local.h> + +#endif /* _ASM_M68K_LOCAL_H */ diff --git a/include/asm-m68k/sections.h b/include/asm-m68k/sections.h new file mode 100644 index 000000000000..d64967ecfec6 --- /dev/null +++ b/include/asm-m68k/sections.h @@ -0,0 +1,6 @@ +#ifndef _ASM_M68K_SECTIONS_H +#define _ASM_M68K_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif /* _ASM_M68K_SECTIONS_H */ diff --git a/include/asm-m68k/system.h b/include/asm-m68k/system.h index 77ac69c31981..2491ff5dd92c 100644 --- a/include/asm-m68k/system.h +++ b/include/asm-m68k/system.h @@ -36,9 +36,12 @@ asmlinkage void resume(void); #define switch_to(prev,next,last) do { \ register void *_prev __asm__ ("a0") = (prev); \ register void *_next __asm__ ("a1") = (next); \ + register void *_last __asm__ ("d1"); \ __asm__ __volatile__("jbsr resume" \ - : : "a" (_prev), "a" (_next) \ - : "d0", "d1", "d2", "d3", "d4", "d5", "a0", "a1"); \ + : "=a" (_prev), "=a" (_next), "=d" (_last) \ + : "0" (_prev), "1" (_next) \ + : "d0", "d2", "d3", "d4", "d5"); \ + (last) = _last; \ } while (0) diff --git a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h index 6830b9ee6174..59c0a4785301 100644 --- a/include/asm-x86_64/bitops.h +++ b/include/asm-x86_64/bitops.h @@ -466,7 +466,7 @@ static __inline__ int ffs(int x) __asm__("bsfl %1,%0\n\t" "cmovzl %2,%0" - : "=r" (r) : "g" (x), "r" (32)); + : "=r" (r) : "g" (x), "r" (-1)); return r+1; } diff --git a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h index bf783aa470ea..02245540c2f3 100644 --- a/include/asm-x86_64/mpspec.h +++ b/include/asm-x86_64/mpspec.h @@ -169,7 +169,6 @@ extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; extern cpumask_t mp_bus_to_cpumask [MAX_MP_BUSSES]; extern unsigned int boot_cpu_physical_apicid; -extern cpumask_t phys_cpu_present_map; extern int smp_found_config; extern void find_smp_config (void); extern void get_smp_config (void); @@ -198,5 +197,49 @@ extern void mp_config_ioapic_for_sci(int irq); extern int using_apic_timer; +#define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS) + +struct physid_mask +{ + unsigned long mask[PHYSID_ARRAY_SIZE]; +}; + +typedef struct physid_mask physid_mask_t; + +#define physid_set(physid, map) set_bit(physid, (map).mask) +#define physid_clear(physid, map) clear_bit(physid, (map).mask) +#define physid_isset(physid, map) test_bit(physid, (map).mask) +#define physid_test_and_set(physid, map) test_and_set_bit(physid, (map).mask) + +#define physids_and(dst, src1, src2) bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS) +#define physids_or(dst, src1, src2) bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS) +#define physids_clear(map) bitmap_clear((map).mask, MAX_APICS) +#define physids_complement(map) bitmap_complement((map).mask, MAX_APICS) +#define physids_empty(map) bitmap_empty((map).mask, MAX_APICS) +#define physids_equal(map1, map2) bitmap_equal((map1).mask, (map2).mask, MAX_APICS) +#define physids_weight(map) bitmap_weight((map).mask, MAX_APICS) +#define physids_shift_right(d, s, n) bitmap_shift_right((d).mask, (s).mask, n, MAX_APICS) +#define physids_shift_left(d, s, n) bitmap_shift_left((d).mask, (s).mask, n, MAX_APICS) +#define physids_coerce(map) ((map).mask[0]) + +#define physids_promote(physids) \ + ({ \ + physid_mask_t __physid_mask = PHYSID_MASK_NONE; \ + __physid_mask.mask[0] = physids; \ + __physid_mask; \ + }) + +#define physid_mask_of_physid(physid) \ + ({ \ + physid_mask_t __physid_mask = PHYSID_MASK_NONE; \ + physid_set(physid, __physid_mask); \ + __physid_mask; \ + }) + +#define PHYSID_MASK_ALL { {[0 ... PHYSID_ARRAY_SIZE-1] = ~0UL} } +#define PHYSID_MASK_NONE { {[0 ... PHYSID_ARRAY_SIZE-1] = 0UL} } + +extern physid_mask_t phys_cpu_present_map; + #endif diff --git a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h index 832fc326fb02..d73be96517d4 100644 --- a/include/asm-x86_64/percpu.h +++ b/include/asm-x86_64/percpu.h @@ -31,6 +31,9 @@ do { \ memcpy((pcpudst)+__per_cpu_offset(__i), \ (src), (size)); \ } while (0) + +extern void setup_per_cpu_areas(void); + #else /* ! SMP */ #define DEFINE_PER_CPU(type, name) \ @@ -46,6 +49,4 @@ do { \ #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) -extern void setup_per_cpu_areas(void); - #endif /* _ASM_X8664_PERCPU_H_ */ diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 12714f573352..e151dbb1e704 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h @@ -225,7 +225,6 @@ struct tss_struct { * 8 bytes, for an extra "long" of ~0UL */ unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; - u32 __cacheline_filler[4]; /* size is 0x100 */ } __attribute__((packed)) ____cacheline_aligned; struct thread_struct { diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index 7959579136bd..ba4e4ad1a189 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h @@ -36,7 +36,6 @@ struct pt_regs; */ extern void smp_alloc_memory(void); -extern cpumask_t phys_cpu_present_map; extern cpumask_t cpu_online_map; extern volatile unsigned long smp_invalidate_needed; extern int pic_mode; diff --git a/include/asm-x86_64/suspend.h b/include/asm-x86_64/suspend.h index 3b3f794d9cec..e34526cd6e9f 100644 --- a/include/asm-x86_64/suspend.h +++ b/include/asm-x86_64/suspend.h @@ -44,7 +44,7 @@ extern unsigned long saved_context_eflags; :"r" ((thread)->debugreg##register)) extern void fix_processor_context(void); -extern void do_magic(int resume); +extern int do_magic(int resume); #ifdef CONFIG_ACPI_SLEEP extern unsigned long saved_eip; diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index c4f359c87973..d4548e5ed6dc 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h @@ -10,21 +10,18 @@ /* Map the K8 CPU local memory controllers to a simple 1:1 CPU:NODE topology */ extern int fake_node; -extern cpumask_t cpu_online_map; +extern unsigned long cpu_online_map; #define cpu_to_node(cpu) (fake_node ? 0 : (cpu)) #define memblk_to_node(memblk) (fake_node ? 0 : (memblk)) #define parent_node(node) (node) #define node_to_first_cpu(node) (fake_node ? 0 : (node)) -#define node_to_cpu_mask(node) (fake_node ? cpu_online_map : cpumask_of_cpu(node)) +#define node_to_cpu_mask(node) (fake_node ? cpu_online_map : (1UL << (node))) #define node_to_memblk(node) (node) -static inline cpumask_t pcibus_to_cpumask(int bus) +static inline unsigned long pcibus_to_cpumask(int bus) { - cpumask_t ret; - - cpus_and(ret, mp_bus_to_cpumask[bus], cpu_online_map); - return ret; + return mp_bus_to_cpumask[bus] & cpu_online_map; } #define NODE_BALANCE_RATE 30 /* CHECKME */ diff --git a/include/linux/fs.h b/include/linux/fs.h index a9e02e3dcdd8..108e53f176c9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -336,10 +336,8 @@ struct address_space { }; struct block_device { - struct list_head bd_hash; - atomic_t bd_count; - struct inode * bd_inode; dev_t bd_dev; /* not a kdev_t - it's a search key */ + struct inode * bd_inode; /* will die */ int bd_openers; struct semaphore bd_sem; /* open/close mutex */ struct list_head bd_inodes; @@ -347,10 +345,11 @@ struct block_device { int bd_holders; struct block_device * bd_contains; unsigned bd_block_size; - sector_t bd_offset; + struct hd_struct * bd_part; unsigned bd_part_count; int bd_invalidated; struct gendisk * bd_disk; + struct list_head bd_list; }; /* @@ -468,6 +467,16 @@ static inline void i_size_write(struct inode *inode, loff_t i_size) #endif } +static inline unsigned iminor(struct inode *inode) +{ + return minor(inode->i_rdev); +} + +static inline unsigned imajor(struct inode *inode) +{ + return major(inode->i_rdev); +} + struct fown_struct { rwlock_t lock; /* protects pid, uid, euid fields */ int pid; /* pid or -pgrp where SIGIO should be sent */ @@ -1176,6 +1185,12 @@ extern int invalidate_partition(struct gendisk *, int); unsigned long invalidate_mapping_pages(struct address_space *mapping, pgoff_t start, pgoff_t end); unsigned long invalidate_inode_pages(struct address_space *mapping); +static inline void invalidate_remote_inode(struct inode *inode) +{ + if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || + S_ISLNK(inode->i_mode)) + invalidate_inode_pages(inode->i_mapping); +} extern void invalidate_inode_pages2(struct address_space *mapping); extern void write_inode_now(struct inode *, int); extern int filemap_fdatawrite(struct address_space *); diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 3e4ef6b13683..623baf2fd239 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -197,7 +197,7 @@ extern void rand_initialize_disk(struct gendisk *disk); static inline sector_t get_start_sect(struct block_device *bdev) { - return bdev->bd_offset; + return bdev->bd_part->start_sect; } static inline sector_t get_capacity(struct gendisk *disk) { diff --git a/include/linux/ide.h b/include/linux/ide.h index a3ee36b438ca..a68f7871d3bb 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1242,21 +1242,6 @@ typedef struct ide_driver_s { extern int generic_ide_ioctl(struct block_device *, unsigned, unsigned long); -/* - * IDE modules. - */ -#define IDE_CHIPSET_MODULE 0 /* not supported yet */ -#define IDE_PROBE_MODULE 1 - -typedef int (ide_module_init_proc)(void); - -typedef struct ide_module_s { - int type; - ide_module_init_proc *init; - void *info; - struct ide_module_s *next; -} ide_module_t; - typedef struct ide_devices_s { char name[4]; /* hdX */ unsigned attached : 1; /* native */ @@ -1274,8 +1259,7 @@ typedef struct ide_devices_s { */ #ifndef _IDE_C extern ide_hwif_t ide_hwifs[]; /* master data repository */ -extern ide_module_t *ide_chipsets; -extern ide_module_t *ide_probe; +extern int (*ide_probe)(void); extern ide_devices_t *idedisk; extern ide_devices_t *idecd; @@ -1772,8 +1756,6 @@ extern int ide_hwif_request_regions(ide_hwif_t *hwif); extern void ide_hwif_release_regions(ide_hwif_t* hwif); extern void ide_unregister (unsigned int index); -extern int export_ide_init_queue(ide_drive_t *); -extern u8 export_probe_for_drive(ide_drive_t *); extern int probe_hwif_init(ide_hwif_t *); static inline void *ide_get_hwifdata (ide_hwif_t * hwif) @@ -1794,6 +1776,24 @@ extern char *ide_xfer_verbose(u8 xfer_rate); extern void ide_toggle_bounce(ide_drive_t *drive, int on); extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); +typedef struct ide_pio_timings_s { + int setup_time; /* Address setup (ns) minimum */ + int active_time; /* Active pulse (ns) minimum */ + int cycle_time; /* Cycle time (ns) minimum = (setup + active + recovery) */ +} ide_pio_timings_t; + +typedef struct ide_pio_data_s { + u8 pio_mode; + u8 use_iordy; + u8 overridden; + u8 blacklisted; + unsigned int cycle_time; +} ide_pio_data_t; + +extern u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d); +extern const ide_pio_timings_t ide_pio_timings[6]; + + extern spinlock_t ide_lock; extern struct semaphore ide_cfg_sem; /* diff --git a/include/linux/kdev_t.h b/include/linux/kdev_t.h index 337b7261247b..900a4a1e1282 100644 --- a/include/linux/kdev_t.h +++ b/include/linux/kdev_t.h @@ -90,23 +90,8 @@ static inline unsigned int kdev_val(kdev_t dev) return dev.value; } -static inline kdev_t val_to_kdev(unsigned int val) -{ - kdev_t dev; - dev.value = val; - return dev; -} - -#define HASHDEV(dev) (kdev_val(dev)) #define NODEV (mk_kdev(0,0)) -static inline int kdev_same(kdev_t dev1, kdev_t dev2) -{ - return dev1.value == dev2.value; -} - -#define kdev_none(d1) (!kdev_val(d1)) - /* Mask off the high bits for now.. */ #define minor(dev) ((dev).value & 0xff) #define major(dev) (((dev).value >> KDEV_MINOR_BITS) & 0xff) diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index 19f76c700f4d..d4d63cc8e5fa 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h @@ -294,8 +294,8 @@ fill_post_wcc(struct svc_fh *fhp) /* how much do we care for accuracy with MinixFS? */ fhp->fh_post_blocks = (inode->i_size+511) >> 9; } - fhp->fh_post_rdev[0] = htonl((u32)major(inode->i_rdev)); - fhp->fh_post_rdev[1] = htonl((u32)minor(inode->i_rdev)); + fhp->fh_post_rdev[0] = htonl((u32)imajor(inode)); + fhp->fh_post_rdev[1] = htonl((u32)iminor(inode)); fhp->fh_post_atime = inode->i_atime; fhp->fh_post_mtime = inode->i_mtime; fhp->fh_post_ctime = inode->i_ctime; diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index 480eebab6993..66422a1c8277 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h @@ -113,21 +113,15 @@ struct nfs4_stateowner { int so_confirmed; /* successful OPEN_CONFIRM? */ }; -typedef struct { - u32 dev; /* super_block->s_dev */ - unsigned long ino; - u32 generation; -} nfs4_ino_desc_t; - /* * nfs4_file: a file opened by some number of (open) nfs4_stateowners. * o fi_perfile list is used to search for conflicting * share_acces, share_deny on the file. */ struct nfs4_file { - struct list_head fi_hash; /* hash by nfs4_ino_desc_t fields */ + struct list_head fi_hash; /* hash by "struct inode *" */ struct list_head fi_perfile; /* list: nfs4_stateid */ - nfs4_ino_desc_t fi_ino; + struct inode *fi_inode; u32 fi_id; /* used with stateowner->so_id * for openstateid_hashtbl hash */ }; diff --git a/include/linux/tpqic02.h b/include/linux/tpqic02.h index f980d4ff01fe..f0dfcfa56273 100644 --- a/include/linux/tpqic02.h +++ b/include/linux/tpqic02.h @@ -587,10 +587,10 @@ * |___________________ Reserved for diagnostics during debugging. */ -#define TP_REWCLOSE(d) ((minor(d)&0x01) == 1) /* rewind bit */ +#define TP_REWCLOSE(d) ((d)&1) /* rewind bit */ /* rewind is only done if data has been transferred */ -#define TP_DENS(dev) ((minor(dev) >> 1) & 0x07) /* tape density */ -#define TP_UNIT(dev) ((minor(dev) >> 4) & 0x07) /* unit number */ +#define TP_DENS(d) (((d) >> 1) & 0x07) /* tape density */ +#define TP_UNIT(d) (((d) >> 4) & 0x07) /* unit number */ /* print excessive diagnostics */ #define TP_DIAGS(dev) (QIC02_TAPE_DEBUG & TPQD_DIAGS) diff --git a/include/linux/tty.h b/include/linux/tty.h index aa10cff1871c..205e27af55a2 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -367,7 +367,7 @@ extern int espserial_init(void); extern int macserial_init(void); extern int a2232board_init(void); -extern int tty_paranoia_check(struct tty_struct *tty, kdev_t device, +extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, const char *routine); extern char *tty_name(struct tty_struct *tty, char *buf); extern void tty_wait_until_sent(struct tty_struct * tty, long timeout); |
