diff --git a/[refs] b/[refs] index 8509d0d1a657..3970a8ef56ae 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 31bad9246b5e17d547430697791acca5e9712333 +refs/heads/master: 10617bbe84628eb18ab5f723d3ba35005adde143 diff --git a/trunk/Documentation/DocBook/Makefile b/trunk/Documentation/DocBook/Makefile index 1615350b7b53..1d1b34500b69 100644 --- a/trunk/Documentation/DocBook/Makefile +++ b/trunk/Documentation/DocBook/Makefile @@ -102,13 +102,6 @@ C-procfs-example = procfs_example.xml C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example)) $(obj)/procfs-guide.xml: $(C-procfs-example2) -# List of programs to build -##oops, this is a kernel module::hostprogs-y := procfs_example -obj-m += procfs_example.o - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ exit 1 db2xtemplate = db2TYPE -o $(dir $@) $< diff --git a/trunk/Documentation/DocBook/procfs_example.c b/trunk/Documentation/DocBook/procfs_example.c index 2f3de0fb8365..7064084c1c5e 100644 --- a/trunk/Documentation/DocBook/procfs_example.c +++ b/trunk/Documentation/DocBook/procfs_example.c @@ -189,6 +189,8 @@ static int __init init_procfs_example(void) return 0; no_symlink: + remove_proc_entry("tty", example_dir); +no_tty: remove_proc_entry("bar", example_dir); no_bar: remove_proc_entry("foo", example_dir); @@ -204,6 +206,7 @@ static int __init init_procfs_example(void) static void __exit cleanup_procfs_example(void) { remove_proc_entry("jiffies_too", example_dir); + remove_proc_entry("tty", example_dir); remove_proc_entry("bar", example_dir); remove_proc_entry("foo", example_dir); remove_proc_entry("jiffies", example_dir); @@ -219,4 +222,3 @@ module_exit(cleanup_procfs_example); MODULE_AUTHOR("Erik Mouw"); MODULE_DESCRIPTION("procfs examples"); -MODULE_LICENSE("GPL"); diff --git a/trunk/Documentation/Makefile b/trunk/Documentation/Makefile deleted file mode 100644 index 94b945733534..000000000000 --- a/trunk/Documentation/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ - filesystems/configfs/ ia64/ networking/ \ - pcmcia/ spi/ video4linux/ vm/ watchdog/src/ diff --git a/trunk/Documentation/accounting/Makefile b/trunk/Documentation/accounting/Makefile deleted file mode 100644 index 31929eb875b1..000000000000 --- a/trunk/Documentation/accounting/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := getdelays - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_getdelays.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/accounting/getdelays.c b/trunk/Documentation/accounting/getdelays.c index cc49400b4af8..3f7755f3963f 100644 --- a/trunk/Documentation/accounting/getdelays.c +++ b/trunk/Documentation/accounting/getdelays.c @@ -201,19 +201,13 @@ void print_delayacct(struct taskstats *t) "RECLAIM %12s%15s\n" " %15llu%15llu\n", "count", "real total", "virtual total", "delay total", - (unsigned long long)t->cpu_count, - (unsigned long long)t->cpu_run_real_total, - (unsigned long long)t->cpu_run_virtual_total, - (unsigned long long)t->cpu_delay_total, + t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total, + t->cpu_delay_total, "count", "delay total", - (unsigned long long)t->blkio_count, - (unsigned long long)t->blkio_delay_total, + t->blkio_count, t->blkio_delay_total, + "count", "delay total", t->swapin_count, t->swapin_delay_total, "count", "delay total", - (unsigned long long)t->swapin_count, - (unsigned long long)t->swapin_delay_total, - "count", "delay total", - (unsigned long long)t->freepages_count, - (unsigned long long)t->freepages_delay_total); + t->freepages_count, t->freepages_delay_total); } void task_context_switch_counts(struct taskstats *t) @@ -221,17 +215,14 @@ void task_context_switch_counts(struct taskstats *t) printf("\n\nTask %15s%15s\n" " %15llu%15llu\n", "voluntary", "nonvoluntary", - (unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw); + t->nvcsw, t->nivcsw); } void print_cgroupstats(struct cgroupstats *c) { printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, " - "uninterruptible %llu\n", (unsigned long long)c->nr_sleeping, - (unsigned long long)c->nr_io_wait, - (unsigned long long)c->nr_running, - (unsigned long long)c->nr_stopped, - (unsigned long long)c->nr_uninterruptible); + "uninterruptible %llu\n", c->nr_sleeping, c->nr_io_wait, + c->nr_running, c->nr_stopped, c->nr_uninterruptible); } diff --git a/trunk/Documentation/auxdisplay/Makefile b/trunk/Documentation/auxdisplay/Makefile deleted file mode 100644 index 51fe23332c81..000000000000 --- a/trunk/Documentation/auxdisplay/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := cfag12864b-example - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_cfag12864b-example.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/connector/Makefile b/trunk/Documentation/connector/Makefile deleted file mode 100644 index 8df1a7285a06..000000000000 --- a/trunk/Documentation/connector/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -ifneq ($(CONFIG_CONNECTOR),) -obj-m += cn_test.o -endif - -# List of programs to build -hostprogs-y := ucon - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/cpu-hotplug.txt b/trunk/Documentation/cpu-hotplug.txt index 94bbc27ddd4f..ba0aacde94fb 100644 --- a/trunk/Documentation/cpu-hotplug.txt +++ b/trunk/Documentation/cpu-hotplug.txt @@ -59,10 +59,15 @@ apicid values in those tables for disabled apics. In the event BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could use this parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map. +s390 uses the number of cpus it detects at IPL time to also the number of bits +in cpu_possible_map. If it is desired to add additional cpus at a later time +the number should be specified using this option or the possible_cpus option. + possible_cpus=n [s390 only] use this to set hotpluggable cpus. This option sets possible_cpus bits in cpu_possible_map. Thus keeping the numbers of bits set constant even if the machine gets rebooted. + This option overrides additional_cpus. CPU maps and such ----------------- diff --git a/trunk/Documentation/feature-removal-schedule.txt b/trunk/Documentation/feature-removal-schedule.txt index eb1a47b97427..17cab3c74e8b 100644 --- a/trunk/Documentation/feature-removal-schedule.txt +++ b/trunk/Documentation/feature-removal-schedule.txt @@ -19,6 +19,15 @@ Who: Pavel Machek --------------------------- +What: old NCR53C9x driver +When: October 2007 +Why: Replaced by the much better esp_scsi driver. Actual low-level + driver can be ported over almost trivially. +Who: David Miller + Christoph Hellwig + +--------------------------- + What: Video4Linux API 1 ioctls and video_decoder.h from Video devices. When: December 2008 Files: include/linux/video_decoder.h include/linux/videodev.h diff --git a/trunk/Documentation/filesystems/configfs/Makefile b/trunk/Documentation/filesystems/configfs/Makefile deleted file mode 100644 index be7ec5e67dbc..000000000000 --- a/trunk/Documentation/filesystems/configfs/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifneq ($(CONFIG_CONFIGFS_FS),) -obj-m += configfs_example_explicit.o configfs_example_macros.o -endif diff --git a/trunk/Documentation/filesystems/quota.txt b/trunk/Documentation/filesystems/quota.txt index 5e8de25bf0f1..a590c4093eff 100644 --- a/trunk/Documentation/filesystems/quota.txt +++ b/trunk/Documentation/filesystems/quota.txt @@ -3,14 +3,14 @@ Quota subsystem =============== Quota subsystem allows system administrator to set limits on used space and -number of used inodes (inode is a filesystem structure which is associated with -each file or directory) for users and/or groups. For both used space and number -of used inodes there are actually two limits. The first one is called softlimit -and the second one hardlimit. An user can never exceed a hardlimit for any -resource (unless he has CAP_SYS_RESOURCE capability). User is allowed to exceed -softlimit but only for limited period of time. This period is called "grace -period" or "grace time". When grace time is over, user is not able to allocate -more space/inodes until he frees enough of them to get below softlimit. +number of used inodes (inode is a filesystem structure which is associated +with each file or directory) for users and/or groups. For both used space and +number of used inodes there are actually two limits. The first one is called +softlimit and the second one hardlimit. An user can never exceed a hardlimit +for any resource. User is allowed to exceed softlimit but only for limited +period of time. This period is called "grace period" or "grace time". When +grace time is over, user is not able to allocate more space/inodes until he +frees enough of them to get below softlimit. Quota limits (and amount of grace time) are set independently for each filesystem. @@ -53,12 +53,6 @@ in parentheses): QUOTA_NL_BSOFTLONGWARN - space (block) softlimit is exceeded longer than given grace period. QUOTA_NL_BSOFTWARN - space (block) softlimit - - four warnings are also defined for the event when user stops - exceeding some limit: - QUOTA_NL_IHARDBELOW - inode hardlimit - QUOTA_NL_ISOFTBELOW - inode softlimit - QUOTA_NL_BHARDBELOW - space (block) hardlimit - QUOTA_NL_BSOFTBELOW - space (block) softlimit QUOTA_NL_A_DEV_MAJOR (u32) - major number of a device with the affected filesystem QUOTA_NL_A_DEV_MINOR (u32) diff --git a/trunk/Documentation/ia64/Makefile b/trunk/Documentation/ia64/Makefile deleted file mode 100644 index b75db69ec483..000000000000 --- a/trunk/Documentation/ia64/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := aliasing-test - -# Tell kbuild to always build the programs -always := $(hostprogs-y) diff --git a/trunk/Documentation/networking/Makefile b/trunk/Documentation/networking/Makefile deleted file mode 100644 index 6d8af1ac56c4..000000000000 --- a/trunk/Documentation/networking/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := ifenslave - -# Tell kbuild to always build the programs -always := $(hostprogs-y) diff --git a/trunk/Documentation/networking/ifenslave.c b/trunk/Documentation/networking/ifenslave.c index 1b96ccda3836..a12059886755 100644 --- a/trunk/Documentation/networking/ifenslave.c +++ b/trunk/Documentation/networking/ifenslave.c @@ -1081,7 +1081,7 @@ static int set_if_addr(char *master_ifname, char *slave_ifname) } - ipaddr = (unsigned char *)ifr.ifr_addr.sa_data; + ipaddr = ifr.ifr_addr.sa_data; v_print("Interface '%s': set IP %s to %d.%d.%d.%d\n", slave_ifname, ifra[i].desc, ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3]); diff --git a/trunk/Documentation/pcmcia/Makefile b/trunk/Documentation/pcmcia/Makefile deleted file mode 100644 index accde871ae77..000000000000 --- a/trunk/Documentation/pcmcia/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := crc32hash - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_crc32hash.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/pcmcia/crc32hash.c b/trunk/Documentation/pcmcia/crc32hash.c index 4210e5abab8a..cbc36d299af8 100644 --- a/trunk/Documentation/pcmcia/crc32hash.c +++ b/trunk/Documentation/pcmcia/crc32hash.c @@ -26,7 +26,7 @@ int main(int argc, char **argv) { printf("no string passed as argument\n"); return -1; } - result = crc32((unsigned char const *)argv[1], strlen(argv[1])); + result = crc32(argv[1], strlen(argv[1])); printf("0x%x\n", result); return 0; } diff --git a/trunk/Documentation/spi/Makefile b/trunk/Documentation/spi/Makefile deleted file mode 100644 index a5b03c88beae..000000000000 --- a/trunk/Documentation/spi/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := spidev_test spidev_fdx - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_spidev_test.o += -I$(objtree)/usr/include -HOSTCFLAGS_spidev_fdx.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/video4linux/Makefile b/trunk/Documentation/video4linux/Makefile deleted file mode 100644 index 1ed0e98d057d..000000000000 --- a/trunk/Documentation/video4linux/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := v4lgrab - -# Tell kbuild to always build the programs -always := $(hostprogs-y) diff --git a/trunk/Documentation/vm/Makefile b/trunk/Documentation/vm/Makefile deleted file mode 100644 index 6f562f778b28..000000000000 --- a/trunk/Documentation/vm/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := slabinfo - -# Tell kbuild to always build the programs -always := $(hostprogs-y) diff --git a/trunk/Documentation/watchdog/src/Makefile b/trunk/Documentation/watchdog/src/Makefile deleted file mode 100644 index 40e5f46e4740..000000000000 --- a/trunk/Documentation/watchdog/src/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := watchdog-simple watchdog-test - -# Tell kbuild to always build the programs -always := $(hostprogs-y) diff --git a/trunk/Makefile b/trunk/Makefile index fd3ca6e8188a..f3e206509ee1 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -821,9 +821,6 @@ ifdef CONFIG_HEADERS_CHECK endif ifdef CONFIG_SAMPLES $(Q)$(MAKE) $(build)=samples -endif -ifdef CONFIG_BUILD_DOCSRC - $(Q)$(MAKE) $(build)=Documentation endif $(call vmlinux-modpost) $(call if_changed_rule,vmlinux__) @@ -1169,7 +1166,7 @@ MRPROPER_FILES += .config .config.old include/asm .version .old_version \ # clean: rm-dirs := $(CLEAN_DIRS) clean: rm-files := $(CLEAN_FILES) -clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) +clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) PHONY += $(clean-dirs) clean archclean $(clean-dirs): diff --git a/trunk/arch/h8300/mm/init.c b/trunk/arch/h8300/mm/init.c index 9942f24aff9e..a1d228f5e4e6 100644 --- a/trunk/arch/h8300/mm/init.c +++ b/trunk/arch/h8300/mm/init.c @@ -40,6 +40,9 @@ #undef DEBUG +extern void die_if_kernel(char *,struct pt_regs *,long); +extern void free_initmem(void); + /* * BAD_PAGE is the page that is used for page faults when linux * is out-of-memory. Older versions of linux just did a @@ -70,7 +73,7 @@ extern unsigned long memory_end; * The parameters are pointers to where to stick the starting and ending * addresses of available kernel virtual memory. */ -void __init paging_init(void) +void paging_init(void) { /* * Make sure start_mem is page aligned, otherwise bootmem and @@ -119,7 +122,7 @@ void __init paging_init(void) } } -void __init mem_init(void) +void mem_init(void) { int codek = 0, datak = 0, initk = 0; /* DAVIDM look at setup memory map generically with reserved area */ @@ -175,7 +178,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) #endif void -free_initmem(void) +free_initmem() { #ifdef CONFIG_RAMKERNEL unsigned long addr; diff --git a/trunk/arch/ia64/kernel/head.S b/trunk/arch/ia64/kernel/head.S index 41c712917ff7..8bdea8eb62e3 100644 --- a/trunk/arch/ia64/kernel/head.S +++ b/trunk/arch/ia64/kernel/head.S @@ -359,7 +359,31 @@ start_ap: mov ar.rsc=0 // place RSE in enforced lazy mode ;; loadrs // clear the dirty partition - mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base + movl r19=__phys_per_cpu_start + mov r18=PERCPU_PAGE_SIZE + ;; +#ifndef CONFIG_SMP + add r19=r19,r18 + ;; +#else +(isAP) br.few 2f + mov r20=r19 + sub r19=r19,r18 + ;; + shr.u r18=r18,3 +1: + ld8 r21=[r20],8;; + st8[r19]=r21,8 + adds r18=-1,r18;; + cmp4.lt p7,p6=0,r18 +(p7) br.cond.dptk.few 1b +2: +#endif + tpa r19=r19 + ;; + .pred.rel.mutex isBP,isAP +(isBP) mov IA64_KR(PER_CPU_DATA)=r19 // per-CPU base for cpu0 +(isAP) mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base ;; mov ar.bspstore=r2 // establish the new RSE stack ;; diff --git a/trunk/arch/ia64/kernel/setup.c b/trunk/arch/ia64/kernel/setup.c index 593279f33e96..c27d5b2c182b 100644 --- a/trunk/arch/ia64/kernel/setup.c +++ b/trunk/arch/ia64/kernel/setup.c @@ -927,17 +927,19 @@ cpu_init (void) if (smp_processor_id() == 0) { cpu_set(0, per_cpu(cpu_sibling_map, 0)); cpu_set(0, cpu_core_map[0]); + } else { + /* + * Set ar.k3 so that assembly code in MCA handler can compute + * physical addresses of per cpu variables with a simple: + * phys = ar.k3 + &per_cpu_var + * and the alt-dtlb-miss handler can set per-cpu mapping into + * the TLB when needed. head.S already did this for cpu0. + */ + ia64_set_kr(IA64_KR_PER_CPU_DATA, + ia64_tpa(cpu_data) - (long) __per_cpu_start); } #endif - /* - * We set ar.k3 so that assembly code in MCA handler can compute - * physical addresses of per cpu variables with a simple: - * phys = ar.k3 + &per_cpu_var - */ - ia64_set_kr(IA64_KR_PER_CPU_DATA, - ia64_tpa(cpu_data) - (long) __per_cpu_start); - get_max_cacheline_size(); /* diff --git a/trunk/arch/ia64/kernel/smpboot.c b/trunk/arch/ia64/kernel/smpboot.c index 03f1a9908afc..b39853a292d5 100644 --- a/trunk/arch/ia64/kernel/smpboot.c +++ b/trunk/arch/ia64/kernel/smpboot.c @@ -467,7 +467,9 @@ start_secondary (void *unused) { /* Early console may use I/O ports */ ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase)); +#ifndef CONFIG_PRINTK_TIME Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id()); +#endif efi_map_pal_code(); cpu_init(); preempt_disable(); diff --git a/trunk/arch/ia64/kernel/vmlinux.lds.S b/trunk/arch/ia64/kernel/vmlinux.lds.S index 5a77206c2492..de71da811cd6 100644 --- a/trunk/arch/ia64/kernel/vmlinux.lds.S +++ b/trunk/arch/ia64/kernel/vmlinux.lds.S @@ -215,6 +215,9 @@ SECTIONS /* Per-cpu data: */ percpu : { } :percpu . = ALIGN(PERCPU_PAGE_SIZE); +#ifdef CONFIG_SMP + . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */ +#endif __phys_per_cpu_start = .; .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) { diff --git a/trunk/arch/ia64/mm/contig.c b/trunk/arch/ia64/mm/contig.c index 798bf9835a51..e566ff43884a 100644 --- a/trunk/arch/ia64/mm/contig.c +++ b/trunk/arch/ia64/mm/contig.c @@ -163,8 +163,14 @@ per_cpu_init (void) * get_zeroed_page(). */ if (first_time) { + void *cpu0_data = __phys_per_cpu_start - PERCPU_PAGE_SIZE; + first_time=0; - for (cpu = 0; cpu < NR_CPUS; cpu++) { + + __per_cpu_offset[0] = (char *) cpu0_data - __per_cpu_start; + per_cpu(local_per_cpu_offset, 0) = __per_cpu_offset[0]; + + for (cpu = 1; cpu < NR_CPUS; cpu++) { memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start; cpu_data += PERCPU_PAGE_SIZE; @@ -177,7 +183,7 @@ per_cpu_init (void) static inline void alloc_per_cpu_data(void) { - cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, + cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS-1, PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); } #else diff --git a/trunk/arch/ia64/mm/discontig.c b/trunk/arch/ia64/mm/discontig.c index d83125e1ed27..78026aabaa7f 100644 --- a/trunk/arch/ia64/mm/discontig.c +++ b/trunk/arch/ia64/mm/discontig.c @@ -143,7 +143,11 @@ static void *per_cpu_node_setup(void *cpu_data, int node) int cpu; for_each_possible_early_cpu(cpu) { - if (node == node_cpuid[cpu].nid) { + if (cpu == 0) { + void *cpu0_data = __phys_per_cpu_start - PERCPU_PAGE_SIZE; + __per_cpu_offset[cpu] = (char*)cpu0_data - + __per_cpu_start; + } else if (node == node_cpuid[cpu].nid) { memcpy(__va(cpu_data), __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); __per_cpu_offset[cpu] = (char*)__va(cpu_data) - diff --git a/trunk/drivers/char/rtc.c b/trunk/drivers/char/rtc.c index f53d4d00faf0..d9799e2bcfbf 100644 --- a/trunk/drivers/char/rtc.c +++ b/trunk/drivers/char/rtc.c @@ -78,6 +78,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/cpuidle/sysfs.c b/trunk/drivers/cpuidle/sysfs.c index 97b003839fb6..31a0e0b455b6 100644 --- a/trunk/drivers/cpuidle/sysfs.c +++ b/trunk/drivers/cpuidle/sysfs.c @@ -21,8 +21,8 @@ static int __init cpuidle_sysfs_setup(char *unused) } __setup("cpuidle_sysfs_switch", cpuidle_sysfs_setup); -static ssize_t show_available_governors(struct sysdev_class *class, - char *buf) +static ssize_t show_available_governors(struct sys_device *dev, + struct sysdev_attribute *attr, char *buf) { ssize_t i = 0; struct cpuidle_governor *tmp; @@ -40,8 +40,8 @@ static ssize_t show_available_governors(struct sysdev_class *class, return i; } -static ssize_t show_current_driver(struct sysdev_class *class, - char *buf) +static ssize_t show_current_driver(struct sys_device *dev, + struct sysdev_attribute *attr, char *buf) { ssize_t ret; @@ -55,8 +55,8 @@ static ssize_t show_current_driver(struct sysdev_class *class, return ret; } -static ssize_t show_current_governor(struct sysdev_class *class, - char *buf) +static ssize_t show_current_governor(struct sys_device *dev, + struct sysdev_attribute *attr, char *buf) { ssize_t ret; @@ -70,8 +70,9 @@ static ssize_t show_current_governor(struct sysdev_class *class, return ret; } -static ssize_t store_current_governor(struct sysdev_class *class, - const char *buf, size_t count) +static ssize_t store_current_governor(struct sys_device *dev, + struct sysdev_attribute *attr, + const char *buf, size_t count) { char gov_name[CPUIDLE_NAME_LEN]; int ret = -EINVAL; @@ -103,9 +104,8 @@ static ssize_t store_current_governor(struct sysdev_class *class, return count; } -static SYSDEV_CLASS_ATTR(current_driver, 0444, show_current_driver, NULL); -static SYSDEV_CLASS_ATTR(current_governor_ro, 0444, show_current_governor, - NULL); +static SYSDEV_ATTR(current_driver, 0444, show_current_driver, NULL); +static SYSDEV_ATTR(current_governor_ro, 0444, show_current_governor, NULL); static struct attribute *cpuclass_default_attrs[] = { &attr_current_driver.attr, @@ -113,10 +113,9 @@ static struct attribute *cpuclass_default_attrs[] = { NULL }; -static SYSDEV_CLASS_ATTR(available_governors, 0444, show_available_governors, - NULL); -static SYSDEV_CLASS_ATTR(current_governor, 0644, show_current_governor, - store_current_governor); +static SYSDEV_ATTR(available_governors, 0444, show_available_governors, NULL); +static SYSDEV_ATTR(current_governor, 0644, show_current_governor, + store_current_governor); static struct attribute *cpuclass_switch_attrs[] = { &attr_available_governors.attr, diff --git a/trunk/drivers/firmware/memmap.c b/trunk/drivers/firmware/memmap.c index 3bf8ee120d42..001622eb86f9 100644 --- a/trunk/drivers/firmware/memmap.c +++ b/trunk/drivers/firmware/memmap.c @@ -84,23 +84,20 @@ static struct kobj_type memmap_ktype = { */ /* - * Firmware memory map entries. No locking is needed because the - * firmware_map_add() and firmware_map_add_early() functions are called - * in firmware initialisation code in one single thread of execution. + * Firmware memory map entries */ static LIST_HEAD(map_entries); /** - * firmware_map_add_entry() - Does the real work to add a firmware memmap entry. + * Common implementation of firmware_map_add() and firmware_map_add_early() + * which expects a pre-allocated struct firmware_map_entry. + * * @start: Start of the memory range. * @end: End of the memory range (inclusive). * @type: Type of the memory range. * @entry: Pre-allocated (either kmalloc() or bootmem allocator), uninitialised * entry. - * - * Common implementation of firmware_map_add() and firmware_map_add_early() - * which expects a pre-allocated struct firmware_map_entry. - **/ + */ static int firmware_map_add_entry(resource_size_t start, resource_size_t end, const char *type, struct firmware_map_entry *entry) @@ -118,52 +115,33 @@ static int firmware_map_add_entry(resource_size_t start, resource_size_t end, return 0; } -/** - * firmware_map_add() - Adds a firmware mapping entry. - * @start: Start of the memory range. - * @end: End of the memory range (inclusive). - * @type: Type of the memory range. - * - * This function uses kmalloc() for memory - * allocation. Use firmware_map_add_early() if you want to use the bootmem - * allocator. - * - * That function must be called before late_initcall. - * - * Returns 0 on success, or -ENOMEM if no memory could be allocated. - **/ +/* + * See for documentation. + */ int firmware_map_add(resource_size_t start, resource_size_t end, const char *type) { struct firmware_map_entry *entry; entry = kmalloc(sizeof(struct firmware_map_entry), GFP_ATOMIC); + WARN_ON(!entry); if (!entry) return -ENOMEM; return firmware_map_add_entry(start, end, type, entry); } -/** - * firmware_map_add_early() - Adds a firmware mapping entry. - * @start: Start of the memory range. - * @end: End of the memory range (inclusive). - * @type: Type of the memory range. - * - * Adds a firmware mapping entry. This function uses the bootmem allocator - * for memory allocation. Use firmware_map_add() if you want to use kmalloc(). - * - * That function must be called before late_initcall. - * - * Returns 0 on success, or -ENOMEM if no memory could be allocated. - **/ +/* + * See for documentation. + */ int __init firmware_map_add_early(resource_size_t start, resource_size_t end, const char *type) { struct firmware_map_entry *entry; entry = alloc_bootmem_low(sizeof(struct firmware_map_entry)); - if (WARN_ON(!entry)) + WARN_ON(!entry); + if (!entry) return -ENOMEM; return firmware_map_add_entry(start, end, type, entry); @@ -205,10 +183,7 @@ static ssize_t memmap_attr_show(struct kobject *kobj, /* * Initialises stuff and adds the entries in the map_entries list to * sysfs. Important is that firmware_map_add() and firmware_map_add_early() - * must be called before late_initcall. That's just because that function - * is called as late_initcall() function, which means that if you call - * firmware_map_add() or firmware_map_add_early() afterwards, the entries - * are not added to sysfs. + * must be called before late_initcall. */ static int __init memmap_init(void) { @@ -217,13 +192,13 @@ static int __init memmap_init(void) struct kset *memmap_kset; memmap_kset = kset_create_and_add("memmap", NULL, firmware_kobj); - if (WARN_ON(!memmap_kset)) + WARN_ON(!memmap_kset); + if (!memmap_kset) return -ENOMEM; list_for_each_entry(entry, &map_entries, list) { entry->kobj.kset = memmap_kset; - if (kobject_add(&entry->kobj, NULL, "%d", i++)) - kobject_put(&entry->kobj); + kobject_add(&entry->kobj, NULL, "%d", i++); } return 0; diff --git a/trunk/drivers/misc/sgi-gru/grutables.h b/trunk/drivers/misc/sgi-gru/grutables.h index a78f70deeb59..4251018f70ff 100644 --- a/trunk/drivers/misc/sgi-gru/grutables.h +++ b/trunk/drivers/misc/sgi-gru/grutables.h @@ -279,7 +279,7 @@ struct gru_stats_s { #if defined CONFIG_IA64 #define VADDR_HI_BIT 64 #define GRUREGION(addr) ((addr) >> (VADDR_HI_BIT - 3) & 3) -#elif defined CONFIG_X86_64 +#elif defined __x86_64 #define VADDR_HI_BIT 48 #define GRUREGION(addr) (0) /* ZZZ could do better */ #else diff --git a/trunk/drivers/rtc/rtc-dev.c b/trunk/drivers/rtc/rtc-dev.c index 35dcc06eb3e2..856cc1af40df 100644 --- a/trunk/drivers/rtc/rtc-dev.c +++ b/trunk/drivers/rtc/rtc-dev.c @@ -13,6 +13,7 @@ #include #include +#include #include "rtc-core.h" static dev_t rtc_devt; @@ -26,8 +27,11 @@ static int rtc_dev_open(struct inode *inode, struct file *file) struct rtc_device, char_dev); const struct rtc_class_ops *ops = rtc->ops; - if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) - return -EBUSY; + lock_kernel(); + if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) { + err = -EBUSY; + goto out; + } file->private_data = rtc; @@ -37,11 +41,13 @@ static int rtc_dev_open(struct inode *inode, struct file *file) rtc->irq_data = 0; spin_unlock_irq(&rtc->irq_lock); - return 0; + goto out; } /* something has gone wrong */ clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); +out: + unlock_kernel(); return err; } diff --git a/trunk/drivers/rtc/rtc-isl1208.c b/trunk/drivers/rtc/rtc-isl1208.c index a81adab6e515..fbb90b1e4098 100644 --- a/trunk/drivers/rtc/rtc-isl1208.c +++ b/trunk/drivers/rtc/rtc-isl1208.c @@ -482,7 +482,7 @@ isl1208_sysfs_register(struct device *dev) static int isl1208_sysfs_unregister(struct device *dev) { - device_remove_file(dev, &dev_attr_dtrim); + device_remove_file(dev, &dev_attr_atrim); device_remove_file(dev, &dev_attr_atrim); device_remove_file(dev, &dev_attr_usr); diff --git a/trunk/drivers/usb/misc/isight_firmware.c b/trunk/drivers/usb/misc/isight_firmware.c index b897f6554ecd..d94aa7387608 100644 --- a/trunk/drivers/usb/misc/isight_firmware.c +++ b/trunk/drivers/usb/misc/isight_firmware.c @@ -48,8 +48,7 @@ static int isight_firmware_load(struct usb_interface *intf, if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) { printk(KERN_ERR "Unable to load isight firmware\n"); - ret = -ENODEV; - goto out; + return -ENODEV; } ptr = firmware->data; @@ -92,6 +91,7 @@ static int isight_firmware_load(struct usb_interface *intf, buf, llen, 300) != llen) { printk(KERN_ERR "Failed to load isight firmware\n"); + kfree(buf); ret = -ENODEV; goto out; } diff --git a/trunk/drivers/video/atmel_lcdfb.c b/trunk/drivers/video/atmel_lcdfb.c index 9c5925927ece..e7018a2f56af 100644 --- a/trunk/drivers/video/atmel_lcdfb.c +++ b/trunk/drivers/video/atmel_lcdfb.c @@ -39,9 +39,7 @@ #endif #if defined(CONFIG_ARCH_AT91) -#define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \ - | FBINFO_PARTIAL_PAN_OK \ - | FBINFO_HWACCEL_YPAN) +#define ATMEL_LCDFB_FBINFO_DEFAULT FBINFO_DEFAULT static inline void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo, struct fb_var_screeninfo *var) @@ -179,7 +177,7 @@ static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = { .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_TRUECOLOR, .xpanstep = 0, - .ypanstep = 1, + .ypanstep = 0, .ywrapstep = 0, .accel = FB_ACCEL_NONE, }; @@ -242,11 +240,9 @@ static int atmel_lcdfb_alloc_video_memory(struct atmel_lcdfb_info *sinfo) { struct fb_info *info = sinfo->info; struct fb_var_screeninfo *var = &info->var; - unsigned int smem_len; - smem_len = (var->xres_virtual * var->yres_virtual - * ((var->bits_per_pixel + 7) / 8)); - info->fix.smem_len = max(smem_len, sinfo->smem_len); + info->fix.smem_len = (var->xres_virtual * var->yres_virtual + * ((var->bits_per_pixel + 7) / 8)); info->screen_base = dma_alloc_writecombine(info->device, info->fix.smem_len, (dma_addr_t *)&info->fix.smem_start, GFP_KERNEL); @@ -798,7 +794,6 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) sinfo->default_monspecs = pdata_sinfo->default_monspecs; sinfo->atmel_lcdfb_power_control = pdata_sinfo->atmel_lcdfb_power_control; sinfo->guard_time = pdata_sinfo->guard_time; - sinfo->smem_len = pdata_sinfo->smem_len; sinfo->lcdcon_is_backlight = pdata_sinfo->lcdcon_is_backlight; sinfo->lcd_wiring_mode = pdata_sinfo->lcd_wiring_mode; } else { diff --git a/trunk/drivers/video/aty/radeon_accel.c b/trunk/drivers/video/aty/radeon_accel.c index aa95f8350242..4d13f68436e6 100644 --- a/trunk/drivers/video/aty/radeon_accel.c +++ b/trunk/drivers/video/aty/radeon_accel.c @@ -55,10 +55,6 @@ static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo, OUTREG(DP_WRITE_MSK, 0xffffffff); OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM)); - radeon_fifo_wait(2); - OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); - OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); - radeon_fifo_wait(2); OUTREG(DST_Y_X, (region->dy << 16) | region->dx); OUTREG(DST_WIDTH_HEIGHT, (region->width << 16) | region->height); @@ -120,10 +116,6 @@ static void radeonfb_prim_copyarea(struct radeonfb_info *rinfo, OUTREG(DP_CNTL, (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0) | (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0)); - radeon_fifo_wait(2); - OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); - OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); - radeon_fifo_wait(3); OUTREG(SRC_Y_X, (sy << 16) | sx); OUTREG(DST_Y_X, (dy << 16) | dx); diff --git a/trunk/drivers/video/console/fbcon.c b/trunk/drivers/video/console/fbcon.c index c6299e8a041d..33859934a8e4 100644 --- a/trunk/drivers/video/console/fbcon.c +++ b/trunk/drivers/video/console/fbcon.c @@ -2518,7 +2518,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, c = vc->vc_video_erase_char; vc->vc_video_erase_char = ((c & 0xfe00) >> 1) | (c & 0xff); - c = vc->vc_scrl_erase_char; + c = vc->vc_def_color; vc->vc_scrl_erase_char = ((c & 0xFE00) >> 1) | (c & 0xFF); vc->vc_attr >>= 1; @@ -2551,7 +2551,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, if (vc->vc_can_do_color) { vc->vc_video_erase_char = ((c & 0xff00) << 1) | (c & 0xff); - c = vc->vc_scrl_erase_char; + c = vc->vc_def_color; vc->vc_scrl_erase_char = ((c & 0xFF00) << 1) | (c & 0xFF); vc->vc_attr <<= 1; diff --git a/trunk/drivers/video/matrox/i2c-matroxfb.c b/trunk/drivers/video/matrox/i2c-matroxfb.c index c14e3e2212b3..75ee5a12e549 100644 --- a/trunk/drivers/video/matrox/i2c-matroxfb.c +++ b/trunk/drivers/video/matrox/i2c-matroxfb.c @@ -87,7 +87,13 @@ static int matroxfb_gpio_getscl(void* data) { return (matroxfb_read_gpio(b->minfo) & b->mask.clock) ? 1 : 0; } -static const struct i2c_algo_bit_data matrox_i2c_algo_template = +static struct i2c_adapter matrox_i2c_adapter_template = +{ + .owner = THIS_MODULE, + .id = I2C_HW_B_G400, +}; + +static struct i2c_algo_bit_data matrox_i2c_algo_template = { .setsda = matroxfb_gpio_setsda, .setscl = matroxfb_gpio_setscl, @@ -106,7 +112,7 @@ static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo, b->minfo = minfo; b->mask.data = data; b->mask.clock = clock; - b->adapter.owner = THIS_MODULE; + b->adapter = matrox_i2c_adapter_template; snprintf(b->adapter.name, sizeof(b->adapter.name), name, minfo->fbcon.node); i2c_set_adapdata(&b->adapter, b); @@ -181,17 +187,6 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) { MAT_DATA, MAT_CLK, "MAVEN:fb%u", 0); if (err) printk(KERN_INFO "i2c-matroxfb: Could not register Maven i2c bus. Continuing anyway.\n"); - else { - struct i2c_board_info maven_info = { - I2C_BOARD_INFO("maven", 0x1b), - }; - unsigned short const addr_list[2] = { - 0x1b, I2C_CLIENT_END - }; - - i2c_new_probed_device(&m2info->maven.adapter, - &maven_info, addr_list); - } } return m2info; fail_ddc1:; diff --git a/trunk/drivers/video/matrox/matroxfb_maven.c b/trunk/drivers/video/matrox/matroxfb_maven.c index 042408a8c631..89da27bd5c49 100644 --- a/trunk/drivers/video/matrox/matroxfb_maven.c +++ b/trunk/drivers/video/matrox/matroxfb_maven.c @@ -19,6 +19,8 @@ #include #include +#define MAVEN_I2CID (0x1B) + #define MGATVO_B 1 #define MGATVO_C 2 @@ -126,7 +128,7 @@ static int get_ctrl_id(__u32 v4l2_id) { struct maven_data { struct matrox_fb_info* primary_head; - struct i2c_client *client; + struct i2c_client client; int version; }; @@ -972,7 +974,7 @@ static inline int maven_compute_timming(struct maven_data* md, static int maven_program_timming(struct maven_data* md, const struct mavenregs* m) { - struct i2c_client *c = md->client; + struct i2c_client* c = &md->client; if (m->mode == MATROXFB_OUTPUT_MODE_MONITOR) { LR(0x80); @@ -1009,7 +1011,7 @@ static int maven_program_timming(struct maven_data* md, } static inline int maven_resync(struct maven_data* md) { - struct i2c_client *c = md->client; + struct i2c_client* c = &md->client; maven_set_reg(c, 0x95, 0x20); /* start whole thing */ return 0; } @@ -1067,48 +1069,48 @@ static int maven_set_control (struct maven_data* md, maven_compute_bwlevel(md, &blacklevel, &whitelevel); blacklevel = (blacklevel >> 2) | ((blacklevel & 3) << 8); whitelevel = (whitelevel >> 2) | ((whitelevel & 3) << 8); - maven_set_reg_pair(md->client, 0x0e, blacklevel); - maven_set_reg_pair(md->client, 0x1e, whitelevel); + maven_set_reg_pair(&md->client, 0x0e, blacklevel); + maven_set_reg_pair(&md->client, 0x1e, whitelevel); } break; case V4L2_CID_SATURATION: { - maven_set_reg(md->client, 0x20, p->value); - maven_set_reg(md->client, 0x22, p->value); + maven_set_reg(&md->client, 0x20, p->value); + maven_set_reg(&md->client, 0x22, p->value); } break; case V4L2_CID_HUE: { - maven_set_reg(md->client, 0x25, p->value); + maven_set_reg(&md->client, 0x25, p->value); } break; case V4L2_CID_GAMMA: { const struct maven_gamma* g; g = maven_compute_gamma(md); - maven_set_reg(md->client, 0x83, g->reg83); - maven_set_reg(md->client, 0x84, g->reg84); - maven_set_reg(md->client, 0x85, g->reg85); - maven_set_reg(md->client, 0x86, g->reg86); - maven_set_reg(md->client, 0x87, g->reg87); - maven_set_reg(md->client, 0x88, g->reg88); - maven_set_reg(md->client, 0x89, g->reg89); - maven_set_reg(md->client, 0x8a, g->reg8a); - maven_set_reg(md->client, 0x8b, g->reg8b); + maven_set_reg(&md->client, 0x83, g->reg83); + maven_set_reg(&md->client, 0x84, g->reg84); + maven_set_reg(&md->client, 0x85, g->reg85); + maven_set_reg(&md->client, 0x86, g->reg86); + maven_set_reg(&md->client, 0x87, g->reg87); + maven_set_reg(&md->client, 0x88, g->reg88); + maven_set_reg(&md->client, 0x89, g->reg89); + maven_set_reg(&md->client, 0x8a, g->reg8a); + maven_set_reg(&md->client, 0x8b, g->reg8b); } break; case MATROXFB_CID_TESTOUT: { unsigned char val - = maven_get_reg(md->client, 0x8d); + = maven_get_reg(&md->client,0x8d); if (p->value) val |= 0x10; else val &= ~0x10; - maven_set_reg(md->client, 0x8d, val); + maven_set_reg(&md->client, 0x8d, val); } break; case MATROXFB_CID_DEFLICKER: { - maven_set_reg(md->client, 0x93, maven_compute_deflicker(md)); + maven_set_reg(&md->client, 0x93, maven_compute_deflicker(md)); } break; } @@ -1187,7 +1189,6 @@ static int maven_init_client(struct i2c_client* clnt) { MINFO_FROM(container_of(clnt->adapter, struct i2c_bit_adapter, adapter)->minfo); md->primary_head = MINFO; - md->client = clnt; down_write(&ACCESS_FBINFO(altout.lock)); ACCESS_FBINFO(outputs[1]).output = &maven_altout; ACCESS_FBINFO(outputs[1]).src = ACCESS_FBINFO(outputs[1]).default_src; @@ -1231,11 +1232,14 @@ static int maven_shutdown_client(struct i2c_client* clnt) { return 0; } -static int maven_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - struct i2c_adapter *adapter = client->adapter; - int err = -ENODEV; +static const unsigned short normal_i2c[] = { MAVEN_I2CID, I2C_CLIENT_END }; +I2C_CLIENT_INSMOD; + +static struct i2c_driver maven_driver; + +static int maven_detect_client(struct i2c_adapter* adapter, int address, int kind) { + int err = 0; + struct i2c_client* new_client; struct maven_data* data; if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_WORD_DATA | @@ -1246,37 +1250,50 @@ static int maven_probe(struct i2c_client *client, err = -ENOMEM; goto ERROR0; } - i2c_set_clientdata(client, data); - err = maven_init_client(client); + new_client = &data->client; + i2c_set_clientdata(new_client, data); + new_client->addr = address; + new_client->adapter = adapter; + new_client->driver = &maven_driver; + new_client->flags = 0; + strlcpy(new_client->name, "maven", I2C_NAME_SIZE); + if ((err = i2c_attach_client(new_client))) + goto ERROR3; + err = maven_init_client(new_client); if (err) goto ERROR4; return 0; ERROR4:; - kfree(data); + i2c_detach_client(new_client); +ERROR3:; + kfree(new_client); ERROR0:; return err; } -static int maven_remove(struct i2c_client *client) -{ +static int maven_attach_adapter(struct i2c_adapter* adapter) { + if (adapter->id == I2C_HW_B_G400) + return i2c_probe(adapter, &addr_data, &maven_detect_client); + return 0; +} + +static int maven_detach_client(struct i2c_client* client) { + int err; + + if ((err = i2c_detach_client(client))) + return err; maven_shutdown_client(client); kfree(i2c_get_clientdata(client)); return 0; } -static const struct i2c_device_id maven_id[] = { - { "maven", 0 }, - { } -}; -MODULE_DEVICE_TABLE(i2c, maven_id); - static struct i2c_driver maven_driver={ .driver = { .name = "maven", }, - .probe = maven_probe, - .remove = maven_remove, - .id_table = maven_id, + .id = I2C_DRIVERID_MGATVO, + .attach_adapter = maven_attach_adapter, + .detach_client = maven_detach_client, }; static int __init matroxfb_maven_init(void) diff --git a/trunk/drivers/watchdog/Kconfig b/trunk/drivers/watchdog/Kconfig index db20542796bf..32b9fe153641 100644 --- a/trunk/drivers/watchdog/Kconfig +++ b/trunk/drivers/watchdog/Kconfig @@ -285,11 +285,10 @@ config ALIM1535_WDT config ALIM7101_WDT tristate "ALi M7101 PMU Computer Watchdog" - depends on PCI + depends on X86 && PCI help This is the driver for the hardware watchdog on the ALi M7101 PMU - as used in the x86 Cobalt servers and also found in some - SPARC Netra servers too. + as used in the x86 Cobalt servers. To compile this driver as a module, choose M here: the module will be called alim7101_wdt. diff --git a/trunk/fs/eventpoll.c b/trunk/fs/eventpoll.c index 7cc0eb756b55..0c87474f7917 100644 --- a/trunk/fs/eventpoll.c +++ b/trunk/fs/eventpoll.c @@ -1041,7 +1041,10 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events, } /* - * Open an eventpoll file descriptor. + * It opens an eventpoll file descriptor. The "size" parameter is there + * for historical reasons, when epoll was using an hash instead of an + * RB tree. With the current implementation, the "size" parameter is ignored + * (besides sanity checks). */ asmlinkage long sys_epoll_create1(int flags) { diff --git a/trunk/fs/reiserfs/super.c b/trunk/fs/reiserfs/super.c index d318c7e663fa..282a13596c70 100644 --- a/trunk/fs/reiserfs/super.c +++ b/trunk/fs/reiserfs/super.c @@ -27,6 +27,7 @@ #include #include #include +#include struct file_system_type reiserfs_fs_type; diff --git a/trunk/fs/seq_file.c b/trunk/fs/seq_file.c index 5d54205e486b..3f54dbd6c49b 100644 --- a/trunk/fs/seq_file.c +++ b/trunk/fs/seq_file.c @@ -443,20 +443,6 @@ int seq_dentry(struct seq_file *m, struct dentry *dentry, char *esc) return -1; } -int seq_bitmap(struct seq_file *m, unsigned long *bits, unsigned int nr_bits) -{ - size_t len = bitmap_scnprintf_len(nr_bits); - - if (m->count + len < m->size) { - bitmap_scnprintf(m->buf + m->count, m->size - m->count, - bits, nr_bits); - m->count += len; - return 0; - } - m->count = m->size; - return -1; -} - static void *single_start(struct seq_file *p, loff_t *pos) { return NULL + (*pos == 0); diff --git a/trunk/include/asm-generic/ioctl.h b/trunk/include/asm-generic/ioctl.h index 15828b2d663c..864181385579 100644 --- a/trunk/include/asm-generic/ioctl.h +++ b/trunk/include/asm-generic/ioctl.h @@ -68,16 +68,12 @@ ((nr) << _IOC_NRSHIFT) | \ ((size) << _IOC_SIZESHIFT)) -#ifdef __KERNEL__ /* provoke compile error for invalid uses of size argument */ extern unsigned int __invalid_size_argument_for_IOC; #define _IOC_TYPECHECK(t) \ ((sizeof(t) == sizeof(t[1]) && \ sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ sizeof(t) : __invalid_size_argument_for_IOC) -#else -#define _IOC_TYPECHECK(t) (sizeof(t)) -#endif /* used to create numbers */ #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) diff --git a/trunk/include/linux/bitmap.h b/trunk/include/linux/bitmap.h index 89781fd48859..1abfe664c444 100644 --- a/trunk/include/linux/bitmap.h +++ b/trunk/include/linux/bitmap.h @@ -110,7 +110,6 @@ extern int __bitmap_weight(const unsigned long *bitmap, int bits); extern int bitmap_scnprintf(char *buf, unsigned int len, const unsigned long *src, int nbits); -extern int bitmap_scnprintf_len(unsigned int nr_bits); extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, unsigned long *dst, int nbits); extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, diff --git a/trunk/include/linux/bootmem.h b/trunk/include/linux/bootmem.h index 95837bfb5256..652470b687c9 100644 --- a/trunk/include/linux/bootmem.h +++ b/trunk/include/linux/bootmem.h @@ -97,14 +97,10 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE #define alloc_bootmem(x) \ __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) -#define alloc_bootmem_nopanic(x) \ - __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_low(x) \ __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) #define alloc_bootmem_pages(x) \ __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) -#define alloc_bootmem_pages_nopanic(x) \ - __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_low_pages(x) \ __alloc_bootmem_low(x, PAGE_SIZE, 0) #define alloc_bootmem_node(pgdat, x) \ diff --git a/trunk/include/linux/byteorder.h b/trunk/include/linux/byteorder.h deleted file mode 100644 index 29f002d73d98..000000000000 --- a/trunk/include/linux/byteorder.h +++ /dev/null @@ -1,372 +0,0 @@ -#ifndef _LINUX_BYTEORDER_H -#define _LINUX_BYTEORDER_H - -#include -#include - -#if defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN) -# error Fix asm/byteorder.h to define one endianness -#endif - -#if !defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN) -# error Fix asm/byteorder.h to define arch endianness -#endif - -#ifdef __LITTLE_ENDIAN -# undef __LITTLE_ENDIAN -# define __LITTLE_ENDIAN 1234 -#endif - -#ifdef __BIG_ENDIAN -# undef __BIG_ENDIAN -# define __BIG_ENDIAN 4321 -#endif - -#if defined(__LITTLE_ENDIAN) && !defined(__LITTLE_ENDIAN_BITFIELD) -# define __LITTLE_ENDIAN_BITFIELD -#endif - -#if defined(__BIG_ENDIAN) && !defined(__BIG_ENDIAN_BITFIELD) -# define __BIG_ENDIAN_BITFIELD -#endif - -#ifdef __LITTLE_ENDIAN -# define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) -# define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) -# define __le64_to_cpu(x) ((__force __u64)(__le64)(x)) -# define __cpu_to_le16(x) ((__force __le16)(__u16)(x)) -# define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) -# define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) - -# define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x)) -# define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) -# define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x)) -# define __cpu_to_be16(x) ((__force __be16)__swab16(x)) -# define __cpu_to_be32(x) ((__force __be32)__swab32(x)) -# define __cpu_to_be64(x) ((__force __be64)__swab64(x)) -#endif - -#ifdef __BIG_ENDIAN -# define __be16_to_cpu(x) ((__force __u16)(__be16)(x)) -# define __be32_to_cpu(x) ((__force __u32)(__be32)(x)) -# define __be64_to_cpu(x) ((__force __u64)(__be64)(x)) -# define __cpu_to_be16(x) ((__force __be16)(__u16)(x)) -# define __cpu_to_be32(x) ((__force __be32)(__u32)(x)) -# define __cpu_to_be64(x) ((__force __be64)(__u64)(x)) - -# define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) -# define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) -# define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x)) -# define __cpu_to_le16(x) ((__force __le16)__swab16(x)) -# define __cpu_to_le32(x) ((__force __le32)__swab32(x)) -# define __cpu_to_le64(x) ((__force __le64)__swab64(x)) -#endif - -/* - * These helpers could be phased out over time as the base version - * handles constant folding. - */ -#define __constant_htonl(x) __cpu_to_be32(x) -#define __constant_ntohl(x) __be32_to_cpu(x) -#define __constant_htons(x) __cpu_to_be16(x) -#define __constant_ntohs(x) __be16_to_cpu(x) - -#define __constant_le16_to_cpu(x) __le16_to_cpu(x) -#define __constant_le32_to_cpu(x) __le32_to_cpu(x) -#define __constant_le64_to_cpu(x) __le64_to_cpu(x) -#define __constant_be16_to_cpu(x) __be16_to_cpu(x) -#define __constant_be32_to_cpu(x) __be32_to_cpu(x) -#define __constant_be64_to_cpu(x) __be64_to_cpu(x) - -#define __constant_cpu_to_le16(x) __cpu_to_le16(x) -#define __constant_cpu_to_le32(x) __cpu_to_le32(x) -#define __constant_cpu_to_le64(x) __cpu_to_le64(x) -#define __constant_cpu_to_be16(x) __cpu_to_be16(x) -#define __constant_cpu_to_be32(x) __cpu_to_be32(x) -#define __constant_cpu_to_be64(x) __cpu_to_be64(x) - -static inline void __le16_to_cpus(__u16 *p) -{ -#ifdef __BIG_ENDIAN - __swab16s(p); -#endif -} - -static inline void __cpu_to_le16s(__u16 *p) -{ -#ifdef __BIG_ENDIAN - __swab16s(p); -#endif -} - -static inline void __le32_to_cpus(__u32 *p) -{ -#ifdef __BIG_ENDIAN - __swab32s(p); -#endif -} - -static inline void __cpu_to_le32s(__u32 *p) -{ -#ifdef __BIG_ENDIAN - __swab32s(p); -#endif -} - -static inline void __le64_to_cpus(__u64 *p) -{ -#ifdef __BIG_ENDIAN - __swab64s(p); -#endif -} - -static inline void __cpu_to_le64s(__u64 *p) -{ -#ifdef __BIG_ENDIAN - __swab64s(p); -#endif -} - -static inline void __be16_to_cpus(__u16 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab16s(p); -#endif -} - -static inline void __cpu_to_be16s(__u16 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab16s(p); -#endif -} - -static inline void __be32_to_cpus(__u32 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab32s(p); -#endif -} - -static inline void __cpu_to_be32s(__u32 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab32s(p); -#endif -} - -static inline void __be64_to_cpus(__u64 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab64s(p); -#endif -} - -static inline void __cpu_to_be64s(__u64 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab64s(p); -#endif -} - -static inline __u16 __le16_to_cpup(const __le16 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __u16)*p; -#else - return __swab16p((__force __u16 *)p); -#endif -} - -static inline __u32 __le32_to_cpup(const __le32 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __u32)*p; -#else - return __swab32p((__force __u32 *)p); -#endif -} - -static inline __u64 __le64_to_cpup(const __le64 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __u64)*p; -#else - return __swab64p((__force __u64 *)p); -#endif -} - -static inline __le16 __cpu_to_le16p(const __u16 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __le16)*p; -#else - return (__force __le16)__swab16p(p); -#endif -} - -static inline __le32 __cpu_to_le32p(const __u32 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __le32)*p; -#else - return (__force __le32)__swab32p(p); -#endif -} - -static inline __le64 __cpu_to_le64p(const __u64 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __le64)*p; -#else - return (__force __le64)__swab64p(p); -#endif -} - -static inline __u16 __be16_to_cpup(const __be16 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __u16)*p; -#else - return __swab16p((__force __u16 *)p); -#endif -} - -static inline __u32 __be32_to_cpup(const __be32 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __u32)*p; -#else - return __swab32p((__force __u32 *)p); -#endif -} - -static inline __u64 __be64_to_cpup(const __be64 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __u64)*p; -#else - return __swab64p((__force __u64 *)p); -#endif -} - -static inline __be16 __cpu_to_be16p(const __u16 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __be16)*p; -#else - return (__force __be16)__swab16p(p); -#endif -} - -static inline __be32 __cpu_to_be32p(const __u32 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __be32)*p; -#else - return (__force __be32)__swab32p(p); -#endif -} - -static inline __be64 __cpu_to_be64p(const __u64 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __be64)*p; -#else - return (__force __be64)__swab64p(p); -#endif -} - -#ifdef __KERNEL__ - -# define le16_to_cpu __le16_to_cpu -# define le32_to_cpu __le32_to_cpu -# define le64_to_cpu __le64_to_cpu -# define be16_to_cpu __be16_to_cpu -# define be32_to_cpu __be32_to_cpu -# define be64_to_cpu __be64_to_cpu -# define cpu_to_le16 __cpu_to_le16 -# define cpu_to_le32 __cpu_to_le32 -# define cpu_to_le64 __cpu_to_le64 -# define cpu_to_be16 __cpu_to_be16 -# define cpu_to_be32 __cpu_to_be32 -# define cpu_to_be64 __cpu_to_be64 - -# define le16_to_cpup __le16_to_cpup -# define le32_to_cpup __le32_to_cpup -# define le64_to_cpup __le64_to_cpup -# define be16_to_cpup __be16_to_cpup -# define be32_to_cpup __be32_to_cpup -# define be64_to_cpup __be64_to_cpup -# define cpu_to_le16p __cpu_to_le16p -# define cpu_to_le32p __cpu_to_le32p -# define cpu_to_le64p __cpu_to_le64p -# define cpu_to_be16p __cpu_to_be16p -# define cpu_to_be32p __cpu_to_be32p -# define cpu_to_be64p __cpu_to_be64p - -# define le16_to_cpus __le16_to_cpus -# define le32_to_cpus __le32_to_cpus -# define le64_to_cpus __le64_to_cpus -# define be16_to_cpus __be16_to_cpus -# define be32_to_cpus __be32_to_cpus -# define be64_to_cpus __be64_to_cpus -# define cpu_to_le16s __cpu_to_le16s -# define cpu_to_le32s __cpu_to_le32s -# define cpu_to_le64s __cpu_to_le64s -# define cpu_to_be16s __cpu_to_be16s -# define cpu_to_be32s __cpu_to_be32s -# define cpu_to_be64s __cpu_to_be64s - -/* - * They have to be macros in order to do the constant folding - * correctly - if the argument passed into a inline function - * it is no longer constant according to gcc.. - */ -# undef ntohl -# undef ntohs -# undef htonl -# undef htons - -# define ___htonl(x) __cpu_to_be32(x) -# define ___htons(x) __cpu_to_be16(x) -# define ___ntohl(x) __be32_to_cpu(x) -# define ___ntohs(x) __be16_to_cpu(x) - -# define htonl(x) ___htonl(x) -# define ntohl(x) ___ntohl(x) -# define htons(x) ___htons(x) -# define ntohs(x) ___ntohs(x) - -static inline void le16_add_cpu(__le16 *var, u16 val) -{ - *var = cpu_to_le16(le16_to_cpup(var) + val); -} - -static inline void le32_add_cpu(__le32 *var, u32 val) -{ - *var = cpu_to_le32(le32_to_cpup(var) + val); -} - -static inline void le64_add_cpu(__le64 *var, u64 val) -{ - *var = cpu_to_le64(le64_to_cpup(var) + val); -} - -static inline void be16_add_cpu(__be16 *var, u16 val) -{ - *var = cpu_to_be16(be16_to_cpup(var) + val); -} - -static inline void be32_add_cpu(__be32 *var, u32 val) -{ - *var = cpu_to_be32(be32_to_cpup(var) + val); -} - -static inline void be64_add_cpu(__be64 *var, u64 val) -{ - *var = cpu_to_be64(be64_to_cpup(var) + val); -} - -#endif /* __KERNEL__ */ -#endif /* _LINUX_BYTEORDER_H */ diff --git a/trunk/include/linux/firmware-map.h b/trunk/include/linux/firmware-map.h index 6e199c8dfacc..acbdbcc16051 100644 --- a/trunk/include/linux/firmware-map.h +++ b/trunk/include/linux/firmware-map.h @@ -24,8 +24,34 @@ */ #ifdef CONFIG_FIRMWARE_MEMMAP +/** + * Adds a firmware mapping entry. This function uses kmalloc() for memory + * allocation. Use firmware_map_add_early() if you want to use the bootmem + * allocator. + * + * That function must be called before late_initcall. + * + * @start: Start of the memory range. + * @end: End of the memory range (inclusive). + * @type: Type of the memory range. + * + * Returns 0 on success, or -ENOMEM if no memory could be allocated. + */ int firmware_map_add(resource_size_t start, resource_size_t end, const char *type); + +/** + * Adds a firmware mapping entry. This function uses the bootmem allocator + * for memory allocation. Use firmware_map_add() if you want to use kmalloc(). + * + * That function must be called before late_initcall. + * + * @start: Start of the memory range. + * @end: End of the memory range (inclusive). + * @type: Type of the memory range. + * + * Returns 0 on success, or -ENOMEM if no memory could be allocated. + */ int firmware_map_add_early(resource_size_t start, resource_size_t end, const char *type); diff --git a/trunk/include/linux/i2c-id.h b/trunk/include/linux/i2c-id.h index bf34c5f4c051..4862398e05bf 100644 --- a/trunk/include/linux/i2c-id.h +++ b/trunk/include/linux/i2c-id.h @@ -39,6 +39,7 @@ #define I2C_DRIVERID_SAA7111A 8 /* video input processor */ #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ #define I2C_DRIVERID_SAA7110 22 /* video decoder */ +#define I2C_DRIVERID_MGATVO 23 /* Matrox TVOut */ #define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ #define I2C_DRIVERID_PCF8583 25 /* real time clock */ #define I2C_DRIVERID_SAB3036 26 /* SAB3036 tuner */ @@ -94,6 +95,7 @@ #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ #define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ #define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ +#define I2C_HW_B_G400 0x010009 /* Matrox G400 */ #define I2C_HW_B_I810 0x01000a /* Intel I810 */ #define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ #define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ diff --git a/trunk/include/linux/kernel.h b/trunk/include/linux/kernel.h index 2651f805ba6d..aaa998f65c7a 100644 --- a/trunk/include/linux/kernel.h +++ b/trunk/include/linux/kernel.h @@ -108,13 +108,6 @@ struct completion; struct pt_regs; struct user; -#ifdef CONFIG_PREEMPT_VOLUNTARY -extern int _cond_resched(void); -# define might_resched() _cond_resched() -#else -# define might_resched() do { } while (0) -#endif - /** * might_sleep - annotation for functions that can sleep * @@ -125,6 +118,13 @@ extern int _cond_resched(void); * be bitten later when the calling function happens to sleep when it is not * supposed to. */ +#ifdef CONFIG_PREEMPT_VOLUNTARY +extern int _cond_resched(void); +# define might_resched() _cond_resched() +#else +# define might_resched() do { } while (0) +#endif + #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP void __might_sleep(char *file, int line); # define might_sleep() \ diff --git a/trunk/include/linux/seq_file.h b/trunk/include/linux/seq_file.h index a1783b229ef4..a66304a09955 100644 --- a/trunk/include/linux/seq_file.h +++ b/trunk/include/linux/seq_file.h @@ -4,8 +4,6 @@ #include #include #include -#include -#include struct seq_operations; struct file; @@ -49,16 +47,6 @@ int seq_path(struct seq_file *, struct path *, char *); int seq_dentry(struct seq_file *, struct dentry *, char *); int seq_path_root(struct seq_file *m, struct path *path, struct path *root, char *esc); -int seq_bitmap(struct seq_file *m, unsigned long *bits, unsigned int nr_bits); -static inline int seq_cpumask(struct seq_file *m, cpumask_t *mask) -{ - return seq_bitmap(m, mask->bits, NR_CPUS); -} - -static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) -{ - return seq_bitmap(m, mask->bits, MAX_NUMNODES); -} int single_open(struct file *, int (*)(struct seq_file *, void *), void *); int single_release(struct inode *, struct file *); diff --git a/trunk/include/linux/swab.h b/trunk/include/linux/swab.h deleted file mode 100644 index 270d5c208a89..000000000000 --- a/trunk/include/linux/swab.h +++ /dev/null @@ -1,309 +0,0 @@ -#ifndef _LINUX_SWAB_H -#define _LINUX_SWAB_H - -#include -#include -#include - -/* - * casts are necessary for constants, because we never know how for sure - * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. - */ -#define __const_swab16(x) ((__u16)( \ - (((__u16)(x) & (__u16)0x00ffU) << 8) | \ - (((__u16)(x) & (__u16)0xff00U) >> 8))) - -#define __const_swab32(x) ((__u32)( \ - (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ - (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ - (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ - (((__u32)(x) & (__u32)0xff000000UL) >> 24))) - -#define __const_swab64(x) ((__u64)( \ - (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ - (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \ - (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \ - (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \ - (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \ - (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ - (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \ - (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56))) - -#define __const_swahw32(x) ((__u32)( \ - (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \ - (((__u32)(x) & (__u32)0xffff0000UL) >> 16))) - -#define __const_swahb32(x) ((__u32)( \ - (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \ - (((__u32)(x) & (__u32)0xff00ff00UL) >> 8))) - -/* - * Implement the following as inlines, but define the interface using - * macros to allow constant folding when possible: - * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32 - */ - -static inline __attribute_const__ __u16 ___swab16(__u16 val) -{ -#ifdef __arch_swab16 - return __arch_swab16(val); -#elif defined(__arch_swab16p) - return __arch_swab16p(&val); -#else - return __const_swab16(val); -#endif -} - -static inline __attribute_const__ __u32 ___swab32(__u32 val) -{ -#ifdef __arch_swab32 - return __arch_swab32(val); -#elif defined(__arch_swab32p) - return __arch_swab32p(&val); -#else - return __const_swab32(val); -#endif -} - -static inline __attribute_const__ __u64 ___swab64(__u64 val) -{ -#ifdef __arch_swab64 - return __arch_swab64(val); -#elif defined(__arch_swab64p) - return __arch_swab64p(&val); -#elif defined(__SWAB_64_THRU_32__) - __u32 h = val >> 32; - __u32 l = val & ((1ULL << 32) - 1); - return (((__u64)___swab32(l)) << 32) | ((__u64)(___swab32(h))); -#else - return __const_swab64(val); -#endif -} - -static inline __attribute_const__ __u32 ___swahw32(__u32 val) -{ -#ifdef __arch_swahw32 - return __arch_swahw32(val); -#elif defined(__arch_swahw32p) - return __arch_swahw32p(&val); -#else - return __const_swahw32(val); -#endif -} - -static inline __attribute_const__ __u32 ___swahb32(__u32 val) -{ -#ifdef __arch_swahb32 - return __arch_swahb32(val); -#elif defined(__arch_swahb32p) - return __arch_swahb32p(&val); -#else - return __const_swahb32(val); -#endif -} - -/** - * __swab16 - return a byteswapped 16-bit value - * @x: value to byteswap - */ -#define __swab16(x) \ - (__builtin_constant_p((__u16)(x)) ? \ - __const_swab16((x)) : \ - ___swab16((x))) - -/** - * __swab32 - return a byteswapped 32-bit value - * @x: value to byteswap - */ -#define __swab32(x) \ - (__builtin_constant_p((__u32)(x)) ? \ - __const_swab32((x)) : \ - ___swab32((x))) - -/** - * __swab64 - return a byteswapped 64-bit value - * @x: value to byteswap - */ -#define __swab64(x) \ - (__builtin_constant_p((__u64)(x)) ? \ - __const_swab64((x)) : \ - ___swab64((x))) - -/** - * __swahw32 - return a word-swapped 32-bit value - * @x: value to wordswap - * - * __swahw32(0x12340000) is 0x00001234 - */ -#define __swahw32(x) \ - (__builtin_constant_p((__u32)(x)) ? \ - __const_swahw32((x)) : \ - ___swahw32((x))) - -/** - * __swahb32 - return a high and low byte-swapped 32-bit value - * @x: value to byteswap - * - * __swahb32(0x12345678) is 0x34127856 - */ -#define __swahb32(x) \ - (__builtin_constant_p((__u32)(x)) ? \ - __const_swahb32((x)) : \ - ___swahb32((x))) - -/** - * __swab16p - return a byteswapped 16-bit value from a pointer - * @p: pointer to a naturally-aligned 16-bit value - */ -static inline __u16 __swab16p(const __u16 *p) -{ -#ifdef __arch_swab16p - return __arch_swab16p(p); -#else - return __swab16(*p); -#endif -} - -/** - * __swab32p - return a byteswapped 32-bit value from a pointer - * @p: pointer to a naturally-aligned 32-bit value - */ -static inline __u32 __swab32p(const __u32 *p) -{ -#ifdef __arch_swab32p - return __arch_swab32p(p); -#else - return __swab32(*p); -#endif -} - -/** - * __swab64p - return a byteswapped 64-bit value from a pointer - * @p: pointer to a naturally-aligned 64-bit value - */ -static inline __u64 __swab64p(const __u64 *p) -{ -#ifdef __arch_swab64p - return __arch_swab64p(p); -#else - return __swab64(*p); -#endif -} - -/** - * __swahw32p - return a wordswapped 32-bit value from a pointer - * @p: pointer to a naturally-aligned 32-bit value - * - * See __swahw32() for details of wordswapping. - */ -static inline __u32 __swahw32p(const __u32 *p) -{ -#ifdef __arch_swahw32p - return __arch_swahw32p(p); -#else - return __swahw32(*p); -#endif -} - -/** - * __swahb32p - return a high and low byteswapped 32-bit value from a pointer - * @p: pointer to a naturally-aligned 32-bit value - * - * See __swahb32() for details of high/low byteswapping. - */ -static inline __u32 __swahb32p(const __u32 *p) -{ -#ifdef __arch_swahb32p - return __arch_swahb32p(p); -#else - return __swahb32(*p); -#endif -} - -/** - * __swab16s - byteswap a 16-bit value in-place - * @p: pointer to a naturally-aligned 16-bit value - */ -static inline void __swab16s(__u16 *p) -{ -#ifdef __arch_swab16s - __arch_swab16s(p); -#else - *p = __swab16p(p); -#endif -} -/** - * __swab32s - byteswap a 32-bit value in-place - * @p: pointer to a naturally-aligned 32-bit value - */ -static inline void __swab32s(__u32 *p) -{ -#ifdef __arch_swab32s - __arch_swab32s(p); -#else - *p = __swab32p(p); -#endif -} - -/** - * __swab64s - byteswap a 64-bit value in-place - * @p: pointer to a naturally-aligned 64-bit value - */ -static inline void __swab64s(__u64 *p) -{ -#ifdef __arch_swab64s - __arch_swab64s(p); -#else - *p = __swab64p(p); -#endif -} - -/** - * __swahw32s - wordswap a 32-bit value in-place - * @p: pointer to a naturally-aligned 32-bit value - * - * See __swahw32() for details of wordswapping - */ -static inline void __swahw32s(__u32 *p) -{ -#ifdef __arch_swahw32s - __arch_swahw32s(p); -#else - *p = __swahw32p(p); -#endif -} - -/** - * __swahb32s - high and low byteswap a 32-bit value in-place - * @p: pointer to a naturally-aligned 32-bit value - * - * See __swahb32() for details of high and low byte swapping - */ -static inline void __swahb32s(__u32 *p) -{ -#ifdef __arch_swahb32s - __arch_swahb32s(p); -#else - *p = __swahb32p(p); -#endif -} - -#ifdef __KERNEL__ -# define swab16 __swab16 -# define swab32 __swab32 -# define swab64 __swab64 -# define swahw32 __swahw32 -# define swahb32 __swahb32 -# define swab16p __swab16p -# define swab32p __swab32p -# define swab64p __swab64p -# define swahw32p __swahw32p -# define swahb32p __swahb32p -# define swab16s __swab16s -# define swab32s __swab32s -# define swab64s __swab64s -# define swahw32s __swahw32s -# define swahb32s __swahb32s -#endif /* __KERNEL__ */ - -#endif /* _LINUX_SWAB_H */ diff --git a/trunk/include/video/atmel_lcdc.h b/trunk/include/video/atmel_lcdc.h index 920c4e9cb93d..613173b5db69 100644 --- a/trunk/include/video/atmel_lcdc.h +++ b/trunk/include/video/atmel_lcdc.h @@ -41,7 +41,6 @@ struct atmel_lcdfb_info { struct work_struct task; unsigned int guard_time; - unsigned int smem_len; struct platform_device *pdev; struct clk *bus_clk; struct clk *lcdc_clk; diff --git a/trunk/include/video/radeon.h b/trunk/include/video/radeon.h index 099ffa5e5bee..95a1f2038b1d 100644 --- a/trunk/include/video/radeon.h +++ b/trunk/include/video/radeon.h @@ -742,10 +742,6 @@ #define SOFT_RESET_RB (1 << 6) #define SOFT_RESET_HDP (1 << 7) -/* WAIT_UNTIL bit constants */ -#define WAIT_DMA_GUI_IDLE (1 << 9) -#define WAIT_2D_IDLECLEAN (1 << 16) - /* SURFACE_CNTL bit consants */ #define SURF_TRANSLATION_DIS (1 << 8) #define NONSURF_AP0_SWP_16BPP (1 << 20) diff --git a/trunk/kernel/cpu.c b/trunk/kernel/cpu.c index f17e9854c246..c977c339f559 100644 --- a/trunk/kernel/cpu.c +++ b/trunk/kernel/cpu.c @@ -369,7 +369,7 @@ int __cpuinit cpu_up(unsigned int cpu) if (!cpu_isset(cpu, cpu_possible_map)) { printk(KERN_ERR "can't online cpu %d because it is not " "configured as may-hotadd at boot time\n", cpu); -#if defined(CONFIG_IA64) || defined(CONFIG_X86_64) +#if defined(CONFIG_IA64) || defined(CONFIG_X86_64) || defined(CONFIG_S390) printk(KERN_ERR "please check additional_cpus= boot " "parameter\n"); #endif diff --git a/trunk/kernel/irq/proc.c b/trunk/kernel/irq/proc.c index a09dd29c2fd7..6c6d35d68ee9 100644 --- a/trunk/kernel/irq/proc.c +++ b/trunk/kernel/irq/proc.c @@ -8,7 +8,6 @@ #include #include -#include #include #include "internals.h" @@ -17,18 +16,23 @@ static struct proc_dir_entry *root_irq_dir; #ifdef CONFIG_SMP -static int irq_affinity_proc_show(struct seq_file *m, void *v) +static int irq_affinity_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) { - struct irq_desc *desc = irq_desc + (long)m->private; + struct irq_desc *desc = irq_desc + (long)data; cpumask_t *mask = &desc->affinity; + int len; #ifdef CONFIG_GENERIC_PENDING_IRQ if (desc->status & IRQ_MOVE_PENDING) mask = &desc->pending_mask; #endif - seq_cpumask(m, mask); - seq_putc(m, '\n'); - return 0; + len = cpumask_scnprintf(page, count, *mask); + + if (count - len < 2) + return -EINVAL; + len += sprintf(page + len, "\n"); + return len; } #ifndef is_affinity_mask_valid @@ -36,12 +40,11 @@ static int irq_affinity_proc_show(struct seq_file *m, void *v) #endif int no_irq_affinity; -static ssize_t irq_affinity_proc_write(struct file *file, - const char __user *buffer, size_t count, loff_t *pos) +static int irq_affinity_write_proc(struct file *file, const char __user *buffer, + unsigned long count, void *data) { - unsigned int irq = (int)(long)PDE(file->f_path.dentry->d_inode)->data; + unsigned int irq = (int)(long)data, full_count = count, err; cpumask_t new_value; - int err; if (!irq_desc[irq].chip->set_affinity || no_irq_affinity || irq_balancing_disabled(irq)) @@ -62,38 +65,28 @@ static ssize_t irq_affinity_proc_write(struct file *file, if (!cpus_intersects(new_value, cpu_online_map)) /* Special case for empty set - allow the architecture code to set default SMP affinity. */ - return irq_select_affinity(irq) ? -EINVAL : count; + return irq_select_affinity(irq) ? -EINVAL : full_count; irq_set_affinity(irq, new_value); - return count; -} - -static int irq_affinity_proc_open(struct inode *inode, struct file *file) -{ - return single_open(file, irq_affinity_proc_show, PDE(inode)->data); + return full_count; } -static const struct file_operations irq_affinity_proc_fops = { - .open = irq_affinity_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .write = irq_affinity_proc_write, -}; - -static int default_affinity_show(struct seq_file *m, void *v) +static int default_affinity_read(char *page, char **start, off_t off, + int count, int *eof, void *data) { - seq_cpumask(m, &irq_default_affinity); - seq_putc(m, '\n'); - return 0; + int len = cpumask_scnprintf(page, count, irq_default_affinity); + if (count - len < 2) + return -EINVAL; + len += sprintf(page + len, "\n"); + return len; } -static ssize_t default_affinity_write(struct file *file, - const char __user *buffer, size_t count, loff_t *ppos) +static int default_affinity_write(struct file *file, const char __user *buffer, + unsigned long count, void *data) { + unsigned int full_count = count, err; cpumask_t new_value; - int err; err = cpumask_parse_user(buffer, count, new_value); if (err) @@ -112,21 +105,8 @@ static ssize_t default_affinity_write(struct file *file, irq_default_affinity = new_value; - return count; + return full_count; } - -static int default_affinity_open(struct inode *inode, struct file *file) -{ - return single_open(file, default_affinity_show, NULL); -} - -static const struct file_operations default_affinity_proc_fops = { - .open = default_affinity_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .write = default_affinity_write, -}; #endif static int irq_spurious_read(char *page, char **start, off_t off, @@ -198,9 +178,16 @@ void register_irq_proc(unsigned int irq) irq_desc[irq].dir = proc_mkdir(name, root_irq_dir); #ifdef CONFIG_SMP - /* create /proc/irq//smp_affinity */ - proc_create_data("smp_affinity", 0600, irq_desc[irq].dir, - &irq_affinity_proc_fops, (void *)(long)irq); + { + /* create /proc/irq//smp_affinity */ + entry = create_proc_entry("smp_affinity", 0600, irq_desc[irq].dir); + + if (entry) { + entry->data = (void *)(long)irq; + entry->read_proc = irq_affinity_read_proc; + entry->write_proc = irq_affinity_write_proc; + } + } #endif entry = create_proc_entry("spurious", 0444, irq_desc[irq].dir); @@ -221,8 +208,15 @@ void unregister_handler_proc(unsigned int irq, struct irqaction *action) void register_default_affinity_proc(void) { #ifdef CONFIG_SMP - proc_create("irq/default_smp_affinity", 0600, NULL, - &default_affinity_proc_fops); + struct proc_dir_entry *entry; + + /* create /proc/irq/default_smp_affinity */ + entry = create_proc_entry("default_smp_affinity", 0600, root_irq_dir); + if (entry) { + entry->data = NULL; + entry->read_proc = default_affinity_read; + entry->write_proc = default_affinity_write; + } #endif } diff --git a/trunk/lib/Kconfig.debug b/trunk/lib/Kconfig.debug index 800ac8485544..e1d4764435ed 100644 --- a/trunk/lib/Kconfig.debug +++ b/trunk/lib/Kconfig.debug @@ -735,15 +735,6 @@ config FIREWIRE_OHCI_REMOTE_DMA If unsure, say N. -menuconfig BUILD_DOCSRC - bool "Build targets in Documentation/ tree" - depends on HEADERS_CHECK - help - This option attempts to build objects from the source files in the - kernel Documentation/ tree. - - Say N if you are unsure. - source "samples/Kconfig" source "lib/Kconfig.kgdb" diff --git a/trunk/lib/bitmap.c b/trunk/lib/bitmap.c index 06fb57c86de0..482df94ea21e 100644 --- a/trunk/lib/bitmap.c +++ b/trunk/lib/bitmap.c @@ -315,17 +315,6 @@ int bitmap_scnprintf(char *buf, unsigned int buflen, } EXPORT_SYMBOL(bitmap_scnprintf); -/** - * bitmap_scnprintf_len - return buffer length needed to convert - * bitmap to an ASCII hex string - * @nr_bits: number of bits to be converted - */ -int bitmap_scnprintf_len(unsigned int nr_bits) -{ - unsigned int nr_nibbles = ALIGN(nr_bits, 4) / 4; - return nr_nibbles + ALIGN(nr_nibbles, CHUNKSZ / 4) / (CHUNKSZ / 4) - 1; -} - /** * __bitmap_parse - convert an ASCII hex string into a bitmap. * @buf: pointer to buffer containing string. diff --git a/trunk/lib/vsprintf.c b/trunk/lib/vsprintf.c index d8d1d1142248..1dc2d1d18fa8 100644 --- a/trunk/lib/vsprintf.c +++ b/trunk/lib/vsprintf.c @@ -220,7 +220,7 @@ int strict_strtou##type(const char *cp, unsigned int base, valtype *res)\ if (len == 0) \ return -EINVAL; \ \ - val = simple_strtou##type(cp, &tail, base); \ + val = simple_strtoul(cp, &tail, base); \ if ((*tail == '\0') || \ ((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\ *res = val; \ diff --git a/trunk/mm/hugetlb.c b/trunk/mm/hugetlb.c index 67a71191136e..757ca983fd99 100644 --- a/trunk/mm/hugetlb.c +++ b/trunk/mm/hugetlb.c @@ -565,7 +565,7 @@ static struct page *alloc_fresh_huge_page_node(struct hstate *h, int nid) huge_page_order(h)); if (page) { if (arch_prepare_hugepage(page)) { - __free_pages(page, huge_page_order(h)); + __free_pages(page, HUGETLB_PAGE_ORDER); return NULL; } prep_new_huge_page(h, page, nid); @@ -665,11 +665,6 @@ static struct page *alloc_buddy_huge_page(struct hstate *h, __GFP_REPEAT|__GFP_NOWARN, huge_page_order(h)); - if (page && arch_prepare_hugepage(page)) { - __free_pages(page, huge_page_order(h)); - return NULL; - } - spin_lock(&hugetlb_lock); if (page) { /* @@ -1942,18 +1937,6 @@ static int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma, lock_page(page); } - /* - * If we are going to COW a private mapping later, we examine the - * pending reservations for this page now. This will ensure that - * any allocations necessary to record that reservation occur outside - * the spinlock. - */ - if (write_access && !(vma->vm_flags & VM_SHARED)) - if (vma_needs_reservation(h, vma, address) < 0) { - ret = VM_FAULT_OOM; - goto backout_unlocked; - } - spin_lock(&mm->page_table_lock); size = i_size_read(mapping->host) >> huge_page_shift(h); if (idx >= size) @@ -1979,7 +1962,6 @@ static int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma, backout: spin_unlock(&mm->page_table_lock); -backout_unlocked: unlock_page(page); put_page(page); goto out; @@ -1991,7 +1973,6 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, pte_t *ptep; pte_t entry; int ret; - struct page *pagecache_page = NULL; static DEFINE_MUTEX(hugetlb_instantiation_mutex); struct hstate *h = hstate_vma(vma); @@ -2008,44 +1989,25 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, entry = huge_ptep_get(ptep); if (huge_pte_none(entry)) { ret = hugetlb_no_page(mm, vma, address, ptep, write_access); - goto out_unlock; + mutex_unlock(&hugetlb_instantiation_mutex); + return ret; } ret = 0; - /* - * If we are going to COW the mapping later, we examine the pending - * reservations for this page now. This will ensure that any - * allocations necessary to record that reservation occur outside the - * spinlock. For private mappings, we also lookup the pagecache - * page now as it is used to determine if a reservation has been - * consumed. - */ - if (write_access && !pte_write(entry)) { - if (vma_needs_reservation(h, vma, address) < 0) { - ret = VM_FAULT_OOM; - goto out_unlock; - } - - if (!(vma->vm_flags & VM_SHARED)) - pagecache_page = hugetlbfs_pagecache_page(h, - vma, address); - } - spin_lock(&mm->page_table_lock); /* Check for a racing update before calling hugetlb_cow */ if (likely(pte_same(entry, huge_ptep_get(ptep)))) - if (write_access && !pte_write(entry)) - ret = hugetlb_cow(mm, vma, address, ptep, entry, - pagecache_page); + if (write_access && !pte_write(entry)) { + struct page *page; + page = hugetlbfs_pagecache_page(h, vma, address); + ret = hugetlb_cow(mm, vma, address, ptep, entry, page); + if (page) { + unlock_page(page); + put_page(page); + } + } spin_unlock(&mm->page_table_lock); - - if (pagecache_page) { - unlock_page(pagecache_page); - put_page(pagecache_page); - } - -out_unlock: mutex_unlock(&hugetlb_instantiation_mutex); return ret; diff --git a/trunk/mm/memcontrol.c b/trunk/mm/memcontrol.c index 0f1f7a7374ba..7056c3bdb478 100644 --- a/trunk/mm/memcontrol.c +++ b/trunk/mm/memcontrol.c @@ -796,8 +796,6 @@ int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask) if (mem_cgroup_subsys.disabled) return 0; - if (!mm) - return 0; rcu_read_lock(); mem = mem_cgroup_from_task(rcu_dereference(mm->owner)); diff --git a/trunk/mm/mempolicy.c b/trunk/mm/mempolicy.c index 83369058ec13..e550bec20582 100644 --- a/trunk/mm/mempolicy.c +++ b/trunk/mm/mempolicy.c @@ -803,6 +803,7 @@ static int migrate_to_node(struct mm_struct *mm, int source, int dest, int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags) { + LIST_HEAD(pagelist); int busy = 0; int err = 0; nodemask_t tmp; diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index af982f7cdb2a..401d104d2bb6 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -4437,7 +4437,7 @@ void *__init alloc_large_system_hash(const char *tablename, do { size = bucketsize << log2qty; if (flags & HASH_EARLY) - table = alloc_bootmem_nopanic(size); + table = alloc_bootmem(size); else if (hashdist) table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL); else { diff --git a/trunk/mm/sparse.c b/trunk/mm/sparse.c index 39db301b920d..5d9dbbb9d39e 100644 --- a/trunk/mm/sparse.c +++ b/trunk/mm/sparse.c @@ -12,6 +12,7 @@ #include #include #include +#include "internal.h" /* * Permanent SPARSEMEM data: