diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/mach-bigsmp/mach_apic.h | 37 | ||||
| -rw-r--r-- | include/asm-i386/mach-default/mach_apic.h | 5 | ||||
| -rw-r--r-- | include/asm-i386/mach-numaq/mach_apic.h | 34 | ||||
| -rw-r--r-- | include/asm-i386/mach-summit/mach_apic.h | 37 | ||||
| -rw-r--r-- | include/asm-i386/mach-visws/mach_apic.h | 4 | ||||
| -rw-r--r-- | include/asm-i386/uaccess.h | 2 | ||||
| -rw-r--r-- | include/linux/cpufreq.h | 3 | ||||
| -rw-r--r-- | include/linux/devfs_fs_kernel.h | 27 | ||||
| -rw-r--r-- | include/linux/ext3_fs.h | 2 | ||||
| -rw-r--r-- | include/linux/mm.h | 5 | ||||
| -rw-r--r-- | include/linux/moduleloader.h | 3 | ||||
| -rw-r--r-- | include/linux/msdos_fs.h | 3 | ||||
| -rw-r--r-- | include/linux/smp_lock.h | 2 | ||||
| -rw-r--r-- | include/linux/tpqic02.h | 2 | ||||
| -rw-r--r-- | include/net/ip.h | 17 |
15 files changed, 148 insertions, 35 deletions
diff --git a/include/asm-i386/mach-bigsmp/mach_apic.h b/include/asm-i386/mach-bigsmp/mach_apic.h index 93972fcd768f..7b6435b052f3 100644 --- a/include/asm-i386/mach-bigsmp/mach_apic.h +++ b/include/asm-i386/mach-bigsmp/mach_apic.h @@ -34,10 +34,12 @@ static inline unsigned long check_apicid_used(unsigned long bitmap, int apicid) return 0; } static inline unsigned long check_apicid_present(int bit) -{ +{ return (phys_cpu_present_map & (1 << bit)); } +#define apicid_cluster(apicid) (apicid & 0xF0) + static inline unsigned long calculate_ldr(unsigned long old) { unsigned long id; @@ -134,4 +136,37 @@ static inline unsigned get_apic_id(unsigned long x) #define GET_APIC_ID(x) get_apic_id(x) +static inline unsigned int cpu_mask_to_apicid (unsigned long cpumask) +{ + int num_bits_set; + int cpus_found = 0; + int cpu; + int apicid; + + num_bits_set = hweight32(cpumask); + /* Return id to all */ + if (num_bits_set == 32) + return (int) 0xFF; + /* + * The cpus in the mask must all be on the apic cluster. If are not + * on the same apicid cluster return default value of TARGET_CPUS. + */ + cpu = ffs(cpumask)-1; + apicid = cpu_to_logical_apicid(cpu); + while (cpus_found < num_bits_set) { + if (cpumask & (1 << cpu)) { + int new_apicid = cpu_to_logical_apicid(cpu); + if (apicid_cluster(apicid) != + apicid_cluster(new_apicid)){ + printk ("%s: Not a valid mask!\n",__FUNCTION__); + return TARGET_CPUS; + } + apicid = apicid | new_apicid; + cpus_found++; + } + cpu++; + } + return apicid; +} + #endif /* __ASM_MACH_APIC_H */ diff --git a/include/asm-i386/mach-default/mach_apic.h b/include/asm-i386/mach-default/mach_apic.h index e865f01f5167..ad40d96b3824 100644 --- a/include/asm-i386/mach-default/mach_apic.h +++ b/include/asm-i386/mach-default/mach_apic.h @@ -120,4 +120,9 @@ static inline int apic_id_registered(void) &phys_cpu_present_map)); } +static inline unsigned int cpu_mask_to_apicid (unsigned long cpumask) +{ + return cpumask; +} + #endif /* __ASM_MACH_APIC_H */ diff --git a/include/asm-i386/mach-numaq/mach_apic.h b/include/asm-i386/mach-numaq/mach_apic.h index 54a7c97fe8d1..d5160168908a 100644 --- a/include/asm-i386/mach-numaq/mach_apic.h +++ b/include/asm-i386/mach-numaq/mach_apic.h @@ -17,6 +17,7 @@ #define APIC_BROADCAST_ID 0x0F #define check_apicid_used(bitmap, apicid) ((bitmap) & (1 << (apicid))) #define check_apicid_present(bit) (phys_cpu_present_map & (1 << bit)) +#define apicid_cluster(apicid) (apicid & 0xF0) static inline int apic_id_registered(void) { @@ -115,4 +116,37 @@ static inline unsigned get_apic_id(unsigned long x) #define GET_APIC_ID(x) get_apic_id(x) +static inline unsigned int cpu_mask_to_apicid (unsigned long cpumask) +{ + int num_bits_set; + int cpus_found = 0; + int cpu; + int apicid; + + num_bits_set = hweight32(cpumask); + /* Return id to all */ + if (num_bits_set == 32) + return (int) 0xFF; + /* + * The cpus in the mask must all be on the apic cluster. If are not + * on the same apicid cluster return default value of TARGET_CPUS. + */ + cpu = ffs(cpumask)-1; + apicid = cpu_to_logical_apicid(cpu); + while (cpus_found < num_bits_set) { + if (cpumask & (1 << cpu)) { + int new_apicid = cpu_to_logical_apicid(cpu); + if (apicid_cluster(apicid) != + apicid_cluster(new_apicid)){ + printk ("%s: Not a valid mask!\n",__FUNCTION__); + return TARGET_CPUS; + } + apicid = apicid | new_apicid; + cpus_found++; + } + cpu++; + } + return apicid; +} + #endif /* __ASM_MACH_APIC_H */ diff --git a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h index ae58d629c9ba..93207f09d43b 100644 --- a/include/asm-i386/mach-summit/mach_apic.h +++ b/include/asm-i386/mach-summit/mach_apic.h @@ -34,7 +34,7 @@ static inline unsigned long target_cpus(void) #define APIC_BROADCAST_ID (0x0F) static inline unsigned long check_apicid_used(unsigned long bitmap, int apicid) -{ +{ return (x86_summit ? 0 : (bitmap & (1 << apicid))); } @@ -44,6 +44,8 @@ static inline unsigned long check_apicid_present(int bit) return (x86_summit ? 1 : (phys_cpu_present_map & (1 << bit))); } +#define apicid_cluster(apicid) (apicid & 0xF0) + extern u8 bios_cpu_apicid[]; static inline void init_apic_ldr(void) @@ -142,4 +144,37 @@ static inline unsigned get_apic_id(unsigned long x) #define GET_APIC_ID(x) get_apic_id(x) +static inline unsigned int cpu_mask_to_apicid (unsigned long cpumask) +{ + int num_bits_set; + int cpus_found = 0; + int cpu; + int apicid; + + num_bits_set = hweight32(cpumask); + /* Return id to all */ + if (num_bits_set == 32) + return (int) 0xFF; + /* + * The cpus in the mask must all be on the apic cluster. If are not + * on the same apicid cluster return default value of TARGET_CPUS. + */ + cpu = ffs(cpumask)-1; + apicid = cpu_to_logical_apicid(cpu); + while (cpus_found < num_bits_set) { + if (cpumask & (1 << cpu)) { + int new_apicid = cpu_to_logical_apicid(cpu); + if (apicid_cluster(apicid) != + apicid_cluster(new_apicid)){ + printk ("%s: Not a valid mask!\n",__FUNCTION__); + return TARGET_CPUS; + } + apicid = apicid | new_apicid; + cpus_found++; + } + cpu++; + } + return apicid; +} + #endif /* __ASM_MACH_APIC_H */ diff --git a/include/asm-i386/mach-visws/mach_apic.h b/include/asm-i386/mach-visws/mach_apic.h index 84047e09ce2b..641c173d4f76 100644 --- a/include/asm-i386/mach-visws/mach_apic.h +++ b/include/asm-i386/mach-visws/mach_apic.h @@ -77,4 +77,8 @@ static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) return test_bit(boot_cpu_physical_apicid, &phys_cpu_present_map); } +static inline unsigned int cpu_mask_to_apicid (unsigned long cpumask) +{ + return cpumask; +} #endif /* __ASM_MACH_APIC_H */ diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index 15aa2e7ef765..07caa21a978c 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h @@ -42,8 +42,6 @@ extern struct movsl_mask { } ____cacheline_aligned_in_smp movsl_mask; #endif -int __verify_write(const void *, unsigned long); - #define __addr_ok(addr) ((unsigned long)(addr) < (current_thread_info()->addr_limit.seg)) /* diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index e99b9c3c1d01..3dc9062bd414 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -311,4 +311,7 @@ void cpufreq_frequency_table_put_attr(unsigned int cpu); #endif /* CONFIG_CPU_FREQ_TABLE */ +/* Currently exported only for the proc interface, remove when that goes */ +extern struct cpufreq_driver *cpufreq_driver; + #endif /* _LINUX_CPUFREQ_H */ diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index 34ebe93c6194..f12addd1daeb 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h @@ -11,20 +11,7 @@ #define DEVFS_SUPER_MAGIC 0x1373 -#define DEVFS_FL_NONE 0x000 /* This helps to make code more readable - no, it doesn't --hch */ -#define DEVFS_FL_DEFAULT DEVFS_FL_NONE - - -typedef struct devfs_entry * devfs_handle_t; - -struct gendisk; - #ifdef CONFIG_DEVFS_FS -extern devfs_handle_t devfs_register (devfs_handle_t dir, const char *name, - unsigned int flags, - unsigned int major, unsigned int minor, - umode_t mode, void *ops, void *info); extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) __attribute__((format (printf, 3, 4))); extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) @@ -36,19 +23,8 @@ extern void devfs_remove(const char *fmt, ...) __attribute__((format (printf, 1, 2))); extern int devfs_register_tape(const char *name); extern void devfs_unregister_tape(int num); -extern void devfs_register_partition(struct gendisk *dev, int part); extern void mount_devfs_fs(void); #else /* CONFIG_DEVFS_FS */ -static inline devfs_handle_t devfs_register (devfs_handle_t dir, - const char *name, - unsigned int flags, - unsigned int major, - unsigned int minor, - umode_t mode, - void *ops, void *info) -{ - return NULL; -} static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) { return 0; @@ -75,9 +51,6 @@ static inline int devfs_register_tape (const char *name) static inline void devfs_unregister_tape(int num) { } -static inline void devfs_register_partition(struct gendisk *dev, int part) -{ -} static inline void mount_devfs_fs (void) { return; diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index b3da32479e13..c2f36c9d8022 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h @@ -625,6 +625,8 @@ struct dx_hash_info u32 *seed; }; +#define EXT3_HTREE_EOF 0x7fffffff + #ifdef __KERNEL__ /* * Control parameters used by ext3_htree_next_block diff --git a/include/linux/mm.h b/include/linux/mm.h index 6aa89d73f65b..51f5377ec8fc 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -23,8 +23,13 @@ extern int page_cluster; #include <asm/page.h> #include <asm/pgtable.h> +#include <asm/processor.h> #include <asm/atomic.h> +#ifndef MM_VM_SIZE +#define MM_VM_SIZE(mm) TASK_SIZE +#endif + /* * Linux kernel virtual memory manager primitives. * The idea being to have a "virtual" mm in the same way diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h index 0c9e9a69f8ba..eb1033957486 100644 --- a/include/linux/moduleloader.h +++ b/include/linux/moduleloader.h @@ -41,4 +41,7 @@ int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod); +/* Any cleanup needed when module leaves. */ +void module_arch_cleanup(struct module *mod); + #endif diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 2945cb406b64..bd09a8135e79 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h @@ -146,8 +146,7 @@ struct fat_boot_fsinfo { __u32 reserved1[120]; /* Nothing as far as I can tell */ __u32 signature2; /* 0x61417272L */ __u32 free_clusters; /* Free cluster count. -1 if unknown */ - __u32 next_cluster; /* Most recently allocated cluster. - * Unused under Linux. */ + __u32 next_cluster; /* Most recently allocated cluster */ __u32 reserved2[4]; }; diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index 5a0b83a677d9..80fbd56eb3e4 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h @@ -5,7 +5,7 @@ #include <linux/sched.h> #include <linux/spinlock.h> -#if CONFIG_SMP || CONFIG_PREEMPT +#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) extern spinlock_t kernel_flag; diff --git a/include/linux/tpqic02.h b/include/linux/tpqic02.h index 2972cb2f827c..f980d4ff01fe 100644 --- a/include/linux/tpqic02.h +++ b/include/linux/tpqic02.h @@ -12,7 +12,7 @@ #include <linux/config.h> -#if CONFIG_QIC02_TAPE || CONFIG_QIC02_TAPE_MODULE +#if defined(CONFIG_QIC02_TAPE) || defined(CONFIG_QIC02_TAPE_MODULE) /* need to have QIC02_TAPE_DRIVE and QIC02_TAPE_IFC expand to something */ #include <linux/mtio.h> diff --git a/include/net/ip.h b/include/net/ip.h index 25e95ec9b4fb..b17e641f537d 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -230,6 +230,23 @@ static inline void ip_eth_mc_map(u32 addr, char *buf) buf[3]=addr&0x7F; } +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) +#include <linux/ipv6.h> +#endif + +static __inline__ void inet_reset_saddr(struct sock *sk) +{ + inet_sk(sk)->rcv_saddr = inet_sk(sk)->saddr = 0; +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) + if (sk->family == PF_INET6) { + struct ipv6_pinfo *np = inet6_sk(sk); + + memset(&np->saddr, 0, sizeof(np->saddr)); + memset(&np->rcv_saddr, 0, sizeof(np->rcv_saddr)); + } +#endif +} + #endif extern int ip_call_ra_chain(struct sk_buff *skb); |
