GIT 829d464e60151a525c7ba57e7acfc4fc297f7069 git+ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git commit e5a010690141ab805b059ba10f7401b80e0be831 Author: Hoang-Nam Nguyen Date: Mon Oct 2 14:52:17 2006 -0700 IB/ehca: Tweak trace message format Add an extra space to make things more readable. Signed-off-by: Hoang-Nam Nguyen Signed-off-by: Roland Dreier commit 0f248d9cde673a481eb3182909b54d07e9d58f72 Author: Hoang-Nam Nguyen Date: Mon Oct 2 14:52:17 2006 -0700 IB/ehca: Fix device registration Move the call to ib_register_device() later, since a device should not be registered until it is completely read to be used. This fixes crashes that occur if an upper-layer driver such as IPoIB is loaded before the ehca module. Signed-off-by: Hoang-Nam Nguyen Signed-off-by: Roland Dreier commit 13b18c86176cab34ef30ef0a5962fcb0305f7269 Author: Ralph Campbell Date: Fri Sep 29 14:37:51 2006 -0700 IB/ipath: Fix RDMA reads The PSN used to generate the request following a RDMA read was incorrect and some state booking wasn't maintained correctly. This patch fixes that. Signed-off-by: Ralph Campbell Signed-off-by: Bryan O'Sullivan commit 3f168d2b66d2314fea40614a3b966c1a0b6241a9 Author: Krishna Kumar Date: Fri Sep 29 12:09:51 2006 -0700 RDMA/cma: Optimize error handling Reorganize code relating to cma_get_net_info() and rdam_create_id() to optimize error case handling (no need to alloc memory/etc. as part of rdma_create_id() if input parameters are wrong). Signed-off-by: Krishna Kumar Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 94de178ac636e9d6f89b11cb3dd400b777942ac9 Author: Krishna Kumar Date: Fri Sep 29 12:03:35 2006 -0700 RDMA/cma: Eliminate unnecessary remove_list Eliminate remove_list by using list_del_init() instead during device removal handling. Signed-off-by: Krishna Kumar Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 8f0472d331619d5d74927978d0dde5b4935e41a5 Author: Sean Hefty Date: Fri Sep 29 11:57:09 2006 -0700 RDMA/cma: Set status correctly on route resolution error On reporting a route error, also include the status for the error, rather than indicating a status of 0 when an error has occurred. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 6e35aabee125999f4b3c01326f5339fa74a89259 Author: Krishna Kumar Date: Fri Sep 29 11:51:49 2006 -0700 RDMA/cma: Fix device removal race The race is as follows: A process : cma_process_remove() calls cma_remove_id_dev(), which sets id state to CMA_DEVICE_REMOVAL and calls wait_event(dev_remove). B process : cma_req_handler() had incremented dev_remove, and calls cma_acquire_ib_dev() and on failure calls cma_release_remove(), which does a wake_up of cma_process_remove(). Then cma_req_handler() calls rdma_destroy_id(); A Process : cma_remove_id_dev() gets woken and checks the state of id, and since it is still (wrongly) CMA_DEVICE_REMOVAL, it calls notify_user(id) and if that fails, the caller - cma_process_remove() calls rdma_destroy_id(id). Two processes can call rdma_destroy_id(), resulting in one de-referencing kfreed id_priv. Fix is for process B to set CMA_DESTROYING in cma_req_handler() so that process A will return instead of doing a rdma_destroy_id(). Signed-off-by: Krishna Kumar Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 675a027c3db25a439f6ea744bb0c284f983dbfb9 Author: Krishna Kumar Date: Fri Sep 29 11:47:06 2006 -0700 RDMA/cma: Fix leak of cm_ids in case of failures cma_connect_ib() and cma_connect_iw() leak cm_id's in failure cases. Signed-off-by: Krishna Kumar Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 11dc10195aed0636d9a60907594b349424b933a7 Author: Dave Jones Date: Tue Aug 1 20:06:43 2006 +0200 [WATCHDOG] improve machzwd detection On a machine with no machzwd, loading the module prints out.. machzwd: MachZ ZF-Logic Watchdog driver initializing. 0xffff machzwd: Watchdog using action = RESET - the 0xffff printk is unnecessary - 0xffff seems to be 'hardware not present' - fix CodingStyle. (This driver could use some more work here) Signed-off-by: Dave Jones Signed-off-by: Wim Van Sebroeck Signed-off-by: Andrew Morton commit 795b89d207d8ff5397f9ff1f4d44662aa7c821fc Author: Samuel Tardieu Date: Sat Sep 9 17:34:31 2006 +0200 [WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl() Return ENOTTY instead of ENOIOCTLCMD in user-visible ioctl() results The watchdog drivers used to return ENOIOCTLCMD for bad ioctl() commands. ENOIOCTLCMD should not be visible by the user, so use ENOTTY instead. Signed-off-by: Samuel Tardieu Signed-off-by: Wim Van Sebroeck Acked-by: Alan Cox Signed-off-by: Andrew Morton commit 25ff3780d4cd46804e22192a728cfb6b33c84d1b Author: Ben Dooks Date: Wed Sep 6 12:24:35 2006 +0100 [WATCHDOG] s3c24XX nowayout If the driver is not configured for `no way out`, then the open method should not automatically allow the setting of allow_close to CLOSE_STATE_ALLOW. The setting of allow_close nullifies the use of the magic close via the write path. It means that in the default state, the watchdog will shut-down even if the magic close has not been issued. Signed-off-by: Ben Dooks commit 65a64ec3b4fc904932b832c53e5a86d56b972682 Author: Vitaly Wool Date: Mon Sep 11 14:42:39 2006 +0400 [WATCHDOG] pnx4008: add cpu_relax() Added cpu_relax as suggested by Alan Cox. Signed-off-by: Vitaly Wool Signed-off-by: Wim Van Sebroeck commit 99d2853ac953900962d8191788060e80766eb214 Author: Wim Van Sebroeck Date: Sun Sep 10 12:48:15 2006 +0200 [WATCHDOG] pnx4008_wdt.c - spinlock fixes. Add io spinlocks to prevent possible race conditions between start and stop operations that are issued from different child processes where the master process opened /dev/watchdog. Signed-off-by: Wim Van Sebroeck commit 0235497f7a961db57ef975eb889503809ce82fe5 Author: Linus Torvalds Date: Mon Oct 2 14:05:20 2006 -0700 Add prototype for sigset_from_compat() Duh. I screwed up editing David Howells patch in commit 3f2e05e90e0846c42626e3d272454f26be34a1bc, and the actual declaration for the sigset_from_compat() function went missing. My bad. Olaf Hering saved the day and noticed that I'm a moron. Signed-off-by: Linus Torvalds commit f676449785d333078acb60ccf2046d0d3c59548f Author: Wim Van Sebroeck Date: Sun Jul 30 20:06:07 2006 +0200 [WATCHDOG] pnx4008_wdt.c - remove patch Change remove code so that we first detach the driver from userspace, then clean up the clock and then clean up the memory we allocated. Signed-off-by: Wim Van Sebroeck commit 2898172708aa84c9b0ce3865d6ff1ef76b538f51 Author: Wim Van Sebroeck Date: Mon Jul 3 09:03:47 2006 +0200 [WATCHDOG] pnx4008_wdt.c - nowayout patch Change nowayout to: WATCHDOG_NOWAYOUT as defined in include/linux/watchdog.h . Signed-off-by: Wim Van Sebroeck commit 9325fa36151fb9af39e697a6cd87e82667e2d8f9 Author: Vitaly Wool Date: Mon Jun 26 19:31:49 2006 +0400 [WATCHDOG] pnx4008: add watchdog support Add watchdog support for Philips PNX4008 ARM board inlined. Signed-off-by: Vitaly Wool Signed-off-by: Wim Van Sebroeck commit 92dd9994c36fb83883585058232e082cb78b19c1 Author: Jiri Slaby Date: Wed Jul 19 02:18:23 2006 +0159 [WATCHDOG] i8xx_tco remove pci_find_device. Use refcounting for pci device obtaining. Use PCI_DEVICE macro. Signed-off-by: Jiri Slaby Signed-off-by: Wim Van Sebroeck Cc: Andrew Morton commit 02be2ee9e0797b6f657827e32345f0bfeae4c20e Author: Jiri Slaby Date: Tue Jul 18 18:29:00 2006 +0159 [WATCHDOG] alim remove pci_find_device Convert pci_find_device to pci_get_device + pci_dev_put in alim watchdog cards' drivers (refcounting). Signed-off-by: Jiri Slaby Signed-off-by: Wim Van Sebroeck Signed-off-by: Andrew Morton commit 3f2e05e90e0846c42626e3d272454f26be34a1bc Author: David Howells Date: Mon Oct 2 14:12:31 2006 +0100 [PATCH] BLOCK: Revert patch to hack around undeclared sigset_t in linux/compat.h Revert Andrew Morton's patch to temporarily hack around the lack of a declaration of sigset_t in linux/compat.h to make the block-disablement patches build on IA64. This got accidentally pushed to Linus and should be fixed in a different manner. Also make linux/compat.h #include asm/signal.h to gain a definition of sigset_t so that it can externally declare sigset_from_compat(). This has been compile-tested for i386, x86_64, ia64, mips, mips64, frv, ppc and ppc64 and run-tested on frv. Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 9ec52099e4b8678a60e9f93e41ad87885d64f3e6 Author: Cedric Le Goater Date: Mon Oct 2 02:19:00 2006 -0700 [PATCH] replace cad_pid by a struct pid There are a few places in the kernel where the init task is signaled. The ctrl+alt+del sequence is one them. It kills a task, usually init, using a cached pid (cad_pid). This patch replaces the pid_t by a struct pid to avoid pid wrap around problem. The struct pid is initialized at boot time in init() and can be modified through systctl with /proc/sys/kernel/cad_pid [ I haven't found any distro using it ? ] It also introduces a small helper routine kill_cad_pid() which is used where it seemed ok to use cad_pid instead of pid 1. [akpm@osdl.org: cleanups, build fix] Signed-off-by: Cedric Le Goater Cc: Eric W. Biederman Cc: Martin Schwidefsky Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a657f78dcc8ea7c53eaa1f2a45ea2315738c15f Author: Oleg Nesterov Date: Mon Oct 2 02:18:59 2006 -0700 [PATCH] introduce get_task_pid() to fix unsafe get_pid() proc_pid_make_inode: ei->pid = get_pid(task_pid(task)); I think this is not safe. get_pid() can be preempted after checking "pid != NULL". Then the task exits, does detach_pid(), and RCU frees the pid. Signed-off-by: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c0d04c9e44f4a248335c33d2be7c7f7b06ff359 Author: Eric W. Biederman Date: Mon Oct 2 02:18:57 2006 -0700 [PATCH] proc: comment what proc_fill_cache does Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e61feafa2c641c2a013ba94eec56c411011cc94 Author: Eric W. Biederman Date: Mon Oct 2 02:18:57 2006 -0700 [PATCH] proc: remove the useless SMP-safe comments from /proc Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7bcd6b0efd5216f2f208e92150b0e5b9bea2c210 Author: Eric W. Biederman Date: Mon Oct 2 02:18:56 2006 -0700 [PATCH] proc: remove trailing blank entry from pid_entry arrays It was pointed out that since I am taking ARRAY_SIZE anyway the trailing empty entry is silly and just wastes space. Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e95bd936df2d3fc0e773068aa34350306a5c52a Author: Eric W. Biederman Date: Mon Oct 2 02:18:55 2006 -0700 [PATCH] proc: properly compute TGID_OFFSET The value doesn't change but this ensures I will have the proper value when other files are added to proc_base_stuff. Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b0fa9db6abdb2875a6d3069ddc6a2846a73fa5cd Author: Oleg Nesterov Date: Mon Oct 2 02:18:54 2006 -0700 [PATCH] proc: drop tasklist lock in task_state() task_state() needs tasklist_lock to protect ->parent/->real_parent. However task->parent points to nowhere only when the actions below happen in order 1) release_task(task) 2) release_task(task->parent) 3) a grace period passed But 3) implies that the memory ops from 1) should be finished, so pid_alive() can't be true in such a case. Otherwise, we don't care if ->parent/->real_parent changes under us. Signed-off-by: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a593d6edeb0a5a2c6e6919b225cec668a375df52 Author: Oleg Nesterov Date: Mon Oct 2 02:18:53 2006 -0700 [PATCH] proc: convert do_task_stat() to use lock_task_sighand() Drop tasklist_lock. ->siglock protects almost all interesting data (including sub-threads traversal) except: ->signal->tty protected by tty_mutex ->real_parent the task can't be unhashed while we are holding ->siglock, so ->real_parent can change from under us but we can safely dereference it under rcu_read_lock() ->pgrp/->session we can get inconsistent numbers if the task does sys_setsid/daemonize at the same time. I hope this is acceptable. Signed-off-by: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e6b3f42edc20e988b186fbfb9eec174294222ea Author: Oleg Nesterov Date: Mon Oct 2 02:18:52 2006 -0700 [PATCH] proc: convert task_sig() to use lock_task_sighand() lock_task_sighand() can take ->siglock without holding tasklist_lock. Signed-off-by: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7fbaac005cab2f3b4d6999cdb32fb93d442c5cdb Author: Eric W. Biederman Date: Mon Oct 2 02:18:51 2006 -0700 [PATCH] proc: Use pid_task instead of open coding it Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 72d9dcfc7afd80fe98334ec23531b638ee54df8b Author: Eric W. Biederman Date: Mon Oct 2 02:18:50 2006 -0700 [PATCH] proc: Merge proc_tid_attr and proc_tgid_attr The implementation is exactly the same and there is currently nothing to distinguish proc_tid_attr, and proc_tgid_attr. So it is pointless to have two separate implementations. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 61a28784028e6d55755e4d0f39bee8d9bf2ee8d9 Author: Eric W. Biederman Date: Mon Oct 2 02:18:49 2006 -0700 [PATCH] proc: Remove the hard coded inode numbers The hard coded inode numbers in proc currently limit its maintainability, its flexibility, and what can be done with the rest of system. /proc limits pid-max to 32768 on 32 bit systems it limits fd-max to 32768 on all systems, and placing the pid in the inode number really gets in the way of implementing subdirectories of per process information. Ever since people started adding to the middle of the file type enumeration we haven't been maintaing the historical inode numbers, all we have really succeeded in doing is keeping the pid in the proc inode number. The pid is already available in the directory name so no information is lost removing it from the inode number. So if something in user space cares if we remove the inode number from the /proc inode it is almost certainly broken. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 444ceed8d186631fdded5e3f24dc20b93d0d3fda Author: Eric W. Biederman Date: Mon Oct 2 02:18:49 2006 -0700 [PATCH] proc: Factor out an instantiate method from every lookup method To remove the hard coded proc inode numbers it is necessary to be able to create the proc inodes during readdir. The instantiate methods are the subset of lookup that is needed to accomplish that. This first step just splits the lookup methods into 2 functions. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 801199ce805a2412bbcd9bfe213092ec656013dd Author: Eric W. Biederman Date: Mon Oct 2 02:18:48 2006 -0700 [PATCH] proc: Make the generation of the self symlink table driven This patch generalizes the concept of files in /proc that are related to processes but live in the root directory of /proc Ideally this would reuse infrastructure from the rest of the process specific parts of proc but unfortunately security_task_to_inode must not be called on files that are not strictly per process. security_task_to_inode really needs to be reexamined as the security label can change in important places that we are not currently catching, but I'm not certain that simplifies this problem. By at least matching the structure of the rest of proc we get more idiom reuse and it becomes easier to spot problems in the way things are put together. Later things like /proc/mounts are likely to be moved into proc_base as well. If union mounts are ever supported we may be able to make /proc a union mount, and properly split it into 2 filesystems. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5f2420a063fcc5a4cd6610c3ef6934827853001 Author: Haavard Skinnemoen Date: Mon Oct 2 02:18:46 2006 -0700 [PATCH] AVR32: Implement kernel_execve Move execve() into arch/avr32/kernel/sys_avr32.c, rename it to kernel_execve() and return the syscall return value directly without setting errno. This also gets rid of the __KERNEL_SYSCALLS__ stuff from unistd.h and expands #ifdef __KERNEL__ to cover everything in unistd.h except the __NR_foo definitions. Signed-off-by: Haavard Skinnemoen Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 135ab6ec8fdad6f61aabe53f456821baf4a4aa0e Author: Arnd Bergmann Date: Mon Oct 2 02:18:44 2006 -0700 [PATCH] remove remaining errno and __KERNEL_SYSCALLS__ references The last in-kernel user of errno is gone, so we should remove the definition and everything referring to it. This also removes the now-unused lib/execve.c file that was introduced earlier. Also remove every trace of __KERNEL_SYSCALLS__ that still remained in the kernel. Signed-off-by: Arnd Bergmann Cc: Andi Kleen Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Russell King Cc: Ian Molton Cc: Mikael Starvik Cc: David Howells Cc: Yoshinori Sato Cc: Hirokazu Takata Cc: Ralf Baechle Cc: Kyle McMartin Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Richard Curnow Cc: William Lee Irwin III Cc: "David S. Miller" Cc: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Miles Bader Cc: Chris Zankel Cc: "Luck, Tony" Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 821278a75d270048e291fcbec9304439a176ba88 Author: Arnd Bergmann Date: Mon Oct 2 02:18:41 2006 -0700 [PATCH] sh64: remove the use of kernel syscalls sh64 is using system call macros to call some functions from the kernel. The old debug code can simply be removed, since we don't really have that much of a need for it anymore, it was mostly something that was handy during the initial bringup. This also brings us closer to something that looks like readable code again.. I also added a sane kernel_thread() implementation that gets away from this, so that should take care of sh64 at least. Signed-off-by: Paul Mundt Signed-off-by: Arnd Bergmann Cc: Andi Kleen Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Russell King Cc: Ian Molton Cc: Mikael Starvik Cc: David Howells Cc: Yoshinori Sato Cc: Hirokazu Takata Cc: Ralf Baechle Cc: Kyle McMartin Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Kazumoto Kojima Cc: Richard Curnow Cc: William Lee Irwin III Cc: "David S. Miller" Cc: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Miles Bader Cc: Chris Zankel Cc: "Luck, Tony" Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f4c6bc1f369f20807a8e753c2308d1629478c61 Author: Arnd Bergmann Date: Mon Oct 2 02:18:37 2006 -0700 [PATCH] Remove the use of _syscallX macros in UML User mode linux uses _syscallX() to call into the host kernel. The recommended way to do this is to use the syscall() function from libc. Signed-off-by: Arnd Bergmann Cc: Andi Kleen Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Russell King Cc: Ian Molton Cc: Mikael Starvik Cc: David Howells Cc: Yoshinori Sato Cc: Hirokazu Takata Cc: Ralf Baechle Cc: Kyle McMartin Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Richard Curnow Cc: William Lee Irwin III Cc: "David S. Miller" Cc: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Miles Bader Cc: Chris Zankel Cc: "Luck, Tony" Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fe74290d51bc08e9b90ed7c145d74a22cd50b90e Author: Arnd Bergmann Date: Mon Oct 2 02:18:34 2006 -0700 [PATCH] provide kernel_execve on all architectures This adds the new kernel_execve function on all architectures that were using _syscall3() to implement execve. The implementation uses code from the _syscall3 macros provided in the unistd.h header file. I don't have cross-compilers for any of these architectures, so the patch is untested with the exception of i386. Most architectures can probably implement this in a nicer way in assembly or by combining it with the sys_execve implementation itself, but this should do it for now. [bunk@stusta.de: m68knommu build fix] [markh@osdl.org: build fix] [bero@arklinux.org: build fix] [ralf@linux-mips.org: mips fix] [schwidefsky@de.ibm.com: s390 fix] Signed-off-by: Arnd Bergmann Cc: Andi Kleen Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Russell King Cc: Ian Molton Cc: Mikael Starvik Cc: David Howells Cc: Yoshinori Sato Cc: Hirokazu Takata Cc: Ralf Baechle Cc: Kyle McMartin Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Richard Curnow Cc: William Lee Irwin III Cc: "David S. Miller" Cc: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Miles Bader Cc: Chris Zankel Cc: "Luck, Tony" Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Ralf Baechle Signed-off-by: Bernhard Rosenkraenzer Signed-off-by: Mark Haverkamp Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3db03b4afb3ecd66a0399b8ba57742ca953b0ecd Author: Arnd Bergmann Date: Mon Oct 2 02:18:31 2006 -0700 [PATCH] rename the provided execve functions to kernel_execve Some architectures provide an execve function that does not set errno, but instead returns the result code directly. Rename these to kernel_execve to get the right semantics there. Moreover, there is no reasone for any of these architectures to still provide __KERNEL_SYSCALLS__ or _syscallN macros, so remove these right away. [akpm@osdl.org: build fix] [bunk@stusta.de: build fix] Signed-off-by: Arnd Bergmann Cc: Andi Kleen Acked-by: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Russell King Cc: Ian Molton Cc: Mikael Starvik Cc: David Howells Cc: Yoshinori Sato Cc: Hirokazu Takata Cc: Ralf Baechle Cc: Kyle McMartin Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Richard Curnow Cc: William Lee Irwin III Cc: "David S. Miller" Cc: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Miles Bader Cc: Chris Zankel Cc: "Luck, Tony" Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Adrian Bunk Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6760856791c6e527da678021ee6a67896549d4da Author: Arnd Bergmann Date: Mon Oct 2 02:18:26 2006 -0700 [PATCH] introduce kernel_execve The use of execve() in the kernel is dubious, since it relies on the __KERNEL_SYSCALLS__ mechanism that stores the result in a global errno variable. As a first step of getting rid of this, change all users to a global kernel_execve function that returns a proper error code. This function is a terrible hack, and a later patch removes it again after the kernel syscalls are gone. Signed-off-by: Arnd Bergmann Cc: Andi Kleen Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Russell King Cc: Ian Molton Cc: Mikael Starvik Cc: David Howells Cc: Yoshinori Sato Cc: Hirokazu Takata Cc: Ralf Baechle Cc: Kyle McMartin Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Richard Curnow Cc: William Lee Irwin III Cc: "David S. Miller" Cc: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Miles Bader Cc: Chris Zankel Cc: "Luck, Tony" Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2453a3062d36f39f01302f9f1ad18e7a0c54fe38 Author: Matt Helsley Date: Mon Oct 2 02:18:25 2006 -0700 [PATCH] ipc: replace kmalloc and memset in get_undo_list with kzalloc Simplify get_undo_list() by dropping the unnecessary cast, removing the size variable, and switching to kzalloc() instead of a kmalloc() followed by a memset(). This cleanup was split then modified from Jes Sorenson's Task Notifiers patches. Signed-off-by: Matt Helsley Cc: Jes Sorensen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d124e99c2fee1c8f3020ecb0dff8d5617ee7991 Author: Pavel Date: Mon Oct 2 02:18:24 2006 -0700 [PATCH] nsproxy cloning error path fix This patch fixes copy_namespaces()'s error path. when new nsproxy (new_ns) is created pointers to namespaces (ipc, uts) are copied from the old nsproxy. Later in copy_utsname, copy_ipcs, etc. according namespaces are get-ed. On error path needed namespaces are put-ed, so there's no need to put new nsproxy itelf as it woud cause putting namespaces for the second time. Found when incorporating namespaces into OpenVZ kernel. Signed-off-by: Pavel Emelianov Acked-by: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fcfbd547b1209aae9d880fe5db33464413925cc8 Author: Kirill Korotaev Date: Mon Oct 2 02:18:23 2006 -0700 [PATCH] IPC namespace - sysctls Sysctl tweaks for IPC namespace Signed-off-by: Pavel Emelianiov Signed-off-by: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e9823111bdc76127b17fc70dc57f584fd7dd34c Author: Kirill Korotaev Date: Mon Oct 2 02:18:22 2006 -0700 [PATCH] IPC namespace - shm IPC namespace support for IPC shm code. Signed-off-by: Pavel Emelianiov Signed-off-by: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e38935341a3105471848220b5750e1ea8722d197 Author: Kirill Korotaev Date: Mon Oct 2 02:18:22 2006 -0700 [PATCH] IPC namespace - sem IPC namespace support for IPC sem code. Signed-off-by: Pavel Emelianiov Signed-off-by: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1e78693738b71da037d0df340f38e919e8227c2b Author: Kirill Korotaev Date: Mon Oct 2 02:18:21 2006 -0700 [PATCH] IPC namespace - msg IPC namespace support for IPC msg code. Signed-off-by: Pavel Emelianiov Signed-off-by: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 73ea41302bab5e02c9e86ab15c509494a550f1db Author: Kirill Korotaev Date: Mon Oct 2 02:18:20 2006 -0700 [PATCH] IPC namespace - utils This patch adds basic IPC namespace functionality to IPC utils: - init_ipc_ns - copy/clone/unshare/free IPC ns - /proc preparations Signed-off-by: Pavel Emelianov Signed-off-by: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Cedric Le Goater Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 25b21cb2f6d69b0475b134e0a3e8e269137270fa Author: Kirill Korotaev Date: Mon Oct 2 02:18:19 2006 -0700 [PATCH] IPC namespace core This patch set allows to unshare IPCs and have a private set of IPC objects (sem, shm, msg) inside namespace. Basically, it is another building block of containers functionality. This patch implements core IPC namespace changes: - ipc_namespace structure - new config option CONFIG_IPC_NS - adds CLONE_NEWIPC flag - unshare support [clg@fr.ibm.com: small fix for unshare of ipc namespace] [akpm@osdl.org: build fix] Signed-off-by: Pavel Emelianov Signed-off-by: Kirill Korotaev Signed-off-by: Cedric Le Goater Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c0b2fc316599d6cd875b6b8cafa67f03b9512b4d Author: Serge Hallyn Date: Mon Oct 2 02:18:18 2006 -0700 [PATCH] uts: copy nsproxy only when needed The nsproxy was being copied in unshare() when anything was being unshared, even if it was something not referenced from nsproxy. This should end up in some cases with far more memory usage than necessary. Signed-off-by: Serge Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 071df104f808b8195c40643dcb4d060681742e29 Author: Serge E. Hallyn Date: Mon Oct 2 02:18:17 2006 -0700 [PATCH] namespaces: utsname: implement CLONE_NEWUTS flag Implement a CLONE_NEWUTS flag, and use it at clone and sys_unshare. [clg@fr.ibm.com: IPC unshare fix] [bunk@stusta.de: cleanup] Signed-off-by: Serge Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Adrian Bunk Signed-off-by: Cedric Le Goater Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bf47fdcda65b44dbd674eeedcaa06e0aa28a5a00 Author: Serge E. Hallyn Date: Mon Oct 2 02:18:16 2006 -0700 [PATCH] namespaces: utsname: remove system_utsname The system_utsname isn't needed now that kernel/sysctl.c is fixed. Nuke it. Signed-off-by: Serge E. Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8218c74c02a7bdb5db2e40a2100534bdeb83475b Author: Serge E. Hallyn Date: Mon Oct 2 02:18:15 2006 -0700 [PATCH] namespaces: utsname: sysctl Sysctl uts patch. This will need to be done another way, but since sysctl itself needs to be container aware, 'the right thing' is a separate patchset. [akpm@osdl.org: ia64 build fix] [sam.vilain@catalyst.net.nz: cleanup] [sam.vilain@catalyst.net.nz: add proc_do_utsns_string] Signed-off-by: Serge E. Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4865ecf1315b450ab3317a745a6678c04d311e40 Author: Serge E. Hallyn Date: Mon Oct 2 02:18:14 2006 -0700 [PATCH] namespaces: utsname: implement utsname namespaces This patch defines the uts namespace and some manipulators. Adds the uts namespace to task_struct, and initializes a system-wide init namespace. It leaves a #define for system_utsname so sysctl will compile. This define will be removed in a separate patch. [akpm@osdl.org: build fix, cleanup] Signed-off-by: Serge Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 96b644bdec977b97a45133e5b4466ba47a7a5e65 Author: Serge E. Hallyn Date: Mon Oct 2 02:18:13 2006 -0700 [PATCH] namespaces: utsname: use init_utsname when appropriate In some places, particularly drivers and __init code, the init utsns is the appropriate one to use. This patch replaces those with a the init_utsname helper. Changes: Removed several uses of init_utsname(). Hope I picked all the right ones in net/ipv4/ipconfig.c. These are now changed to utsname() (the per-process namespace utsname) in the previous patch (2/7) [akpm@osdl.org: CIFS fix] Signed-off-by: Serge E. Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Cc: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e9ff3990f08e9a0c2839cc22808b01732ea5b3e4 Author: Serge E. Hallyn Date: Mon Oct 2 02:18:11 2006 -0700 [PATCH] namespaces: utsname: switch to using uts namespaces Replace references to system_utsname to the per-process uts namespace where appropriate. This includes things like uname. Changes: Per Eric Biederman's comments, use the per-process uts namespace for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c [jdike@addtoit.com: UML fix] [clg@fr.ibm.com: cleanup] [akpm@osdl.org: build fix] Signed-off-by: Serge E. Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Cedric Le Goater Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0bdd7aab7f0ecd5d337910816aa058c18398628e Author: Serge E. Hallyn Date: Mon Oct 2 02:18:10 2006 -0700 [PATCH] namespaces: utsname: introduce temporary helpers Define utsname() and init_utsname() which return &system_utsname. Users of system_utsname will be changed to use these helpers, after which system_utsname will disappear. Signed-off-by: Serge E. Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fab413a334a7b3dd2688c5cd5d4718476e430ea4 Author: Cedric Le Goater Date: Mon Oct 2 02:18:09 2006 -0700 [PATCH] namespaces: exit_task_namespaces() invalidates nsproxy exit_task_namespaces() has replaced the former exit_namespace(). It invalidates task->nsproxy and associated namespaces. This is an issue for the (futur) pid namespace which is required to be valid in exit_notify(). This patch moves exit_task_namespaces() after exit_notify() to keep nsproxy valid. Signed-off-by: Cedric Le Goater Cc: Serge E. Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1651e14e28a2d9f446018ef522882e0709a2ce4f Author: Serge E. Hallyn Date: Mon Oct 2 02:18:08 2006 -0700 [PATCH] namespaces: incorporate fs namespace into nsproxy This moves the mount namespace into the nsproxy. The mount namespace count now refers to the number of nsproxies point to it, rather than the number of tasks. As a result, the unshare_namespace() function in kernel/fork.c no longer checks whether it is being shared. Signed-off-by: Serge Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0437eb594e6e5e699248f865482e61034be846d0 Author: Serge E. Hallyn Date: Mon Oct 2 02:18:07 2006 -0700 [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c Move the init_nsproxy definition out of arch/ into kernel/nsproxy.c. This avoids all arches having to be updated. Compiles and boots on s390. Signed-off-by: Serge E. Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab516013ad9ca47f1d3a936fa81303bfbf734d52 Author: Serge E. Hallyn Date: Mon Oct 2 02:18:06 2006 -0700 [PATCH] namespaces: add nsproxy This patch adds a nsproxy structure to the task struct. Later patches will move the fs namespace pointer into this structure, and introduce a new utsname namespace into the nsproxy. The vserver and openvz functionality, then, would be implemented in large part by virtualizing/isolating more and more resources into namespaces, each contained in the nsproxy. [akpm@osdl.org: build fix] Signed-off-by: Serge Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b1ba4ddde0cf67991d89f039365eaaeda61aa027 Author: Adrian Bunk Date: Mon Oct 2 02:18:05 2006 -0700 [PATCH] make kernel/sysctl.c:_proc_do_string() static This patch makes the needlessly global _proc_do_string() static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5dd3d6fadf98a53b35d20427ca198fda42f1251 Author: Sam Vilain Date: Mon Oct 2 02:18:04 2006 -0700 [PATCH] proc: sysctl: add _proc_do_string helper The logic in proc_do_string is worth re-using without passing in a ctl_table structure (say, we want to calculate a pointer and pass that in instead); pass in the two fields it uses from that structure as explicit arguments. Signed-off-by: Sam Vilain Cc: Serge E. Hallyn Cc: Kirill Korotaev Cc: "Eric W. Biederman" Cc: Herbert Poetzl Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12fd352038c037ba3a7071a2ca8597c55114abc3 Author: Peter Zijlstra Date: Mon Oct 2 02:18:03 2006 -0700 [PATCH] nfsd: lockdep annotation while doing a kernel make modules_install install over an NFS mount. ============================================= [ INFO: possible recursive locking detected ] --------------------------------------------- nfsd/9550 is trying to acquire lock: (&inode->i_mutex){--..}, at: [] mutex_lock+0x1c/0x1f but task is already holding lock: (&inode->i_mutex){--..}, at: [] mutex_lock+0x1c/0x1f other info that might help us debug this: 2 locks held by nfsd/9550: #0: (hash_sem){..--}, at: [] exp_readlock+0xd/0xf [nfsd] #1: (&inode->i_mutex){--..}, at: [] mutex_lock+0x1c/0x1f stack backtrace: [] show_trace_log_lvl+0x58/0x152 [] show_trace+0xd/0x10 [] dump_stack+0x19/0x1b [] __lock_acquire+0x77a/0x9a3 [] lock_acquire+0x60/0x80 [] __mutex_lock_slowpath+0xa7/0x20e [] mutex_lock+0x1c/0x1f [] vfs_unlink+0x34/0x8a [] nfsd_unlink+0x18f/0x1e2 [nfsd] [] nfsd3_proc_remove+0x95/0xa2 [nfsd] [] nfsd_dispatch+0xc0/0x178 [nfsd] [] svc_process+0x3a5/0x5ed [] nfsd+0x1a7/0x305 [nfsd] [] kernel_thread_helper+0x5/0xb DWARF2 unwinder stuck at kernel_thread_helper+0x5/0xb Leftover inexact backtrace: [] show_trace+0xd/0x10 [] dump_stack+0x19/0x1b [] __lock_acquire+0x77a/0x9a3 [] lock_acquire+0x60/0x80 [] __mutex_lock_slowpath+0xa7/0x20e [] mutex_lock+0x1c/0x1f [] vfs_unlink+0x34/0x8a [] nfsd_unlink+0x18f/0x1e2 [nfsd] [] nfsd3_proc_remove+0x95/0xa2 [nfsd] [] nfsd_dispatch+0xc0/0x178 [nfsd] [] svc_process+0x3a5/0x5ed [] nfsd+0x1a7/0x305 [nfsd] [] kernel_thread_helper+0x5/0xb ============================================= [ INFO: possible recursive locking detected ] --------------------------------------------- nfsd/9580 is trying to acquire lock: (&inode->i_mutex){--..}, at: [] mutex_lock+0x1c/0x1f but task is already holding lock: (&inode->i_mutex){--..}, at: [] mutex_lock+0x1c/0x1f other info that might help us debug this: 2 locks held by nfsd/9580: #0: (hash_sem){..--}, at: [] exp_readlock+0xd/0xf [nfsd] #1: (&inode->i_mutex){--..}, at: [] mutex_lock+0x1c/0x1f stack backtrace: [] show_trace_log_lvl+0x58/0x152 [] show_trace+0xd/0x10 [] dump_stack+0x19/0x1b [] __lock_acquire+0x77a/0x9a3 [] lock_acquire+0x60/0x80 [] __mutex_lock_slowpath+0xa7/0x20e [] mutex_lock+0x1c/0x1f [] nfsd_setattr+0x2c8/0x499 [nfsd] [] nfsd_create_v3+0x31b/0x4ac [nfsd] [] nfsd3_proc_create+0x128/0x138 [nfsd] [] nfsd_dispatch+0xc0/0x178 [nfsd] [] svc_process+0x3a5/0x5ed [] nfsd+0x1a7/0x305 [nfsd] [] kernel_thread_helper+0x5/0xb DWARF2 unwinder stuck at kernel_thread_helper+0x5/0xb Leftover inexact backtrace: [] show_trace+0xd/0x10 [] dump_stack+0x19/0x1b [] __lock_acquire+0x77a/0x9a3 [] lock_acquire+0x60/0x80 [] __mutex_lock_slowpath+0xa7/0x20e [] mutex_lock+0x1c/0x1f [] nfsd_setattr+0x2c8/0x499 [nfsd] [] nfsd_create_v3+0x31b/0x4ac [nfsd] [] nfsd3_proc_create+0x128/0x138 [nfsd] [] nfsd_dispatch+0xc0/0x178 [nfsd] [] svc_process+0x3a5/0x5ed [] nfsd+0x1a7/0x305 [nfsd] [] kernel_thread_helper+0x5/0xb Signed-off-by: Peter Zijlstra Cc: Neil Brown Cc: Ingo Molnar Cc: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eed2965af1bae30f746e936d80ad4fabb9e208c8 Author: Greg Banks Date: Mon Oct 2 02:18:02 2006 -0700 [PATCH] knfsd: allow admin to set nthreads per node Add /proc/fs/nfsd/pool_threads which allows the sysadmin (or a userspace daemon) to read and change the number of nfsd threads in each pool. The format is a list of space-separated integers, one per pool. Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bfd241600a3b0db4fe43c859f1460d0a958d924a Author: Greg Banks Date: Mon Oct 2 02:18:01 2006 -0700 [PATCH] knfsd: make rpc threads pools numa aware Actually implement multiple pools. On NUMA machines, allocate a svc_pool per NUMA node; on SMP a svc_pool per CPU; otherwise a single global pool. Enqueue sockets on the svc_pool corresponding to the CPU on which the socket bh is run (i.e. the NIC interrupt CPU). Threads have their cpu mask set to limit them to the CPUs in the svc_pool that owns them. This is the patch that allows an Altix to scale NFS traffic linearly beyond 4 CPUs and 4 NICs. Incorporates changes and feedback from Neil Brown, Trond Myklebust, and Christoph Hellwig. Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eec09661dc82e90a31051d045a94026a91aceb82 Author: Greg Banks Date: Mon Oct 2 02:18:00 2006 -0700 [PATCH] knfsd: use svc_set_num_threads to manage threads in knfsd Replace the existing list of all nfsd threads with new code using svc_create_pooled(). Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a74554429eada89a7ddb47317e6a2968d03e41a2 Author: Greg Banks Date: Mon Oct 2 02:17:59 2006 -0700 [PATCH] knfsd: add svc_set_num_threads Currently knfsd keeps its own list of all nfsd threads in nfssvc.c; add a new way of managing the list of all threads in a svc_serv. Add svc_create_pooled() to allow creation of a svc_serv whose threads are managed by the sunrpc code. Add svc_set_num_threads() to manage the number of threads in a service, either per-pool or globally across the service. Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a24ab5749a31aa10ee60d9310ad72f24d7c38ab Author: Greg Banks Date: Mon Oct 2 02:17:58 2006 -0700 [PATCH] knfsd: add svc_get add svc_get() for those occasions when we need to temporarily bump up svc_serv->sv_nrthreads as a pseudo refcount. Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3262c816a3d7fb1eaabce633caa317887ed549ae Author: Greg Banks Date: Mon Oct 2 02:17:58 2006 -0700 [PATCH] knfsd: split svc_serv into pools Split out the list of idle threads and pending sockets from svc_serv into a new svc_pool structure, and allocate a fixed number (in this patch, 1) of pools per svc_serv. The new structure contains a lock which takes over several of the duties of svc_serv->sv_lock, which is now relegated to protecting only sv_tempsocks, sv_permsocks, and sv_tmpcnt in svc_serv. The point is to move the hottest fields out of svc_serv and into svc_pool, allowing a following patch to arrange for a svc_pool per NUMA node or per CPU. This is a major step towards making the NFS server NUMA-friendly. Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c081a0c7cfe42adf8e8b9c2b8d0b2ec7f47603e8 Author: Greg Banks Date: Mon Oct 2 02:17:57 2006 -0700 [PATCH] knfsd: test and set SK_BUSY atomically The SK_BUSY bit in svc_sock->sk_flags ensures that we do not attempt to enqueue a socket twice. Currently, setting and clearing the bit is protected by svc_serv->sv_lock. As I intend to reduce the data that the lock protects so it's not held when svc_sock_enqueue() tests and sets SK_BUSY, that test and set needs to be atomic. Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5685f0fa1c24b138d041ef129ed419c5effa40e1 Author: Greg Banks Date: Mon Oct 2 02:17:56 2006 -0700 [PATCH] knfsd: convert sk_reserved to atomic_t Convert the svc_sock->sk_reserved variable from an int protected by svc_serv->sv_lock, to an atomic. This reduces (by 1) the number of places we need to take the (effectively global) svc_serv->sv_lock. Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a68d952af5f43032012d26dd0d5164c9e9986bc Author: Greg Banks Date: Mon Oct 2 02:17:55 2006 -0700 [PATCH] knfsd: use new lock for svc_sock deferred list Protect the svc_sock->sk_deferred list with a new lock svc_sock->sk_defer_lock instead of svc_serv->sv_lock. Using the more fine-grained lock reduces the number of places we need to take the svc_serv lock. Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c45c357d7dbc9e94338f44349e0035149da86b26 Author: Greg Banks Date: Mon Oct 2 02:17:54 2006 -0700 [PATCH] knfsd: convert sk_inuse to atomic_t Convert the svc_sock->sk_inuse counter from an int protected by svc_serv->sv_lock, to an atomic. This reduces the number of places we need to take the (effectively global) svc_serv->sv_lock. Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36bdfc8bae51339aa27ef8e4ce148185293061ae Author: Greg Banks Date: Mon Oct 2 02:17:54 2006 -0700 [PATCH] knfsd: move tempsock aging to a timer Following are 11 patches from Greg Banks which combine to make knfsd more Numa-aware. They reduce hitting on 'global' data structures, and create some data-structures that can be node-local. knfsd threads are bound to a particular node, and the thread to handle a new request is chosen from the threads that are attach to the node that received the interrupt. The distribution of threads across nodes can be controlled by a new file in the 'nfsd' filesystem, though the default approach of an even spread is probably fine for most sites. Some (old) numbers that show the efficacy of these patches: N == number of NICs == number of CPUs == nmber of clients. Number of NUMA nodes == N/2 N Throughput, MiB/s CPU usage, % (max=N*100) Before After Before After --- ------ ---- ----- ----- 4 312 435 350 228 6 500 656 501 418 8 562 804 690 589 This patch: Move the aging of RPC/TCP connection sockets from the main svc_recv() loop to a timer which uses a mark-and-sweep algorithm every 6 minutes. This reduces the amount of work that needs to be done in the main RPC loop and the length of time we need to hold the (effectively global) svc_serv->sv_lock. [akpm@osdl.org: cleanup] Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a3ae42dc312dbdffee803efaf393421b79f997a Author: NeilBrown Date: Mon Oct 2 02:17:53 2006 -0700 [PATCH] knfsd: Correctly handle error condition from lockd_up If lockd_up fails - what should we expect? Do we have to later call lockd_down? Well the nfs client thinks "no", the nfs server thinks "yes". lockd thinks "yes". The only answer that really makes sense is "no" !! So: Make lockd_up only increment nlmsvc_users on success. Make nfsd handle errors from lockd_up properly. Make sure lockd_up(0) never fails when lockd is running so that the 'reclaimer' call to lockd_up doesn't need to be error checked. Cc: "J. Bruce Fields" Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7dcf91ec6698fe8564ad91bbe42740aacaa0d9ee Author: NeilBrown Date: Mon Oct 2 02:17:52 2006 -0700 [PATCH] knfsd: Move makesock failed warning into make_socks. Thus it is printed for any path that leads to failure (make_socks is called from two places). Cc: "J. Bruce Fields" Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3dfb4210535303bb4c2e0ff1c4fdd4dfe9b93472 Author: NeilBrown Date: Mon Oct 2 02:17:51 2006 -0700 [PATCH] knfsd: Check return value of lockd_up in write_ports We should be checking the return value of lockd_up when adding a new socket to nfsd. So move the lockd_up before the svc_addsock and check the return value. The move is because lockd_down is easy, but there is no easy way to remove a recently added socket. Cc: "J. Bruce Fields" Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6fb2b47fa16c81317ec282248e6cff521cca31c2 Author: NeilBrown Date: Mon Oct 2 02:17:50 2006 -0700 [PATCH] knfsd: Drop 'serv' option to svc_recv and svc_process It isn't needed as it is available in rqstp->rq_server, and dropping it allows some local vars to be dropped. [akpm@osdl.org: build fix] Cc: "J. Bruce Fields" Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 896440d560de3bca6813e83792f431edf5073318 Author: Josh Triplett Date: Mon Oct 2 02:17:50 2006 -0700 [PATCH] nfsd: add lock annotations to e_start and e_stop e_start acquires svc_export_cache.hash_lock, and e_stop releases it. Add lock annotations to these two functions so that sparse can check callers for lock pairing, and so that sparse will not complain about these functions since they intentionally use locks in this manner. Signed-off-by: Josh Triplett Cc: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc6f02e516b487ada46823fb05f237a0ef705f92 Author: Greg Banks Date: Mon Oct 2 02:17:49 2006 -0700 [PATCH] knfsd: Use SEQ_START_TOKEN instead of hardcoded magic (void*)1 Signed-off-by: Greg Banks Acked-by: NeilBrown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b41b66d63c730cc45a1024e1f1e67439e507e40f Author: NeilBrown Date: Mon Oct 2 02:17:48 2006 -0700 [PATCH] knfsd: allow sockets to be passed to nfsd via 'portlist' Userspace should create and bind a socket (but not connectted) and write the 'fd' to portlist. This will cause the nfs server to listen on that socket. To close a socket, the name of the socket - as read from 'portlist' can be written to 'portlist' with a preceding '-'. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 80212d59e32a8a8e030c2ddc5861d8ff70542c56 Author: NeilBrown Date: Mon Oct 2 02:17:47 2006 -0700 [PATCH] knfsd: define new nfsdfs file: portlist - contains list of ports This file will list all ports that nfsd has open. Default when TCP enabled will be ipv4 udp 0.0.0.0 2049 ipv4 tcp 0.0.0.0 2049 Later, the list of ports will be settable. 'portlist' chosen rather than 'ports', to avoid unnecessary confusion with non-mainline patches which created 'ports' with different semantics. [akpm@osdl.org: cleanups, build fix] Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 02a375f0ac4bc2e9b767fabb6b2f9915547226a7 Author: NeilBrown Date: Mon Oct 2 02:17:46 2006 -0700 [PATCH] knfsd: separate out some parts of nfsd_svc, which start nfs servers Separate out the code for creating a new service, and for creating initial sockets. Some of these new functions will have multiple callers soon. [akpm@osdl.org: cleanups] Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6658d3a7bbfd1768a7b599def47939417f0ee8ef Author: NeilBrown Date: Mon Oct 2 02:17:46 2006 -0700 [PATCH] knfsd: remove nfsd_versbits as intermediate storage for desired versions We have an array 'nfsd_version' which lists the available versions of nfsd, and 'nfsd_versions' (poor choice there :-() which lists the currently active versions. Then we have a bitmap - nfsd_versbits which says which versions are wanted. The bits in this bitset cause content to be copied from nfsd_version to nfsd_versions when nfsd starts. This patch removes nfsd_versbits and moves information directly from nfsd_version to nfsd_versions when requests for version changes arrive. Note that this doesn't make it possible to change versions while the server is running. This is because serv->sv_xdrsize is calculated when a service is created, and used when threads are created, and xdrsize depends on the active versions. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 24e36663c375df577d2dcae437713481ffd6850c Author: NeilBrown Date: Mon Oct 2 02:17:45 2006 -0700 [PATCH] knfsd: be more selective in which sockets lockd listens on Currently lockd listens on UDP always, and TCP if CONFIG_NFSD_TCP is set. However as lockd performs services of the client as well, this is a problem. If CONFIG_NfSD_TCP is not set, and a tcp mount is used, the server will not be able to call back to lockd. So: - add an option to lockd_up saying which protocol is needed - Always open sockets for which an explicit port was given, otherwise only open a socket of the type required - Change nfsd to do one lockd_up per socket rather than one per thread. This - removes the dependancy on CONFIG_NFSD_TCP - means that lockd may open sockets other than at startup - means that lockd will *not* listen on UDP if the only mounts are TCP mount (and nfsd hasn't started). The latter is the only one that concerns me at all - I don't know if this might be a problem with some servers. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc591ccff27e6a85d3a0d6fcb16cfadcc45267a8 Author: NeilBrown Date: Mon Oct 2 02:17:44 2006 -0700 [PATCH] knfsd: add a callback for when last rpc thread finishes nfsd has some cleanup that it wants to do when the last thread exits, and there will shortly be some more. So collect this all into one place and define a callback for an rpc service to call when the service is about to be destroyed. [akpm@osdl.org: cleanups, build fix] Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 40f10522173c34e56cb9bf2fd37c62f69a427f1b Author: Greg Banks Date: Mon Oct 2 02:17:43 2006 -0700 [PATCH] knfsd: remove an unused variable from auth_unix_lookup() Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b06c7b43335788a62f77a9be9cc8eb479a929853 Author: Greg Banks Date: Mon Oct 2 02:17:42 2006 -0700 [PATCH] knfsd: remove an unused variable from e_show() Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3e3b480096568d58d931df6104ef7ca80757efd3 Author: Greg Banks Date: Mon Oct 2 02:17:41 2006 -0700 [PATCH] knfsd: add some missing newlines in printks Signed-off-by: Greg Banks Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a406c3664e171ca8f20dfb339074b26eb2674ac0 Author: Greg Banks Date: Mon Oct 2 02:17:41 2006 -0700 [PATCH] cpumask: export node_to_cpu_mask consistently cpumask: ensure that node_to_cpumask() is available to modules for all supported combinations of architecture and CONFIG_NUMA. Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e16b38f71322efd8a221f64b6ddc0748d21d2e1a Author: Greg Banks Date: Mon Oct 2 02:17:40 2006 -0700 [PATCH] cpumask: export cpu_online_map and cpu_possible_map consistently cpumask: ensure that the cpu_online_map and cpu_possible_map bitmasks, and hence all the macros in that require them, are available to modules for all supported combinations of architecture and CONFIG_SMP. Signed-off-by: Greg Banks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0f532f3861d2c4e5aa7dcd33fb18e9975eb28457 Author: Greg Banks Date: Mon Oct 2 02:17:39 2006 -0700 [PATCH] cpumask: add highest_possible_node_id cpumask: add highest_possible_node_id(), analogous to highest_possible_processor_id(). [pj@sgi.com: fix typo] Signed-off-by: Greg Banks Signed-off-by: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca8af486765852302931bb69075871d5564e1e5b Author: Andrew Morton Date: Mon Oct 2 02:17:38 2006 -0700 [PATCH] isdn: work around excessive udelay() As reported in http://bugzilla.kernel.org/show_bug.cgi?id=6970, ISDN can issue excessively-long udelays, which triggers a build-time error on ARM. This is very sucky of ISDN, but I doubt if anyone is going to suddenly fix it. So change the macro to do the microsecond counting itself. Cc: Cc: Karsten Keil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fd0fbcc27fd72a11dacc3f1a1681ee4dfd256a0b Author: Tilman Schmidt Date: Mon Oct 2 02:17:37 2006 -0700 [PATCH] isdn4linux: Gigaset driver: fix __must_check warning This patch to the Siemens Gigaset driver fixes the compile warning "ignoring return value of 'class_device_create_file', declared with attribute warn_unused_result" appearing with CONFIG_ENABLE_MUST_CHECK=y in release 2.6.18-rc1-mm1. Signed-off-by: Tilman Schmidt Acked-by: Hansjoerg Lipp Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8bb31b9d5340ed3dfef45d322f59fcf18a0d598b Author: Ankita Garg Date: Mon Oct 2 02:17:36 2006 -0700 [PATCH] Linux Kernel Dump Test Module A simple module to test Linux Kernel Dump mechanism. This module uses jprobes to install/activate pre-defined crash points. At different crash points, various types of crashing scenarios are created like a BUG(), panic(), exception, recursive loop and stack overflow. The user can activate a crash point with specific type by providing parameters at the time of module insertion. Please see the file header for usage information. The module is based on the Linux Kernel Dump Test Tool by Fernando . This module could be merged with mainline. Jprobes is used here so that the context in which crash point is hit, could be maintained. This implements all the crash points as done by LKDTT except the one in the middle of tasklet_action(). Signed-off-by: Ankita Garg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99219a3fbc2dcf2eaa954f7b2ac27299fd7894cd Author: bibo,mao Date: Mon Oct 2 02:17:35 2006 -0700 [PATCH] kretprobe spinlock deadlock patch kprobe_flush_task() possibly calls kfree function during holding kretprobe_lock spinlock, if kfree function is probed by kretprobe that will incur spinlock deadlock. This patch moves kfree function out scope of kretprobe_lock. Signed-off-by: bibo, mao Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f2aa85a0ccd90110e76c6375535adc3ae358f971 Author: bibo,mao Date: Mon Oct 2 02:17:34 2006 -0700 [PATCH] disallow kprobes on notifier_call_chain When kprobe is re-entered, the re-entered kprobe kernel path will will call atomic_notifier_call_chain function, if this function is kprobed that will incur numerous kprobe recursive fault. This patch disallows kprobes on atomic_notifier_call_chain function. Signed-off-by: bibo, mao Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 62c27be0dd8144e11bd3ed054a0fb890579925f8 Author: bibo,mao Date: Mon Oct 2 02:17:33 2006 -0700 [PATCH] kprobe whitespace cleanup Whitespace is used to indent, this patch cleans up these sentences by kernel coding style. Signed-off-by: bibo, mao Signed-off-by: Ananth N Mavinakayanahalli Cc: "Luck, Tony" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09b18203d772db318ef92f6908c439ee5a35a4f9 Author: Ananth N Mavinakayanahalli Date: Mon Oct 2 02:17:32 2006 -0700 [PATCH] Update Documentation/kprobes.txt Documentation/kprobes.txt updated to reflect: o In-kernel symbol resolution o CONFIG_KALLSYMS dependency o Usage of JPROBE_ENTRY o Addition of regs_return_value() Also update the references list and usage examples to use correct module interfaces. Signed-off-by: Ananth N Mavinakayanahalli Acked-by: Jim Keniston Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b3f827cb0fe0660c2eacea2c2f9bdb1f225ff768 Author: Ananth N Mavinakayanahalli Date: Mon Oct 2 02:17:31 2006 -0700 [PATCH] Add regs_return_value() helper Add the regs_return_value() macro to extract the return value in an architecture agnostic manner, given the pt_regs. Other architecture maintainers may want to add similar helpers. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Anil S Keshavamurthy Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 412998cf6bce78b8dc5f68660e09bf3b4fcbb210 Author: Ananth N Mavinakayanahalli Date: Mon Oct 2 02:17:31 2006 -0700 [PATCH] kprobes: handle symbol resolution when is specified kallsyms_lookup_name() allows for style specification for looking up symbol addresses. Handle the case where the user specifies on powerpc, given that 64-bit powerpc uses function descriptors. Signed-off-by: Anil S Keshavamurthy Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a872d89baae821a0f6e2c1055d4b47650661137 Author: Ananth N Mavinakayanahalli Date: Mon Oct 2 02:17:30 2006 -0700 [PATCH] Kprobes: Make kprobe modules more portable In an effort to make kprobe modules more portable, here is a patch that: o Introduces the "symbol_name" field to struct kprobe. The symbol->address resolution now happens in the kernel in an architecture agnostic manner. 64-bit powerpc users no longer have to specify the ".symbols" o Introduces the "offset" field to struct kprobe to allow a user to specify an offset into a symbol. o The legacy mechanism of specifying the kprobe.addr is still supported. However, if both the kprobe.addr and kprobe.symbol_name are specified, probe registration fails with an -EINVAL. o The symbol resolution code uses kallsyms_lookup_name(). So CONFIG_KPROBES now depends on CONFIG_KALLSYMS o Apparantly kprobe modules were the only legitimate out-of-tree user of the kallsyms_lookup_name() EXPORT. Now that the symbol resolution happens in-kernel, remove the EXPORT as suggested by Christoph Hellwig o Modify tcp_probe.c that uses the kprobe interface so as to make it work on multiple platforms (in its earlier form, the code wouldn't work, say, on powerpc) Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Prasanna S Panchamukhi Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 782237a2418e2561a87c86a4832726931adce737 Author: Cedric Le Goater Date: Mon Oct 2 02:17:28 2006 -0700 [PATCH] s390: update fs3270 to use a struct pid Replaces the pid_t value with a struct pid to avoid pid wrap around problems. Signed-off-by: Cedric Le Goater Cc: Martin Schwidefsky Acked-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2425c08b37244005ff221efe4957d8aaff18609c Author: Eric W. Biederman Date: Mon Oct 2 02:17:28 2006 -0700 [PATCH] usb: fixup usb so it uses struct pid The problem with remembering a user space process by its pid is that it is possible that the process will exit, pid wrap around will occur. Converting to a struct pid avoid that problem, and paves the way for implementing a pid namespace. Also since usb is the only user of kill_proc_info_as_uid rename kill_proc_info_as_uid to kill_pid_info_as_uid and have the new version take a struct pid. Signed-off-by: Eric W. Biederman Acked-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 43fa1adb9334bf4585cd53144eb5911488f85bc7 Author: Eric W. Biederman Date: Mon Oct 2 02:17:27 2006 -0700 [PATCH] file: Add locking to f_getown This has been needed for a long time, but now with the advent of a reference counted struct pid there are real consequences for getting this wrong. Someone I think it was Oleg Nesterov pointed out that this construct was missing locking, when I introduced struct pid. After taking time to review the locking construct already present I figured out which lock needs to be taken. The other paths that access f_owner.pid take either the f_owner read or the write lock. Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a03fcb730b4fe7da14ca4405f23dbde717b1d2b9 Author: Cedric Le Goater Date: Mon Oct 2 02:17:26 2006 -0700 [PATCH] update mq_notify to use a struct pid Message queues can signal a process waiting for a message. This patch replaces the pid_t value with a struct pid to avoid pid wrap around problems. Signed-off-by: Cedric Le Goater Acked-by: Eric Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f40f50d3bb33b52dfd550ca80be7daaddad21883 Author: Eric W. Biederman Date: Mon Oct 2 02:17:25 2006 -0700 [PATCH] Use struct pspace in next_pidmap and find_ge_pid This updates my proc: readdir race fix (take 3) patch to account for the changes made by: Sukadev Bhattiprolu to introduce struct pspace. Signed-off-by: Eric W. Biederman Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3fbc96486459324e182717b03c50c90c880be6ec Author: Sukadev Bhattiprolu Date: Mon Oct 2 02:17:24 2006 -0700 [PATCH] Define struct pspace Define a per-container pid space object. And create one instance of this object, init_pspace, to define the entire pid space. Subsequent patches will provide/use interfaces to create/destroy pid spaces. Its a subset/rework of Eric Biederman's patch http://lkml.org/lkml/2006/2/6/285 . Signed-off-by: Eric Biederman Signed-off-by: Sukadev Bhattiprolu Cc: Dave Hansen Cc: Serge Hallyn Cc: Cedric Le Goater Cc: Kirill Korotaev Cc: Andrey Savochkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa5a6662f93f52605b6c447ba6f7291e92f515c5 Author: Sukadev Bhattiprolu Date: Mon Oct 2 02:17:23 2006 -0700 [PATCH] Move pidmap to pspace.h Move struct pidmap and PIDMAP_ENTRIES to a new file, include/linux/pspace.h where it will be used in subsequent patches to define pid spaces. Its a subset of Eric Biederman's patch http://lkml.org/lkml/2006/2/6/285 [akpm@osdl.org: cleanups] Signed-off-by: Eric W. Biederman Signed-off-by: Sukadev Bhattiprolu Cc: Dave Hansen Cc: Serge Hallyn Cc: Cedric Le Goater Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d387cae075b0aec479adbdfb71df39f7de8e9adb Author: Oleg Nesterov Date: Mon Oct 2 02:17:22 2006 -0700 [PATCH] pid: simplify pid iterators I think it is hardly possible to read the current do_each_task_pid(). The new version is much simpler and makes the code smaller. Only the do_each_task_pid change is tested, the do_each_pid_task isn't. Signed-off-by: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c88be3eb2e01bbb21c9ccdc3805f0d3546c1898c Author: Eric W. Biederman Date: Mon Oct 2 02:17:21 2006 -0700 [PATCH] pids coding style use struct pidmap in next_pidmap Use struct pidmap instead of pidmap_t. This updates my proc: readdir race fix (take 3) patch to account for the changes made by: Sukadev Bhattiprolu to kill pidmap_t. Signed-off-by: Eric W. Biederman Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a1f3b84557774a46af68747c92d8f36382027ae Author: Sukadev Bhattiprolu Date: Mon Oct 2 02:17:20 2006 -0700 [PATCH] pids: coding style: use struct pidmap Use struct pidmap instead of pidmap_t. Its a subset of Eric Biederman's patch http://lkml.org/lkml/2006/2/6/271. Signed-off-by: Eric W. Biederman Signed-off-by: Sukadev Bhattiprolu Cc: Dave Hansen Cc: Serge Hallyn Cc: Cedric Le Goater Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b68e31d0ebbcc909d1941f9f230c9d062a3a13d3 Author: Jeff Dike Date: Mon Oct 2 02:17:18 2006 -0700 [PATCH] const struct tty_operations As part of an SMP cleanliness pass over UML, I consted a bunch of structures in order to not have to document their locking. One of these structures was a struct tty_operations. In order to const it in UML without introducing compiler complaints, the declaration of tty_set_operations needs to be changed, and then all of its callers need to be fixed. This patch declares all struct tty_operations in the tree as const. In all cases, they are static and used only as input to tty_set_operations. As an extra check, I ran an i386 allyesconfig build which produced no extra warnings. 53 drivers are affected. I checked the history of a bunch of them, and in most cases, there have been only a handful of maintenance changes in the last six months. serial_core.c was the busiest one that I looked at. Signed-off-by: Jeff Dike Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ed97bd37efd8ff7398d3a7eedf4bcbf245f5dad3 Author: Andreas Mohr Date: Mon Oct 2 02:17:17 2006 -0700 [PATCH] fs/inode.c tweaks Only touch inode's i_mtime and i_ctime to make them equal to "now" in case they aren't yet (don't just update timestamp unconditionally). Uninline the hash function to save 259 Bytes. This tiny inode change which may improve cache behaviour also shaves off 8 Bytes from file_update_time() on i386. Included a tiny codestyle cleanup, too. Signed-off-by: Andreas Mohr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 07acaf28d21e710bcf1cec91c0cfdb1a7b5e3d65 Author: Alexey Dobriyan Date: Mon Oct 2 02:17:16 2006 -0700 [PATCH] Remove NULL check in register_nls() Everybody passes valid pointer there. Signed-off-by: Alexey Dobriyan Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 609d7fa9565c754428d2520cac2accc9052e1245 Author: Eric W. Biederman Date: Mon Oct 2 02:17:15 2006 -0700 [PATCH] file: modify struct fown_struct to use a struct pid File handles can be requested to send sigio and sigurg to processes. By tracking the destination processes using struct pid instead of pid_t we make the interface safe from all potential pid wrap around problems. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bde0d2c98bcfc9acc83ac79c33a6ac1335b95a92 Author: Eric W. Biederman Date: Mon Oct 2 02:17:14 2006 -0700 [PATCH] vt: Make vt_pid a struct pid (making it pid wrap around safe). I took a good hard look at the locking and it appears the locking on vt_pid is the console semaphore. Every modified path is called under the console semaphore except reset_vc when it is called from fn_SAK or do_SAK both of which appear to be in interrupt context. In addition I need to be careful because in the presence of an oops the console_sem may be arbitrarily dropped. Which leads me to conclude the current locking is inadequate for my needs. Given the weird cases we could hit because of oops printing instead of introducing an extra spin lock to protect the data and keep the pid to signal and the signal to send in sync, I have opted to use xchg on just the struct pid * pointer instead. Due to console_sem we will stay in sync between vt_pid and vt_mode except for a small window during a SAK, or oops handling. SAK handling should kill any user space process that care, and oops handling we are broken anyway. Besides the worst that can happen is that I try to send the wrong signal. Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 81af8d67d4fc35b1ee6e0feb1f1b34b3a33eeb44 Author: Eric W. Biederman Date: Mon Oct 2 02:17:13 2006 -0700 [PATCH] vt: rework the console spawning variables This is such a rare path it took me a while to figure out how to test this after soring out the locking. This patch does several things. - The variables used are moved into a structure and declared in vt_kern.h - A spinlock is added so we don't have SMP races updating the values. - Instead of raw pid_t value a struct_pid is used to guard against pid wrap around issues, if the daemon to spawn a new console dies. Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5feb8f5f8403d8874a04aac443692dfe83bd63d2 Author: Eric W. Biederman Date: Mon Oct 2 02:17:12 2006 -0700 [PATCH] pid: implement pid_nr As we stop storing pid_t's and move to storing struct pid *. We need a way to get the pid_t from the struct pid to report to user space what we have stored. Having a clean well defined way to do this is especially important as we move to multiple pid spaces as may need to report a different value to the caller depending on which pid space the caller is in. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbf73147e2d46611fbdcbc126f887c614c32350b Author: Eric W. Biederman Date: Mon Oct 2 02:17:11 2006 -0700 [PATCH] pid: export the symbols needed to use struct pid * pids aren't something that drivers should care about. However there are a lot of helper layers in the kernel that do care, and are built as modules. Before I can convert them to using struct pid instead of pid_t I need to export the appropriate symbols so they can continue to be built. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c4b92fc112f7be5cce308128236ff75cc98535c3 Author: Eric W. Biederman Date: Mon Oct 2 02:17:10 2006 -0700 [PATCH] pid: implement signal functions that take a struct pid * Currently the signal functions all either take a task or a pid_t argument. This patch implements variants that take a struct pid *. After all of the users have been update it is my intention to remove the variants that take a pid_t as using pid_t can be more work (an extra hash table lookup) and difficult to get right in the presence of multiple pid namespaces. There are two kinds of functions introduced in this patch. The are the general use functions kill_pgrp and kill_pid which take a priv argument that is ultimately used to create the appropriate siginfo information, Then there are _kill_pgrp_info, kill_pgrp_info, kill_pid_info the internal implementation helpers that take an explicit siginfo. The distinction is made because filling out an explcit siginfo is tricky, and will be even more tricky when pid namespaces are introduced. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 558cb325485aaf655130f140e8ddd25392f6c972 Author: Eric W. Biederman Date: Mon Oct 2 02:17:09 2006 -0700 [PATCH] pid: add do_each_pid_task To avoid pid rollover confusion the kernel needs to work with struct pid * instead of pid_t. Currently there is not an iterator that walks through all of the tasks of a given pid type starting with a struct pid. This prevents us replacing some pid_t instances with struct pid. So this patch adds do_each_pid_task which walks through the set of task for a given pid type starting with a struct pid. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 22c935f47c03399c78e64c71b757eb36fa917ff6 Author: Eric W. Biederman Date: Mon Oct 2 02:17:09 2006 -0700 [PATCH] pid: implement access helpers for a tacks various process groups In the last round of cleaning up the pid hash table a more general struct pid was introduced, that can be referenced counted. With the more general struct pid most if not all places where we store a pid_t we can now store a struct pid * and remove the need for a hash table lookup, and avoid any possible problems with pid roll over. Looking forward to the pid namespaces struct pid * gives us an absolute form a pid so we can compare and use them without caring which pid namespace we are in. This patchset introduces the infrastructure needed to use struct pid instead of pid_t, and then it goes on to convert two different kernel users that currently store a pid_t value. There are a lot more places to go but this is enough to get the basic idea. Before we can merge a pid namespace patch all of the kernel pid_t users need to be examined. Those that deal with user space processes need to be converted to using a struct pid *. Those that deal with kernel processes need to converted to using the kthread api. A rare few that only use their current processes pid values get to be left alone. This patch: task_session returns the struct pid of a tasks session. task_pgrp returns the struct pid of a tasks process group. task_tgid returns the struct pid of a tasks thread group. task_pid returns the struct pid of a tasks process id. These can be used to avoid unnecessary hash table lookups, and to implement safe pid comparisions in the face of a pid namespace. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f6c7a1f34e92b0b561024ead9fa70623683025e4 Author: Eric W. Biederman Date: Mon Oct 2 02:17:07 2006 -0700 [PATCH] proc: give the root directory a task Helper functions in base.c like proc_pident_readdir and proc_pident_lookup assume the directories have an associated task, and cannot currently be used on the /proc root directory because it does not have such a task. This small changes allows for base.c to be simplified and later when multiple pid spaces are introduced it makes getting the needed context information trivial. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 20cdc894c45d2e4ab0c69e95a56b7c5ed36ae0dd Author: Eric W. Biederman Date: Mon Oct 2 02:17:07 2006 -0700 [PATCH] proc: modify proc_pident_lookup to be completely table driven Currently proc_pident_lookup gets the names and types from a table and then has a huge switch statement to get the inode and file operations it needs. That is silly and is becoming increasingly hard to maintain so I just put all of the information in the table. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28a6d67179da6964d1640d379c5e5d4f46dd0042 Author: Eric W. Biederman Date: Mon Oct 2 02:17:05 2006 -0700 [PATCH] proc: reorder the functions in base.c There were enough changes in my last round of cleaning up proc I had to break up the patch series into smaller chunks, and my last chunk never got resent. This patchset gives proc dynamic inode numbers (the static inode numbers were a pain to maintain and prevent all kinds of things), and removes the horrible switch statements that had to be kept in sync with everything else. Being fully table driver takes us 90% of the way of being able to register new process specific attributes in proc. This patch: Group the functions by what they implement instead of by type of operation. As it existed base.c was quickly approaching the point where it could not be followed. No functionality or code changes asside from adding/removing forward declartions are implemented in this patch. Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0804ef4b0de7121261f77c565b20a11ac694e877 Author: Eric W. Biederman Date: Mon Oct 2 02:17:04 2006 -0700 [PATCH] proc: readdir race fix (take 3) The problem: An opendir, readdir, closedir sequence can fail to report process ids that are continually in use throughout the sequence of system calls. For this race to trigger the process that proc_pid_readdir stops at must exit before readdir is called again. This can cause ps to fail to report processes, and it is in violation of posix guarantees and normal application expectations with respect to readdir. Currently there is no way to work around this problem in user space short of providing a gargantuan buffer to user space so the directory read all happens in on system call. This patch implements the normal directory semantics for proc, that guarantee that a directory entry that is neither created nor destroyed while reading the directory entry will be returned. For directory that are either created or destroyed during the readdir you may or may not see them. Furthermore you may seek to a directory offset you have previously seen. These are the guarantee that ext[23] provides and that posix requires, and more importantly that user space expects. Plus it is a simple semantic to implement reliable service. It is just a matter of calling readdir a second time if you are wondering if something new has show up. These better semantics are implemented by scanning through the pids in numerical order and by making the file offset a pid plus a fixed offset. The pid scan happens on the pid bitmap, which when you look at it is remarkably efficient for a brute force algorithm. Given that a typical cache line is 64 bytes and thus covers space for 64*8 == 200 pids. There are only 40 cache lines for the entire 32K pid space. A typical system will have 100 pids or more so this is actually fewer cache lines we have to look at to scan a linked list, and the worst case of having to scan the entire pid bitmap is pretty reasonable. If we need something more efficient we can go to a more efficient data structure for indexing the pids, but for now what we have should be sufficient. In addition this takes no additional locks and is actually less code than what we are doing now. Also another very subtle bug in this area has been fixed. It is possible to catch a task in the middle of de_thread where a thread is assuming the thread of it's thread group leader. This patch carefully handles that case so if we hit it we don't fail to return the pid, that is undergoing the de_thread dance. Thanks to KAMEZAWA Hiroyuki for providing the first fix, pointing this out and working on it. [oleg@tv-sign.ru: fix it] Signed-off-by: Eric W. Biederman Acked-by: KAMEZAWA Hiroyuki Signed-off-by: Oleg Nesterov Cc: Jean Delvare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2bc2d61a9638dab670d8361e928d1a5a291173ef Author: Randy Dunlap Date: Mon Oct 2 02:17:02 2006 -0700 [PATCH] list module taint flags in Oops/panic When listing loaded modules during an oops or panic, also list each module's Tainted flags if non-zero (P: Proprietary or F: Forced load only). If a module is did not taint the kernel, it is just listed like usbcore but if it did taint the kernel, it is listed like wizmodem(PF) Example: [ 3260.121718] Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: [ 3260.121729] [] :dump_test:proc_dump_test+0x99/0xc8 [ 3260.121742] PGD fe8d067 PUD 264a6067 PMD 0 [ 3260.121748] Oops: 0002 [1] SMP [ 3260.121753] CPU 1 [ 3260.121756] Modules linked in: dump_test(P) snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device ide_cd generic ohci1394 snd_hda_intel snd_hda_codec snd_pcm snd_timer snd ieee1394 snd_page_alloc piix ide_core arcmsr aic79xx scsi_transport_spi usblp [ 3260.121785] Pid: 5556, comm: bash Tainted: P 2.6.18-git10 #1 [Alternatively, I can look into listing tainted flags with 'lsmod', but that won't help in oopsen/panics so much.] [akpm@osdl.org: cleanup] Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a58cbd7c249f3079dd62d6391a33b9f43f2bfbef Author: Dean Nelson Date: Mon Oct 2 02:17:01 2006 -0700 [PATCH] make genpool allocator adhere to kernel-doc standards The exported kernel interfaces of genpool allocator need to adhere to the requirements of kernel-doc. Signed-off-by: Dean Nelson Cc: Steve Wise Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 322acc96d4bd3debea11cd0160b18bd5d7ff0d73 Author: Steve Wise Date: Mon Oct 2 02:17:00 2006 -0700 [PATCH] LIB: add gen_pool_destroy() Modules using the genpool allocator need to be able to destroy the data structure when unloading. Signed-off-by: Steve Wise Cc: Randy Dunlap Cc: Dean Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 63f83c9fcf40ab61b75edf5d2f2c1ae6bf876482 Author: Dave Kleikamp Date: Mon Oct 2 09:55:27 2006 -0500 JFS: White space cleanup Removed trailing spaces & tabs, and spaces preceding tabs. Also a couple very minor comment cleanups. Signed-off-by: Dave Kleikamp (cherry picked from f74156539964d7b3d5164fdf8848e6a682f75b97 commit) commit 087387f90f577f5a0ab68d33ef326c9bb6d80dda Author: Akinobu Mita Date: Thu Sep 14 09:22:38 2006 -0500 [PATCH] JFS: return correct error when i-node allocation failed I have seen confusing behavior on JFS when I injected many intentional slab allocation errors. The cp command failed with no disk space error with enough disk space. This patch makes: - change the return value in case slab allocation failures happen from -ENOSPC to -ENOMEM - ialloc() return error code so that the caller can know the reason of failures Signed-off-by: Akinobu Mita Signed-off-by: Dave Kleikamp (cherry picked from 2b46f77976f798f3fe800809a1d0ed38763c71c8 commit) commit 2a6968a9784551c216f9379a728d4104dbad98a8 Author: Tony Breeds Date: Mon Sep 11 08:19:19 2006 -0500 JFS: Remove shadow variable from fs/jfs/jfs_txnmgr.c:xtLog() Signed-off-by: Tony Breeds Signed-off-by: Dave Kleikamp (cherry picked from bdc3d9e5af7d9c105be734dd7b5c3f1d9425a15a commit) commit 76a5027c374a638e55de5d8c4485ea0201254870 Author: Amol Lad Date: Mon Oct 2 09:48:23 2006 +0100 [MTD] Cleanup of 'ioremap balanced with iounmap for drivers/mtd subsystem' Updated version of patch, in response to comments from Francois Romieu Remove gratuitous casts from iounmap and initialisation of variables. Signed-off-by: Amol Lad Signed-off-by: David Woodhouse commit 553a8012088b3452c7d66ff60d2d06ad0c9bea00 Author: Frederik Deweerdt Date: Mon Oct 2 09:42:25 2006 +0100 [MTD] fix nftl_write warning Building 2.6.18-mm2 issues the following warning if CONFIG_NFTL_RW is not set: CC [M] drivers/mtd/nftlcore.o drivers/mtd/nftlcore.c:183: warning: 'nftl_write' defined but not used The following patch only compiles nftl_write if CONFIG_NFTL_RW is set. Signed-off-by: Frederik Deweerdt Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse commit bb0885900de49b5822d7e8c91c1adf9a0fcc228b Author: Ashutosh Naik Date: Sun Oct 1 22:07:14 2006 -0400 Input: wistron - add support for Acer TravelMate 2424NWXCi The key mappings are the same as the older Acer TravelMate 240. Signed-off-by: Ashutosh Naik Signed-off-by: Andrew Morton Signed-off-by: Dmitry Torokhov commit cde45f19ca0d2ff1ede01528a7629388d4139309 Author: Reiner Herrmann Date: Sun Oct 1 21:58:51 2006 -0400 Input: wistron - fix setting up special buttons If either wifi or bluetooth button has been detected, the code would break off the loop. But there are laptops that have both types of buttons, so the loop has to continue checking. Signed-off-by: Reiner Herrmann Signed-off-by: Dmitry Torokhov commit 04b314b2c3732bb5aa752fdbb3076de16decdab6 Author: Yoichi Yuasa Date: Sun Oct 1 19:47:08 2006 +0900 [MIPS] Remove unused galileo-boars header files Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit b772da30b4b22230c214f37429edcd7ddbf641e1 Author: Yoichi Yuasa Date: Sun Oct 1 19:43:27 2006 +0900 [MIPS] Rename SERIAL_PORT_DEFNS for EV64120 Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit 998ec2901aea9f412d2dc3e29a3c20f377793916 Author: Yoichi Yuasa Date: Sun Oct 1 19:35:28 2006 +0900 [MIPS] Add UART IRQ number for EV64120 Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit b00f3774f2e073d399ffbd0475337466938e9273 Author: Yoichi Yuasa Date: Fri Sep 29 18:27:07 2006 +0900 [MIPS] Remove excite_flash.c excite_flashtest.c is unused. Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit aa400804e0181d9c451b3b4ddba25f0a088e8c13 Author: Yoichi Yuasa Date: Fri Sep 29 18:17:51 2006 +0900 [MIPS] Update i8259 resources. Updated i8259 resources to same as i386. Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit 1924600cdb3143cdcc32b6fa43325739503659b9 Author: Atsushi Nemoto Date: Fri Sep 29 18:02:51 2006 +0900 [MIPS] Make unwind_stack() can dig into interrupted context If the PC was ret_from_irq or ret_from_exception, there will be no more normal stackframe. Instead of stopping the unwinding, use PC and RA saved by an exception handler to continue unwinding into the interrupted context. This also simplifies the CONFIG_STACKTRACE code. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit 23126692e30ec22760e0ef932c3c2fff00d440bb Author: Atsushi Nemoto Date: Thu Sep 28 19:15:33 2006 +0900 [MIPS] Stacktrace build-fix and improvement Fix build error due to stacktrace API change. Now save_stack_trace() tries to save all kernel context, including interrupts and exception. Also some asm code are changed a bit so that we can detect the end of current context easily. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit c8cc9618c55a341dda39357cce5ff39f7ad17132 Author: Aurelien Jarno Date: Wed Sep 27 23:07:25 2006 +0200 [MIPS] QEMU: Add support for little endian mips This very small patch adds support for little endian on the virtual QEMU mips platform. The status of this platform is the same as the big endian one, ie it is possible to boot a system with init=/bin/sh. Signed-off-by: Aurelien Jarno Signed-off-by: Ralf Baechle commit c59a0f15be6e586aa0fe1fb5c7f740005c36ec56 Author: Atsushi Nemoto Date: Sat Sep 2 00:43:07 2006 +0900 [MIPS] Remove __flush_icache_page __flash_icache_page is unused, so kill it. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit 1a6183f2e6f0fa2d1898f0228559df15a89a1ffe Author: Atsushi Nemoto Date: Tue Sep 26 23:44:16 2006 +0900 [MIPS] lockdep: update defconfigs Add those lines to all defconfigs. CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y This is a patch againt linux-mips.org git tree. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit 1df0f0ff7e56f6dcb1351b9490d55ebf91ff4bd8 Author: Atsushi Nemoto Date: Tue Sep 26 23:44:01 2006 +0900 [MIPS] lockdep: Add STACKTRACE_SUPPORT and enable LOCKDEP_SUPPORT Implement stacktrace interface by using unwind_stack() and enable lockdep support in Kconfig. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit eae6c0da9df81300895949897c0451423340ac40 Author: Atsushi Nemoto Date: Tue Sep 26 23:43:40 2006 +0900 [MIPS] lockdep: fix TRACE_IRQFLAGS_SUPPORT In handle_sys and its variants, we must reload some registers which might be clobbered by trace_hardirqs_on(). Also we must make sure trace_hardirqs_on() called in kernel level (not exception level). Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit d834c16516d1ebec4766fc58c059bf01311e6045 Author: Linus Torvalds Date: Sun Oct 1 13:17:44 2006 -0700 pccard_store_cis: fix wrong error handling The test for the error from pcmcia_replace_cis() was incorrect, and would always trigger (because if an error didn't happen, the "ret" value would not be zero, it would be the passed-in count). Reported and debugged by Fabrice Bellet Rather than just fix the single broken test, make the code in question use an understandable code-sequence instead, fixing the whole function to be more readable. Signed-off-by: Linus Torvalds commit 4e9011d50d77ce7d234272e203235d8ecffd61a1 Author: Andrew Morton Date: Sun Oct 1 02:22:41 2006 -0700 [PATCH] rtc-sysfs fix It's not clear how this thinko got through.. Cc: Olaf Hering Cc: David Brownell Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a292308255ad381dd74541be468c4aec240a615 Author: Jeff Garzik Date: Sun Oct 1 12:16:00 2006 -0400 [MTD] fix printk warning gcc spits out this warning: drivers/mtd/mtd_blkdevs.c: In function ‘do_blktrans_request’: drivers/mtd/mtd_blkdevs.c:72: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘unsigned int’ This could be fixed any number of ways, including use of BUG(). rq_data_dir() only returns 0 or 1, so this entire case is superfluous. I did the most simple fix. Signed-off-by: Jeff Garzik Signed-off-by: David Woodhouse commit 2c81fbc4cfc895e80c18fffdc04a3d870eb16cb8 Author: Jeff Garzik Date: Sun Oct 1 07:32:20 2006 -0400 [netdrvr] hp100: encapsulate all non-module code The previous '#ifndef MODULE' block did not cover all the static-build-only code. Now it does. Signed-off-by: Jeff Garzik commit de897881e474cae06cf06c830fcadc916c53ce64 Author: Jeff Garzik Date: Sun Oct 1 07:31:09 2006 -0400 drivers/net/wireless/{airo,ipw2100}: fix error handling bugs airo: * fix oops, if !CONFIG_PROC_FS (create_proc_entry always returns NULL) * handle pci_register_driver() failure. if it fails, we really do want to exit, rather than (as a comment indicates) return success because-we-are-a-library. * #if 0 have_isa_dev variable, which is assigned a value but never used ipw2100: * handle sysfs_create_group() failure * handle driver_create_file() failure Signed-off-by: Jeff Garzik commit b7a00ecd557859c4037b6465fdd6c9a49b1fa649 Author: Jeff Garzik Date: Sun Oct 1 07:27:46 2006 -0400 [netdrvr] phy: Fix bugs in error handling The recent __must_check stuff flagged some error handling bugs. phy/fixed.c: * handle device_bind_driver() failure phy/phy_device.c: * handle device_bind_driver() failure * release rwsem upon failure Signed-off-by: Jeff Garzik commit 5a73fdc5ea836d2edc5e02890b51185fe304d7d3 Author: Zachary Amsden Date: Sat Sep 30 23:29:38 2006 -0700 [PATCH] Some config.h removals During tracking down a PAE compile failure, I found that config.h was being included in a bunch of places in i386 code. It is no longer necessary, so drop it. Signed-off-by: Zachary Amsden Cc: Rusty Russell Cc: Jeremy Fitzhardinge Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 789e6ac0a7cbbb38402293256a295302fd8a1100 Author: Zachary Amsden Date: Sat Sep 30 23:29:38 2006 -0700 [PATCH] paravirt: update pte hook Add a pte_update_hook which notifies about pte changes that have been made without using the set_pte / clear_pte interfaces. This allows shadow mode hypervisors which do not trap on page table access to maintain synchronized shadows. It also turns out, there was one pte update in PAE mode that wasn't using any accessor interface at all for setting NX protection. Considering it is PAE specific, and the accessor is i386 specific, I didn't want to add a generic encapsulation of this behavior yet. Signed-off-by: Zachary Amsden Cc: Rusty Russell Cc: Jeremy Fitzhardinge Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a93cb055a23f3172c1e6a22ac1dc4f1c07929b08 Author: Zachary Amsden Date: Sat Sep 30 23:29:37 2006 -0700 [PATCH] paravirt: remove set pte atomic Now that ptep_establish has a definition in PAE i386 3-level paging code, the only paging model which is insane enough to have multi-word hardware PTEs which are not efficient to set atomically, we can remove the ghost of set_pte_atomic from other architectures which falesly duplicated it, and remove all knowledge of it from the generic pgtable code. set_pte_atomic is now a private pte operator which is specific to i386 Signed-off-by: Zachary Amsden Cc: Rusty Russell Cc: Jeremy Fitzhardinge Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d6d861e3c963b4077c83e078e3e300c4b81f93e7 Author: Zachary Amsden Date: Sat Sep 30 23:29:36 2006 -0700 [PATCH] paravirt: optimize ptep establish for pae The ptep_establish macro is only used on user-level PTEs, for P->P mapping changes. Since these always happen under protection of the pagetable lock, the strong synchronization of a 64-bit cmpxchg is not needed, in fact, not even a lock prefix needs to be used. We can simply instead clear the P-bit, followed by a normal set. The write ordering is still important to avoid the possibility of the TLB snooping a partially written PTE and getting a bad mapping installed. Signed-off-by: Zachary Amsden Cc: Rusty Russell Cc: Jeremy Fitzhardinge Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 23002d88be309a7c78db69363c9d933a29a3b0bb Author: Zachary Amsden Date: Sat Sep 30 23:29:35 2006 -0700 [PATCH] paravirt: kpte flush Create a new PTE function which combines clearing a kernel PTE with the subsequent flush. This allows the two to be easily combined into a single hypercall or paravirt-op. More subtly, reverse the order of the flush for kmap_atomic. Instead of flushing on establishing a mapping, flush on clearing a mapping. This eliminates the possibility of leaving stale kmap entries which may still have valid TLB mappings. This is required for direct mode hypervisors, which need to reprotect all mappings of a given page when changing the page type from a normal page to a protected page (such as a page table or descriptor table page). But it also provides some nicer semantics for real hardware, by providing extra debug-proofing against using stale mappings, as well as ensuring that no stale mappings exist when changing the cacheability attributes of a page, which could lead to cache conflicts when two different types of mappings exist for the same page. Signed-off-by: Zachary Amsden Cc: Rusty Russell Cc: Jeremy Fitzhardinge Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 25e4df5bae333a06cd2c9b88baf14432652dc9f7 Author: Zachary Amsden Date: Sat Sep 30 23:29:34 2006 -0700 [PATCH] paravirt: combine flush accessed dirty.patch Remove ptep_test_and_clear_{dirty|young} from i386, and instead use the dominating functions, ptep_clear_flush_{dirty|young}. This allows the TLB page flush to be contained in the same macro, and allows for an eager optimization - if reading the PTE initially returned dirty/accessed, we can assume the fact that no subsequent update to the PTE which cleared accessed / dirty has occurred, as the only way A/D bits can change without holding the page table lock is if a remote processor clears them. This eliminates an extra branch which came from the generic version of the code, as we know that no other CPU could have cleared the A/D bit, so the flush will always be needed. We still export these two defines, even though we do not actually define the macros in the i386 code: #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY The reason for this is that the only use of these functions is within the generic clear_flush functions, and we want a strong guarantee that there are no other users of these functions, so we want to prevent the generic code from defining them for us. Signed-off-by: Zachary Amsden Cc: Rusty Russell Cc: Jeremy Fitzhardinge Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6606c3e0da5360799e07ae24b05080cc85c68e72 Author: Zachary Amsden Date: Sat Sep 30 23:29:33 2006 -0700 [PATCH] paravirt: lazy mmu mode hooks.patch Implement lazy MMU update hooks which are SMP safe for both direct and shadow page tables. The idea is that PTE updates and page invalidations while in lazy mode can be batched into a single hypercall. We use this in VMI for shadow page table synchronization, and it is a win. It also can be used by PPC and for direct page tables on Xen. For SMP, the enter / leave must happen under protection of the page table locks for page tables which are being modified. This is because otherwise, you end up with stale state in the batched hypercall, which other CPUs can race ahead of. Doing this under the protection of the locks guarantees the synchronization is correct, and also means that spurious faults which are generated during this window by remote CPUs are properly handled, as the page fault handler must re-check the PTE under protection of the same lock. Signed-off-by: Zachary Amsden Signed-off-by: Jeremy Fitzhardinge Cc: Rusty Russell Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9888a1cae3f859db38b9604e3df1c02177161bb0 Author: Zachary Amsden Date: Sat Sep 30 23:29:31 2006 -0700 [PATCH] paravirt: pte clear not present Change pte_clear_full to a more appropriately named pte_clear_not_present, allowing optimizations when not-present mapping changes need not be reflected in the hardware TLB for protected page table modes. There is also another case that can use it in the fremap code. Signed-off-by: Zachary Amsden Signed-off-by: Jeremy Fitzhardinge Cc: Rusty Russell Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3dc907951446b9317b1887223caa4e083390de9f Author: Zachary Amsden Date: Sat Sep 30 23:29:30 2006 -0700 [PATCH] paravirt: remove read hazard from cow We don't want to read PTEs directly like this after they have been modified, as a lazy MMU implementation of direct page tables may not have written the updated PTE back to memory yet. Signed-off-by: Zachary Amsden Signed-off-by: Jeremy Fitzhardinge Cc: Rusty Russell Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bd4c8ce41a2e2f0c5bf54343ab54e8e09faec021 Author: Andrew Morton Date: Sat Sep 30 23:29:29 2006 -0700 [PATCH] invalidate_inode_pages2(): ignore page refcounts The recent fix to invalidate_inode_pages() (git commit 016eb4a) managed to unfix invalidate_inode_pages2(). The problem is that various bits of code in the kernel can take transient refs on pages: the page scanner will do this when inspecting a batch of pages, and the lru_cache_add() batching pagevecs also hold a ref. Net result is transient failures in invalidate_inode_pages2(). This affects NFS directory invalidation (observed) and presumably also block-backed direct-io (not yet reported). Fix it by reverting invalidate_inode_pages2() back to the old version which ignores the page refcounts. We may come up with something more clever later, but for now we need a 2.6.18 fix for NFS. Cc: Chuck Lever Cc: Nick Piggin Cc: Peter Zijlstra Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d025c9db7f31fc0554ce7fb2dfc78d35a77f3487 Author: Andi Kleen Date: Sat Sep 30 23:29:28 2006 -0700 [PATCH] Support piping into commands in /proc/sys/kernel/core_pattern Using the infrastructure created in previous patches implement support to pipe core dumps into programs. This is done by overloading the existing core_pattern sysctl with a new syntax: |program When the first character of the pattern is a '|' the kernel will instead threat the rest of the pattern as a command to run. The core dump will be written to the standard input of that program instead of to a file. This is useful for having automatic core dump analysis without filling up disks. The program can do some simple analysis and save only a summary of the core dump. The core dump proces will run with the privileges and in the name space of the process that caused the core dump. I also increased the core pattern size to 128 bytes so that longer command lines fit. Most of the changes comes from allowing core dumps without seeks. They are fairly straight forward though. One small incompatibility is that if someone had a core pattern previously that started with '|' they will get suddenly new behaviour. I think that's unlikely to be a real problem though. Additional background: > Very nice, do you happen to have a program that can accept this kind of > input for crash dumps? I'm guessing that the embedded people will > really want this functionality. I had a cheesy demo/prototype. Basically it wrote the dump to a file again, ran gdb on it to get a backtrace and wrote the summary to a shared directory. Then there was a simple CGI script to generate a "top 10" crashes HTML listing. Unfortunately this still had the disadvantage to needing full disk space for a dump except for deleting it afterwards (in fact it was worse because over the pipe holes didn't work so if you have a holey address map it would require more space). Fortunately gdb seems to be happy to handle /proc/pid/fd/xxx input pipes as cores (at least it worked with zsh's =(cat core) syntax), so it would be likely possible to do it without temporary space with a simple wrapper that calls it in the right way. I ran out of time before doing that though. The demo prototype scripts weren't very good. If there is really interest I can dig them out (they are currently on a laptop disk on the desk with the laptop itself being in service), but I would recommend to rewrite them for any serious application of this and fix the disk space problem. Also to be really useful it should probably find a way to automatically fetch the debuginfos (I cheated and just installed them in advance). If nobody else does it I can probably do the rewrite myself again at some point. My hope at some point was that desktops would support it in their builtin crash reporters, but at least the KDE people I talked too seemed to be happy with their user space only solution. Alan sayeth: I don't believe that piping as such as neccessarily the right model, but the ability to intercept and processes core dumps from user space is asked for by many enterprise users as well. They want to know about, capture, analyse and process core dumps, often centrally and in automated form. [akpm@osdl.org: loff_t != unsigned long] Signed-off-by: Andi Kleen Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e239ca540594cff00adcce163dc332b27015d8e5 Author: Andi Kleen Date: Sat Sep 30 23:29:27 2006 -0700 [PATCH] Create call_usermodehelper_pipe() A new member in the ever growing family of call_usermode* functions is born. The new call_usermodehelper_pipe() function allows to pipe data to the stdin of the called user mode progam and behaves otherwise like the normal call_usermodehelp() (except that it always waits for the child to finish) Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d6cbd281d189977b38eac7eb2a4678de19b6b483 Author: Andi Kleen Date: Sat Sep 30 23:29:26 2006 -0700 [PATCH] Some cleanup in the pipe code Split the big and hard to read do_pipe function into smaller pieces. This creates new create_write_pipe/free_write_pipe/create_read_pipe functions. These functions are made global so that they can be used by other parts of the kernel. The resulting code is more generic and easier to read and has cleaner error handling and less gotos. [akpm@osdl.org: cleanup] Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 65da4d81f48e092f71feaf04bf2ccd096b5a5171 Author: Amol Lad Date: Sat Sep 30 23:29:25 2006 -0700 [PATCH] ioremap balanced with iounmap for drivers/serial/sunsu.c ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: Alan Cox Cc: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af907dc8cd4157d629e48533b3400786467340d5 Author: Amol Lad Date: Sat Sep 30 23:29:25 2006 -0700 [PATCH] ioremap balanced with iounmap for drivers/serial/mux.c ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a141a04330bd6eadf7081a0860dc786be7d09c46 Author: Amol Lad Date: Sat Sep 30 23:29:24 2006 -0700 [PATCH] ioremap balanced with iounmap for drivers/serial/mpsc.c ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: Alan Cox Cc: Mark A. Greer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be618f550cb499db263e2ce22c5ad4f4dbfd53e6 Author: Amol Lad Date: Sat Sep 30 23:29:23 2006 -0700 [PATCH] ioremap balanced with iounmap for drivers/serial/mpc52xx_uart.c ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6257b3bdfde4295c04872d710c2419ff8efc1b86 Author: Amol Lad Date: Sat Sep 30 23:29:22 2006 -0700 [PATCH] ioremap balanced with iounmap for drivers/serial/ip22zilog.c ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4664132613caf40bfbf17b7e0ab3340a8b8f526 Author: Amol Lad Date: Sat Sep 30 23:29:21 2006 -0700 [PATCH] ioremap balanced with iounmap for drivers/serial/ioc4_serial.c ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: Alan Cox Cc: Brent Casavant Cc: Pat Gefre Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d9964d5c9067fe58fecb7ba10b2de4771d2005d9 Author: Amol Lad Date: Sat Sep 30 23:29:21 2006 -0700 [PATCH] ioremap balanced with iounmap for drivers/serial/8250_gsc.c ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f12ad7d59ab77591e4ab2dacd6faa9ea9afffb99 Author: Amol Lad Date: Sat Sep 30 23:29:20 2006 -0700 [PATCH] ioremap balanced with iounmap for drivers/serial/8250_acorn,c ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Signed-off-by: Amol Lad Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 16c564bb3cdecbc39eab5c0de3fe94ed58ba4163 Author: Haavard Skinnemoen Date: Sat Sep 30 23:29:19 2006 -0700 [PATCH] Generic ioremap_page_range: x86_64 conversion Convert x86_64 to use generic ioremap_page_range() [akpm@osdl.org: build fix] Signed-off-by: Haavard Skinnemoen Acked-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9540fc42305859705b0232a10c8dec3ad866bd40 Author: Haavard Skinnemoen Date: Sat Sep 30 23:29:18 2006 -0700 [PATCH] Generic ioremap_page_range: m32r conversion Convert m32r to use generic ioremap_page_range() Signed-off-by: Haavard Skinnemoen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a148ecfdf04d5fcb840324eef45d63ed674c73b9 Author: Haavard Skinnemoen Date: Sat Sep 30 23:29:17 2006 -0700 [PATCH] Generic ioremap_page_range: i386 conversion Convert i386 to use generic ioremap_page_range() [bunk@stusta.de: build fix] Signed-off-by: Haavard Skinnemoen Acked-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e32cbc3df44838cc93a679aca3561f75b4964c57 Author: Haavard Skinnemoen Date: Sat Sep 30 23:29:17 2006 -0700 [PATCH] Generic ioremap_page_range: cris conversion Convert CRIS to use generic ioremap_page_range() Signed-off-by: Haavard Skinnemoen Acked-by: Mikael Starvik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 86c8eb360daa6286e3f9bd32a22e5d9c69e86dd1 Author: Haavard Skinnemoen Date: Sat Sep 30 23:29:16 2006 -0700 [PATCH] Generic ioremap_page_range: avr32 conversion Convert AVR32 to use generic ioremap_page_range() Signed-off-by: Haavard Skinnemoen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 801f92ad5a0c630646f6746f3ed1663fcab185d1 Author: Haavard Skinnemoen Date: Sat Sep 30 23:29:15 2006 -0700 [PATCH] Generic ioremap_page_range: alpha conversion Convert Alpha to use generic ioremap_page_range() by turning __alpha_remap_area_pages() into an inline wrapper around ioremap_page_range(). Signed-off-by: Haavard Skinnemoen Cc: Richard Henderson Cc: Ivan Kokshaysky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db71daabad0821996483dfe309c4bc81d6755a70 Author: Haavard Skinnemoen Date: Sat Sep 30 23:29:14 2006 -0700 [PATCH] Generic ioremap_page_range: flush_cache_vmap The existing implementation of ioremap_page_range(), which was taken from i386, does this: flush_cache_all(); /* modify page tables */ flush_tlb_all(); I think this is a bit defensive, so this patch changes the generic implementation to do: /* modify page tables */ flush_cache_vmap(start, end); instead, which is similar to what vmalloc() does. This should still be correct because we never modify existing PTEs. According to James Bottomley: The problem the flush_tlb_all() is trying to solve is to avoid stale tlb entries in the ioremap area. We're just being conservative by flushing on both map and unmap. Technically what vmalloc/vfree does (only flush the tlb on unmap) is just fine because it means that the only tlb entries in the remap area must belong to in-use mappings. Signed-off-by: Haavard Skinnemoen Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Russell King Cc: Mikael Starvik Cc: Andi Kleen Cc: Cc: Ralf Baechle Cc: Kyle McMartin Cc: Martin Schwidefsky Cc: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74588d8ba34ff1bda027cfa737972af01ab00c8b Author: Haavard Skinnemoen Date: Sat Sep 30 23:29:12 2006 -0700 [PATCH] Generic ioremap_page_range: implementation This patch adds a generic implementation of ioremap_page_range() in lib/ioremap.c based on the i386 implementation. It differs from the i386 version in the following ways: * The PTE flags are passed as a pgprot_t argument and must be determined up front by the arch-specific code. No additional PTE flags are added. * Uses set_pte_at() instead of set_pte() [bunk@stusta.de: warning fix] ]dhowells@redhat.com: nommu build fix] Signed-off-by: Haavard Skinnemoen Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Russell King Cc: Mikael Starvik Cc: Andi Kleen Cc: Cc: Ralf Baechle Cc: Kyle McMartin Cc: Martin Schwidefsky Cc: Paul Mundt Signed-off-by: Adrian Bunk Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc03613decef0cc4d2f3a24f19fa5a868745715f Author: Fernando Vazquez Date: Sat Sep 30 23:29:10 2006 -0700 [PATCH] stack overflow safe kdump: safe smp_send_nmi_allbutself() Re-implement smp_send_nmi_allbutself() so that calls to smp_processor_id (through send_IPI_allbutself) can be replaced with safe_smp_processor_id without affecting other parts of the kernel (as suggested by Eric Biederman). Signed-off-by: Fernando Vazquez Looks-reasonable-to: Andi Kleen Acked-by: "Eric W. Biederman" Cc: Vivek Goyal Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce53af9496c625a8ae33526713be34a23756db19 Author: Fernando Vazquez Date: Sat Sep 30 23:29:09 2006 -0700 [PATCH] stack overflow safe kdump: crash: use safe_smp_processor_id() Substitute "smp_processor_id" with the stack overflow-safe "safe_smp_processor_id" in the reboot path to the second kernel. [akpm@osdl.org: build fix] Signed-off-by: Fernando Vazquez Looks-reasonable-to: Andi Kleen Acked-by: "Eric W. Biederman" Cc: Vivek Goyal Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2654c08caa12a06237b28f85446ae2d223c30144 Author: Fernando Vazquez Date: Sat Sep 30 23:29:08 2006 -0700 [PATCH] stack overflow safe kdump: safe_smp_processor_id(): voyager "safe_smp_processor_id" implementation for i386-Voyager. Signed-off-by: Fernando Vazquez Looks-reasonable-to: Andi Kleen Acked-by: "Eric W. Biederman" Cc: Vivek Goyal Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc2bc768a009b9ad8711894c544dc6b0d8c0ce57 Author: Fernando Vazquez Date: Sat Sep 30 23:29:07 2006 -0700 [PATCH] stack overflow safe kdump: safe_smp_processor_id() This is a the first of a series of patch-sets aiming at making kdump more robust against stack overflows. This patch set does the following: * Add safe_smp_processor_id function to i386 architecture (this function was inspired by the x86_64 function of the same name). * Substitute "smp_processor_id" with the stack overflow-safe "safe_smp_processor_id" in the reboot path to the second kernel. This patch: On the event of a stack overflow critical data that usually resides at the bottom of the stack is likely to be stomped and, consequently, its use should be avoided. In particular, in the i386 and IA64 architectures the macro smp_processor_id ultimately makes use of the "cpu" member of struct thread_info which resides at the bottom of the stack. x86_64, on the other hand, is not affected by this problem because it benefits from the use of the PDA infrastructure. To circumvent this problem I suggest implementing "safe_smp_processor_id()" (it already exists in x86_64) for i386 and IA64 and use it as a replacement for smp_processor_id in the reboot path to the dump capture kernel. This is a possible implementation for i386. Signed-off-by: Fernando Vazquez Looks-reasonable-to: Andi Kleen Acked-by: "Eric W. Biederman" Cc: Vivek Goyal Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce71ec36840368b877fb63bd14c8e67ab62d08b1 Author: Dave Hansen Date: Sat Sep 30 23:29:06 2006 -0700 [PATCH] r/o bind mounts: monitor zeroing of i_nlink Some filesystems, instead of simply decrementing i_nlink, simply zero it during an unlink operation. We need to catch these in addition to the decrement operations. Signed-off-by: Dave Hansen Acked-by: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17ff785691503f63ec648df82a7fdaece7695561 Author: Mark Fasheh Date: Sat Sep 30 23:29:05 2006 -0700 [PATCH] r/o bind mounts: clean up OCFS2 nlink handling OCFS2 does some operations on i_nlink, then reverts them if some of its operations fail to complete. This does not fit in well with the drop_nlink() logic where we expect i_nlink to stay at zero once it gets there. So, delay all of the nlink operations until we're sure that the operations have completed. Also, introduce a small helper to check whether an inode has proper "unlinkable" i_nlink counts no matter whether it is a directory or regular inode. This patch is broken out from the others because it does contain some logical changes. Signed-off-by: Dave Hansen Signed-off-by: Mark Fasheh Cc: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8c76e6f45c111c32a4b3e50a2adc9210737b0d8 Author: Dave Hansen Date: Sat Sep 30 23:29:04 2006 -0700 [PATCH] r/o bind mount prepwork: inc_nlink() helper This is mostly included for parity with dec_nlink(), where we will have some more hooks. This one should stay pretty darn straightforward for now. Signed-off-by: Dave Hansen Acked-by: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a53c3a783c2fa9b969628e65695c11c3e51e673 Author: Dave Hansen Date: Sat Sep 30 23:29:03 2006 -0700 [PATCH] r/o bind mounts: unlink: monitor i_nlink When a filesystem decrements i_nlink to zero, it means that a write must be performed in order to drop the inode from the filesystem. We're shortly going to have keep filesystems from being remounted r/o between the time that this i_nlink decrement and that write occurs. So, add a little helper function to do the decrements. We'll tie into it in a bit to note when i_nlink hits zero. Signed-off-by: Dave Hansen Acked-by: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aab520e2f6c80160cabd187a8d0292d1cec8ff68 Author: Dave Hansen Date: Sat Sep 30 23:29:02 2006 -0700 [PATCH] r/o bind mount prepwork: move open_namei()'s vfs_create() The code around vfs_create() in open_namei() is getting a bit too complex. Right now, there is at least the reference count on the dentry, and the i_mutex to worry about. Soon, we'll also have mnt_writecount. So, break the vfs_create() call out of open_namei(), and into a helper function. This duplicates the call to may_open(), but that isn't such a bad thing since the arguments (acc_mode and flag) were being heavily massaged anyway. Signed-off-by: Dave Hansen Acked-by: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6902d925d568cd5bfda8a1a328bf08d26d1bab46 Author: Dave Hansen Date: Sat Sep 30 23:29:01 2006 -0700 [PATCH] r/o bind mounts: prepare for write access checks: collapse if() We're shortly going to be adding a bunch more permission checks in these functions. That requires adding either a bunch of new if() conditions, or some gotos. This patch collapses existing if()s and uses gotos instead to prepare for the upcoming changes. Signed-off-by: Dave Hansen Acked-by: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db5fed26b2e0beed939b773dd5896077a1794d65 Author: Jay Lan Date: Sat Sep 30 23:29:00 2006 -0700 [PATCH] csa accounting taskstats update ChangeLog: Feedbacks from Andrew Morton: - define TS_COMM_LEN to 32 - change acct_stimexpd field of task_struct to be of cputime_t, which is to be used to save the tsk->stime of last timer interrupt update. - a new Documentation/accounting/taskstats-struct.txt to describe fields of taskstats struct. Feedback from Balbir Singh: - keep the stime of a task to be zero when both stime and utime are zero as recoreded in task_struct. Misc: - convert accumulated RSS/VM from platform dependent pages-ticks to MBytes-usecs in the kernel Cc: Shailabh Nagar Cc: Balbir Singh Cc: Jes Sorensen Cc: Chris Sturtivant Cc: Tony Ernst Cc: Guillaume Thouvenin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f0ab5147951267134612570604cf8341901a80c Author: Jay Lan Date: Sat Sep 30 23:28:59 2006 -0700 [PATCH] csa: convert CONFIG tag for extended accounting routines There were a few accounting data/macros that are used in CSA but are #ifdef'ed inside CONFIG_BSD_PROCESS_ACCT. This patch is to change those ifdef's from CONFIG_BSD_PROCESS_ACCT to CONFIG_TASK_XACCT. A few defines are moved from kernel/acct.c and include/linux/acct.h to kernel/tsacct.c and include/linux/tsacct_kern.h. Signed-off-by: Jay Lan Cc: Shailabh Nagar Cc: Balbir Singh Cc: Jes Sorensen Cc: Chris Sturtivant Cc: Tony Ernst Cc: Guillaume Thouvenin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9acc1853519a0473620d424105f9d49ea5b4e62e Author: Jay Lan Date: Sat Sep 30 23:28:58 2006 -0700 [PATCH] csa: Extended system accounting over taskstats Add extended system accounting handling over taskstats interface. A CONFIG_TASK_XACCT flag is created to enable the extended accounting code. Signed-off-by: Jay Lan Cc: Shailabh Nagar Cc: Balbir Singh Cc: Jes Sorensen Cc: Chris Sturtivant Cc: Tony Ernst Cc: Guillaume Thouvenin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3cef7a99469afc159fec3a61b42dc7ca5b6824f Author: Jay Lan Date: Sat Sep 30 23:28:55 2006 -0700 [PATCH] csa: basic accounting over taskstats Add some basic accounting fields to the taskstats struct, add a new kernel/tsacct.c to handle basic accounting data handling upon exit. A handle is added to taskstats.c to invoke the basic accounting data handling. Signed-off-by: Jay Lan Cc: Shailabh Nagar Cc: Balbir Singh Cc: Jes Sorensen Cc: Chris Sturtivant Cc: Tony Ernst Cc: Guillaume Thouvenin Cc: "Michal Piotrowski" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7d1bdca9b06acb3df07329eaff72d5eaf1543287 Author: Balbir Singh Date: Sat Sep 30 23:28:54 2006 -0700 [PATCH] Fix getdelays.c - cpumask length and error reporting Fix the length passed while (un)registering cpumask. We were passing sizeof the array, make it strlen(). Error value printed in fatal errors should be derived from the message. The message contains an nlmsgerr embedded with an error value. We must report that value to the user. Signed-off-by: Balbir Singh Cc: Jamal Hadi Cc: Shailabh Nagar Cc: Thomas Graf Cc: "David S. Miller" Cc: Jay Lan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ae646845b603e9df5711084436d389f8371ffb3 Author: Balbir Singh Date: Sat Sep 30 23:28:53 2006 -0700 [PATCH] Fix taskstats size calculation (use the new genetlink utility functions) The addition of the CSA patch pushed the size of struct taskstats to 256 bytes. This exposed a problem with prepare_reply(), we were not allocating space for the netlink and genetlink header. It worked earlier because alloc_skb() would align the skb to SMP_CACHE_BYTES, which added some additonal bytes. Signed-off-by: Balbir Singh Cc: Jamal Hadi Cc: Shailabh Nagar Cc: Thomas Graf Cc: "David S. Miller" Cc: Jay Lan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17db952cd16cecc76937b138c685ae3d198ab17c Author: Balbir Singh Date: Sat Sep 30 23:28:51 2006 -0700 [PATCH] Add genetlink utilities for payload length calculation Add two utility helper functions genlmsg_msg_size() and genlmsg_total_size(). These functions are derived from their netlink counterparts. Signed-off-by: Balbir Singh Cc: Jamal Hadi Cc: Shailabh Nagar Cc: Thomas Graf Cc: "David S. Miller" Cc: Jay Lan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 31608214fe21dc31d8046679054ab033b1fe5cf1 Author: Chen, Kenneth W Date: Sat Sep 30 23:28:50 2006 -0700 [PATCH] clean up unused kiocb variables Signed-off-by: Ken Chen Acked-by: Zach Brown Cc: Suparna Bhattacharya Cc: Benjamin LaHaise Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eed4e51fb60c3863c134a5e9f6006b29805ead97 Author: Badari Pulavarty Date: Sat Sep 30 23:28:49 2006 -0700 [PATCH] Add vector AIO support This work is initially done by Zach Brown to add support for vectored aio. These are the core changes for AIO to support IOCB_CMD_PREADV/IOCB_CMD_PWRITEV. [akpm@osdl.org: huge build fix] Signed-off-by: Zach Brown Signed-off-by: Christoph Hellwig Signed-off-by: Badari Pulavarty Acked-by: Benjamin LaHaise Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 543ade1fc901db4c3dbe9fb27241fb977f1f3eea Author: Badari Pulavarty Date: Sat Sep 30 23:28:48 2006 -0700 [PATCH] Streamline generic_file_* interfaces and filemap cleanups This patch cleans up generic_file_*_read/write() interfaces. Christoph Hellwig gave me the idea for this clean ups. In a nutshell, all filesystems should set .aio_read/.aio_write methods and use do_sync_read/ do_sync_write() as their .read/.write methods. This allows us to cleanup all variants of generic_file_* routines. Final available interfaces: generic_file_aio_read() - read handler generic_file_aio_write() - write handler generic_file_aio_write_nolock() - no lock write handler __generic_file_aio_write_nolock() - internal worker routine Signed-off-by: Badari Pulavarty Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ee0b3e671baff681d69fbf0db33b47603c0a8280 Author: Badari Pulavarty Date: Sat Sep 30 23:28:47 2006 -0700 [PATCH] Remove readv/writev methods and use aio_read/aio_write instead This patch removes readv() and writev() methods and replaces them with aio_read()/aio_write() methods. Signed-off-by: Badari Pulavarty Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 027445c37282bc1ed26add45e573ad2d3e4860a5 Author: Badari Pulavarty Date: Sat Sep 30 23:28:46 2006 -0700 [PATCH] Vectorize aio_read/aio_write fileop methods This patch vectorizes aio_read() and aio_write() methods to prepare for collapsing all aio & vectored operations into one interface - which is aio_read()/aio_write(). Signed-off-by: Badari Pulavarty Signed-off-by: Christoph Hellwig Cc: Michael Holzheu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9ea0f9499d15c49df23e7aac4332d830c40e12d0 Author: Jeff Mahoney Date: Sat Sep 30 23:28:45 2006 -0700 [PATCH] reiserfs: eliminate minimum window size for bitmap searching When a file system becomes fragmented (using MythTV, for example), the bigalloc window searching ends up causing huge performance problems. In a file system presented by a user experiencing this bug, the file system was 90% free, but no 32-block free windows existed on the entire file system. This causes the allocator to scan the entire file system for each 128k write before backing down to searching for individual blocks. In the end, finding a contiguous window for all the blocks in a write is an advantageous special case, but one that can be found naturally when such a window exists anyway. This patch removes the bigalloc window searching, and has been proven to fix the test case described above. Signed-off-by: Jeff Mahoney Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5a2618e6a972f305496daa257a56a09dd3acca29 Author: Jeff Mahoney Date: Sat Sep 30 23:28:44 2006 -0700 [PATCH] reiserfs: use generic_file_open for open() checks The other common disk-based file systems (I checked ext[23], xfs, jfs) check to ensure that opens of files > 2 GB fail unless O_LARGEFILE is specified. They check via generic_file_open or their own open routine. ReiserFS doesn't have an f_op->open defined, and as such, it's possible to open files > 2 GB without O_LARGEFILE. This patch adds the f_op->open member to conform with the expected behavior. Signed-off-by: Jeff Mahoney Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5065227b46235ec0131b383cc2f537069b55c6b6 Author: Jeff Mahoney Date: Sat Sep 30 23:28:44 2006 -0700 [PATCH] reiserfs: on-demand bitmap loading This is the patch the three previous ones have been leading up to. It changes the behavior of ReiserFS from loading and caching all the bitmaps as special, to treating the bitmaps like any other bit of metadata and just letting the system-wide caches figure out what to hang on to. Buffer heads are allocated on the fly, so there is no need to retain pointers to all of them. The caching of the metadata occurs when the data is read and updated, and is considered invalid and uncached until then. I needed to remove the vs-4040 check for performing a duplicate operation on a particular bit. The reason is that while the other sites for working with bitmaps are allowed to schedule, is_reusable() is called from do_balance(), which will panic if a schedule occurs in certain places. The benefit of on-demand bitmaps clearly outweighs a sanity check that depends on a compile-time option that is discouraged. [akpm@osdl.org: warning fix] Signed-off-by: Jeff Mahoney Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6f01046b35d940079822827498a7dd6d3eec8c6b Author: Jeff Mahoney Date: Sat Sep 30 23:28:43 2006 -0700 [PATCH] reiserfs: reorganize bitmap loading functions This patch moves the bitmap loading code from super.c to bitmap.c The code is also restructured somewhat. The only difference between new format bitmaps and old format bitmaps is where they are. That's a two liner before loading the block to use the correct one. There's no need for an entirely separate code path. The load path is generally the same, with the pattern being to throw out a bunch of requests and then wait for them, then cache the metadata from the contents. Again, like the previous patches, the purpose is to set up for later ones. Update: There was a bug in the previously posted version of this that resulted in corruption. The problem was that bitmap 0 on new format file systems must be treated specially, and wasn't. A stupid bug with an easy fix. This is hopefully the last fix for the disaster that is the reiserfs bitmap patch set. If a bitmap block was full, first_zero_hint would end up at zero since it would never be changed from it's zeroed out value. This just sets it beyond the end of the bitmap block. If any bits are freed, it will be reset to a valid bit. When info->free_count = 0, then we already know it's full. Signed-off-by: Jeff Mahoney Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b3dc17bc0c0997bde9f5d7691ec0cae24258cf7 Author: Jeff Mahoney Date: Sat Sep 30 23:28:42 2006 -0700 [PATCH] reiserfs: clean up bitmap block buffer head references Similar to the SB_JOURNAL cleanup that was accepted a while ago, this patch uses a temporary variable for buffer head references from the bitmap info array. This makes the code much more readable in some areas. It also uses proper reference counting, doing a get_bh() after using the pointer from the array and brelse()'ing it later. This may seem silly, but a later patch will replace the simple temporary variables with an actual read, so the reference freeing will be used then. Signed-off-by: Jeff Mahoney Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e1fabd3ccf02901374bffa434e0af472749a5bd9 Author: Jeff Mahoney Date: Sat Sep 30 23:28:40 2006 -0700 [PATCH] reiserfs: fix is_reusable bitmap check to not traverse the bitmap info array There is a check in is_reusable to determine if a particular block is a bitmap block. It verifies this by going through the array of bitmap block buffer heads and comparing the block number to each one. Bitmap blocks are at defined locations on the disk in both old and current formats. Simply checking against the known good values is enough. This is a trivial optimization for a non-production codepath, but this is the first in a series of patches that will ultimately remove the buffer heads from that array. Signed-off-by: Jeff Mahoney Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ef386092d7c2891bd7acefb2a87f878f7e9a0d6 Author: Atsushi Nemoto Date: Sat Sep 30 23:28:31 2006 -0700 [PATCH] kill wall_jiffies With 2.6.18-rc4-mm2, now wall_jiffies will always be the same as jiffies. So we can kill wall_jiffies completely. This is just a cleanup and logically should not change any real behavior except for one thing: RTC updating code in (old) ppc and xtensa use a condition "jiffies - wall_jiffies == 1". This condition is never met so I suppose it is just a bug. I just remove that condition only instead of kill the whole "if" block. [heiko.carstens@de.ibm.com: s390 build fix and cleanup] Signed-off-by: Atsushi Nemoto Cc: Andi Kleen Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Russell King Cc: Ian Molton Cc: Mikael Starvik Cc: David Howells Cc: Yoshinori Sato Cc: Hirokazu Takata Cc: Ralf Baechle Cc: Kyle McMartin Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Richard Curnow Cc: William Lee Irwin III Cc: "David S. Miller" Cc: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Miles Bader Cc: Chris Zankel Cc: "Luck, Tony" Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 70bc42f90a3f4721c89dbe865e6c95da8565b41c Author: Adrian Bunk Date: Sat Sep 30 23:28:29 2006 -0700 [PATCH] kernel/time/ntp.c: possible cleanups This patch contains the following possible cleanups: - make the following needlessly global function static: - ntp_update_frequency() - make the following needlessly global variables static: - time_state - time_offset - time_constant - time_reftime - remove the following read-only global variable: - time_precision Signed-off-by: Adrian Bunk Cc: Roman Zippel Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0883d899ef862c1b0f8b2c2d38098470c193a3dd Author: Roman Zippel Date: Sat Sep 30 23:28:29 2006 -0700 [PATCH] ntp: cleanup defines and comments Remove a few unused defines and remove obsolete information from comments. Signed-off-by: Roman Zippel Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f19923937321244e7dc334767eb4b67e0e3d5c74 Author: Roman Zippel Date: Sat Sep 30 23:28:28 2006 -0700 [PATCH] ntp: convert to the NTP4 reference model This converts the kernel ntp model into a model which matches the nanokernel reference implementations. The previous patches already increased the resolution and precision of the computations, so that this conversion becomes quite simple. explains: The original NTP kernel interface was defined in units of microseconds. That's what Linux implements. As computers have gotten faster and can now split microseconds easily, a new kernel interface using nanosecond units was defined ("the nanokernel", confusing as that name is to OS hackers), and there's an STA_NANO bit in the adjtimex() status field to tell the application which units it's using. The current ntpd supports both, but Linux loses some possible timing resolution because of quantization effects, and the ntpd hackers would really like to be able to drop the backwards compatibility code. Ulrich Windl has been maintaining a patch set to do the conversion for years, but it's hard to keep in sync. Signed-off-by: Roman Zippel Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04b617e71e363e640e88be1e43f53fa6a3afef9f Author: Roman Zippel Date: Sat Sep 30 23:28:27 2006 -0700 [PATCH] ntp: convert time_freq to nsec value This converts time_freq to a scaled nsec value and adds around 6bit of extra resolution. This pushes the time_freq to its 32bit limits so the calculatons have to be done with 64bit. Signed-off-by: Roman Zippel Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97eebe138caaf78354b1fad233e63bafdcc4fd54 Author: Roman Zippel Date: Sat Sep 30 23:28:26 2006 -0700 [PATCH] ntp: remove time_tolerance time_tolerance isn't changed at all in the kernel, so simply remove it, this simplifies the next patch, as it avoids a number of conversions. Signed-off-by: Roman Zippel Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f807f8d2137ba728d22820103131038639b68a9 Author: Roman Zippel Date: Sat Sep 30 23:28:25 2006 -0700 [PATCH] ntp: add time_adjust to tick length This folds update_ntp_one_tick() into second_overflow() and adds time_adjust to the tick length, this makes time_next_adjust unnecessary. This slightly changes the adjtime() behaviour, instead of applying it to the next tick, it's applied to the next second. Signed-off-by: Roman Zippel Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d3675cc3d04d7fd4bb11e8c1ea79e5ade4f5e44 Author: Roman Zippel Date: Sat Sep 30 23:28:25 2006 -0700 [PATCH] ntp: prescale time_offset This converts time_offset into a scaled per tick value. This avoids now completely the crude compensation in second_overflow(). Signed-off-by: Roman Zippel Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc6a43e46f1b6de22701f97bec022e97088cfa90 Author: Roman Zippel Date: Sat Sep 30 23:28:24 2006 -0700 [PATCH] ntp: add time_freq to tick length This adds the frequency part to ntp_update_frequency(). Signed-off-by: Roman Zippel Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab8783b688f33c40ed7b37b814a4a1e7d341ce11 Author: Roman Zippel Date: Sat Sep 30 23:28:23 2006 -0700 [PATCH] ntp: add time_adj to tick length This makes time_adj local to second_overflow() and integrates it into the tick length instead of adding it everytime. Signed-off-by: Roman Zippel Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b0ee75561beadc4db4d9a899c8ef4a7db50aa0ab Author: Roman Zippel Date: Sat Sep 30 23:28:22 2006 -0700 [PATCH] ntp: add ntp_update_frequency This introduces ntp_update_frequency() and deinlines ntp_clear() (as it's not performance critical). ntp_update_frequency() calculates the base tick length using tick_usec and adds a base adjustment, in case the frequency doesn't divide evenly by HZ. Signed-off-by: Roman Zippel Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c7ee8de956fc250fe31e2fa91f6da980fabe317 Author: john stultz Date: Sat Sep 30 23:28:22 2006 -0700 [PATCH] NTP: Move all the NTP related code to ntp.c Move all the NTP related code to ntp.c [akpm@osdl.org: cleanups, build fix] Signed-off-by: John Stultz Cc: Ingo Molnar Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c902e0a0102f1095eec4b3511c13c84ca2bc4577 Author: Josh Triplett Date: Sat Sep 30 23:28:21 2006 -0700 [PATCH] Pass sparse the lock expression given to lock annotations The lock annotation macros __acquires, __releases, __acquire, and __release all currently throw away the lock expression passed as an argument. Now that sparse can parse __context__ and __attribute__((context)) with a context expression, pass the lock expression down to sparse as the context expression. This requires a version of sparse from GIT commit 37475a6c1c3e66219e68d912d5eb833f4098fd72 or later. Signed-off-by: Josh Triplett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit df3fe8defedc52745526914e12eb4ba0b8a9f6ca Author: Corey Minyard Date: Sat Sep 30 23:28:20 2006 -0700 [PATCH] ipmi: don't start kipmid if the IPMI driver can use interrupts If the driver has interrupts available to it, there is really no reason to have a kernel daemon push the IPMI state machine. Note that I have experienced machines where the interrupts do not work correctly. This was a long time ago and hopefully things are better now. If some machines still have broken interrupts, a blacklist will need to be added. Signed-off-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dcb9c39236a27c2288a7059aa504abb57427df7c Author: David Brownell Date: Sat Sep 30 23:28:19 2006 -0700 [PATCH] omap_cf works again (sync with linux-omap tree) This syncs the omap_cf driver with the one from the linux-omap tree. Changes include fixing build warnings (section mismatch, unused return value) and coping with various pcmcia core changes related to managing i/o memory and irq resources. Signed-off-by: David Brownell Cc: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 391b1fe67d193df75144a92b146613c36491ef0d Author: Atsushi Nemoto Date: Sat Sep 30 23:28:18 2006 -0700 [PATCH] RTC: rtc-ds1553, rtc-ds1742 update Check return value of sysfs_create_bin_file(). Fix polarity of RTC_BATT_FLAG bit in DS1742. Signed-off-by: Atsushi Nemoto Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 90b4d648f02a653b192be7f0feb0a933b7525e6a Author: David Brownell Date: Sat Sep 30 23:28:17 2006 -0700 [PATCH] AT91rm9200 RTC can issue system wakeup events This lets the at91rm9200 RTC alarm be a system wakeup irq, according to the setting of /sys/devices/platform/at91_rtc/power/wakeup. User code can set the alarm, put the system into a low power mode, and then rely on it waking up no later than the specified moment. Signed-off-by: David Brownell Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff8371ac9a5a55c956991fed8e5f58640c7a32f3 Author: David Brownell Date: Sat Sep 30 23:28:17 2006 -0700 [PATCH] constify rtc_class_ops: update drivers Update RTC framework so that drivers can constify their method tables, moving them from ".data" to ".rodata". Then update the drivers. Signed-off-by: David Brownell Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db621f174d2c017d960089ea8cbc91c0763f1069 Author: David Brownell Date: Sat Sep 30 23:28:16 2006 -0700 [PATCH] RTC class: error checks The rtc_is_valid_tm() routine needs to treat some of the fields it checks as unsigned, to prevent wrongly accepting invalid rtc_time structs; this is the same approach used elsewhere in the RTC code for such tests. Conversely, rtc_proc_show() is missing one invalid-day-of-month test that rtc_is_valid_tm() makes: there is no day zero. Signed-off-by: David Brownell Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 818a8674b0388d90e33a5d1b13946b40dda7032a Author: David Brownell Date: Sat Sep 30 23:28:15 2006 -0700 [PATCH] RTC class uses subsys_init This makes RTC core components use "subsys_init" instead of "module_init", as appropriate for subsystem infrastructure. This is mostly useful for statically linking drivers in other parts of the tree that may provide an RTC interface as a secondary functionality (e.g. part of a multifunction chip); they won't need to worry so much about drivers/Makefile link order. Signed-off-by: David Brownell Cc: Alessandro Zummo Acked-by: Oleg Verych Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9e86ecb659f11b36b5e189214b19cb31ef5dfd72 Author: David Brownell Date: Sat Sep 30 23:28:14 2006 -0700 [PATCH] RTC class: Kconfig improvements Small updates to make the RTC class Kconfig text be more informative. This should help folk used to the drivers/char/rtc.c support, or a single RTC, be slightly less surprised by the differences. Also, adds a new RTC_DEBUG option to predefine DEBUG in the framework and its drivers, while debugging. That's getting to be a standard idiom, and it's pretty useful. Signed-off-by: David Brownell Cc: Alessandro Zummo Acked-by: Oleg Verych Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0847062ad57e6d2d77875104d66f413a89769809 Author: Randy Dunlap Date: Sat Sep 30 23:28:13 2006 -0700 [PATCH] fix EMBEDDED + SYSCTL menu SYSCTL should still depend on EMBEDDED. This unbreaks the EMBEDDED menu (from the recent SYSCTL_SYCALL menu option patch). Fix typos in new SYSCTL_SYSCALL menu. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1713e903c680de4934837689abecc5df02f463ac Author: Jean-Baptiste Maneyrol Date: Sat Sep 30 23:28:12 2006 -0700 [PATCH] rtc driver rtc-pcf8563 century bit inversed The century bit PCF8563_MO_C in the month register is misinterpreted. It is set to 1 for the 20th century and 0 for 21th, and the driver is expecting the opposite behavior. Acked-by: Alessandro Zummo Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 365e02237b164701897244aab7412b21c5e622af Author: Jiri Slaby Date: Sat Sep 30 23:28:11 2006 -0700 [PATCH] Char: specialix, kill unneeded page alloc The driver is allocating a page but doesn't actually use it for anything. (History from the old ->write method before Linus cleaned it up) Signed-off-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e9a4738c9fadb7cbdcabc1e3b415159f3741ed9 Author: Peter Zijlstra Date: Sat Sep 30 23:28:10 2006 -0700 [PATCH] completions: lockdep annotate on stack completions All on stack DECLARE_COMPLETIONs should be replaced by: DECLARE_COMPLETION_ONSTACK Signed-off-by: Peter Zijlstra Acked-by: Ingo Molnar Acked-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 397d6140e93156ecb9cafcd9be0db10ff3c12ab3 Author: Eric Sesterhenn Date: Sat Sep 30 23:28:09 2006 -0700 [PATCH] Remove unnecessary check in drivers/rtc/rtc-v3020.c Looks like the probe function always gets a valid pdev, and checking it after dereferencing it is pretty useless. This patch removes the check (cid #1365) Signed-off-by: Eric Sesterhenn Cc: Alessandro Zummo Cc: Raphael Assenat Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a2711116073db258224afd2cc0f478bdf305575 Author: Rolf Eike Beer Date: Sat Sep 30 23:28:09 2006 -0700 [PATCH] Remove BUG_ON(unlikely) in include/linux/aio.h BUG_ON() does this unlikely check itself, as bugs in Linux are unlikely anyway :) Signed-off-by: Rolf Eike Beer Acked-by: Zach Brown Acked-by: Benjamin LaHaise Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9ba0bdfd040b2893bcddfec7165b545d22fc2dc7 Author: Jan Altenberg Date: Sat Sep 30 23:28:08 2006 -0700 [PATCH] typo fixes for rt-mutex-design.txt Address some simple typos in rt-mutex-design.txt It also changes the indentation of the cmpxchg example (the cmpxchg example was indented by spaces, while all other code snippets were indented by tabs). Acked-by: Steven Rostedt Signed-off-by: Jan Altenberg Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 710b8b5f4341e72a5f5f6fa58d1f73a0db64bf93 Author: Soos Peter Date: Sat Sep 30 23:28:06 2006 -0700 [PATCH] hdaps: support Lenovo ThinkPad T60 Support hdaps on Lenovo ThinkPad T60. It was tested with pivot utility from http://www.kernel.org/pub/linux/kernel/people/rml/hdaps and it seems to be OK. Cc: Jean Delvare Cc: Greg Kroah-Hartman Cc: Robert Love Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 095d030cff0eafd29ee31e022d374874146a5b4c Author: Eric Sesterhenn Date: Sat Sep 30 23:28:05 2006 -0700 [PATCH] Off-by-one in drivers/char/mwave/mwavedd.c This fixes two off by ones in the mwave driver, found via find -iname \*.[ch] | xargs grep "> ARRAY_SIZE(" Signed-off-by: Eric Sesterhenn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1cfee2b3c21d71a8c20884dbb77ed343558db87f Author: Alan Cox Date: Sat Sep 30 23:28:03 2006 -0700 [PATCH] trident: fix pci_dev reference counting and buglet Switch trident to use pci_get/put_dev properly. Also fix a bug where the driver erroneously passed pdev not NULL to a second search. This happened to always work except with pci=reverse because of chip ordering. Signed-off-by: Alan Cox Signed-off-by: Muli Ben-Yehuda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b2e9c7d07fcc8966d6aa50a77afa66c9919bd5a8 Author: Peter Zijlstra Date: Sat Sep 30 23:28:02 2006 -0700 [PATCH] sysrq: disable lockdep on reboot SysRq : Emergency Sync Emergency Sync complete SysRq : Emergency Remount R/O Emergency Remount complete SysRq : Resetting BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted) Call Trace: [] show_trace+0xae/0x319 [] dump_stack+0x15/0x17 [] trace_hardirqs_on+0xbc/0x13d [] sysrq_handle_reboot+0x9/0x11 [] __handle_sysrq+0x99/0x130 [] handle_sysrq+0x17/0x19 [] kbd_event+0x32e/0x57d [] input_event+0x42d/0x45b [] atkbd_interrupt+0x44d/0x53d [] serio_interrupt+0x49/0x86 [] i8042_interrupt+0x202/0x21a [] handle_IRQ_event+0x2c/0x64 [] __do_IRQ+0xaf/0x114 [] do_IRQ+0xf8/0x107 [] ret_from_intr+0x0/0xf DWARF2 unwinder stuck at ret_from_intr+0x0/0xf Leftover inexact backtrace: [] mwait_idle+0x3f/0x54 [] cpu_idle+0xa2/0xc5 [] rest_init+0x2b/0x2d [] start_kernel+0x24a/0x24c [] _sinittext+0x28b/0x292 Since we're shutting down anyway, don't bother being smart, just turn the thing off. Signed-off-by: Peter Zijlstra Acked-by: Ingo Molnar Cc: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74ae3221818eaf3884ceac931ba3cd2c00045483 Author: Alan Cox Date: Sat Sep 30 23:28:00 2006 -0700 [PATCH] cardbus: switch to ref counting/hotplug safe API Signed-off-by: Alan Cox Cc: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit df10f4edd5f097251c62f1d4a3adea778100b4a8 Author: Alan Cox Date: Sat Sep 30 23:27:59 2006 -0700 [PATCH] i2o: Switch to pci_get API Use the safe ref-counted API for the bridge check Signed-off-by: Alan Cox Cc: Markus Lidel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1aff0ecafb5e94515dc37849fd32a810554f34f4 Author: Alan Cox Date: Sat Sep 30 23:27:59 2006 -0700 [PATCH] ip2: use newer pci_get functions This is one of a series of patches I plan to gradually trickle into the tree which eliminates almost all remaining use of pci_find_* and lets me build a pci_find_* free kernel for all but some obscure ISDN and SCSI drivers. This is important as all pci_find_* users are not hotplug safe - even if they are not the device being plugged. Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30cbc22217bb3d5d4c74c88127fbf595460bdb76 Author: Olaf Hering Date: Sat Sep 30 23:27:57 2006 -0700 [PATCH] update legacy io handling for pmac ppc can boot one single binary on prep, chrp and pmac boards. ppc64 can boot one single binary on pseries and G5 boards. pmac has no legacy io, probing for PC style legacy hardware (or accessing the legacy io area regulary) may lead to a hard crash: * add check for parport_pc, exit on pmac. 32bit chrp has no ->check_legacy_ioport, the probe is always called. 64bit chrp has check_legacy_ioport, check for a "parallel" node * add check for isapnp, only PReP boards may have real ISA slots. 32bit PReP will have no ->check_legacy_ioport, the probe is always called. * update code in i8042_platform_init. Run ->check_legacy_ioport first, always call request_region. No functional change. Remove whitespace before i8042_reset init. Signed-off-by: Olaf Hering Acked-by: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Adam Belay Cc: Dmitry Torokhov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c69c31270c35a6b8421a8e4ba81de1247ac6df95 Author: Corey Minyard Date: Sat Sep 30 23:27:56 2006 -0700 [PATCH] IPMI: per-channel command registration This patch adds the ability to register for a command per-channel in the IPMI driver. If your BMC supports multiple channels, incoming messages can be useful to have the ability to register to receive commands on a specific channel instead the current behaviour of all channels. Signed-off-by: David Barksdale Signed-off-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 54f67f631dfc25ca7a8b19200e34013abc974337 Author: Petr Vandrovec Date: Sat Sep 30 23:27:55 2006 -0700 [PATCH] Move ncpfs 32bit compat ioctl to ncpfs The ncp specific compat ioctls are clearly local to one file system, so the code can better live there. This version of the patch moves everything into the generic ioctl handler and uses it for both 32 and 64 bit calls. Signed-off-by: Arnd Bergmann Signed-off-by: Petr Vandrovec Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89bbc03c01f68e627a2b120963f136e2815f0d84 Author: Thomas Petazzoni Date: Sat Sep 30 23:27:54 2006 -0700 [PATCH] Prevent multiple inclusion of linux/sysrq.h Prevent multiple inclusions of include/linux/sysrq.h using traditional #ifndef..#endif. Signed-off-by: Thomas Petazzoni Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 643f720cea989d2913fc0120a2384fecc1be1f9a Author: Pierre Ossman Date: Sat Sep 30 23:27:52 2006 -0700 [PATCH] mmc (mainly): add "or later" clause to licence statement. Clarify my (Pierre's) position on which GPL versions apply. The patch only touches the source files where I am the only major author. The people who have made the minor commits to the files have been contacted and have no issues with this change. Signed-off-by: Pierre Ossman Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb48388337182013bce811b9c336e8e64b0c858b Author: Olaf Hering Date: Sat Sep 30 23:27:51 2006 -0700 [PATCH] remove SYSRQ_KEY and related defines from ppc/sh/h8300 Remove unused global SYSRQ_KEY from ppc and powerpc Remove unused define SYSRQ_KEY from sh/sh64 and h8300 Remove unused pckbd_sysrq_xlate and kbd_sysrq_xlate usage Signed-off-by: Olaf Hering Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e4e040887b8f136d00e253dcf584667d8cd560a6 Author: Jiri Slaby Date: Sat Sep 30 23:27:50 2006 -0700 [PATCH] isicom: correct firmware loading - loading of firmware didn't fail when something went wrong (returned 0). - pointer to frame was incremented only by sizeof(frame) excluding its data contents -- bad idea. - tell the card we're ready just after checking is complete, not before. Signed-off-by: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f27100872b21e4cc70d07b96eeb3611b30bce63 Author: Diego Calleja Date: Sat Sep 30 23:27:49 2006 -0700 [PATCH] HOWTO: mention bughunting Signed-off-by: Diego Calleja Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 328a338f6f9943a0a77292315a25628b22f79fed Author: Rolf Eike Beer Date: Sat Sep 30 23:27:48 2006 -0700 [PATCH] rtc: remove superfluous call to call to cdev_del() If cdev_add() fails there is no good reason to call cdev_del(). Signed-off-by: Rolf Eike Beer Cc: Alessandro Zummo Cc: Dmitry Torokhov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cc088d10d02978641c7a2eecd18caf1e01e597b3 Author: Metathronius Galabant Date: Sat Sep 30 23:27:47 2006 -0700 [PATCH] cciss: remove unneeded spaces in output for attached volumes It removes the awkwards spaces after the "=" when displaying the geometry of the attached volumes. Before: cciss: using DAC cycles blocks= 286734240 block_size= 512 heads= 255, sectors= 32, cylinders= 35139 After: cciss: using DAC cycles blocks=286734240 block_size=512 heads=255, sectors=32, cylinders=35139 Signed-off-by: Metathronius Galabant Acked-by: Mike Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a077c1a075473910928676ed95acb393259d9310 Author: Paul Fulghum Date: Sat Sep 30 23:27:46 2006 -0700 [PATCH] synclink_gt: increase max devices Increase maximum number of devices. Signed-off-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb10dc9ac7eea2c891df6b79b9ef1fbe59cb5429 Author: Paul Fulghum Date: Sat Sep 30 23:27:45 2006 -0700 [PATCH] synclink_gt: add bisync and monosync modes Add bisync and monosync serial protocol support to the synclink_gt driver. Signed-off-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c1fcfe229e99752c74efb945a4a3f560be04204 Author: Martin Schwidefsky Date: Sat Sep 30 23:27:45 2006 -0700 [PATCH] Directed yield: direct yield of spinlocks for s390. Use the new diagnose 0x9c in the spinlock implementation for s390. It yields the remaining timeslice of the virtual cpu that tries to acquire a lock to the virtual cpu that is the current holder of the lock. Signed-off-by: Martin Schwidefsky Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cdc39363d33506b0e067d41fc91f89d186bdf7f7 Author: Martin Schwidefsky Date: Sat Sep 30 23:27:44 2006 -0700 [PATCH] Directed yield: direct yield of spinlocks for powerpc Powerpc already has a directed yield for CONFIG_PREEMPT="n". To make it work with CONFIG_PREEMPT="y" as well the _raw_{spin,read,write}_relax primitives need to be defined to call __spin_yield() for spinlocks and __rw_yield() for rw-locks. Acked-by: Paul Mackerras Signed-off-by: Martin Schwidefsky Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef6edc9746dc2bfdacf44eefd5f881179971c478 Author: Martin Schwidefsky Date: Sat Sep 30 23:27:43 2006 -0700 [PATCH] Directed yield: cpu_relax variants for spinlocks and rw-locks On systems running with virtual cpus there is optimization potential in regard to spinlocks and rw-locks. If the virtual cpu that has taken a lock is known to a cpu that wants to acquire the same lock it is beneficial to yield the timeslice of the virtual cpu in favour of the cpu that has the lock (directed yield). With CONFIG_PREEMPT="n" this can be implemented by the architecture without common code changes. Powerpc already does this. With CONFIG_PREEMPT="y" the lock loops are coded with _raw_spin_trylock, _raw_read_trylock and _raw_write_trylock in kernel/spinlock.c. If the lock could not be taken cpu_relax is called. A directed yield is not possible because cpu_relax doesn't know anything about the lock. To be able to yield the lock in favour of the current lock holder variants of cpu_relax for spinlocks and rw-locks are needed. The new _raw_spin_relax, _raw_read_relax and _raw_write_relax primitives differ from cpu_relax insofar that they have an argument: a pointer to the lock structure. Signed-off-by: Martin Schwidefsky Cc: Ingo Molnar Cc: Paul Mackerras Cc: Haavard Skinnemoen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e3e5fc91d9828a9b94a3992de47d47d2d2e34ec6 Author: Paul Collins Date: Sat Sep 30 23:27:41 2006 -0700 [PATCH] leds: turn LED off when changing triggers I was playing with LED triggers when I noticed that changing from heartbeat (or ide-disk) to "none" at the right moment would leave the LED stuck on. This is easy to reproduce by doing "find / >/dev/null" with the ide-disk trigger enabled and then switching to "none". Here is a patch that fixes the problem by explicitly turning the LED off after removing the existing trigger. Signed-off-by: Paul Collins Acked-by: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fd7bcea35e7efb108c34ee2b3840942a3749cadb Author: Jim Cromie Date: Sat Sep 30 23:27:40 2006 -0700 [PATCH] Doc/lockdep-design: explain display of {state-bits} Signed-off-by: Jim Cromie Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce584f913870bbad8779a1130d4be48698560bf0 Author: Andrew Morton Date: Sat Sep 30 23:27:39 2006 -0700 [PATCH] submit checklist: mention headers_check Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c53421b18f205c5f97c604ae55c6a921f034b0f6 Author: Alexey Dobriyan Date: Sat Sep 30 23:27:37 2006 -0700 [PATCH] proper flags type of spin_lock_irqsave() Convert various spin_lock_irqsave() callers to correctly use `unsigned long'. Signed-off-by: Alexey Dobriyan Cc: Miles Bader Cc: "Luck, Tony" Acked-by: Kyle McMartin Cc: Jean Delvare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5579f8c7d7e2c9eb62b566c511b21091a778157 Author: Josef 'Jeff' Sipek Date: Sat Sep 30 23:27:35 2006 -0700 [PATCH] VFS: Use SEEK_{SET, CUR, END} instead of hardcoded values VFS: Use SEEK_{SET,CUR,END} instead of hardcoded values Signed-off-by: Josef 'Jeff' Sipek Acked-by: Trond Myklebust Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4636d93b461779cd95156cc5f5d53690a5d6a07b Author: Josef 'Jeff' Sipek Date: Sat Sep 30 23:27:34 2006 -0700 [PATCH] EICON ISDN: Removed unused definitions for OS_SEEK_* EICON ISDN: Removed unused definitions for OS_SEEK_* Signed-off-by: Josef 'Jeff' Sipek Cc: Karsten Keil Acked-by: Armin Schindler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 930ff81c595e7923575cd7c0b8d7284ac1b3815e Author: Josef 'Jeff' Sipek Date: Sat Sep 30 23:27:33 2006 -0700 [PATCH] MBCS: Use SEEK_{SET, CUR, END} instead of hardcoded values MBCS: Use SEEK_{SET,CUR,END} instead of hardcoded values Signed-off-by: Josef 'Jeff' Sipek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit edceeaf50be1764db4aa7c1b19e540067a051e77 Author: Alan Cox Date: Sat Sep 30 23:27:32 2006 -0700 [PATCH] via* : switch to pci_get_device refcounted PCI API If we can clean up these remainders we can finally delete pci_find_* Signed-off-by: Alan Cox Cc: Greg KH Acked-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 40cddf2cbd02aa830254afcd5a1a21b4e882a189 Author: Alan Cox Date: Sat Sep 30 23:27:30 2006 -0700 [PATCH] sis5513: Switch to pci refcounting Mirrors the drivers/ata version, hold a reference to the host bridge while we are doing setup. Signed-off-by: Alan Cox Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 970a61363be4a6633de0fbbe6fe3a249238c4acc Author: Alan Cox Date: Sat Sep 30 23:27:29 2006 -0700 [PATCH] serverworks: Switch to pci refcounted interfaces As we don't support hotplug we end up leaking an isa_dev reference which if unload was ever added we would drop at the end of unloading. This is fine because we do genuinely need the isa_dev pointer until unload. Signed-off-by: Alan Cox Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1424e5044882f92b8c51540033b229723e1f2651 Author: Alan Cox Date: Sat Sep 30 23:27:28 2006 -0700 [PATCH] piix: Use refcounted interface when searching for a 450NX Simple conversion Signed-off-by: Alan Cox Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a78b464a283e55feb286647d9662f5cb8f235500 Author: Alan Cox Date: Sat Sep 30 23:27:27 2006 -0700 [PATCH] cs46xx OSS: switch to pci_get_device Fairly trivial change in this case Signed-off-by: Alan Cox Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 14fef6414be49d59f4784eeef8d9c3f468993205 Author: Alan Cox Date: Sat Sep 30 23:27:26 2006 -0700 [PATCH] via82cxxx_audio: Use pci_get_device pci_find_device is not refcounting and should be getting killed off. Signed-off-by: Alan Cox Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f2443ab6c485701576e9116ee44817e66adafd5a Author: Ross Biro Date: Sat Sep 30 23:27:25 2006 -0700 [PATCH] allow /proc/config.gz to be built as a module The driver for /proc/config.gz consumes rather a lot of memory and it is in fact possible to build it as a module. In some ways this is a bit risky, because the .config which is used for compiling kernel/configs.c isn't necessarily the same as the .config which was used to build vmlinux. But OTOH the potential memory savings are decent, and it'd be fairly dumb to build your configs.o with a different .config. Signed-off-by: Andrew Morton Cc: "Randy.Dunlap" Cc: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 756184b7d771992f4fb1998d62aebcaf3e028076 Author: Cal Peake Date: Sat Sep 30 23:27:24 2006 -0700 [PATCH] CodingStyle cleanup for kernel/sys.c Fix up kernel/sys.c to be consistent with CodingStyle and the rest of the file. Signed-off-by: Cal Peake Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c7bce3097c0f9bbed76ee6fd03742f2624031a45 Author: Alan Cox Date: Sat Sep 30 23:27:24 2006 -0700 [PATCH] serial: Fix up offenders peering at baud bits directly Stop some other people peering into the baud bits on their own and make them use the tty_get_baud_rate() helper as a preperation for the move to the new termios. Corrected dependancy previous one had on new termios structs Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 00988a3514bbc0cce781c067cf52559741d88b80 Author: Mike Miller (OS Dev) Date: Sat Sep 30 23:27:23 2006 -0700 [PATCH] cciss: support for >2TB logical volumes Add support for logical volumes >2TB. All SAS/SATA controllers support large volumes. Signed-off-by: Mike Miller Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 82b0547cfae1fb2ee26cad588f6d49a347d24740 Author: Alexey Dobriyan Date: Sat Sep 30 23:27:22 2006 -0700 [PATCH] Create fs/utimes.c * fs/open.c is getting bit crowdy * preparation to lutimes(2) Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 52978be636374c4bfb61220b37fa12f55a071c46 Author: Alexey Dobriyan Date: Sat Sep 30 23:27:21 2006 -0700 [PATCH] kmemdup: some users Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a2f67b459bb7846d4a15924face63eb2683acc2 Author: Alexey Dobriyan Date: Sat Sep 30 23:27:20 2006 -0700 [PATCH] kmemdup: introduce One of idiomatic ways to duplicate a region of memory is dst = kmalloc(len, GFP_KERNEL); if (!dst) return -ENOMEM; memcpy(dst, src, len); which is neat code except a programmer needs to write size twice. Which sometimes leads to mistakes. If len passed to kmalloc is smaller that len passed to memcpy, it's straight overwrite-beyond-end. If len passed to memcpy is smaller than len passed to kmalloc, it's either a) legit behaviour ;-), or b) cloned buffer will contain garbage in second half. Slight trolling of commit lists shows several duplications bugs done exactly because of diverged lenghts: Linux: [CRYPTO]: Fix memcpy/memset args. [PATCH] memcpy/memset fixes OpenBSD: kerberosV/src/lib/asn1: der_copy.c:1.4 If programmer is given only one place to play with lengths, I believe, such mistakes could be avoided. With kmemdup, the snippet above will be rewritten as: dst = kmemdup(src, len, GFP_KERNEL); if (!dst) return -ENOMEM; This also leads to smaller code (kzalloc effect). Quick grep shows 200+ places where kmemdup() can be used. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9442e691e4aec85eba43ac60a3e77c77fd2e73a4 Author: Takashi Iwai Date: Sat Sep 30 23:27:19 2006 -0700 [PATCH] maximum latency tracking: ALSA support Add maximum latency tracking to the ALSA subsystem for PCM playback. In ALSA, the playback application controls the buffer size and thus indirectly the period of latency that it can deal with. This patch uses 75% of the total available latency as threshold to announce to the latency subsystem; While 75% is a crude heuristic it's a quite reasonable one; the remaining 25% can be used for all driver processing for the next samples which is also proportional to the size of the buffer. With ogg123 a latency setting of about 4msec was seen (at 44Khz), while with the "play" command a much longer maximum tolerable latency was seen. Other, more multimedia oriented players as well as games, will have a lot smaller buffers to allow better synchronization and those will actually get into the latency domains where there is impact on the power management rules. Signed-off-by: Takashi Iwai Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c87579e65ee4f419b2369407f82326d38b5d2d8 Author: Arjan van de Ven Date: Sat Sep 30 23:27:17 2006 -0700 [PATCH] maximum latency tracking infrastructure Add infrastructure to track "maximum allowable latency" for power saving policies. The reason for adding this infrastructure is that power management in the idle loop needs to make a tradeoff between latency and power savings (deeper power save modes have a longer latency to running code again). The code that today makes this tradeoff just does a rather simple algorithm; however this is not good enough: There are devices and use cases where a lower latency is required than that the higher power saving states provide. An example would be audio playback, but another example is the ipw2100 wireless driver that right now has a very direct and ugly acpi hook to disable some higher power states randomly when it gets certain types of error. The proposed solution is to have an interface where drivers can * announce the maximum latency (in microseconds) that they can deal with * modify this latency * give up their constraint and a function where the code that decides on power saving strategy can query the current global desired maximum. This patch has a user of each side: on the consumer side, ACPI is patched to use this, on the producer side the ipw2100 driver is patched. A generic maximum latency is also registered of 2 timer ticks (more and you lose accurate time tracking after all). While the existing users of the patch are x86 specific, the infrastructure is not. I'd like to ask the arch maintainers of other architectures if the infrastructure is generic enough for their use (assuming the architecture has such a tradeoff as concept at all), and the sound/multimedia driver owners to look at the driver facing API to see if this is something they can use. [akpm@osdl.org: cleanups] Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Acked-by: Jesse Barnes Cc: "Brown, Len" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 130c6b98984a058068ea595c465fba2beb48b9ef Author: Richard Knutsson Date: Sat Sep 30 23:27:15 2006 -0700 [PATCH] fs/partitions: Conversion to generic boolean Conversion of booleans to: generic-boolean.patch (2006-08-23) Signed-off-by: Richard Knutsson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4d81715fc5dfa1680ad47d7edf3ac4a74c5bf104 Author: Richard Knutsson Date: Sat Sep 30 23:27:14 2006 -0700 [PATCH] fs/jfs: Conversion to generic boolean Conversion of booleans to: generic-boolean.patch (2006-08-23) Signed-off-by: Richard Knutsson Cc: Dave Kleikamp Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c49c31115067bc7c9a51ffdc735a515151dfa3eb Author: Richard Knutsson Date: Sat Sep 30 23:27:12 2006 -0700 [PATCH] fs/ntfs: Conversion to generic boolean Conversion of booleans to: generic-boolean.patch (2006-08-23) Signed-off-by: Richard Knutsson Signed-off-by: Anton Altaparmakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e21828743247270d09a86756a0c11702500dbfb Author: Richard Knutsson Date: Sat Sep 30 23:27:11 2006 -0700 [PATCH] Generic boolean This patch defines: * a generic boolean-type, named 'bool' * aliases to 0 and 1, named 'false' and 'true' Removing colliding definitions of 'bool', 'false' and 'true'. Signed-off-by: Richard Knutsson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be5b7a8987f23281b146f22b13e2079f448c69c7 Author: Andrew Morton Date: Sat Sep 30 23:27:10 2006 -0700 [PATCH] arch/i386/pci/mmconfig.c tweaks - Add soothing comment - uninline thrice-called function Cc: OGAWA Hirofumi Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 45e0b78b0532f92c01e363dd4287617c5be4574f Author: Keith Mannthey Date: Sat Sep 30 23:27:09 2006 -0700 [PATCH] hot-add-mem x86_64: use CONFIG_MEMORY_HOTPLUG_RESERVE The api for hot-add memory already has a construct for finding nodes based on an address, memory_add_physaddr_to_nid. This patch allows the fucntion to do something besides return 0. It uses the nodes_add infomation to lookup to node info for a hot add event. Signed-off-by: Keith Mannthey Cc: KAMEZAWA Hiroyuki Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53947027ad90542ddb2bb746e3175827c270610a Author: Keith Mannthey Date: Sat Sep 30 23:27:08 2006 -0700 [PATCH] hot-add-mem x86_64: use CONFIG_MEMORY_HOTPLUG_SPARSE Migate CONFIG_MEMORY_HOTPLUG to CONFIG_MEMORY_HOTPLUG_SPARSE where needed. Signed-off-by: Keith Mannthey Cc: KAMEZAWA Hiroyuki Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8c2676a5870ab15cbeea9f826266bc946fe3cc26 Author: Keith Mannthey Date: Sat Sep 30 23:27:07 2006 -0700 [PATCH] hot-add-mem x86_64: memory_add_physaddr_to_nid node fixup In cases where the acpi memory-add event does not containe the pxm (node) infomation allow the driver to look up node info based on the address. The acpi_get_node call returns -1 if it can't decode the pxm info, this causes add_memory to panic. acpi_get_node would have to decode the resource from the handle (a lenghty proposition). This seems to be the cleanist point to interject the hook. [kamezawa.hiroyu@jp.fujitsu.com: build fixes] [y-goto@jp.fujitsu.com: build fixes] Signed-off-by: Keith Mannthey Cc: KAMEZAWA Hiroyuki Cc: Andi Kleen Signed-off-by: KAMEZAWA Hiroyuki Signed-off-by: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4942e998b40b8f6080930ec16442444e9930aee5 Author: Keith Mannthey Date: Sat Sep 30 23:27:06 2006 -0700 [PATCH] hot-add-mem x86_64: memory_add_physaddr_to_nid enable The api for hot-add memory already has a construct for finding nodes based on an address, memory_add_physaddr_to_nid. This patch allows the fucntion to do something besides return 0. It uses the nodes_add infomation to lookup to node info for a hot add event. Signed-off-by: Keith Mannthey Cc: KAMEZAWA Hiroyuki Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 71efa8fdc55e70ec6687c897a30759f0a2c2ad7e Author: Keith Mannthey Date: Sat Sep 30 23:27:05 2006 -0700 [PATCH] hot-add-mem x86_64: Enable SPARSEMEM in srat.c Enable x86_64 srat.c to share code between both reserve and sparsemem based add memory paths. Both paths need the hot-add area node locality infomration (nodes_add). This code refactors the code path to allow this. Signed-off-by: Keith Mannthey Cc: KAMEZAWA Hiroyuki Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ec69acbb1191df671ff8e07c8e146619a5c53f70 Author: Keith Mannthey Date: Sat Sep 30 23:27:05 2006 -0700 [PATCH] hot-add-mem x86_64: Kconfig changes Create Kconfig namespace for MEMORY_HOTPLUG_RESERVE and MEMORY_HOTPLUG_SPARSE. This is needed to create a disticiton between the 2 paths. Selecting the high level opiton of MEMORY_HOTPLUG will get you MEMORY_HOTPLUG_SPARSE if you have sparsemem enabled or MEMORY_HOTPLUG_RESERVE if you are x86_64 with discontig and ACPI numa support. Signed-off-by: Keith Mannthey Cc: KAMEZAWA Hiroyuki Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f28c5edc06ecd8068b38b7662ad19f4d20d741af Author: Keith Mannthey Date: Sat Sep 30 23:27:04 2006 -0700 [PATCH] hot-add-mem x86_64: fixup externs Fix up externs in memory_hotplug.c. Cleanup. Signed-off-by: Keith Mannthey Cc: KAMEZAWA Hiroyuki Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 236561e5df009f79f1939e3ca269b9b6f18092f5 Author: Alan Cox Date: Sat Sep 30 23:27:03 2006 -0700 [PATCH] PCI quirks update This fixes two things Firstly someone mistakenly used "errata" for the singular. This causes Dave Woodhouse to emit diagnostics whenever the string is read, and so should be fixed. Secondly the AMD AGP tunnel has an erratum which causes hangs if you try and do direct PCI to AGP transfers in some cases. We have a flag for PCI/PCI failures but we need a different flag for this really as in this case we don't want to stop PCI/PCI transfers using things like IOAT and the new RAID offload work. I'll post some updates to make proper use of the PCIAGP flag in the media/video drivers to Mauro. Signed-off-by: Alan Cox Cc: David Woodhouse Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3fcd03e07008ec0f667dfb7626171165699ea5c2 Author: Gavin Lambert Date: Sat Sep 30 23:27:01 2006 -0700 [PATCH] NOMMU: don't try and give NULL to fput() Don't try and give NULL to fput() in the error handling in do_mmap_pgoff() as it'll cause an oops. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab8e92efcf3f7972f30033cad75f180aef4f3abc Author: Andrew Morton Date: Sat Sep 30 23:26:59 2006 -0700 [PATCH] list_del-debug fix These two BUG_ON()s are redundant and undesired: we're checking for this condition further on in the function, only better. Cc: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bfeeb0f57940b143a55dcc7ee88e8842108d9145 Author: Dave Jones Date: Sat Sep 30 23:19:38 2006 -0400 [CPUFREQ] Make acpi-cpufreq unsticky again. This caused suspend/resume regressions. Signed-off-by: Dave Jones commit 1bdfd554be94def718323659173517c5d4a69d25 Author: Jeff Garzik Date: Sat Sep 30 21:28:22 2006 -0400 [PATCH] SCSI: fix request flag-related build breakage The ->flags in struct request was split into two variables, in a recent changeset. The merge of this change forgot to update SCSI's libsas, probably because libsas was a very recent merge. Signed-off-by: Jeff Garzik Signed-off-by: Linus Torvalds commit cb5d9e0948122dd8b808550574d95bd60674ba3b Author: Andrew Morton Date: Sat Sep 30 21:23:44 2006 -0400 [PATCH] scsi: device_reprobe() can fail device_reprobe() should return an error code. When it does so, scsi_device_reprobe() should propagate it back. Acked-by: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: James Bottomley Signed-off-by: Linus Torvalds commit 51d7513a8a54e4210d358ff1dbd34daab99a6638 Author: Jens Axboe Date: Sat Sep 30 21:14:05 2006 +0200 [PATCH] Only enable CONFIG_BLOCK option for embedded It's too easy for people to shoot themselves in the foot, and it only makes sense for embedded folks anyway. Signed-off-by: Jens Axboe commit 059af497c23492cb1ddcbba11c09dad385960bc0 Author: Jens Axboe Date: Thu Sep 21 20:37:22 2006 +0200 [PATCH] blk_queue_start_tag() shared map race fix If we share the tag map between two or more queues, then we cannot use __set_bit() to set the bit. In fact we need to make sure we atomically acquire this tag, so loop using test_and_set_bit() to protect from that. Noticed by Mike Christie Signed-off-by: Jens Axboe commit 0fe23479577124bd2687e6783e39fa0fa4c28005 Author: Jens Axboe Date: Mon Sep 4 15:41:16 2006 +0200 [PATCH] Update axboe@suse.de email address As people often look for the copyright in files to see who to mail, update the link to a neutral one. Signed-off-by: Jens Axboe commit 50be345560f1ffdcb15cc0e146416b80529a2ef2 Author: Milan Broz Date: Mon Sep 4 15:37:57 2006 +0200 [PATCH] fix creating zero sized bio mempools in low memory system In the very low memory systems is in the init_bio call scale parameter set to zero and it leads to creating zero sized mempool. This patch prevents pool_entries parameter become zero, so the created pool have at least 1 entry. Mempool with 0 entries lead to incorrect behaviour of mempool_free. (Alloc requests are not waken up and system stalls in mempool_alloc->ioschedule). Signed-off-by: Milan Broz Signed-off-by: Jens Axboe commit bcfd8d36151e531e1c6c731f1fbf792509a1c494 Author: Andrew Morton Date: Thu Aug 31 12:56:06 2006 +0200 [PATCH] CONFIG_BLOCK: blk_congestion_wait() fix Don't just do nothing: it'll cause busywaits all over writeback and page reclaim. For now, take a fixed-length nap. Will improve when NFS starts waking up throttled processes. Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit 5e6d12b2c8be2cac099df6dcb8b26884f24d2621 Author: Andrew Morton Date: Thu Aug 31 12:55:23 2006 +0200 [PATCH] CONFIG_BLOCK internal.h cleanups - forward declare struct superblock - use inlines, not macros Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit 65934a9a028b88e83e2b0f8b36618fe503349f8e Author: David Howells Date: Tue Aug 29 19:06:31 2006 +0100 [PATCH] BLOCK: Make USB storage depend on SCSI rather than selecting it [try #6] This makes CONFIG_USB_STORAGE depend on CONFIG_SCSI rather than selecting it, as selecting it makes CONFIG_USB_STORAGE override the dependencies of SCSI, causing it to turn on even if they aren't all met. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 9361401eb7619c033e2394e4f9f6d410d6719ac7 Author: David Howells Date: Sat Sep 30 20:45:40 2006 +0200 [PATCH] BLOCK: Make it possible to disable the block layer [try #6] Make it possible to disable the block layer. Not all embedded devices require it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require the block layer to be present. This patch does the following: (*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev support. (*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls an item that uses the block layer. This includes: (*) Block I/O tracing. (*) Disk partition code. (*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS. (*) The SCSI layer. As far as I can tell, even SCSI chardevs use the block layer to do scheduling. Some drivers that use SCSI facilities - such as USB storage - end up disabled indirectly from this. (*) Various block-based device drivers, such as IDE and the old CDROM drivers. (*) MTD blockdev handling and FTL. (*) JFFS - which uses set_bdev_super(), something it could avoid doing by taking a leaf out of JFFS2's book. (*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and linux/elevator.h contingent on CONFIG_BLOCK being set. sector_div() is, however, still used in places, and so is still available. (*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and parts of linux/fs.h. (*) Makes a number of files in fs/ contingent on CONFIG_BLOCK. (*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK. (*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK is not enabled. (*) fs/no-block.c is created to hold out-of-line stubs and things that are required when CONFIG_BLOCK is not set: (*) Default blockdev file operations (to give error ENODEV on opening). (*) Makes some /proc changes: (*) /proc/devices does not list any blockdevs. (*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK. (*) Makes some compat ioctl handling contingent on CONFIG_BLOCK. (*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if given command other than Q_SYNC or if a special device is specified. (*) In init/do_mounts.c, no reference is made to the blockdev routines if CONFIG_BLOCK is not defined. This does not prohibit NFS roots or JFFS2. (*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return error ENOSYS by way of cond_syscall if so). (*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if CONFIG_BLOCK is not set, since they can't then happen. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit d366e40a1cabd453be6e2609caa7e12f9ca17b1f Author: David Howells Date: Tue Aug 29 19:06:29 2006 +0100 [PATCH] BLOCK: Remove no-longer necessary linux/buffer_head.h inclusions [try #6] Remove inclusions of linux/buffer_head.h that are no longer necessary due to the transfer of a number of things out of there. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 4cb50dc2eaeddb0bc20bc4cd108c4fec99f5045a Author: David Howells Date: Tue Aug 29 19:06:27 2006 +0100 [PATCH] BLOCK: Remove no-longer necessary linux/mpage.h inclusions [try #6] Remove inclusions of linux/mpage.h that are no longer necessary due to the transfer of generic_writepages(). Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 188f83dfe0eeecd1427d0d255cc97dbf7ef6b4b7 Author: David Howells Date: Thu Aug 31 12:50:04 2006 +0200 [PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos driver [try #6] Move the msdos device ioctl compat stuff from fs/compat_ioctl.c to the msdos driver so that the msdos header file doesn't need to be included. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 52a700c5675f399c07e6e57328291e57f13ef3bb Author: David Howells Date: Tue Aug 29 19:06:23 2006 +0100 [PATCH] BLOCK: Move the Ext3 device ioctl compat stuff to the Ext3 driver [try #6] Move the Ext3 device ioctl compat stuff from fs/compat_ioctl.c to the Ext3 driver so that the Ext3 header file doesn't need to be included. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit e322ff07fb2d0f05c02d85e7c6b30d23f308c20f Author: David Howells Date: Tue Aug 29 19:06:20 2006 +0100 [PATCH] BLOCK: Move the Ext2 device ioctl compat stuff to the Ext2 driver [try #6] Move the Ext2 device ioctl compat stuff from fs/compat_ioctl.c to the Ext2 driver so that the Ext2 header file doesn't need to be included. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 52b499c438ff60991eb3855ca090782569b3e8cf Author: David Howells Date: Tue Aug 29 19:06:18 2006 +0100 [PATCH] BLOCK: Move the ReiserFS device ioctl compat stuff to the ReiserFS driver [try #6] Move the ReiserFS device ioctl compat stuff from fs/compat_ioctl.c to the ReiserFS driver so that the ReiserFS header file doesn't need to be included. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 36695673b012096228ebdc1b39a6a5850daa474e Author: David Howells Date: Tue Aug 29 19:06:16 2006 +0100 [PATCH] BLOCK: Move common FS-specific ioctls to linux/fs.h [try #6] Move common FS-specific ioctls from linux/ext2_fs.h to linux/fs.h as FS_IOC_* and FS_IOC32_* and have the users of them use those as a base. Also move the GETFLAGS/SETFLAGS flags to linux/fs.h as FS_*_FL macros, and then have the other users use them as a base. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 863d5b822c02d0e7215fb84ca79e9f8c3e35f04e Author: David Howells Date: Tue Aug 29 19:06:14 2006 +0100 [PATCH] BLOCK: Move the loop device ioctl compat stuff to the loop driver [try #6] Move the loop device ioctl compat stuff from fs/compat_ioctl.c to the loop driver so that the loop header file doesn't need to be included. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit b71e8a4ce03b3098c7801ee5e6e08d1a39a226c2 Author: David Howells Date: Tue Aug 29 19:06:11 2006 +0100 [PATCH] BLOCK: Move __invalidate_device() to block_dev.c [try #6] Move __invalidate_device() from fs/inode.c to fs/block_dev.c so that it can more easily be disabled when the block layer is disabled. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 811d736f9e8013966e1a5a930c0db09508bdbb15 Author: David Howells Date: Tue Aug 29 19:06:09 2006 +0100 [PATCH] BLOCK: Dissociate generic_writepages() from mpage stuff [try #6] Dissociate the generic_writepages() function from the mpage stuff, moving its declaration to linux/mm.h and actually emitting a full implementation into mm/page-writeback.c. The implementation is a partial duplicate of mpage_writepages() with all BIO references removed. It is used by NFS to do writeback. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 7b0de42d7c5a471741ede4e71727d88000e6ea59 Author: David Howells Date: Tue Aug 29 19:06:07 2006 +0100 [PATCH] BLOCK: Remove dependence on existence of blockdev_superblock [try #6] Move blockdev_superblock extern declaration from fs/fs-writeback.c to a headerfile and remove the dependence on it by wrapping it in a macro. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 07f3f05c1e3052b8656129b2a5aca9f888241a34 Author: David Howells Date: Sat Sep 30 20:52:18 2006 +0200 [PATCH] BLOCK: Move extern declarations out of fs/*.c into header files [try #6] Create a new header file, fs/internal.h, for common definitions local to the sources in the fs/ directory. Move extern definitions that should be in header files from fs/*.c to fs/internal.h or other main header files where they span directories. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 65e6f5bc8149165efb9d7bdbd142bb837d5edfeb Author: David Howells Date: Tue Aug 29 19:06:03 2006 +0100 [PATCH] BLOCK: Don't call block_sync_page() from AFS [try #6] The AFS filesystem no longer needs to override its sync_page() op. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 831058dec3735665fe91bd0d37b6a8cf56b91abd Author: David Howells Date: Tue Aug 29 19:06:00 2006 +0100 [PATCH] BLOCK: Separate the bounce buffering code from the highmem code [try #6] Move the bounce buffer code from mm/highmem.c to mm/bounce.c so that it can be more easily disabled when the block layer is disabled. !!!NOTE!!! There may be a bug in this code: Should init_emergency_pool() be contingent on CONFIG_HIGHMEM? Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit b398f6bff93a247d2a7099e92905374966e4558f Author: David Howells Date: Tue Aug 29 19:05:58 2006 +0100 [PATCH] BLOCK: Stop fallback_migrate_page() from using page_has_buffers() [try #6] Stop fallback_migrate_page() from using page_has_buffers() since that might not be available. Use PagePrivate() instead since that's more general. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 0d67a46df0125e20d14f12dbd3646f1f1bf23e8c Author: David Howells Date: Tue Aug 29 19:05:56 2006 +0100 [PATCH] BLOCK: Remove duplicate declaration of exit_io_context() [try #6] Remove the duplicate declaration of exit_io_context() from linux/sched.h. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit cf9a2ae8d49948f861b56e5333530e491a9da190 Author: David Howells Date: Tue Aug 29 19:05:54 2006 +0100 [PATCH] BLOCK: Move functions out of buffer code [try #6] Move some functions out of the buffering code that aren't strictly buffering specific. This is a precursor to being able to disable the block layer. (*) Moved some stuff out of fs/buffer.c: (*) The file sync and general sync stuff moved to fs/sync.c. (*) The superblock sync stuff moved to fs/super.c. (*) do_invalidatepage() moved to mm/truncate.c. (*) try_to_release_page() moved to mm/filemap.c. (*) Moved some related declarations between header files: (*) declarations for do_invalidatepage() and try_to_release_page() moved to linux/mm.h. (*) __set_page_dirty_buffers() moved to linux/buffer_head.h. Signed-Off-By: David Howells Signed-off-by: Jens Axboe commit 4090959aee403817ff386415f9bc602c1a0882ef Author: Martin Peschke Date: Tue Aug 29 19:52:55 2006 +0200 [PATCH] blktrace: cleanup using on_each_cpu This patch kills a few lines of code in blktrace by making use of on_each_cpu(). Signed-off-by: Martin Peschke Signed-off-by: Jens Axboe commit cf342e52e3117391868fb4bd900ce772a27a5a1a Author: Oleg Nesterov Date: Tue Aug 29 09:17:41 2006 +0200 [PATCH] Don't need to disable interrupts for tasklist_lock Signed-off-by: Oleg Nesterov Signed-off-by: Jens Axboe commit 25034d7a83cf77667f3d65822484b305d4be6b25 Author: Oleg Nesterov Date: Tue Aug 29 09:15:14 2006 +0200 [PATCH] exit_io_context: don't disable irqs We don't need to disable irqs to clear current->io_context, it is protected by ->alloc_lock. Even IF it was possible to submit I/O from IRQ on behalf of current this irq_disable() can't help: current_io_context() will re-instantiate ->io_context after irq_enable(). We don't need task_lock() or local_irq_disable() to clear ioc->task. This can't prevent other CPUs from playing with our io_context anyway. Signed-off-by: Oleg Nesterov Signed-off-by: Jens Axboe commit 9bf09c23853bb8009625c2ec60dc6beb9472d3ca Author: Jens Axboe Date: Sat Sep 30 20:31:11 2006 +0200 [PATCH] SCSI: scsi_done_q is unused It is a leftover from before the softirq completion was migrated to the block layer. Signed-off-by: Jens Axboe commit 7457e6e2d7406c7009e9ad03db1335fe93b5fb71 Author: Jens Axboe Date: Sun Jul 23 02:12:01 2006 +0200 [PATCH] blktrace: support for logging metadata reads Signed-off-by: Jens Axboe commit 374f84ac39ec7829a57a66efd5125d3561ff0e00 Author: Jens Axboe Date: Sun Jul 23 01:42:19 2006 +0200 [PATCH] cfq-iosched: use metadata read flag Give meta data reads preference over regular reads, as the process often needs to get that out of the way to do the io it was actually interested in. Signed-off-by: Jens Axboe commit caa38fb0f481a3cb732b115cb59bfa6b59b6daaf Author: Jens Axboe Date: Sun Jul 23 01:41:26 2006 +0200 [PATCH] ext3: make meta data reads use READ_META Signed-off-by: Jens Axboe commit 5404bc7a87b9949cf61e0174b21f80e73239ab25 Author: Jens Axboe Date: Thu Aug 10 09:01:02 2006 +0200 [PATCH] Allow file systems to differentiate between data and meta reads We can use this information for making more intelligent priority decisions, and it will also be useful for blktrace. Signed-off-by: Jens Axboe commit da20a20f3b5c175648fa797c899dd577e4dacb51 Author: Jens Axboe Date: Fri Jul 21 20:30:28 2006 +0200 [PATCH] ll_rw_blk: allow more flexibility for read_ahead_kb store It can make sense to set read-ahead larger than a single request. We should not be enforcing such policy on the user. Additionally, using the BLKRASET ioctl doesn't impose such a restriction. So additionally we now expose identical behaviour through the two. Issue also reported by Anton Signed-off-by: Jens Axboe commit bf57225670bcbeb357182d800736b4782cde7295 Author: Jens Axboe Date: Wed Jul 19 20:29:12 2006 +0200 [PATCH] cfq-iosched: improve queue preemption Don't touch the current queues, just make sure that the wanted queue is selected next. Simplifies the logic. Signed-off-by: Jens Axboe commit dc72ef4ae35c2016fb594bcc85ce871376682174 Author: Jens Axboe Date: Thu Jul 20 14:54:05 2006 +0200 [PATCH] Add blk_start_queueing() helper CFQ implements this on its own now, but it's really block layer knowledge. Tells a device queue to start dispatching requests to the driver, taking care to unplug if needed. Also fixes the issue where as/cfq will invoke a stopped queue, which we really don't want. Signed-off-by: Jens Axboe commit 981a79730d586335ef8f942c83bdf2b1de6d4e3d Author: Jens Axboe Date: Wed Jul 19 14:56:28 2006 +0200 [PATCH] cfq-iosched: kill the empty_list No point in having a place holder list just for empty queues, so remove it. It's not used for anything other than to keep ->cfq_list busy. Signed-off-by: Jens Axboe commit 53b03744e5699832e6c5b04f2ec506d8b0c50c38 Author: Jens Axboe Date: Fri Jul 28 09:48:51 2006 +0200 [PATCH] cfq-iosched: Kill O(N) runtime of cfq_resort_rr_list() Currently it scales with number of processes in that priority group, which is potentially not very nice as it's called quite often. Basically we always need to do tail inserts, except for the case of a new process. So just mark/detect a queue as such. Signed-off-by: Jens Axboe commit b5deef901282628d88c784f4c9d2f0583ec3b355 Author: Jens Axboe Date: Wed Jul 19 23:39:40 2006 +0200 [PATCH] Make sure all block/io scheduler setups are node aware Some were kmalloc_node(), some were still kmalloc(). Change them all to kmalloc_node(). Signed-off-by: Jens Axboe commit a3b05e8f58c95dfccbf2c824d0c68e5990571f24 Author: Jens Axboe Date: Fri Jul 28 09:36:46 2006 +0200 [PATCH] Kill various deprecated/unused block layer defines/functions Signed-off-by: Jens Axboe commit 1ea25ecb7256978947c258f08a30c878eebe9edb Author: Jens Axboe Date: Tue Jul 18 22:24:11 2006 +0200 [PATCH] Audit block layer inlines Kill a few inlines that bring in too much code to more than one location Shrinks kernel text by about 300 bytes on 32-bit x86. Signed-off-by: Jens Axboe commit 4050cf1674c632c73801a561689543d4887df2ef Author: Jens Axboe Date: Wed Jul 19 05:07:12 2006 +0200 [PATCH] cfq-iosched: use new io context counting mechanism It's ok if the read path is a lot more costly, as long as inc/dec is really cheap. The inc/dec will happen for each created/freed io context, while the reading only happens when a disk queue exits. Signed-off-by: Jens Axboe commit e4313dd423148fa729571b50c06cbc0bedf5c494 Author: Jens Axboe Date: Wed Jul 19 05:10:01 2006 +0200 [PATCH] as-iosched: use new io context counting mechanism It's ok if the read path is a lot more costly, as long as inc/dec is really cheap. The inc/dec will happen for each created/freed io context, while the reading only happens when a disk queue exits. Signed-off-by: Jens Axboe commit 4a893e837bb470867d74c05d6c6b97bba5a96185 Author: Jens Axboe Date: Sat Jul 22 15:37:43 2006 +0200 [PATCH] elevator: define ioc counting mechanism None of the in-kernel primitives for handling "atomic" counting seem to be a good fit. We need something that is essentially free for incrementing/decrementing, while the read side may be more expensive as we only ever need to do that when a device is removed from the kernel. Use a per-cpu variable for maintaining a per-cpu ioc count and define a reading mechanism that just sums up the values. Signed-off-by: Jens Axboe commit fc46379daf90dce57bf765c81d3b39f55150aac2 Author: Jens Axboe Date: Tue Aug 29 09:05:44 2006 +0200 [PATCH] cfq-iosched: kill cfq_exit_lock cfq_exit_lock is protecting two things now: - The per-ioc rbtree of cfq_io_contexts - The per-cfqd linked list of cfq_io_contexts The per-cfqd linked list can be protected by the queue lock, as it is (by definition) per cfqd as the queue lock is. The per-ioc rbtree is mainly used and updated by the process itself only. The only outside use is the io priority changing. If we move the priority changing to not browsing the rbtree, we can remove any locking from the rbtree updates and lookup completely. Let the sys_ioprio syscall just mark processes as having the iopriority changed and lazily update the private cfq io contexts the next time io is queued, and we can remove this locking as well. Signed-off-by: Jens Axboe commit 89850f7ee905410c89f9295e89dc4c33502a34ac Author: Jens Axboe Date: Sat Jul 22 16:48:31 2006 +0200 [PATCH] cfq-iosched: cleanups, fixes, dead code removal A collection of little fixes and cleanups: - We don't use the 'queued' sysfs exported attribute, since the may_queue() logic was rewritten. So kill it. - Remove dead defines. - cfq_set_active_queue() can be rewritten cleaner with else if conditions. - Several places had cfq_exit_cfqq() like logic, abstract that out and use that. - Annotate the cfqq kmem_cache_alloc() so the allocator knows that this is a repeat allocation if it fails with __GFP_WAIT set. Allows the allocator to start freeing some memory, if needed. CFQ already loops for this condition, so might as well pass the hint down. - Remove cfqd->rq_starved logic. It's not needed anymore after we dropped the crq allocation in cfq_set_request(). - Remove uneeded parameter passing. Signed-off-by: Jens Axboe commit e6a1c874a064e7d07f24986aba7cd537b7f4a25d Author: Jens Axboe Date: Thu Aug 10 09:00:21 2006 +0200 [PATCH] struct request: shrink and optimize some more Move some members around and unionize completion_data and rb_node since they cannot ever be used at the same time. Signed-off-by: Jens Axboe commit 51da90fcb6acd580e87280eaf4eb1f788021807d Author: Jens Axboe Date: Tue Jul 18 04:14:45 2006 +0200 [PATCH] ll_rw_blk: cleanup __make_request() - Don't assign variables that are only used once. - Kill spin_lock() prefetching, it's opportunistic at best. Signed-off-by: Jens Axboe commit cb78b285c8f9d59b0d4e4f6a54c2977ce1d9b880 Author: Jens Axboe Date: Fri Jul 28 09:32:57 2006 +0200 [PATCH] Drop useless bio passing in may_queue/set_request API It's not needed for anything, so kill the bio passing. Signed-off-by: Jens Axboe commit cdd6026217c0e4cda2efce1bdc318661bef1f66f Author: Jens Axboe Date: Fri Jul 28 09:32:07 2006 +0200 [PATCH] Remove ->rq_status from struct request After Christophs SCSI change, the only usage left is RQ_ACTIVE and RQ_INACTIVE. The block layer sets RQ_INACTIVE right before freeing the request, so any check for RQ_INACTIVE in a driver is a bug and indicates use-after-free. So kill/clean the remaining users, straight forward. Signed-off-by: Jens Axboe commit 49171e5c6f414d49a061b5c1c84967c2eb569822 Author: Jens Axboe Date: Thu Aug 10 08:59:11 2006 +0200 [PATCH] Remove struct request_list from struct request It is always identical to &q->rq, and we only use it for detecting whether this request came out of our mempool or not. So replace it with an additional ->flags bit flag. Signed-off-by: Jens Axboe commit c00895ab2f08df7044e58ee01c38bf0a661ea0eb Author: Jens Axboe Date: Sat Sep 30 20:29:12 2006 +0200 [PATCH] Remove ->waiting member from struct request As the comments indicates in blkdev.h, we can fold it into ->end_io_data usage as that is really what ->waiting is. Fixup the users of blk_end_sync_rq(). Signed-off-by: Jens Axboe commit 8a8e674cb1dafc818ffea93d97e4c1c1f01fdbb6 Author: Jens Axboe Date: Tue Jul 18 21:07:29 2006 +0200 [PATCH] as-iosched: kill arq Get rid of the as_rq request type. With the added elevator_private2, we have enough room in struct request to get rid of any arq allocation/free for each request. Signed-off-by: Jens Axboe Signed-off-by: Nick Piggin commit 5e705374796e72b36e7bb9c59c8d46d2dc5db36a Author: Jens Axboe Date: Thu Jul 13 12:39:25 2006 +0200 [PATCH] cfq-iosched: kill crq Get rid of the cfq_rq request type. With the added elevator_private2, we have enough room in struct request to get rid of any crq allocation/free for each request. Signed-off-by: Jens Axboe commit ff7d145fd911266ae42af7552edc32681c01addb Author: Jens Axboe Date: Wed Jul 12 14:04:37 2006 +0200 [PATCH] Add one more pointer to struct request for IO scheduler usage Then we have enough room in the request to get rid of the dynamic allocations in CFQ/AS. Signed-off-by: Jens Axboe commit 5380a101d33d1d3a32c6b6bd2e17e5dd835842b0 Author: Jens Axboe Date: Thu Jul 13 12:37:56 2006 +0200 [PATCH] cfq-iosched: remove the crq flag functions/variable There's just one flag currently (SYNC), and that one can be grabbed from the request. Signed-off-by: Jens Axboe commit 8840faa1eebba22a9e2f86acddc0cf5145937df4 Author: Jens Axboe Date: Thu Jul 13 12:36:41 2006 +0200 [PATCH] deadline-iosched: remove elevator private drq request type A big win, we now save an allocation/free on each request! With the previous rb/hash abstractions, we can just reuse queuelist/donelist for the FIFO data and be done with it. Signed-off-by: Jens Axboe commit 9e2585a8a23f3a42f815b2a638725d85a921cd65 Author: Jens Axboe Date: Fri Jul 28 09:26:13 2006 +0200 [PATCH] as-iosched: remove arq->is_sync member We can track this in struct request. Signed-off-by: Jens Axboe Signed-off-by: Nick Piggin commit d4f2f4629ea6a003cd021a9ea1a8a23ec0cd70ac Author: Jens Axboe Date: Thu Jul 13 09:12:14 2006 +0200 [PATCH] as-iosched: reuse rq for fifo Saves some space in arq. Signed-off-by: Jens Axboe Signed-off-by: Nick Piggin commit 95e8810b283cfac50789126de4207f9909299de9 Author: Jens Axboe Date: Tue Jul 11 21:30:31 2006 +0200 [PATCH] cfq-iosched: convert to using the FIFO elevator defines Signed-off-by: Jens Axboe commit 1fbfdfcddff4df188b24d9d05271a76a85064583 Author: Jens Axboe Date: Tue Jul 11 21:49:15 2006 +0200 [PATCH] elevator: introduce a way to reuse rq for internal FIFO handling The io schedulers can use this instead of having to allocate space for it themselves. Signed-off-by: Jens Axboe commit b8aca35af5e9fbc2e41a3ba1b2e66f24e80ca9b6 Author: Jens Axboe Date: Thu Jul 13 12:34:24 2006 +0200 [PATCH] deadline-iosched: migrate to using the elevator rb functions This removes the rbtree handling from deadline. Signed-off-by: Jens Axboe commit 21183b07ee4be405362af8454f3647781c77df1b Author: Jens Axboe Date: Thu Jul 13 12:33:14 2006 +0200 [PATCH] cfq-iosched: migrate to using the elevator rb functions This removes the rbtree handling from CFQ. Signed-off-by: Jens Axboe commit e37f346e347e5035c80760df2be0fcb2824f6c16 Author: Jens Axboe Date: Tue Jul 18 21:06:01 2006 +0200 [PATCH] as-iosched: migrate to using the elevator rb functions This removes the rbtree handling from AS. Signed-off-by: Jens Axboe Signed-off-by: Nick Piggin commit 2e662b65f05d550b6799ed6bfa9963b82279e6b7 Author: Jens Axboe Date: Thu Jul 13 11:55:04 2006 +0200 [PATCH] elevator: abstract out the rbtree sort handling The rbtree sort/lookup/reposition logic is mostly duplicated in cfq/deadline/as, so move it to the elevator core. The io schedulers still provide the actual rb root, as we don't want to impose any sort of specific handling on the schedulers. Introduce the helpers and rb_node in struct request to help migrate the IO schedulers. Signed-off-by: Jens Axboe commit 10fd48f2376db52f08bf0420d2c4f580e39269e1 Author: Jens Axboe Date: Tue Jul 11 21:15:52 2006 +0200 [PATCH] rbtree: fixed reversed RB_EMPTY_NODE and rb_next/prev The conditions got reserved. Also make rb_next() and rb_prev() check for the empty condition. Signed-off-by: Jens Axboe commit 9817064b68fef7e4580c6df1ea597e106b9ff88b Author: Jens Axboe Date: Fri Jul 28 09:23:08 2006 +0200 [PATCH] elevator: move the backmerging logic into the elevator core Right now, every IO scheduler implements its own backmerging (except for noop, which does no merging). That results in duplicated code for essentially the same operation, which is never a good thing. This patch moves the backmerging out of the io schedulers and into the elevator core. We save 1.6kb of text and as a bonus get backmerging for noop as well. Win-win! Signed-off-by: Jens Axboe commit 4aff5e2333c9a1609662f2091f55c3f6fffdad36 Author: Jens Axboe Date: Thu Aug 10 08:44:47 2006 +0200 [PATCH] Split struct request ->flags into two parts Right now ->flags is a bit of a mess: some are request types, and others are just modifiers. Clean this up by splitting it into ->cmd_type and ->cmd_flags. This allows introduction of generic Linux block message types, useful for sending generic Linux commands to block devices. Signed-off-by: Jens Axboe commit 77ed74da26f50fa28471571ee7a2251b77526d84 Author: Jean Delvare Date: Sat Sep 30 17:18:59 2006 +0200 [PATCH] i2c: Prevent deadlock on i2c client registration Delay the call to adapter->client_register() until after we are certain that the client registration is a success. At this point the client is fully initialized and we no longer hold the adapter->clist mutex, so this should prevent the deadlocks if the client_register() callback needs to take that mutex too, as is the case for the bttv driver. This fixes bug #7234. Signed-off-by: Jean Delvare Signed-off-by: Linus Torvalds commit 6656e3c4c8e0c80f2d2bfece574876d269f64861 Author: Chas Williams Date: Fri Sep 29 17:17:17 2006 -0700 [ATM]: [lec] use refcnt to protect lec_arp_entries outside lock Signed-off-by: Chas Williams Signed-off-by: David S. Miller commit 33a9c2d4b758279c5077fc15d221b385a574ae0b Author: Chas Williams Date: Fri Sep 29 17:16:48 2006 -0700 [ATM]: [lec] add reference counting to lec_arp entries Signed-off-by: Chas Williams Signed-off-by: David S. Miller commit 987e46bdf314c55e060570ff46723d770e461f0e Author: Chas Williams Date: Fri Sep 29 17:15:59 2006 -0700 [ATM]: [lec] use work queue instead of timer for lec arp expiry Signed-off-by: Chas Williams Signed-off-by: David S. Miller commit edbc9b014fda4b13466b2e2ac53b940337548ab4 Author: Chas Williams Date: Fri Sep 29 17:15:15 2006 -0700 [ATM]: [lec] old_close is no longer used Signed-off-by: Chas Williams Signed-off-by: David S. Miller commit d0732f649f090b31f976a9ce59a38e1191077909 Author: Chas Williams Date: Fri Sep 29 17:14:27 2006 -0700 [ATM]: [lec] convert lec_arp_table to hlist Signed-off-by: Chas Williams Signed-off-by: David S. Miller commit 1c9d3e72a7164c590437f2ab6c2c4f6da91f1703 Author: Chas Williams Date: Fri Sep 29 17:13:24 2006 -0700 [ATM]: [lec] header indent, comment and whitespace cleanup Signed-off-by: Chas Williams Signed-off-by: David S. Miller commit 1fa9961d631fcde21cc42678157129c6fae7fe6d Author: Chas Williams Date: Fri Sep 29 17:11:47 2006 -0700 [ATM]: [lec] indent, comment and whitespace cleanup [continued] Signed-off-by: Chas Williams Signed-off-by: David S. Miller commit d44f77466cfdc6f1d1e3870e176afedab7f46a42 Author: Chas Williams Date: Fri Sep 29 17:11:14 2006 -0700 [ATM]: [lec] indent, comment and whitespace cleanup Signed-off-by: Chas Williams Signed-off-by: David S. Miller commit f236218b7292bccb0f8754a0feb5d9e9a06fe5a2 Author: Vlad Yasevich Date: Fri Sep 29 17:10:03 2006 -0700 [SCTP]: Do not timestamp every SCTP packet. We only need the timestamp on COOKIE-ECHO chunks, so instead of always timestamping every SCTP packet, let common code timestamp if the socket option is set. For COOKIE-ECHO, simply get the time of day if we don't have a timestamp. This introduces a small possibility that the cookie may be considered expired, but it will be renegotiated. Signed-off-by: Vlad Yasevich Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller commit b56bab46f3220eb6b1f71c000faa44c6b13fb148 Author: Vlad Yasevich Date: Fri Sep 29 17:09:34 2006 -0700 [SCTP]: Use correct mask when disabling PMTUD. Signed-off-by: Vlad Yasevich Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller commit cd49788563d3b9e2ec0b316fa57aef1c0cb3bd4b Author: Sridhar Samudrala Date: Fri Sep 29 17:09:05 2006 -0700 [SCTP]: Include sk_buff overhead while updating the peer's receive window. Currently if the sender is sending small messages, it can cause a receiver to run out of receive buffer space even when the advertised receive window is still open and results in packet drops and retransmissions. Including a overhead while updating the sender's view of peer receive window will reduce the chances of receive buffer space overshooting the receive window. Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller commit 208edef6a5b6c50363c77efcf34c4b4020681029 Author: Sridhar Samudrala Date: Fri Sep 29 17:08:01 2006 -0700 [SCTP]: Enable Nagle algorithm by default. This allows more aggressive bundling of chunks when sending small messages. Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller commit f9317a40c4e09e20ef01601fc9f5de9e6acb5b96 Author: Michael Chan Date: Fri Sep 29 17:06:23 2006 -0700 [BNX2]: Disable MSI on 5706 if AMD 8132 bridge is present. MSI is defined to be 32-bit write. The 5706 does 64-bit MSI writes with byte enables disabled on the unused 32-bit word. This is legal but causes problems on the AMD 8132 which will eventually stop responding after a while. Without this patch, the MSI test done by the driver during open will pass, but MSI will eventually stop working after a few MSIs are written by the device. AMD believes this incompatibility is unique to the 5706, and prefers to locally disable MSI rather than globally disabling it using pci_msi_quirk. Update version to 1.4.45. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 95d4e6be25a68cd9fbe8c0d356b585504d8db1c7 Author: Paul Moore Date: Fri Sep 29 17:05:05 2006 -0700 [NetLabel]: audit fixups due to delayed feedback Fix some issues Steve Grubb had with the way NetLabel was using the audit subsystem. This should make NetLabel more consistent with other kernel generated audit messages specifying configuration changes. Signed-off-by: Paul Moore Acked-by: Steve Grubb Signed-off-by: David S. Miller commit c84ef5305930d19bdd6cd576b3a3a73786a82e57 Author: Andi Kleen Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] Use early clobber in semaphores New code clobbers the result always early, so tell gcc about it Signed-off-by: Andi Kleen commit 34596dc9e59d7bece16fe5aba08116b49465da26 Author: Andi Kleen Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] Define vsyscall cache as blob to make clearer that user space shouldn't use it Signed-off-by: Andi Kleen commit 120b114237e2461fb4fa437c5c37edf014c916b9 Author: Vivek Goyal Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] Re-positioning the bss segment [AK: This apparently broke some systems, but we need it to fix a compile problem with old binutils and in theory the patch is correct. So let's trying reenabling it again.] o Currently bss segment is being placed somewhere in the middle (after .data) section and after bss lots of init section and data sections are coming. Is it intentional? o One side affect of placing bss in the middle is that objcopy keeps the bss in raw binary image (vmlinux.bin) hence unnecessarily increasing the size of raw binary image. (In my case ~600K). It also increases the size of generated bzImage, though the increase is very small (896 bytes), probably a very high compression ratio for stream of zeros. o This patch moves the bss at the end hence reducing the size of bzImage by 896 bytes and size of vmlinux.bin by 600K. o This change benefits in the context of relocatable kernel patches. If kernel bss is not part of compressed data (vmlinux.bin) then it does not have to be decompressed and this area can be used by the decompressor for its execution hence keeping the memory requirements bounded and decompressor code does not stomp over any other data loaded beyond kernel image (As might be the case with bootloaders like kexec). Signed-off-by: Vivek Goyal Signed-off-by: Andi Kleen commit 9d0ef4fd61693acd3741ab7ee544246cda1f8738 Author: Andi Kleen Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] Use ARRAY_SIZE in setup.c Based on i386 patch from Bjorn. Signed-off-by: Andi Kleen commit b9629b82c81709eb0f9c98b8f9cc684f8e212ef3 Author: Bjorn Helgaas Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] i386: replace intermediate array-size definitions with ARRAY_SIZE() Code is easier to validate if array sizes aren't hidden behind extra #defines. Signed-off-by: Bjorn Helgaas Signed-off-by: Andi Kleen commit 29cbc78b90a73ad80f2f58ba2927956cf663abed Author: Andi Kleen Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] x86: Clean up x86 NMI sysctls Use prototypes in headers Don't define panic_on_unrecovered_nmi for all architectures Cc: dzickus@redhat.com Signed-off-by: Andi Kleen commit 013bf2c50ed943e9c23a2145d3ea7c4d88cda310 Author: Andi Kleen Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] Refactor some duplicated code in mpparse.c No logic changes Signed-off-by: Andi Kleen commit d802ab981da67d433fbb48f5640b7e3a9ba9fd54 Author: Andi Kleen Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] Document iommu=panic Signed-off-by: Andi Kleen commit ded318ec80071557155604197ea45dcdb2a9ff2f Author: Andi Kleen Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] Fix broken indentation in iommu_setup No functional changes; only white space. Signed-off-by: Andi Kleen commit ece668401250c1d0419ed078c1d26ccdd30d3289 Author: Andi Kleen Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] Allow disabling DAC using command line options Might or might not work around some reported bugs on VIA systems. Signed-off-by: Andi Kleen commit b885808e185a4ec2dfe16c84434f79e95f0245b0 Author: Andi Kleen Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] Add proper sparse __user casts to __copy_to_user_inatomic Noticed by Al Viro Cc: viro@ftp.linux.org.uk Signed-off-by: Andi Kleen commit ae853e79faa27ca1a08c8ae3b5aee71ea98482f9 Author: Andi Kleen Date: Sat Sep 30 01:47:55 2006 +0200 [PATCH] i386: Update defconfig Signed-off-by: Andi Kleen commit 81b999b10b3246fd80691a7936a564deb99640b9 Author: Andi Kleen Date: Sat Sep 30 01:47:54 2006 +0200 [PATCH] Update defconfig Signed-off-by: Andi Kleen commit fbe96f92b3d9450e77a3a4bb1d46aa1bb908c1ab Author: David S. Miller Date: Wed Sep 27 19:52:35 2006 -0700 [SERIAL] sunzilog: Mark sunzilog_init_hw as __devinit. Signed-off-by: David S. Miller commit 3a1d5c84ed2fa4034f86e3b204129c139471516e Author: David S. Miller Date: Wed Sep 27 19:43:02 2006 -0700 [SPARC]: Don't zero out tail during copy_from_user_inatomic(). Actually, since we use the same code for all the copying types in and out of userspace, we check at runtime whether preemption is disabled. Signed-off-by: David S. Miller commit d6c641026dec68acfb4b0baa98aad960e963ed97 Author: Ollie Wild Date: Fri Sep 29 15:50:28 2006 -0700 [PATCH] uml build fix Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2148ccc437a9eac9f0d4b3c27cb1e41f6a48194c Author: David Woodhouse Date: Fri Sep 29 15:50:25 2006 -0700 [PATCH] MLSXFRM: fix mis-labelling of child sockets Accepted connections of types other than AF_INET, AF_INET6, AF_UNIX won't have an appropriate label derived from the peer, so don't use it. Signed-off-by: David Woodhouse Acked-by: Stephen Smalley Acked-by: James Morris Acked-by: Paul Moore Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae1390d8c3e2142e5cf6d192951d6e2b1fa213c5 Author: Yoichi Yuasa Date: Fri Sep 29 08:42:38 2006 +0200 [PATCH] i2c-sibyte: Fix modular build breakage Fix undefined reference in i2c_sibyte_exit(). drivers/built-in.o: In function `i2c_sibyte_exit': i2c-sibyte.c:(.exit.text+0x368): undefined reference to `i2c_del_bus' i2c-sibyte.c:(.exit.text+0x368): relocation truncated to fit: R_MIPS_26 against `i2c_del_bus' i2c-sibyte.c:(.exit.text+0x38c): undefined reference to `i2c_del_bus' i2c-sibyte.c:(.exit.text+0x38c): relocation truncated to fit: R_MIPS_26 against `i2c_del_bus' Signed-off-by: Yoichi Yuasa Signed-off-by: Jean Delvare Signed-off-by: Linus Torvalds commit 181b64803661209cda64e5e874ad75f373a69de8 Author: Paul Jackson Date: Fri Sep 29 02:01:48 2006 -0700 [PATCH] cpuset: fix obscure attach_task vs exiting race Fix obscure race condition in kernel/cpuset.c attach_task() code. There is basically zero chance of anyone accidentally being harmed by this race. It requires a special 'micro-stress' load and a special timing loop hacks in the kernel to hit in less than an hour, and even then you'd have to hit it hundreds or thousands of times, followed by some unusual and senseless cpuset configuration requests, including removing the top cpuset, to cause any visibly harm affects. One could, with perhaps a few days or weeks of such effort, get the reference count on the top cpuset below zero, and manage to crash the kernel by asking to remove the top cpuset. I found it by code inspection. The race was introduced when 'the_top_cpuset_hack' was introduced, and one piece of code was not updated. An old check for a possibly null task cpuset pointer needed to be changed to a check for a task marked PF_EXITING. The pointer can't be null anymore, thanks to the_top_cpuset_hack (documented in kernel/cpuset.c). But the task could have gone into PF_EXITING state after it was found in the task_list scan. If a task is PF_EXITING in this code, it is possible that its task->cpuset pointer is pointing to the top cpuset due to the_top_cpuset_hack, rather than because the top_cpuset was that tasks last valid cpuset. In that case, the wrong cpuset reference counter would be decremented. The fix is trivial. Instead of failing the system call if the tasks cpuset pointer is null here, fail it if the task is in PF_EXITING state. The code for 'the_top_cpuset_hack' that changes an exiting tasks cpuset to the top_cpuset is done without locking, so could happen at anytime. But it is done during the exit handling, after the PF_EXITING flag is set. So if we verify that a task is still not PF_EXITING after we copy out its cpuset pointer (into 'oldcs', below), we know that 'oldcs' is not one of these hack references to the top_cpuset. Signed-off-by: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 683e91cbd0582cb8e63daaf0429e0a62be9cc421 Author: Kirill Korotaev Date: Fri Sep 29 02:01:47 2006 -0700 [PATCH] SubmittingPatches: add a note about "format=flowed" when sending patches Add a note about "format=flowed" when sending patches and explain how to fix mozilla. Thunderbird has the similar options. Signed-off-by: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 03cbc358aab3faf34bfeaa02206fa660127e9b3f Author: Ingo Molnar Date: Fri Sep 29 02:01:46 2006 -0700 [PATCH] lockdep core: improve the lock-chain-hash With CONFIG_DEBUG_LOCK_ALLOC turned off i was getting sporadic failures in the locking self-test: ------------> | Locking API testsuite: ---------------------------------------------------------------------------- | spin |wlock |rlock |mutex | wsem | rsem | -------------------------------------------------------------------------- A-A deadlock: ok | ok | ok | ok | ok | ok | A-B-B-A deadlock: ok | ok | ok | ok | ok | ok | A-B-B-C-C-A deadlock: ok | ok | ok | ok | ok | ok | A-B-C-A-B-C deadlock: ok | ok | ok | ok | ok | ok | A-B-B-C-C-D-D-A deadlock: ok |FAILED| ok | ok | ok | ok | A-B-C-D-B-D-D-A deadlock: ok | ok | ok | ok | ok | ok | A-B-C-D-B-C-D-A deadlock: ok | ok | ok | ok | ok |FAILED| after much debugging it turned out to be caused by accidental chain-hash key collisions. The current hash is: #define iterate_chain_key(key1, key2) \ (((key1) << MAX_LOCKDEP_KEYS_BITS/2) ^ \ ((key1) >> (64-MAX_LOCKDEP_KEYS_BITS/2)) ^ \ (key2)) where MAX_LOCKDEP_KEYS_BITS is 11. This hash is pretty good as it will shift by 5 bits in every iteration, where every new ID 'mixed' into the hash would have up to 11 bits. But because there was a 6 bits overlap between subsequent IDs and their high bits tended to be similar, there was a chance for accidental chain-hash collision for a low number of locks held. the solution is to shift by 11 bits: #define iterate_chain_key(key1, key2) \ (((key1) << MAX_LOCKDEP_KEYS_BITS) ^ \ ((key1) >> (64-MAX_LOCKDEP_KEYS_BITS)) ^ \ (key2)) This keeps the hash perfect up to 5 locks held, but even above that the hash is still good because 11 bits is a relative prime to the total 64 bits, so a complete match will only occur after 64 held locks (which doesnt happen in Linux). Even after 5 locks held, entropy of the 5 IDs mixed into the hash is already good enough so that overlap doesnt generate a colliding hash ID. with this change the false positives went away. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 632dd2053a1146c826ceb6f26ab689389c05e751 Author: Vivek Goyal Date: Fri Sep 29 02:01:45 2006 -0700 [PATCH] Kcore elf note namesz field fix o As per ELF specifications, it looks like that elf note "namesz" field contains the length of "name" including the size of null character. And currently we are filling "namesz" without taking into the consideration the null character size. o Kexec-tools performs this check deligently hence I ran into the issue while trying to open /proc/kcore in kexec-tools for some info. Signed-off-by: Vivek Goyal Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 327dcaadc0bc08ad081aa8e36b6ec7ad7aa45e30 Author: Andrew Morton Date: Fri Sep 29 02:01:44 2006 -0700 [PATCH] expand_fdtable(): remove pointless unlock+lock This unlock/lock on a super-unlikely path isn't worth the kernel text. Cc: Vadim Lobanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74d392aaabfc890cc1f0e80fc5ff13e5d3bcf4c9 Author: Vadim Lobanov Date: Fri Sep 29 02:01:43 2006 -0700 [PATCH] Clean up expand_fdtable() and expand_files() Perform a code cleanup against the expand_fdtable() and expand_files() functions inside fs/file.c. It aims to make the flow of code within these functions simpler and easier to understand, via added comments and modest refactoring. Signed-off-by: Vadim Lobanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3706baa8b1ba0d71d52fd0c656752a6495f6364a Author: Alexey Dobriyan Date: Fri Sep 29 02:01:43 2006 -0700 [PATCH] Documentation/SubmittingDrivers: minor update * fix copright typo * remove trailing whitespace * remove Kernel Traffic from Resources. Zack, it was great reading! * Name Arjan by name and fix URL of "How to NOT" paper. * Remove "Last updated" tag. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb84a20e9e6b98dcb33023ad22241d79107a08a7 Author: Alan Cox Date: Fri Sep 29 02:01:41 2006 -0700 [PATCH] audit/accounting: tty locking Add tty locking around the audit and accounting code. The whole current->signal-> locking is all deeply strange but it's for someone else to sort out. Add rather than replace the lock for acct.c Signed-off-by: Alan Cox Acked-by: Arjan van de Ven Cc: Al Viro Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f412b24240d92212e50ebbaff2dff20c9e6f3d0 Author: Alan Cox Date: Fri Sep 29 02:01:40 2006 -0700 [PATCH] Fix locking for tty drivers when doing urgent characters If you send a priority character (as is done for flow control) then the tty driver can either have its own method for "jumping the queue" or the characrer can be queued normally. In the latter case we call the write method but without the atomic_write_lock taken elsewhere. Make this consistent. Note that the send_xchar method if implemented remains outside of the lock as it can jump ahead of a current write so must not be locked out by it. Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 67cc0161ecc9ebee6eba4af6cbfdba028090b1b9 Author: Alan Cox Date: Fri Sep 29 02:01:39 2006 -0700 [PATCH] specialix - remove private speed decoding Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1db27c11e9a0c6d659040ac0b7c64a339e248fa1 Author: Alan Cox Date: Fri Sep 29 02:01:38 2006 -0700 [PATCH] istallion: Remove private baud rate decoding, which is also broken in this case on some platforms Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d720bc4b8fc5d6d179ef094908d4fbb5e436ffad Author: Alan Cox Date: Fri Sep 29 02:01:38 2006 -0700 [PATCH] generic_serial: remove private decoding of baud rate bits The driver has no business doing this work itself any more and hasn't for some years. When the new speed stuff goes in this will break entirely so fix it up ready. Also remove a #if 0 around a comment.... Signed-off-by: Alan Cox Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13c73f045f2ac33219729678f4a9389d4ccab799 Author: Atsushi Nemoto Date: Fri Sep 29 02:01:37 2006 -0700 [PATCH] RTC: more XSTP/VDET support for rtc-rs5c348 driver If the chip detected "oscillator stop" condition, show an warning message. And initialize it with the Epoch time instead of leaving it with unknown date/time. Signed-off-by: Atsushi Nemoto Acked-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b9dd6ffc3d6b56417a2c4c917f51dab6470166e6 Author: Adrian Bunk Date: Fri Sep 29 02:01:36 2006 -0700 [PATCH] build sound/sound_firmware.c only for OSS All sound/sound_firmware.c contains is mod_firmware_load() that is a legacy API only used by some OSS drivers. This patch builds it into an own sound_firmware module that is only built depending on CONFIG_SOUND_PRIME making the kernel slightly smaller for ALSA users. [alan@lxorguk.ukuu.org.uk: comment fix] Signed-off-by: Adrian Bunk Acked-by: Takashi Iwai Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5582ca21af82929d5cd3613321ac9233c492ebc Author: Rusty Russell Date: Fri Sep 29 02:01:35 2006 -0700 [PATCH] stop_machine.c copyright I had to look back: this code was extracted from the module.c code in 2005. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 39f0247d3823e4e0bf8f6838a10362864b1e1053 Author: Andreas Gruenbacher Date: Fri Sep 29 02:01:35 2006 -0700 [PATCH] Access Control Lists for tmpfs Add access control lists for tmpfs. Signed-off-by: Andreas Gruenbacher Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0c8bd164e1a0585d7e46896553136b4f488bd19 Author: Andreas Gruenbacher Date: Fri Sep 29 02:01:34 2006 -0700 [PATCH] Generic infrastructure for acls The patches solve the following problem: We want to grant access to devices based on who is logged in from where, etc. This includes switching back and forth between multiple user sessions, etc. Using ACLs to define device access for logged-in users gives us all the flexibility we need in order to fully solve the problem. Device special files nowadays usually live on tmpfs, hence tmpfs ACLs. Different distros have come up with solutions that solve the problem to different degrees: SUSE uses a resource manager which tracks login sessions and sets ACLs on device inodes as appropriate. RedHat uses pam_console, which changes the primary file ownership to the logged-in user. Others use a set of groups that users must be in in order to be granted the appropriate accesses. The freedesktop.org project plans to implement a combination of a console-tracker and a HAL-device-list based solution to grant access to devices to users, and more distros will likely follow this approach. These patches have first been posted here on 2 February 2005, and again on 8 January 2006. We have been shipping them in SLES9 and SLES10 with no problems reported. The previous submission is archived here: http://lkml.org/lkml/2006/1/8/229 http://lkml.org/lkml/2006/1/8/230 http://lkml.org/lkml/2006/1/8/231 This patch: Add some infrastructure for access control lists on in-memory filesystems such as tmpfs. Signed-off-by: Andreas Gruenbacher Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e6fd33b75602ced4c5d43e99a10a1d13f33d4f4 Author: Chris Snook Date: Fri Sep 29 02:01:33 2006 -0700 [PATCH] enforce RLIMIT_NOFILE in poll() POSIX states that poll() shall fail with EINVAL if nfds > OPEN_MAX. In this context, POSIX is referring to sysconf(OPEN_MAX), which is the value of current->signal->rlim[RLIMIT_NOFILE].rlim_cur in the linux kernel, not the compile-time constant which happens to also be named OPEN_MAX. In the current code, an application may poll up to max_fdset file descriptors, even if this exceeds RLIMIT_NOFILE. The current code also breaks applications which poll more than max_fdset descriptors, which worked circa 2.4.18 when the check was against NR_OPEN, which is 1024*1024. This patch enforces the limit precisely as POSIX defines, even if RLIMIT_NOFILE has been changed at run time with ulimit -n. To elaborate on the rationale for this, there are three cases: 1) RLIMIT_NOFILE is at the default value of 1024 In this (default) case, the patch changes nothing. Calls with nfds > 1024 fail with EINVAL both before and after the patch, and calls with nfds <= 1024 pass the check both before and after the patch, since 1024 is the initial value of max_fdset. 2) RLIMIT_NOFILE has been raised above the default In this case, poll() becomes more permissive, allowing polling up to RLIMIT_NOFILE file descriptors even if less than 1024 have been opened. The patch won't introduce new errors here. If an application somehow depends on poll() failing when it polls with duplicate or invalid file descriptors, it's already broken, since this is already allowed below 1024, and will also work above 1024 if enough file descriptors have been open at some point to cause max_fdset to have been increased above nfds. 3) RLIMIT_NOFILE has been lowered below the default In this case, the system administrator or the user has gone out of their way to protect the system from inefficient (or malicious) applications wasting kernel memory. The current code allows polling up to 1024 file descriptors even if RLIMIT_NOFILE is much lower, which is not what the user or administrator intended. Well-written applications which only poll valid, unique file descriptors will never notice the difference, because they'll hit the limit on open() first. If an application gets broken because of the patch in this case, then it was already poorly/maliciously designed, and allowing it to work in the past was a violation of POSIX and a DoS risk on low-resource systems. With this patch, poll() will permit exactly what POSIX suggests, no more, no less, and for any run-time value set with ulimit -n, not just 256 or 1024. There are existing apps which which poll a large number of file descriptors, some of which may be invalid, and if those numbers stradle 1024, they currently fail with or without the patch in -mm, though they worked fine under 2.4.18. Signed-off-by: Chris Snook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8c6ba51bdad0de0dc2a2e2415d4dac2d0db6c1a1 Author: Eric Sesterhenn Date: Fri Sep 29 02:01:32 2006 -0700 [PATCH] Uninitialized variable in drivers/net/wan/syncppp.c For len equal to 4, we never call sppp_lcp_conf_parse_options(), therefore rmagic does not get initialized. Signed-off-by: Eric Sesterhenn Acked-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04b1db9fd7eea63c9663072feece616ea41b0a79 Author: Ian S. Nelson Date: Fri Sep 29 02:01:31 2006 -0700 [PATCH] /sys/modules: allow full length section names I've been using systemtap for some debugging and I noticed that it can't probe a lot of modules. Turns out it's kind of silly, the sections section of /sys/module is limited to 32byte filenames and many of the actual sections are a a bit longer than that. [akpm@osdl.org: rewrite to use dymanic allocation] Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b5e0cbb4fb6e2a599d72652f56a9acb6af16bcf Author: Matthew Wilcox Date: Fri Sep 29 02:01:30 2006 -0700 [PATCH] SuperH list is moderated I just got a bounce telling me my contributions aren't welcome. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5ddb88c0ab636e6ac0b5e409f6288a814dc87275 Author: Pavel Machek Date: Fri Sep 29 02:01:29 2006 -0700 [PATCH] network block device is mostly known as "NBD" People search maintainers for NBD and then decide it is not maintained. (akpm: ditto LVM. And other things, but I forget what they were) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e9cb8fdab0709c508cd9689bee6916a270191cc Author: Pavel Machek Date: Fri Sep 29 02:01:29 2006 -0700 [PATCH] SubmittingPatches cleanups This cleans up SubmittingPatches a bit. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1497b2749babb01458a6d9dfd4dfb493b3d388f2 Author: Andreas Mohr Date: Fri Sep 29 02:01:28 2006 -0700 [PATCH] lib/ts_fsm.c: constify structs Constify two structs. Correct some typos. Compile-tested and run-tested (module inserted) on 2.6.18-rc4-mm3. Signed-off-by: Andreas Mohr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4050914f7c2665736a82265a029466071a90094e Author: Akinobu Mita Date: Fri Sep 29 02:01:27 2006 -0700 [PATCH] rate limiting for the ldisc open failure messages This patch limits the messages when ldisc open faulures happen. It happens under memory pressure. Signed-off-by: Akinobu Mita Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a036cdd955b695b7e09e6505e6d6eba697f043e Author: Randy Dunlap Date: Fri Sep 29 02:01:26 2006 -0700 [PATCH] Mention Documenation/ABI/ requirements in Documentation/SubmitChecklist Mention Documenation/ABI/ requirements in Documentation/SubmitChecklist. Signed-off-by: Randy Dunlap Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f9e7949f86dfe2bd9a1ad0604f78e7683c059de Author: Hugh Dickins Date: Fri Sep 29 02:01:26 2006 -0700 [PATCH] valid_swaphandles() fix akpm draws my attention to the fact that sysctl(VM_PAGE_CLUSTER) might conceivably change page_cluster to 0 while valid_swaphandles() is in the middle of using it, leading to an embarrassingly long loop: take a local snapshot of page_cluster and work with that. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d1d43f6a43b703587e759145f69467e7c6553a7 Author: Chandra Seetharaman Date: Fri Sep 29 02:01:25 2006 -0700 [PATCH] call mm/page-writeback.c:set_ratelimit() when new pages are hot-added ratelimit_pages in page-writeback.c is recalculated (in set_ratelimit()) every time a CPU is hot-added/removed. But this value is not recalculated when new pages are hot-added. This patch fixes that problem by calling set_ratelimit() when new pages are hot-added. [akpm@osdl.org: cleanups] Signed-off-by: Chandra Seetharaman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 40c99aae23529f3d069ae08836ae46fadb3fd2bd Author: Chandra Seetharaman Date: Fri Sep 29 02:01:24 2006 -0700 [PATCH] remove static variable mm/page-writeback.c:total_pages page-writeback.c has a static local variable "total_pages", which is the total number of pages in the system. There is a global variable "vm_total_pages", which is the total number of pages the VM controls. Both are assigned from the return value of nr_free_pagecache_pages(). This patch removes the local variable and uses the global variable in that place. One more issue with the local static variable "total_pages" is that it is not updated when new pages are hot-added. Since vm_total_pages is updated when new pages are hot-added, this patch fixes that problem too. Signed-off-by: Chandra Seetharaman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 153dcc54df826d2f8413c026313cba673c6bcc5b Author: Geoff Levand Date: Fri Sep 29 02:01:23 2006 -0700 [PATCH] mem driver: fix conditional on isa i/o support This change corrects the logic on the preprocessor conditionals that include support for ISA port i/o (/dev/ioports) into the mem character driver. This fixes the following error when building for powerpc platforms with CONFIG_PCI=n. drivers/built-in.o: undefined reference to `pci_io_base' Signed-off-by: Geoff Levand Acked-by: Linas Vepstas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 781b823e093b6ab3fd489f7d56ed869d27a78c1d Author: Kaz Kojima Date: Fri Sep 29 02:01:22 2006 -0700 [PATCH] SuperH maintainership change I think this is a time to step down from my SUPERH architecture maintainerships. The major development issues for this port seem to shift on the hardwares I can't access and I have no recent activity on kernel. I shouldn't qualify as a maintainer of SUPERH port now and there is no problem because Paul is actively maintaining it. The attached patch drops my name, address and web URL from MAINTAINERS file. Signed-off-by: Kazumoto Kojima Cc: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e518ddb7ba44a3d852c0e41961365844c76eb2bf Author: Andreas Mohr Date: Fri Sep 29 02:01:22 2006 -0700 [PATCH] fs/namei.c: replace multiple current->fs by shortcut variable Replace current->fs by fs helper variable to reduce some indirection overhead and (at least at the moment, before the current_thread_info() %gs PDA improvement is available) get rid of more costly current references. Reduces fs/namei.o from 37786 to 37082 Bytes (704 Bytes saved). [akpm@osdl.org: cleanup] Signed-off-by: Andreas Mohr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c16a02d6f5fcfe05dc6fd40aa80a8e1d055300db Author: Alan Stern Date: Fri Sep 29 02:01:21 2006 -0700 [PATCH] Add section on function return values to CodingStyle This patch (as776) adds a new chapter to Documentation/CodingStyle, explaining the circumstances under which a function should return 0 for failure and non-zero for success as opposed to a negative error code for failure and 0 for success. Signed-off-by: Alan Stern Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fdf8cb0909b531f9ae8f9b9d7e4eb35ba3505f07 Author: Andreas Mohr Date: Fri Sep 29 02:01:20 2006 -0700 [PATCH] lib/rwsem.c: un-inline rwsem_down_failed_common() Un-inlining rwsem_down_failed_common() (two callsites) reduced lib/rwsem.o on my Athlon, gcc 4.1.2 from 5935 to 5480 Bytes (455 Bytes saved). I thus guess that reduced icache footprint (and better function caching) is worth more than any function call overhead. Signed-off-by: Andreas Mohr Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2752e401148a064a23a5a1e92d502d05017a560c Author: Jim Lewis Date: Fri Sep 29 02:01:19 2006 -0700 [PATCH] Add to MAINTAINERS file This patch adds Jim Lewis to the MAINTAINERS file for the Spidernet network driver. Signed-off-by: James K Lewis Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7422bf8a6feee6ec0c130fab7080df0cea86ebc Author: Serge E. Hallyn Date: Fri Sep 29 02:01:18 2006 -0700 [PATCH] loop: forward-port resource leak checks from Solar Forward port of the patch by Solar and ported by Julio. Compiles, boots, and passes my looptorturetest.sh. Signed-off-by: Serge E. Hallyn Cc: Julio Auto Cc: Solar Designer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cdae9695870895dd6be4c7d6d31d8704ea27f064 Author: Andrew Morton Date: Fri Sep 29 02:01:17 2006 -0700 [PATCH] remove sound/oss/COPYING This appears to be a verbatim copy-n-paste of the GPL. Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b1aac8bb824c658ddebd296b088a8bff5029c288 Author: Paul Jackson Date: Fri Sep 29 02:01:17 2006 -0700 [PATCH] cpuset: hotunplug cpus and mems in all cpusets The cpuset code handling hot unplug of CPUs or Memory Nodes was incorrect - it could remove a CPU or Node from the top cpuset, while leaving it still in some child cpusets. One basic rule of cpusets is that each cpusets cpus and mems are subsets of its parents. The cpuset hot unplug code violated this rule. So the cpuset hotunplug handler must walk down the tree, removing any removed CPU or Node from all cpusets. However, it is not allowed to make a cpusets cpus or mems become empty. They can only transition from empty to non-empty, not back. So if the last CPU or Node would be removed from a cpuset by the above walk, we scan back up the cpuset hierarchy, finding the nearest ancestor that still has something online, and copy its CPU or Memory placement. Signed-off-by: Paul Jackson Cc: Nathan Lynch Cc: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 38837fc75acb7fa9b0e111b0241fe4fe76c5d4b3 Author: Paul Jackson Date: Fri Sep 29 02:01:16 2006 -0700 [PATCH] cpuset: top_cpuset tracks hotplug changes to node_online_map Change the list of memory nodes allowed to tasks in the top (root) nodeset to dynamically track what cpus are online, using a call to a cpuset hook from the memory hotplug code. Make this top cpus file read-only. On systems that have cpusets configured in their kernel, but that aren't actively using cpusets (for some distros, this covers the majority of systems) all tasks end up in the top cpuset. If that system does support memory hotplug, then these tasks cannot make use of memory nodes that are added after system boot, because the memory nodes are not allowed in the top cpuset. This is a surprising regression over earlier kernels that didn't have cpusets enabled. One key motivation for this change is to remain consistent with the behaviour for the top_cpuset's 'cpus', which is also read-only, and which automatically tracks the cpu_online_map. This change also has the minor benefit that it fixes a long standing, little noticed, minor bug in cpusets. The cpuset performance tweak to short circuit the cpuset_zone_allowed() check on systems with just a single cpuset (see 'number_of_cpusets', in linux/cpuset.h) meant that simply changing the 'mems' of the top_cpuset had no affect, even though the change (the write system call) appeared to succeed. With the following change, that write to the 'mems' file fails -EACCES, and the 'mems' file stubbornly refuses to be changed via user space writes. Thus no one should be mislead into thinking they've changed the top_cpusets's 'mems' when in affect they haven't. In order to keep the behaviour of cpusets consistent between systems actively making use of them and systems not using them, this patch changes the behaviour of the 'mems' file in the top (root) cpuset, making it read only, and making it automatically track the value of node_online_map. Thus tasks in the top cpuset will have automatic use of hot plugged memory nodes allowed by their cpuset. [akpm@osdl.org: build fix] [bunk@stusta.de: build fix] Signed-off-by: Paul Jackson Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af3ffa6758dbd2ab7ebe62dddf66b3aa94d64eeb Author: Pavel Machek Date: Fri Sep 29 02:01:14 2006 -0700 [PATCH] Fix typo in rtc kconfig Fix simple typo in RTC_HCTOSYS option. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b78483a4ba60d5d90930262a533a784e1d9df660 Author: Nick Piggin Date: Fri Sep 29 02:01:14 2006 -0700 [PATCH] oom: don't kill current when another OOM in progress A previous patch to allow an exiting task to OOM kill itself (and thereby avoid a little deadlock) introduced a problem. We don't want the PF_EXITING task, even if it is 'current', to access mem reserves if there is already a TIF_MEMDIE process in the system sucking up reserves. Also make the commenting a little bit clearer, and note that our current scheme of effectively single threading the OOM killer is not itself perfect. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 01017a227044d64face2588fab9427a1da1bdb9f Author: Oleg Nesterov Date: Fri Sep 29 02:01:13 2006 -0700 [PATCH] oom_kill_task(): cleanup ->mm checks - It is not possible to have task->mm == &init_mm. - task_lock() buys nothing for 'if (!p->mm)' check. Signed-off-by: Oleg Nesterov Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 972c4ea59c9dbf82647ee9665d9e945241911a51 Author: Oleg Nesterov Date: Fri Sep 29 02:01:12 2006 -0700 [PATCH] select_bad_process(): cleanup 'releasing' check No logic changes, but imho easier to read. Signed-off-by: Oleg Nesterov Acked-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28324d1df646521256e83389244adcce98e89ff2 Author: Oleg Nesterov Date: Fri Sep 29 02:01:12 2006 -0700 [PATCH] select_bad_process(): kill a bogus PF_DEAD/TASK_DEAD check The only one usage of TASK_DEAD outside of last schedule path, select_bad_process: for_each_task(p) { if (!p->mm) continue; ... if (p->state == TASK_DEAD) continue; ... TASK_DEAD state is set at the end of do_exit(), this means that p->mm was already set == NULL by exit_mm(), so this task was already rejected by 'if (!p->mm)' above. Note also that the caller holds tasklist_lock, this means that p can't pass exit_notify() and then set TASK_DEAD when p->mm != NULL. Also, remove open-coded is_init(). Signed-off-by: Oleg Nesterov Cc: Ingo Molnar Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c394cc9fbb367f87faa2228ec2eabacd2d4701c6 Author: Oleg Nesterov Date: Fri Sep 29 02:01:11 2006 -0700 [PATCH] introduce TASK_DEAD state I am not sure about this patch, I am asking Ingo to take a decision. task_struct->state == EXIT_DEAD is a very special case, to avoid a confusion it makes sense to introduce a new state, TASK_DEAD, while EXIT_DEAD should live only in ->exit_state as documented in sched.h. Note that this state is not visible to user-space, get_task_state() masks off unsuitable states. Signed-off-by: Oleg Nesterov Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 55a101f8f71a3d3dbda7b5c77083ffe47552f831 Author: Oleg Nesterov Date: Fri Sep 29 02:01:10 2006 -0700 [PATCH] kill PF_DEAD flag After the previous change (->flags & PF_DEAD) <=> (->state == EXIT_DEAD), we don't need PF_DEAD any longer. Signed-off-by: Oleg Nesterov Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 29b884921634e1e01cbd276e1c9b8fc07a7e4a90 Author: Oleg Nesterov Date: Fri Sep 29 02:01:09 2006 -0700 [PATCH] set EXIT_DEAD state in do_exit(), not in schedule() schedule() checks PF_DEAD on every context switch and sets ->state = EXIT_DEAD to ensure that the exiting task will be deactivated. Note that this EXIT_DEAD is in fact a "random" value, we can use any bit except normal TASK_XXX values. It is better to set this state in do_exit() along with PF_DEAD flag and remove that check in schedule(). We are safe wrt concurrent try_to_wake_up() (for example ptrace, tkill), it can not change task's ->state: the 'state' argument of try_to_wake_up() can't have EXIT_DEAD bit. And in case when try_to_wake_up() sees a stale value of ->state == TASK_RUNNING it will do nothing. Signed-off-by: Oleg Nesterov Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8106b941ceab68cc5ff713df7b1276484554584 Author: Arjan van de Ven Date: Fri Sep 29 02:01:08 2006 -0700 [PATCH] lockdep: core, add enable/disable_irq_irqsave/irqrestore() APIs Introduce the disable_irq_nosync_lockdep_irqsave() and enable_irq_lockdep_irqrestore() APIs. These are needed for NE2000; basically NE2000 calls disable_irq and enable_irq as locking against the IRQ handler, but both in cases where interrupts are on and off. This means that lockdep needs to track the old state of the virtual irq flags on disable_irq, and restore these at enable_irq time. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6ea36ddbd1abfe867f1e874a8312bfd811e5fd2c Author: Alexey Dobriyan Date: Fri Sep 29 02:01:07 2006 -0700 [PATCH] Ban register_filesystem(NULL); Everyone passes valid pointer there. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d826380b305971ff9825ef005ff039d655542bbb Author: Alexey Dobriyan Date: Fri Sep 29 02:01:06 2006 -0700 [PATCH] 9p: fix leak on error path If register_filesystem() fails mux workqueue must be killed. Signed-off-by: Alexey Dobriyan Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 368bdb3d616fa352971f45b423ae6344715e620b Author: Alexey Dobriyan Date: Fri Sep 29 02:01:05 2006 -0700 [PATCH] cramfs: make cramfs_uncompress_exit() return void It always returns 0, so relying on it is useless. The only caller isn't checking return value. In general, un-, de-, -free functions should return void. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4376e13ce07774be14e83fe501ef5c8500b83a1 Author: Alexey Dobriyan Date: Fri Sep 29 02:01:04 2006 -0700 [PATCH] freevxfs: fix leak on error path If register_filesystem() fails, vxfs_inode cache must be destroyed. Signed-off-by: Alexey Dobriyan Acked-by: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 50d44ed009a628e6d5c784fae18ea743d7cf199a Author: Alexey Dobriyan Date: Fri Sep 29 02:01:04 2006 -0700 [PATCH] cramfs: rewrite init_cramfs_fs() Two lines -- two bugs. :-( Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dcc8e559ee5ae03fa6bdb8611d76d86d0083e793 Author: Josh Triplett Date: Fri Sep 29 02:01:03 2006 -0700 [PATCH] Pass a lock expression to __cond_lock, like __acquire and __release Currently, __acquire and __release take a lock expression, but __cond_lock takes only a condition, not the lock acquired if the expression evaluates to true. Change __cond_lock to accept a lock expression, and change all the callers to pass in a lock expression. Signed-off-by: Josh Triplett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7d2c502f141042f6e5d145aa40107685d751e5a3 Author: Randy Dunlap Date: Fri Sep 29 02:01:02 2006 -0700 [PATCH] doc: fix kernel-parameters 'quiet' Fix "quiet" parameter doc. No trailing '=' sign, no value after it. And it disables "most" kernel messages, not all of them. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f7ca54f486d3b07f48b8bbc92705bde6ba98ee54 Author: Frederik Deweerdt Date: Fri Sep 29 02:01:02 2006 -0700 [PATCH] fix mem_write() return value At the beginning of the routine, "copied" is set to 0, but it is no good because in lines 805 and 812 it is set to other values. Finally, the routine returns as if it copied 12 (=ENOMEM) bytes less than it actually did. Signed-off-by: Frederik Deweerdt Acked-by: Eric Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 87d7c8aca8670a772f74766c19e0345a606b67a9 Author: Jason Baron Date: Fri Sep 29 02:01:01 2006 -0700 [PATCH] block_dev.c mutex_lock_nested() fix In the case below we are locking the whole disk not a partition. This change simply brings the code in line with the piece above where when we are the 'first' opener, and we are a partition. Signed-off-by: Jason Baron Acked-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 303912e2a32aa73785b4c4dee15466d944a38a46 Author: Josh Triplett Date: Fri Sep 29 02:01:00 2006 -0700 [PATCH] Replace _spin_trylock with spin_trylock in the IRQ variants to use __cond_lock spin_trylock_irq and spin_trylock_irqsave use _spin_trylock, which does not use the __cond_lock wrapper annotation and thus does not affect the lock context; change them to use spin_trylock instead, which does use __cond_lock. Signed-off-by: Josh Triplett Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f50b93f066f8dc339de9b0eb78a22a75e6c8f8f Author: Josh Triplett Date: Fri Sep 29 02:00:59 2006 -0700 [PATCH] Make spinlock/rwlock annotations more accurate by using parameters, not types The lock annotations used on spinlocks and rwlocks currently use __{acquires,releases}(spinlock_t) and __{acquires,releases}(rwlock_t), respectively. This loses the information of which lock actually got acquired or released, and assumes a different type for the parameter of __acquires and __releases than the rest of the kernel. While the current implementations of __acquires and __releases throw away their argument, this will not always remain the case. Change this to use the lock parameter instead, to preserve this information and increase consistency in usage of __acquires and __releases. Signed-off-by: Josh Triplett Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 92e9a8507ba81ff9e25bd9c5030ff8586269eefb Author: Alexey Dobriyan Date: Fri Sep 29 02:00:58 2006 -0700 [PATCH] windfarm_smu_sat.c: simplify around i2c_add_driver() Signed-off-by: Alexey Dobriyan Acked-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28298232a15c48ea9835d5d24577cde87923e55c Author: Alan Cox Date: Fri Sep 29 02:00:58 2006 -0700 [PATCH] tty: Fix bits and note more bits to fix If your driver implements "break on" and "break off" this ensures you won't get multiple overlapping requests or requests in parallel. If your driver has its own break handling then its still your problem as the driver author. Break is also now serialized against writes from user space properly but no new guarantees are made driver level about writes from the line discipline itself (eg flow control or echo) Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit de2a84f2be8ed8a166f13d6aa2ae474541172bb2 Author: Alan Cox Date: Fri Sep 29 02:00:57 2006 -0700 [PATCH] solaris emulation: incorrect tty locking [akpm@osdl.org: build fix] [akpm@osdl.org: warning fix] Signed-off-by: Alan Cox Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 074a5dde04abc66eea30368c74913d83b1a410f9 Author: Henrik Kretzschmar Date: Fri Sep 29 02:00:56 2006 -0700 [PATCH] docbook: fix segfault in docproc.c Adds a missing exit, if the file that should be parsed couldn't be opened. Without it crashes with a segfault, cause the filedescriptor is accessed even if the file could not be opened. Signed-off-by: Henrik Kretzschmar Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aaa2a97eb9c0e91d7abc66bf76811a9599fdb3ee Author: Oleg Nesterov Date: Fri Sep 29 02:00:55 2006 -0700 [PATCH] sys_get_robust_list(): don't take tasklist_lock use rcu locks for find_task_by_pid(). Signed-off-by: Oleg Nesterov Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d359b549bf3d7f42f0084918a4816ea4572e507c Author: Oleg Nesterov Date: Fri Sep 29 02:00:55 2006 -0700 [PATCH] futex_find_get_task(): don't take tasklist_lock It is ok to do find_task_by_pid() + get_task_struct() under rcu_read_lock(), we cand drop tasklist_lock. Note that testing of ->exit_state is racy with or without tasklist anyway. Signed-off-by: Oleg Nesterov Acked-by: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 44938af6e08580514abce8bea23ae1c034ea0b1d Author: Ian Kent Date: Fri Sep 29 02:00:54 2006 -0700 [PATCH] autofs4: pending flag not cleared on mount fail During testing I've found that the mount pending flag can be left set at exit from autofs4_lookup after a failed mount request. This shouldn't be allowed to happen and causes incorrect error returns. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be3ca7fecb1a9903c6253f49aec0af2a0f3a04e4 Author: Ian Kent Date: Fri Sep 29 02:00:53 2006 -0700 [PATCH] autofs4: autofs4_follow_link false negative fix The check for an empty directory in the autofs4_follow_link method fails occassionally due to old dentrys. We had the same problem autofs4_revalidate ages ago. I thought we wouldn't need this in autofs4_follow_link, silly me. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b160f5ecd2f1b6df2e0015dc1f319c8ef803d62 Author: Oleg Nesterov Date: Fri Sep 29 02:00:52 2006 -0700 [PATCH] copy_process: cosmetic ->ioprio tweak copy_process: // holds tasklist_lock + ->siglock /* * inherit ioprio */ p->ioprio = current->ioprio; Why? ->ioprio was already copied in dup_task_struct(). I guess this is needed to ensure that the child can't escape sys_ioprio_set(IOPRIO_WHO_{PGRP,USER}), yes? In that case we don't need ->siglock held, and the comment should be updated. Signed-off-by: Oleg Nesterov Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c573afebc6213e4372e0d8352034c23d5262e1f Author: Oleg Nesterov Date: Fri Sep 29 02:00:51 2006 -0700 [PATCH] reparent_to_init(): use has_rt_policy() Remove open-coded has_rt_policy(), no changes in kernel/exit.o Signed-off-by: Oleg Nesterov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Steven Rostedt Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8dc3e9099e01dfdd53f27f329c268eced03dfef6 Author: Oleg Nesterov Date: Fri Sep 29 02:00:50 2006 -0700 [PATCH] sched_setscheduler: fix? policy checks I am not sure this patch is correct: I can't understand what the current code does, and I don't know what it was supposed to do. The comment says: * can't change policy, except between SCHED_NORMAL * and SCHED_BATCH: The code: if (((policy != SCHED_NORMAL && p->policy != SCHED_BATCH) && (policy != SCHED_BATCH && p->policy != SCHED_NORMAL)) && But this is equivalent to: if ( (is_rt_policy(policy) && has_rt_policy(p)) && which means something different. We can't _decrease_ the current ->rt_priority with such a check (if rlim[RLIMIT_RTPRIO] == 0). Probably, it was supposed to be: if ( !(policy == SCHED_NORMAL && p->policy == SCHED_BATCH) && !(policy == SCHED_BATCH && p->policy == SCHED_NORMAL) this matches the comment, but strange: it doesn't allow to _drop_ the realtime priority when rlim[RLIMIT_RTPRIO] == 0. I think the right check would be: /* can't set/change rt policy */ if (is_rt_policy(policy) && policy != p->policy && !rlim_rtprio) return -EPERM; Signed-off-by: Oleg Nesterov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Steven Rostedt Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 57a6f51c4281aa3119975473c70dce0480d322bd Author: Oleg Nesterov Date: Fri Sep 29 02:00:49 2006 -0700 [PATCH] introduce is_rt_policy() helper Imho, makes the code a bit easier to read. Signed-off-by: Oleg Nesterov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Steven Rostedt Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5fe1d75f34974046fffcca5e22fb8a7b42fded33 Author: Oleg Nesterov Date: Fri Sep 29 02:00:48 2006 -0700 [PATCH] do_sched_setscheduler(): don't take tasklist_lock Use rcu locks instead. sched_setscheduler() now takes ->siglock before reading ->signal->rlim[]. Signed-off-by: Oleg Nesterov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Steven Rostedt Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c9472e0f28cd2f0695a0ac3a0b4bd33f21714a7e Author: Cal Peake Date: Fri Sep 29 02:00:47 2006 -0700 [PATCH] kill extraneous printk in kernel_restart() Get rid of an extraneous printk in kernel_restart(). Signed-off-by: Cal Peake Acked-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 111dbe0c8a21dffa473239861be47ebc87f593b3 Author: Björn Steinbrink Date: Fri Sep 29 02:00:46 2006 -0700 [PATCH] Fix ____call_usermodehelper errors being silently ignored If ____call_usermodehelper fails, we're not interested in the child process' exit value, but the real error, so let's stop wait_for_helper from overwriting it in that case. Issue discovered by Benedikt Böhm while working on a Linux-VServer usermode helper. Signed-off-by: Björn Steinbrink Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3e26a423e78c1bb1ebd29c49d4ae4ccbbacd861b Author: Rolf Eike Beer Date: Fri Sep 29 02:00:46 2006 -0700 [PATCH] Return better error codes if drivers/char/raw.c module init fails Currently this module just returns 1 if anything on module init fails. Store the error code of the different function calls and return their error on problems. Signed-off-by: Rolf Eike Beer Cc: Greg KH Signed-off-by: Andrew Morton [ Fixed to not unregister twice on error ] Signed-off-by: Linus Torvalds commit 416bc51292f977b43b010c6dd937522b90062390 Author: Roland McGrath Date: Fri Sep 29 02:00:45 2006 -0700 [PATCH] Use decimal for PTRACE_ATTACH and PTRACE_DETACH. It is sure confusing that linux/ptrace.h has: #define PTRACE_SINGLESTEP 9 #define PTRACE_ATTACH 0x10 #define PTRACE_DETACH 0x11 #define PTRACE_SYSCALL 24 All the low-numbered constants are in decimal, but the last two in hex. It sure makes it likely that someone will look at this and think that 9, 10, 11 are used, and that 16 and 17 are not used. How about we use the same notation for all the numbers [0,24] in the same short list? Signed-off-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cf3e43dbe0cc4a7ee7f6ab1bb5231dcfda164e02 Author: Jonathan Corbet Date: Fri Sep 29 02:00:44 2006 -0700 [PATCH] cdev documentation Add some documentation comments for the cdev interface. Signed-off-by: Jonathan Corbet Cc: Rolf Eike Beer Acked-by: "Randy.Dunlap" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5785c95baede8459d70c4aa0f7becb6e8b5fde4b Author: Arjan van de Ven Date: Fri Sep 29 02:00:43 2006 -0700 [PATCH] tty: make termios_sem a mutex [akpm@osdl.org: fix] Cc: Alan Cox Cc: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 54306cf04c0ea0a8c432603dbc657ab62a438668 Author: Alan Cox Date: Fri Sep 29 02:00:42 2006 -0700 [PATCH] exit: fix crash case If we are going to BUG() not panic() here then we should cover the case of the BUG being compiled out Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3cfd0885fac78c130a119ed576d18b5948fa2a5a Author: Alan Cox Date: Fri Sep 29 02:00:41 2006 -0700 [PATCH] tty: stop the tty vanishing under procfs access Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 808a0d389ff8d85017ec811085a6083394c02caf Author: Alan Cox Date: Fri Sep 29 02:00:40 2006 -0700 [PATCH] tty: lock ticogwinsz Now we lock the set ioctl its trivial to lock the get one so the data copied is consistent. At the moment we have the BKL here but this removes the need for it and is a step in the right direction Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1266b1e1aed0a4d7d5cb569deca8c31cba34a990 Author: Alan Cox Date: Fri Sep 29 02:00:40 2006 -0700 [PATCH] tty: trivial kzalloc opportunity Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b4a8a789a328af6aac613734c362cf6aad72201 Author: Roland McGrath Date: Fri Sep 29 02:00:39 2006 -0700 [PATCH] kexec warning fix This fixes a couple of compiler warnings, and adds paranoia checks as well. Signed-off-by: Roland McGrath Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3171a0305d62e6627a24bff35af4f997e4988a80 Author: Atsushi Nemoto Date: Fri Sep 29 02:00:32 2006 -0700 [PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem) Pass ticks to do_timer() and update_times(), and adjust x86_64 and s390 timer interrupt handler with this change. Currently update_times() calculates ticks by "jiffies - wall_jiffies", but callers of do_timer() should know how many ticks to update. Passing ticks get rid of this redundant calculation. Also there are another redundancy pointed out by Martin Schwidefsky. This cleanup make a barrier added by 5aee405c662ca644980c184774277fc6d0769a84 needless. So this patch removes it. As a bonus, this cleanup make wall_jiffies can be removed easily, since now wall_jiffies is always synced with jiffies. (This patch does not really remove wall_jiffies. It would be another cleanup patch) Signed-off-by: Atsushi Nemoto Cc: Martin Schwidefsky Cc: "Eric W. Biederman" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: john stultz Cc: Andi Kleen Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Richard Henderson Cc: Ivan Kokshaysky Acked-by: Russell King Cc: Ian Molton Cc: Mikael Starvik Acked-by: David Howells Cc: Yoshinori Sato Cc: Hirokazu Takata Acked-by: Ralf Baechle Cc: Kyle McMartin Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Richard Curnow Cc: William Lee Irwin III Cc: "David S. Miller" Cc: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Miles Bader Cc: Chris Zankel Acked-by: "Luck, Tony" Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27d91e07f9b863fa94491ffafe250580f0c2ce78 Author: Roland McGrath Date: Fri Sep 29 02:00:31 2006 -0700 [PATCH] __dequeue_signal() cleanup This tightens up __dequeue_signal a little. It also avoids doing recalc_sigpending twice in a row, instead doing it once in dequeue_signal. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b9ecb2bd5d3ab8904752685696cb76aac1f3fef2 Author: Roland McGrath Date: Fri Sep 29 02:00:31 2006 -0700 [PATCH] has_stopped_jobs() cleanup This check has been obsolete since the introduction of TASK_TRACED. Now TASK_STOPPED always means job control stop. Signed-off-by: Roland McGrath Cc: Oleg Nesterov Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb50ae7446abb35184be029c51f825e45a4e0670 Author: Joel & Rebecca VanderZee Date: Fri Sep 29 02:00:30 2006 -0700 [PATCH] I/O Error attempting to read last partial block of a file in an ISO9660 file system There was an I/O error that prevented reading the last partial block of large files in an ISO9660 filesystem. The error was generated when a file comprised more than one section and had a size that was not an exact multiple of the filesystem block size. This patch removes the check (and failure) for reading into the last partial block (and possibly beyond) for multiple-section files. It worked in my testing to prevent reading beyond the end of the section; my first patch just incremented the sect_size block count for a partial block and continued doing the check. But there is a commment in the source code about reading beyond the end of the file to fill a page cache. Failing to access beyond the section would prevent reading beyond the end of the file. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e4b765551aa6355eae60b644bed851a9477c4e2b Author: Toyo Abe Date: Fri Sep 29 02:00:29 2006 -0700 [PATCH] posix-timers: Fix the flags handling in posix_cpu_nsleep() When a posix_cpu_nsleep() sleep is interrupted by a signal more than twice, it incorrectly reports the sleep time remaining to the user. Because posix_cpu_nsleep() doesn't report back to the user when it's called from restart function due to the wrong flags handling. This patch, which applies after previous one, moves the nanosleep() function from posix_cpu_nsleep() to do_cpu_nanosleep() and cleans up the flags handling appropriately. Signed-off-by: Toyo Abe Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1711ef3866b0360e102327389fe4b76c849bbe83 Author: Toyo Abe Date: Fri Sep 29 02:00:28 2006 -0700 [PATCH] posix-timers: Fix clock_nanosleep() doesn't return the remaining time in compatibility mode The clock_nanosleep() function does not return the time remaining when the sleep is interrupted by a signal. This patch creates a new call out, compat_clock_nanosleep_restart(), which handles returning the remaining time after a sleep is interrupted. This patch revives clock_nanosleep_restart(). It is now accessed via the new call out. The compat_clock_nanosleep_restart() is used for compatibility access. Since this is implemented in compatibility mode the normal path is virtually unaffected - no real performance impact. Signed-off-by: Toyo Abe Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9c4751fd0eab5b8ebbfafb28cbcc8e03b0da5933 Author: jens m. noedler Date: Fri Sep 29 02:00:27 2006 -0700 [PATCH] update Documentation/kernel-parameters.txt Signed-off-by: jens m. noedler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b525a7e4445c4702dfc541930747517615c0c72a Author: Jan Kara Date: Fri Sep 29 02:00:26 2006 -0700 [PATCH] dquot: add proper locking when using current->signal->tty Dquot passes the tty to tty_write_message without locking Signed-off-by: Jan Kara Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 254e948b2908dd50df9dca4e6ed14b6cc8524fc9 Author: Catalin Marinas Date: Fri Sep 29 02:00:25 2006 -0700 [PATCH] Fix memory leak in vc_resize/vc_allocate Memory leaks can happen in the vc_resize() function in drivers/char/vt.c because of the vc->vc_screenbuf variable overriding in vc_allocate(). The kmemleak reported trace is as follows: <__kmalloc> This patch no longer allocates a screen buffer in vc_allocate() if it was already allocated by vc_resize(). Signed-off-by: Catalin Marinas Acked-by: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bce9a234ce7d8dddbfcec28e37ea58b5d8f6003d Author: Oleg Nesterov Date: Fri Sep 29 02:00:25 2006 -0700 [PATCH] elf_fdpic_core_dump: don't take tasklist_lock do_each_thread() is rcu-safe, and all tasks which use this ->mm must sleep in wait_for_completion(&mm->core_done) at this point, so we can use RCU locks. Also, remove unneeded INIT_LIST_HEAD(new) before list_add(new, head). Signed-off-by: Oleg Nesterov Acked-By: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 486ccb05fdbb7ca79784fdf0d07d2a86de48cf05 Author: Oleg Nesterov Date: Fri Sep 29 02:00:24 2006 -0700 [PATCH] elf_core_dump: don't take tasklist_lock do_each_thread() is rcu-safe, and all tasks which use this ->mm must sleep in wait_for_completion(&mm->core_done) at this point, so we can use RCU locks. Also, remove unneeded INIT_LIST_HEAD(new) before list_add(new, head). Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b22b4cdd53f5e1ee9ef1ef7933ddb77065859d05 Author: Peter Korsgaard Date: Fri Sep 29 02:00:23 2006 -0700 [PATCH] fix serial/amba-pl011.c console Kconfig Fix the Kconfig entry for console on AMBA PL011 to match the code. Signed-off-by: Peter Korsgaard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 07dccf3344010f9b9df7fe725da7e73bca2992df Author: Akinobu Mita Date: Fri Sep 29 02:00:22 2006 -0700 [PATCH] check return value of cpu_callback Spawing ksoftirqd, migration, or watchdog, and calling init_timers_cpu() may fail with small memory. If it happens in initcalls, kernel NULL pointer dereference happens later. This patch makes crash happen immediately in such cases. It seems a bit better than getting kernel NULL pointer dereference later. Cc: Ingo Molnar Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6c2d8b5dcad468cb0bdec3368b53383bde51e487 Author: Tobias Klauser Date: Fri Sep 29 02:00:21 2006 -0700 [PATCH] sound/sparc/dbri: Use ARRAY_SIZE macro Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ad3479decccd12301a3f9920a22fa567d4bdae8 Author: Tobias Klauser Date: Fri Sep 29 02:00:20 2006 -0700 [PATCH] sound/mips/au1x00: Use ARRAY_SIZE macro Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) Signed-off-by: Tobias Klauser Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d202a6c0883cf17a4a6e61a12e138598ec3ed32d Author: Ben Dooks Date: Fri Sep 29 02:00:19 2006 -0700 [PATCH] Remove old drivers/char/s3c2410_rtc.c This can now be removed, since there is now a drivers/rtc/rtc-s3c.c driver. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99f932f02627b211f7efa9602ddc389d1ccbed2b Author: Alexey Dobriyan Date: Fri Sep 29 02:00:18 2006 -0700 [PATCH] CONFIG_PM=n slim: sound/oss/cs46xx.c Remove some code which is unneeded if CONFIG_PM=n. * Make suspend/resume registration look like the rest of drivers: #ifdef CONFIG_PM in struct pci_driver, prototypes, actual hooks. * Drop CS46XX_ACPI_SUPPORT. It logically duplicated CONFIG_PM. It was hardcoded to 1 approx forever (ALSA merge just moved driver to sound/oss/). * After previous point, sound/oss/cs46xxpm-24.h removed as being useless. * As side effect selling (unused) static inline functions as suspend/resume hooks funkiness removed too. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aadcc2eef70640302805a6bb8c0f2a485779eea3 Author: Alexey Dobriyan Date: Fri Sep 29 02:00:16 2006 -0700 [PATCH] CONFIG_PM=n slim: sound/oss/trident.c Remove some code which is unneeded if CONFIG_PM=n. Signed-off-by: Alexey Dobriyan Ackde-by: Muli Ben-Yehuda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7dd7d6912b8a978878847fdcd3feef0d1b6471de Author: Alexey Dobriyan Date: Fri Sep 29 02:00:16 2006 -0700 [PATCH] CONFIG_PM=n slim: drivers/parport/parport_serial.c Remove some code which is unneeded if CONFIG_PM=n. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af410fc13d95f079910fc3dca7496590c3275967 Author: Johannes Berg Date: Fri Sep 29 02:00:14 2006 -0700 [PATCH] make leds.h include relevant headers Make it possible to include linux/leds.h without first including list.h and spinlock.h. Signed-off-by: Johannes Berg Acked-by: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3ca212b813299899d2968aa0a24a797c3746f5ec Author: Dave Jones Date: Fri Sep 29 02:00:14 2006 -0700 [PATCH] Remove another config.h After the asm/ uses of #include this one is the next biggest source of noise. Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ee731f4f7880b09ca147008ab46ad4e5f72cb8bf Author: Ernie Petrides Date: Fri Sep 29 02:00:13 2006 -0700 [PATCH] fix wrong error code on interrupted close syscalls The problem is that close() syscalls can call a file system's flush handler, which in turn might sleep interruptibly and ultimately pass back an -ERESTARTSYS return value. This happens for files backed by an interruptible NFS mount under nfs_file_flush() when a large file has just been written and nfs_wait_bit_interruptible() detects that there is a signal pending. I have a test case where the "strace" command is used to attach to a process sleeping in such a close(). Since the SIGSTOP is forced onto the victim process (removing it from the thread's "blocked" mask in force_sig_info()), the RPC wait is interrupted and the close() is terminated early. But the file table entry has already been cleared before the flush handler was called. Thus, when the syscall is restarted, the file descriptor appears closed and an EBADF error is returned (which is wrong). What's worse, there is the hypothetical case where another thread of a multi-threaded application might have reused the file descriptor, in which case that file would be mistakenly closed. The bottom line is that close() syscalls are not restartable, and thus -ERESTARTSYS return values should be mapped to -EINTR. This is consistent with the close(2) manual page. The fix is below. Signed-off-by: Ernie Petrides Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7bbab9166a82d15442357cfd63ec530b5b5fb62e Author: Jesper Juhl Date: Fri Sep 29 02:00:12 2006 -0700 [PATCH] Small update to CREDITS Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a45bce49545739a940f8bd4ca85c3b7435564893 Author: Paul E. McKenney Date: Fri Sep 29 02:00:11 2006 -0700 [PATCH] memory ordering in __kfifo primitives Both __kfifo_put() and __kfifo_get() have header comments stating that if there is but one concurrent reader and one concurrent writer, locking is not necessary. This is almost the case, but a couple of memory barriers are needed. Another option would be to change the header comments to remove the bit about locking not being needed, and to change the those callers who currently don't use locking to add the required locking. The attachment analyzes this approach, but the patch below seems simpler. Signed-off-by: Paul E. McKenney Cc: Stelian Pop Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99de055ac065e19ed69de961e97c6336a261b34e Author: Dave Jones Date: Fri Sep 29 02:00:10 2006 -0700 [PATCH] lockdep: print kernel version Lets do the same thing we do for oopses - print out the version in the report. It's an extra line of output though. We could tack it on the end of the INFO: lines, but that screws up Ingo's pretty output. Signed-off-by: Dave Jones Cc: Ingo Molnar Cc: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2b33b4dcbe5e09e683eef281f72aef951e17061c Author: Anatoli Antonovitch Date: Fri Sep 29 02:00:09 2006 -0700 [PATCH] atiixp: ATI SB600 IDE support for various modes Support SB600 SATA legacy IDE (DMA enable). Signed-off-by: Anatoli Antonovitch Cc: Jeff Garzik Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 01d553d0fe9f90a132c5ff494872be8d4126be1e Author: Amos Waterland Date: Fri Sep 29 02:00:08 2006 -0700 [PATCH] Chardev checking of overlapping ranges The code in __register_chrdev_region checks that if the driver wishing to register has the same major as an existing driver the new minor range is strictly less than the existing minor range. However, it does not also check that the new minor range is strictly greater than the existing minor range. That is, if driver X has registered with major=x and minor=0-3, __register_chrdev_region will allow driver Y to register with major=x and minor=1-4. Signed-off-by: Amos Waterland Cc: Linas Vepstas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f400e198b2ed26ce55b22a1412ded0896e7516ac Author: Sukadev Bhattiprolu Date: Fri Sep 29 02:00:07 2006 -0700 [PATCH] pidspace: is_init() This is an updated version of Eric Biederman's is_init() patch. (http://lkml.org/lkml/2006/2/6/280). It applies cleanly to 2.6.18-rc3 and replaces a few more instances of ->pid == 1 with is_init(). Further, is_init() checks pid and thus removes dependency on Eric's other patches for now. Eric's original description: There are a lot of places in the kernel where we test for init because we give it special properties. Most significantly init must not die. This results in code all over the kernel test ->pid == 1. Introduce is_init to capture this case. With multiple pid spaces for all of the cases affected we are looking for only the first process on the system, not some other process that has pid == 1. Signed-off-by: Eric W. Biederman Signed-off-by: Sukadev Bhattiprolu Cc: Dave Hansen Cc: Serge Hallyn Cc: Cedric Le Goater Cc: Acked-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 959ed340f4867fda7684340625f60e211c2296d6 Author: Eric Biederman Date: Fri Sep 29 02:00:06 2006 -0700 [PATCH] Fix conflict with the is_init identifier on parisc This appears to be the only usage of is_init in the kernel besides the usage in sched.h. On ia64 the same function is called in_init. So to remove the conflict and make the kernel more consistent rename is_init is_core is_local and is_local_section to in_init in_core in_local and in_local_section respectively. Thanks to Adrian Bunk who spotted this, and to Matthew Wilcox who suggested this fix. Signed-off-by: Eric Biederman Cc: Kyle McMartin Cc: Matthew Wilcox Cc: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b9b8ab65d8eed784b9164d03807cb2bda7b5cd6 Author: Kirill Korotaev Date: Fri Sep 29 02:00:05 2006 -0700 [PATCH] Fix unserialized task->files changing Fixed race on put_files_struct on exec with proc. Restoring files on current on error path may lead to proc having a pointer to already kfree-d files_struct. ->files changing at exit.c and khtread.c are safe as exit_files() makes all things under lock. Found during OpenVZ stress testing. [akpm@osdl.org: add export] Signed-off-by: Pavel Emelianov Signed-off-by: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc09561d6392771a392dea55c287de7e849b6b63 Author: Serge E. Hallyn Date: Fri Sep 29 02:00:04 2006 -0700 [PATCH] kthread: convert arch/i386/kernel/apm.c Convert i386 apm.c from kernel_thread(), whose export is deprecated, to kthread API. Signed-off-by: Serge E. Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca9bda00b4aafc42cd3d1b9d32934463e2993b4c Author: Alan Cox Date: Fri Sep 29 02:00:03 2006 -0700 [PATCH] tty locking on resize The current kernel serializes console resizes but does not serialize the resize against the tty structure updates. This means that while two parallel resizes cannot mess up the console you can get incorrect results reported. Secondly while doing this I added vc_lock_resize() to lock and resize the console. This leaves all knowledge of the console_sem in the vt/console driver and kicks it out of the tty layer, which is good Thirdly while doing this I decided I couldn't stand "disallocate" any longer so I switched it to "deallocate". Signed-off-by: Alan Cox Cc: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae78bf9c4f5fde3c67e2829505f195d7347ce3e4 Author: Chris Mason Date: Fri Sep 29 02:00:03 2006 -0700 [PATCH] add -o flush for fat Fat is commonly used on removable media. Mounting with -o flush tells the FS to write things to disk as quickly as possible. It is like -o sync, but much faster (and not as safe). Signed-off-by: Chris Mason Cc: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b77df08a36d989f7dd00ccb6a026a0e96170d16 Author: Arun Sharma Date: Fri Sep 29 02:00:01 2006 -0700 [PATCH] oprofile: ppro: need to enable/disable all the counters Need to enable/disable all the counters instead of just counter 0. This affects all cpus with family=6, including i386/core. Usual symptom: only counter 0 provides samples. Other counters don't produce samples. Signed-off-by: Arun Sharma Cc: Philippe Elie Cc: John Levon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 50462062a02226a698a211d5bd535376c89b8603 Author: Alexey Dobriyan Date: Fri Sep 29 02:00:01 2006 -0700 [PATCH] fs.h: ifdef security fields [assuming BSD security levels are deleted] The only user of i_security, f_security, s_security fields is SELinux, however, quite a few security modules are trying to get into kernel. So, wrap them under CONFIG_SECURITY. Adding config option for each security field is likely an overkill. Following Stephen Smalley's suggestion, i_security initialization is moved to security_inode_alloc() to not clutter core code with ifdefs and make alloc_inode() codepath tiny little bit smaller and faster. The user of (highly greppable) struct fown_struct::security field is still to be found. I've checked every "fown_struct" and every "f_owner" occurence. Additionally it's removal doesn't break i386 allmodconfig build. struct inode, struct file, struct super_block, struct fown_struct become smaller. P.S. Combined with two reiserfs inode shrinking patches sent to linux-fsdevel, I can finally suck 12 reiserfs inodes into one page. /proc/slabinfo -ext2_inode_cache 388 10 +ext2_inode_cache 384 10 -inode_cache 280 14 +inode_cache 276 14 -proc_inode_cache 296 13 +proc_inode_cache 292 13 -reiser_inode_cache 336 11 +reiser_inode_cache 332 12 <= -shmem_inode_cache 372 10 +shmem_inode_cache 368 10 Signed-off-by: Alexey Dobriyan Cc: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cfe14677f286c9be5d683b88214def8f4b8a6f24 Author: Alexey Dobriyan Date: Fri Sep 29 02:00:00 2006 -0700 [PATCH] reiserfs: ifdef ACL stuff from inode Shrink reiserfs inode more (by 8 bytes) for ACL non-users: -reiser_inode_cache 344 11 +reiser_inode_cache 336 11 Signed-off-by: Alexey Dobriyan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 068fbb315dd1e9dd3418aac39a9cfeabe39c16a6 Author: Alexey Dobriyan Date: Fri Sep 29 01:59:58 2006 -0700 [PATCH] reiserfs: ifdef xattr_sem Shrink reiserfs inode by 12 bytes for xattr non-users (me). -reiser_inode_cache 356 11 +reiser_inode_cache 344 11 Signed-off-by: Alexey Dobriyan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e6cab99bb478e067b1a7a120333ff326954a2412 Author: Chuck Ebbert <76306.1226@compuserve.com> Date: Fri Sep 29 01:59:57 2006 -0700 [PATCH] unwind: fix unused variable warning when !CONFIG_MODULES Fix "variable defined but not used" compiler warning in unwind.c when CONFIG_MODULES is not set. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Cc: Jan Beulich Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0e51a720b9d9ea5ebf0fda39108919c6626bffa3 Author: Alexey Dobriyan Date: Fri Sep 29 01:59:56 2006 -0700 [PATCH] ifdef ->quota_read, ->quota_write All suppliers of ->quota_read, ->quota_write (I've found ext2, ext3, UFS, reiserfs) already have them properly ifdeffed. All callers of ->quota_read, ->quota_write are under CONFIG_QUOTA umbrella, so... Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3172027148120b8f8797cbecc7d0a0b215736a1 Author: Chris Mason Date: Fri Sep 29 01:59:56 2006 -0700 [PATCH] Fix reiserfs latencies caused by data=ordered ReiserFS does periodic cleanup of old transactions in order to limit the length of time a journal replay may take after a crash. Sometimes, writing metadata from an old (already committed) transaction may require committing a newer transaction, which also requires writing all data=ordered buffers. This can cause very long stalls on journal_begin. This patch makes sure new transactions will not need to be committed before trying a periodic reclaim of an old transaction. It is low risk because if a bad decision is made, it just means a slightly longer journal replay after a crash. Signed-off-by: Chris Mason Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 25736b1c692d436508585d1d710912e6f76be2d8 Author: Chris Mason Date: Fri Sep 29 01:59:54 2006 -0700 [PATCH] reiserfs_fsync should only use barriers when they are enabled make sure that reiserfs_fsync only triggers barriers when mounted with -o barrier=flush Signed-off-by: Chris Mason Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d4328b40af16bae62ff8f854060d33daad237093 Author: Adam Tlalka Date: Fri Sep 29 01:59:53 2006 -0700 [PATCH] console utf-8 mode fixes Fix utf-8 mode so alternate charset modes always work according to control sequences interpreted in do_con_trol function preserving backward US-ASCII and VT100 semigraphics compatibility. Malformed utf-8 sequences are represented as sequences of replacement glyphs,original codes or '?' as a last resort. unicode-xterm, gnome-terminal, kconsole and other terminal emulators in utf-8 mode respect acsc, enacs, rmacs sequences. Also I found that some important system programs (from Debian distro) uses acsc in utf-8 mode - dselect, aptitude, w3m for example. Signed-off-by: Adam Tlalka Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 08c67d2a5d1c97b7997dc9589f702d875c63de07 Author: Dmitry Torokhov Date: Fri Sep 29 01:59:52 2006 -0700 [PATCH] ucb1x00-ts: handle errors from input_register_device() ucb1x00-ts: handle errors from input_register_device() Signed-off-by: Dmitry Torokhov Cc: Russell King Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa83aa40ed2ae113d9ee5529cdd9e8c0e5fabe61 Author: Dave Jones Date: Fri Sep 29 01:59:51 2006 -0700 [PATCH] single bit flip detector In cases where we detect a single bit has been flipped, we spew the usual slab corruption message, which users instantly think is a kernel bug. In a lot of cases, single bit errors are down to bad memory, or other hardware failure. This patch adds an extra line to the slab debug messages in those cases, in the hope that users will try memtest before they report a bug. 000: 6b 6b 6b 6b 6a 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Single bit error detected. Possibly bad RAM. Run memtest86. [akpm@osdl.org: cleanups] Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 527063ba985740e9cd271731c31f503f916681c9 Author: Alexey Dobriyan Date: Fri Sep 29 01:59:50 2006 -0700 [PATCH] tty_io.c: keep davej sane Just comment and next "while" look _very_ wrong. Place { correctly to hint unsuspecting ones that it's the end of the loop actually. Signed-off-by: Alexey Dobriyan Cc: Dave Jones Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3bc1fa8ae18f281b40903cce94baba10c3cf9d88 Author: Chris Wright Date: Fri Sep 29 01:59:49 2006 -0700 [PATCH] LSM: remove BSD secure level security module This code has suffered from broken core design and lack of developer attention. Broken security modules are too dangerous to leave around. It is time to remove this one. Signed-off-by: Chris Wright Acked-by: Michael Halcrow Acked-by: Serge Hallyn Cc: Davi Arnaut Acked-by: Greg Kroah-Hartman Acked-by: James Morris Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd1c6a48ac16b360746f9f111895931d332c35dd Author: Rolf Eike Beer Date: Fri Sep 29 01:59:49 2006 -0700 [PATCH] Use valid_dma_direction() in include/asm-i386/dma-mapping.h Now that the generic DMA code has a function to decide if a given DMA mapping is valid use it. This will catch cases where direction is not any of the defined enum values but some random number outside the valid range. The current implementation will only catch the defined but invalid case DMA_NONE. Signed-off-by: Rolf Eike Beer Acked-by: Muli Ben-Yehuda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d6bd3a39f7c6ebad49c261c3d458df974c880758 Author: Rolf Eike Beer Date: Fri Sep 29 01:59:48 2006 -0700 [PATCH] Move valid_dma_direction() from x86_64 to generic code As suggested by Muli Ben-Yehuda this function is moved to generic code as may be useful for all archs. [akpm@osdl.org: fix] Signed-off-by: Rolf Eike Beer Cc: Muli Ben-Yehuda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d09d7ddf3018b4c6efa76dce72f6dec6054fa22b Author: Alan Cox Date: Fri Sep 29 01:59:47 2006 -0700 [PATCH] There is no devfs, there has never been a devfs, we have always been at war with... Jon Smirl noted a couple of tty driver functions now are quite misleadingly named with the death of devfs. A quick grep found another case in the lp driver. Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2aae4a108dab8b8bc92270335f6e4b5c146b32ae Author: Rolf Eike Beer Date: Fri Sep 29 01:59:46 2006 -0700 [PATCH] Fix kerneldoc comments in kernel/timer.c Some of the kerneldoc comments in this file are ignored since the lead-in is malformed, using either "/*" or "/***" instead of "/**". [rdunlap@xenotime.net: kerneldoc fixes] Signed-off-by: Rolf Eike Beer Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d7ff0dbf45ee8a7c4802ff46844e6e8167b7f360 Author: Jan-Frode Myklebust Date: Fri Sep 29 01:59:45 2006 -0700 [PATCH] oom_adj/oom_score documentation I was looking for the a way around an OOM-problem, and found a couple of undocumented new features for tuning the OOM-score of individual processes. Here's a small documentation patch for /proc//oom_adj and /proc//oom_score. Signed-off-by: Jan-Frode Myklebust Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db630637b2f192bea2ba1c000e9cbe4e542a03ea Author: Steven Rostedt Date: Fri Sep 29 01:59:44 2006 -0700 [PATCH] clean up and remove some extra spinlocks from rtmutex Oleg brought up some interesting points about grabbing the pi_lock for some protections. In this discussion, I realized that there are some places that the pi_lock is being grabbed when it really wasn't necessary. Also this patch does a little bit of clean up. This patch basically does three things: 1) renames the "boost" variable to "chain_walk". Since it is used in the debugging case when it isn't going to be boosted. It better describes what the test is going to do if it succeeds. 2) moves get_task_struct to just before the unlocking of the wait_lock. This removes duplicate code, and makes it a little easier to read. The owner wont go away while either the pi_lock or the wait_lock are held. 3) removes the pi_locking and owner blocked checking completely from the debugging case. This is because the grabbing the lock and doing the check, then releasing the lock is just so full of races. It's just as good to go ahead and call the pi_chain_walk function, since after releasing the lock the owner can then block anyway, and we would have missed that. For the debug case, we really do want to do the chain walk to test for deadlocks anyway. [oleg@tv-sign.ru: more of the same] Signed-of-by: Steven Rostedt Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Oleg Nesterov Cc: Esben Nielsen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c24c95a085c6b52c11c2f5afecc38b0ca143cdae Author: Jan Beulich Date: Fri Sep 29 01:59:42 2006 -0700 [PATCH] fix Intel RNG detection Previously, since determination whether there was an Intel random number generator was based on a single bit, on systems with a matching bridge device but without a firmware hub, there was a 50% chance that the code would incorrectly decide that the system had an RNG. This patch adds detection of the firmware hub to better qualify the existence of an RNG. There is one issue with the patch: I was unable to determine the LPC equivalent for the PCI bridge 8086:2430 (since the old code didn't care about which of the many devices provided by the ICH/ESB it was chose to use the PCI bridge device, but the FWH settings live in the LPC device, so the device list needed to be changed). Signed-off-by: Jan Beulich Signed-off-by: Michael Buesch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 39b3f6d6e915aa29ad6f90d1517d9217f903c8dc Author: Eric Sandeen Date: Fri Sep 29 01:59:41 2006 -0700 [PATCH] mount udf UDF_PART_FLAG_READ_ONLY partitions with MS_RDONLY There's a bug where a UDF_PART_FLAG_READ_ONLY udf partition gets mounted read-write, then subsequent problems happen; files seem to be able to be removed, but file creation results in EIO or worse, oops. EIO is coming from udf_new_block(), which returns EIO if the right flags aren't set; only UDF_PART_FLAG_READ_ONLY is set in this case. We probably s hould not have gotten this far... Attached patch seems to fix it - and includes a printk to alert the user that their "rw" mount request has been converted to "ro." Here's the testcase I used: [root@magnesium ~]# mkisofs -R -J -udf -o testiso /tmp/ ... Total translation table size: 0 Total rockridge attributes bytes: 342923 Total directory bytes: 382312 Path table size(bytes): 104 Max brk space used 103000 105059 extents written (205 MB) [root@magnesium ~]# mount -o loop testiso /mnt/test/ [root@magnesium ~]# ls /mnt/test/fsfile /mnt/test/fsfile [root@magnesium ~]# rm /mnt/test/fsfile [root@magnesium ~]# ls /mnt/test/fsfile ls: /mnt/test/fsfile: No such file or directory [root@magnesium ~]# touch /mnt/test/fsfile touch: cannot touch `/mnt/test/fsfile': Input/output error [root@magnesium tmp]# grep udf /proc/mounts /dev/loop1 /mnt/test udf rw 0 0 Force readonly mounts of UDF partitions marked as read-only. Signed-off-by: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6c5c934153513dc72e2d6464f39e8ef1f27c0a3e Author: Alexey Dobriyan Date: Fri Sep 29 01:59:40 2006 -0700 [PATCH] ifdef blktrace debugging fields Signed-off-by: Alexey Dobriyan Acked-by: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d5b6fccc4b900cc4267692f015ea500bad4c6bf Author: Alexey Dobriyan Date: Fri Sep 29 01:59:40 2006 -0700 [PATCH] task_struct: ifdef Missed'em V IPC ipc/sem.c only. $ agrep sysvsem -w -n ipc/sem.c:912: undo_list = current->sysvsem.undo_list; ipc/sem.c:932: undo_list = current->sysvsem.undo_list; ipc/sem.c:954: undo_list = current->sysvsem.undo_list; ipc/sem.c:963: current->sysvsem.undo_list = undo_list; ipc/sem.c:1247: tsk->sysvsem.undo_list = undo_list; ipc/sem.c:1249: tsk->sysvsem.undo_list = NULL; ipc/sem.c:1271: undo_list = tsk->sysvsem.undo_list; include/linux/sched.h:876: struct sysv_sem sysvsem; Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e1dfa92dcab72397ed1f85f7b8f98a9da43b3f7b Author: Olaf Hering Date: Fri Sep 29 01:59:39 2006 -0700 [PATCH] ignore partition table on disks with AIX label The on-disk data structures from AIX are not known, also the filesystem layout is not known. There is a msdos partition signature at the end of the first block, and the kernel recognizes 3 small (and overlapping) partitions. But they are not usable. Maybe the firmware uses it to find the bootloader for AIX, but AIX boots also if the first block is cleared. This is the content of the partition table: # dd if=/dev/sdb count=$(( 4 * 16 )) bs=1 skip=$(( 0x1be )) | xxd 0000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0000010: 80ff ffff 41ff ffff 1b11 0000 381b 0000 ....A.......8... 0000020: 00ff ffff 41ff ffff 0211 0000 1900 0000 ....A........... 0000030: 80ff ffff 41ff ffff 1b11 0000 381b 0000 ....A.......8... Handle the whole disk as empty disk. This fixes also YaST which compares the output from parted (and formerly fdisk) with /proc/partitions. fdisk recognizes the AIX label since a long time, SuSE has a patch for parted to handle the disk label as unknown. dmesg will look like this: sda: [AIX] unknown partition table Tested on an IBM B50 with AIX V4.3.3. Signed-off-by: Olaf Hering Cc: Albert Cahalan Cc: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 402749ea2538be9ddad981a990739b93a0178bc6 Author: Matthias Urlichs Date: Fri Sep 29 01:59:37 2006 -0700 [PATCH] Remove unused tty_struct field Unused: tty_struct.max_flip_cnt $ git grep max_flip_cnt include/linux/tty.h: int max_flip_cnt; $ Cc: Paul Fulghum Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2e0c1f6ce7b816f63fea2af3e5e2cb20c66430e9 Author: Shem Multinymous Date: Fri Sep 29 01:59:37 2006 -0700 [PATCH] DMI: Decode and save OEM String information This teaches dmi_decode() how to decode and save OEM Strings (type 11) DMI information, which is currently discarded silently. Existing code using DMI is not affected. Follows the "System Management BIOS (SMBIOS) Specification" (http://www.dmtf.org/standards/smbios), and also the userspace dmidecode.c code. OEM Strings are the only safe way to identify some hardware, e.g., the ThinkPad embedded controller used by the soon-to-be-submitted tp_smapi driver. This will also let us eliminate the long whitelist in the mainline hdaps driver (in a future patch). Signed-off-by: Shem Multinymous Cc: Bjorn Helgaas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89e7e374dde1015d69d2d70797ae4053b14fa9db Author: Josh Triplett Date: Fri Sep 29 01:59:36 2006 -0700 [PATCH] timer: add lock annotation to lock_timer_base lock_timer_base acquires a lock and returns with that lock held. Add a lock annotation to this function so that sparse can check callers for lock pairing, and so that sparse will not complain about this function since it intentionally uses the lock in this manner. Signed-off-by: Josh Triplett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 650a898342b3fa21c392c06a2b7010fa19823efa Author: Miklos Szeredi Date: Fri Sep 29 01:59:35 2006 -0700 [PATCH] vfs: define new lookup flag for chdir In the "operation does permission checking" model used by fuse, chdir permission is not checked, since there's no chdir method. For this case set a lookup flag, which will be passed to ->permission(), so fuse can distinguish it from permission checks for other operations. Signed-off-by: Miklos Szeredi Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b35e8e58a315b16d123e2bc080fcc9981501ac4 Author: Miklos Szeredi Date: Fri Sep 29 01:59:34 2006 -0700 [PATCH] fuse: use dentry in statfs Some filesystems may want to report different values depending on the path within the filesystem, i.e. one mount is actually several filesystems. This can be the case for a network filesystem exported by an unprivileged server (e.g. sshfs). This is now possible, thanks to David Howells "VFS: Permit filesystem to perform statfs with a known root dentry" patch. This change is backward compatible, so no need to change interface version. Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d10be6d1bdb0c901b78244872de3cc1c1b6c3fb2 Author: Mark Huang Date: Fri Sep 29 01:59:34 2006 -0700 [PATCH] module_subsys: initialize earlier Initialize module_subsys earlier (or at least earlier than devices) since it could be used very early in the boot process if kmod loads a module before the device initcalls. Otherwise, kmod will crash in kernel/module.c:mod_sysfs_setup() since the kset in module_subsys is not initialized yet. I only noticed this problem because occasionally, kmod loads the modules for my SCSI and Ethernet adapters very early, during the boot process itself. I don't quite understand why it loads them sometimes and doesn't load them other times. Or who is telling kmod to do so. Can someone explain? Signed-off-by: Mark Huang Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8454aeef6fea944ced757ff8e761b59eb3ee960f Author: Eugene Teo Date: Fri Sep 29 01:59:33 2006 -0700 [PATCH] Require mmap handler for a.out executables Files supported by fs/proc/base.c, i.e. /proc//*, are not capable of meeting the validity checks in ELF load_elf_*() handling because they have no mmap handler which is required by ELF. In order to stop a.out executables being used as part of an exploit attack against /proc-related vulnerabilities, we make a.out executables depend on ->mmap() existing. Signed-off-by: Eugene Teo Signed-off-by: Marcel Holtmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 563d075702454f6fa745ff8b0db605c73478078e Author: Sukadev Bhattiprolu Date: Fri Sep 29 01:59:31 2006 -0700 [PATCH] kthread: drivers/base/firmware_class.c Replace kernel_thread() call in drivers/base/firmware_class.c with kthread_create() since kernel_thread() is deprecated in drivers. Signed-off-by: Sukadev Bhattiprolu Cc: Cedric Le Goater Cc: Serge E. Hallyn Cc: Dave Hansen Cc: Manuel Estrada Sainz Acked-by: Marcel Holtmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a49a4af759c0193d42aeaeefb4df7de8973dd713 Author: Josh Triplett Date: Fri Sep 29 01:59:30 2006 -0700 [PATCH] rcu: add lock annotations to rcu{,_bh}_torture_read_{lock,unlock} rcu_torture_read_lock and rcu_bh_torture_read_lock acquire locks without releasing them, and the matching functions rcu_torture_read_unlock and rcu_bh_torture_read_unlock get called with the corresponding locks held and release them. Add lock annotations to these four functions so that sparse can check callers for lock pairing, and so that sparse will not complain about these functions since they intentionally use locks in this manner. Signed-off-by: Josh Triplett Acked-by: Paul McKenney Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9c4dbee79d3f46608bec3ac80d392ce6415d2f90 Author: Josh Triplett Date: Fri Sep 29 01:59:29 2006 -0700 [PATCH] fs: add lock annotation to grab_super grab_super gets called with sb_lock held, and releases it. Add a lock annotation to this function so that sparse can check callers for lock pairing, and so that sparse will not complain about this function since it intentionally uses the lock in this manner. Signed-off-by: Josh Triplett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db0b0ead60815155c791e8f479ee4777e7946369 Author: Michael S. Tsirkin Date: Fri Sep 29 01:59:28 2006 -0700 [PATCH] lockdep: don't pull in includes when lockdep disabled Do not pull in various includes through lockdep.h if lockdep is disabled. Signed-off-by: Michael S. Tsirkin Cc: Ingo Molnar Cc: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ddc0a51d2e351985aa542ff650635e2fd62d3f8b Author: Josh Triplett Date: Fri Sep 29 01:59:27 2006 -0700 [PATCH] hugetlbfs: add lock annotation to hugetlbfs_forget_inode() hugetlbfs_forget_inode releases inode_lock. Add a lock annotation to this function so that sparse can check callers for lock pairing, and so that sparse will not complain about this functions since it intentionally uses the lock in this manner. Signed-off-by: Josh Triplett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 105f4d7a813e9ef6be58549f5d2a49af1764da19 Author: Josh Triplett Date: Fri Sep 29 01:59:25 2006 -0700 [PATCH] fuse: add lock annotations to request_end and fuse_read_interrupt request_end and fuse_read_interrupt release fc->lock. Add lock annotations to these two functions so that sparse can check callers for lock pairing, and so that sparse will not complain about these functions since they intentionally use locks in this manner. Signed-off-by: Josh Triplett Acked-by: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99fc705996285ed2746c0c8ae8313d0a04d62ec9 Author: Josh Triplett Date: Fri Sep 29 01:59:25 2006 -0700 [PATCH] afs: add lock annotations to afs_proc_cell_servers_{start,stop} afs_proc_cell_servers_start acquires a lock, and afs_proc_cell_servers_stop releases that lock. Add lock annotations to these two functions so that sparse can check callers for lock pairing, and so that sparse will not complain about these functions since they intentionally use locks in this manner. Signed-off-by: Josh Triplett Acked-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 58f555e5f62b6a8326caf6d45ac611186f24587d Author: Josh Triplett Date: Fri Sep 29 01:59:24 2006 -0700 [PATCH] mbcache: add lock annotation for __mb_cache_entry_release_unlock() __mb_cache_entry_release_unlock releases mb_cache_spinlock, so annotate it accordingly. Signed-off-by: Josh Triplett Cc: Andreas Gruenbacher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b0de7fca10a3d7ddb99188b4752cc473c4e2c96e Author: Josh Triplett Date: Fri Sep 29 01:59:23 2006 -0700 [PATCH] efi: add lock annotations for efi_call_phys_prelog and efi_call_phys_epilog The functions efi_call_phys_prelog and efi_call_phys_epilog in arch/i386/kernel/efi.c wrap the spinlock efi_rt_lock: efi_call_phys_prelog returns with the lock held, and efi_call_phys_epilog releases the lock without acquiring it. Add lock annotations to these two functions so that sparse can check callers for lock pairing, and so that sparse will not complain about these functions since they intentionally use locks in this manner. Signed-off-by: Josh Triplett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 538d9d532b0e0320c9dd326a560b5a72d73f910d Author: Yoichi Yuasa Date: Fri Sep 29 01:59:22 2006 -0700 [PATCH] irq: remove a extra line Signed-off-by: Yoichi Yuasa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ff6fd8f4a40b72ff35dbb1e08eb9ed6b64b6028 Author: Yoichi Yuasa Date: Fri Sep 29 01:59:21 2006 -0700 [PATCH] irq: fixed coding style Signed-off-by: Yoichi Yuasa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 42012cc4a2183c555a907eee32d7ce4fc7dc3a6a Author: Olaf Hering Date: Fri Sep 29 01:59:21 2006 -0700 [PATCH] use gcc -O1 in fs/reiserfs only for ancient gcc versions Only compile with -O1 if the (very old) compiler is broken. We use reiserfs alot since SLES9 on ppc64, and it was never seen with gcc33. Assume the broken gcc is gcc-3.4 or older. Signed-off-by: Olaf Hering Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4d24607bfaab3d02fd0d6e0ffc22f29c2bc8eb30 Author: Komal Shah Date: Fri Sep 29 01:59:20 2006 -0700 [PATCH] OMAP: Update OMAP1/2 boards to give keymapsize and other pdata This patch adds keymapsize, delay and debounce flag in the keypad platform data for various TI OMAP1/2 based boards like F-sample, H2, H3, Innovator, Nokia770, OSK, Perseus and H4. Signed-off-by: Komal Shah Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ad4e09b16ad361c15bd7186dcd118cb901089b97 Author: Komal Shah Date: Fri Sep 29 01:59:19 2006 -0700 [PATCH] OMAP: Add keypad driver This patch adds support for keypad driver running on different TI OMAP(http://www.ti.com/omap) processor based boards like OSK, H2, H3, H4, Persuas and Nokia 770. Signed-off-by: Komal Shah Acked-by: Dmitry Torokhov Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7768a13c252a97e13a552f88f642962768de1fa4 Author: Komal Shah Date: Fri Sep 29 01:59:18 2006 -0700 [PATCH] OMAP: Add Watchdog driver support Add Texas Instruments (TI) OMAP1/2 (http://www.ti.com/omap) based processors, like OMAP1610/1710/242x. [akpm@osdl.org: cleanups] Cc: Cc: "Komal Shah" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f1b7c5f459b21feba80f96415429ff2570d63e4d Author: Komal Shah Date: Fri Sep 29 01:59:15 2006 -0700 [PATCH] OMAP: Add smc91x support for TI OMAP2420 H4 board Add smc91x support for TI OMAP2420 H4 EVM board. Cc: Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c22f008ba226e2ff25ee1a56abd9c5fd355828fc Author: Chuck Ebbert <76306.1226@compuserve.com> Date: Fri Sep 29 01:59:14 2006 -0700 [PATCH] spinlock_debug: don't recompute (jiffies_per_loop * HZ) in spinloop In spinlock_debug.c, the spinloops call __delay() on every iteration. Because that is an external function, (jiffies_per_loop * HZ), the loop's iteration limit, gets recomputed every time. Caching it explicitly prevents that. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 92a0f861fe1790dad55ea249169d94f2dc88d696 Author: Rolf Eike Beer Date: Fri Sep 29 01:59:13 2006 -0700 [PATCH] Fix parameter names in drivers/base/class.c Change parameter names to match arguments of functions. Signed-off-by: Rolf Eike Beer Cc: Martin Waitz Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 78b2290f2977044ced27d1158b03587aa674fe07 Author: Rolf Eike Beer Date: Fri Sep 29 01:59:12 2006 -0700 [PATCH] Include documentation for functions in drivers/base/class.c drivers/base/class.c is omitted by "make *docs". Add it to get documentation for class_create() and friends for free. Signed-off-by: Rolf Eike Beer Cc: Martin Waitz Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6c9979185c7ef4feeb7f8d29be032b8f032a1838 Author: Serge E. Hallyn Date: Fri Sep 29 01:59:11 2006 -0700 [PATCH] kthread: convert loop.c to kthread Convert loop.c from the deprecated kernel_thread to kthread. This patch simplifies the code quite a bit and passes similar testing to the previous submission on both emulated x86 and s390. Changes since last submission: switched to using a rather simple loop based on wait_event_interruptible. Signed-off-by: Serge E. Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b217fa75c3aea381f1f5fa7ff09e7b4019ea374 Author: Randy Dunlap Date: Fri Sep 29 01:59:10 2006 -0700 [PATCH] kernel-doc: move filesystems together Move all VFS + filesystem docs together. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c78a6639386f9e7399fbc0d0a173d4cc1a3e9bf Author: Randy Dunlap Date: Fri Sep 29 01:59:10 2006 -0700 [PATCH] kernel-doc for relay interface Add relay interface support to DocBook/kernel-api.tmpl. Fix typos etc. in relay.c and relayfs.txt. Signed-off-by: Randy Dunlap Acked-by: Tom Zanussi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c0d92cbc5849f26451f478d538b8d885ae547221 Author: Pekka J Enberg Date: Fri Sep 29 01:59:09 2006 -0700 [PATCH] libfs: remove page up-to-date check from simple_readpage Remove the unnecessary PageUptodate check from simple_readpage. The only two callers for ->readpage that don't have explicit PageUptodate check are read_cache_pages and page_cache_read which operate on newly allocated pages which don't have the flag set. [akpm: use the allegedly-faster clear_page(), too] Signed-off-by: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cfedc920a7bca828fd4af8e203f7d8514990f999 Author: Chris Boot Date: Fri Sep 29 01:59:08 2006 -0700 [PATCH] Make net48xx-led use scx200_gpio_ops Make the next48xx LED code use scx200_gpio_ops instead of raw SCx200 GPIO accesses. Signed-off-by: Chris Boot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 58012cd788443b9d144bd7c72260a84b6b30f45d Author: Chris Boot Date: Fri Sep 29 01:59:07 2006 -0700 [PATCH] scx200_gpio export cleanups Use EXPORT_SYMBOL_GPL for new symbols, and declare the struct in the header file for access by other modules. Signed-off-by: Chris Boot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 684f978347deb42d180373ac4c427f82ef963171 Author: Herbert Xu Date: Fri Sep 29 01:59:06 2006 -0700 [PATCH] Let WARN_ON/WARN_ON_ONCE return the condition Letting WARN_ON/WARN_ON_ONCE return the condition means that you could do if (WARN_ON(blah)) { handle_impossible_case } Rather than if (unlikely(blah)) { WARN_ON(1) handle_impossible_case } I checked all the newly added WARN_ON_ONCE users and none of them test the return status so we can still change it. [akpm@osdl.org: warning fix] [akpm@osdl.org: build fix] Signed-off-by: Herbert Xu Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6299a2dec89d22940e36832f15c0addfb77e6910 Author: Adrian Bunk Date: Fri Sep 29 01:59:05 2006 -0700 [PATCH] drivers/char/pc8736x_gpio.c: remove unused static functions drivers/char/pc8736x_gpio.c:192: warning: #pc8736x_gpio_set_high# defined but not used drivers/char/pc8736x_gpio.c:197: warning: #pc8736x_gpio_set_low# defined but not used Signed-off-by: Adrian Bunk Acked-by: Jim Cromie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c8ad9681fdec37ad298da6d505f9baba61e5f15c Author: Jim Cromie Date: Fri Sep 29 01:59:05 2006 -0700 [PATCH] drivers/char/scx200_gpio.c: make code static This patch makes a needlessly global variable static. Signed-off-by: Adrian Bunk Signed-off-by: Jim Cromie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 358333a0cb4a6d279806e38d0368b79066dbe5e7 Author: Steven Rostedt Date: Fri Sep 29 01:59:04 2006 -0700 [PATCH] remove unnecessary barrier in rtc_get_rtc_time Signed-off-by: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9938406ab6b2558d60c0c7200cc8e12f1ea7104a Author: Michal Schmidt Date: Fri Sep 29 01:59:03 2006 -0700 [PATCH] Make touch_nmi_watchdog imply touch_softlockup_watchdog on all archs touch_nmi_watchdog() calls touch_softlockup_watchdog() on both architectures that implement it (i386 and x86_64). On other architectures it does nothing at all. touch_nmi_watchdog() should imply touch_softlockup_watchdog() on all architectures. Suggested by Andi Kleen. [heiko.carstens@de.ibm.com: s390 fix] Signed-off-by: Michal Schmidt Cc: Andi Kleen Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens Cc: Michal Schmidt Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit df89a864631f5d840f4873c4c03733b4206e78ea Author: Manfred Spraul Date: Fri Sep 29 01:59:01 2006 -0700 [PATCH] list_del debug check A list_del() debugging check. Has been in -mm for years. Dave moved list_del() out-of-line in the debug case, so this is now suitable for mainline. Cc: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 199a9afc3dbe98c35326f1d3907ab94dae953a6e Author: Dave Jones Date: Fri Sep 29 01:59:00 2006 -0700 [PATCH] Debug variants of linked list macros Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit df67b3daea602728b51325a4debaeeb912ee51d1 Author: Jason Baron Date: Fri Sep 29 01:58:58 2006 -0700 [PATCH] make PROT_WRITE imply PROT_READ Make PROT_WRITE imply PROT_READ for a number of architectures which don't support write only in hardware. While looking at this, I noticed that some architectures which do not support write only mappings already take the exact same approach. For example, in arch/alpha/mm/fault.c: " if (cause < 0) { if (!(vma->vm_flags & VM_EXEC)) goto bad_area; } else if (!cause) { /* Allow reads even for write-only mappings */ if (!(vma->vm_flags & (VM_READ | VM_WRITE))) goto bad_area; } else { if (!(vma->vm_flags & VM_WRITE)) goto bad_area; } " Thus, this patch brings other architectures which do not support write only mappings in-line and consistent with the rest. I've verified the patch on ia64, x86_64 and x86. Additional discussion: Several architectures, including x86, can not support write-only mappings. The pte for x86 reserves a single bit for protection and its two states are read only or read/write. Thus, write only is not supported in h/w. Currently, if i 'mmap' a page write-only, the first read attempt on that page creates a page fault and will SEGV. That check is enforced in arch/blah/mm/fault.c. However, if i first write that page it will fault in and the pte will be set to read/write. Thus, any subsequent reads to the page will succeed. It is this inconsistency in behavior that this patch is attempting to address. Furthermore, if the page is swapped out, and then brought back the first read will also cause a SEGV. Thus, any arbitrary read on a page can potentially result in a SEGV. According to the SuSv3 spec, "if the application requests only PROT_WRITE, the implementation may also allow read access." Also as mentioned, some archtectures, such as alpha, shown above already take the approach that i am suggesting. The counter-argument to this raised by Arjan, is that the kernel is enforcing the write only mapping the best it can given the h/w limitations. This is true, however Alan Cox, and myself would argue that the inconsitency in behavior, that is applications can sometimes work/sometimes fails is highly undesireable. If you read through the thread, i think people, came to an agreement on the last patch i posted, as nobody has objected to it... Signed-off-by: Jason Baron Cc: Russell King Cc: "Luck, Tony" Cc: Hugh Dickins Cc: Roman Zippel Cc: Geert Uytterhoeven Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Acked-by: Andi Kleen Acked-by: Alan Cox Cc: Arjan van de Ven Acked-by: Paul Mundt Cc: Kazumoto Kojima Cc: Ian Molton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 15a67dd8ccf696392176c95a08234a8b8ee59005 Author: Randy Dunlap Date: Fri Sep 29 01:58:57 2006 -0700 [PATCH] fs/namespace: handle init/registration errors Check and handle init errors. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 87a57261105669d13a9cae747b5b67ca1cbcda3c Author: Randy Dunlap Date: Fri Sep 29 01:58:56 2006 -0700 [PATCH] block: handle subsystem_register() init errors Check and handle init errors. Signed-off-by: Randy Dunlap Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4d7dd8fd9557840162b724a8ac1366dd78a12dff Author: Andrew Morton Date: Fri Sep 29 01:58:56 2006 -0700 [PATCH] blockdev.c: check driver layer errors Check driver layer errors. Fix from: "Jun'ichi Nomura" In blockdevc-check-errors.patch, add_bd_holder() is modified to return error values when some of its operation failed. Among them, it returns -EEXIST when a given bd_holder object already exists in the list. However, in this case, the function completed its work successfully and need no action by its caller other than freeing unused bd_holder object. So I think it's better to return success after freeing by itself. Otherwise, bd_claim-ing with same claim pointer will fail. Typically, lvresize will fails with following message: device-mapper: reload ioctl failed: Invalid argument and you'll see messages like below in kernel log: device-mapper: table: 254:13: linear: dm-linear: Device lookup failed device-mapper: ioctl: error adding target to table Similarly, it should not add bd_holder to the list if either one of symlinking fails. I don't have a test case for this to happen but it should cause dereference of freed pointer. If a matching bd_holder is found in bd_holder_list, add_bd_holder() completes its job by just incrementing the reference count. In this case, it should be considered as success but it used to return 'fail' to let the caller free temporary bd_holder. Fixed it to return success and free given object by itself. Also, if either one of symlinking fails, the bd_holder should not be added to the list so that it can be discarded later. Otherwise, the caller will free bd_holder which is in the list. Signed-off-by: Jun'ichi Nomura Cc: "Randy.Dunlap" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d8c7649e99e4b081b624aefe1e77caa30b53cb18 Author: Randy Dunlap Date: Fri Sep 29 01:58:55 2006 -0700 [PATCH] kernel/params: driver layer error checking Check driver layer return values in kernel/params.c Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5906e4171ad61ce68de95e51b773146707671f80 Author: Jeff Dike Date: Fri Sep 29 01:58:54 2006 -0700 [PATCH] uml: remove pte_mkexec Andi is making pte_mkexec go away, and UML had one of the last uses. This removes the use and the definition. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fade5d5461b0379b27ca96faf560d855d7a0ea8b Author: Jeff Dike Date: Fri Sep 29 01:58:53 2006 -0700 [PATCH] uml: don't roll my own random MAC generator Use the existing random_ether_addr() instead of cooking up my own version. Pointed out by Dave Hollis and Jason Lunz. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b89af765cd62c1c3ca6c81adca45084f8840e06 Author: Jeff Dike Date: Fri Sep 29 01:58:52 2006 -0700 [PATCH] uml: remove unneeded file Remove arch/um/kernel/skas/process_kern.c again. The stack alignment change which resulted in this file being here is safely in arch/um/kernel/process.c. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f92afe56a0dcd271cb94e12acf1861d44c3faefd Author: Jeff Dike Date: Fri Sep 29 01:58:52 2006 -0700 [PATCH] uml: stack consumption reduction Fix some stack abuse in the sysrq t path. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 80c13749140284abdc23bbeed2507b7e5a3dc459 Author: Jeff Dike Date: Fri Sep 29 01:58:51 2006 -0700 [PATCH] uml: close file descriptor leaks Close two file descriptor leaks, one in the ubd driver and one to /proc/mounts. The ubd driver bug also leaked some vmalloc space. The /proc/mounts leak was a descriptor that was just never closed. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 730760e90a173ef81f89beed2f1dad2fab310f68 Author: Jeff Dike Date: Fri Sep 29 01:58:50 2006 -0700 [PATCH] uml: locking documentation Some locking documentation and a cleanup. uml_exitcode is copied into a local before sprintf sees it, in case sprintf does anything non-atomic with it. The rest are comments about why certain globals don't need any kind of locking. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b10aeeef554eb1ff80e10111829f6e7484877811 Author: Jeff Dike Date: Fri Sep 29 01:58:50 2006 -0700 [PATCH] uml: mechanical tidying after random MACs change Mechanical, hopefully non-functional changes stemming from setup_etheraddr always succeeding now that it always assigns a MAC, either from the command line or generated randomly: the test of the return of setup_etheraddr is removed, and code dependent on it succeeding is now unconditional setup_etheraddr can now be made void struct uml_net.have_mac is now always 1, so tests of it can be similarly removed, and uses of it can be replaced with 1 struct uml_net.have_mac is no longer used, so it can be removed struct uml_net_private.have_mac is copied from struct uml_net, so it is always 1 tests of uml_net_private.have_mac can be removed uml_net_private.have_mac can now be removed the only call to dev_ip_addr was removed, so it can be deleted It also turns out that setup_etheraddr is called only once, from the same file, so it can be static and its declaration removed from net_kern.h. Similarly, set_ether_mac is defined and called only from one file. Finally, setup_etheraddr and set_ether_mac were moved to avoid needing forward declarations. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3e7ed2b617824f79d1223f37430ccffae59e5b8 Author: Jeff Dike Date: Fri Sep 29 01:58:46 2006 -0700 [PATCH] uml: assign random MACs to interfaces if necessary Assign a random MAC to an ethernet interface if one was not provided on the command line. This became pressing when distros started bringing interfaces up before assigning IPs to them. The previous pattern of assigning an IP then bringing it up allowed the MAC to be generated from the first IP assigned. However, once the thing is up, it's probably a bad idea to change the MAC, so the MAC stayed initialized to fe:fd:0:0:0:0. Now, if there is no MAC from the command line, one is generated. We use the microseconds from gettimeofday (20 bits), plus the low 12 bits of the pid to seed the random number generator. random() is called twice, with 16 bits of each result used. I didn't want to have to try to fill in 32 bits optimally given an arbitrary RAND_MAX, so I just assume that it is greater than 65536 and use 16 bits of each random() return. There is also a bit of reformatting and whitespace cleanup here. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b08606dc2991bcdab14139efd9ed9d492f5f901 Author: keith mannthey Date: Fri Sep 29 01:58:46 2006 -0700 [PATCH] convert i386 Summit subarch to use SRAT info for apicid_to_node calls Convert the i386 summit subarch apicid_to_node to use node information provided by the SRAT. It was discussed a little on LKML a few weeks ago and was seen as an acceptable fix. The current way of obtaining the nodeid static inline int apicid_to_node(int logical_apicid) { return logical_apicid >> 5; } is just not correct for all summit systems/bios. Assuming the apicid matches the Linux node number require a leap of faith that the bios mapped out the apicids a set way. Modern summit HW (IBM x460) does not layout its bios in the manner for various reasons and is unable to boot i386 numa. The best way to get the correct apicid to node information is from the SRAT table during boot. It lays out what apicid belongs to what node. I use this information to create a table for use at run time. Signed-off-by: Keith Mannthey Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3528a95322b5c1ce882ab723f175a1845430cd89 Author: Cory Olmo Date: Fri Sep 29 01:58:44 2006 -0700 [PATCH] SELinux: support mls categories for context mounts Allows commas to be embedded into context mount options (i.e. "-o context=some_selinux_context_t"), to better support multiple categories, which are separated by commas and confuse mount. For example, with the current code: mount -t iso9660 /dev/cdrom /media/cdrom -o \ ro,context=system_u:object_r:iso9660_t:s0:c1,c3,c4,exec The context option that will be interpreted by SELinux is context=system_u:object_r:iso9660_t:s0:c1 instead of context=system_u:object_r:iso9660_t:s0:c1,c3,c4 The options that will be passed on to the file system will be ro,c3,c4,exec. The proposed solution is to allow/require the SELinux context option specified to mount to use quotes when the context contains a comma. This patch modifies the option parsing in parse_opts(), contained in mount.c, to take options after finding a comma only if it hasn't seen a quote or if the quotes are matched. It also introduces a new function that will strip the quotes from the context option prior to translation. The quotes are replaced after the translation is completed to insure that in the event the raw context contains commas the kernel will be able to interpret the correct context. Signed-off-by: Cory Olmo Signed-off-by: James Morris Acked-by: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79f5acf5d784492afe80723496624093079aed9c Author: Adam Litke Date: Fri Sep 29 01:58:43 2006 -0700 [PATCH] mm: make filemap_nopage use NOPAGE_SIGBUS Don't open-code NOPAGE_SIGBUS. Signed-off-by: Adam Litke Acked-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ce072f1faf29d24df4600f53db8cdd62d400a8f Author: Siddha, Suresh B Date: Fri Sep 29 01:58:42 2006 -0700 [PATCH] mm: fix a race condition under SMC + COW Failing context is a multi threaded process context and the failing sequence is as follows. One thread T0 doing self modifying code on page X on processor P0 and another thread T1 doing COW (breaking the COW setup as part of just happened fork() in another thread T2) on the same page X on processor P1. T0 doing SMC can endup modifying the new page Y (allocated by the T1 doing COW on P1) but because of different I/D TLB's, P0 ITLB will not see the new mapping till the flush TLB IPI from P1 is received. During this interval, if T0 executes the code created by SMC it can result in an app error (as ITLB still points to old page X and endup executing the content in page X rather than using the content in page Y). Fix this issue by first clearing the PTE and flushing it, before updating it with new entry. Hugh sayeth: I was a bit sceptical, in the habit of thinking that Self Modifying Code must look such issues itself: but I guess there's nothing it can do to avoid this one. Fair enough, what you're changing it to is pretty much what powerpc and s390 were already doing, and is a more robust way of proceeding, consistent with how ptes are set everywhere else. The ptep_clear_flush is a bit heavy-handed (it's anxious to return the pte that was atomically cleared), but we'd have to wander through lots of arches to get the right minimal behaviour. It'd also be nice to eliminate ptep_establish completely, now only used to define other macros/inlines: it always seemed obfuscation to me, what you've got there now is clearer. Let's put those cleanups on a TODO list. Signed-off-by: Suresh Siddha Acked-by: "David S. Miller" Acked-by: Hugh Dickins Cc: Nick Piggin Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2dcea57ae19275451a756a2d5bf96b329487b0e0 Author: Heiko Carstens Date: Fri Sep 29 01:58:41 2006 -0700 [PATCH] convert s390 page handling macros to functions Convert s390 page handling macros to functions. In particular this fixes a problem with s390's SetPageUptodate macro which uses its input parameter twice which again can cause subtle bugs. [akpm@osdl.org: build fix] Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d1807793e1e7e502e3dc047115e9dbc3b50e4534 Author: Zoltan Menyhart Date: Fri Sep 29 01:58:40 2006 -0700 [PATCH] JBD: memory leak in "journal_init_dev()" We leak a bh ref in "journal_init_dev()" in case of failure. Signed-off-by: Zoltan Menyhart Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f71b2f10f56802075d67c5710cd9f1816382d720 Author: Dave Kleikamp Date: Fri Sep 29 01:58:39 2006 -0700 [PATCH] JBD: Make journal_brelse_array() static It's always good to make symbols static when we can, and this also eliminates the need to rename the function in jbd2 Suggested by Eric Sandeen. Signed-off-by: Dave Kleikamp Cc: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4efd587bf9f9a97608b1fcecc78a4a046c37e9b1 Author: David Woodhouse Date: Fri Sep 29 01:58:37 2006 -0700 [PATCH] Fix uninitialised spinlock in via-pmu-backlight code. The uninitialised pmu_backlight_lock causes the current Fedora test kernel (which has spinlock debugging enabled) to panic on suspend. This is suboptimal, so I fixed it. Signed-off-by: David Woodhouse Acked-by: Benjamin Herrenschmidt Acked-by: Michael Hanselmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 910067d188d56d80801b71b0ca1f73aa400c7b8c Author: Matthew Wilcox Date: Fri Sep 29 01:58:36 2006 -0700 [PATCH] remove generic__raw_read_trylock() If the cpu has the lock held for write, is interrupted, and the interrupt handler calls read_trylock(), it's an instant deadlock. Now, Dave Miller has subsequently pointed out that we don't have any situations where this can occur. Nevertheless, we should delete generic__raw_read_lock (and its associated EXPORT to make Arjan happy) so that nobody thinks they can use it. Acked-by: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e04da1dfd9041e306cb33d1b40b6005c23c5b325 Author: Al Viro Date: Fri Sep 29 01:58:35 2006 -0700 [PATCH] sys_getcpu() prototype annotated Signed-off-by: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0891a8d706d6e6838a926b6dec42f95581747d0e Author: Al Viro Date: Fri Sep 29 01:58:34 2006 -0700 [PATCH] __percpu_alloc_mask() has to be __always_inline in UP case ... or we'll end up with cpu_online_map being evaluated on UP. In modules. cpumask.h is very careful to avoid that, and for a very good reason. So should we... PS: yes, it really triggers (on alpha). Signed-off-by: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 65e8697a12e356cd7a6ecafa1149f5c5c6a71593 Author: Tim Shimmin Date: Fri Sep 29 15:23:02 2006 +1000 [XFS] Remove v1 dir trace macro - missed in a past commit. Signed-off-by: Tim Shimmin commit 6fbe59b9569b2c8d5522d182263935c6c86fc40a Author: David S. Miller Date: Thu Sep 28 15:34:05 2006 -0700 [ETHTOOL]: Remove some entries from non-root command list. GWOL might provide passwords GSET, GLINK, and GSTATS might poke the hardware Based upon feedback from Jeff Garzik. Signed-off-by: David S. Miller commit 860e13b5c591f1040b76fff57a6a3d6ca9633983 Author: Arnaud Patard Date: Thu Sep 28 15:29:37 2006 -0700 [Bluetooth]: Fix section mismatch of bt_sysfs_cleanup() The bt_sysfs_cleanup() is marked with __exit attribute, but it will be called from an __init function in the error case. So the __exit attribute must be removed. Signed-off-by: Arnaud Patard Signed-off-by: Marcel Holtmann Signed-off-by: David S. Miller commit 37e97b4ef0d18b77a45a4714154daf3499206654 Author: Marcel Holtmann Date: Thu Sep 28 15:29:09 2006 -0700 [Bluetooth]: Don't update disconnect timer for incoming connections In the case of device pairing the only safe method is to establish a low-level ACL link. In this case, the remote side should not use the disconnect timer to give the other side the chance to enter the PIN code. If the disconnect timer is used, the connection will be dropped to soon, because it is impossible to identify an actual user of this link. Signed-off-by: Marcel Holtmann Signed-off-by: David S. Miller commit 75f3123c118743f52b690d9ab41649814befda0a Author: Stephen Hemminger Date: Thu Sep 28 15:13:37 2006 -0700 [ETHTOOL]: let mortals use ethtool There is no reason to not allow non-admin users to query network statistics and settings. [ Removed PHYS_ID and GREGS based upon feedback from Auke Kok and Michael Chan -DaveM] Acked-by: James Morris Signed-off-by: David S. Miller commit 32f50cdee666333168b5203c7864bede159f789e Author: Paul Moore Date: Thu Sep 28 14:51:47 2006 -0700 [NetLabel]: add audit support for configuration changes This patch adds audit support to NetLabel, including six new audit message types shown below. #define AUDIT_MAC_UNLBL_ACCEPT 1406 #define AUDIT_MAC_UNLBL_DENY 1407 #define AUDIT_MAC_CIPSOV4_ADD 1408 #define AUDIT_MAC_CIPSOV4_DEL 1409 #define AUDIT_MAC_MAP_ADD 1410 #define AUDIT_MAC_MAP_DEL 1411 Signed-off-by: Paul Moore Acked-by: James Morris Signed-off-by: David S. Miller commit 8ea333eb5da3e3219f570220c56bca09f6f4d25a Author: John Heffner Date: Thu Sep 28 14:47:38 2006 -0700 [TCP]: Fix and simplify microsecond rtt sampling This changes the microsecond RTT sampling so that samples are taken in the same way that RTT samples are taken for the RTO calculator: on the last segment acknowledged, and only when the segment hasn't been retransmitted. Signed-off-by: John Heffner Acked-by: Stephen Hemminger Signed-off-by: David S. Miller commit bfbea8a8869a0e21b97605841d04190d63665d19 Author: Wong Hoi Sing Edison Date: Thu Sep 28 14:40:21 2006 -0700 [TCP] tcp-lp: prevent chance for oops This patch fix the chance for tcp_lp_remote_hz_estimator return 0, if 0 < rhz < 64. It also make sure the flag LP_VALID_RHZ is set correctly. Signed-off-by: Wong Hoi Sing Edison Signed-off-by: David S. Miller commit 1811474620d1986da45f7245168bf7c2d883d770 Author: Eric Sesterhenn Date: Thu Sep 28 14:37:07 2006 -0700 [SUNRPC]: Remove unnecessary check in net/sunrpc/svcsock.c coverity spotted this one as possible dereference in the dprintk(), but since there is only one caller of svc_create_socket(), which always passes a valid sin, we dont need this check. Signed-off-by: Eric Sesterhenn Signed-off-by: David S. Miller commit 96d2ca4ec0bb8d0f344e5960224700be3dec3515 Author: Al Viro Date: Thu Sep 28 14:31:49 2006 -0700 [IPVS] bug: endianness breakage in ip_vs_ftp (p[3]<<24) | (p[2]<<16) | (p[1]<<8) | p[0] is not a valid way to spell get_unaligned((__be32 *)p Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 014d730d56b559eacb11e91969a1f41c3feb36f9 Author: Al Viro Date: Thu Sep 28 14:29:52 2006 -0700 [IPVS]: ipvs annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit d4263cde88d3fee2af0aac8836bb785cdb6b06c0 Author: Al Viro Date: Thu Sep 28 14:22:51 2006 -0700 [NETFILTER]: h323 annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 6a19d61472d0802a24493c0d200e88f99ad39cd8 Author: Al Viro Date: Thu Sep 28 14:22:24 2006 -0700 [NETFILTER]: ipt annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit a76b11dd25957287af12ce6855be6d7fd415b3a9 Author: Al Viro Date: Thu Sep 28 14:22:02 2006 -0700 [NETFILTER]: NAT annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit cdcb71bf964e02e0a22007f5d90ead7bede3b85b Author: Al Viro Date: Thu Sep 28 14:21:37 2006 -0700 [NETFILTER]: conntrack annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 59b8bfd8fd608821e5addc9f4682c7f2424afd8c Author: Al Viro Date: Thu Sep 28 14:21:07 2006 -0700 [NETFILTER]: netfilter misc annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit d77072ecfb6d28287d5e2a61d60d87a3a444ac97 Author: Al Viro Date: Thu Sep 28 14:20:34 2006 -0700 [NET]: Annotate dst_ops protocol Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 75b31c33512f46bf650f4652272d8bef39881890 Author: Steven Rostedt Date: Wed Sep 27 22:55:39 2006 -0700 [NET]: is it Andy or Andi ?? I don't know of any Andy Kleen's but I do know a Andi Kleen. Signed-off-by: Steven Rostedt Signed-off-by: David S. Miller commit 28b06c380fca7e248c90e45f0aad1753097f6824 Author: Simon Horman Date: Wed Sep 27 22:53:24 2006 -0700 [IPVS]: Make sure ip_vs_ftp ports are valid: module_param_array approach I'm not entirely sure what happens in the case of a valid port, at best it'll be silently ignored. This patch ensures that the port values are unsigned short values, and thus always valid. This is a second take at fixing this problem, it is simpler and arguably more correct than the previous approach that was committed as 3f5af5b353ca36aca4f8a46e3da2172f669dbbbc. Prior to this patch a patch that reverses 3f5af5b353ca36aca4f8a46e3da2172f669dbbbc was sent. Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit e44fd82caf89a8548e7868592618b243e85c69e6 Author: Simon Horman Date: Wed Sep 27 22:52:47 2006 -0700 [IPVS]: Reverse valid ip_vs_ftp ports fix: port check approach This patch reverses 3f5af5b353ca36aca4f8a46e3da2172f669dbbbc as a better fix was suggested by Patrick McHardy. Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit febac9b93724f3ee293e7e5450043ae28e61531a Author: Samuel Ortiz Date: Wed Sep 27 22:50:06 2006 -0700 [IrDA] stir4200: removing undocumented bits handling FIFOCTL_RXERR and FIFOCTL_TXERR are undocumented bits, according to the Sigmatel datasheet. We should thus not take any assumption on their values and semantics. Problem spotted by andrzej zaborowski Signed-off-by: Samuel Ortiz Signed-off-by: David S. Miller commit 895de090d4302a02a77cdf366fc6e54fc2001857 Author: Linus Walleij (LD/EAB Date: Wed Sep 27 22:49:23 2006 -0700 [IrDA] smsc-ircc: More laptops detected This patch detects the smsc-ircc chipset on the nx1000 (including nx7000 and nx7010) and the nx5000 HP/Compaq laptop series. Patch from "Linus Walleij (LD/EAB)" Signed-off-by: Samuel Ortiz Signed-off-by: David S. Miller commit 2fd19a687c256fa4c4750465b9856e2c80660ec8 Author: Lamarque Vieira Souza Date: Wed Sep 27 22:48:36 2006 -0700 [IrDA] nsc-ircc: Configuration base address for PC87383 According to NatSemi datasheet, the configuration base address for the PC8738x family is 0x2e or 0x164. 0x0 doesn't appear in any datasheet. Patch from Lamarque Vieira Souza Signed-off-by: Samuel Ortiz Signed-off-by: David S. Miller commit b854d0d218688b30ccea70521d6ea5f3f56d4e12 Author: YOSHIFUJI Hideaki Date: Wed Sep 27 22:43:05 2006 -0700 [NET] KBUILD: Add missing entries for new net headers. Add the following for userspace export by the 'headers_include' make target: linux/fib_rules.h, linux/if_addr.h, linux/if_link.h, linux/neighbour.h. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit cbde1668e4f08e0a150207646010bc65e1e2a42b Author: YOSHIFUJI Hideaki Date: Wed Sep 27 22:40:19 2006 -0700 [NET]: Move netlink interface bits to linux/if_link.h. Moving netlink interface bits to linux/if.h is rather troublesome for applications including both linux/if.h (which was changed to be included from linux/rtnetlink.h automatically) and net/if.h. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 7b4dc3600e4877178ba94c7fbf7e520421378aa6 Author: Masahide NAKAMURA Date: Wed Sep 27 22:21:52 2006 -0700 [XFRM]: Do not add a state whose SPI is zero to the SPI hash. SPI=0 is used for acquired IPsec SA and MIPv6 RO state. Such state should not be added to the SPI hash because we do not care about it on deleting path. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki commit 7fa6b06689085a3e2237cf810f5e0c114e00a2da Author: Stephen Hemminger Date: Wed Sep 27 20:33:34 2006 -0700 [NET] loopback: minor statistics optimization The loopback device status structure is a singleton and doesn't need to be allocated. Add ethtool_ops hooks to show checksum always on, and make ethtool_ops const. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 1b0fee7d68f234be6b270cda51d9fcb71bebd780 Author: Samuel Ortiz Date: Wed Sep 27 20:06:44 2006 -0700 [IrDA]: Memory allocations cleanups This patch replaces the bunch of arbitrary 64 and 128 bytes alloc_skb() calls with more accurate allocation sizes. Signed-off-by: Samuel Ortiz Signed-off-by: David S. Miller commit 778e6398d32590eaf2333706318cbcd04dbe50b7 Author: Samuel Ortiz Date: Wed Sep 27 20:06:16 2006 -0700 [IrDA]: irda-usb needs firmware loader With the inclusion of the stir421x code, we now need to select FW_LOADER whenever we try to build the irda-usb code. Signed-off-by: Samuel Ortiz Signed-off-by: David S. Miller commit da349f1c2e0a0bf8958cdaf14e8f33acdf3182a5 Author: Samuel Ortiz Date: Wed Sep 27 20:05:38 2006 -0700 [IrDA]: af_irda.c cleanups We lock the socket when both releasing and getting a disconnected notification. In the latter case, we also ste the socket as orphan. This fixes a potential kernel bug that can be triggered when we get the disconnection notification before closing the socket. Signed-off-by: Samuel Ortiz Signed-off-by: David S. Miller commit 1a9e9ef684ec2bd27fcdb373a82957a0c050daf6 Author: Herbert Xu Date: Wed Sep 27 19:03:36 2006 -0700 [IPV6]: Disable SG for GSO unless we have checksum Because the system won't turn off the SG flag for us we need to do this manually on the IPv6 path. Otherwise we will throw IPv6 packets with bad checksums at the hardware. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 8122adf06e6f93ae608cf8227e878cc44f4a8fd1 Author: Al Viro Date: Wed Sep 27 18:49:35 2006 -0700 [XFRM]: xfrm_spi_hash() annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 4324a174304d1d826582be5422a976e09d2b1e63 Author: Al Viro Date: Wed Sep 27 18:49:07 2006 -0700 [XFRM]: fl_ipsec_spi is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 9916ecb0a6f52f1475fa2f71845227d3c75fb40c Author: Al Viro Date: Wed Sep 27 18:48:48 2006 -0700 [XFRM]: struct xfrm_usersa_id annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 61f4627b2fecce9d5c9645e4b47e75a0c29ad8c3 Author: Al Viro Date: Wed Sep 27 18:48:33 2006 -0700 [XFRM]: xfrm_replay_advance() annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit a252cc2371930debe3162f1ac91467b9791324cb Author: Al Viro Date: Wed Sep 27 18:48:18 2006 -0700 [XFRM]: xrfm_replay_check() annotations seq argument is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 6067b2baba32211e84d1ef2dba863422281bd6c7 Author: Al Viro Date: Wed Sep 27 18:47:59 2006 -0700 [XFRM]: xfrm_parse_spi() annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit e037c39bf965ca66fde902e191d849a90de278fe Author: Al Viro Date: Wed Sep 27 18:47:40 2006 -0700 [XFRM]: struct xfrm_id annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit a94cfd19744a568d97b14bbaa500b2a0c3684f34 Author: Al Viro Date: Wed Sep 27 18:47:24 2006 -0700 [XFRM]: xfrm_state_lookup() annotations spi argument of xfrm_state_lookup() is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 26977b4ed728ae911a162b16dbfe1a165b7cf9a1 Author: Al Viro Date: Wed Sep 27 18:47:05 2006 -0700 [XFRM]: xfrm_alloc_spi() annotated Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 737b5761dfc609b5be4163deb2cf09226f56bcbc Author: Al Viro Date: Wed Sep 27 18:46:48 2006 -0700 [XFRM]: xfrm_address_t annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 5f19343fb19613539355296b23cbc08d1336b52d Author: Al Viro Date: Wed Sep 27 18:46:32 2006 -0700 [XFRM]: addr_match() annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 8f83f23e6db8b9a9fe787d02f73489224668c4e2 Author: Al Viro Date: Wed Sep 27 18:46:11 2006 -0700 [XFRM]: ports in struct xfrm_selector annotated Signed-off-by: Al Viro Signed-off-by: David S. Miller commit f9d07e41f89e7305eb2c0475c170c51d21425581 Author: Al Viro Date: Wed Sep 27 18:45:50 2006 -0700 [XFRM]: xfrm_flowi_[sd]port() annotations both return net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit e2e38e819bd03e9674c102aaa2c9dc8151a3c3d0 Author: Al Viro Date: Wed Sep 27 18:45:27 2006 -0700 [IPV6]: sin6_port is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 43505077df075545e9b28b7c6ea12d82b3caf036 Author: Al Viro Date: Wed Sep 27 18:45:11 2006 -0700 [IPV6]: IPv6 headers annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 48818f822d2b2e16f4bf4d1ed1185e7d2146dc34 Author: Al Viro Date: Wed Sep 27 18:44:54 2006 -0700 [IPV6]: struct in6_addr annotations in6_addr elements are net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 9f8552996d969f56039ec88128cf5ad35b12f141 Author: Al Viro Date: Wed Sep 27 18:44:30 2006 -0700 [IPV4]: inet_diag annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 82103232edc4b4ed48949a195aca93cfa3fe3fa8 Author: Al Viro Date: Wed Sep 27 18:44:10 2006 -0700 [IPV4]: inet_rcv_saddr() annotations inet_rcv_saddr() returns net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 23f33c2d4fd5986243b67a2bf5e63ebae1a76ffa Author: Al Viro Date: Wed Sep 27 18:43:50 2006 -0700 [IPV4]: struct inet_timewait_sock annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit fb99c848e5ae6b8b2bc11f0f90c9e2bb3d702c0d Author: Al Viro Date: Wed Sep 27 18:43:33 2006 -0700 [IPV4]: annotate inet_lookup() and friends inet_lookup() annotated along with helper functions (__inet_lookup(), __inet_lookup_established(), inet_lookup_established(), inet_lookup_listener(), __inet_lookup_listener() and inet_ehashfn()) Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 4f765d842fa6e6fe15d555b247b640118d65b4dd Author: Al Viro Date: Wed Sep 27 18:43:07 2006 -0700 [IPV4]: INET_MATCH() annotations INET_MATCH() and friends depend on an interesting set of kludges: * there's a pair of adjacent fields in struct inet_sock - __be16 dport followed by __u16 num. We want to search by pair, so we combine the keys into a single 32bit value and compare with 32bit value read from &...->dport. * on 64bit targets we combine comparisons with pair of adjacent __be32 fields in the same way. Make sure that we don't mix those values with anything else and that pairs we form them from have correct types. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 45d60b9e29556a7831812ec338d82f4d3a4145f8 Author: Al Viro Date: Wed Sep 27 18:40:27 2006 -0700 [IPV4]: FRA_{DST,SRC} annotated use be32 netlink accessors for those Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 81f7bf6cbaca02c034b0393c51fc22b29cba20f7 Author: Al Viro Date: Wed Sep 27 18:40:00 2006 -0700 [IPV4]: net/ipv4/fib annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 114c7844f34c1608aec20ae7ff85cec471ac90ae Author: Al Viro Date: Wed Sep 27 18:39:29 2006 -0700 [IPV4]: mroute annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 1b620154273d5cc57690e0d199282c6bb9e56974 Author: Al Viro Date: Wed Sep 27 18:39:09 2006 -0700 [IPV4]: PIMv2 header annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit df7a3b07c28e7b547d8252a237299e32880b505d Author: Al Viro Date: Wed Sep 27 18:38:52 2006 -0700 [TCP] net/ipv4/tcp_output.c: trivial annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit b03d73e30c1b29a365f085bca5214a14c6df3859 Author: Al Viro Date: Wed Sep 27 18:38:30 2006 -0700 [IPV4] net/ipv4/icmp.c: trivial annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit b1dd39ac963040c2d282ab8026b9c9aa9306ea06 Author: Al Viro Date: Wed Sep 27 18:38:13 2006 -0700 [IPV4]: ICMP header annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 734ab87f632e94dfd4299f4d4d1d10668548f9d8 Author: Al Viro Date: Wed Sep 27 18:37:41 2006 -0700 [UDP] net/ipv4/udp.c: trivial annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 4e7e0c7592cafe5453e5b2f115fc0065d11b3d44 Author: Al Viro Date: Wed Sep 27 18:37:19 2006 -0700 [IPV4]: UDP header annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 6b72977bd6c6fefc6497d4f0275079f539eaf0ac Author: Al Viro Date: Wed Sep 27 18:36:59 2006 -0700 [IPV4]: inet_csk_search_req() annotations rport argument is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit ed9bad06eec5ee7842851f9abeb406e9a73084e8 Author: Al Viro Date: Wed Sep 27 18:36:36 2006 -0700 [IPV4] net/ipv4/arp.c: trivial annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit bd6d610a14f2ed896b76dfb61fbdec829e44b8d3 Author: Al Viro Date: Wed Sep 27 18:35:47 2006 -0700 [IPV4]: ARP header annotated Signed-off-by: Al Viro Signed-off-by: David S. Miller commit e11be94bf6a3bfc90816d37847e6b5b179ca2ff6 Author: Al Viro Date: Wed Sep 27 18:35:29 2006 -0700 [IPV4]: struct inet_request_sock annotations ->port is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 4f3608b787f471e8e6b9f39c5ed1edde5a2e7d04 Author: Al Viro Date: Wed Sep 27 18:35:09 2006 -0700 [TCP] net/ipv4/tcp_input.c: trivial annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 39dccd9d922b595301e5d43ca7a30823d81393b6 Author: Al Viro Date: Wed Sep 27 18:34:41 2006 -0700 [IPV4]: route.h annotations ip_route_connect(), ip_route_newports() get port numbers net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 35986b329f5476630cef00cc7a164ff336ec1a21 Author: Al Viro Date: Wed Sep 27 18:34:21 2006 -0700 [IPV4]: ip_icmp_error() annotations port is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit b406313c733156c8eea7d9c1891476f400914367 Author: Al Viro Date: Wed Sep 27 18:34:02 2006 -0700 [NET]: struct sock_exterr_skb annotations ->port is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 0579016ec4691116f6322ec6ed7fb7ce746948e9 Author: Al Viro Date: Wed Sep 27 18:33:40 2006 -0700 [IPV4]: ip_local_error() annotations port argument is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit cc939d37349bf82891bd1f4558284d7fafe7acb2 Author: Al Viro Date: Wed Sep 27 18:33:22 2006 -0700 [NET]: ip ports in struct flowi are net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 2816e1284a2db03ad5e205bab4eacbc5f7d4f991 Author: Al Viro Date: Wed Sep 27 18:33:05 2006 -0700 [IPV4]: ports in struct inet_sock are net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit dddc93c05d7dba60b44866486502c155e96ab915 Author: Al Viro Date: Wed Sep 27 18:32:46 2006 -0700 [TCP]: struct tcp_sock .pred_flags is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 269bd27e66037a7932cee6d6aa7ef7defd0bfe38 Author: Al Viro Date: Wed Sep 27 18:32:28 2006 -0700 [TCP]: struct tcp_sack_block annotations Some of the instances of tcp_sack_block are host-endian, some - net-endian. Define struct tcp_sack_block_wire identical to struct tcp_sack_block with u32 replaced with __be32; annotate uses of tcp_sack_block replacing net-endian ones with tcp_sack_block_wire. Change is obviously safe since for cc(1) __be32 is typedefed to u32. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 46a97324a5ebdc1e343a0223d993e79551adab0f Author: Al Viro Date: Wed Sep 27 18:31:51 2006 -0700 [IPV4]: TCP headers annotated Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 63007727e0bb09e8d906f73d36a09b9fac0d5893 Author: Al Viro Date: Wed Sep 27 18:31:32 2006 -0700 [IPV4]: trivial igmp annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit c0cda068aac3481d40795b115e4fd36f7d386e3a Author: Al Viro Date: Wed Sep 27 18:31:10 2006 -0700 [IPV4]: ip_mc_sf_allow() annotated ip_mc_sf_allow() expects addresses to be passed net-endian. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit ea4d9e7220d32348cc9742ba6d27de5165262664 Author: Al Viro Date: Wed Sep 27 18:30:52 2006 -0700 [IPV4]: struct ip_sf_list and struct ip_sf_socklist annotated Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 942bf921e922560c05fde6afb00ddedf6224c608 Author: Al Viro Date: Wed Sep 27 18:30:28 2006 -0700 [IPV4]: IGMP on-the-wire data is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 8f935bbd7c6c66796c2403aefdab74bb48045bf6 Author: Al Viro Date: Wed Sep 27 18:30:07 2006 -0700 [IPV4]: ip_mc_{inc,dec}_group() annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 00a5020cd51febbb3166ff7a09a2901c47ba251a Author: Al Viro Date: Wed Sep 27 18:29:47 2006 -0700 [IPV4]: annotate ipv4 address fields in struct ip_msfilter and struct ip_mreq_source Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 4b06a7cf2f3c053e7fc47ca6a4c74553e2291e24 Author: Al Viro Date: Wed Sep 27 18:29:07 2006 -0700 [IPV4]: ip_local_error() ipv4 address argument annotated daddr is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit e25d2ca6b2808c427704b01608baf0f7dea1696e Author: Al Viro Date: Wed Sep 27 18:28:47 2006 -0700 [IPV4]: trivial ip_options.c annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit c1d18f9fa09489635a451ee13c1727e1683c2333 Author: Al Viro Date: Wed Sep 27 18:28:28 2006 -0700 [IPV4]: struct ipcm_cookie annotation ->addr is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 3ca3c68e76686bee058937ade2b96f4de58ee434 Author: Al Viro Date: Wed Sep 27 18:28:07 2006 -0700 [IPV4]: struct ip_options annotations ->faddr is net-endian; annotated as such, variables inferred to be net-endian annotated. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 7f25afbbefb266520a237df0e9b59112704a7a42 Author: Al Viro Date: Wed Sep 27 18:27:47 2006 -0700 [IPV4]: inet_csk_search_req() (partial) annotations raddr is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit adaf345b537681c6ed3657941904d976fe72f342 Author: Al Viro Date: Wed Sep 27 18:27:13 2006 -0700 [IPV4]: annotate address in inet_request_sock Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 85670cc1faa2e1472e4a423cbf0b5e3d55c5ba88 Author: Patrick McHardy Date: Wed Sep 27 16:45:45 2006 -0700 [NET_SCHED]: Fix fallout from dev->qdisc RCU change The move of qdisc destruction to a rcu callback broke locking in the entire qdisc layer by invalidating previously valid assumptions about the context in which changes to the qdisc tree occur. The two assumptions were: - since changes only happen in process context, read_lock doesn't need bottem half protection. Now invalid since destruction of inner qdiscs, classifiers, actions and estimators happens in the RCU callback unless they're manually deleted, resulting in dead-locks when read_lock in process context is interrupted by write_lock_bh in bottem half context. - since changes only happen under the RTNL, no additional locking is necessary for data not used during packet processing (f.e. u32_list). Again, since destruction now happens in the RCU callback, this assumption is not valid anymore, causing races while using this data, which can result in corruption or use-after-free. Instead of "fixing" this by disabling bottem halfs everywhere and adding new locks/refcounting, this patch makes these assumptions valid again by moving destruction back to process context. Since only the dev->qdisc pointer is protected by RCU, but ->enqueue and the qdisc tree are still protected by dev->qdisc_lock, destruction of the tree can be performed immediately and only the final free needs to happen in the rcu callback to make sure dev_queue_xmit doesn't access already freed memory. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 787e0617e5176176c494a787f1b0a5248a3db568 Author: Patrick McHardy Date: Wed Sep 27 16:36:23 2006 -0700 [NET_SCHED]: HTB: fix incorrect use of RB_EMPTY_NODE Fix incorrect use of RB_EMPTY_NODE in htb_safe_rb_erase, which makes it skip nodes within the rbtree instead of nodes not in the tree, resulting in crashes later on. The root cause for this seems to be the very counter-intuitive behaviour of the RB_EMPTY_NODE macro, which returns _false_ when the node is empty. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 321efff7c3b7a26fa0522cb12b2af2ac82c05f1e Author: Olaf Kirch Date: Wed Sep 27 16:33:45 2006 -0700 [IPV4]: Fix order in inet_init failure path. This is just a minor buglet I came across by accident - when inet_init fails to register raw_prot, it jumps to out_unregister_udp_proto which should unregister UDP _and_ TCP. Signed-off-by: Olaf Kirch Signed-off-by: David S. Miller commit f0e82fd0e5ad8494985ddfca7de89a800cf96fb8 Author: Francesco Fondelli Date: Wed Sep 27 16:33:05 2006 -0700 [PKTGEN]: Documentation update Signed-off-by: Francesco Fondelli Signed-off-by: Robert Olsson Signed-off-by: David S. Miller commit 1ca7768c87ac1393228857d576654f7e84c8cee6 Author: Francesco Fondelli Date: Wed Sep 27 16:32:03 2006 -0700 [PKTGEN]: DSCP support Anyway, I've been asked to add support for managing DSCP codepoints, so one can test DiffServ capable routers. It's very simple code and is working for me. Signed-off-by: Francesco Fondelli Signed-off-by: Robert Olsson Signed-off-by: David S. Miller commit 34954ddc4f3e790fb6d5ed331513f54b38713234 Author: Francesco Fondelli Date: Wed Sep 27 16:30:44 2006 -0700 [PKTGEN]: vlan support The attached patch allows pktgen to produce 802.1Q and Q-in-Q tagged frames. I have used it for stress test a bridge and seems ok to me. Unfortunately I have no access to net-2.6.x git tree so the diff is against 2.6.17.13. Signed-off-by: Francesco Fondelli Acked-by: Steven Whitehouse Signed-off-by: Robert Olsson Signed-off-by: David S. Miller commit 658270a0a49612a0e3fdc01c2e8c0e1a6d47cbf4 Author: Kim Nordlund Date: Wed Sep 27 16:19:53 2006 -0700 [PKT_SCHED] cls_basic: Use unsigned int when generating handle Prevents filters from being added if the first generated handle already exists. Signed-off-by: Kim Nordlund Signed-off-by: Thomas Graf commit c9aa6895371b2a257401f59d3393c9f7ac5a8698 Author: Michal Ostrowski Date: Wed Sep 27 16:11:25 2006 -0700 [PPPOE]: Advertise PPPoE MTU PPPoE must advertise the underlying device's MTU via the ppp channel descriptor structure, as multilink functionality depends on it. Signed-off-by: Michal Ostrowski Acked-by: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 1533d382155ee888d9621391c108ffb7a68bb25d Author: Michael Chan Date: Wed Sep 27 16:10:35 2006 -0700 [TG3]: Update version and reldate. Update version to 3.66. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit b16250e3d1c55820f08f0296624a423122ea9805 Author: Michael Chan Date: Wed Sep 27 16:10:14 2006 -0700 [TG3]: Add 5709 self-test support. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 715116a12610b67c1d301a9b845ce95f7247dad3 Author: Michael Chan Date: Wed Sep 27 16:09:25 2006 -0700 [TG3]: Add 5709 PHY support. Add support for the 5709 10/100 PHY. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit b5d3772ccbe0bc5ac8ffbb5356b74ca698aee28c Author: Michael Chan Date: Wed Sep 27 16:06:21 2006 -0700 [TG3]: Add basic 5906 support. Add support for the new 5709 device. This is a new 10/100 Mbps chip. The mailbox access and firmware interface are quite different from all other tg3 chips. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 7a6f4369449a471a6e5718a87c53ac75a46960ba Author: Michael Chan Date: Wed Sep 27 16:03:31 2006 -0700 [TG3]: Add tg3_poll_fw(). Put the firmware polling logic into a separate function. This makes the code cleaner. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 126a336822a6594662f5898f1ddf33e6d048fcc7 Author: Michael Chan Date: Wed Sep 27 16:03:07 2006 -0700 [TG3]: Add 5722 and 5756 support. Add IDs to support 5722 and 5756. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3f7045c1f28bedd44389b9392b54c6fdb83ee5c6 Author: Michael Chan Date: Wed Sep 27 16:02:29 2006 -0700 [TG3]: PHY fixes. Some PHY related fixes: 1. Fix Serdes WoL. 2. Fix loopback test on 10/100 only devices. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 130b8e4d0e4edadcecee9fdff2c32f33d77c4fe9 Author: Michael Chan Date: Wed Sep 27 16:00:40 2006 -0700 [TG3]: Improve ASF heartbeat. Change to a different ASF heartbeat message code to improve reliability. There were some reports of unintended resets on real time kernels where the timer may be slow and cause the heartbeat to be late. Netpoll will also have the same problem because the timer irq will be unavailable. Using the new heartbeat code, the ASF firmware will also check the ring condition before resetting the chip when the heartbeat is expiring. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3d3ebe741b2c06fe3df67739d09f6ef0e25ee41a Author: Michael Chan Date: Wed Sep 27 15:59:15 2006 -0700 [TG3]: Improve 5704S autoneg. Improve 5704S autoneg logic by using a serdes_counter field to keep track of the transient states. This eliminates a 200 msec busy loop in the code. Autoneg will take its course without the driver busy waiting for it to finish. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 6ac59344ef25d5f0ebadb5663cf700d25d2a3886 Author: Marcel Holtmann Date: Tue Sep 26 09:43:48 2006 +0200 [Bluetooth] Support create connection cancel command In case of non-blocking connects it is possible that the last user of an ACL link quits before the connection has been fully established. This will lead to a race condition where the internal state of a connection is closed, but the actual link has been established and is active. In case of Bluetooth 1.2 and later devices it is possible to call create connection cancel to abort the connect. For older devices the disconnect timer will be used to trigger the needed disconnect. Signed-off-by: Marcel Holtmann commit 1143e5a6d4d69cd36d44e0184769aa2b17041a10 Author: Marcel Holtmann Date: Sat Sep 23 09:57:20 2006 +0200 [Bluetooth] Read local version information on device init The local version information are needed to identify certain feature sets of devices. They must be read on device init and stored for later use. It is also possible to access them through the device model. Signed-off-by: Marcel Holtmann commit b4c612a473eb816dff6e5ab6820dff338057aa8d Author: Marcel Holtmann Date: Sat Sep 23 09:54:38 2006 +0200 [Bluetooth] Return EINPROGRESS for non-blocking socket calls In case of non-blocking socket calls we should return EINPROGRESS and not EAGAIN. Signed-off-by: Ulisses Furquim Signed-off-by: Marcel Holtmann commit 7785162cf2baf7c6c1e4ad8ae5888f85fcc5febc Author: Marcel Holtmann Date: Thu Sep 21 16:23:19 2006 +0200 [Bluetooth] Code cleanup for the HCI UART driver This patch cleans up the Bluetooth HCI UART driver a bit. Signed-off-by: Pavel Machek Signed-off-by: Marcel Holtmann commit 62ae15919b6db6644049338296624fbd724c0054 Author: Marcel Holtmann Date: Thu Sep 21 16:19:55 2006 +0200 [Bluetooth] Add support for Canyon CN-BTU1 dongle This patch adds the vendor and product id of the Canycon CN-BTU1 dongle and sets a flag to send HCI_Reset as the first command. Signed-off-by: Marcel Holtmann commit defc761bc25643eeedee3abd6af0079ef214b55d Author: Marcel Holtmann Date: Thu Sep 21 16:04:00 2006 +0200 [Bluetooth] Handle command complete event for exit periodic inquiry The command complete event of the exit periodic inquiry command must clear the HCI_INQUIRY flag and finish the HCI request. Signed-off-by: Marcel Holtmann commit 0ac53939a06c610b394aeb0211b985804f2d2da3 Author: Marcel Holtmann Date: Sat Jul 8 13:57:15 2006 +0200 [Bluetooth] Add HCI device identifier for SDIO cards This patch assigns the next free HCI device identifier to Bluetooth devices based on the SDIO interface. Signed-off-by: Marcel Holtmann commit 9c724357f432df5ddc83a62c8168414a604cd420 Author: Marcel Holtmann Date: Thu Jul 6 15:45:23 2006 +0200 [Bluetooth] Code cleanup of the drivers source code This patch is an attempt to cleanup the drivers source code to make all Bluetooth drivers look more unique. Signed-off-by: Marcel Holtmann commit 0a85b964e141a4b8db6eaf500ceace12f8f52f93 Author: Marcel Holtmann Date: Thu Jul 6 13:09:02 2006 +0200 [Bluetooth] Integrate services into the driver model This patch integrates the services of the Bluetooth protocols RFCOMM, BNEP and HIDP into the driver model. This makes it possible to assign the virtual TTY, network and input devices to a specific Bluetooth connection. Signed-off-by: Marcel Holtmann commit b219e3ac66183fc9771b94af931fb5fd41d586ec Author: Marcel Holtmann Date: Thu Jul 6 12:38:46 2006 +0200 [Bluetooth] Integrate low-level connections into the driver model This patch integrates the low-level connections (ACL and SCO) into the driver model. Every connection is presented as device with the parent set to its host controller device. Signed-off-by: Marcel Holtmann commit 4d0eb0049ce94101f7f169f89216ba58475219e2 Author: Marcel Holtmann Date: Thu Jul 6 12:34:41 2006 +0200 [Bluetooth] Remove unused host controller attributes This patch removes the unused device attribute entries for the Bluetooth host controllers. Signed-off-by: Marcel Holtmann commit 9918f230969bdaf3df012b77abcbcd4cdb0ab221 Author: Eric Sesterhenn Date: Tue Sep 26 23:26:38 2006 -0700 [RTNETLINK]: Possible dereference in net/core/rtnetlink.c another possible dereference spotted by coverity (#cid 1390). if the nlmsg_parse() call fails, we goto errout, where we call dev_put(), with dev still initialized to NULL. Signed-off-by: Eric Sesterhenn Signed-off-by: David S. Miller commit 753ed90d92009260616f6402aafa7ee47e03b162 Author: Al Viro Date: Tue Sep 26 22:30:23 2006 -0700 [SUNRPC]: more sunrpc endianness annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit d8ed029d6000ba2e2908d9286409e4833c091b4c Author: Alexey Dobriyan Date: Tue Sep 26 22:29:38 2006 -0700 [SUNRPC]: trivial endianness annotations pure s/u32/__be32/ [AV: large part based on Alexey's patches] Signed-off-by: Alexey Dobriyan Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 7699431301b189fca7ccbb64fe54e5a5170f8497 Author: Alexey Dobriyan Date: Tue Sep 26 22:28:46 2006 -0700 [SUNRPC]: svc_{get,put}nl() * add svc_getnl(): Take network-endian value from buffer, convert to host-endian and return it. * add svc_putnl(): Take host-endian value, convert to network-endian and put it into a buffer. * annotate svc_getu32()/svc_putu32() as dealing with network-endian. * convert to svc_getnl(), svc_putnl(). [AV: in large part it's a carved-up Alexey's patch] Signed-off-by: Alexey Dobriyan Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 13d8eaa06abfeb708b60fa64203a20db033088b3 Author: Al Viro Date: Tue Sep 26 22:27:30 2006 -0700 [IPV4]: ip_build_and_send_pkt() annotations saddr and daddr are net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 8712f774dc47ec6353c9b75317d6db62e58d9367 Author: Al Viro Date: Tue Sep 26 22:27:05 2006 -0700 [IPV4]: ip_options_build() annotations daddr is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit e8192f367cb3dcbefaa4109d26f3b1645b0c6b56 Author: Al Viro Date: Tue Sep 26 22:26:21 2006 -0700 [IPV4] bug: broken open-coded inet_make_mask() (multipath_wrandom) multipath_wrandom.c::__multipath_lookup_weight() contains open-coded attempt at inet_make_mask(); broken on big-endian. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit f20f4a60d74b0d7e2a5dafd5e7d5760f44ce2f30 Author: Al Viro Date: Tue Sep 26 22:25:13 2006 -0700 [IPV4] multipath_wrandom.c: trivial annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit d9cd66e0e593929077b5ecf87384e23db7271c6e Author: Al Viro Date: Tue Sep 26 22:22:50 2006 -0700 [IPV4]: multipath_set_nhinfo() annotations multipath_set_nhinfo() (and underlying callback) take net-endian network and netmask. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 32ab5f80334fc067386c4c56c434010c01cff6b9 Author: Al Viro Date: Tue Sep 26 22:21:45 2006 -0700 [IPV4] fib_trie.c: trivial annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 1e8aa6f125d959d1a9f16a3f15e9ebbc6df63935 Author: Al Viro Date: Tue Sep 26 22:21:22 2006 -0700 [IPV4] bug: open-coded inet_make_mask() in fib_semantic_match() is broken ... and works only on little-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 1ef1b8c85bb4954b7dca816f1bb7fd54bcd78078 Author: Al Viro Date: Tue Sep 26 22:20:56 2006 -0700 [IPV4]: fib_semantic_match() annotations 'mask' and 'zone' arguments are net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit b6e80c6c8b2de8b581e7521af3e118ea379260f1 Author: Al Viro Date: Tue Sep 26 22:20:01 2006 -0700 [IPV4]: trivial fib_hash.c annotations hash key and stored netmask are net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 80e856e16a145d7f44f613d9f3d903bf459510ca Author: Al Viro Date: Tue Sep 26 22:19:36 2006 -0700 [IPV4]: annotate addresses in fib_result and fib_result_nl Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 182777700d912a69824245e9ee99148ac0aa57d7 Author: Al Viro Date: Tue Sep 26 22:19:02 2006 -0700 [IPV4]: ip_fragment.c endianness annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 53576d9b995605a9edc7414b900a9218c8f23b1f Author: Al Viro Date: Tue Sep 26 22:18:43 2006 -0700 [IPV4]: inetpeer annotations This one is interesting - we use net-endian value as search key, but order the tree by *host-endian* comparisons of keys. OK since we only care about lookups. Annotated inet_getpeer() and friends. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit d878e72e419db9ff4c66848375ee30a19820e4de Author: Al Viro Date: Tue Sep 26 22:18:13 2006 -0700 [IPV4]: ip_fib_check_default() annotated Signed-off-by: Al Viro Signed-off-by: David S. Miller commit fd6832220974809141b3981e380b78690bba8911 Author: Al Viro Date: Tue Sep 26 22:17:51 2006 -0700 [IPV4]: inet_addr_type() annotations argument and inferred net-endian variables in callers annotated. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit e4883014f48f8c17c17a2526cb5cb6e17c5f94e7 Author: Al Viro Date: Tue Sep 26 22:17:28 2006 -0700 [IPV4]: icmp_send() annotation The last argument is network-endian (it will go straight into the packet). Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 60cad5da5791ceb0beefe9a79b570cca45791f50 Author: Al Viro Date: Tue Sep 26 22:17:09 2006 -0700 [IPV4]: annotate inetdev.h helpers inet_confirm_addr(), inet_ifa_byprefix(), ip_dev_find(), inet_make_mask() and inet_ifa_match() annotated, along with inferred net-endian variables Signed-off-by: Al Viro Signed-off-by: David S. Miller commit a7a628c442ed28511e1569a975c993b27fa034f4 Author: Al Viro Date: Tue Sep 26 22:16:43 2006 -0700 [IPV4]: IFA_{LOCAL,ADDRESS,BROADCAST,ANYCAST} on ipv4 annotated use be32 netlink accessors Signed-off-by: Al Viro Signed-off-by: David S. Miller commit a144ea4b7a13087081ab5402fa9ad0bcfd249e67 Author: Al Viro Date: Thu Sep 28 18:00:55 2006 -0700 [IPV4]: annotate struct in_ifaddr ifa_local, ifa_address, ifa_mask, ifa_broadcast and ifa_anycast are net-endian. Annotated them and variables that are inferred to be net-endian. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 6d85c10abe840e98cbac673202fe7cc9ada2180c Author: Al Viro Date: Tue Sep 26 22:15:46 2006 -0700 [IPV4]: struct fib_config IPv4 address fields annotated Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 17fb2c64394a2d5106540d69fc83c183ee7c206e Author: Al Viro Date: Tue Sep 26 22:15:25 2006 -0700 [IPV4]: RTA_{DST,SRC,GATEWAY,PREFSRC} annotated these are passed net-endian; use be32 netlink accessors Signed-off-by: Al Viro Signed-off-by: David S. Miller commit e448515c79c3785eae225c25e8cd5b90b470d0a6 Author: Al Viro Date: Tue Sep 26 22:15:01 2006 -0700 [IPV4] net/ipv4/route.c: trivial endianness annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 00012e5bb9527022cbc843c5d372b282dbe6c4af Author: Al Viro Date: Tue Sep 26 22:14:41 2006 -0700 [IPV4]: introduce nla_get_be32()/NLA_PUT_BE32() net-endian counterparts of nla_get_u32()/NLA_PUT_U32() Signed-off-by: Al Viro Signed-off-by: David S. Miller commit b83738ae003dde613712ddb1e90a8a01f5587b51 Author: Al Viro Date: Tue Sep 26 22:14:15 2006 -0700 [IPV4]: FIB_RES_PREFSRC() annotated Signed-off-by: Al Viro Signed-off-by: David S. Miller commit ed49e3caaa6126f8e29f08e8b4fdcafcae431b57 Author: Al Viro Date: Tue Sep 26 22:13:54 2006 -0700 [IPV4]: fib_hn ->nh_gw is net-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller commit ff428d72c59b35e4ba34bc1b487e707648010fe3 Author: Al Viro Date: Tue Sep 26 22:13:35 2006 -0700 [IPV4]: inet_addr_onlink() annotated Signed-off-by: Al Viro Signed-off-by: David S. Miller commit a60c4923da795c74db9ff61a60e2f1df5754e4ce Author: Al Viro Date: Tue Sep 26 21:28:34 2006 -0700 [IPV4]: ip_check_mc() annotations annotated arguments Signed-off-by: Al Viro Signed-off-by: David S. Miller commit d9c9df8c9368f4102324e8c3923edae83974602b Author: Al Viro Date: Tue Sep 26 21:28:14 2006 -0700 [IPV4]: fib_validate_source() annotations annotated arguments and inferred net-endian variables in callers Signed-off-by: Al Viro Signed-off-by: David S. Miller commit a61ced5d1c2e773620d7855ea2009d770c10a6e6 Author: Al Viro Date: Tue Sep 26 21:27:54 2006 -0700 [IPV4]: inet_select_addr() annotations argument and return value are net-endian. Annotated function and inferred net-endian variables in callers. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 011a92610826bdeec4b80ab423958d4c512639f6 Author: Al Viro Date: Tue Sep 26 21:27:35 2006 -0700 [IPV4]: annotated ipv4 addresses in struct inet_sock Signed-off-by: Al Viro Signed-off-by: David S. Miller commit bada8adc4e6622764205921e6ba3f717aa03c882 Author: Al Viro Date: Tue Sep 26 21:27:15 2006 -0700 [IPV4]: ip_route_connect() ipv4 address arguments annotated annotated address arguments (port number left alone for now); ditto for inferred net-endian variables in callers. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit f2c3fe24119ee4f8faca08699f0488f500014a27 Author: Al Viro Date: Tue Sep 26 21:26:42 2006 -0700 [IPV4]: annotate ipv4 addresses in struct rtable and struct flowi Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 8c7bc84085135d5cc87e9fc6802d3c7bbbb40ef5 Author: Al Viro Date: Tue Sep 26 21:26:19 2006 -0700 [IPV4]: annotate rt_hash_code() users Signed-off-by: Al Viro Signed-off-by: David S. Miller commit f7655229c06d041323b40bd6eb9f95ca0ce95506 Author: Al Viro Date: Tue Sep 26 21:25:43 2006 -0700 [IPV4]: ip_rt_redirect() annotations The first 4 arguments of ip_rt_redirect() are net-endian. Annotated. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 9e12bb22e32389b41222c9d9fb55724fed83a038 Author: Al Viro Date: Tue Sep 26 21:25:20 2006 -0700 [IPV4]: ip_route_input() annotations ip_route_input() takes net-endian source and destination address. * Annotated as such. * arguments of its invocations annotated where needed. * local helpers getting the same values passed to by it (ip_route_input_mc(), ip_route_input_slow(), ip_handle_martian_source(), ip_mkroute_input(), ip_mkroute_input_def(), __mkroute_input()) annotated Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 046d033148e6936ee2466d38214cf0743a210f39 Author: Al Viro Date: Tue Sep 26 21:24:24 2006 -0700 [IPV4]: headers endianness Signed-off-by: Al Viro Signed-off-by: David S. Miller commit b4229934bd11e1dd03d433072ef3871915fc5e4f Author: Al Viro Date: Tue Sep 26 21:23:43 2006 -0700 [ATM]: use NIPQUAD instead of open-coding it Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 0ac0760a57a6b1eb75c21a590e578be5dfc2f88b Author: Al Viro Date: Tue Sep 26 21:23:16 2006 -0700 [TR]: endiannness annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 2a50f28c326d20ab4556be1b867ecddf6aefbb88 Author: Al Viro Date: Tue Sep 26 21:22:08 2006 -0700 [ATALK]: endianness annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 82fe7c924e61f9444b376498496942d41fbe9d26 Author: Grant Grundler Date: Mon Sep 25 23:47:14 2006 -0700 [NET] Kconfig: fix cut/paste error in TCPPROBE Fix cut/paste error in TCPPROBE help text. Signed-off-by: Grant Grundler Signed-off-by: David S. Miller commit 1618cb0c9c2ac128beb94ff376e3367932ae6432 Author: Randy Dunlap Date: Mon Sep 25 23:11:21 2006 -0700 [NETDEV] config: revert part of previous patch Net devices should depend on NETDEVICES, so revert part of Paolo's previous patch. See http://marc.theaimsgroup.com/?l=linux-kernel&m=115566326218740&w=2 for history. Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller commit 83e331e2a492a134e491bcf50c984fd50c7fae03 Author: Chuck Short Date: Mon Sep 25 22:31:03 2006 -0700 [IRDA] via-ircc: fix memory leak Fix memory leak. Coverity id# 653 patch location: http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=a1f34cb68b16807ed9d5ebb0f6a6ec5ff8a5fc78 Signed-off-by: Chuck Short Signed-off-by: Ben Collins Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 293b9c42511d800b5f7bb2acba50f3e584b8c410 Author: Fabio Olive Leite Date: Mon Sep 25 22:28:47 2006 -0700 [IPV6]: bh_lock_sock_nested on tcp_v6_rcv A while ago Ingo patched tcp_v4_rcv on net/ipv4/tcp_ipv4.c to use bh_lock_sock_nested and silence a lock validator warning. This fixed it for IPv4, but recently I saw a report of the same warning on IPv6. Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 6e3ce3ae8e872f2d3a30f5ce5bc3b7c5eeca4343 Author: Greg Kroah-Hartman Date: Thu Sep 28 17:06:45 2006 -0700 USB: fix build error in ohci driver Thanks to Andrew for the original patch for this. I need to upgrade my version of gcc to catch these things... Signed-off-by: Greg Kroah-Hartman commit 2cc1a4134f51b4aff7c7486d857e6773f493e370 Author: Dave Jones Date: Thu Sep 28 19:50:07 2006 -0400 [AGPGART] printk fixups. Signed-off-by: Dave Jones commit 6174d0fd35f486f59b743630bdf088a9f9792d4d Author: Alan Stern Date: Tue Sep 26 14:51:48 2006 -0400 USB: g_file_storage: Set sense info Valid bit only when needed Strictly speaking, the Valid bit in SCSI sense data is supposed to be set only when the Information field contains a valid number. This patch (as793) turns off the Valid bit when the Information field hasn't been set. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit e0318ebff4d96131bb3524308b845f642e64df81 Author: Alan Stern Date: Tue Sep 26 14:50:20 2006 -0400 USB: fix autosuspend when CONFIG_PM isn't set This patch (as791b) fixes things up to avoid compiler warnings or errors when CONFIG_USB_SUSPEND or CONFIG_PM isn't set. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 8d1a243ba5dda5c1a3cca5df8fb19ab8b138f074 Author: Alan Stern Date: Tue Sep 26 14:46:16 2006 -0400 OHCI: add auto-stop support This patch (as790b) adds "autostop" support to ohci-hcd: the driver will automatically stop the host controller when no devices have been connected for at least one second. This feature is useful when the USB autosuspend facility isn't available, such as when CONFIG_USB_SUSPEND hasn't been set. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 1f7e1a3b7e05c833229c4b6e9d3c96262df59e99 Author: Alan Stern Date: Mon Sep 25 15:41:21 2006 -0400 OHCI: remove existing autosuspend code The autosuspend technique used by ohci-hcd doesn't mesh well with the newer USB core autosuspend code. This patch (as789) removes ohci-hcd's autosuspend support. Now the driver will be usable, but it won't automatically go into a low-power state when no devices are connected. That's for a later patch. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit d19ac7da72ab950c315d0da0aa03464587d88b53 Author: Alan Stern Date: Mon Sep 25 15:41:12 2006 -0400 USB: allow both root-hub interrupts and polling Originally I didn't think any host controller driver would ever use interrupts and polling at the same time, but it turns out ohci-hcd wants to do exactly that. This patch (as788) makes it possible. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 2de9eaefa7330b8e3d3fc5f31288cb1e826173a8 Author: Alan Stern Date: Mon Sep 25 14:31:15 2006 -0400 USB: g_file_storage: fix "ignoring return value" warnings This patch (as792) fixes "ignoring return value" warnings in file_storage.c. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit efd54a364121f61b2050b1df5ecb1b8329c4eaba Author: Alan Stern Date: Mon Sep 25 11:55:56 2006 -0400 USB: dummy-hcd: fix "warn-unused-result" messages This patch (as758) fixes the "warn-unused-result" messages in dummy-hcd. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit bd859281c09b4318153dc7222b5e9052aad83b61 Author: Alan Stern Date: Tue Sep 19 10:14:07 2006 -0400 USB: create new workqueue thread for USB autosuspend This patch (as787) creates a new workqueue thread to handle delayed USB autosuspend requests. Previously the code used keventd. However it turns out that the hub driver's suspend routine calls flush_scheduled_work(), making it a poor candidate for running in keventd (the call immediately deadlocks). The solution is to use a new thread instead of keventd. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 6a9fb060393e04a79973f95925f4f6587442e9c7 Author: Jan Mate Date: Mon Sep 25 17:00:57 2006 -0700 USB Storage: unusual_devs.h entry for Sony Ericsson P990i USB Storage: this patch adds support for Sony Ericsson P990i Signed-off-by: Jan Mate Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 0eebe6ac7c58dc617d78b4e4713540f388e7c1f6 Author: Henrik Kretzschmar Date: Mon Sep 25 17:00:58 2006 -0700 USB: microtek usb scanner: Scsi_Cmnd conversion Converts obsolete typedef'd Scsi_Cmnd into struct scsi_cmnd. Signed-off-by: Henrik Kretzschmar Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 701f35af282e3955159bd30d3fb3f6ebafe8bff2 Author: Henrik Kretzschmar Date: Mon Sep 25 17:00:56 2006 -0700 USB: fixes kerneldoc errors in usbcore-auto(susp/res)-patch Fixes kerneldoc errors on usb/core/driver.c, which occured in 2.6.18-rc6-mm2 gregkh-usb-usbcore-add-autosuspend-autoresume-infrastructure.patch Signed-off-by: Henrik Kretzschmar Acked-by: Alan Stern Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 931e24b93a10b53da8223272b83941bc5b1d6dc5 Author: Raghavendra Biligiri Date: Fri Sep 15 19:53:35 2006 +0530 USB: add Raritan KVM USB Dongle to the HID_QUIRK_NOGET blacklist During Installation the host tries to enumerate the keyboard/mouse dongle for the Raritan KVM.At this time timeouts have been observed Adding the Raritan KVM USB dongle to the blacklist fixes this issue. Signed-off-by: Raghavendra Biligiri Signed-off-by: Greg Kroah-Hartman commit b923e7fcc152199959b673e09c318a750a10928b Author: David Hollis Date: Thu Sep 21 08:09:29 2006 -0400 USB: asix - Add alternate device IDs for Dlink DUB-E100 Rev B1 Add alternate device IDs for Dlink DUB-E100 Rev B1 Signed-off-by: David Hollis Signed-off-by: Greg Kroah-Hartman commit e81ee637e4aed723f71007c90a901268317ed6d6 Author: Peter Zijlstra Date: Mon Sep 25 12:51:41 2006 +0200 usb-serial: possible irq lock inversion (PPP vs. usb/serial) ========================================================= [ INFO: possible irq lock inversion dependency detected ] commit 2e3a43f0b6f16705ec76d3744b82a116965ebebe Author: Alan Cox Date: Wed Sep 27 15:43:22 2006 -0700 ohci: Use ref-counting hotplug safe interfaces We want to avoid legacy APIs like pci_find_slot(). Signed-off-by: Alan Cox Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 54bee6e1b455573658972510a76119f279db32b7 Author: Mikael Pettersson Date: Sat Sep 23 17:05:31 2006 -0700 USB: Fix alignment of buffer passed down to ->hub_control() Implementations assume the buffer is at least 4 byte aligned. Signed-off-by: David S. Miller Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit a14848275b04f3193b9d9e9c745a4fae37f11f2f Author: Justin Carlson Date: Sun Sep 24 11:52:12 2006 +0300 USB: add SeaLevel 2106 SeaLINK support to ftdi_sio We have a couple of these USB-Serial converters around; they're slightly different from the 2104 models in that they can handle 500Kb/sec over RS422. The existing ftdi driver seems to work just fine if we add in the appropriate IDs. Patch is against 2.6.17.6, but should apply cleanly to pretty much anything recent. From: Justin Carlson Signed-off-by: Greg Kroah-Hartman commit 238d0e7bcf20981f7baac8bedfc219a90748700d Author: Sean Young Date: Sun Sep 24 19:26:57 2006 +0000 USB: New PhidgetKit 8/8/8 reset outputs after 2 seconds New phidget interface kits (type 8/8/8) reset their outputs if they haven't received a set report for 2 seconds. Signed-off-by: Sean Young Signed-off-by: Greg Kroah-Hartman commit 1b495f753a65835e7dd9d043b12f2fca6a105b3d Author: Matthias Urlichs Date: Sun Sep 24 21:38:47 2006 +0200 USB: another device ID for ipaq Add yet another device ID to the ipaq USB-serial driver. Signed-Off-By: Matthias Urlichs Cc: Ganesh Varadarajan Signed-off-by: Greg Kroah-Hartman commit 9978f9e1243be91243346b3e9555f1f53e50bb9c Author: Ian Abbott Date: Mon Sep 25 14:19:19 2006 +0100 USB serial ftdi_sio: Add support for Tactrix OpenPort devices This patch adds support for three OpenPort ECU data cables from Tactrix Inc. to the ftdi_sio driver's device ID table. One of the PIDs was supplied by Donour Sizemore on the ftdi-usb-sio-devel mailing list. The other two were added by myself after examining the Windows driver software. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman commit 37cf3477d2140f496e0713738fabdb5bc6fd60f3 Author: Petko Manolov Date: Wed Sep 27 14:25:37 2006 -0700 USB: Pegasus driver failing for ADMtek 8515 network device Address http://bugzilla.kernel.org/show_bug.cgi?id=7126 Attempting to read the ethernet ID directly from the eeprom somehow confuses ADM8515. Subsequent read requests to either the eeprom or the MII fail as well. Didn't dig much deeper, though. For example ADM8513 does not experience this problem. I used the fact that at power up the device is reading its ID automatically (not true for older Pegasus based devices) and put it in the Ethernet ID registers. So now the driver uses get_registers() instead of read_eprom_word() if the device is Pegasus_II based one. Tested it with all (Pegasus and Pegasus_II) gadgets i have and everything seems ok. Cc: Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 7923811a46f7e29ae8052edf2461e6c6b8ec2415 Author: Alan Stern Date: Thu Sep 28 12:11:56 2006 -0400 USB: unusual-devs entry for Nokia E60 This patch (as794) adds an unusual_devs entry for the Nokia E60. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit b697f70f763fe92d5fd05e7e2043bd2b5f12b073 Author: Wesley PA4WDH Date: Thu Sep 28 20:45:38 2006 +0200 USB: Add vendor / product ID to pl2303 Signed-off-by: Greg Kroah-Hartman commit 486ba2a9b26dd8b6219a13297eac012be78108cc Author: Oliver Neukum Date: Thu Sep 28 22:21:19 2006 +0200 USB: new id for kaweth this adds a new id to the kaweth driver. Please apply. Signed-Off-By: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 3379ceeefde923a05c2c77ed2d84ba26c2fe9e81 Author: Jean Delvare Date: Sun Sep 24 21:25:52 2006 +0200 hwmon: Remove Yuan Mu's address hwmon: Remove Yuan Mu's address Yuan Mu no longer works at Winbond. I wish to publicly thank Yuan for his help with Winbond hardware monitoring chips support during the past 10 months. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit ce8c6ce1eceecfe090f6c1aa4108087b2051497b Author: Jean Delvare Date: Sun Sep 24 21:25:12 2006 +0200 hwmon: Fix unchecked return status, SMSC chips hwmon: Fix unchecked return status, SMSC chips Fix up 2 more hwmon drivers so that they no longer ignore return status from device_create_file(). Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit a5ebe668add5f76ed8f01f752b37cfa164a26a30 Author: Jean Delvare Date: Sun Sep 24 21:24:46 2006 +0200 hwmon: Fix unchecked return status, batch 6 hwmon: Fix unchecked return status, batch 6 Fix up 5 more hwmon drivers so that they no longer ignore return status from device_create_file(). Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit f52f79da2908796a0fa1e7bbbe0d5ff20183d75f Author: Rudolf Marek Date: Sun Sep 24 21:24:12 2006 +0200 w83792d: Fix unchecked return status w83792d: Fix unchecked return status Fix the w83792d driver. Add error checking to device_create_file and also care to destroy the files upon exit. Signed-off-by: Rudolf Marek Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit ccc5c306957bb7fbaef61de249bac4b0f09f2336 Author: Rudolf Marek Date: Sun Sep 24 21:23:26 2006 +0200 w83l785ts: Fix unchecked return status w83l785ts: Fix unchecked return status Fix the w83l785ts driver. Add error checking to device_create_file and also care to destroy the files upon exit. Signed-off-by: Rudolf Marek Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 311ce2efb1b640584676fc1b0b7f16c5baf85eb8 Author: Jim Cromie Date: Sun Sep 24 21:22:52 2006 +0200 w83781d: Fix unchecked return status w83781d: Fix unchecked return status Add 2 attr-file groups (for base and model-specific attrs respectively), create the base group with single call to sysfs_create_group, check the return code on individual calls to device_create_file for each of the model-specific attr-files. Signed-off-by: Jim Cromie Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit cbeeb5b7c91b23967162185d7580048559db8d58 Author: Roger Lucas Date: Sun Sep 24 21:21:46 2006 +0200 vt8231: Fix unchecked return status vt8231: Fix unchecked return status Check the return status from device_create_file() and also use the newer and cleaner sysfs creation functions. Signed-off-by: Roger Lucas Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 87808be4f97674e6a2982fa835080cc0320dcbdc Author: Jean Delvare Date: Sun Sep 24 21:17:13 2006 +0200 Fix unchecked return status, batch 5 hwmon: Fix unchecked return status, batch 5 Fix up some hwmon drivers so that they no longer ignore return status from device_create_file(). Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 0e39e01c908fdc498fff0d788fd7b955ab75ebb6 Author: Jean Delvare Date: Sun Sep 24 21:16:40 2006 +0200 hwmon: Fix unchecked return status, batch 4 hwmon: Fix unchecked return status, batch 4 Fix up some hwmon drivers so that they no longer ignore return status from device_create_file(). Note: f71805f actually checked the status from device_create_file already. However it did not remove the files on device destruction. It was also an opportunity to use sysfs_create/remove_group instead of hand-made loops. This makes the changes much more important but I think the result is worth it. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 681c6f7a6702f208d48b501c8829dbc03a2ca238 Author: Mark M. Hoffman Date: Sun Sep 24 21:15:35 2006 +0200 hwmon: Fix unchecked return status, batch 3 hwmon: Fix unchecked return status, batch 3 Fix up some hwmon drivers so that they no longer ignore return status from device_create_file(). Signed-off-by: Mark M. Hoffman Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 0501a3816e5b778830fc2157a6d6bb11a965fc2c Author: Mark M. Hoffman Date: Sun Sep 24 21:14:35 2006 +0200 hwmon: Fix unchecked return status, batch 2 hwmon: Fix unchecked return status, batch 2 Fix up some hwmon drivers so that they no longer ignore return status from device_create_file(). Signed-off-by: Mark M. Hoffman Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit c18beb5b92b090cb424718a4f1771b1a9fad56de Author: David Hubbard Date: Sun Sep 24 21:04:38 2006 +0200 w83627ehf: Fix unchecked return status w83627ehf: Fix unchecked return status Fix: check return value from device_create_file() Fix: call device_remove_file() on error and module unload Fix: call hwmon_device_register() after device_create_file() to eliminate race Signed-off-by: David Hubbard Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit f3722d5b6a474e31237d23980e9bd38facfda6f4 Author: Jim Cromie Date: Sun Sep 24 21:03:25 2006 +0200 pc87360: Check for error on sysfs files creation pc87360: Check for error on sysfs files creation Use sysfs_create_group() for 2 sensor-types which are chip-model invariant, i.e. all-or-nothing attribute groups. Other 2 groups vary too much due to configuration, etc, so we keep the loops of device_create_file(), but now check their returns. Signed-off-by: Jim Cromie Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 941c5c05cf38da5e12d70edc5d0fec5c24bce8b6 Author: Jim Cromie Date: Sun Sep 24 21:02:44 2006 +0200 pc87360: Delete sysfs files on device deletion pc87360: Delete sysfs files on device deletion Add 4 explicit attribute groups for the 5 sensor types: voltage (in), therm, temp, and fan & pwm (together in one group). Use sysfs_remove_group() to drop them, but keeps the existing startup code, which calls device_create_file in loops. Signed-off-by: Jim Cromie Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 44646c19b41e40d81f5e4863466914e8ce060cc0 Author: Jim Cromie Date: Sun Sep 24 21:01:56 2006 +0200 pc87360: Move some code around pc87360: Move some code around Moves code for get-set-decl tuples for 3 items: cpu0_vid, vrm, alarms_in up, to just after the get-set-decl tuple for voltages. These items are already 'activated' together with the rest of the voltage attributes, so the move tightens the grouping that's made explicit in next patch. Signed-off-by: Jim Cromie Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit c1685f61b0a3110b701d09b84a9f9a3d4e9ef2e2 Author: Mark M. Hoffman Date: Sun Sep 24 20:59:49 2006 +0200 hwmon: Fix unchecked return status, batch 1 hwmon: Fix unchecked return status, batch 1 Fix up some hwmon drivers so that they no longer ignore return status from device_create_file(). Signed-off-by: Mark M. Hoffman Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit a1fdcb96ee33ba75318476a2a4691147c9f2ad90 Author: Juerg Haefliger Date: Sun Sep 24 20:55:34 2006 +0200 vt1211: Document module parameters vt1211: Document module parameters Add a description of the module parameters to the documentation of the vt1211 driver. Signed-off-by: Juerg Haefliger Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 61d0b53363256e87aeb79286be2dc8f62a9d429a Author: Juerg Haefliger Date: Sun Sep 24 20:54:46 2006 +0200 vt1211: Add documentation vt1211: Add documentation Add documentation for the new vt1211 hardware monitoring driver. Signed-off-by: Juerg Haefliger Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit ab41319eab3b5e600873dc77dff7756970424ca6 Author: Juerg Haefliger Date: Sun Sep 24 20:54:04 2006 +0200 hwmon: New driver for the VIA VT1211 hwmon: New driver for the VIA VT1211 This is a new driver for the VIA VT1211 Super-IO chip. It is a rewrite of the existing vt1211 driver (by Mark D. Studebaker and Lars Ekman) which has been around for a while but never made it into the main kernel tree. It is implemented as a platform driver and therefore requires lm_sensors 2.10.1 to function properly. Signed-off-by: Juerg Haefliger Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 125751cb833f20c12c7237782b2a4680fd636ed0 Author: Charles Spirakis Date: Sun Sep 24 20:53:04 2006 +0200 w83791d: Documentation update w83791d: Documentation update The alarm bits and the beep enable bits are in different positions in the hardware. Document the problem and leave it to the user-space code to handle the situation. When this driver is updated to the standardized sysfs alarm/beep methodology, this won't be a problem. This is a documentation only change. Signed-off by: Charles Spirakis Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 2d45771e6ea79f56a7d85e448f702f60ef86c228 Author: Jean Delvare Date: Sun Sep 24 20:52:15 2006 +0200 hwmon: Add individual alarm files to 4 drivers hwmon: Add individual alarm files to 4 drivers Add individual sysfs files for all f71805f, lm63, lm83 and lm90 alarm and fault conditions. This is a requirement for the planned chip-independent libsensors. Almost all other hwmon drivers will need the same improvement. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 51bd56339335fad3643739504523190cd6d3416b Author: Jean Delvare Date: Sun Sep 24 20:51:37 2006 +0200 hwmon: Make a dozen drivers no more experimental hwmon: Make a dozen drivers no more experimental Remove the EXPERIMENTAL tag from a dozen hardware monitoring drivers. They are in the tree for quite a long time, so we would know by now if they were causing trouble. Also make it clearer that the VT8231 is a VIA chip. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit ef4c4fdb2809c84c2ed8f037ae7c96cc03992569 Author: Rudolf Marek Date: Sun Sep 24 20:50:57 2006 +0200 k8temp: Add documentation k8temp: Add documentation Add promised documentation for the k8temp driver. Signed-off-by: Rudolf Marek Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 360b9ab220aedaf346380fc2344729d9acc3b075 Author: Hans de Goede Date: Mon Aug 28 14:42:24 2006 +0200 abituguru: Add suspend/resume support This patch contains rudimentary suspend / resume support for the uguru, this protects the uguru and the driver against suspend / resume cycles, so there is no reason to unload the driver in your suspend / resume scripts. Only include suspend / resume functions when CONFIG_PM is set. Signed-off-by: Hans de Goede Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit b17ebc9402040959690b5a2c4e1cfb1e6d4fb206 Author: Jean Delvare Date: Mon Aug 28 14:41:03 2006 +0200 k8temp: Enable automatic loading Let the k8temp driver load automatically. Signed-off-by: Jean Delvare Cc: Rudolf Marek Signed-off-by: Greg Kroah-Hartman commit 29fa06c1292f473ae51a84f55c8fe22179bc1080 Author: Rudolf Marek Date: Mon Aug 28 14:40:17 2006 +0200 hwmon: New driver k8temp Add support for the temperature sensor(s) found in AMD K8 CPUs. Signed-off-by: Rudolf Marek Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit b19367c6f438b3a7700aceca21a03396702069ce Author: Jean Delvare Date: Mon Aug 28 14:39:26 2006 +0200 it87: Copyright update it87: Copyright update I think my contributions to the it87 driver over the past two years qualify me as a co-author of this driver. Also drop old comments of dubious usefulness. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit c5df9b7a7c7600e4365e81f64ea44beb5be8bfa7 Author: Jean Delvare Date: Mon Aug 28 14:37:54 2006 +0200 it87: Overwrite broken default limits it87: Overwrite broken default limits Some IT8716F chips where seen with unreasonable defaults for low voltage and high temperature limits. Overwrite them with sane defaults so as to not generate meaningless alarms. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 87673dd735b8e089b7f2830edd353aa5f5e743ad Author: Jean Delvare Date: Mon Aug 28 14:37:19 2006 +0200 it87: Add support for the IT8718F it87: Add support for the IT8718F The IT8718F is a Super-I/O chip with integrated hardware monitoring functions. It is very similar to the IT8716F, so adding support to the it87 driver was pretty straightforward. The most significant difference is that the IT8718F has up to 8 VID pins, instead of 6 for the older chips. For the IT8718F, the VID value can only be read from Super-I/O space. Userspace support is already in lm_sensors SVN (to be soon released as 2.10.1.) Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 8ab4ec3ef45cc2facbe14c733ef7230e7d94fcf2 Author: Jean Delvare Date: Mon Aug 28 14:35:46 2006 +0200 it87: Cleanup set_fan_div it87: Cleanup set_fan_div We only change one fan clock divider at a time, so there is only one fan min which needs to be saved and restored. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 3543a53f6c5b58c233218327f671108590151876 Author: Jean Delvare Date: Mon Aug 28 14:27:25 2006 +0200 it87: in8 has no limit registers it87: in8 has no limit registers Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit b9e349f710376ef55f200e9fa07e88b4fe2cdf98 Author: Jean Delvare Date: Mon Aug 28 14:26:22 2006 +0200 it87: Prevent overflow on fan clock divider write it87: Prevent overflow on fan clock divider write The highest possible clock divider for fan1 and fan2 is 128. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 9060f8bdd0c40e31d2be388e59f2dbeea55988a2 Author: Jean Delvare Date: Mon Aug 28 14:24:17 2006 +0200 it87: No sysfs files for disabled fans it87: No sysfs files for disabled fans Only create the fan attributes for enabled fan tachometers. Some motherboards have a nice BIOS which only enables the fan inputs which are wired to a fan header on the board. This makes the configuration easier for the user. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 17d648bf5786ba5b8cbf7cbd5cb18d3d8d2657ca Author: Jean Delvare Date: Mon Aug 28 14:23:46 2006 +0200 it87: Add support for the IT8716F it87: Add support for the IT8716F The IT8716F is a Super-I/O chip with integrated hardware monitoring functions. It is very similar to the IT8712F, so adding support to the it87 driver was pretty straightforward. The most significant change here is that the IT8716F has 16-bit fan speed counters, so the user no more needs to tweak the fan clock dividers to get the best readings. Userspace support is already in lm_sensors SVN (to be soon released as 2.10.1.) Thanks to Stian Oksavik, Olivier Nicolas, Prakash Punnoor and Juergen Kilb for testing the early versions of this patch. Thanks also to ITE for providing datasheets and answering my questions. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 0dd7699ec4b27b3662d8980ff7a309cc81276298 Author: Jean Delvare Date: Mon Aug 28 14:22:34 2006 +0200 smsc47m1: dev_warn fix smsc47m1: dev_warn fix We can't use dev_warn on an i2c client before it is attached. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit b25a10631a81fca33a94d1f1f6960928d8e9ce63 Author: Dmitry Torokhov Date: Mon Aug 28 14:21:42 2006 +0200 hdaps: Handle errors from input_register_device HDAPS: handle errors from input_register_device() Signed-off-by: Dmitry Torokhov Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit c41bdb526bca5cda5be3de8c112f63c400bf990f Author: Alexey Dobriyan Date: Mon Aug 28 14:18:14 2006 +0200 atxp1: Signed/unsigned char bug fix vid_to_reg() can return -1 and char can be unsigned. Signed-off-by: Alexey Dobriyan Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 563daaf4047464eef5ffcb46194a99c1a8f2260e Author: Rudolf Marek Date: Wed Jul 5 18:15:31 2006 +0200 hwmon: Documentation update for w83627ehf Add documentation for the w83627ehf hardware monitoring driver. Signed-off-by: Rudolf Marek Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 08c79950a047dbaccf05d70a203db2ee75ac3bd8 Author: Rudolf Marek Date: Wed Jul 5 18:14:31 2006 +0200 hwmon: Add fan speed control features to w83627ehf This patch adds long-awaited support for automatic fan modes. Based on the work of Yuan Mu from Winbond, I finished the support with the great help of David Hubbard. Signed-off-by: Yuan Mu Signed-off-by: Rudolf Marek Signed-off-by: David Hubbard Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 84904d0ead0a8c419abd45c7b2ac8d76d50a0d48 Author: Kevin Hilman Date: Fri Sep 22 00:58:57 2006 +0100 [ARM] 3856/1: Add clocksource for Intel IXP4xx platforms Enables the ixp4xx platforms to use Generic time-of-day. Signed-off-by: Kevin Hilman Acked-by: John Stultz Signed-off-by: Deepak Saxena Signed-off-by: Russell King commit 746140c71d537560bbd22c1b148fb21031c30e71 Author: Kevin Hilman Date: Fri Sep 22 00:16:30 2006 +0100 [ARM] 3855/1: Add generic time support This patch adds Generic time-of-day support for the ARM architecture. The support is currently added using #ifdef's so that it can support sub-arches that do not (yet) have a clocksource added. As sub-arches add clocksource support, they should 'select GENERIC_TIME' Signed-off-by: Deepak Saxena Signed-off-by: Daniel Walker Signed-off-by: Kevin Hilman Acked-by: John Stultz Signed-off-by: Russell King commit 82606c66e943227afcec8a3c7b8428b99a7f88b8 Author: Ben Dooks Date: Thu Sep 28 20:51:35 2006 +0100 [ARM] 3873/1: S3C24XX: Add irq_chip names Add names to all the irq_chip structes Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 625ac112d4253c7e5f7a6d59c99943e8eb0b46c9 Author: Ben Dooks Date: Thu Sep 28 20:45:29 2006 +0100 [ARM] 3872/1: S3C24XX: Apply consistant tabbing to irq_chips Apply consistant tabbing to the IRQ chip structures in arch/arm/mach-s3c2410/irq.c Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 38e0533ce87a58e25f959e6d0958478b6a137794 Author: Ben Dooks Date: Thu Sep 28 20:40:50 2006 +0100 [ARM] 3871/1: S3C24XX: Fix ordering of EINT4..23 The demux code for the IRQ EINTs above 3 was using find last set instead of finding first set. Also fix it so that we only check EINT4..7 when the parent EINT4t7 goes off, and the 8..23 when EINT8t23 goes off. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 6afd6fae1d5f7e7129a10c4f3e32018966eeac1c Author: Hyok S. Choi Date: Thu Sep 28 21:46:34 2006 +0900 [ARM] nommu: confirms the CR_V bit in nommu mode In nommu mode, the exception vector location depends on the platforms. Some of the implementations may have some special exception control forwarding method in their ROM/flash and for some of them has its own re-mapping mechanism by the h/w. This patch introduces a special configuration CONFIG_CPU_HIGH_VECTOR which turns on the CR_V bit in nommu mode. The CR_V bit is turned off by default. This feature depends on CP15 and does not supported by ARM740. Signed-off-by: Hyok S. Choi Signed-off-by: Russell King commit 0f45d7f36b766cb668cebfb5d4d2f67b4a8676ba Author: Hyok S. Choi Date: Thu Sep 28 21:46:16 2006 +0900 [ARM] nommu: abort handler fixup for !CPU_CP15_MMU cores. There is no FSR/FAR register on no-CP15 or MPU cores. This patch adds a dummy abort handler which returns zero for the base restored Data Abort model !CPU_CP15_MMU cores. The abort-lv4t.S is still used with the fix-up for the base updated Data Abort model cores. Signed-off-by: Hyok S. Choi Signed-off-by: Russell King commit 3d27b00457167103fb9f7e23fc2454c801a6b8f0 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:24 2006 -0700 IB/ipath: Fix lockdep error upon "ifconfig ibN down" Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 7a26c47412b201e1977ad42b760885f825158915 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:23 2006 -0700 IB/ipath: Fix races with ib_resize_cq() The resize CQ function changes the memory used to store the queue. Other routines need to honor the lock before accessing the pointer to the queue and verify that the head and tail are in range. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit bf3258ec418a008ab4672787ebff2c5837dd1e69 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:22 2006 -0700 IB/ipath: Support new PCIE device, QLE7142 Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit c97d27d8a992cf6cefee945489d5f93fca160aa2 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:21 2006 -0700 IB/ipath: Set CPU affinity early This change moves around port assignment so that it happens before any memory is allocated. This allows memory to be allocated on an appropriate CPU, which improves performance for users of /dev/ipath. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 1a4e74a08788db913486cb9a3dc30984c55e9897 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:19 2006 -0700 IB/ipath: Fix EEPROM read when driver is compiled with -Os The EEPROM is read via programmable I/O pins. When the driver is compiled -Os, the CPU can speculatively read the I/O value before it is valid. This patch fixes the problem. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 89d1e09b6a6d844ef327937f41658a426be42501 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:18 2006 -0700 IB/ipath: Fix and recover TXE piobuf and PBC parity errors We can sometimes trigger parity errors due to processor speculative reads to our write-combined memory (mostly seen on Woodcrest). Add a stats counter for these. Factored out the sendbuffererror buffer cancellation code so it can be used in the new handling; suppress likely subsequent error messages if within two jiffies of the cancellation. Also restore 2 dropped TXE lines on hwe_bitsextant noticed while debugging. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 510847750c9d26052a71631e0fcad9e7f7a5f369 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:17 2006 -0700 IB/ipath: Change HT CRC message to indicate how to resolve problem The system must be powercycled to clear a HT CRC error; reloading the driver is not enough. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 7227aac47deac20daa0073a1ebbf608b4f2f8d94 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:16 2006 -0700 IB/ipath: Clean up module exit code Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 957670a57eb63b932b09b444ad44192ad9ee9382 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:15 2006 -0700 IB/ipath: Call mtrr_del with correct arguments We were passing 0 for base and length, which worked on older kernels, but it doesn't seem to any longer. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 8d0208cb59a43bf867e16b977c34c4d6cd618f59 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:14 2006 -0700 IB/ipath: Flush RWQEs if access error or invalid error seen If the receiver goes into the error state, we need to flush the posted receive WQEs. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 1fd3b40fde3bfacdf742cadfe99cfd47ffd05219 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:13 2006 -0700 IB/ipath: Improved support for PowerPC Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 076fafcdee37c87564abd1ad993e17d77fc32daa Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:12 2006 -0700 IB/ipath: Drop unnecessary "(void *)" casts Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit f62fe77ad26b9c89c2028d96709f0f28793fe6cd Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:11 2006 -0700 IB/ipath: Support multiple simultaneous devices of different types Prior to this change, the driver was not able to support a HT and PCIE card simultaneously present in the same machine. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 5659416207a9bcf35a646c7b798b290953e4891c Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:10 2006 -0700 IB/ipath: Fix mismatch in shifts and masks for printing debug info Fixed mismatch in linkstate/trainingstate shifts and masks in the IPATH_IBSTATE_MASK macro. It kept some linktrainingstates from being printed correctly in debug; no functionality issue unless I misread the code. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 0624b072f230af4f24c112019b04f898ef7b4e2c Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:09 2006 -0700 IB/ipath: Fix compiler warnings and errors on non-x86_64 systems Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 8d588f8bb79c86a5826f66946c1ea026b6b07bd8 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:08 2006 -0700 IB/ipath: Print more informative parity error messages Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 6a553af286653818bb5831f1b351eefdc8a93b61 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:07 2006 -0700 IB/ipath: Ensure that PD of MR matches PD of QP checking the Rkey Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 10aeb0e6d8823c1cccf9edc8401c848745c128be Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:06 2006 -0700 IB/ipath: RC and UC should validate SLID and DLID This is required for IB conformance (spec ch. 9.6.1.5). Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 7dae5bff2e8e4699744e782a6e7605ad18d1240e Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:05 2006 -0700 IB/ipath: Only allow complete writes to flash Don't allow a write to the eeprom from ipathfs unless the write is exactly 128 bytes and starts at offset 0. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit f3e93c7757043cd5d5c4879b8b92effcc7817c81 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:04 2006 -0700 IB/ipath: Count SRQs properly Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit aa4eaed702cb5d07babaaa04596436156b922249 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:03 2006 -0700 IB/ipath: Lock and count allocated CQs properly Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 11b054fe1d453954449a86de178bb98274bb86ef Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:02 2006 -0700 IB/ipath: Clean up handling of GUID 0 Respond with an error to the SM if our GUID is 0, and don't allow the user to set our GUID to 0. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit c78f6415e964aafd3a91d834970c16b613e421d9 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:01 2006 -0700 IB/ipath: Unregister from IB core early This gives upper-level protocols a chance to unregister while the device is still usable. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 2c9446a1d63f1ca570e92f89422595732efedf44 Author: Bryan O'Sullivan Date: Thu Sep 28 09:00:00 2006 -0700 IB/ipath: Support revision 2 InfiniPath PCIE devices This also entailed a little GPIO-interrupt general cleanup. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 9929b0fb0f35f54371e9364bab809bcd753f9d3a Author: Bryan O'Sullivan Date: Thu Sep 28 08:59:59 2006 -0700 IB/ipath: Driver support for userspace sharing of HW contexts This allows multiple userspace processes to share a single hardware context in a master/slave arrangement. It is backwards binary compatible with existing userspace. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 221e31985b490309eb9ae33ac815deae3b5aa021 Author: Bryan O'Sullivan Date: Thu Sep 28 08:59:58 2006 -0700 IB/ipath: Fix memory leak if allocation fails If the second allocation failed, the first structure allocated in this routine was not freed. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 6022943eb4cb3cb9e43f27f1faeaba38e162d966 Author: Bryan O'Sullivan Date: Thu Sep 28 08:59:57 2006 -0700 IB/ipath: Limit # of packets sent without an ACK received The sender requests an ACK every 1/2 MB to avoid retransmit timeouts that were causing MVAPICH mod_bw to fail after a predictable number of sends. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit fd6a79a786b84510d00ee6aa6449a468e6d75dee Author: Erez Zilber Date: Wed Sep 27 16:48:57 2006 +0300 IB/iser: Fix the description of iSER in Kconfig Fix the description of iSER in Kconfig. It is not accurate. Signed-off-by: Erez Zilber Signed-off-by: Roland Dreier commit 74a2078061409e027ccb51a28cf6174c31ab8f99 Author: Erez Zilber Date: Wed Sep 27 16:43:06 2006 +0300 IB/iser: DMA unmap unaligned for RDMA data before touching it iSER uses the DMA mapping api to map the page holding the SCSI command data to the HCA DMA address space. When the command data is not aligned for RDMA, the data is copied to/from an allocated buffer which in turn is used for executing this command. The pages associated with the command must be unmapped before being touched. Signed-off-by: Erez Zilber Signed-off-by: Roland Dreier commit 87e8df7a273c7c1acb864c90b5253609c44375a6 Author: Erez Zilber Date: Wed Sep 27 15:27:10 2006 +0300 IB/iser: Have iSER data transaction object point to iSER conn iSER uses a data transaction object (struct iser_dto) as part of its IB data descriptors (struct iser_desc) management. It also uses a hierarchy of connection structures pointing to each other. A DTO may exist even after the iscsi_iser connection pointed by it is destroyed (eg one that is bound to a post receive buffer which was flushed by the IB HW). Hence DTOs need point to the lowest connection, which is struct iser_conn. Signed-off-by: Erez Zilber Signed-off-by: Roland Dreier commit ee30cb5b0b65392843cc3beaba48160ee4a3764e Author: Roland Dreier Date: Thu Sep 28 10:44:07 2006 -0700 RDMA/amso1100: Fix memory leak in c2_reg_phys_mr() If the allocation of mr fails, then c2_reg_phys_mr() leaks the page_list array it allocated earlier. This was Coverity CID #1413. Signed-off-by: Roland Dreier commit 44334bd97e76662c5f40c629357e6acc4dee3e8a Author: Eric Sesterhenn Date: Thu Sep 28 10:38:32 2006 -0700 RDMA/amso1100: Fix error path in c2_llp_accept() Another NULL dereference spotted by the Coverity checker (cid #1395): In case we can't alloc the vq_req, we goto bail1, where we call vq_req_free(c2dev, vq_req); which then dereferences vq_req. Signed-off-by: Eric Sesterhenn Signed-off-by: Andrew Morton Acked-by: Tom Tucker Signed-off-by: Roland Dreier commit 1f51c10c5e85050506663bce1d69513eb901db87 Author: Andrew Victor Date: Thu Sep 28 16:26:47 2006 +0100 [ARM] 3870/1: AT91: Start removing static memory mappings This patch removes the static memory mapping for the currently-unused peripherals [Synchronous Serial, Timer/Counter unit], and for those drivers that already ioremap() their registers [UART]. Also, the Ethernet driver now uses the platform_device resources but doesn't yet use ioremap() so we need to pass it the virtual address instead of the physical address. Signed-off-by: Andrew Victor Signed-off-by: Russell King commit 94c12cc7d196bab34aaa98d38521549fa1e5ef76 Author: Martin Schwidefsky Date: Thu Sep 28 16:56:43 2006 +0200 [S390] Inline assembly cleanup. Major cleanup of all s390 inline assemblies. They now have a common coding style. Quite a few have been shortened, mainly by using register asm variables. Use of the EX_TABLE macro helps as well. The atomic ops, bit ops and locking inlines new use the Q-constraint if a newer gcc is used. That results in slightly better code. Thanks to Christian Borntraeger for proof reading the changes. Signed-off-by: Martin Schwidefsky commit 25d83cbfaa44e1b9170c0941c3ef52ca39f54ccc Author: Heiko Carstens Date: Thu Sep 28 16:56:37 2006 +0200 [S390] Whitespace cleanup. Huge s390 assembly files whitespace cleanup. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 52149ba6b0ddf3e9d965257cc0513193650b3ea8 Author: Martin Schwidefsky Date: Thu Sep 28 16:56:03 2006 +0200 [S390] user readable uninitialised kernel memory. A user space program can read uninitialised kernel memory by appending to a file from a bad address and then reading the result back. The cause is the copy_from_user function that does not clear the remaining bytes of the kernel buffer after it got a fault on the user space address. Signed-off-by: Martin Schwidefsky commit 51dced544e3964b684afc99282ceceaa384b16a8 Author: Jan Glauber Date: Thu Sep 28 16:55:53 2006 +0200 [S390] init_timer in tty3270. Call init_timer only once fpr tp->timer in tty3270. Signed-off-by: Jan Glauber Signed-off-by: Martin Schwidefsky commit 0efa470363699ecba49e67cc3c75f46b300f98a4 Author: Christian Borntraeger Date: Thu Sep 28 16:55:46 2006 +0200 [S390] config option for z9-109 code generation. Add a kernel config option for the IBM System z9. This will produce faster code on newer compilers using the -march=z9-109 option. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit d9f7a745d55527d0d41684b22506a86c4381f7f1 Author: Martin Schwidefsky Date: Thu Sep 28 16:55:39 2006 +0200 [S390] __div64_32 for 31 bit. The clocksource infrastructure introduced with commit ad596171ed635c51a9eef829187af100cbf8dcf7 broke 31 bit s390. The reason is that the do_div() primitive for 31 bit always had a restriction: it could only divide an unsigned 64 bit integer by an unsigned 31 bit integer. The clocksource code now uses do_div() with a base value that has the most significant bit set. The result is that clock->cycle_interval has a funny value which causes the linux time to jump around like mad. The solution is "obvious": implement a proper __div64_32 function for 31 bit s390. Signed-off-by: Martin Schwidefsky commit 1fce518e8e7de62597c823d6d795cafc694e7910 Author: Christian Borntraeger Date: Thu Sep 28 16:55:33 2006 +0200 [S390] remove unnecessary includes. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit 23c100d99c1dfd0bba49a63fb02a8f8fddad607b Author: Michael Holzheu Date: Thu Sep 28 16:55:28 2006 +0200 [S390] hypfs sparse warnings. sparse complains, if we use bitwise operations on enums. Cast enum to long in order to fix that problem! Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 925afbd6cbc0d5154710f00dc186518f396e04ec Author: Gerald Schaefer Date: Thu Sep 28 16:55:23 2006 +0200 [S390] Avoid static struct initializations in appldata. Don't use static initialization for struct members containing variables because gcc would generate more code and use double space on stack. Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit bac9c66cd25e134077b284fc59bee6e5a8475d33 Author: Akinobu Mita Date: Thu Sep 28 16:55:18 2006 +0200 [S390] init task memory faults. Lock for mmap_sem is missing on page fault retry for init task when it fails due to out of memory. Signed-off-by: Akinobu Mita Signed-off-by: Martin Schwidefsky commit cc2b28ba61b0a6bdfcf18274b8b883b98486eca4 Author: Andrew Victor Date: Thu Sep 28 10:27:00 2006 +0100 [ARM] 3869/1: AT91: NAND support for DK and KB9202 boards This patch adds support for the NAND flash on the Atmel AT91RM9200-DK and KwikByte KB920x boards. Signed-off-by: Andrew Victor Signed-off-by: Russell King commit 97f0fb68f142b477773c05140da27c1dbd31a2ab Author: Andrew Victor Date: Wed Sep 27 16:18:18 2006 +0100 [ARM] 3868/1: AT91 hardware header update This patch adds the hardware register definitions for the TWI (I2C) controller found on the AT91RM9200 and AT91SAM9xx processors. It also defines the AIC Fast-Forcing registers added to the AT91SAM9's. Signed-off-by: Andrew Victor Signed-off-by: Russell King commit f21738341ca330ec83ef978ee63ffa5ecf13f082 Author: Andrew Victor Date: Wed Sep 27 13:23:00 2006 +0100 [ARM] 3867/1: AT91 GPIO update This patch makes the AT91 gpio.c support processor-generic (AT91RM9200 and AT91SAM9xxx). The GPIO controllers supported by a particular AT91 processor are defined in the processor-specific file and are registered with gpio.c at startup. Signed-off-by: Andrew Victor Signed-off-by: Russell King commit 2eeaaa21de68cb8869d3a54438a9224321d3dd03 Author: Andrew Victor Date: Wed Sep 27 10:50:59 2006 +0100 [ARM] 3866/1: AT91 clock update This patch makes the AT91 clock.c support processor-generic (AT91RM9200 and AT91SAM9xxx). The clocks supported by a particular AT91 processor are defined in the processor-specific file and are registered with clock.c at startup. Signed-off-by: Andrew Victor Signed-off-by: Russell King commit 72729910c38ca5b4736032c15dc3f9d48fe4f68a Author: Andrew Victor Date: Wed Sep 27 09:44:11 2006 +0100 [ARM] 3865/1: AT91RM9200 header updates This is more preparation for adding support for the new Atmel AT91SAM9 processors. Changes include: - Replace AT91_BASE_* with AT91RM9200_BASE_* - Replace AT91_ID_* with AT91RM9200_ID_* - ROM, SRAM and UHP address definitions moved to at91rm9200.h. - The raw AT91_P[ABCD]_* definitions are now depreciated in favour of the GPIO API. Signed-off-by: Andrew Victor Signed-off-by: Russell King commit 6e73b418887675da18602550ca296211caeb3897 Author: Vlad Apostolov Date: Thu Sep 28 11:06:21 2006 +1000 [XFS] 955947: Infinite loop in xfs_bulkstat() on formatter() error SGI-PV: 955947 SGI-Modid: xfs-linux-melb:xfs-kern:26986a Signed-off-by: Vlad Apostolov Signed-off-by: Tim Shimmin commit 6f1f21684078884b62cfff2ea80a1a6c07f79824 Author: Vlad Apostolov Date: Thu Sep 28 11:06:15 2006 +1000 [XFS] pv 956241, author: nathans, rv: vapo - make ino validation checks consistent in bulkstat SGI-PV: 956241 SGI-Modid: xfs-linux-melb:xfs-kern:26984a Signed-off-by: Vlad Apostolov Signed-off-by: Tim Shimmin commit 6216ff18839bf302805f67c93e8bc344387c513b Author: Vlad Apostolov Date: Thu Sep 28 11:06:10 2006 +1000 [XFS] pv 956240, author: nathans, rv: vapo - Minor fixes in kmem_zalloc_greedy() SGI-PV: 956240 SGI-Modid: xfs-linux-melb:xfs-kern:26983a Signed-off-by: Vlad Apostolov Signed-off-by: Tim Shimmin commit f273ab848b7cbc0088b0ac7457b3769e6566074e Author: David Chinner Date: Thu Sep 28 11:06:03 2006 +1000 [XFS] Really fix use after free in xfs_iunpin. The previous attempts to fix the linux inode use-after-free in xfs_iunpin simply made the problem harder to hit. We actually need complete exclusion between xfs_reclaim and xfs_iunpin, as well as ensuring that the i_flags are consistent during both of these functions. Introduce a new spinlock for exclusion and the i_flags, and fix up xfs_iunpin to use igrab before marking the inode dirty. SGI-PV: 952967 SGI-Modid: xfs-linux-melb:xfs-kern:26964a Signed-off-by: David Chinner Signed-off-by: Tim Shimmin commit 01106eae97b70399ce5a273a3cceb5246e8d9cc8 Author: Eric Sandeen Date: Thu Sep 28 11:05:52 2006 +1000 [XFS] Collapse sv_init and init_sv into just the one interface. SGI-PV: 907752 SGI-Modid: xfs-linux-melb:xfs-kern:26925a Signed-off-by: Eric Sandeen Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 7ae67d78e7518fba89e5f3a74bdcb68e48ae8858 Author: Eric Sandeen Date: Thu Sep 28 11:05:46 2006 +1000 [XFS] standardize on one sema init macro One sema to rule them all, one sema to find them... SGI-PV: 907752 SGI-Modid: xfs-linux-melb:xfs-kern:26911a Signed-off-by: Eric Sandeen Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 91d87232044c1ceb8371625c27479e982984a848 Author: Eric Sandeen Date: Thu Sep 28 11:05:40 2006 +1000 [XFS] Reduce endian flipping in alloc_btree, same as was done for ialloc_btree. SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26910a Signed-off-by: Eric Sandeen Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit edcd4bce5e58987c8c039bdf7705a22cd229fe96 Author: Nathan Scott Date: Thu Sep 28 11:05:33 2006 +1000 [XFS] Minor cleanup from dio locking fix, remove an extra conditional. SGI-PV: 955696 SGI-Modid: xfs-linux-melb:xfs-kern:26908a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 215101c36012399cf2eaee849de54eeefc9f618c Author: Nathan Scott Date: Thu Sep 28 11:04:43 2006 +1000 [XFS] Fix kmem_zalloc_greedy warnings on 64 bit platforms. SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26907a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit e132f54ce8660bbf34723cc12cb11e6f61d6fbac Author: Vlad Apostolov Date: Thu Sep 28 11:04:31 2006 +1000 [XFS] pv 955157, rv bnaujok - break the loop on EFAULT formatter() error SGI-PV: 955157 SGI-Modid: xfs-linux-melb:xfs-kern:26869a Signed-off-by: Vlad Apostolov Signed-off-by: Tim Shimmin commit 22de606a0b9623bf15752808f123848a65a6cc28 Author: Vlad Apostolov Date: Thu Sep 28 11:04:24 2006 +1000 [XFS] pv 955157, rv bnaujok - break the loop on formatter() error SGI-PV: 955157 SGI-Modid: xfs-linux-melb:xfs-kern:26866a Signed-off-by: Vlad Apostolov Signed-off-by: Tim Shimmin commit 955e47ad28b5b255ddcd7eb9cb814a269dc6e991 Author: Tim Shimmin Date: Thu Sep 28 11:04:16 2006 +1000 [XFS] Fixes the leak in reservation space because we weren't ungranting space for the unmount record - which becomes a problem in the freeze/thaw scenario. SGI-PV: 942533 SGI-Modid: xfs-linux-melb:xfs-kern:26815a Signed-off-by: Tim Shimmin commit 22d91f65d57a7f1a1c5fc81f47b47b0cc54ad6f7 Author: Josh Triplett Date: Thu Sep 28 11:04:07 2006 +1000 [XFS] Add lock annotations to xfs_trans_update_ail and xfs_trans_delete_ail xfs_trans_update_ail and xfs_trans_delete_ail get called with the AIL lock held, and release it. Add lock annotations to these two functions so that sparse can check callers for lock pairing, and so that sparse will not complain about these functions since they intentionally use locks in this manner. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26807a Signed-off-by: Josh Triplett Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 68c3271515f11f6665dc8732e53aaab3d3fdd7d3 Author: Nathan Scott Date: Thu Sep 28 11:03:53 2006 +1000 [XFS] Fix a porting botch on the realtime subvol growfs code path. SGI-PV: 955515 SGI-Modid: xfs-linux-melb:xfs-kern:26806a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit d432c80e68e3c283fc9a85021f5b65e0aabf254e Author: Nathan Scott Date: Thu Sep 28 11:03:44 2006 +1000 [XFS] Minor code rearranging and cleanup to prevent some coverity false positives. SGI-PV: 955502 SGI-Modid: xfs-linux-melb:xfs-kern:26805a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit b627259c602f3f1b995d09aad2b57bed889430b9 Author: Nathan Scott Date: Thu Sep 28 11:03:33 2006 +1000 [XFS] Remove a no-longer-correct debug assert from dio completion handling. SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26804a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 77e4635ae191774526ed695482a151ac986f3806 Author: Nathan Scott Date: Thu Sep 28 11:03:27 2006 +1000 [XFS] Add a greedy allocation interface, allocating within a min/max size range. SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26803a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 572d95f49f3652fffe8242c4498b85f4083e52ab Author: Nathan Scott Date: Thu Sep 28 11:03:20 2006 +1000 [XFS] Improve error handling for the zero-fsblock extent detection code. SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26802a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 948ecdb4c118293d2f3e267eec642c30c5d3a056 Author: Nathan Scott Date: Thu Sep 28 11:03:13 2006 +1000 [XFS] Be more defensive with page flags (error/private) for metadata buffers. SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26801a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit efb8ad7e9431a430a75d44288614cf6047ff4baa Author: Nathan Scott Date: Thu Sep 28 11:03:05 2006 +1000 [XFS] Add a debug flag for allocations which are known to be larger than one page. SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26800a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 3f89243c5b987dd55f8eec6fd54be05887d69bc6 Author: Eric Sandeen Date: Thu Sep 28 11:02:57 2006 +1000 [XFS] Remove several macros that are no longer used anywhere SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26749a Signed-off-by: Eric Sandeen Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 065d312e15902976d256ddaf396a7950ec0350a8 Author: Eric Sandeen Date: Thu Sep 28 11:02:44 2006 +1000 [XFS] Remove unused iop_abort log item operation SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26747a Signed-off-by: Eric Sandeen Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 43129c16e85119355d352e10ff4b30a08053228c Author: Eric Sandeen Date: Thu Sep 28 11:02:37 2006 +1000 [XFS] Remove a couple of unused BUF macros SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26746a Signed-off-by: Eric Sandeen Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 17370097dace78c93d6fa32110983e74b981d192 Author: Vlad Apostolov Date: Thu Sep 28 11:02:30 2006 +1000 [XFS] pass file mode on DMAPI remove events SGI-PV: 953687 SGI-Modid: xfs-linux-melb:xfs-kern:26639a Signed-off-by: Vlad Apostolov Signed-off-by: Tim Shimmin commit 745b1f47fc0c68dbb1ff440eec8889f61e57194b Author: Nathan Scott Date: Thu Sep 28 11:02:23 2006 +1000 [XFS] Remove last bulkstat false-positives with debug kernels. SGI-PV: 953819 SGI-Modid: xfs-linux-melb:xfs-kern:26628a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit a3c6685eaa1b6c5cf05b084b3bc91895e253ad2c Author: Nathan Scott Date: Thu Sep 28 11:02:14 2006 +1000 [XFS] Ensure xlog_state_do_callback does not report spurious warnings on ramdisks. SGI-PV: 954802 SGI-Modid: xfs-linux-melb:xfs-kern:26627a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit bb3c7d2936b6db6f5ded9abf4d215abe97af8372 Author: Nathan Scott Date: Thu Sep 28 11:02:09 2006 +1000 [XFS] Increase the size of the buffer holding the local inode cluster list, to increase our potential readahead window and in turn improve bulkstat performance. SGI-PV: 944409 SGI-Modid: xfs-linux-melb:xfs-kern:26607a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 2627509330323efc88b5818065cba737e000de5c Author: Nathan Scott Date: Thu Sep 28 11:02:03 2006 +1000 [XFS] Drop unneeded endian conversion in bulkstat and start readahead for batches of inode cluster buffers at once, before any blocking reads are issued. SGI-PV: 944409 SGI-Modid: xfs-linux-melb:xfs-kern:26606a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 51bdd70681e247184b81c2de61dbc26154511155 Author: Nathan Scott Date: Thu Sep 28 11:01:57 2006 +1000 [XFS] When issuing metadata readahead, submit bio with READA not READ. SGI-PV: 944409 SGI-Modid: xfs-linux-melb:xfs-kern:26603a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 8b56f083c2a6bd0a88271225f0bcf1d81db20d3c Author: Nathan Scott Date: Thu Sep 28 11:01:46 2006 +1000 [XFS] Rework DMAPI bulkstat calls in such a way that we can directly extract inline attributes out of the bulkstat buffer (for that case), rather than using an (extremely expensive for large icount filesystems) iget for fetching attrs. SGI-PV: 944409 SGI-Modid: xfs-linux-melb:xfs-kern:26602a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 726801ba067410a1d38518823f2c253a087f6c6f Author: Tim Shimmin Date: Thu Sep 28 11:01:37 2006 +1000 [XFS] Add EA list callbacks for xfs kernel use. Cleanup some namespace code. SGI-PV: 954372 SGI-Modid: xfs-linux-melb:xfs-kern:26583a Signed-off-by: Tim Shimmin commit 69e23b9a5e7430ced667d8b699330e370c202f28 Author: Nathan Scott Date: Thu Sep 28 11:01:22 2006 +1000 [XFS] Update XFS for i_blksize removal from generic inode structure SGI-PV: 954366 SGI-Modid: xfs-linux-melb:xfs-kern:26565a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 29b6d22b011d83dac8ca5b7d26f766ae598abbbd Author: Nathan Scott Date: Thu Sep 28 10:59:06 2006 +1000 [XFS] remove accidentally reintroduced vfs unmount flag, unneeded in current kernels SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26564a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit fe48cae9ed979d2ac14080c837d793c4f6bfaa82 Author: Christoph Hellwig Date: Thu Sep 28 10:58:52 2006 +1000 [XFS] remove bhv_lookup, _range version works aswell and has more useful semantics. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26563a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 1121b219bf3fe6d1bd1d1f7618cc5e0c409fabb4 Author: Nathan Scott Date: Thu Sep 28 10:58:40 2006 +1000 [XFS] use NULL for pointer initialisation instead of zero-cast-to-ptr SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26562a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 8801bb99e4425b9a778b355153ab3254bb431d92 Author: Christoph Hellwig Date: Thu Sep 28 10:58:17 2006 +1000 [XFS] endianess annotations for xfs_bmbt_key Trivial as there are no incore users. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26561a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 576039cf3c668d5f8d97dff8a0a5817e8b3a761b Author: Christoph Hellwig Date: Thu Sep 28 10:58:06 2006 +1000 [XFS] endianess annotate XFS_BMAP_BROOT_PTR_ADDR Make sure it returns a __be64 and let the callers use the proper macros. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26560a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 397b5208d5609e2f01b171a34ab690f325253492 Author: Christoph Hellwig Date: Thu Sep 28 10:57:52 2006 +1000 [XFS] endianess annotations for xfs_bmbt_ptr_t/xfs_bmdr_ptr_t SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26559a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit b113bcb83efb411f3cc6c7692fbf933ed01b67d8 Author: Christoph Hellwig Date: Thu Sep 28 10:57:42 2006 +1000 [XFS] add xfs_btree_check_lptr_disk variant which handles endian conversion SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26558a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit c38e5e84dbbeda9a92ea878ec9f6255b519a69e7 Author: Christoph Hellwig Date: Thu Sep 28 10:57:17 2006 +1000 [XFS] remove left over INT_ comments in *alloc*.c We can verify endianess handling with sparse now, no need for comments. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26557a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 61a258486795ff710cf4518b5a1729c965c32aa0 Author: Christoph Hellwig Date: Thu Sep 28 10:57:04 2006 +1000 [XFS] endianess annotations for xfs_inobt_rec_t / xfs_inobt_key_t SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26556a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit e21010053a0f11122db728f82ae115f2808752d6 Author: Christoph Hellwig Date: Thu Sep 28 10:56:51 2006 +1000 [XFS] endianess annotation for xfs_agfl_t. Trivial, xfs_agfl_t is always used for ondisk values. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26553a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit ed9d88f7b7e6feba457b87ff30249e6c1e139005 Author: Nathan Scott Date: Thu Sep 28 10:56:43 2006 +1000 [XFS] Fix sparse warning found when page tracing enabled, due to overloaded gfp_t param. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26552a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 673cdf5c72ff9551df08a71f2ac1a8fe02888e8d Author: Nathan Scott Date: Thu Sep 28 10:56:26 2006 +1000 [XFS] Fix rounding bug in xfs_free_file_space found by sparse checking. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26551a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 87395deb0b3d174ffcc7f66569764f0715ac5174 Author: Alexey Dobriyan Date: Thu Sep 28 10:56:01 2006 +1000 [XFS] move XFS_IOC_GETVERSION to main multiplexer Avoids doing an unnecessary inode to vnode conversion and avoids a memory allocation. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26492a Signed-off-by: Alexey Dobriyan Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 128dabc5e9aa13dfebcad84e6b4ab31078555131 Author: Tim Shimmin Date: Thu Sep 28 10:55:43 2006 +1000 [XFS] cleanup the field types of some item format structures SGI-PV: 954365 SGI-Modid: xfs-linux-melb:xfs-kern:26406a Signed-off-by: Tim Shimmin commit f07c225036358038bf8a64f75351f10cdca2fb22 Author: Nathan Scott Date: Thu Sep 28 10:52:15 2006 +1000 [XFS] Improve xfsbufd delayed write submission patterns, after blktrace analysis. Under a sequential create+allocate workload, blktrace reported backward writes being issued by xfsbufd, and frequent inappropriate queue unplugs. We now insert at the tail when moving from the delwri lists to the temp lists, which maintains correct ordering, and we avoid unplugging queues deep in the submit paths when we'd shortly do it at a higher level anyway. blktrace now reports much healthier write patterns from xfsbufd for this workload (and likely many others). SGI-PV: 954310 SGI-Modid: xfs-linux-melb:xfs-kern:26396a Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit f37ea14969bf85633d3bd29ddf008171a5618855 Author: Alexey Dobriyan Date: Thu Sep 28 10:52:04 2006 +1000 [XFS] pass inode to xfs_ioc_space(), simplify some code. There is trivial "inode => vnode => inode" conversion, but only flags and mode of final inode are looked at. Pass original inode instead. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26395a Signed-off-by: Alexey Dobriyan Signed-off-by: Nathan Scott Signed-off-by: Tim Shimmin commit 26f908186f923291999833e9d563259834bdca06 Author: David Anders Date: Tue Sep 26 17:46:00 2006 +0100 [ARM] 3862/2: S3C2410 - add basic power management support for AML M5900 series this patch registers the wakeup irq, sets a gpio pin to indicate the status of system for suspend/resume operations, and adds the machine to the supported machines for use with the simtec-pm Signed-off-by: David Anders Signed-off-by: Ben Dooks Signed-off-by: Russell King commit ea33a59802f8fd21d24fbf5c906bc3f399bcca00 Author: Serge E. Hallyn Date: Mon Aug 7 11:57:36 2006 -0500 [ARM] kthread: switch arch/arm/kernel/apm.c Switch arch/arm/kernel/apm.c from using kernel_thread - whose export is deprecated - to kthread. Signed-off-by: Serge E. Hallyn Signed-off-by: Russell King commit d1d8f7dec179a421d6d449ddcd1713ed55db40be Author: Eric Sesterhenn Date: Tue Sep 26 14:22:00 2006 +0200 [ARM] Off-by-one in arch/arm/common/icst* hi, a quick find -iname \*.[ch] | xargs grep "> ARRAY_SIZE(", revealed these in the icst drivers. If i == ARRAY_SIZE, we get past the idx2s array. Signed-off-by: Eric Sesterhenn Signed-off-by: Russell King commit d4b0a4c19ace3021235a33658c520ab0da80dfb1 Author: Olof Johansson Date: Wed Sep 27 14:02:26 2006 -0500 [PATCH] spidernet: Use pci_dma_mapping_error() A driver shouldn't compare to DMA_ERROR_CODE directly, use pci_dma_mapping_error() instead. Signed-off-by: Olof Johansson Signed-off-by: Jeff Garzik commit c73a29da23c9236f868faecf85cb5401893d7c42 Author: Stephen Hemminger Date: Tue Sep 26 11:57:44 2006 -0700 [PATCH] sky2: version 1.9 Version 1.9 is for 2.6.19. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 14d0263fea0613d4f83dc5e3ad4631f363d1689f Author: Stephen Hemminger Date: Tue Sep 26 11:57:43 2006 -0700 [PATCH] sky2: fragmented receive for large MTU Use hardware support for chained receive to break up large frames into multiple pages. This avoids having to do a mult-page allocation that can fail on a busy system due to fragmented memory. For normal size MTU, this code behaves the same. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 2bb8c26242c2393b097a993ffe9b003ec9b85395 Author: Stephen Hemminger Date: Tue Sep 26 11:57:42 2006 -0700 [PATCH] sky2: use netif_tx_lock instead of LLTX Use the netdevice transmit lock via netif_tx_lock rather than putting lock in device specific code and using lockless transmit. The code is cleaner using netif_tx_lock, and the performance is same. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 291ea6142b94cc3e3ae2216d3937a78697447471 Author: Stephen Hemminger Date: Tue Sep 26 11:57:41 2006 -0700 [PATCH] sky2: incremental transmit completion Since a transmit can take several control blocks, the old code waited until the last control block was marked as done. This code processes the return values incrementally. This makes slots in the tx ring available and less chance of getting stuck. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 9fa1b1f33c4cbbe0ba7c0c166d170faaa735e53d Author: Stephen Hemminger Date: Tue Sep 26 11:57:40 2006 -0700 [PATCH] sky2: name irq after eth for irqbalance Use the ethernet device name when requesting the irq because the irqbalance daemon looks for the name when deciding policy. Better to play along with this dubious heuristic. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit c2716fb407ebaab7a09888cc8e4a2b9dfac20416 Author: Stephen Hemminger Date: Tue Sep 26 11:57:39 2006 -0700 [PATCH] sky2: workarounds for some 88e806x chips Workarounds for 88e806x chips from the vendor driver. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 91aeb3edbcf4e6ed72d138ac8c22fd68e6d717c3 Author: Stephen Hemminger Date: Tue Sep 26 11:57:38 2006 -0700 [PATCH] sky2: use standard pci register capabilties for error register Use the standard pci capability mechanism to access PCI express error registers, rather than hard coding the offset. Mask off the PCI express error from ever occuring on non-PCI express systems. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit e0ed5459030a8c9ddde44ef49bcb63aa6db425e1 Author: Stephen Hemminger Date: Tue Sep 26 11:57:37 2006 -0700 [PATCH] sky2: gigabit full duplex negotiation Look at the registers correctly, when doing gigabit full duplex. Need to look for link partner result. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 6edf602341cd8f6e79479ff7f5bca72562c1f608 Author: Roland Dreier Date: Wed Sep 27 14:42:56 2006 -0700 RDMA/amso1100: Fix compile warnings Make sure all 64-bit quantities are cast to unsigned long long when printed with "%ll" printk formats. Signed-off-by: Roland Dreier commit 00463c1633b6d6a2178d2dc794c0a70ac2f9ce6b Author: Andi Kleen Date: Wed Sep 27 21:38:56 2006 +0200 [PATCH] i386: Use early clobbers for semaphores now The new code does clobber the result early, so make sure to tell gcc to not put it into the same register as a input argument Signed-off-by: Andi Kleen Cc: Andrew Morton Acked-by: Kyle McMartin Signed-off-by: Linus Torvalds commit eed7d41257e2a2a38b3ad121b8948f7bfeaa21c0 Author: Rafa³ Bilski Date: Wed Sep 27 08:25:27 2006 +0200 [CPUFREQ] longhaul: remove duplicated code. removing duplicated code. Signed-off-by: Rafa³ Bilski Signed-off-by: Dave Jones commit 0ba8821b12231386c8c1d506c682061f7225ae49 Author: Jay Vosburgh Date: Tue Sep 26 10:55:00 2006 -0700 [PATCH] bonding: update version number I neglected to properly update the version number in the recent patch series; this sets it to something reasonable. Signed-off-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit fab2062ee4a3969a9c6cb7155534d0d15ddeff54 Author: Andrew Morton Date: Wed Sep 27 00:40:36 2006 -0700 [PATCH] git-netdev-all: pc300_tty build fix In file included from drivers/net/wan/pc300_tty.c:59: drivers/net/wan/pc300.h:335: error: field 'pppdev' has incomplete type Cc: Krzysztof Halasa Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit 576b3ef2495c732a56509febd5de5144f3ebccf6 Author: Dirk Opfer Date: Mon Sep 25 22:51:02 2006 +0100 [ARM] 3864/1: Refactore sharpsl_pm This patch adds another hook into sharpsl_pm to notify the machine specific driver immediately after resume. This is needed to support the Sharp SL-6000 (Tosa). Signed-off-by: Dirk Opfer Signed-off-by: Russell King commit a2025e7f73ae5eab0a25dad88c60aba67e3ae690 Author: Dirk Opfer Date: Mon Sep 25 22:41:47 2006 +0100 [ARM] 3863/1: Add Locomo SPI Device The Locomo chip has a SPI interface which is used for SD/MMC cards (only collie). This patch adds the definition for the SPI device inside the Locomo chip. Signed-off-by: Dirk Opfer Signed-off-by: Russell King commit 8d48427ecb0639593ccf14e807479b7873254ccb Author: Richard Purdie Date: Mon Sep 25 20:11:48 2006 +0100 [ARM] 3847/2: Convert LOMOMO to use struct device for GPIOs Convert LOMOMO to use struct device * for GPIOs instead of struct locomo_dev. This enables access to the GPIOs from code which is not a locomo device itself (such as audio). Access for gpio 31 is removed for error handling (no such hardware exists). Signed-off-by: Richard Purdie Signed-off-by: Russell King commit 76ddb3fd96a8dada2d09bc3f02b3a5efbc8390c5 Author: Auke Kok Date: Wed Sep 27 12:54:22 2006 -0700 e100, e1000, ixgb: increment version numbers e100-3.5.17-k2 e1000-7.2.9-k2 ixgb-1.0.117-k2 Signed-off-by: Auke Kok commit f7d4fa014146f3116372fcec9050555bb4287951 Author: Auke Kok Date: Wed Sep 27 12:54:19 2006 -0700 ixgb: convert to netdev_priv(netdev) PCI error recovery code recently merged needs to use netdev_priv Signed-off-by: Auke Kok commit a4d3c54024beff40d4e5e4647ad212696e0ea354 Author: Jesse Brandeburg Date: Wed Sep 27 12:54:17 2006 -0700 ixgb: combine more rx descriptors to improve performance We experimented with more descriptor buffer writebacks and found that values larger than 8 give HW problems, but 8 is safe and gives us some improved performance. Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok commit 793fab727324adc90a0a2889f2b1d88bae4790eb Author: Vasily Averin Date: Wed Sep 27 12:54:14 2006 -0700 e1000: possible memory leak in e1000_set_ringparam Memory allocated for new tx_ring and rx_ring leaks if e1000_setup_XX_resources() fails.c Also this patch reduces stack usage (removed tx_new and rx_new) and uses kzalloc instead kmalloc+memset(0) Signed-off-by: Vasily Averin Signed-off-by: Andrew Morton Signed-off-by: Auke Kok commit dbf38c9474306297866d9c2af02c2d37c5165325 Author: Linas Vepstas Date: Wed Sep 27 12:54:11 2006 -0700 e1000: Janitor: Use #defined values for literals Minor janitorial patch: use #defines for literal values. Signed-off-by: Linas Vepstas Signed-off-by: Auke Kok commit 4666560a37dfdc748ae7c1d9f09c7b6ff03ce899 Author: Bruce Allan Date: Wed Sep 27 12:54:08 2006 -0700 e1000: don't strip vlan ID if 8021q claims it Signed-off-by: Bruce Allan Signed-off-by: Auke Kok commit 2a88c17371c3c263c28330093a4cd21bbeceb677 Author: Jeff Kirsher Date: Wed Sep 27 12:54:05 2006 -0700 e1000: rework polarity, NVM, eeprom code and fixes. Several minor issues exist in the low-level device handling code of e1000. The NVM and EEPROM writing/reading code was updated which fixes unneeded delays, adds proper eeprom aqcuiring steps and handle shadow ram and flash access. Minor cosmetic adjustments to the polarity code adding symbols. PHY reset code mistakenly distinguished between MAC types instead of PHY types, and was fixes. Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit 1314bbf3a3d911218fc153e14873e2e384d08084 Author: Auke Kok Date: Wed Sep 27 12:54:02 2006 -0700 e1000: driver state fixes (race fix) We were plagued by our interrupt handler posting a watchdog event which could occur when our adapter was going down in case a late packet arrived just before e1000_down() finished. This caused the watchdog timer to start after the NIC was down and keep rescheduling it every N seconds. Once the driver unloaded it would panic. Signed-off-by: Auke Kok commit 4f5f2317fbb3655edae21de3ada0f1692523eeef Author: Jeff Kirsher Date: Wed Sep 27 12:53:59 2006 -0700 e1000: reduce RAR entries available for ICH8 Manageability is using one more RAR entry than we anticipated earlier for ICH8. Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit caeccb682a2483a79162bb66a431175d4134ae0b Author: Jeff Kirsher Date: Wed Sep 27 12:53:57 2006 -0700 e1000: add PCI-E capability detection code Add code to display the detected PCI-E bus width. Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit 61c2505fd5044d9e108acc6b469d3caa02522043 Author: Bruce Allan Date: Wed Sep 27 12:53:54 2006 -0700 e1000: handle manageability for pci-e adapters at PHY powerdown When powering down the PHY (if WoL is disabled) we should only check copper PHY's and handle PCI-E adapters differently. Signed-off-by: Bruce Allan Signed-off-by: Auke Kok commit 09ae3e88662478c014617291e5a2115e6b2f65eb Author: Jeff Kirsher Date: Wed Sep 27 12:53:51 2006 -0700 e1000: gather hardware bit tweaks. Several hardware bits were set all over the driver and have been consolidated into a single function. Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit 65c7973fa5b46b024f38be208aa477e8daf9a603 Author: Jesse Brandeburg Date: Wed Sep 27 12:53:48 2006 -0700 e1000: Maybe stop TX if not enough free descriptors Cc: Herbert Xu Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok commit 249d71d694ee3a6c02067235995d6d4258d364f3 Author: Bruce Allan Date: Wed Sep 27 12:53:45 2006 -0700 e1000: Jumbo frames fixes for 82573 Disable jumbo frames for 82573L alltogether and when ASPM is enabled since the hardware has problems with it. For the NICs that do support this in the 82573 series we set ERT_2048 to attempt to receive as much traffic as early as we can. Signed-off-by: Bruce Allan Signed-off-by: Auke Kok commit 5f01607a5b5c8781ed5d5deae213b4f01283dba2 Author: Jeff Kirsher Date: Wed Sep 27 12:53:42 2006 -0700 e1000: Fix MANC detection for PCIE adapters Several manageability capability detection parts hinted towards our code being incomplete for PCI-E. According to spec, we do not want to poke any MANC bits at all. Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit 2f2ca2638cbcf287b87a1e199f949a0c03bc0cf7 Author: Jeff Kirsher Date: Wed Sep 27 12:53:40 2006 -0700 e1000: allow ethtool to pass arbitrary speed advertisment With a patch, ethtool can now signify the driver to advertise more than just a single speed/duplex setting. This allows you to tell the card to advertise in 10/100 in any speed if you don't have a gigabit switch for instance. Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit 49559854c9ea6d6950631d558d33faff49fa74f3 Author: Mitch Williams Date: Wed Sep 27 12:53:37 2006 -0700 e1000: add multicast stats counters Add 4 multicast and broadcast hardware counters (rx/tx), and eliminate as many non-hardware counters as possible. Signed-off-by: Mitch Williams Signed-off-by: Auke Kok commit 35574764c7eafab4ec0aa92c18a78a51acc8a710 Author: Nicholas Nunley Date: Wed Sep 27 12:53:34 2006 -0700 e1000: remove unused code and make symbols static Signed-off-by: Nicholas Nunley Signed-off-by: Auke Kok commit 70c6f30a5e5d616321669acfc853f7851741fd4e Author: Jeff Kirsher Date: Wed Sep 27 12:53:31 2006 -0700 e1000: add enums for several link properties Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit 11241b106937ec470e0220ae5ce98c8ea27fd700 Author: Jeff Kirsher Date: Wed Sep 27 12:53:28 2006 -0700 e1000: rename flow control symbols Sogned-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit 975b366af66280ed5b852a1a0446586ce71e306e Author: Auke Kok Date: Wed Sep 27 12:53:25 2006 -0700 e100: rework WoL and shutdown handling Unify our shutdown/suspend/resume code and make it similar to e1000: e1000_shutdown now calls suspend which does the exact same thing on shutdown except saving PCI config state on suspend. WoL setup code is now also more simple and works even when CONFIG_PM is not set, which was previously broken. Signed-off-by: Auke Kok commit dc45010e28bc4a1bfa6043eee31d1c59e93e1546 Author: Jesse Brandeburg Date: Wed Sep 27 12:53:22 2006 -0700 e100: Add debugging code for cb cleaning. Refine cb cleaning debug printout and print out all cleaned cbs' status. Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok commit c4e24f01f18f6cea422552caec2fdbf5765a7c7c Author: Auke Kok Date: Wed Sep 27 12:53:19 2006 -0700 e1000: keep .suspend and .resume driver methods in CONFIG_PM Signed-off-by: Auke Kok commit 0eb5a34cdf34ad07b6db2df1e523aaf6574601b4 Author: Auke Kok Date: Wed Sep 27 12:53:17 2006 -0700 e100, e1000, ixgb: Fix an impossible memory overwrite bug We keep getting requests from people that think that this might be an exploitable hole where we would overwrite 4 bytes in the netdev struct if the pci name would exceed 15 characters. In reality this will never happen but we fix it anyway. Signed-off-by: Auke Kok commit 0abb6eb12806cf99ea815810d470423083c3b9f4 Author: Auke Kok Date: Wed Sep 27 12:53:14 2006 -0700 e100, e1000, ixgb: update copyright header and remove LICENSE This update to the copyright header adds the mailinglist, and aligns it with the kernel licensing as well as remove the offending 'all rights reserved'. Signed-off-by: Auke Kok commit 7f38aa0f04259d37f26e1e906607f1ebb39c0c5c Author: Andrew Morton Date: Mon Sep 25 17:00:52 2006 -0700 [PATCH] USB Storage: fix Rio Karma eject support build error In file included from drivers/usb/storage/usb.c:180: drivers/usb/storage/unusual_devs.h:221: error: 'US_PR_KARMA' undeclared here (not in a function) drivers/usb/storage/unusual_devs.h:221: error: 'rio_karma_init' undeclared here (not in a function) Cc: Keith Bennett Acked-by: Bob Copeland Cc: Matthew Dharm Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 5dda171202f94127e49c12daf780cdae1b4e668b Author: Andy Gay Date: Mon Jul 3 18:43:01 2006 -0400 USB: Airprime driver improvements to allow full speed EvDO transfers Adapted from an earlier patch by Greg KH . That patch added multiple read urbs and larger transfer buffers to allow data transfers at full EvDO speed. This version includes additional device IDs and fixes a memory leak in the transfer buffer allocation. Some (maybe all?) of the supported devices present multiple bulk endpoints, the additional EPs can be used for control and status functions, This version allocates 3 EPs by default, that can be changed using the 'endpoints' module parameter. Tested with Sierra Wireless EM5625 and MC5720 embedded modules. Device ID (0x0c88, 0x17da) for the Kyocera Wireless KPC650/Passport was added but is not yet tested. From: Andy Gay Cc: Kevin Lloyd Signed-off-by: Greg Kroah-Hartman commit fc849b85fb14ccbbc10098d501a870bc9b44a641 Author: David Brownell Date: Mon Sep 18 16:53:26 2006 -0700 USB: remove OTG build warning Somewhere along the line, a variable in a USB-OTG codepath stopped being used; this removes the relevant compiler warning. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 26f953fd884ea4879585287917f855c63c6b2666 Author: David Brownell Date: Mon Sep 18 17:03:16 2006 -0700 USB: EHCI update VIA workaround This revamps handling of the hardware "async advance" IRQ, and its watchdog timer. Basically it dis-entangles that important timeout from the others, simplifying the associated state and code to make it more robust. This reportedly improves behavior of EHCI on some systems with VIA chips, and AFAIK won't affect non-VIA hardware. VIA systems need this code to recover from silcon bugs whereby the "async advance" IRQ isn't issued. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 353a4098c61272b33a02ec5802fb3859fec91a0e Author: Alan Stern Date: Tue Sep 19 10:07:58 2006 -0400 USB: force root hub resume after power loss This patch(as785) forces the PM core to resume a root hub after a power loss during system sleep. If the root hub had been suspended before the system sleep then normally the PM core would not resume it afterward. Without this resume, various sorts of wakeup events (like port change events) can get lost. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 71795c1df30b034414c921b4930ed88de34ca348 Author: Pete Zaitcev Date: Mon Sep 18 22:57:22 2006 -0700 USB: ohci_usb can oops on shutdown When ohci-hcd is shutting down (for rmmod or PC-card removal), there is a window when the device is shut down, HC communication area (->hcca) is freed, but the core has not called "free_irq" yet. If another device triggers a shared interrupt in this window, we oops when trying to access the freed ->hcca. This patch removes the window by calling free_irq before ->hcca is freed. The patch is tested at the PC hotplug test rig at Stratus, and with rmmod by Rafael Wysocki. Signed-off-by: Pete Zaitcev Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 38e2bfc94e95dd6005fdaf40dfec0157396741da Author: Pete Zaitcev Date: Mon Sep 18 22:49:02 2006 -0700 USB: Dealias -110 code (more complete) The purpose of this patch is to split off the case when a device does not reply on the lower level (which is reported by HC hardware), and a case when the device accepted the request, but does not reply at upper level. This redefinition allows to diagnose issues easier, without asking the user if the -110 happened "immediately". The usbmon splits such cases already thanks to its timestamp, but it's not always available. I adjusted all drivers which I found affected (by searching for "urb"). Out of tree drivers may suffer a little bit, but I do not expect much breakage. At worst they may print a few messages. Signed-off-by: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman commit ec17cf1cfe0b557210b27313bd584e9b5187d4ca Author: Tobias Klauser Date: Wed Sep 13 21:38:41 2006 +0200 USB: Remove unneeded void * casts in core files The patch removes unneeded casts for the following (void *) pointers: - struct file: private - struct urb: context - struct usb_bus: hcpriv - return value of kmalloc() The patch also contains some whitespace cleanup in the relevant areas. Signed-off-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman commit d774efeabccf5f5207aa70d5c126fc928e8b30bd Author: Tony Olech Date: Wed Sep 13 11:27:35 2006 +0100 USB: u132-hcd: host controller driver for ELAN U132 adapter This "u132-hcd" module is one half of the "driver" for ELAN's U132 which is a USB to CardBus OHCI controller adapter. This module needs the "ftdi-elan" module in order to communicate to CardBus OHCI controller inserted into the U132 adapter. When the "ftdi-elan" module detects a supported CardBus OHCI controller in the U132 adapter it loads this "u132-hcd" module. Upon a successful device probe() the single workqueue is started up which does all the processing of commands from the USB core that implement the host controller. The workqueue maintains the urb queues and issues commands via the functions exported by the "ftdi-elan" module. Each such command will result in a callback. Note that the "ftdi-elan" module is a USB client driver. Note that this "u132-hcd" module is a (cut-down OHCI) host controller. Thus we have a topology with the parent of a host controller being a USB client! This really stresses the USB subsystem semaphore/mutex handling in the module removal. Signed-off-by: Tony Olech Signed-off-by: Greg Kroah-Hartman commit a5c66e4b2418278786a025a5bd9625f485b2087a Author: Tony Olech Date: Wed Sep 13 11:26:04 2006 +0100 USB: ftdi-elan: client driver for ELAN Uxxx adapters This "ftdi-elan" module is one half of the "driver" for ELAN's Uxxx series adapters which are USB to PCMCIA CardBus adapters. Currently only the U132 adapter is available and it's module is called "u132-hcd". When the USB hot plug subsystem detects a Uxxx series adapter it should load this module. Upon a successful device probe() the jtag device file interface is created and the status workqueue started up. The jtag device file interface exists for the purpose of updating the firmware in the Uxxx series adapter, but as yet it had never been used. The status workqueue initializes the Uxxx and then sits there polling the Uxxx until a supported PCMCIA CardBus device is detected it will start the command and respond workqueues and then load the module that handles the device. This will initially be only the u132-hcd module. The status workqueue then just polls the Uxxx looking for card ejects. The command and respond workqueues implement a command sequencer for communicating with the firmware on the other side of the FTDI chip in the Uxxx. This "ftdi-elan" module exports some functions to interface with the sequencer. Note that this module is a USB client driver. Note that the "u132-hcd" module is a (cut-down OHCI) host controller. Thus we have a topology with the parent of a host controller being a USB client! This really stresses the USB subsystem semaphore/mutex handling in the module removal. Signed-off-by: Tony Olech Signed-off-by: Greg Kroah-Hartman commit 8fd801339350b63cbb90730ff8b2be349fb3dc67 Author: Johannes Steingraeber Date: Sat Sep 16 16:17:34 2006 +0200 usb serial: support Alcor Micro Corp. USB 2.0 TO RS-232 through pl2303 driver Patch to add support for Alcor Micro Corp. USB 2.0 TO RS-232 converter. This patch adds VID and PID to pl2303.[ch], adds it to the "HORRIBLE HACK FOR PL2303" in usb-serial.c and also prevents cdc-acm to claim driving this device by blacklisting it in hid-core. Signed-off-by: Johannes Steingraeber Signed-off-by: Greg Kroah-Hartman commit 3f5429746d91f21f60f68b14177c0d534d80240b Author: Paul B Schroeder Date: Thu Aug 31 19:41:47 2006 -0500 USB: Moschip 7840 USB-Serial Driver Signed-off-by: Paul B Schroeder Signed-off-by: Greg Kroah-Hartman commit 5638e4d92e7707bd037a36654f914c80ccd7161d Author: Sam Hocevar Date: Wed Aug 30 02:34:56 2006 +0200 USB: add PlayStation 2 Trance Vibrator driver This patch is a driver for the PlayStation 2 specific Trance Vibrator device. The only thing that device can do is vibrate at various speeds. Signed-off-by: Sam Hocevar Cc: Pete Zaitcev Cc: Luiz Fernando N. Capitulino" Signed-off-by: Greg Kroah-Hartman commit 03270634e242dd10cc8569d31a00659d25b2b8e7 Author: Steven Haigh Date: Wed Aug 9 07:42:06 2006 +1000 USB: Add ADU support for Ontrak ADU devices This patch adds support for Ontrak ADU USB devices. Fixed for printk issues by Randy Dunlap Signed-off-by: Steven Haigh Signed-off-by: Greg Kroah-Hartman commit 8ac283ad415358f022498887811c35ac656b5222 Author: Randy Dunlap Date: Sat Aug 26 10:56:10 2006 -0700 aircable: fix printk format warnings Fix printk format warnings: drivers/usb/serial/aircable.c:221: warning: format ‘%Zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’ drivers/usb/serial/aircable.c:283: warning: format ‘%Zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’ Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit 3fe70ba2272c123cf38e4c577bf220f8bcf25366 Author: Manuel Francisco Naranjo Date: Wed Aug 9 16:35:12 2006 -0300 Add AIRcable USB Bluetooth Dongle Driver Add driver for AIRcable USB Bluetooth dongle. Signed-off-by: Naranjo, Manuel Francisco Signed-off-by: Greg Kroah-Hartman commit 78aef519ed07797f94cff1d0d66dd01704474916 Author: Mike Isely Date: Tue Aug 29 22:07:11 2006 -0500 cypress_m8: implement graceful failure handling When receiving a fatal error from the USB core, e.g. EILSEQ (which can happen if the polling interval is too short), fail gracefully. Previously the driver would fill the log with useless error messages or (more alarmingly) silently spin forever trying to write updated control information to the device. This change implements a new flag which if cleared indicates that the driver has failed. The flag will be set on initialization, cleared on fatal errors, and anything else that touches the USB port in the driver will abort if the flag is clear. When the flag is cleared, a message will be logged indicating that the driver has failed. Signed-off-by: Mike Isely Signed-off-by: Greg Kroah-Hartman commit 48298e50e0f7dfc7273ebfaa37ffd225428e83ed Author: Mike Isely Date: Tue Aug 29 22:07:07 2006 -0500 cypress_m8: improve control endpoint error handling Fix usb core function error return checks to look for negative errno values, not positive errno values. This bug had rendered those checks useless. Also remove attempted error recovery on control endpoints for EPIPE - with control endpoints EPIPE does not indicate a halted endpoint so trying to recover with usb_clear_halt() is not the correct action. Signed-off-by: Mike Isely Signed-off-by: Greg Kroah-Hartman commit 9aa8dae7b1fa7af099a403fc3766e068a0ea6d68 Author: Mike Isely Date: Tue Aug 29 22:07:04 2006 -0500 cypress_m8: use usb_fill_int_urb where appropriate Rather than directly filling in URB fields, it's safer to use usb_fill_int_urb(). This improves robustness of the driver; URB changes in the future will not go uninitialized here. That point not withstanding, this driver should at least be self-consistent. Either use usb_fill_int_urb() everywhere or don't bother with it all. Signed-off-by: Mike Isely Signed-off-by: Greg Kroah-Hartman commit 0257fa9ffe4f0287a9d90476bb733cfc2272396e Author: Mike Isely Date: Tue Aug 29 22:06:59 2006 -0500 cypress_m8: use appropriate URB polling interval The polling interval for the device can't always be 1msec. If it is too quick, the device can fail causing a fatal (to the driver) EILSEQ error from the USB core. The actual correct value is reported by the device as part of its configuration data, so use that value as the default. On a DeLorme Earthmate for example, the device reports that it wants a 6msec interval. As part of this fix, the "interval" module option has been fixed as well; the device's default can be overridden by specifying interval= as a module option. Signed-off-by: Mike Isely Signed-off-by: Greg Kroah-Hartman commit 13f4db9e1bf0a6efcdbbb3a1e4da8a1a8c620fff Author: Greg Kroah-Hartman Date: Mon Aug 28 11:43:25 2006 -0700 USB: fix __must_check warnings in drivers/usb/serial/ Signed-off-by: Greg Kroah-Hartman commit 1ee95216c0db6305c047a90b0822e2f1d2d5acdc Author: Greg Kroah-Hartman Date: Mon Aug 28 11:43:25 2006 -0700 USB: fix __must_check warnings in drivers/usb/host/ Signed-off-by: Greg Kroah-Hartman commit 657b6717e7e7dc5620525a34f1561b563fd472fa Author: Greg Kroah-Hartman Date: Mon Aug 28 11:43:25 2006 -0700 USB: fix __must_check warnings in drivers/usb/input/ Signed-off-by: Greg Kroah-Hartman commit 96cede531c632ac019003bf40128b1821761a164 Author: Greg Kroah-Hartman Date: Mon Aug 28 11:43:25 2006 -0700 USB: fix __must_check warnings in drivers/usb/class/ Signed-off-by: Greg Kroah-Hartman commit e7ccdfec087f02930c5cdc81143d4a045ae8d361 Author: Greg Kroah-Hartman Date: Mon Aug 28 11:43:25 2006 -0700 USB: fix __must_check warnings in drivers/usb/atm/ Signed-off-by: Greg Kroah-Hartman commit 4d42e1bb9e8ec7eb5e39d82aaf3ff2f3c994af84 Author: Greg Kroah-Hartman Date: Mon Aug 28 11:43:25 2006 -0700 USB: fix __must_check warnings in drivers/usb/misc/ Signed-off-by: Greg Kroah-Hartman commit 1b21d5e166e104f8914441ef52e2cd50ce65b479 Author: Greg Kroah-Hartman Date: Mon Aug 28 11:43:25 2006 -0700 USB: fix __must_check warnings in drivers/usb/core/ Signed-off-by: Greg Kroah-Hartman commit 592fbbe4bc339399d363dd55f0391e0623400706 Author: Alan Stern Date: Tue Sep 19 10:08:43 2006 -0400 USB: fix root-hub resume when CONFIG_USB_SUSPEND is not set This patch (as786) removes a redundant test and fixes a problem involving repeated system sleeps when CONFIG_USB_SUSPEND is not set. During the first wakeup, the root hub's dev.power.power_state.event field doesn't get updated, causing it not to be suspended during the second sleep transition. This takes care of the issue raised by Rafael J. Wysocki and Mattia Dongili. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 02c399ee45a54987c152fe5f627ed949bb55f187 Author: Alan Stern Date: Wed Aug 30 15:47:11 2006 -0400 usbcore: remove usb_suspend_root_hub This patch (as740) removes the existing support for autosuspend of root hubs. That support fit in rather awkwardly with the rest of usbcore and it was used only by ohci-hcd. It won't be needed any more since the hub driver will take care of autosuspending all hubs, root or external. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 01d883d44a1ca8dc77486635d428cba63e7fdadf Author: Alan Stern Date: Wed Aug 30 15:47:18 2006 -0400 usbcore: non-hub-specific uses of autosuspend This patch (as741) makes the non-hub parts of usbcore actually use the autosuspend facilities added by an earlier patch. Devices opened through usbfs are autoresumed and then autosuspended upon close. Likewise for usb-skeleton. Devices are autoresumed for usb_set_configuration. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 645daaab0b6adc35c1838df2a82f9d729fdb1767 Author: Alan Stern Date: Wed Aug 30 15:47:02 2006 -0400 usbcore: add autosuspend/autoresume infrastructure This patch (as739) adds the basic infrastructure for USB autosuspend and autoresume. The main features are: PM usage counters added to struct usb_device and struct usb_interface, indicating whether it's okay to autosuspend them or they are currently in use. Flag added to usb_device indicating whether the current suspend/resume operation originated from outside or as an autosuspend/autoresume. Flag added to usb_driver indicating whether the driver supports autosuspend. If not, no device bound to the driver will be autosuspended. Mutex added to usb_device for protecting PM operations. Unlike the device semaphore, the locking rule for the pm_mutex is that you must acquire the locks going _up_ the device tree. New routines handling autosuspend/autoresume requests for interfaces and devices. Suspend and resume requests are propagated up the device tree (but not outside the USB subsystem). work_struct added to usb_device, for carrying out delayed autosuspend requests. Autoresume added (and autosuspend prevented) during probe and disconnect. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit b6956ffa595db97656d5901ca8fec77ef272d41a Author: Alan Stern Date: Wed Aug 30 15:46:48 2006 -0400 usbcore: store each usb_device's level in the tree This patch (as778) adds a field to struct usb_device to store the device's level in the USB tree. In itself this number isn't really important. But the overhead is very low, and in a later patch it will be used for preventing bogus warnings from the lockdep checker. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit d1ad4ea331e78a5ff90eda7718da31bcbc1a9c38 Author: Pete Zaitcev Date: Thu Sep 7 16:54:22 2006 -0700 USB: UB: Let cdrecord to see a device with media absent The command "cdrecord dev=/dev/uba x.iso" prints nasty garbage if a blank is not in the drive. This happens because drivers have to set req->errors separately from just returning zero uptodate with end_that_request_first, end_that_request_last. These functions only set error in BIO, but sg_io() ignores it. Since we're on it, let cdrecord access a device when ->changed is set. It's useful if someone wants to know device capabilities without burning anything. Signed-Off-By: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman commit 14acdcd32160767d7f2fa00803d2d764d3e3373a Author: Reiner Herrmann Date: Wed Sep 6 02:37:21 2006 +0200 USB: usb/input/usbmouse.c: whitespace cleanup Replace spaces with tab and change comment indention for better readability. Signed-off-by: Reiner Herrmann Signed-off-by: Greg Kroah-Hartman commit cd22afda3f84452c6def29a68b06933e814e0e95 Author: David Brownell Date: Sun Sep 3 12:21:50 2006 -0700 USB: ohci-at91, two one-liners This includes two one-liners forwarded to me for the OHCI support on at91: - KB920x (and other boards with CPUs in non-BGA packages) need a slightly different way to say "ignore that port, it's not pinned out"; - On resume, if we turn clocks on, record that we did so. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 901b3d75e71535f29b64f352e94ff474d95df475 Author: David Brownell Date: Sat Sep 2 03:13:45 2006 -0700 USB: net2280: update dma buffer allocation This updates the code handling dma-coherent buffer allocations, basically reusing code from the musb_hdrc driver. Instead of trying to work around two significant limitations of the dma framework (memory wastage for buffers smaller than a page, and inconsistency between calling context requirements for allocation and free) this just works around one of them (the latter). So count this as two steps forward (bugfixes: the latter issue could cause errors on some platforms, and some MIPS changes broke code for the former), and one step back (increasing cross-platform memory wastage). Plus linelength and whitespace fixes; and minor data segment shrinkage. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 80f8af0c59385b41564a3ae670f94a1b4caa43b2 Author: Eugeny S. Mints Date: Sat Sep 2 03:59:19 2006 -0700 USB: usb serial gadget smp related bug Adjust dev->dev_lock spinlock lock/unlock calls to be safe for SMP case. Otherwise the following sequence may lead to a deadlock in SMP case: gs_send()->usb_ep_queue() ->(in case a request is satisfied immediatly) gs_write_complete() for ex for pxa2xx_udc.c: usb_ep_queue()->pxa2xx_ep_queue()->write_fifo()->done()->gs_write_complete() (through req.complete pointer) Signed-off-by: Eugeny S. Mints Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 0e3c8c26c7013b9d34929857598fd86ff1c22a6c Author: Matthew Dharm Date: Thu Aug 31 13:37:29 2006 -0700 USB: replace kernel_thread() with kthread_run() in libusual.c Replaced kernel_thread() with kthread_run() since kernel_thread() is deprecated in drivers/modules. Signed-off-by: Cedric Le Goater Cc: Alan Stern Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman commit 997694defd085f4dd168c6e7e0e82382c5be9db4 Author: Skip Hansen Date: Fri Sep 1 15:26:27 2006 -0700 gadgetfs patch for ep0out For ep0out transfers (rare), be sure to copy the right data to userspace. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 53bd6a601a87bb6d0df844872bc15fd4e8d127ce Author: David Brownell Date: Wed Aug 30 14:50:06 2006 -0700 USB: EHCI whitespace fixes (cosmetic) [ ... when you have an editor set to remind you of whitespace bugs ... ] Cosmetic EHCI changes: remove end-of-line whitespace, spaces before tabs. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 729ed6d502b45fd3b5c3b21c3ceaa63a8fe7cc43 Author: David Brownell Date: Wed Aug 30 13:24:56 2006 -0700 USB: ethernet gadget avoids zlps for musb_hdrc For systems using the Mentor HDRC controllers we get better TX DMA throughput if we can avoid falling back to PIO to write zero length packets ... so tell the driver to avoid ZLPs. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 4d6cd48380c4d361cc8ec34359df22377d85d202 Author: Alan Stern Date: Wed Aug 30 11:35:21 2006 -0400 usbmon: don't call mon_dmapeek if DMA isn't being used This patch (as755b) fixes a bug in usbmon. Rather than assuming all USB host controllers use DMA, the code will check the usb_bus data structure. If DMA isn't used, we don't want to try peeking into a non-existent DMA buffer! Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 1720058343fa43a1a25bfad9e62ea06e7e9743b6 Author: Alan Stern Date: Wed Aug 30 11:32:52 2006 -0400 usbcore: trim down usb_bus structure As part of the ongoing program to flatten out the HCD bus-glue layer, this patch (as771b) eliminates the hcpriv, release, and kref fields from struct usb_bus. hcpriv and release were not being used for anything worthwhile, and kref has been moved into the enclosing usb_hcd structure. Along with those changes, the patch gets rid of usb_bus_get and usb_bus_put, replacing them with usb_get_hcd and usb_put_hcd. The one interesting aspect is that the dev_set_drvdata call was removed from usb_put_hcd, where it clearly doesn't belong. This means the driver private data won't get reset to NULL. It shouldn't cause any problems, since the private data is undefined when no driver is bound. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit dd990f16a39d4e615c0b70a0ab50b79b32bfb16d Author: Alan Stern Date: Wed Aug 30 11:29:56 2006 -0400 usbcore: Add flag for whether a host controller uses DMA This patch (as770b) introduces a new field to usb_bus: a flag indicating whether or not the host controller uses DMA. This serves to encapsulate the computation. It also means we will have only one spot to update if the DMA API changes. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit a6d2bb9ff919b4685bd684620ec7a1ffa8bf2349 Author: Alan Stern Date: Wed Aug 30 11:27:36 2006 -0400 USB: remove struct usb_operations All of the currently-supported USB host controller drivers use the HCD bus-glue framework. As part of the program for flattening out the glue layer, this patch (as769) removes the usb_operations structure. All function calls now go directly to the HCD routines (slightly renamed to remain within the "usb_" namespace). The patch also removes usb_alloc_bus(), because it's not useful in the HCD framework and it wasn't referenced anywhere. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 511366da534bad226e89d294c3b3e910a2aaba6b Author: Andrew Morton Date: Mon Aug 14 23:11:02 2006 -0700 USB: usb-hub-driver-improve-use-of-ifdef fix Fix CONFIG_PM=n build. Cc: Alan Stern Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 42d8a2d22bbaed80f1ade65a08e4e1097a111d4b Author: Alexey Dobriyan Date: Sun Aug 20 18:58:42 2006 +0400 USB: Turn usb_resume_both() into static inline drivers/usb/core/hub.c: In function `hub_events': drivers/usb/core/hub.c:2591: warning: statement with no effect Signed-off-by: Alexey Dobriyan Signed-off-by: Greg Kroah-Hartman commit 088dc270e1da03744d977cbd9edd4311af142348 Author: Alan Stern Date: Mon Aug 21 12:08:19 2006 -0400 usbcore: help drivers to change device configs It's generally a bad idea for USB interface drivers to try to change a device's configuration, and usbcore doesn't provide any way for them to do it. However in a few exceptional circumstances it can make sense. This patch (as767) adds a roundabout mechanism to help drivers that may need it. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 3a3416b12f1fbd607bc137a57c924a628aa5485c Author: Alan Stern Date: Mon Aug 21 12:00:53 2006 -0400 usb-storage: fix for UFI LUN detection The UFI specification doesn't permit devices to indicate non-existent LUNs in the manner prescribed by the SCSI spec. This patch (as773) sets a special flag so that the SCSI scanner will recognize these devices and treat them specially. Signed-off-by: Alan Stern Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman commit e113f29c902f0f4bbfa5370c380e5927e6e78f8e Author: Jules Villard Date: Tue Aug 22 22:40:15 2006 +0200 USB: fix typo in drivers/usb/gadget/Kconfig This tiny patch fixes a typo in drivers/usb/gadget/Kconfig. The typo is present in 2.6.18-rc4 and in the corresponding -mm tree (and AFAIK, FYI and FWIW was present in previous kernel versions as well). From: Jules Villard Signed-off-by: Greg Kroah-Hartman commit 55359021b9a75a6d61a49ca8b9a1209793cd55f7 Author: Eric Sesterhenn Date: Mon Aug 21 15:31:05 2006 -0700 USB: fix signedness issue in drivers/usb/gadget/ether.c another gcc 4.1 signdness warning: drivers/usb/gadget/ether.c:2028: warning: comparison of unsigned expression < 0 is always false length is assigned the value of usb_ep_queue() which returns an int. Directly after this it is checked for < 0, which can never be true. Making length an int makes the error check work again. Signed-off-by: Eric Sesterhenn Acked-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 095bc335360a51623dd8571839bbf465851a7f4b Author: Luiz Fernando N. Capitulino Date: Sat Aug 26 23:48:11 2006 -0300 USB core: Use const where possible. This patch marks some USB core's functions parameters as const. This improves the design (we're saying to the caller that its parameter is not going to be modified) and may help in compiler's optimisation work. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit 83a07196735dbf371b61d6dffbb7e6a696c633c2 Author: Inaky Perez-Gonzalez Date: Fri Aug 25 19:35:31 2006 -0700 wusb: pretty print new wireless USB devices when they connect New code being pushed to linuxuwb.org requires this patch to connect WUSB devices. Signed-off-by: Inaky Perez-Gonzalez Signed-off-by: Greg Kroah-Hartman commit 5bb6e0ae8f9f3a215d6a7f99c8486b0301cc5db9 Author: Inaky Perez-Gonzalez Date: Fri Aug 25 19:35:30 2006 -0700 wusb: handle wusb device ep0 speed settings This patch teaches the USB stack handling of WUSB devices (those whose speed is USB_SPEED_VARIABLE). For these devices, we need to set ep0's maxpacketsize to 512 (even though the device descriptor reports it as 0xff). New code being pushed to linuxuwb.org requires this patch to connect WUSB devices. Signed-off-by: Inaky Perez-Gonzalez Signed-off-by: Greg Kroah-Hartman commit 0165de09747be76b09ef769fcfed3514fe5f6509 Author: Inaky Perez-Gonzalez Date: Fri Aug 25 19:35:29 2006 -0700 wusb: hub code recognizes wusb ports This patch enables the USB stack to recognize WUSB devices (from a WUSB HCD) and assigns them the proper speed setting (USB_SPEED_VARIABLE). 1. Introduce usb_hcd->wireless to mark a host controller instance as being wireless, and thus having wireless 'fake' ports. [discarded previous model of using a reserved bit in the port_stat struct to do this; thanks to Alan Stern for indicating the proper way to do it]. 2. Introduce hub.c:hub_is_wusb() that tests if a hub is a WUSB root hub (WUSB doesn't have non-root hubs). New code being pushed to linuxuwb.org requires this patch to connect WUSB devices. Signed-off-by: Inaky Perez-Gonzalez Signed-off-by: Greg Kroah-Hartman commit cb4c8fe57c05dbb04128503f4a7483a1163b1b47 Author: Inaky Perez-Gonzalez Date: Fri Aug 25 19:35:28 2006 -0700 usb: deal with broken config descriptors Change usb_get_configuration() so that it is more tolerant to devices with bad configuration descriptors (it'll make it ignore configurations that fail to load). Signed-off-by: Inaky Perez-Gonzalez Signed-off-by: Greg Kroah-Hartman commit dfe0d3ba20e860d0b9a16c4c6524180b8f93be05 Author: Matthew Dharm Date: Sun Aug 13 17:30:14 2006 -0700 USB Storage: add rio karma eject support This changeset from Keith Bennett (via Bob Copeland) moves the Karma initializer to its own file and adds trapping of the START_STOP command to enable eject of the device. Signed-off-by: Keith Bennett Signed-off-by: Bob Copeland Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman commit c07045412f21c5bb344244e8ec45671529e411bd Author: Luiz Fernando N. Capitulino Date: Mon Aug 14 22:44:29 2006 -0300 usb-skeleton: small update o CodingStyle fixes o Removes trailing spaces o Do not make not needed initialiation of automatic variables o Use usb_endpoint_* functions o If we get an error in the write URB callback print an error message instead of a debug one (Pretty unrelated changes, but spliting this up doesn't pay off as our main changes are just CodingStyle fixes). Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit d5cbad4b8b37acfde3e63d31b92561b87288ad0f Author: Alan Stern Date: Fri Aug 11 16:52:39 2006 -0400 usbcore: khubd and busy-port handling We don't want khubd to start interfering in the device-resume process merely because the PORT_STATUS_C_SUSPEND feature happens to be set. Ports need to be marked as busy while a resume is taking place. In addition, so long as ports are marked as busy, khubd won't be able to clear their various status-change features. On an interrupt-driven root hub this could lead to an interrupt storm. Root hub IRQs should not be re-enabled until the busy_bits value is equal to 0. This patch (as765) fixes these two potential problems. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 455b25fb209c8241e2163b491228b28667d82c1c Author: Alan Stern Date: Fri Aug 11 16:01:45 2006 -0400 usbcore: make hcd_endpoint_disable wait for queue to drain The inconsistent lock state problem in usbcore (the one that shows up when an HCD is unloaded) comes down to two inter-related problems: usb_rh_urb_dequeue() isn't set up to be called with interrupts disabled. hcd_endpoint_disable() doesn't wait for all URBs on the endpoint's queue to complete. The two problems are related because the one type of URB that isn't likely to be complete when hcd_endpoint_disable() returns is a root-hub URB. Right now usb_rh_urb_dequeue() waits for them to complete, and it assumes interrupts are enabled so it can wait. But hcd_endpoint_disable() calls it with interrupts disabled. Now, it should be legal to unlink root-hub URBs with interrupts disabled. The solution is to move the waiting into hcd_endpoint_disable(), where it belongs. This patch (as754) does that. It turns out to be completely safe to replace the del_timer_sync() with a simple del_timer(). It doesn't matter if the timer routine is running; hcd_root_hub_lock will synchronize the two threads and the status URB will complete with an unlink error, as it should. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit de06a3b842b31b31220637c869f112cfbc1a5ef6 Author: Alan Stern Date: Fri Aug 11 11:33:58 2006 -0400 UHCI: increase Resume-Detect-off delay The UHCI controller in my laptop takes longer to turn off the Resume-Detect bit than the 4 us allowed by uhci-hcd. Presumably other computers will have the same problem. This patch (as752) increases the maximum delay to 10 us, which should be plenty, and uses polling to avoid penalizing systems which can turn the bit off more quickly. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 64a21d025d3a979a8715f2ec7acabca7b5406c8a Author: Aleksey Gorelov Date: Tue Aug 8 17:24:08 2006 -0700 USB: Properly unregister reboot notifier in case of failure in ehci hcd If some problem occurs during ehci startup, for instance, request_irq fails, echi hcd driver tries it best to cleanup, but fails to unregister reboot notifier, which in turn leads to crash on reboot/poweroff. The following patch resolves this problem by not using reboot notifiers anymore, but instead making ehci/ohci driver get its own shutdown method. For PCI, it is done through pci glue, for everything else through platform driver glue. One downside: sa1111 does not use platform driver stuff, and does not have its own shutdown hook, so no 'shutdown' is called for it now. I'm not sure if it is really necessary on that platform, though. Signed-off-by: Aleks Gorelov Cc: Alan Stern Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit a94da8971e836f32315f8832b0bf3e88bee9efae Author: Milan Svoboda Date: Tue Aug 8 22:14:43 2006 -0700 USB gadget: gadgetfs dont try to lock before free I spotted this during my tests with -rt on arm. The -rt patch contains some better tools to diagnose problems with locks and some other things... Original code tries to take semaphore in BUG_ON and then free the memory with this semaphore. Signed-off-by: Milan Svoboda Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit e22fc27c87b41bda1b0daf8436224b0f79853482 Author: Milan Svoboda Date: Tue Aug 8 22:23:12 2006 -0700 USB: add poll to gadgetfs's endpoint zero Add poll() support to gadgetfs ep0 Signed-off-by: Milan Svoboda Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 9bcbcf4d00cd2400e655a738e77f0d21b69c6771 Author: dave rientjes Date: Tue Jul 18 23:23:02 2006 -0700 USB: net1080 inherent pad length The size of struct nc_trailer is inherently the newtailroom pad. Signed-off-by: David Rientjes Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit 5482687b8be4dedb8a5879f07c734ff11a88a7d5 Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:54 2006 -0700 USB: ldusb: Use usb_endpoint_* functions. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit b0b660b8d5b446bf26a46b233adef5819d9a683c Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:54 2006 -0700 USB: usblcd: Use usb_endpoint_* functions. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit 4fa1bbf5cfac0e8c795e0ef7b2b939b45229ef2b Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:53 2006 -0700 USB: usb-serial: Use usb_endpoint_* functions. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit 60ca126c9589e3f4bcf81db9762dca82946cd2ba Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:53 2006 -0700 USB: powermate: Use usb_endpoint_* functions. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit 96723199e00c4f27fecd8f43e1367c5f25b39a27 Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:53 2006 -0700 USB: keyspan_remote: Use usb_endpoint_* functions. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit 96642a2ce524f00f783edc95be8b2ce1429803df Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:53 2006 -0700 USB: ati_remote: Use usb_endpoint_* functions. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit ee709a3c613d9c458323e04dd69c8eb233d45199 Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:53 2006 -0700 USB: acecad: Use usb_endpoint_* functions. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit 97b107ca391c0411e6c5fc1e26585cd8285696f9 Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:53 2006 -0700 USB: appletouch: Use usb_endpoint_* functions. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit fbf81c29a3c05cd227cad89435d71c15e958feaf Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:53 2006 -0700 USB: hub: Use usb_endpoint_* functions. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit 5bc66d530b6c158795cb3fefd2106a09afb5e0f7 Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:53 2006 -0700 USB: usblp: Use usb_endpoint_* functions. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit b7cfaaaf86571732c7728e95a2231a860385463c Author: Luiz Fernando N. Capitulino Date: Wed Sep 27 11:58:53 2006 -0700 USB: New functions to check endpoints info. These functions makes USB driver's code simpler when dealing with endpoints by avoiding them from accessing the endpoint's descriptor structure directly when they only need to know the endpoint's transfer type and/or direction. Please, read each functions' documentation in order to know how to use them. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit 3d5b2510f6e361e2203e163c03b93d0026de5629 Author: Jesper Juhl Date: Sun Jul 30 18:43:43 2006 +0200 USB: making the kernel -Wshadow clean - USB & completion include/linux/usb.h causes a lot of -Wshadow warnings - fix them. include/linux/usb.h:901: warning: declaration of 'complete' shadows a global declaration include/linux/completion.h:52: warning: shadowed declaration is here include/linux/usb.h:932: warning: declaration of 'complete' shadows a global declaration include/linux/completion.h:52: warning: shadowed declaration is here include/linux/usb.h:967: warning: declaration of 'complete' shadows a global declaration include/linux/completion.h:52: warning: shadowed declaration is here Signed-off-by: Jesper Juhl Signed-off-by: Greg Kroah-Hartman commit 066202dd48cf3296b6cc22b5fcf89aef33fa0efc Author: Luiz Fernando N. Capitulino Date: Sat Aug 5 20:37:11 2006 -0300 USB: Make file operations structs in drivers/usb const. Making structs const prevents accidental bugs and with the proper debug options they're protected against corruption. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit f2ebf92c9e1930a8f79b7eb49a32122931929014 Author: Ben Williamson Date: Tue Aug 1 11:28:16 2006 +1000 USB: gmidi: New USB MIDI Gadget class driver. This driver is glue between the USB gadget interface and the ALSA MIDI interface. It allows us to appear as a MIDI Streaming device to a host system on the other end of a USB cable. This includes linux/usb/audio.h and linux/usb/midi.h containing definitions from the relevant USB specifications for USB audio and USB MIDI devices. The following changes have been made since the first RFC posting: * Bug fixes to endpoint handling. * Workaround for USB_REQ_SET_CONFIGURATION handling, not understood yet. * Added SND and SND_RAWMIDI dependencies in Kconfig. * Moved usb_audio.h and usb_midi.h to usb/*.h * Added module parameters for ALSA card index and id. * Added module parameters for USB descriptor IDs and strings. * Removed some unneeded stuff inherited from zero.c, more to go. * Provide DECLARE_* macros for the variable-length structs. * Use kmalloc instead of usb_ep_alloc_buffer. * Limit source to 80 columns. * Return actual error code instead of -ENOMEM in a few places. Signed-off-by: Ben Williamson Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit ba307f5828b1b4a1348d99c4f430a0cf3beeae2f Author: Milan Svoboda Date: Mon Jun 26 07:48:00 2006 -0700 USB: gadgetfs: protect ep_release with lock This patch adds mutex protection to ep_release. Signed-off-by: Milan Svoboda Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 8a7471aba19dc526978a03bfe2e3c122712b5900 Author: Milan Svoboda Date: Mon Jun 26 07:19:00 2006 -0700 USB: fix ep_config to return correct value This patch fixes ep_config to return correct value. Without patch ep_config returns submitted lenght minus 4 on succes. With this patch applied, whole submitted lenght is returned. ep_config parses submitted data and if buffer starts with (int) 1 it is parsed, otherwise error is reported. Problem is that ep_config returns size of buffer minus 4 on success. I think that size of buffer should be returned instead, because there were no problems and all data were processed. Signed-off-by: Milan Svoboda Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 07cb7f23d07aa4d197dbeb123eb9719c176190ee Author: Milan Svoboda Date: Mon Jun 26 07:46:00 2006 -0700 USB: correct locking in gadgetfs_disconnect This patch moves spin_lock (&dev->lock) before first use of dev. I think that test to the state of device should be protected with this spin_lock... Signed-off-by: Milan Svoboda Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 17efe155253e3f81caa6cc57ec2af1c128618698 Author: Dmitry Torokhov Date: Tue Aug 1 22:45:28 2006 -0400 USB: onetouch - handle errors from input_register_device() Onetouch: handle errors from input_register_device() Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman commit bd35078f47f795569fae29b2ff187e6f921460ad Author: David Brownell Date: Mon Jul 31 07:29:39 2006 -0700 USB: build fixes: ohci-omap The ohci-omap code has diverged from the working version in the linux-omap tree; this syncs up the versions: - Another clock is needed in various cases - The omap-1510 iommu code needs to be #ifdeffed out on newer parts - Saner use of the HCD framework - Various other changes, e.g. a Nokia 770 quirk And some minor dead-whitespace removal. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit eb6d8c2d145a864aedd874b4226762c5ef0d7a77 Author: Hermann Kneissel Date: Tue Jul 11 19:41:33 2006 +0200 USB: garmin_gps support for new generation of gps receivers The attached patch adds support for the new generation of gps receivers (eg. GPSmap 60Cx) to garmin_gps.c. Signed-off-by: Hermann Kneissel Signed-off-by: Greg Kroah-Hartman commit 3bea733ab21247290bd552dd6a2cd3049af9adef Author: Ping Cheng Date: Thu Jul 13 18:01:36 2006 -0700 USB: wacom tablet driver reorganization - split wacom.c into 4 files: wacom.h, wacom_wac.h, wacom_sys.c, and wacom_wac.c - where wacom_sys.c deals with system specific code, - and wacom_wac.c deals with Wacom specific code Signed-off-by: Ping Cheng Signed-off-by: Greg Kroah-Hartman commit ecdc0a590268f1926ed8534a040a390c77d20948 Author: Franck Bui-Huu Date: Wed Jul 12 10:09:41 2006 +0200 USB: usbcore get rid of the timer in usb_start_wait_urb() This patch uses completion timeout instead of a timer to implement a timeout when submitting an URB in usb_start_wait_urb(). It also fixes a small issue. With the previous code, if no timeout happened and the URB's status was set to ECONNRESET value, the code assumed wrongly that a timeout had occured. Signed-off-by: Franck Bui-Huu Signed-off-by: Greg Kroah-Hartman commit 014aa2a3c32ebe33f97e9d219d91d3c5c7231bf7 Author: Luiz Fernando N. Capitulino Date: Thu Jul 27 10:30:43 2006 -0300 USB: ipaq: minor ipaq_open() cleanup. Commit b512504e5671f83638be0ddr085c4b1832f623d3 made ipaq_open() a bit messy by moving the read urb submission far from its usb_fill_bulk_urb() call and the comment explaining what it does. This patch put they together again. Although only compiled tested, should not break the fix introduced by b512504e5671f83638be0ddr085c4b1832f623d3, of course. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit 25d94e682ccb8938177bffafa67a7d21c7282a4a Author: Randy Dunlap Date: Mon Aug 7 15:56:40 2006 -0700 usbnet: printk format warning Fix printk format warning(s): drivers/usb/net/usbnet.c:654: warning: int format, different type arg (arg 3) The fact that rx_urb_size happens to be a size_t has propagated all the way back to this printk. It's fragile to be using %z in this case - let's just typecast the args instead. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 933a27d39e0e57ba56cff2e4ebe92cf23f4cd815 Author: David Hollis Date: Sat Jul 29 10:12:50 2006 -0400 USB: asix - Add AX88178 support and many other changes * More generi-fication of function/macro names where appropriate: ax88772_xx() -> asix_xx() * Reorder functions to provide more logical grouping * AX88178 device support * Support DLink DUB-E100 Rev B Support * Hopefully resolve all endian-ness issues * Use more defines for bitmask values * Change a number of devdbg() calls to deverr() so that if DEBUG is not defined, the error messages still get through as necessary Signed-off-by: David Hollis Signed-off-by: Greg Kroah-Hartman commit a99c19492a801013fd25ce7bab1f0f65a328a4ba Author: Jamie Painter Date: Thu Jul 27 14:17:28 2006 -0400 USB: usbnet - Add unlink_rx_urbs() call to allow for Jumbo Frames Add usbnet_unlink_rx_urbs() which can be called by mini-drivers when they change their MTU such as for Jumbo Frame support. Signed-off-by: David Hollis Signed-off-by: Greg Kroah-Hartman commit 9c53761681497d598a31ed2f6b29b5b3480c49db Author: Thiago Galesi Date: Sat Jul 29 10:47:12 2006 -0300 USB: pl2303: cosmetic changes to quirk Cosmetic changes to quirk in pl2303_update_line_status Signed-off-by: Thiago Galesi Signed-off-by: Greg Kroah-Hartman commit 572d3138eb0cf17a2bf36944cc1d2c753578862e Author: Thiago Galesi Date: Sat Jul 29 10:46:37 2006 -0300 USB: pl2303: reduce number of prototypes Reduce number of needed prototypes in Prolific pl2303 driver Signed-off-by: Thiago Galesi Signed-off-by: Greg Kroah-Hartman commit 10a18cd1a31e34d123d5ae4736a3393432352750 Author: Thiago Galesi Date: Sat Jul 29 10:45:43 2006 -0300 USB: pl2303: cosmetic changes to pl2303_buf_{clear, data_avail} Changes the functions pl2303_buf_clear and pl2303_buf_data_avail for the purpose of keeping them under the 80 column limit, making them more similar to similar functions and making then simpler. Signed-off-by: Thiago Galesi Signed-off-by: Greg Kroah-Hartman commit 372db8a780f63368c6960a167b7a19aad776d704 Author: Thiago Galesi Date: Mon Jul 31 15:39:27 2006 -0300 USB: pl2303: remove 80-columns limit violations in pl2303 driver Fixes several lines that overrun 80 columns in Prolific pl2303 driver and cleans up some space usages in the function calls. Signed-off-by: Thiago Galesi Signed-off-by: Greg Kroah-Hartman commit a009b75aa0ed55f0bc473c8a3b3e872cbca807ec Author: Luiz Fernando N. Capitulino Date: Tue Jul 25 16:58:30 2006 -0300 USB: pl2303: Removes unneeded goto. Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman commit 5d8926658ce41b254fdfba7d057e6c9438c25cca Author: Daniel Ritz Date: Mon Jul 31 21:43:24 2006 +0200 usbtouchscreen: version 0.4 changes over 0.3: - some more eGalax device IDs (from eGalax driver/spec) - return the error code in probe() - 3M/MTouch init fixes, tested by Don Alexander - eGalax fixes for bugs in multi-packet handling, spottet by Pieter Grimmerink - support for some eTurboTouch devices, mostly by Pieter Grimmerink - support for Gunze AHL61 controller (untested, but simple enough) Signed-off-by: Daniel Ritz Cc: Pieter Grimmerink Cc: Don Alexander Signed-off-by: Greg Kroah-Hartman commit d388dab7b562b76525761f89702246686747ba30 Author: Alan Stern Date: Sat Jul 1 22:14:24 2006 -0400 hub driver: improve use of #ifdef This patch (as736) makes the hub driver more readable by improving the usage of "#ifdef CONFIG_PM" and "#ifdef CONFIG_USB_SUSPEND". Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 1c5df7e705671f11a71112eb3a1f9765cd1719f9 Author: Alan Stern Date: Sat Jul 1 22:13:50 2006 -0400 usbcore: suspending devices with no driver Since usb_generic can be unbound from a USB device, we need to be able to handle the possibility that a suspend or resume request arrives for a device with no driver. This patch (as735) arranges things so that resume requests will fail and suspend requests will use the standard USB port-suspend code. Attempts to suspend or resume an unbound interface are handled similarly (although the error caused by trying to resume an unbound interface is dropped by the calling routine). Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 114b368c07964caa3f4e1fa575b16e87fa11936c Author: Alan Stern Date: Sat Jul 1 22:13:04 2006 -0400 usbcore: fix up device and power state tests This patch (as734) rationalizes the various tests of device state and power states. There are duplications and mistaken tests in several places. Perhaps the most interesting challenge is where the hub driver tests to see that all the child devices are suspended before allowing itself to be suspended. When CONFIG_USB_SUSPEND is set the test is straightforward, since we expect that the children _will_ be suspended. But when CONFIG_USB_SUSPEND isn't set, it's not so clear what should be done. The code compromises by checking the child's power.power_state.event field. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 2bf4086d7a7722b470aa24e1be725cc58619c6fe Author: Alan Stern Date: Sat Jul 1 22:12:19 2006 -0400 usbcore: set device and power states properly This patch (as733) fixes up the places where device states and power states are set in usbcore. Right now things are duplicated or missing; this should straighten things out. The idea is that udev->state is USB_STATE_SUSPENDED exactly when the device's upstream port has been suspended, whereas udev->dev.power.power_state.event reflects the result of the last call to the suspend/resume routines (which might not actually change the device state, especially if CONFIG_USB_SUSPEND isn't set). Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 4d064c080265a41324d108fccc26b72106d43db3 Author: Alan Stern Date: Sat Jul 1 22:11:44 2006 -0400 usbcore: track whether interfaces are suspended Currently we rely on intf->dev.power.power_state.event for tracking whether intf is suspended. This is not a reliable technique because that value is owned by the PM core, not by usbcore. This patch (as718b) adds a new flag so that we can accurately tell which interfaces are suspended and which aren't. At first one might think these flags aren't needed, since interfaces will be suspended along with their devices. It turns out there are a couple of intermediate situations where that's not quite true, such as while processing a remote-wakeup request. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit a8e7c5653562f88c0f5f53eac0a890c012655789 Author: Alan Stern Date: Sat Jul 1 22:11:02 2006 -0400 usbcore: resume device resume recursion This patch (as717b) removes the existing recursion in hub resume code: Resuming a hub will no longer automatically resume the devices attached to the hub. At the same time, it adds one level of recursion: Suspending a USB device will automatically suspend all the device's interfaces. Failure at an intermediate stage will cause all the already-suspended interfaces to be resumed. Attempts to suspend or resume an interface by itself will do nothing, although they won't return an error. Thus the regular system-suspend and system-resume procedures should continue to work as before; only runtime PM will be affected. The patch also removes the code that tests state of the interfaces before suspending a device. It's no longer needed, since everything gets suspended together. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 1cc8a25d5b680ff656927ffa9b66fae6b415b1d3 Author: Alan Stern Date: Sat Jul 1 22:10:15 2006 -0400 usbcore: split suspend/resume for device and interfaces This patch (as716b) splits up the core suspend and resume routines into two parts each: one for handling devices and one for handling interfaces. The behavior of the parts should be the same as in the old unified code. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 782da727b0d59e93c84a627948b1535a3db90392 Author: Alan Stern Date: Sat Jul 1 22:09:35 2006 -0400 usbcore: make usb_generic a usb_device_driver This patch (as714b) makes usb_generic into a usb_device_driver capable of being probed and unbound, just like other drivers. A fair amount of the work that used to get done during discovery or removal of a USB device have been moved to the probe and disconnect methods of usb_generic: creating the sysfs attributes and selecting an initial configuration. However the normal behavior should continue to be the same as before. We will now have the possibility of creating other USB device drivers, They will assist with exporting devices to remote systems (USB-over-TCPIP) or to paravirtual guest operating systems. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 8bb54ab573ecd1b4fe2ed66416a8d99a86e65316 Author: Alan Stern Date: Sat Jul 1 22:08:49 2006 -0400 usbcore: add usb_device_driver definition This patch (as732) adds a usb_device_driver structure, for representing drivers that manage an entire USB device as opposed to just an interface. Support routines like usb_register_device_driver, usb_deregister_device_driver, usb_probe_device, and usb_unbind_device are also added. Unlike an earlier version of this patch, the new code is type-safe. To accomplish this, the existing struct driver embedded in struct usb_driver had to be wrapped in an intermediate wrapper. This enables the core to tell at runtime whether a particular struct driver belongs to a device driver or to an interface driver. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 36e56a34586783c7986ce09d39db80b27c95ce24 Author: Alan Stern Date: Sat Jul 1 22:08:06 2006 -0400 usbcore: move code among source files This revised patch (as713b) moves a few routines among source files in usbcore. Some driver-related code in usb.c (claiming interfaces and matching IDs) is moved to driver.c, where it belongs. Also the usb_generic stuff in driver.c is moved to a new source file: generic.c. (That's the reason for revising the patch.) Although not very big now, it will get bigger in a later patch. None of the code has been changed; it has only been re-arranged. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 140d8f687457c40a66af362838fac0d7893e7df5 Author: Alan Stern Date: Sat Jul 1 22:07:21 2006 -0400 usbcore: rename usb_suspend_device to usb_port_suspend This revised patch (as715b) renames usb_suspend_device to usb_port_suspend, usb_resume_device to usb_port_resume, and finish_device_resume to finish_port_resume. There was no objection to the original version of the patch so this should be okay to apply. The revision was needed only because I have re-arranged the order of the earlier patches. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 121e287cb554f3d3402c85a1950d852691b08f5c Author: Alan Stern Date: Sat Jul 1 22:06:36 2006 -0400 usb-skeleton: don't submit URBs after disconnection This patch (as712b) is a slight revision of one submitted earlier. It fixes the usb-skeleton example driver so that it won't try to submit URBs after skel_disconnect() has returned. This could cause errors, if the driver was unbound and then a different driver was bound to the device. It also fixes a couple of small bugs in the skel_write() routine. The revised patch uses a slightly different test, suggested by Dave Brownell, for determining whether to free a transfer buffer. It's a little clearer than the earlier version. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 349710c3a79c0405911b8b604953f0c665e17756 Author: Alan Stern Date: Sat Jul 1 22:05:56 2006 -0400 usbfs: detect device unregistration This patch (as711b) is a revised version of an earlier submission. It modifies the usbfs code to detect when a device has been unregistered from usbfs, even if the device is still connected. Although this can't happen now, it will be able to happen after the upcoming changes to usb_generic. Nobody objected to this patch when it was submitted before, so it should be okay to apply this version. The revision is merely to take into account the changes introduced by as723, which touches the same driver. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 4a2a8a2cce86b9d001378cc25acb5c61e6ca7d63 Author: Alan Stern Date: Sat Jul 1 22:05:01 2006 -0400 usbfs: private mutex for open, release, and remove The usbfs code doesn't provide sufficient mutual exclusion among open, release, and remove. Release vs. remove is okay because they both acquire the device lock, but open is not exclusive with either one. All three routines modify the udev->filelist linked list, so they must not run concurrently. Apparently someone gave this a minimum amount of thought in the past by explicitly acquiring the BKL at the start of the usbdev_open routine. Oddly enough, there's a comment pointing out that locking is unnecessary because chrdev_open already has acquired the BKL. But this ignores the point that the files in /proc/bus/usb/* are not char device files; they are regular files and so they don't get any special locking. Furthermore it's necessary to acquire the same lock in the release and remove routines, which the code does not do. Yet another problem arises because the same file_operations structure is accessible through both the /proc/bus/usb/* and /dev/usb/usbdev* file nodes. Even when one of them has been removed, it's still possible for userspace to open the other. So simple locking around the individual remove routines is insufficient; we need to lock the entire usb_notify_remove_device notifier chain. Rather than rely on the BKL, this patch (as723) introduces a new private mutex for the purpose. Holding the BKL while invoking a notifier chain doesn't seem like a good idea. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit da308e8da700637d6271dddda08128094691b980 Author: Sean Young Date: Fri Aug 11 09:28:28 2006 +0000 USB: Phidgets should check create_device_file() return value device_create_file() could fail, add proper error paths for this condition. Signed-off-by: Sean Young Signed-off-by: Greg Kroah-Hartman commit 912b24c333843514ff77ed88961c6945f0f286ce Author: Sean Young Date: Mon Jul 10 09:56:25 2006 +0000 USB: Put phidgets driver in a sysfs class This patch creates a device class phidget and add the phidget drivers to them. Signed-off-by: Sean Young Signed-off-by: Greg Kroah-Hartman commit d5176b413dcce85334e270021fc0d723d1714c84 Author: Sean Young Date: Sun Jul 9 13:01:02 2006 +0000 USB: Add driver for PhidgetMotorControl This driver add support for the Phidgets Inc., MotorControl via sysfs. Also some minor fixes for the InterfaceKit. Signed-off-by: Sean Young Signed-off-by: Greg Kroah-Hartman commit b6eb2d84d2bb01e9fcc46a032a3429b4747b1c47 Author: Alan Stern Date: Thu Jul 6 15:37:42 2006 -0400 usbcore: add configuration_string to attribute group This patch (as737b) does a very small cleanup of core/sysfs.c by adding the configuration_string attribute file to the existing attribute group instead of treating it separately. It doesn't need this separate treatment because unlike the other device string attributes, it changes along with the active configuration. The patch also fixes a simple typo (which, oddly enough, doesn't seem to bother the compiler). Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit b94badbb47cb50f4fca8440efdaa8ebd32604fe4 Author: Dmitry Torokhov Date: Tue Aug 1 22:33:34 2006 -0400 USB: Make usb_buffer_free() NULL-safe kfree() handles NULL arguments which is handy in error handling paths as one does need to insert bunch of ifs. How about making usb_buffer_free() do the same? Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman commit 988440e7e51c6f8061c98d03d618ba090e7b84ef Author: Werner Lemberg Date: Tue Jul 18 17:00:22 2006 +0200 USB: ark3116: Formatting cleanups Formatting only. Signed-off-by: Werner Lemberg Signed-off-by: Greg Kroah-Hartman commit 2f430b4bbae7faa167730f954252eb7db4ac58dd Author: Werner Lemberg Date: Tue Jul 18 17:00:52 2006 +0200 USB: ark3116: Add TIOCGSERIAL and TIOCSSERIAL ioctl calls. Add (dummy?) support for TIOCGSERIAL and TIOCSSERIAL ioctl calls to the USB serial driver file `ark3116.c'. This is sufficient for me to run wvdial successfully, receive my email, and do webbrowsing with firefox. On the other hand, running the cvs program to update archives seems not to work, and the traceroute command sometimes says send failed: No buffer space available Looks like a buffering problem... My knowledge of serial device drivers is zero, so I can't fix this -- I just did a cut'n'paste from other USB serial drivers... Signed-off-by: Werner Lemberg Signed-off-by: Greg Kroah-Hartman commit bfb2c965d669045b7629fd577b7834c87c2dfd54 Author: Tony Lindgren Date: Thu Jun 29 22:27:36 2006 -0700 USB: Allow compile in g_ether, fix typo Allows compiling g_ether in and fixes a typo with MUSB_HDRC Signed-off-by: Tony Lindgren Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit b2bbb20b37d734443d1c279d0033a64f6095db54 Author: David Brownell Date: Thu Jun 29 12:25:39 2006 -0700 USB: pxa2xx_udc understands GPIO based VBUS sensing This updates the PXA 25x UDC board-independent infrastructure for VBUS sensing and the D+ pullup. The original code evolved from rather bizarre support on Intel's "Lubbock" reference hardware, so that on more sensible hardware it doesn't work as well as it could/should. The change is just to teach the UDC driver how to use built-in PXA GPIO pins directly. This reduces the amount of board-specfic object code needed, and enables the use of a VBUS sensing IRQ on boards (like Gumstix) that have one. With VBUS sensing, the UDC is unclocked until a host is actually connected. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 3a16f7b4a75d68364c3278523f51ac141a12758a Author: David Brownell Date: Thu Jun 29 12:27:23 2006 -0700 USB: move to Move to . Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 26facdff1d39c0028565137ad27e8bd5a5cafcf1 Author: Andrew Morton Date: Fri Jul 7 00:11:45 2006 -0700 USB: kill usb kconfig warning drivers/usb/host/Kconfig:87:warning: 'select' used by config symbol 'USB_OHCI_HCD' refer to undefined symbol 'I2C_PNX' Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 60bbfc84b6d916f5a10127762d0dcb3f4726450d Author: Vitaly Wool Date: Thu Jun 29 18:28:18 2006 +0400 USB OHCI controller support for PNX4008 inlined is the patch that adds basic support for USB OHCI controller support for PNX4008 Philips PNX4008 ARM board. Due to HW design, it depends on I2C driver for PNX4008 which I've recetnly posted to LKML and i2c at lm-sensors. Signed-off-by: Vitaly Wool Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit b2a8e097d0f3bbb7ef550103022db92fc3832842 Author: Ben Dooks Date: Mon Jun 26 23:36:07 2006 +0100 USB: ohci-s3c2410.c: clock now usb-bus-host With the newer Samsung S3C2412 and S3C2413 SoC devices, the 48MHz USB clock has been given an individual gate into the USB OHCI and gadget blocks. This clock is called usb-bus-clock, and we need to replace the old use of the USB PLL (upll) directly with the new usb-bus-host. The S3C2410 clock driver has been updated already to provide a virtual clock which is a child of the UPLL to maintain compatibility. The S3C2412 clock driver correctly enables the PLL when either usb-bus clock is active. Signed-off-by: Ben Dooks Signed-off-by: Greg Kroah-Hartman commit d413984ae936fad46678403b38d79c595e5aaafe Author: David Brownell Date: Fri Aug 4 11:31:55 2006 -0700 USB: OHCI avoids root hub timer polling This teaches OHCI to use the root hub status change (RHSC) IRQ, bypassing root hub timers most of the time and switching over to the "new" root hub polling scheme. It's complicated by the fact that implementations of OHCI trigger and ack that IRQ differently (the spec is vague there). Avoiding root hub timers helps mechanisms like "dynamic tick" leave the CPU in lowpower modes for longer intervals. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 06afff00bcab0e384afbef70194fd3469532abdf Author: Sam Bishop Date: Mon Aug 28 16:52:15 2006 -0600 USB doc patch 2 A little more detail on how and when to poll() /proc/bus/usb/devices. Signed-off-by: Sam Bishop Signed-off-by: Greg Kroah-Hartman commit 341323269258ab8484077a9c70db804fbae6ae93 Author: Sam Bishop Date: Mon Aug 28 16:42:10 2006 -0600 USB: doc patch 1 Grammar, spelling, and stylistic edits. Signed-off-by: Sam Bishop Signed-off-by: Greg Kroah-Hartman commit 39c2f3ac04663bb2546a7058701a621e526eabb2 Author: Phil Dibowitz Date: Mon Sep 11 00:27:40 2006 -0700 USB: unusual_dev entry for Sony P990i This patch is a re-diffed version of one originally sent by Jan Mate . Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman commit b97b196c9d351a501ed89fc836e4e2fe71ff93c9 Author: Alan Stern Date: Thu Sep 14 15:18:54 2006 -0400 USB: unusual_devs entry for Lacie DVD+-RW This patch (as781) adds an entry to unusual_devs.h for the Lacie DVD+-RW drive. Apparently its USB interface has requirements similar to the Genesys Logic interface; it doesn't like data to be sent too soon after a command. This fixes Bugzilla #6817. Signed-off-by: Alan Stern Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman commit 6cc7cbef948ea2660cc40d7aab090a479f7db6a2 Author: Russell King Date: Wed Sep 27 18:00:35 2006 +0100 [ARM] Use CPU_CACHE_* where possible in asm/cacheflush.h Three of the generic cache method options were using explicit CPU types, whereas they could use the CPU_CACHE_* definitions instead. Switch them over to use the CPU_CACHE_* definitions. Signed-off-by: Russell King commit 6b237a355afd342509f1471e0c338637bcd958bc Author: Russell King Date: Wed Sep 27 17:44:39 2006 +0100 [ARM] Make !MMU CPUs depend on !MMU Don't offer non-MMU based CPUs for selection when CONFIG_MMU is set. Signed-off-by: Russell King commit f37f46eb1c0bd0b11c34ef06c7365658be989d80 Author: Hyok S. Choi Date: Tue Sep 26 17:38:32 2006 +0900 [ARM] nommu: add ARM946E-S core support This patch adds ARM946E-S core support which has typically 8KB I&D cache. It has a MPU and supports ARMv5TE instruction set. Because the ARM946E-S core can be synthesizable with various cache size, CONFIG_CPU_DCACHE_SIZE is defined for vendor specific configurations. Signed-off-by: Hyok S. Choi Signed-off-by: Russell King commit d60674eb5d961b2421db16cc373dc163f38cc105 Author: Hyok S. Choi Date: Tue Sep 26 17:38:18 2006 +0900 [ARM] nommu: add ARM940T core support This patch adds ARM940T core support which has 4KB D-cache, 4KB I-cache and a MPU. Signed-off-by: Hyok S. Choi Signed-off-by: Russell King commit 43f5f0146ef5c3a3421ea53a0708fd37edcb8905 Author: Hyok S. Choi Date: Tue Sep 26 17:38:05 2006 +0900 [ARM] nommu: add ARM9TDMI core support This patch adds ARM9TDMI core support which has no cache and no CP15 register(no memory control unit). Signed-off-by: Hyok S. Choi Signed-off-by: Russell King commit b731c3118d87f26c8bf3f358ffbbc24450af50a6 Author: Hyok S. Choi Date: Tue Sep 26 17:37:50 2006 +0900 [ARM] nommu: add ARM740T core support This patch adds ARM740T core support which has a MPU and 4KB or 8KB cache. Signed-off-by: Hyok S. Choi Signed-off-by: Russell King commit 07e0da78abdc679714a12e7a60137d950c346681 Author: Hyok S. Choi Date: Tue Sep 26 17:37:36 2006 +0900 [ARM] nommu: add ARM7TDMI core support This patch adds ARM7TDMI core support which has no cache and no CP15 register(no memory control unit). Signed-off-by: Hyok S. Choi Signed-off-by: Russell King commit f12d0d7c7786af39435ef6ae9defe47fb58f6091 Author: Hyok S. Choi Date: Tue Sep 26 17:36:37 2006 +0900 [ARM] nommu: manage the CP15 things All the current CP15 access codes in ARM arch can be categorized and conditioned by the defines as follows: Related operation Safe condition a. any CP15 access !CPU_CP15 b. alignment trap CPU_CP15_MMU c. D-cache(C-bit) CPU_CP15 d. I-cache CPU_CP15 && !( CPU_ARM610 || CPU_ARM710 || CPU_ARM720 || CPU_ARM740 || CPU_XSCALE || CPU_XSC3 ) e. alternate vector CPU_CP15 && !CPU_ARM740 f. TTB CPU_CP15_MMU g. Domain CPU_CP15_MMU h. FSR/FAR CPU_CP15_MMU For example, alternate vector is supported if and only if "CPU_CP15 && !CPU_ARM740" is satisfied. Signed-off-by: Hyok S. Choi Signed-off-by: Russell King commit fefdaa06ccdde394be865ed76509be82813e425b Author: Hyok S. Choi Date: Tue Sep 26 17:36:37 2006 +0900 [ARM] nommu: defines CPU_CP15, CPU_CP15_MMU and CPU_CP15_MPU By merging of uClinux/ARM, we need to treat various CPU cores which have MMU, MPU or even none for memory management. The memory management coprocessors are controlled by CP15 register set and the ARM core family can be categorized by 5 groups by the register ; G-a. CP15 is MMU : 610, 710, 720, 920, 922, 925, 926, 1020, 1020e, 1022, v6 and the derivations sa1100, sa110, xscale, xsc3. G-b. CP15 is MPU : 740, 940, 946, 996, 1156. G-c. CP15 is MPU or MMU : 1026 (selectable by schematic design) G-d. CP15 is exist, but nothing for memory managemnt : 966, 968. G-e. no-CP15 : 7tdmi, 9tdmi, 9e, 9ej This patch defines CPU_CP15, CPU_CP15_MMU and CPU_CP15_MPU. Thus the family can be defined as : - CPU_CP15 only : G-d - CPU_CP15_MMU(implies CPU_CP15) : G-a, G-c(selectable) - CPU_CP15_MPU(implies CPU_CP15) : G-b, G-c(selectable) - !CPU_CP15 : G-e Signed-off-by: Hyok S. Choi Signed-off-by: Russell King commit 6a570b28b5948e7bf54ea42ec3161bded0a1c460 Author: Hyok S. Choi Date: Tue Sep 26 17:37:07 2006 +0900 [ARM] nommu: allows to support module in nommu A simple patch to support module in nommu mode. The vmalloc is used instead of __vmalloc_area which depends on CONFIG_MMU. Signed-off-by: Hyok S. Choi Signed-off-by: Russell King commit 1e2af92e089d4c845248844a3e7ee06ce889af46 Author: Andrew Morton Date: Wed Sep 27 01:51:15 2006 -0700 [PATCH] x86: use probe_kernel_address in handle_BUG() Avoid possible deadlock on a BUG() inside down_write(mmap_sem). The deadlock can only occur if something has gone horridly wrong, because a fault here shouldn't happen. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1b79e5513d52e8533a08af35a3595dad80c74d1f Author: Andrew Morton Date: Wed Sep 27 01:51:14 2006 -0700 [PATCH] add probe_kernel_address() Add a version of __get_user() which is safe to call inside mmap_sem. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aafe6c2a2b6bce5a3a4913ce5c07e85ea143144d Author: Eric W. Biederman Date: Wed Sep 27 01:51:13 2006 -0700 [PATCH] de_thread: Use tsk not current Ingo Oeser pointed out that because current expands to an inline function it is more space efficient and somewhat faster to simply keep a cached copy of current in another variable. This patch implements that for the de_thread function. (akpm: saves nearly 100 bytes of text on x86) Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 66f37509fc7191df468a8d183374f48b13bacb73 Author: Adrian Bunk Date: Wed Sep 27 01:51:13 2006 -0700 [PATCH] fs/nfs/: make code static Signed-off-by: Adrian Bunk Acked-by: Trond Myklebust Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b7b52630deca785c4fc2bf4c53500cee066786af Author: Martin Bligh Date: Wed Sep 27 01:51:12 2006 -0700 [PATCH] add newline to nfs dprintk Add missing \n to dprintk Signed-off-by: Martin Bligh Acked-by: Trond Myklebust Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 65800ac77e080cf159d6c1207b6886e18f22bc08 Author: Eric W. Biederman Date: Wed Sep 27 01:51:11 2006 -0700 [PATCH] pid: remove temporary debug code in attach_pid With the patches flying between Oleg and myself somehow this temporary debug code got left in pid.c. It was never intended to make it to the stable kernel. Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c18258c6f0848f97e85287f6271c511a092bb784 Author: Eric W. Biederman Date: Wed Sep 27 01:51:06 2006 -0700 [PATCH] pid: Implement transfer_pid and use it to simplify de_thread In de_thread we move pids from one process to another, a rather ugly case. The function transfer_pid makes it clear what we are doing, and makes the action atomic. This is useful we ever want to atomically traverse the process group and session lists, in a rcu safe manner. Even if the atomic properties this change should be a win as transfer_pid should be less code to execute than executing both attach_pid and detach_pid, and this should make de_thread slightly smaller as only a single function call needs to be emitted. The only downside is that the code might be slower to execute as the odds are against transfer_pid being in cache. Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 35fa2048ab13d1be846be612e395c15c200bd51c Author: Eric W. Biederman Date: Wed Sep 27 01:51:05 2006 -0700 [PATCH] sysctl: Document that sys_sysctl will be removed Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b89a81712f486e4f7a606987413e387605fdeaf4 Author: Eric W. Biederman Date: Wed Sep 27 01:51:04 2006 -0700 [PATCH] sysctl: Allow /proc/sys without sys_sysctl Since sys_sysctl is deprecated start allow it to be compiled out. This should catch any remaining user space code that cares, and paves the way for further sysctl cleanups. [akpm@osdl.org: If sys_sysctl() is not compiled-in, emit a warning] Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 571817849c76aabf34d534c905b5e604f2e824c5 Author: Pekka J Enberg Date: Wed Sep 27 01:51:03 2006 -0700 [PATCH] msi: use kmem_cache_zalloc() Simpler, cleaner. Signed-off-by: Pekka Enberg Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7583ddfd3aae1007bc4fc67ea4c07d573d376e9e Author: Marcelo Tosatti Date: Wed Sep 27 01:51:02 2006 -0700 [PATCH] Include __param section in read-only data range The param section is an array of "kernel_param" structures, storing only constant data: pointer to name, permission of the variable pointed to by (void *)arg and pointers to set/get methods. Move end_rodata down to include __param section in the read-only range used by CONFIG_DEBUG_RODATA. Signed-off-by: Marcelo Tosatti Acked-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8b0e330b7720a206339887044fa275bf537a5264 Author: Andrew Morton Date: Wed Sep 27 01:51:02 2006 -0700 [PATCH] alloc_fdtable() cleanup free_fdset(NULL, ...) is legal. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 07563c711fbc25389e58ab9c9f0b9de2fce56760 Author: Michael Tokarev Date: Wed Sep 27 01:50:56 2006 -0700 [PATCH] EISA bus MODALIAS attributes support Add modalias attribute support for the almost forgotten now EISA bus and (at least some) EISA-aware modules. The modalias entry looks like (for an 3c509 NIC): eisa:sTCM5093 and the in-module alias like: eisa:sTCM5093* The patch moves struct eisa_device_id declaration from include/linux/eisa.h to include/linux/mod_devicetable.h (so that the former now #includes the latter), adds proper MODULE_DEVICE_TABLE(eisa, ...) statements for all drivers with EISA IDs I found (some drivers already have that DEVICE_TABLE declared), and adds recognision of __mod_eisa_device_table to scripts/mod/file2alias.c so that proper modules.alias will be generated. There's no support for /lib/modules/$kver/modules.eisamap, as it's not used by any existing tools, and because with in-kernel modalias mechanism those maps are obsolete anyway. The rationale for this patch is: a) to make EISA bus to act as other busses with modalias support, to unify driver loading b) to foget about EISA finally - with this patch, kernel (who still supports EISA) will be the only one who knows how to choose the necessary drivers for this bus ;) [akpm@osdl.org: fix the kbuild bit] Signed-off-by: Michael Tokarev Cc: Rusty Russell Cc: Randy Dunlap Acked-the-net-bits-by: Jeff Garzik Acked-the-tulip-bit-by: Valerie Henson Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ebba5f9fcb882306bef7175dee987342ec6fcf2f Author: Randy Dunlap Date: Wed Sep 27 01:50:55 2006 -0700 [PATCH] consistently use MAX_ERRNO in __syscall_return Consistently use MAX_ERRNO when checking for errors in __syscall_return(). [ralf@linux-mips.org: build fix] Signed-off-by: Randy Dunlap Signed-off-by: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bd8e39f9e4c0960541c8c69e1f7cb321574d7c90 Author: Shaohua Li Date: Wed Sep 27 01:50:54 2006 -0700 [PATCH] x86 microcode: don't check the size IA32 manual says if micorcode update's size is 0, then the size is default size (2048 bytes). But this doesn't suggest all microcode update's size should be above 2048 bytes to me. We actually had a microcode update whose size is 1024 bytes. The patch just removed the check. Signed-off-by: Shaohua Li Cc: Tigran Aivazian Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a4b9efa1d39d7d31bed08fbe5a9b2a03b2759d4 Author: Shaohua Li Date: Wed Sep 27 01:50:53 2006 -0700 [PATCH] x86 microcode: add sysfs and hotplug support Add sysfs support. Currently each CPU has three microcode related attributes. One is 'version' which shows current ucode version of CPU. Tools can use the attribute do validation or show CPU ucode status. one is 'reload' which allows manually reloading ucode. Another is 'processor_flags', which exports processor flags, so we can write tools to check if CPU has latest ucode. Also add suspend/resume and CPU hotplug support. [akpm@osdl.org: cleanups, build fix] [bunk@stusta.de: Kconfig fixes] Signed-off-by: Shaohua Li Acked-by: Tigran Aivazian Cc: Greg KH Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a30a6a2cb0fdc2c9701d6ddfb21affeb8146c038 Author: Shaohua Li Date: Wed Sep 27 01:50:52 2006 -0700 [PATCH] x86 microcode: using request_firmware to pull microcode Using request_firmware to pull ucode from userspace, so we don't need the application 'microcode_ctl' to assist. We name each ucode file according to CPU's info as intel-ucode/family-model-stepping. In this way we could split ucode file as small one. This has a lot of advantages such as selectively update and validate microcode for specific models, better manage microcode file, easily write tools for administerators and so on. with the changes, we should put all intel-ucode/xx-xx-xx microcode files into the firmware dir (I had a tool to split previous big data file into small one and later we will release new style data file). The init script should be changed to just loading the driver without unloading Signed-off-by: Shaohua Li Acked-by: Tigran Aivazian Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a3110bf4bb0466b43b898533bfd4952001bc38f Author: Shaohua Li Date: Wed Sep 27 01:50:51 2006 -0700 [PATCH] x86 microcode: microcode driver cleanup. Clean up microcode update driver and make it more readable. [akpm@osdl.org: cleanups] Signed-off-by: Shaohua Li Acked-by: Tigran Aivazian Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36b756f2b5762e6d5acba0c18e75cb5c11f11c1b Author: Adrian Bunk Date: Wed Sep 27 01:50:50 2006 -0700 [PATCH] reiserfs: warn about the useless nolargeio option Since the nolargeio option no longer has any effect, print a warning instead of setting a write-only variable. Signed-off-by: Adrian Bunk Cc: Jeff Mahoney Cc: Chris Mason Cc: Hans Reiser Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ba52de123d454b57369f291348266d86f4b35070 Author: Theodore Ts'o Date: Wed Sep 27 01:50:49 2006 -0700 [PATCH] inode-diet: Eliminate i_blksize from the inode structure This eliminates the i_blksize field from struct inode. Filesystems that want to provide a per-inode st_blksize can do so by providing their own getattr routine instead of using the generic_fillattr() function. Note that some filesystems were providing pretty much random (and incorrect) values for i_blksize. [bunk@stusta.de: cleanup] [akpm@osdl.org: generic_fillattr() fix] Signed-off-by: "Theodore Ts'o" Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 577c4eb09d1034d0739e3135fd2cff50588024be Author: Theodore Ts'o Date: Wed Sep 27 01:50:49 2006 -0700 [PATCH] inode-diet: Move i_cdev into a union Move the i_cdev pointer in struct inode into a union. Signed-off-by: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eaf796e7ef6014f208c409b2b14fddcfaafe7e3a Author: Theodore Ts'o Date: Wed Sep 27 01:50:48 2006 -0700 [PATCH] inode-diet: Move i_bdev into a union Move the i_bdev pointer in struct inode into a union. Signed-off-by: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c1541680f8d189d21dd07b053bc12996574646e Author: Theodore Ts'o Date: Wed Sep 27 01:50:47 2006 -0700 [PATCH] inode-diet: Move i_pipe into a union Move the i_pipe pointer into a union that will be shared with i_bdev and i_cdev. Signed-off-by: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e18e2941c53416aa219708e7dcad21fb4bd6794 Author: Theodore Ts'o Date: Wed Sep 27 01:50:46 2006 -0700 [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private The following patches reduce the size of the VFS inode structure by 28 bytes on a UP x86. (It would be more on an x86_64 system). This is a 10% reduction in the inode size on a UP kernel that is configured in a production mode (i.e., with no spinlock or other debugging functions enabled; if you want to save memory taken up by in-core inodes, the first thing you should do is disable the debugging options; they are responsible for a huge amount of bloat in the VFS inode structure). This patch: The filesystem or device-specific pointer in the inode is inside a union, which is pretty pointless given that all 30+ users of this field have been using the void pointer. Get rid of the union and rename it to i_private, with a comment to explain who is allowed to use the void pointer. This is just a cleanup, but it allows us to reuse the union 'u' for something something where the union will actually be used. [judith@osdl.org: powerpc build fix] Signed-off-by: "Theodore Ts'o" Signed-off-by: Judith Lebzelter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a1d9805ec506d8b9d04450997707da5f643d87c Author: OGAWA Hirofumi Date: Wed Sep 27 01:50:45 2006 -0700 [PATCH] fat: cleanup fat_get_block(s) get_blocks() was removed. So, this removes it on fat, and will take advantage of the multi block mapping. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e96287ddc4f42081e18248b6167041c0908004c Author: Vivek Goyal Date: Wed Sep 27 01:50:44 2006 -0700 [PATCH] kdump: introduce "reset_devices" command line option Resetting the devices during driver initialization can be a costly operation in terms of time (especially scsi devices). This option can be used by drivers to know that user forcibly wants the devices to be reset during initialization. This option can be useful while kernel is booting in unreliable environment. For ex. during kdump boot where devices are in unknown random state and BIOS execution has been skipped. Signed-off-by: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bcdc5e019d9f525a9f181a7de642d3a9c27c7610 Author: Ian Kent Date: Wed Sep 27 01:50:44 2006 -0700 [PATCH] autofs4 needs to force fail return revalidate For a long time now I have had a problem with not being able to return a lookup failure on an existsing directory. In autofs this corresponds to a mount failure on a autofs managed mount entry that is browsable (and so the mount point directory exists). While this problem has been present for a long time I've avoided resolving it because it was not very visible. But now that autofs v5 has "mount and expire on demand" of nested multiple mounts, such as is found when mounting an export list from a server, solving the problem cannot be avoided any longer. I've tried very hard to find a way to do this entirely within the autofs4 module but have not been able to find a satisfactory way to achieve it. So, I need to propose a change to the VFS. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1183dc943cae8b0fddca0b310c26052b2355e04b Author: Jeff Dike Date: Wed Sep 27 01:50:43 2006 -0700 [PATCH] uml: fix allocation size Fix an instance of ptr=alloc(sizeof(ptr)). Grepping showed no more instances of this pattern. Also fixed the formatting in the area. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1b4098d4852f823ecf1abb2d369cb1beb902653 Author: Jeff Dike Date: Wed Sep 27 01:50:42 2006 -0700 [PATCH] uml: fix sleep length bug um_timer shouldn't add local_offset to the host time since get_time already did it. This threw off sleep when a settimeofday or equivalent had happened. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db9d988eaa48fa8d64cf3234a301eb9406b91de1 Author: Jeff Dike Date: Wed Sep 27 01:50:41 2006 -0700 [PATCH] uml: add an export Some modules need strnlen_user_skas. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 995473aec0be1d9993205accc03e19d32d4e4a2a Author: Jeff Dike Date: Wed Sep 27 01:50:40 2006 -0700 [PATCH] uml: file renaming Move some foo_kern.c files to foo.c now that the old foo.c files are out of the way. Also cleaned up some whitespace and an emacs formatting comment. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c9173509985b957bea692ea887a8a0e5055cfe8 Author: Jeff Dike Date: Wed Sep 27 01:50:40 2006 -0700 [PATCH] uml: thread creation tidying fork on UML has always somewhat subtle. The underlying cause has been the need to initialize a stack for the new process. The only portable way to initialize a new stack is to set it as the alternate signal stack and take a signal. The signal handler does whatever initialization is needed and jumps back to the original stack, where the fork processing is finished. The basic context switching mechanism is a jmp_buf for each process. You switch to a new process by longjmping to its jmp_buf. Now that UML has its own implementation of setjmp and longjmp, and I can poke around inside a jmp_buf without fear that libc will change the structure, a much simpler mechanism is possible. The jmpbuf can simply be initialized by hand. This eliminates - the need to set up and remove the alternate signal stack sending and handling a signal the signal blocking needed around the stack switching, since there is no stack switching setting up the jmp_buf needed to jump back to the original stack after the new one is set up In addition, since jmp_buf is now defined by UML, and not by libc, it can be embedded in the thread struct. This makes it unnecessary to have it exist on the stack, where it used to be. It also simplifies interfaces, since the switch jmp_buf used to be a void * inside the thread struct, and functions which took it as an argument needed to define a jmp_buf variable and assign it from the void *. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0915ee38c7db57ff41a7a68bcc02d0dd3b7b849b Author: Jeff Dike Date: Wed Sep 27 01:50:38 2006 -0700 [PATCH] uml: mark some tt-mode code Mark a symbol and file as being tt-mode only. This shrinks the binary slightly when tt mode support is compiled out and makes it easier to identity stuff when tt mode is removed. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e3ccf6e3699c879973b616fe681ecaa363457d41 Author: Jeff Dike Date: Wed Sep 27 01:50:37 2006 -0700 [PATCH] uml: add checkstack support Make checkstack work for UML. We need to pass the underlying architecture name, rather than "um" to checkstack.pl. Signed-off-by: Jeff Dike Acked-by: Matt Mackall Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53dd2b55c50c810073615c79816bc06aea02dba9 Author: Jeff Dike Date: Wed Sep 27 01:50:37 2006 -0700 [PATCH] uml: use correct SIGBUS handler BB noticed that we had the wrong bus error handler. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09b185a3169c5a8f9b7baf97f16d32add7e10ca4 Author: Jeff Dike Date: Wed Sep 27 01:50:36 2006 -0700 [PATCH] uml: fix gcov support Make __bb_init_func weak in order to avoid a link failure with some libcs and/or gccs. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a8b4fc4d7c3ccf80d4fa1805cee85c06c2aa653e Author: Jeff Dike Date: Wed Sep 27 01:50:35 2006 -0700 [PATCH] uml: fix missing x86_64 register definitions The UML/x86_64 headers were missing ptrace support for some segment registers. The underlying problem was that the x86_64 kernel uses user_regs_struct rather than the ptrace register definitions in ptrace. This patch switches UML/x86_64 to using user_regs_struct for its definitions of the host's registers. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0715501bf1d915002d92e34e8a78ea889e5a0049 Author: Jeff Dike Date: Wed Sep 27 01:50:34 2006 -0700 [PATCH] uml: get rid of ZONE_DMA use ZONE_DMA might become dependent on CONFIG_ZONE_DMA, which UML doesn't define (we're still arguing about this) So, let's change ZONE_DMA to ZONE_NORMAL. This is prompted by optional-zone_dma-in-the-vm.patch, but should be harmless on its own. Signed-off-by: Jeff Dike Cc: Christoph Lameter Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e7672ec3f059f764fcc5c78216e24bb16c44dba Author: Jeff Dike Date: Wed Sep 27 01:50:33 2006 -0700 [PATCH] uml: const more data Make lots of structures const in order to make it obvious that they need no locking. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 48af05ed54ddf8dc6eceea4f009e063d7e784b37 Author: Paolo 'Blaisorblade' Giarrusso Date: Wed Sep 27 01:50:31 2006 -0700 [PATCH] uml: fix proc-vs-interrupt context spinlock deadlock This spinlock can be taken on interrupt too, so spin_lock_irq[save] must be used. However, Documentation/networking/netdevices.txt explains we are called with rtnl_lock() held - so we don't need to care about other concurrent opens. Verified also in LDD3 and by direct checking. Also verified that the network layer (through a state machine) guarantees us that nobody will close the interface while it's being used. Please correct me if I'm wrong. Also, we must check we don't sleep with irqs disabled!!! But anyway, this is not news - we already can't sleep while holding a spinlock. Who says this is guaranted really by the present code? Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Jeff Dike Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 06837504de7b4883e92af207dbbab4310d0db0ed Author: Paolo 'Blaisorblade' Giarrusso Date: Wed Sep 27 01:50:27 2006 -0700 [PATCH] uml: use -mcmodel=kernel for x86_64 We have never used this flag and recently one user experienced a complaining warning about this (there was a symbol in the positive half of the address space IIRC). So fix it. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 85f651794c46e8e3faf204a767d1caa7f9f278f0 Author: Hirokazu Takata Date: Wed Sep 27 01:50:24 2006 -0700 [PATCH] m32r: revise __raw_read_trylock() Signed-off-by: Hirokazu Takata Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a27f3113322edff36743014cc9e752a21ffc0324 Author: Hirokazu Takata Date: Wed Sep 27 01:50:24 2006 -0700 [PATCH] m32r: Fix "value computed not used" warnings Fix to remove annoying gcc-4.1 warnings "value computed not used" for m32r; Modify set_mb to cast to void for SMP. Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f269fdd1829acc5e53bf57b145003e5733133f2b Author: David Howells Date: Wed Sep 27 01:50:23 2006 -0700 [PATCH] NOMMU: move the fallback arch_vma_name() to a sensible place Move the fallback arch_vma_name() to a sensible place (kernel/signal.c). Currently it's in fs/proc/task_mmu.c, a file that is dependent on both CONFIG_PROC_FS and CONFIG_MMU being enabled, but it's used from kernel/signal.c from where it is called unconditionally. [akpm@osdl.org: build fix] Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 930e652a21a08986b03d1f370f933057dc0db2dc Author: David Howells Date: Wed Sep 27 01:50:22 2006 -0700 [PATCH] NOMMU: Make futexes work under NOMMU conditions Make futexes work under NOMMU conditions. This can be tested by running this in one shell: #define SYSERROR(X, Y) \ do { if ((long)(X) == -1L) { perror(Y); exit(1); }} while(0) int main() { int shmid, tmp, *f, n; shmid = shmget(23, 4, IPC_CREAT|0666); SYSERROR(shmid, "shmget"); f = shmat(shmid, NULL, 0); SYSERROR(f, "shmat"); n = *f; printf("WAIT: %p{%x}\n", f, n); tmp = futex(f, FUTEX_WAIT, n, NULL, NULL, 0); SYSERROR(tmp, "futex"); printf("WAITED: %d\n", tmp); tmp = shmdt(f); SYSERROR(tmp, "shmdt"); exit(0); } And then this in the other shell: #define SYSERROR(X, Y) \ do { if ((long)(X) == -1L) { perror(Y); exit(1); }} while(0) int main() { int shmid, tmp, *f; shmid = shmget(23, 4, IPC_CREAT|0666); SYSERROR(shmid, "shmget"); f = shmat(shmid, NULL, 0); SYSERROR(f, "shmat"); (*f)++; printf("WAKE: %p{%x}\n", f, *f); tmp = futex(f, FUTEX_WAKE, 1, NULL, NULL, 0); SYSERROR(tmp, "futex"); printf("WOKE: %d\n", tmp); tmp = shmdt(f); SYSERROR(tmp, "shmdt"); exit(0); } The first program will set up a SYSV IPC SHM segment and wait on a futex in it for the number at the start to change. The program will increment that number and wake the first program up. This leads to output of the form: SHELL 1 SHELL 2 ======================= ======================= # /dowait WAIT: 0xc32ac000{0} # /dowake WAKE: 0xc32ac000{1} WAITED: 0 WOKE: 1 Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0112c4c6461fed12ed9bcb249f967bc17a23f6c4 Author: David Howells Date: Wed Sep 27 01:50:21 2006 -0700 [PATCH] NOMMU: Add docs about shared memory Add documentation about using shared memory in NOMMU mode. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6fa5f80bc34da1a49b42117602b44441402cac2f Author: David Howells Date: Wed Sep 27 01:50:21 2006 -0700 [PATCH] NOMMU: Make mremap() partially work for NOMMU kernels Make mremap() partially work for NOMMU kernels. It may resize a VMA provided that it doesn't exceed the size of the slab object in which the storage is allocated that the VMA refers to. Shareable VMAs may not be resized. Moving VMAs (as permitted by MREMAP_MAYMOVE) is not currently supported. This patch also makes use of the fact that the VMA list is now ordered to cut it short when possible. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3034097a5017dd9281b1f795e80af9859627850e Author: David Howells Date: Wed Sep 27 01:50:20 2006 -0700 [PATCH] NOMMU: Order the per-mm_struct VMA list Order the per-mm_struct VMA list by address so that searching it can be cut short when the appropriate address has been exceeded. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dbf8685c8e21404e3a8ed244bd0219d3c4b89101 Author: David Howells Date: Wed Sep 27 01:50:19 2006 -0700 [PATCH] NOMMU: Implement /proc/pid/maps for NOMMU Implement /proc/pid/maps for NOMMU by reading the vm_area_list attached to current->mm->context.vmlist. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d00c7b993712e4bb16d0012b35b654e40159b327 Author: David Howells Date: Wed Sep 27 01:50:19 2006 -0700 [PATCH] NOMMU: Permit ptrace to ignore non-PROT_WRITE VMAs in NOMMU mode Permit ptrace to modify a section that's non-shared but is marked unwritable, such as is obtained by mapping the text segment of an ELF-FDPIC executable binary with into a binary that's being ptraced[*]. [*] Under NOMMU conditions ptrace causes read-only MAP_PRIVATE mmaps to become totally private copies because if a private mapping was actually shared then the debugging setting breakpoints in it would potentially crash other processes. This is done by using the VM_MAYWRITE flag rather than the VM_WRITE flag when deciding whether to permit a write. Without this patch a debugger can't set breakpoints in the mapped text sections of executables that are mapped read-only private, even if the mmap() syscall has taken a private copy because PT_PTRACED is set. In addition, VM_MAYREAD is used instead of VM_READ for similar reasons. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7b4d5b8b39fd3701ed3693a89f2bd8f6ef49bce2 Author: David Howells Date: Wed Sep 27 01:50:18 2006 -0700 [PATCH] NOMMU: Check VMA protections Check the VMA protections in get_user_pages() against what's being asked. This checks to see that we don't accidentally write on a non-writable VMA or permit an I/O mapping VMA to be accessed (which may lack page structs). Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 910e46da4b4e93d56ffea318c64afa41868d5e6d Author: Sonic Zhang Date: Wed Sep 27 01:50:17 2006 -0700 [PATCH] Check if start address is in vma region in NOMMU function get_user_pages() In NOMMU arch, if run "cat /proc/self/mem", data from physical address 0 are read. This behavior is different from MMU arch. In IA32, message "cat: /proc/self/mem: Input/output error" is reported. This issue is rootcaused by not validate the start address in NOMMU function get_user_pages(). Following patch solves this issue. Signed-off-by: Sonic Zhang Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0159b141d8b1f9b9f9cffacae47bec1e05c63b8b Author: David Howells Date: Wed Sep 27 01:50:16 2006 -0700 [PATCH] NOMMU: Use find_vma() rather than reimplementing a VMA search Use find_vma() in the NOMMU version of access_process_vm() rather than reimplementing it. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5da6185bca064e35aa73a7c1f27488d2b96434f4 Author: David Howells Date: Wed Sep 27 01:50:16 2006 -0700 [PATCH] NOMMU: Set BDI capabilities for /dev/mem and /dev/kmem Set the backing device info capabilities for /dev/mem and /dev/kmem to permit direct sharing under no-MMU conditions and full mapping capabilities under MMU conditions. Make the BDI used by these available to all directly mappable character devices. Also comment the capabilities for /dev/zero. [akpm@osdl.org: ifdef reductions] Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ec76a110f432e98277e464b82ace8dd66571689 Author: David Howells Date: Wed Sep 27 01:50:15 2006 -0700 [PATCH] NOMMU: Check that access_process_vm() has a valid target Check that access_process_vm() is accessing a valid mapping in the target process. This limits ptrace() accesses and accesses through /proc//maps to only those regions actually mapped by a program. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 361f6ed1d00f666a1a7c33f3e9aaccb713f9b9e4 Author: Haavard Skinnemoen Date: Wed Sep 27 01:50:14 2006 -0700 [PATCH] AVR32: Use unsigned long flags for saving interrupt state Signed-off-by: Haavard Skinnemoen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d24afc57d51b1be41f95521e81399061fa5875a6 Author: Rolf Eike Beer Date: Wed Sep 27 01:50:13 2006 -0700 [PATCH] Mark __remove_vm_area() static The function is exported but not used from anywhere else. It's also marked as "not for driver use" so noone out there should really care. Signed-off-by: Rolf Eike Beer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ead04089b138ed669658f80fafbe11fc7d97740b Author: Rolf Eike Beer Date: Wed Sep 27 01:50:13 2006 -0700 [PATCH] Fix kerneldoc comments in mm/vmalloc.c The empty line between the short description and the first argument description causes a section to appear twice in the generated manpage. Also the short description should really be short: the script can't handle multiple lines. Signed-off-by: Rolf Eike Beer Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 423b41d773abe443bb546ce91361192073b96f88 Author: Randy Dunlap Date: Wed Sep 27 01:50:12 2006 -0700 [PATCH] mm/page_alloc: use NULL instead of 0 for ptr Use NULL instead of 0 for pointer value, eliminate sparse warnings. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17a3b05047119b7fc72ef03962e202becc659579 Author: Jes Sorensen Date: Wed Sep 27 01:50:11 2006 -0700 [PATCH] mspec driver Implement the special memory driver (mspec) based on the do_no_pfn approach. The driver is currently used only on SN2 hardware with special fetchop support but could be beneficial on other architectures using the uncached mode. Signed-off-by: Jes Sorensen Cc: Hugh Dickins Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4b81804a2d1ab341a4613089dc31ecce0800ed8 Author: Jes Sorensen Date: Wed Sep 27 01:50:10 2006 -0700 [PATCH] do_no_pfn() Implement do_no_pfn() for handling mapping of memory without a struct page backing it. This avoids creating fake page table entries for regions which are not backed by real memory. This feature is used by the MSPEC driver and other users, where it is highly undesirable to have a struct page sitting behind the page (for instance if the page is accessed in cached mode via the struct page in parallel to the the driver accessing it uncached, which can result in data corruption on some architectures, such as ia64). This version uses specific NOPFN_{SIGBUS,OOM} return values, rather than expect all negative pfn values would be an error. It also bugs on cow mappings as this would not work with the VM. [akpm@osdl.org: micro-optimise] Signed-off-by: Jes Sorensen Cc: Hugh Dickins Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d2923436217ba8bd05c5ee157712a391891c382 Author: Christoph Lameter Date: Wed Sep 27 01:50:10 2006 -0700 [PATCH] zone_statistics: Use hot node instead of cold zone_pgdat Now that we have the node in the hot zone of struct zone we can avoid accessing zone_pgdat in zone_statistics. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 66a550308b8e4cbaba185d0326cb05d1bd758101 Author: Christoph Lameter Date: Wed Sep 27 01:50:09 2006 -0700 [PATCH] Do not allocate pagesets for unpopulated zones. We do not need to allocate pagesets for unpopulated zones. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d5f541ed6e31518508c688912e7464facf253c87 Author: Christoph Lameter Date: Wed Sep 27 01:50:08 2006 -0700 [PATCH] Add node to zone for the NUMA case Add the node in order to optimize zone_to_nid. Signed-off-by: Christoph Lameter Acked-by: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 765c4507af71c39aba21006bbd3ec809fe9714ff Author: Christoph Lameter Date: Wed Sep 27 01:50:08 2006 -0700 [PATCH] GFP_THISNODE for the slab allocator This patch insures that the slab node lists in the NUMA case only contain slabs that belong to that specific node. All slab allocations use GFP_THISNODE when calling into the page allocator. If an allocation fails then we fall back in the slab allocator according to the zonelists appropriate for a certain context. This allows a replication of the behavior of alloc_pages and alloc_pages node in the slab layer. Currently allocations requested from the page allocator may be redirected via cpusets to other nodes. This results in remote pages on nodelists and that in turn results in interrupt latency issues during cache draining. Plus the slab is handing out memory as local when it is really remote. Fallback for slab memory allocations will occur within the slab allocator and not in the page allocator. This is necessary in order to be able to use the existing pools of objects on the nodes that we fall back to before adding more pages to a slab. The fallback function insures that the nodes we fall back to obey cpuset restrictions of the current context. We do not allocate objects from outside of the current cpuset context like before. Note that the implementation of locality constraints within the slab allocator requires importing logic from the page allocator. This is a mischmash that is not that great. Other allocators (uncached allocator, vmalloc, huge pages) face similar problems and have similar minimal reimplementations of the basic fallback logic of the page allocator. There is another way of implementing a slab by avoiding per node lists (see modular slab) but this wont work within the existing slab. V1->V2: - Use NUMA_BUILD to avoid #ifdef CONFIG_NUMA - Exploit GFP_THISNODE being 0 in the NON_NUMA case to avoid another #ifdef [akpm@osdl.org: build fix] Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 77f700dab4c05f8ee17584ec869672796d7bcb87 Author: Christoph Lameter Date: Wed Sep 27 01:50:07 2006 -0700 [PATCH] Disable GFP_THISNODE in the non-NUMA case GFP_THISNODE must be set to 0 in the non numa case otherwise we disable retry and warnings for failing allocations in the SMP and UP case. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 08e0f6a9705376732fd3bc9bf8ba97a6b5211eb1 Author: Christoph Lameter Date: Wed Sep 27 01:50:06 2006 -0700 [PATCH] Add NUMA_BUILD definition in kernel.h to avoid #ifdef CONFIG_NUMA The NUMA_BUILD constant is always available and will be set to 1 on NUMA_BUILDs. That way checks valid only under CONFIG_NUMA can easily be done without #ifdef CONFIG_NUMA F.e. if (NUMA_BUILD && ) { ... } [akpm: not a thing we'd normally do, but CONFIG_NUMA is special: it is causing ifdef explosion in core kernel, so let's see if this is a comfortable way in whcih to control that] Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c72419138fa34e1bc1f1c6fa54ee77df55a05ed0 Author: Jes Sorensen Date: Wed Sep 27 01:50:05 2006 -0700 [PATCH] Condense output of show_free_areas() On larger systems, the amount of output dumped on the console when you do SysRq-M is beyond insane. This patch is trying to reduce it somewhat as even with the smaller NUMA systems that have hit the desktop this seems to be a fair thing to do. The philosophy I have taken is as follows: 1) If a zone is empty, don't tell, we don't need yet another line telling us so. The information is available since one can look up the fact how many zones were initialized in the first place. 2) Put as much information on a line is possible, if it can be done in one line, rahter than two, then do it in one. I tried to format the temperature stuff for easy reading. Change show_free_areas() to not print lines for empty zones. If no zone output is printed, the zone is empty. This reduces the number of lines dumped to the console in sysrq on a large system by several thousand lines. Change the zone temperature printouts to use one line per CPU instead of two lines (one hot, one cold). On a 1024 CPU, 1024 node system, this reduces the console output by over a million lines of output. While this is a bigger problem on large NUMA systems, it is also applicable to smaller desktop sized and mid range NUMA systems. Old format: Mem-info: Node 0 DMA per-cpu: cpu 0 hot: high 42, batch 7 used:24 cpu 0 cold: high 14, batch 3 used:1 cpu 1 hot: high 42, batch 7 used:34 cpu 1 cold: high 14, batch 3 used:0 cpu 2 hot: high 42, batch 7 used:0 cpu 2 cold: high 14, batch 3 used:0 cpu 3 hot: high 42, batch 7 used:0 cpu 3 cold: high 14, batch 3 used:0 cpu 4 hot: high 42, batch 7 used:0 cpu 4 cold: high 14, batch 3 used:0 cpu 5 hot: high 42, batch 7 used:0 cpu 5 cold: high 14, batch 3 used:0 cpu 6 hot: high 42, batch 7 used:0 cpu 6 cold: high 14, batch 3 used:0 cpu 7 hot: high 42, batch 7 used:0 cpu 7 cold: high 14, batch 3 used:0 Node 0 DMA32 per-cpu: empty Node 0 Normal per-cpu: empty Node 0 HighMem per-cpu: empty Node 1 DMA per-cpu: [snip] Free pages: 5410688kB (0kB HighMem) Active:9536 inactive:4261 dirty:6 writeback:0 unstable:0 free:338168 slab:1931 mapped:1900 pagetables:208 Node 0 DMA free:1676304kB min:3264kB low:4080kB high:4896kB active:128048kB inactive:61568kB present:1970880kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 0 DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 0 HighMem free:0kB min:512kB low:512kB high:512kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 1 DMA free:1951728kB min:3280kB low:4096kB high:4912kB active:5632kB inactive:1504kB present:1982464kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 .... New format: Mem-info: Node 0 DMA per-cpu: CPU 0: Hot: hi: 42, btch: 7 usd: 41 Cold: hi: 14, btch: 3 usd: 2 CPU 1: Hot: hi: 42, btch: 7 usd: 40 Cold: hi: 14, btch: 3 usd: 1 CPU 2: Hot: hi: 42, btch: 7 usd: 0 Cold: hi: 14, btch: 3 usd: 0 CPU 3: Hot: hi: 42, btch: 7 usd: 0 Cold: hi: 14, btch: 3 usd: 0 CPU 4: Hot: hi: 42, btch: 7 usd: 0 Cold: hi: 14, btch: 3 usd: 0 CPU 5: Hot: hi: 42, btch: 7 usd: 0 Cold: hi: 14, btch: 3 usd: 0 CPU 6: Hot: hi: 42, btch: 7 usd: 0 Cold: hi: 14, btch: 3 usd: 0 CPU 7: Hot: hi: 42, btch: 7 usd: 0 Cold: hi: 14, btch: 3 usd: 0 Node 1 DMA per-cpu: [snip] Free pages: 5411088kB (0kB HighMem) Active:9558 inactive:4233 dirty:6 writeback:0 unstable:0 free:338193 slab:1942 mapped:1918 pagetables:208 Node 0 DMA free:1677648kB min:3264kB low:4080kB high:4896kB active:129296kB inactive:58864kB present:1970880kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 1 DMA free:1948448kB min:3280kB low:4096kB high:4912kB active:6864kB inactive:3536kB present:1982464kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Signed-off-by: Jes Sorensen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit de3083ec3e6bfb1ab60bc8a410f37702529f953c Author: Christoph Lameter Date: Wed Sep 27 01:50:03 2006 -0700 [PATCH] slab: fix kmalloc_node applying memory policies if nodeid == numa_node_id() kmalloc_node() falls back to ___cache_alloc() under certain conditions and at that point memory policies may be applied redirecting the allocation away from the current node. Therefore kmalloc_node(...,numa_node_id()) or kmalloc_node(...,-1) may not return memory from the local node. Fix this by doing the policy check in __cache_alloc() instead of ____cache_alloc(). This version here is a cleanup of Kiran's patch. - Tested on ia64. - Extra material removed. - Consolidate the exit path if alternate_node_alloc() returned an object. [akpm@osdl.org: warning fix] Signed-off-by: Alok N Kataria Signed-off-by: Ravikiran Thirumalai Signed-off-by: Shai Fultheim Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0fd0e6b05aa096622f151cac2f81f2e6844fb1bb Author: Nick Piggin Date: Wed Sep 27 01:50:02 2006 -0700 [PATCH] page invalidation cleanup Clean up the invalidate code, and use a common function to safely remove the page from pagecache. Signed-off-by: Nick Piggin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b99cd0effaf846240a15441aec459a592577eaf Author: Heiko Carstens Date: Wed Sep 27 01:50:01 2006 -0700 [PATCH] own header file for struct page This moves the definition of struct page from mm.h to its own header file page-struct.h. This is a prereq to fix SetPageUptodate which is broken on s390: #define SetPageUptodate(_page) do { struct page *__page = (_page); if (!test_and_set_bit(PG_uptodate, &__page->flags)) page_test_and_clear_dirty(_page); } while (0) _page gets used twice in this macro which can cause subtle bugs. Using __page for the page_test_and_clear_dirty call doesn't work since it causes yet another problem with the page_test_and_clear_dirty macro as well. In order to avoid all these problems caused by macros it seems to be a good idea to get rid of them and convert them to static inline functions. Because of header file include order it's necessary to have a seperate header file for the struct page definition. Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e129b5c23c2b471d47f1c5d2b8b193fc2034af43 Author: Andrew Morton Date: Wed Sep 27 01:50:00 2006 -0700 [PATCH] vm: add per-zone writeout counter The VM is supposed to minimise the number of pages which get written off the LRU (for IO scheduling efficiency, and for high reclaim-success rates). But we don't actually have a clear way of showing how true this is. So add `nr_vmscan_write' to /proc/vmstat and /proc/zoneinfo - the number of pages which have been written by the vm scanner in this zone and globally. Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb01439c5b778d5974a488c5d4fe85e6d0e18a68 Author: Mel Gorman Date: Wed Sep 27 01:49:59 2006 -0700 [PATCH] Allow an arch to expand node boundaries Arch-independent zone-sizing determines the size of a node (pgdat->node_spanned_pages) based on the physical memory that was registered by the architecture. However, when CONFIG_MEMORY_HOTPLUG_RESERVE is set, the architecture expects that the spanned_pages will be much larger and that mem_map will be allocated that is used lated on memory hot-add. This patch allows an architecture that sets CONFIG_MEMORY_HOTPLUG_RESERVE to call push_node_boundaries() which will set the node beginning and end to at *least* the requested boundary. Cc: Dave Hansen Cc: Andy Whitcroft Cc: Andi Kleen Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Keith Mannthey" Cc: "Luck, Tony" Cc: KAMEZAWA Hiroyuki Cc: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9c7cd6877cf8db15269163deda69392263124c1e Author: Mel Gorman Date: Wed Sep 27 01:49:58 2006 -0700 [PATCH] Account for holes that are outside the range of physical memory absent_pages_in_range() made the assumption that users of the API would not care about holes beyound the end of physical memory. This was not the case. This patch will account for ranges outside of physical memory as holes correctly. Cc: Dave Hansen Cc: Andy Whitcroft Cc: Andi Kleen Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Keith Mannthey" Cc: "Luck, Tony" Cc: KAMEZAWA Hiroyuki Cc: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0e0b864e069c52a7b3e4a7da56e29b03a012fd75 Author: Mel Gorman Date: Wed Sep 27 01:49:56 2006 -0700 [PATCH] Account for memmap and optionally the kernel image as holes The x86_64 code accounted for memmap and some portions of the the DMA zone as holes. This was because those areas would never be reclaimed and accounting for them as memory affects min watermarks. This patch will account for the memmap as a memory hole. Architectures may optionally use set_dma_reserve() if they wish to account for a portion of memory in ZONE_DMA as a hole. Signed-off-by: Mel Gorman Cc: Dave Hansen Cc: Andy Whitcroft Cc: Andi Kleen Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Keith Mannthey" Cc: "Luck, Tony" Cc: KAMEZAWA Hiroyuki Cc: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 05e0caad3b7bd0d0fbeff980bca22f186241a501 Author: Mel Gorman Date: Wed Sep 27 01:49:54 2006 -0700 [PATCH] Have ia64 use add_active_range() and free_area_init_nodes Size zones and holes in an architecture independent manner for ia64. [bob.picco@hp.com: fix ia64 FLATMEM+VIRTUAL_MEM_MAP] Signed-off-by: Mel Gorman Signed-off-by: Bob Picco Cc: Dave Hansen Cc: Andy Whitcroft Cc: Andi Kleen Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Keith Mannthey" Cc: "Luck, Tony" Cc: KAMEZAWA Hiroyuki Cc: Yasunori Goto Signed-off-by: Bob Picco Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5cb248abf5ab65ab543b2d5fc16c738b28031fc0 Author: Mel Gorman Date: Wed Sep 27 01:49:52 2006 -0700 [PATCH] Have x86_64 use add_active_range() and free_area_init_nodes Size zones and holes in an architecture independent manner for x86_64. Signed-off-by: Mel Gorman Cc: Dave Hansen Cc: Andy Whitcroft Cc: Andi Kleen Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Keith Mannthey" Cc: "Luck, Tony" Cc: KAMEZAWA Hiroyuki Cc: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4cfee88ad30acc47f02b8b7ba3db8556262dce1e Author: Mel Gorman Date: Wed Sep 27 01:49:51 2006 -0700 [PATCH] Have x86 use add_active_range() and free_area_init_nodes Size zones and holes in an architecture independent manner for x86. [akpm@osdl.org: build fix] Signed-off-by: Mel Gorman Cc: Dave Hansen Cc: Andy Whitcroft Cc: Andi Kleen Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Keith Mannthey" Cc: "Luck, Tony" Cc: KAMEZAWA Hiroyuki Cc: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c67c3cb4c99fb2ee63c8733943c353d745f45b84 Author: Mel Gorman Date: Wed Sep 27 01:49:49 2006 -0700 [PATCH] Have Power use add_active_range() and free_area_init_nodes() Size zones and holes in an architecture independent manner for Power. [judith@osdl.org: build fix] Signed-off-by: Mel Gorman Cc: Dave Hansen Cc: Andy Whitcroft Cc: Andi Kleen Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Keith Mannthey" Cc: "Luck, Tony" Cc: KAMEZAWA Hiroyuki Cc: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c713216deebd95d2b0ab38fef8bb2361c0180c2d Author: Mel Gorman Date: Wed Sep 27 01:49:43 2006 -0700 [PATCH] Introduce mechanism for registering active regions of memory At a basic level, architectures define structures to record where active ranges of page frames are located. Once located, the code to calculate zone sizes and holes in each architecture is very similar. Some of this zone and hole sizing code is difficult to read for no good reason. This set of patches eliminates the similar-looking architecture-specific code. The patches introduce a mechanism where architectures register where the active ranges of page frames are with add_active_range(). When all areas have been discovered, free_area_init_nodes() is called to initialise the pgdat and zones. The zone sizes and holes are then calculated in an architecture independent manner. Patch 1 introduces the mechanism for registering and initialising PFN ranges Patch 2 changes ppc to use the mechanism - 139 arch-specific LOC removed Patch 3 changes x86 to use the mechanism - 136 arch-specific LOC removed Patch 4 changes x86_64 to use the mechanism - 74 arch-specific LOC removed Patch 5 changes ia64 to use the mechanism - 52 arch-specific LOC removed Patch 6 accounts for mem_map as a memory hole as the pages are not reclaimable. It adjusts the watermarks slightly Tony Luck has successfully tested for ia64 on Itanium with tiger_defconfig, gensparse_defconfig and defconfig. Bob Picco has also tested and debugged on IA64. Jack Steiner successfully boot tested on a mammoth SGI IA64-based machine. These were on patches against 2.6.17-rc1 and release 3 of these patches but there have been no ia64-changes since release 3. There are differences in the zone sizes for x86_64 as the arch-specific code for x86_64 accounts the kernel image and the starting mem_maps as memory holes but the architecture-independent code accounts the memory as present. The big benefit of this set of patches is a sizable reduction of architecture-specific code, some of which is very hairy. There should be a greater reduction when other architectures use the same mechanisms for zone and hole sizing but I lack the hardware to test on. Additional credit; Dave Hansen for the initial suggestion and comments on early patches Andy Whitcroft for reviewing early versions and catching numerous errors Tony Luck for testing and debugging on IA64 Bob Picco for fixing bugs related to pfn registration, reviewing a number of patch revisions, providing a number of suggestions on future direction and testing heavily Jack Steiner and Robin Holt for testing on IA64 and clarifying issues related to memory holes Yasunori for testing on IA64 Andi Kleen for reviewing and feeding back about x86_64 Christian Kujau for providing valuable information related to ACPI problems on x86_64 and testing potential fixes This patch: Define the structure to represent an active range of page frames within a node in an architecture independent manner. Architectures are expected to register active ranges of PFNs using add_active_range(nid, start_pfn, end_pfn) and call free_area_init_nodes() passing the PFNs of the end of each zone. Signed-off-by: Mel Gorman Signed-off-by: Bob Picco Cc: Dave Hansen Cc: Andy Whitcroft Cc: Andi Kleen Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Keith Mannthey" Cc: "Luck, Tony" Cc: KAMEZAWA Hiroyuki Cc: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2bd0cfbde2c0a74e209acbf045f1298cc2f61e01 Author: Andrew Morton Date: Wed Sep 27 01:49:42 2006 -0700 [PATCH] fix x86_64-mm-spinlock-cleanup We need processor.h for cpu_relax(). Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 133d205a18b7a4d8cb52959c5310f6664277cf61 Author: Alexey Dobriyan Date: Wed Sep 27 01:49:41 2006 -0700 [PATCH] Make kmem_cache_destroy() return void un-, de-, -free, -destroy, -exit, etc functions should in general return void. Also, There is very little, say, filesystem driver code can do upon failed kmem_cache_destroy(). If it will be decided to BUG in this case, BUG should be put in generic code, instead. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a1d92c10dd24bbdc28b3d6e2d03ec199dd3a65b Author: Alexey Dobriyan Date: Wed Sep 27 01:49:40 2006 -0700 [PATCH] Really ignore kmem_cache_destroy return value * Rougly half of callers already do it by not checking return value * Code in drivers/acpi/osl.c does the following to be sure: (void)kmem_cache_destroy(cache); * Those who check it printk something, however, slab_error already printed the name of failed cache. * XFS BUGs on failed kmem_cache_destroy which is not the decision low-level filesystem driver should make. Converted to ignore. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f52720ca5f48574e347dff35ffe6b389ace61537 Author: Panagiotis Issaris Date: Wed Sep 27 01:49:39 2006 -0700 [PATCH] fs: Removing useless casts * Removing useless casts * Removing useless wrapper * Conversion from kmalloc+memset to kzalloc Signed-off-by: Panagiotis Issaris Acked-by: Dave Kleikamp Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f8314dc60ccba7e41f425048c4160dc7f63377d5 Author: Panagiotis Issaris Date: Wed Sep 27 01:49:37 2006 -0700 [PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc Conversions from kmalloc+memset to kzalloc. Signed-off-by: Panagiotis Issaris Jffs2-bit-acked-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 32c2d2bc4bed61323f14f2a7d69ccbd567253d8a Author: Eric Sandeen Date: Wed Sep 27 01:49:36 2006 -0700 [PATCH] more ext3 16T overflow fixes Some of the changes in balloc.c are just cosmetic, as Andreas pointed out - if they overflow they'll then underflow and things are fine. 5th hunk actually fixes an overflow problem. Also check for potential overflows in inode & block counts when resizing. Signed-off-by: Eric Sandeen Cc: Mingming Cao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4e4de36dc446b2193bdc8ebb96a96e44b69dd94 Author: Dave Kleikamp Date: Wed Sep 27 01:49:36 2006 -0700 [PATCH] ext3: Fix sparse warnings Fixing up some endian-ness warnings in preparation to clone ext4 from ext3. Signed-off-by: Dave Kleikamp Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e9ad5620bfb901df8a7a2603c88689ededeecaf1 Author: Dave Kleikamp Date: Wed Sep 27 01:49:35 2006 -0700 [PATCH] ext3: More whitespace cleanups More white space cleanups in preparation of cloning ext4 from ext3. Removing spaces that precede a tab. Signed-off-by: Dave Kleikamp Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7543fc7b3abfee8c6cd6349ebd5e5fde02fac984 Author: Vasily Averin Date: Wed Sep 27 01:49:33 2006 -0700 [PATCH] ext3: wrong error behavior SWsoft Virtuozzo/OpenVZ Linux kernel team has discovered that ext3 error behavior was broken in linux kernels since 2.5.x versions by the following patch: 2002/10/31 02:15:26-05:00 tytso@snap.thunk.org Default mount options from superblock for ext2/3 filesystems http://linux.bkbits.net:8080/linux-2.6/gnupatch@3dc0d88eKbV9ivV4ptRNM8fBuA3JBQ In case ext3 file system is mounted with errors=continue (EXT3_ERRORS_CONTINUE) errors should be ignored when possible. However at present in case of any error kernel aborts journal and remounts filesystem to read-only. Such behavior was hit number of times and noted to differ from that of 2.4.x kernels. This patch fixes this: - do nothing in case of EXT3_ERRORS_CONTINUE, - set EXT3_MOUNT_ABORT and call journal_abort() in all other cases - panic() should be called after ext3_commit_super() to save sb marked as EXT3_ERROR_FS Signed-off-by: Vasily Averin Acked-by: Kirill Korotaev Cc: Theodore Ts'o Cc: "Stephen C. Tweedie" Cc: Mingming Cao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36faadc144477b4929c8fe60b8053f4472eeb3d2 Author: Mingming Cao Date: Wed Sep 27 01:49:32 2006 -0700 [PATCH] ext3: more comments about block allocation/reservation code Signed-off-by: Mingming Cao Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 321fb9e81821a81b2cda1328698b0c19d57c717f Author: Mingming Cao Date: Wed Sep 27 01:49:32 2006 -0700 [PATCH] ext3: turn on reservation dump on block allocation errors In the past there were a few kernel panics related to block reservation tree operations failure (insert/remove etc). It would be very useful to get the block allocation reservation map info when such error happens. Signed-off-by: Mingming Cao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 37ed322290eb6d5cf2ab33915793ed4219eae1d6 Author: Eric Sandeen Date: Wed Sep 27 01:49:31 2006 -0700 [PATCH] JBD: 16T fixes These are a few places I've found in jbd that look like they may not be 16T-safe, or consistent with the use of unsigned longs for block containers. Problems here would be somewhat hard to hit, would require journal blocks past the 8T boundary, which would not be terribly common. Still, should fix. (some of these have come from the ext4 work on jbd as well). I think there's one more possibility that the wrap() function may not be safe IF your last block in the journal butts right up against the 232 block boundary, but that seems like a VERY remote possibility, and I'm not worrying about it at this point. Signed-off-by: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eee194e76c681dbdbf5024b889fda1181b66ef57 Author: Eric Sandeen Date: Wed Sep 27 01:49:30 2006 -0700 [PATCH] ext3: inode numbers are unsigned long This is primarily format string fixes, with changes to ialloc.c where large inode counts could overflow, and also pass around journal_inum as an unsigned long, just to be pedantic about it.... Signed-off-by: Eric Sandeen Cc: Mingming Cao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 41f04d852e359582518f950d12b2287766613022 Author: Eric Sandeen Date: Wed Sep 27 01:49:30 2006 -0700 [PATCH] ext2: fix mounts at 16T Signed-off-by: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 855565e81ad8940cc645b5110ec2c7f124a76d23 Author: Eric Sandeen Date: Wed Sep 27 01:49:29 2006 -0700 [PATCH] fix ext3 mounts at 16T I need to do some actual IO testing now, but this gets things mounting for a 16T ext3 filesystem. (patched up e2fsprogs is needed too, I'll send that off the kernel list) This patch fixes these issues in the kernel: o sbi->s_groups_count overflows in ext3_fill_super() sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) - le32_to_cpu(es->s_first_data_block) + EXT3_BLOCKS_PER_GROUP(sb) - 1) / EXT3_BLOCKS_PER_GROUP(sb); at 16T, s_blocks_count is already maxed out; adding EXT3_BLOCKS_PER_GROUP(sb) overflows it and groups_count comes out to 0. Not really what we want, and causes a failed mount. Feel free to check my math (actually, please do!), but changing it this way should work & avoid the overflow: (A + B - 1)/B changed to: ((A - 1)/B) + 1 o ext3_check_descriptors() overflows range checks ext3_check_descriptors() iterates over all block groups making sure that various bits are within the right block ranges... on the last pass through, it is checking the error case [item] >= block + EXT3_BLOCKS_PER_GROUP(sb) where "block" is the first block in the last block group. The last block in this group (and the last one that will fit in 32 bits) is block + EXT3_BLOCKS_PER_GROUP(sb)- 1. block + EXT3_BLOCKS_PER_GROUP(sb) wraps back around to 0. so, make things clearer with "first_block" and "last_block" where those are first and last, inclusive, and use <, > rather than <, >=. Finally, the last block group may be smaller than the rest, so account for this on the last pass through: last_block = sb->s_blocks_count - 1; (a similar patch could be done for ext2; does anyone in their right mind use ext2 at 16T? I'll send an ext2 patch doing the same thing if that's warranted) Signed-off-by: Eric Sandeen Cc: Mingming Cao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2aed3484695ecb03f1395bb62f1099e8b0826124 Author: Alexey Dobriyan Date: Wed Sep 27 01:49:28 2006 -0700 [PATCH] jbd: use BUILD_BUG_ON in journal init Signed-off-by: Alexey Dobriyan Acked-by: Stephen Tweedie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae6ddcc5f24d6b06ae9231dc128904750a4155e0 Author: Mingming Cao Date: Wed Sep 27 01:49:27 2006 -0700 [PATCH] ext3 and jbd cleanup: remove whitespace Remove whitespace from ext3 and jbd, before we clone ext4. Signed-off-by: Mingming Cao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e7ab8d65055e9b9dfc131d0467cfc5a8368d7ee4 Author: Josh Triplett Date: Wed Sep 27 01:49:26 2006 -0700 [PATCH] jbd: add lock annotation to jbd_sync_bh jbd_sync_bh releases journal->j_list_lock. Add a lock annotation to this function so that sparse can check callers for lock pairing, and so that sparse will not complain about this function since it intentionally uses the lock in this manner. Signed-off-by: Josh Triplett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbf2bef9f50eb119ffadd735eb0966ac8a04f91f Author: KAMEZAWA Hiroyuki Date: Wed Sep 27 01:49:25 2006 -0700 [PATCH] fix "cpu to node relationship fixup: map cpu to node" Fix build error introduced by 3212fe1594e577463bc8601d28aa008f520c3377 Non-NUMA case should be handled. Signed-off-by: KAMEZAWA Hiroyuki Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5beac371af0af47bcbd6819f4c2a0a2721a1735 Author: Russell King Date: Wed Sep 27 16:13:48 2006 +0100 [ARM] do_bad_area() always takes current and current->active_mm Since do_bad_area() always takes the currently active task and (supposed to) take the currently active MM, there's no point passing them to this function. Instead, obtain references to them inside do_bad_area(). Signed-off-by: Russell King commit 80878d6c4ab8611a0edf139a7f8a7a64860b87c9 Author: Russell King Date: Wed Sep 27 15:43:47 2006 +0100 [ARM] Add setup_mm_for_reboot() for nommu Add an empty setup_mm_for_reboot() function for nommu machines. Signed-off-by: Russell King commit 0c668984ddff94f800b37f244d7b21074b04b971 Author: Russell King Date: Wed Sep 27 15:40:28 2006 +0100 [ARM] Rename mm-armv.c to pgd.c mm-armv.c now only contains the pgd allocation/freeing code, so rename it to have a more sensible filename. Signed-off-by: Russell King commit ae8f154129e4d965771c2d6adbe36210b3913d72 Author: Russell King Date: Wed Sep 27 15:38:34 2006 +0100 [ARM] Move rest of MMU setup code from mm-armv.c to mmu.c If we're going to have mmu.c for code which is specific to the MMU machines, we might as well move the other MMU initialisation specific code from mm-armv.c into this new file. This also allows us to make some functions static. Signed-off-by: Russell King commit d111e8f9644aa585c1a7e198d74a4d2682ef1374 Author: Russell King Date: Wed Sep 27 15:27:33 2006 +0100 [ARM] Split ARM MM initialisation for !mmu Move the MMU specific code from init.c into mmu.c, and add nommu fixups to nommu.c Signed-off-by: Russell King commit a09fc446fb6d541281d9559fe7215d7c0d3cc9ce Author: Franck Bui-Huu Date: Fri Aug 11 17:51:53 2006 +0200 [MIPS] setup.c: use early_param() for early command line parsing There's no point to rewrite some logic to parse command line to pass initrd parameters or to declare a user memory area. We could use instead parse_early_param() that does the same thing. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit 1c6fd44d7ed3d105b2eaa29d72b415ca51e40d32 Author: Franck Bui-Huu Date: Fri Aug 11 17:51:52 2006 +0200 [MIPS] setup.c: remove MAXMEM macro It doesn't improve readability. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit 8df32c636e785069ba7d223ceb9b72c182902295 Author: Franck Bui-Huu Date: Fri Aug 11 17:51:51 2006 +0200 [MIPS] setup.c: do not inline functions There's no point to inline any functions in setup.c. Let's GCC doing its job, it's good enough for that now. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit 8ff7bc4808f25e4dd75c3775dba313ddf35277e1 Author: Franck Bui-Huu Date: Fri Aug 11 17:51:50 2006 +0200 [MIPS] setup.c: remove useless includes. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit d2043ca8484d434201816267c0e23c5999df6cfd Author: Franck Bui-Huu Date: Fri Aug 11 17:51:49 2006 +0200 [MIPS] setup.c: move initrd code inside dedicated functions NUMA specific code could rely on them too. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit b6f1f0dea1469e0c956eb89399916d60dd2a3808 Author: Franck Bui-Huu Date: Fri Aug 11 17:51:48 2006 +0200 [MIPS] setup.c: cleanup bootmem_init() This function although doing simple thing is hard to follow. It's mainly due to: - a lot of #ifdef - bad local names - redundant tests So this patch try to address these issues. It also do not use max_pfn global which is marked as an unused exported symbol. As a bonus side, it's now really easy to see what part of the code is for no-numa system. There's also no point to make this function inline. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit b5943182592ba256639a569c7d5305cf60360733 Author: Franck Bui-Huu Date: Fri Aug 18 16:18:09 2006 +0200 [MIPS] get_wchan(): remove uses of mfinfo[64] This array was used to 'cache' some frame info about scheduler functions to speed up get_wchan(). This array was 1Ko size and was only used when CONFIG_KALLSYMS was set but declared for all configs. Rather than make the array statement conditional, this patches removes this array and its uses. Indeed the common case doesn't seem to use this array and get_wchan() is not a critical path anyways. It results in a smaller bss and a smaller/cleaner code: text data bss dec hex filename 2543808 254148 139296 2937252 2cd1a4 vmlinux-new-get-wchan 2544080 254148 143392 2941620 2ce2b4 vmlinux~old Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit 29b376ff10aaea69ee4d93b70d0fbb2ebfd80f4e Author: Franck Bui-Huu Date: Fri Aug 18 16:18:08 2006 +0200 [MIPS] get_frame_info(): null function size means size is unknown This patch adds 2 sanity checks. The first one test that the start address of the function to analyze has been set by the caller. If not return an error since nothing usefull can be done without. The second one checks that the function's size has been set. A null size can happen if CONFIG_KALLSYMS is not set and it means that we don't know the size of the function to analyze. In this case, we make it equal to 128 instructions by default. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit 1fd6909802b837ed5510603846c0ce5938d296a1 Author: Franck Bui-Huu Date: Fri Aug 18 16:18:07 2006 +0200 [MIPS] unwind_stack(): return ra if an exception occured at the first instruction Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit f83b854a1d2d28bc1ed86fec8a80940b59f8d932 Author: Ralf Baechle Date: Tue Sep 26 03:07:22 2006 +0100 [MIPS] Enable tmpfs for anything that possibly runs a full distribution. Signed-off-by: Ralf Baechle commit 36396f3c36b04f79438f87a0fccfa76aa3de6af9 Author: Ralf Baechle Date: Mon Sep 25 15:49:49 2006 +0100 [MIPS] s/__ASSEMBLER__/__ASSEMBLY__/ for clarity sake. Signed-off-by: Ralf Baechle commit e584ade1a6679bfb417620f15951796bed9805d9 Author: Ralf Baechle Date: Sat Sep 23 18:08:36 2006 +0100 [MIPS] Have headers_install install and . Signed-off-by: Ralf Baechle commit ddb1199c4cd74a02d70f4c297373400893d70aa9 Author: Richard Sandiford Date: Sun Sep 17 20:38:39 2006 +0100 [MIPS] fstatat syscall names MIPS is the only port to call its fstatat()-related syscalls "__NR_fstatat". Now I can see why that might be seen as every other port being wrong, but I think for o32, it is at best confusing. __NR_fstat provides a plain (32-bit) stat while __NR_fstatat provides a 64-bit stat. Changing the name to __NR_fstatat64 would make things more explicit, match x86, and make the glibc port slightly easier. The current name is more appropriate for n32 and n64, but it would be appropriate for other 64-bit targets too, and those targets have chosen to call it __NR_newfstatat instead. Using the same name for MIPS would again be more consistent and make the glibc port slightly easier. I'm not wedded to this idea if the current names are preferred, but FWIW... Signed-off-by: Richard Sandiford Signed-off-by: Ralf Baechle commit 63415dbb54fb929a6ea597f2f6b885d570225d90 Author: Richard Sandiford Date: Sun Sep 17 20:30:46 2006 +0100 [MIPS] The o32 fstatat syscall behaves differently on 32 and 64 bit kernels While working on a glibc patch to support the fstatat() functions[1], I noticed that the o32 implementation behaves differently on 32-bit and 64-bit kernels; the former provides a stat64 while the latter provides a plain (o32) stat. I think the former is what's intended, as there is no separate fstatat64. It's also what x86 does. I think this is just a case of a compat too far. [1] I've seen Khem's patch, but I don't think it's right. Signed-off-by: Richard Sandiford Signed-off-by: Ralf Baechle commit d48f1de2d8170814fb64effa320848410c466f95 Author: Ralf Baechle Date: Wed Sep 20 20:56:02 2006 +0100 [MIPS] Remove EV96100 as previously announced. Signed-off-by: Ralf Baechle commit 432bef2a31668a0562e5738eaa59a43854f26567 Author: Ralf Baechle Date: Fri Sep 8 04:16:21 2006 +0200 [MIPS] Replace BARRIER with more appropriate hazard barrier. This is the unchanged part 2 of Chris' hazard cleanup. Signed-off-by: Ralf Baechle commit d7d86aa88a1f3922b85e39edd8a6d6c01e939842 Author: Ralf Baechle Date: Fri Sep 8 04:13:49 2006 +0200 [MIPS] Cleanup hazard handling. Mostly based on patch by Chris Dearman and cleanups from Yoichi. Signed-off-by: Ralf Baechle commit da79e827d4164ba1b961b62774800a8a52a3b6e4 Author: Ralf Baechle Date: Thu Sep 7 02:29:57 2006 +0200 [MIPS] IP27: Delete useless declaration of allocate_irqno(). Signed-off-by: Ralf Baechle commit 9dbd7b9142e95867ee8a56da5d45c72884c107d3 Author: Peter Watkins Date: Wed Aug 23 11:15:49 2006 -0400 [MIPS] Fix USER_PTRS_PER_PGD for 64K page size. The code in pgtable-64.h assumes TASK_SIZE is always bigger than a first level PGDIR_SIZE. This is not the case for 64K pages, where task size is 40 bits (1TB) and a pgd entry can map 42 bits. This leads to USER_PTRS_PER_PGD being zero for 64K pages. Signed-off-by: Peter Watkins Signed-off-by: Ralf Baechle commit 663c3d9009c1a41194b8390abdcea61e3ade1c8f Author: thomas@koeller.dyndns.org Date: Sun Aug 27 13:51:48 2006 +0200 [MIPS] Add configuration variables for RM9xxx processor This patch introduces a number of configuration variables. These allow to specify presence/absence of integrated peripherals found on the MIPS RM9xxx processor family, based on the particular processor model used. Signed-off-by: Thomas Koeller Signed-off-by: Ralf Baechle commit 0c68a9b6a7da0cc9095c117bea573f9058b00fff Author: thomas@koeller.dyndns.org Date: Sun Aug 27 13:54:31 2006 +0200 [MIPS] Move excite_fpga.h to include/asm-mips/mach-excite excite_fpga.h, like all platform headers, really belongs in the platform header directory. Signed-off-by: Thomas Koeller Signed-off-by: Ralf Baechle commit 48712a96e31d11dce6dcb2a886894bd4d8b890f1 Author: thomas@koeller.dyndns.org Date: Sun Aug 27 13:53:16 2006 +0200 [MIPS] Suppress compiler warnings The excite platform exports hardware resources for device drivers to use. Any driver wanting to use these resources will look up them by their names. Since these resources are declared to have static linkage, but are not used in the source file defining them, the compiler used to emit an 'unused' warning, which this patch suppresses. Signed-off-by: Thomas Koeller Signed-off-by: Ralf Baechle commit 6b8aab09309c577318f8484fce401e5c3546bb3b Author: Ralf Baechle Date: Fri Aug 25 12:34:33 2006 +0100 [MIPS] Reformat missformated SMTC bits. Signed-off-by: Ralf Baechle commit 3c70f12bfaec6e1a1c4bfb94aec0c17675bc9310 Author: Atsushi Nemoto Date: Sun Aug 20 00:33:38 2006 +0900 [MIPS] Qemu does not have D-cache aliases Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit bdb37c8d63f9455cd2ea505d62d0d6de221f3c76 Author: Yoichi Yuasa Date: Wed Aug 16 23:10:00 2006 +0900 [MIPS] Remove F_SETSIG and F_GETSIG in favor of the asm-generic definitions. Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit 633fd568c1db825b9eb563681af09260ecee87b6 Author: Ralf Baechle Date: Fri Aug 4 01:49:31 2006 +0100 [MIPS] Move definition of IRIX compat constant into IRIX compat code. Signed-off-by: Ralf Baechle commit 6b3e5f44b56745daad8cd913ccc7bcd9a9ece5ea Author: Yoichi Yuasa Date: Mon Jul 31 23:01:37 2006 +0900 [MIPS] Use common definitions from asm-generic/signal.h Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit a00f6310183e164ad2cfa5f4ec5d8c724ff0f799 Author: Ralf Baechle Date: Tue Aug 1 23:39:42 2006 +0100 [MIPS] c-r4k: Convert init functions from inline to __init. With more recent compilers inline doesn't necessarily means a function will always be inlined. So leave that decission to the compiler and make the function as __init. Signed-off-by: Ralf Baechle commit 06be375b9ae237b295648980e8a52048ab640f92 Author: Ralf Baechle Date: Tue Sep 19 17:18:53 2006 +0100 [MIPS] TLS: set_thread_area returns asmlinkage int not void. Signed-off-by: Ralf Baechle commit 717736d4d73f8966fcc9802732f52f9e85830247 Author: Ralf Baechle Date: Tue Sep 19 17:16:56 2006 +0100 [MIPS] TLS: Delete unused sys32_set_thread_area There is no need for a compat version. Signed-off-by: Ralf Baechle commit 00932ba3052a84ed73fab34ff1ec5a413b77fbab Author: Ralf Baechle Date: Sat Sep 16 01:29:37 2006 +0100 [MIPS] Make PROT_WRITE imply PROT_READ. commit fc095a902181b72ce77a10feb7b36ba1cbacd736 Author: Maciej W. Rozycki Date: Tue Sep 12 19:12:18 2006 +0100 [MIPS] Atlas: update interrupt handling The following change updates the Atlas interrupt handling to match that of Malta. Tested with a 5Kc and a 34Kf successfully. Signed-off-by: Maciej W. Rozycki Signed-off-by: Ralf Baechle commit 3ee24e1b1e0b5ae413a85ba63677a7110915e3af Author: Maciej W. Rozycki Date: Tue Sep 12 19:02:44 2006 +0100 [MIPS] Atlas: Fix building the RTC driver Atlas maps its RTC chip in the host mmio space rather than using the "traditional" location in the PCI/ISA port space. A change that has happened to the generic RTC header requires to define ARCH_RTC_LOCATION now. Signed-off-by: Maciej W. Rozycki Signed-off-by: Ralf Baechle commit 846acaa2b4974ae2e28038d024dedcfc184efbb7 Author: Kevin D. Kissell Date: Tue Sep 12 12:08:08 2006 +0200 [MIPS] Patch to arch/mips/mips-boards/generic/time.c In hooking up the perf counter overflow interrupt to the experimental deprecated-real-soon-now /proc/perf interface last night, I had to revisit arch/mips/mips-boards/generic/time.c, and discovered that when the 2.6.9-based SMTC prototype was merged with the more recent tree, it was missed that arch/mips/kernel/time.c had changed so that even in SMP kernels, timer_interrupt() calls local_timer_interrupt(), so there is no longer a need to invoke it directly from mips_timer_interrupt() in those cases where timer_interrupt() has been called. So I got rid of that, and added the invocation of perf_irq() if Cause.PCI is set, more-or-less following the same logic as in the non-SMTC case, with the modifications that (a) a runtime check for Release 2 isn't done, because it's redundant in SMTC), and (b) we check for a clock interrupt regardless of the value returned by the perf counter service - I don't understand why we'd want to control that with perf_irq(), but maybe one of you knows the story. I also got rid of the stupid warning about the unused variable when compiled for SMTC (another artifact of the merge). The result hasn't been beaten to death, but boots, seems stable, and supports extended precision event counting. Signed-off-by: Kevin D. Kissell Signed-off-by: Ralf Baechle commit 60a6c3777ec607c5b19df9eac35088db4e142a6b Author: Atsushi Nemoto Date: Thu Jun 8 01:09:01 2006 +0900 [MIPS] Reduce race between cpu_wait() and need_resched() checking If a thread became runnable between need_resched() and the WAIT instruction, switching to the thread will delay until a next interrupt. Some CPUs can execute the WAIT instruction with interrupt disabled, so we can get rid of this race on them (at least UP case). Original Patch by Atsushi with fixing up for MIPS Technology's cores by Ralf based on feedback from the RTL designers. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit 7fdeb048141b363a23b8cf6f6a226d74aca4d724 Author: Atsushi Nemoto Date: Wed Sep 6 22:42:02 2006 +0900 [MIPS] Wire up set_robust_list(2) and get_robust_list(2) Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit 8f9a2b324644d3f8c233287f0a7764d61655cda4 Author: Atsushi Nemoto Date: Thu Sep 7 01:00:22 2006 +0900 [MIPS] Fix errors detected by "make headers_check" * export asm/sgidefs.h * include asm/isadep.h only if in kernel * do not export contents of asm/timex.h and asm/user.h Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit d34555fb20e7abf33f86d7aa3ec0826343f38256 Author: Ralf Baechle Date: Thu Aug 31 19:39:09 2006 +0100 [MIPS] Do not lose upper 32-bit on MIPS32 with 64-bit addresses in __pte(). Signed-off-by: Ralf Baechle commit 65316fd13ad9d82560edbad0a940d684380f7461 Author: Ralf Baechle Date: Thu Aug 31 14:16:06 2006 +0100 [MIPS] Replace generic__raw_read_trylock usage generic__raw_read_trylock() is a defect generic function actually doing a __raw_read_lock ... Signed-off-by: Ralf Baechle commit 09f451bfb9fe5ceea763a9ebd6ec73dd05e4faf8 Author: Maciej W. Rozycki Date: Wed Aug 30 14:29:57 2006 +0100 [MIPS] SEAD defconfig build fix Signed-off-by: Maciej W. Rozycki Signed-off-by: Ralf Baechle commit 32136568a9828c27c07eedb8d2b3e3d9fe8d87ba Author: Alexander Bigga Date: Tue Aug 29 16:48:34 2006 +0200 [MIPS] Fix for pci config_access on alchemy au1x000 I've encountered a serious problem with PCI config space access on Au1x000 platforms with recent 2.6.x-kernel. With 2.4.31 the same hardware works fine. So I was looking for the differences: Symptoms: - no PCI-device is seen on bootup though two or three cards are present - lspci output is empty - OR: lspci shows 20 times the same device (- OR: in some slot-configurations it worked anyhow) System(s): 1. platform with Au1500 and three PCI-devices (actually a mycable XXS1500 with backplane for three PCI-devices) 2. platform with Au1550 and two PCI-devices (custom board) Debugging: I digged down to the config_access() of the au1xxx-processors in arch/mips/pci/ops-au1000.c and switched on DEBUG. The code of config_access() seems to be almost the same as of the 2.4.x-kernel. But the "pci_cfg_vm->addr" returned by get_vm_area(0x2000, 0) once on booting is different. That's of course not forbidden. But the alignment seems to be wrong. In my case, I received: 2.4.31: pci_cfg_vm->addr = c0000000 2.6.18-rc5: pci_cfg_vm->addr = c0101000 To make it short: With 2.6.x it fails on the first config-access with: "PCI ERR detected: status 83a00356". Fixup: My fix is now, to use the VM_IOREMAP-flag in the get_vm_area call. This flag seems to be introduced in mm/vmalloc.c a long time ago (in 2.6.7-bk13, I found in gitweb). Now, the returned address is pci_cfg_vm->addr = c0104000 and everything works fine. Signed-off-by: Ralf Baechle commit 898d229107f7aa8ea45685c11e2930783755f9ba Author: Atsushi Nemoto Date: Tue Aug 29 12:10:22 2006 +0900 [MIPS] Make prepare_frametrace() not clobber v0 Since lmo commit 323a380bf9e1a1679a774a2b053e3c1f2aa3f179 ("Simplify dump_stack()") made prepare_frametrace() always inlined, using $2 (v0) in __asm__ is not safe anymore. We can use $1 (at) instead. Also we should use "dla" instead of "la" for 64-bit kernel. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit f6502791d780b22fc147150137704a07a05ba361 Author: Atsushi Nemoto Date: Fri Aug 25 17:55:31 2006 +0900 [MIPS] Do not use drop_mmu_context to flusing other task's VIPT I-cache. c-r4k.c and c-sb1.c use drop_mmu_context() to flush virtually tagged I-caches, but this does not work for flushing other task's icache. This is for example triggered by copy_to_user_page() called from ptrace(2). Use indexed flush for such cases. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit a94d702049569401c65b579d0751ce282f962b41 Author: Elizabeth Oldham Date: Thu Aug 17 12:39:21 2006 +0100 [MIPS] MT: Fix setting of XTC. XTC can only be set if VPA is clear, which it may not be. There is also the possibility of a back to back c0 register access hazard to take care of. Signed-off-by: Ralf Baechle commit 6e74bae9a0c2fc59ffb0e25fec074b4ac0ac7048 Author: Ralf Baechle Date: Wed Aug 16 14:05:11 2006 +0100 [MIPS] SMTC Build fix. Signed-off-by: Ralf Baechle commit dc41fb43966ae1318fe34a8e5f959924a7c05d81 Author: Ralf Baechle Date: Wed Aug 16 00:59:40 2006 +0100 [MIPS] Fix 32-bit kernel by replacing 64-bit-only code. dclz() expects its 64-bit argument being passed as a single register but on 32-bit kernels it'll actually be in a register pair. Signed-off-by: Ralf Baechle commit 73b76c78fdf3a25faecbffb52c925950d46152b6 Author: Ralf Baechle Date: Tue Aug 15 19:36:40 2006 +0100 [MIPS] MT: When doing "select SMP" also select SMP's prerequesites or ... ... kconfig will do weird stuff. Signed-off-by: Ralf Baechle commit c487d2a5a03163a1e0bd35ea72f7e5a6bd8b0d56 Author: Ralf Baechle Date: Sat Aug 12 22:56:03 2006 +0100 [MIPS] eXcite: Don't set SERIAL_RM9000. The driver has not been merged yet so selecting it results in a warning message. Signed-off-by: Ralf Baechle commit 585fa72493edd7d5acb308806e7bb609412c6228 Author: Ralf Baechle Date: Sat Aug 12 16:40:08 2006 +0100 [MIPS] Retire flush_icache_page from mm use. On the 34K the redundant cache operations were causing excessive stalls resulting in realtime code running on the second VPE missing its deadline. For all other platforms this patch is just a significant performance improvment as illustrated by below benchmark numbers. Processor, Processes - times in microseconds - smaller is better ------------------------------------------------------------------------------ Host OS Mhz null null open slct sig sig fork exec sh call I/O stat clos TCP inst hndl proc proc proc --------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 25Kf 2.6.18-rc4 533 0.49 1.16 7.57 33.4 30.5 1.34 12.4 5497 17.K 54.K 25Kf 2.6.18-rc4-p 533 0.49 1.16 6.68 23.0 30.7 1.36 8.55 5030 16.K 48.K 4Kc 2.6.18-rc4 80 4.21 15.0 131. 289. 261. 16.5 258. 18.K 70.K 227K 4Kc 2.6.18-rc4-p 80 4.34 13.1 128. 285. 262. 18.2 258. 12.K 52.K 176K 34Kc 2.6.18-rc4 40 5.01 14.0 61.6 90.0 477. 17.9 94.7 29.K 108K 342K 34Kc 2.6.18-rc4-p 40 4.98 13.9 61.2 89.7 475. 17.6 93.7 8758 44.K 158K BCM1480 2.6.18-rc4 700 0.28 0.60 3.68 5.92 16.0 0.78 5.08 931. 3163 15.K BCM1480 2.6.18-rc4-p 700 0.28 0.61 3.65 5.85 16.0 0.79 5.20 395. 1464 8385 TX49-16K 2.6.18-rc3 197 0.73 2.41 19.0 37.8 82.9 2.94 17.5 4438 14.K 56.K TX49-16K 2.6.18-rc3-p 197 0.73 2.40 19.9 36.3 82.9 2.94 23.4 2577 9103 38.K TX49-32K 2.6.18-rc3 396 0.36 1.19 6.80 11.8 41.0 1.46 8.17 2738 8465 32.K TX49-32K 2.6.18-rc3-p 396 0.36 1.19 6.82 10.2 41.0 1.46 8.18 1330 4638 18.K Original patch by me with enhancements by Atsushi Nemoto. Signed-off-by: Ralf Baechle Signed-off-by: Atsushi Nemoto commit 13fdd31abec5f48cf97693bd14d2e11e0779b4ca Author: Ralf Baechle Date: Tue Aug 8 03:47:01 2006 +0100 [MIPS] Avoid double signal restarting. In entry.S resume_userspace ... jal do_notify_resume form a loop through which the kernel will iterate as long as work is pending. If we iterate through this loop more than once with no signal pending for at least one but the last iteration we will take do the syscall restarting multiple times resulting in a syscall return prior to the the syscall instruction in userspace. This may happen when debugging a multithreaded program. Debugging and original fix by Maciej; extended to other ABIs by me. Signed-off-by: Maciej W. Rozycki Signed-off-by: Ralf Baechle commit 847b9dfccad7dd34b2e44b1c6ceeb1c4cb88084a Author: Chris Dearman Date: Mon Aug 7 15:08:01 2006 +0100 [MIPS] MT: Initialise all writable bits in Cause register to zero. Recent 34Ks come out of reset with WP enabled on VPE 1 so we take an immediate exception when starting the second VPE. Signed-off-by: Chris Dearman Signed-off-by: Ralf Baechle commit bca70d24c09b740d6fd96b972011644cba8383d6 Author: Yoichi Yuasa Date: Mon Jul 31 23:05:04 2006 +0900 [MIPS] Fix EV64120 PCI fixup in Makefile Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit 45887e12f21780f00b861fdaff8e9d02a42eeb0f Author: Ralf Baechle Date: Thu Aug 3 21:54:13 2006 +0100 [MIPS] Add missing returns in signal code. Signed-off-by: Ralf Baechle commit 1b223c861fd98080c2483f196b2496ac1f06f308 Author: Ralf Baechle Date: Thu Aug 3 21:53:10 2006 +0100 [MIPS] IRIX: Crapectopy. Signed-off-by: Ralf Baechle commit 048c6140c0f5d0bb1af8308c91dfa560ac65a296 Author: Ralf Baechle Date: Thu Aug 3 19:36:37 2006 +0100 [MIPS] Don't call try_to_freeze in do_signal & co. Signed-off-by: Ralf Baechle commit b4b30a5a0a270e6b3fef88373ad35d235a047fc1 Author: Ralf Baechle Date: Thu Aug 3 17:34:24 2006 +0100 [MIPS] Cleanup leftovers of ARCH_HAS_IRQ_PER_CPU CONFIG_IRQ_PER_CPU now controls the IRQ_PER_CPU stuff. Signed-off-by: Ralf Baechle commit 4d157d5eac29d7d5559fdcabf20f3961bc5cb3e7 Author: Franck Bui-Huu Date: Thu Aug 3 09:29:21 2006 +0200 [MIPS] Improve unwind_stack() This patch allows unwind_stack() to return ra for leaf function. But it tries to detects cases where get_frame_info() wrongly consider nested function as a leaf one. It also pass 'unsinged long *sp' instead of 'unsigned long **sp' as second parameter. The code looks cleaner. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit 0cceb4aa9acf6192a5f02134e764b1feeea8b9de Author: Franck Bui-Huu Date: Thu Aug 3 09:29:20 2006 +0200 [MIPS] Make get_frame_info() more robust Now get_frame_info() wants to detect move sp instruction first. It assumes that the save ra in the stack instruction can't happen before allocating frame size space into the stack. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit 1666a6fc73f724cdc6bd7d699f9ada4b04953efe Author: Franck Bui-Huu Date: Thu Aug 3 09:29:19 2006 +0200 [MIPS] Simplify dump_stack() Make dump_stack() code not depend on CONFIG_KALLSYMS. It also make prepare_frametrace() always inlined to get less false entries reported by show_raw_backtrace(). Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit 6057a7987608941a203f40f8b53513af433d8d2f Author: Franck Bui-Huu Date: Thu Aug 3 09:29:18 2006 +0200 [MIPS] Make frame_info_init() more readable. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit 87151ae39bf5556abe83d69af0be9580c32c501b Author: Franck Bui-Huu Date: Thu Aug 3 09:29:17 2006 +0200 [MIPS] Miscellaneous cleanup in prologue analysis code We usually use backtrace term for dumping a call tree during debug. Therefore this patch renames show_frametrace() into show_backtrace() and show_trace() into show_raw_backtrace(). It also uses the new function print_ip_sym(). Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit cf495a333093a1c0eca90c7d8d98313a3b7f01a1 Author: Franck Bui-Huu Date: Thu Aug 3 09:29:16 2006 +0200 [MIPS] Remove unused MODULE_RANGE macro. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit c0efbb6dc2726785482d85a284c883d541a6e0be Author: Franck Bui-Huu Date: Thu Aug 3 09:29:15 2006 +0200 [MIPS] Make get_frame_info() more readable. Signed-off-by: Atsushi Nemoto Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle commit df586d59a4f069bb60a94ff4e5b64fe5c876f72c Author: Ralf Baechle Date: Tue Aug 1 23:42:30 2006 +0100 [MIPS] c-r4k: Typo fix. Signed-off-by: Ralf Baechle commit 1b4ee40a1330cad05e1cf65b60d8c82732bcafba Author: Peter Watkins Date: Thu Jul 27 16:05:49 2006 -0400 [MIPS] N32 rt_sigqueueinfo uses O32 padding, not N64 Signed-off-by: Ralf Baechle commit f66686f70a2a61e53ee8c2284f75ca342e4c0dc8 Author: Atsushi Nemoto Date: Sat Jul 29 23:27:20 2006 +0900 [MIPS] dump_stack() based on prologue code analysis Instead of dump all possible address in the stack, unwind the stack frame based on prologue code analysis, as like as get_wchan() does. While the code analysis might fail for some reason, there is a new kernel option "raw_show_trace" to disable this feature. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit 79495d876c2074af5552a0c4b7aea600c2320e83 Author: Yoichi Yuasa Date: Wed Jul 26 23:34:19 2006 +0900 [MIPS] db1x00: Remove unused mirage_ts.c CONFIG_WM97XX_COMODULE doesn't exist. Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit e889d78fd5775d0b466f570928f5b0f0c9f05355 Author: Atsushi Nemoto Date: Tue Jul 25 23:51:36 2006 +0900 [MIPS] Rearrange show_stack, show_trace Print call-trace in show_stack() (like on other archs). Also make show_trace() static and simplify its argument list. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit e7dee3cea4dcd54744cf68864784c1336a42144f Author: Yoichi Yuasa Date: Tue Jul 25 23:26:09 2006 +0900 [MIPS] Updat mpc30x defconfig Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit bbbdb8567e972f39a377a0bbd10b78b5b1ba4657 Author: Yoichi Yuasa Date: Tue Jul 25 23:24:54 2006 +0900 [MIPS] Updat workpad defconfig Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit 53a73347faa38d3e80b46fc3c1999ee6bfbadbef Author: Yoichi Yuasa Date: Tue Jul 25 23:24:47 2006 +0900 [MIPS] Update e55 defconfig Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle commit d4fd1989ea142be620978dcac2e1b86929f3237a Author: Maxime Bizon Date: Thu Jul 20 18:52:02 2006 +0200 [MIPS] Honour "panic_on_oops" sysctl. Signed-off-by: Maxime Bizon Signed-off-by: Ralf Baechle commit bda3028813bd07f34f30288a492fbf6f7b8712dd Author: Jeff Garzik Date: Wed Sep 27 05:41:13 2006 -0400 [libata] Don't use old-EH ->eng_timeout() hook when not needed The PATA driver set got converted to the new error handling setup, but the old hooks were accidentally left in place. Now, removed. Signed-off-by: Jeff Garzik commit 33573c0e3243aaa38b6ad96942de85a1b713c2ff Author: Paul Mundt Date: Wed Sep 27 18:37:30 2006 +0900 sh: Fix occasional flush_cache_4096() stack corruption. IRQs disabling in flush_cache_4096 for cache purge. Under certain workloads we would get an IRQ in the middle of a purge operation, and the cachelines would remain in an inconsistent state, leading to occasional stack corruption. Signed-off-by: Takeo Takahashi Signed-off-by: Paul Mundt commit f3c2575818fab45f8609e4aef2e43ab02b3a142e Author: Paul Mundt Date: Wed Sep 27 18:36:17 2006 +0900 sh: Calculate shm alignment at runtime. Set the SHM alignment at runtime, based off of probed cache desc. Optimize get_unmapped_area() to only colour align shared mappings. Signed-off-by: Paul Mundt commit 87b0ef91b6f27c07bf7dcce8584437481f473092 Author: Paul Mundt Date: Wed Sep 27 18:34:41 2006 +0900 sh: dma-mapping compile fixes. Silly bug, make it build again.. Signed-off-by: Paul Mundt commit 19f9a34f87c48bbd270d617d1c986d0c23866a1a Author: Paul Mundt Date: Wed Sep 27 18:33:49 2006 +0900 sh: Initial vsyscall page support. This implements initial support for the vsyscall page on SH. At the moment we leave it configurable due to having nommu to support from the same code base. We hook it up for the signal trampoline return at present, with more to be added later, once uClibc catches up. Signed-off-by: Paul Mundt commit 8c12b5dc13bf8516303a8224ab4e9708b33d5b00 Author: Paul Mundt Date: Wed Sep 27 18:31:06 2006 +0900 sh: Clean up PAGE_SIZE definition for assembly use. We want to be able to use PAGE_SIZE all over the place, this is the same approach adopted by other architectures.. Signed-off-by: Paul Mundt commit 28ccf7f91b1ac42ee1f18480a69d2a7486b625ce Author: Paul Mundt Date: Wed Sep 27 18:30:07 2006 +0900 sh: Selective flush_cache_mm() flushing. flush_cache_mm() wraps in to flush_cache_all(), which is rather excessive given that the number of PTEs within the specified context are generally quite low. Optimize for walking the mm's VMA list and selectively flushing the VMA ranges from the dcache. Invalidate the icache only if a VMA sets VM_EXEC. Signed-off-by: Paul Mundt commit d15f456043175bdf3464514b92a825b88d0546ae Author: Paul Mundt Date: Wed Sep 27 18:28:34 2006 +0900 sh: More intelligent entry_mask/way_size calculation. Figure out the cache desc entry_mask at runtime, and remove hard-coded assumption about the cacheline size. Signed-off-by: Paul Mundt commit 72c35543f8cf1316773ffbd9619575bb84ac44fb Author: Paul Mundt Date: Wed Sep 27 18:27:43 2006 +0900 sh: Support for L2 cache on newer SH-4A CPUs. This implements preliminary support for the L2 caches found on newer SH-4A CPUs. Signed-off-by: Paul Mundt commit 9d549a7d8ef71f684a35cf1e438543957cf81d12 Author: Paul Mundt Date: Wed Sep 27 18:26:05 2006 +0900 sh: Update kexec support for API changes. This was falling a bit behind.. Signed-off-by: Paul Mundt commit 05ae91585167410dadd1bc8f2e207a062e638a16 Author: Paul Mundt Date: Wed Sep 27 18:25:24 2006 +0900 sh: Optimized readsl()/writesl() support. Implement optimized copies of readsl()/writesl(). Signed-off-by: Paul Mundt commit 2220d164933a8776d1336c814e3c2e5573256d34 Author: Paul Mundt Date: Wed Sep 27 18:24:28 2006 +0900 sh: Report movli.l/movco.l capabilities. Add llsc to cpu_flags[] and comment cpu-features.h. Signed-off-by: Jamie Lenehan Signed-off-by: Paul Mundt commit 315bb96824149614efe4844ded077a13fc908880 Author: Paul Mundt Date: Wed Sep 27 18:22:53 2006 +0900 sh: CPU flags in AT_HWCAP in ELF auxvt. Encode processor flags in AT_HWCAP in the ELF auxiliary vector. Signed-off-by: Paul Mundt commit a6a31139897a5e539efe7ad3b7bd351fa9673ce8 Author: Paul Mundt Date: Wed Sep 27 18:22:14 2006 +0900 sh: Add support for 4K stacks. This enables support for 4K stacks on SH. Currently this depends on DEBUG_KERNEL, but likely all boards will switch to this as the default in the future. Signed-off-by: Paul Mundt commit 2cb7ce3bb384f30a377f66336c78546b834604df Author: Paul Mundt Date: Wed Sep 27 18:20:58 2006 +0900 sh: Enable /proc/kcore support. This was previously unimplemented.. Signed-off-by: Paul Mundt commit d153ea88dccf003173315b5d21acabebb897fb4a Author: Paul Mundt Date: Wed Sep 27 18:20:16 2006 +0900 sh: stack debugging support. This adds a DEBUG_STACK_USAGE and DEBUG_STACKOVERFLOW for SH. Signed-off-by: Paul Mundt commit 7a440c950efb5cdc8a05cc6c3ec8fc864b60ef77 Author: Paul Mundt Date: Wed Sep 27 18:18:31 2006 +0900 sh: select CONFIG_EMBEDDED. This solution isn't very optimal, but it's generaly the behaviour that we want.. Signed-off-by: Paul Mundt commit 2c7834a6f15fe6c50ed4766f1bb6f9183b9e2740 Author: Paul Mundt Date: Wed Sep 27 18:17:31 2006 +0900 sh: machvec rework. Some more machvec overhauling and setup code cleanup. Kill off get_system_type() and platform_setup(), we can do these both through the machvec. While we're add it, kill off more useless mach.c's and drop some legacy cruft from setup.c. Signed-off-by: Paul Mundt commit 456335e2072fb35bf290b45e61d51916c322c145 Author: Russell King Date: Wed Sep 27 10:00:54 2006 +0100 [ARM] Separate page table manipulation code from bootmem initialisation nommu does not require the page table manipulation code in the bootmem initialisation paths. Move this into separate inline functions. Signed-off-by: Russell King commit bc8fb5d0471473f775378d09db712dcb8eeece75 Author: Paul Mundt Date: Wed Sep 27 18:09:34 2006 +0900 sh: Solution Engine SH7343 board support. This adds support for the SE7343 board. Signed-off-by: Paul Mundt commit 91b91d01416afba8d3f230a62b5d2784bd7af94a Author: Paul Mundt Date: Wed Sep 27 18:08:33 2006 +0900 sh: SH7710VoIPGW board support. This adds support for the SH7710 VoIP Gateway board. Signed-off-by: Paul Mundt commit 49c3f807f5734605c10cdfb462a8fd5c3075eb76 Author: Paul Mundt Date: Wed Sep 27 18:04:36 2006 +0900 sh: Enable verbose BUG() support. Add SH to the list of platforms interested in Verbose BUG(). Signed-off-by: Paul Mundt commit 8599cf059209de22dd3be16816b90f1aad10c74a Author: Paul Mundt Date: Wed Sep 27 18:03:34 2006 +0900 sh: Cleanup IRQ disabling for hardirq handlers. The generic hardirq layer already takes care of a lot of the appropriate locking and disabling for us, no need to duplicate it in the handlers.. Signed-off-by: Paul Mundt commit ba463937ef75bceaf3943edf01f849257c68623a Author: Paul Mundt Date: Wed Sep 27 18:01:16 2006 +0900 sh: maskreg IRQ support. Formerly implemented by ADX, we can use this generically, so move it over. Signed-off-by: Paul Mundt commit 5a4053b23262afefa748e1e4c439931d4c27693b Author: Paul Mundt Date: Wed Sep 27 18:00:19 2006 +0900 sh: Kill off dead boards. None of these have been maintained in years, and no one seems to be interested in doing so, so just get rid of them. Signed-off-by: Paul Mundt commit f118420be83c3ce7888fe1d42db84af495da9edb Author: Paul Mundt Date: Wed Sep 27 17:53:59 2006 +0900 watchdog: Add a simple mmap() stub for shwdt. In some applications people have expressed a need for an mmap() method, so we implement a simple stub for this that maps back a page with the counter in it. Signed-off-by: Paul Mundt commit 781125ca58dfbd47635cfc0e408f1f9d7e10b227 Author: Paul Mundt Date: Wed Sep 27 17:52:19 2006 +0900 sh: New atomic ops for SH-4A movli.l/movco.l SH-4A implements LL/SC instructions, so we implement a simple set of atomic operations using these. Signed-off-by: Paul Mundt commit 15f57a29a19ad0dbb468363cb617b06f71f6de92 Author: Paul Mundt Date: Wed Sep 27 17:51:01 2006 +0900 sh: Add support for cacheline poking through debugfs. A simple debugging aid for easier visibility of the respective cachelines. Signed-off-by: Paul Mundt commit c7afb7e5cbc4baa781ec82731fc9fe9039efee22 Author: Nobuhiro Iwamatsu Date: Wed Sep 27 17:50:03 2006 +0900 sh: Fix memcpy() build error on sh4eb. A trivial bug breaking the build on sh4eb. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Paul Mundt commit 91550f715b7f7707b5ab5b9b0cd455bda8505954 Author: Paul Mundt Date: Wed Sep 27 17:45:01 2006 +0900 sh: Kill off the rest of the legacy rtc mess. With the new RTC class driver, we can get rid of most of the old left over cruft. Signed-off-by: Paul Mundt commit 51e22e7a05c1c6f2e38ac7459d3404e32e543b75 Author: Takashi YOSHII Date: Wed Sep 27 17:41:31 2006 +0900 sh: SHMIN board support. This adds support for the SHMIN SH7706 board. Signed-off-by: Takashi YOSHII Signed-off-by: Paul Mundt commit e5723e0eeb2dc16629e86d66785024ead9169000 Author: Paul Mundt Date: Wed Sep 27 17:38:11 2006 +0900 sh: Add support for SH7706/SH7710/SH7343 CPUs. This adds support for the aforementioned CPU subtypes, and cleans up some build issues encountered as a result. Signed-off-by: Paul Mundt commit c06015148fa9a3cc452ec7121b8c3f59f4a7d6ac Author: Paul Brook Date: Sun Sep 24 16:54:40 2006 +0100 [ARM] 3860/1: Versatile PCI config byte accesses The ARM Versatile board PCI config space read routines are broken for byte accesses. The access uses a byte read, so masking the bottom two bits of the address is wrong. I guess this is a cut/paste error from the the halfword code which uses aligned word access+shift+mask. Signed-off-by: Paul Brook Signed-off-by: Russell King commit 4052ebb7a2729bd7c28260cdf8e470c0d81b9c56 Author: George G. Davis Date: Fri Sep 22 18:36:38 2006 +0100 [ARM] 3859/1: Fix devicemaps_init() XIP_KERNEL odd 1MiB XIP_PHYS_ADDR translation error The ARM XIP_KERNEL map created in devicemaps_init() is wrong. The map.pfn is rounded down to an even 1MiB section boundary which results in va/pa translations errors when XIP_PHYS_ADDR starts on an odd 1MiB boundary and this causes the kernel to hang. This patch fixes ARM XIP_KERNEL translation errors for the odd 1MiB XIP_PHYS_ADDR boundary case. Signed-off-by: George G. Davis Signed-off-by: Russell King commit 4b053e7a320882fbdbc6613cec60a929553b4215 Author: Ben Dooks Date: Fri Sep 22 15:42:18 2006 +0100 [ARM] 3858/1: S3C2412: power management code Add S3C2412 power management code, and move the core register saving in from s3c2412.c Signed-off-by: Ben Dooks Signed-off-by: Russell King commit da56c949261d462452a68cf05bfc645445bee830 Author: David Anders Date: Thu Sep 21 22:57:12 2006 +0100 [ARM] 3854/2: S3C2410 - add machine type for AML M5900 series (resubmitted) Add the AML M5900 series to the list of supported machines in the arch/arm/mach-s3c2410 directory. This ensures the core peripherals are registered, and the timer source is configured. if selected in the kernel config the framebuffer registers and mtd partition information are set. This version of the patch has corrected formatting and removed the legacy procfs directory entry. Signed-off-by: David Anders Signed-off-by: Russell King commit ecd9561687a0952a96a0a705f618e59cb6f3189b Author: Paul Mundt Date: Wed Sep 27 17:32:30 2006 +0900 serial: Add SERIAL_SH_SCI_NR_UARTS for sh-sci. sh-sci needs to be able to define its number of ports to support, we do this with a config option, like most other ports do. Signed-off-by: Paul Mundt commit 7dec62e96b38e6c62490ea5dc6939dd8d680a8b8 Author: Paul Mundt Date: Wed Sep 27 17:30:35 2006 +0900 sh: Add setup code for various CPU subtypes. This adds some simple setup code for most of the CPU subtypes, primarily simple platform device registration. Signed-off-by: Paul Mundt commit 237b98f61d02499ee248ae33cad616d950c15f49 Author: Paul Mundt Date: Wed Sep 27 17:28:20 2006 +0900 sh: sem2mutex conversion for clock framework. Simple sem2mutex conversion. Signed-off-by: Paul Mundt commit 9f23e7e94f7083d9705b595cbd6b30972be6fbbb Author: Paul Mundt Date: Wed Sep 27 17:27:00 2006 +0900 sh: pselect6 and ppoll, along with signal trampoline rework. This implements support for ppoll() and pselect6().. Signed-off-by: Paul Mundt commit a2d1a5fae6296c2a3ac1aaa982c95464c46c0585 Author: Yoshinori Sato Date: Wed Sep 27 17:25:07 2006 +0900 sh: __addr_ok() and other misc nommu fixups. A few more outstanding nommu fixups.. Signed-off-by: Yoshinori Sato Signed-off-by: Paul Mundt commit 0b8929354cdeddb17e81bfda903812c9adfd0b67 Author: Paul Mundt Date: Wed Sep 27 17:22:49 2006 +0900 sh: __NR_restart_syscall support. This implements support for __NR_restart_syscall. Signed-off-by: Paul Mundt commit e96636ccfa373a00a0ee0558e1971baa7856d8b5 Author: Yoshinori Sato Date: Wed Sep 27 17:21:02 2006 +0900 sh: Various nommu fixes. This fixes up some of the various outstanding nommu bugs on SH. Signed-off-by: Yoshinori Sato Signed-off-by: Paul Mundt commit e7f93a355c7e32c26eab8910cf53b7506bb046c5 Author: Paul Mundt Date: Wed Sep 27 17:19:13 2006 +0900 sh: Make PAGE_OFFSET configurable. nommu needs to be able to shift PAGE_OFFSET, so we switch it to a non-user-visible CONFIG_PAGE_OFFSET and use that in the few places where it matters. Signed-off-by: Paul Mundt commit adf1890b0cd63f754b2171b73e4d845c0950d407 Author: Paul Mundt Date: Wed Sep 27 17:17:27 2006 +0900 sh: Move voyagergx_reg.h to a more sensible place. Other boards require this as well, so move it out of the rts7751r2d directory. Signed-off-by: Paul Mundt commit 4b565680d16300acab0ff167e24f0ea289a6bd5d Author: Takashi YOSHII Date: Wed Sep 27 17:15:32 2006 +0900 sh: math-emu support This implements initial math-emu support, aimed primarily at SH-3. Signed-off-by: Takashi YOSHII Signed-off-by: Paul Mundt commit 317a6104a99f87c0b35c0d9f19ec23ee7429b33e Author: Paul Mundt Date: Wed Sep 27 17:13:19 2006 +0900 rtc: New RTC driver for SuperH On-Chip RTC. This replaces the old SH RTC driver, and allows us to clean quite a lot of things up on the board-specific side. Signed-off-by: Paul Mundt commit af514ca7d27b31e3c278e1331f0ebdb3ad385a90 Author: Paul Mundt Date: Wed Sep 27 17:11:32 2006 +0900 sh: Rename rtc_get/set_time() to avoid RTC_CLASS conflict. We have a clash with RTC_CLASS over these names, so we change them.. Signed-off-by: Paul Mundt commit 2991be725260d6fec11691a6138b9d71de949956 Author: Paul Mundt Date: Wed Sep 27 17:07:07 2006 +0900 sh: Fixup __strnlen_user() behaviour. Drop TIF_USERSPACE and add addr_limit to the thread_info struct. Subsequently, use that for address checking in strnlen_user() to ward off bogus -EFAULTs. Make __strnlen_user() return 0 on exception, rather than -EFAULT. Signed-off-by: Paul Mundt commit 0f08f338083cc1d68788ccbccc44bd0502fc57ae Author: Paul Mundt Date: Wed Sep 27 17:03:56 2006 +0900 sh: More cosmetic cleanups and trivial fixes. Nothing exciting here, just trivial fixes.. Signed-off-by: Paul Mundt commit 9e3043c091819729ecf4fc5063d0a2d0954dfd7f Author: Paul Mundt Date: Wed Sep 27 16:55:24 2006 +0900 sh: Fixup TEI IRQ requests in request_dma(). If a channel is not TEI capable, don't try to request_irq().. Signed-off-by: Paul Mundt commit e2d1864da5bfa419a108f42c0615f69432b1b876 Author: Paul Mundt Date: Wed Sep 27 16:53:40 2006 +0900 sh: G2 DMA IRQ and residue sampling. This fixes a long-standing FIXME for G2 DMA, where we finally wire up the IRQ handler and allow for sampling remaining bytes while in-flight. Signed-off-by: Paul Mundt commit ade2b3f6ed199dc4a7a0be53edf20f9399023640 Author: Paul Mundt Date: Wed Sep 27 16:48:46 2006 +0900 sh: VoyagerGX cleanups and 8250 UART support. This adds the VoyagerGX UART to the RTS7751R2D setup code, and cleans up a few build issues. Signed-off-by: Manuel Lauss Signed-off-by: Paul Mundt commit a3e61d50dc82475ebca3ff8b18c174c02c5ff511 Author: Paul Mundt Date: Wed Sep 27 16:45:22 2006 +0900 sh: Inhibit mapping PCI apertures through page tables. Inhibit mapping through page tables in __ioremap() for PCI memory apertures on SH7751 and SH7780-style PCI controllers, translation is not possible for these areas. For other users that map a small window in P1/P2 space, ioremap() traps that already, and should never make it to __ioremap(). Signed-off-by: Paul Mundt commit 959f85f8a3223c116bbe95dd8a9b207790b5d4d3 Author: Paul Mundt Date: Wed Sep 27 16:43:28 2006 +0900 sh: Consolidated SH7751/SH7780 PCI support. This cleans up quite a lot of the PCI mess that we currently have, and attempts to consolidate the duplication in the SH7780 and SH7751 PCI controllers. Signed-off-by: Paul Mundt commit ae1f19aeb715098ac06323f279383f3843429d97 Author: Jeff Garzik Date: Wed Sep 27 03:42:37 2006 -0400 [libata] sata_mv: fix oops by filling in missing hook Only two of three ata_port_operations structs had a ->data_xfer member, which led to, uh, a lack of data xfer. Signed-off-by: Jeff Garzik commit e108b2ca2349f510ce7d7f910eda89f71d710d84 Author: Paul Mundt Date: Wed Sep 27 16:32:13 2006 +0900 serial: Rework sh-sci for driver model. sh-sci was turning in to an unmaintainable mess, especially with regards to the port list. This cleans it up quite a bit, and switches over to a platform device model where subtypes will register their port list individually in their setup code. Signed-off-by: Paul Mundt commit 56e8d7b5786dc2f7d1f701500f8914fd2c52b111 Author: Paul Mundt Date: Wed Sep 27 16:24:55 2006 +0900 sh: kgdb stub cleanups. Some kgdb cleanup. Move hexchars/highhex/lowhex to the header, so it can be reused by sh-sci. Also drop silly ctrl_inl/outl() overloading being done by the kgdb stub. Signed-off-by: Paul Mundt commit 2549b3222f588c188674aed0b9a0ef78bbba5c6c Author: Paul Mundt Date: Wed Sep 27 16:22:33 2006 +0900 sh: Use generic CONFIG_FRAME_POINTER. We had our own version, which serves no purpose. Simply hook SH in to the generic one. Signed-off-by: Paul Mundt commit 3aa770e7972723f479122cf66b529017d2175289 Author: Andriy Skulysh Date: Wed Sep 27 16:20:22 2006 +0900 sh: APM/PM support. This adds some simple PM stubs and the basic APM interfaces, primarily for use by hp6xx, where the existing userland expects it. Signed-off-by: Andriy Skulysh Signed-off-by: Paul Mundt commit ef48e8e3498605351f91f195cc9af0ef981b0dde Author: Paul Mundt Date: Wed Sep 27 16:17:17 2006 +0900 sh: Free up some and document PTEL flags. Drop _PAGE_SHARED/_PAGE_U0_SHARED and document Linux PTE encodings in the PTEL value. Preserve the swap cache entry encoding semantics for now, though it will need rework to free up _PAGE_WT from _PAGE_FILE. Signed-off-by: Paul Mundt commit 801e045860586b6a4ca21b3269d111dfca7ef17b Author: Paul Mundt Date: Wed Sep 27 16:15:48 2006 +0900 sh: Update new-machine.txt so it's more accurate. This fell behind a bit, get it updated so the documentation has something in common with reality. Signed-off-by: Paul Mundt commit a328ff9a7e3109919f59ce1903a31f8b2e6339e5 Author: Paul Mundt Date: Wed Sep 27 16:14:54 2006 +0900 sh: SE73180 updates for IRQ changes. SE73180 can use the generic support, we just need to wire up the IRQ demuxing. Signed-off-by: Paul Mundt commit 848dd265947c976b6340027088c090ff7f0a0b8b Author: Andriy Skulysh Date: Wed Sep 27 16:09:59 2006 +0900 video: Update header location in hp680_bl. Trivial build fix. Signed-off-by: Andriy Skulysh Signed-off-by: Paul Mundt commit ae31825e63e11188d96ad9c4d2d5d4e0fc798a75 Author: Paul Mundt Date: Wed Sep 27 16:08:24 2006 +0900 sh: Make O= builds work again. Some of the paths were a bit broken, fix it up. Signed-off-by: Paul Mundt commit 00b3aa3fc9bd827caaa859de90d9eba831b77d40 Author: Paul Mundt Date: Wed Sep 27 16:05:56 2006 +0900 sh: xchg()/__xchg() always_inline fixes for gcc4. Make __xchg() a macro, so that gcc 4.0 doesn't blow up thanks to always_inline.. Signed-off-by: Paul Mundt commit bc8bff63bacea47561de34e04a17c79846ecfe91 Author: Paul Mundt Date: Wed Sep 27 16:04:51 2006 +0900 sh: Drop incdir rule for SE7751. No longer needed.. Signed-off-by: Paul Mundt commit d2b06a8b17f96b75fa1e8e7765cb900c99fd80fb Author: Paul Mundt Date: Wed Sep 27 16:03:25 2006 +0900 video: Update pvr2fb for sq API changes. With the store queue API rework, we need to change the in-kernel users too. Signed-off-by: Paul Mundt commit f1517494407b1f1ca0063a756cc30d75e96d433c Author: Paul Mundt Date: Wed Sep 27 16:01:12 2006 +0900 sh: Cleanup and document register bank usage. Initial register bank cleanup. Make SR.RB configurable, and add some preliminary documentation on register bank usage within the kernel. Signed-off-by: Paul Mundt commit 5283ecb5ccbdb90d49fce6488d3944bba63a591c Author: Paul Mundt Date: Wed Sep 27 15:59:17 2006 +0900 sh: Add support for R7780RP and R7780MP boards. This adds support for the Renesas SH7780 development boards, R7780RP and R7780MP. Signed-off-by: Paul Mundt commit d7c30c682a278abe1a52db83f69efec1a9d8f8c2 Author: Paul Mundt Date: Wed Sep 27 15:49:57 2006 +0900 sh: Store Queue API rework. Rewrite the store queue API for a per-cpu interface in the driver model. The old miscdevice is dropped, due to TASK_SIZE limitations, and no one was using it anyways. Carve up and allocate store queue space with a bitmap, back sq mapping objects with a slab cache, and let userspace worry about its own prefetching. Signed-off-by: Paul Mundt commit 373e68b5472d421cbd2703e7a77caf053f78c005 Author: Paul Mundt Date: Wed Sep 27 15:41:24 2006 +0900 sh: Board updates for I/O routine rework. This updates the various boards for some of the recent I/O routine updates. Signed-off-by: Paul Mundt commit f647d33f879d258de4ab2559975bd6eebda2033e Author: Paul Mundt Date: Wed Sep 27 15:30:24 2006 +0900 sh: Fix split ptlock for user mappings in __do_page_fault(). There was a bug that got introduced when the split ptlock changes went in where mm could be unintialized for user mappings, this fixes it up.. Signed-off-by: Paul Mundt commit c470662854ff94d44bf8c192cefac3efa33db676 Author: Paul Mundt Date: Wed Sep 27 15:29:18 2006 +0900 sh: Fixup SHMLBA definition for SH7705. We need this set to something sensible anywhere were we have an aliasing dcache.. Signed-off-by: Paul Mundt commit d7cdc9e8ac82c43fdcd4fde6b5b53d2dcba7f707 Author: Paul Mundt Date: Wed Sep 27 15:16:42 2006 +0900 sh: ioremap() overhaul. ioremap() overhaul. Add support for transparent PMB mapping, get rid of p3_ioremap(), etc. Also drop ioremap() and iounmap() routines from the machvec, as everyone can use the generic ioremap() API instead. For PCI memory apertures and other special cases, use the pci_iomap() API, as boards are already required to get the mapping right there. Signed-off-by: Paul Mundt commit 715a0ecc29c850d2b2f76e1803d3f22cd5a0ac0d Author: David S. Miller Date: Tue Sep 26 23:14:21 2006 -0700 [SPARC64]: Kill bogus check from bootmem_init(). There is an ancient and totally incorrect sanity check being done on the ramdisk location. The check assumes that the kernel is always loaded to physical address zero, which is wrong. It was trying to validate the ramdisk value by saying that if it fell within the kernel image address range it must be wrong. Anyways, kill this because it actually creates problems. The 'ramdisk_image' should always be adjusted down by KERNBASE. SILO can easily put the ramdisk in a location which causes this test to trigger, breaking things. [ Based almost entirely upon a patch from Ben Collins. ] Signed-off-by: David S. Miller commit 26ff6c11ef38e08990c1e417c299246e6ab18ff7 Author: Paul Mundt Date: Wed Sep 27 15:13:36 2006 +0900 sh: page table alloc cleanups and page fault optimizations. Cleanup of page table allocators, using generic folded PMD and PUD helpers. TLB flushing operations are moved to a more sensible spot. The page fault handler is also optimized slightly, we no longer waste cycles on IRQ disabling for flushing of the page from the ITLB, since we're already under CLI protection by the initial exception handler. Signed-off-by: Paul Mundt commit e531dcc568ca326428158e9574b8560572b8ae28 Author: David S. Miller Date: Tue Sep 26 23:10:01 2006 -0700 [SPARC64]: Update defconfig. Signed-off-by: David S. Miller commit 9359e757709a211040e4b0151eae69248e7c6eca Author: Paul Mundt Date: Wed Sep 27 15:09:48 2006 +0900 sh: export clear_user_page() for the modules that need it. Some modules seem to need this, so we export it.. Signed-off-by: Paul Mundt commit 0c7b1df69c62209db19d1279dd882b37c04c5c2f Author: Paul Mundt Date: Wed Sep 27 15:08:07 2006 +0900 sh: SH-4A Privileged Space Mapping Buffer (PMB) support. Add support for 32-bit physical addressing through the SH-4A Privileged Space Mapping Buffer (PMB). Signed-off-by: Paul Mundt commit a09749dd86e9e93de10f12ab4ce4e90815b5650a Author: Jamie Lenehan Date: Wed Sep 27 15:05:39 2006 +0900 sh: Titan board support. Add support for the titan board. Signed-off-by: Jamie Lenehan Signed-off-by: Paul Mundt commit b7e108ee63624176af85b97d4d80bef6fe099395 Author: Paul Mundt Date: Wed Sep 27 15:00:04 2006 +0900 sh: BSS init bugfix and barrier in entry point. A synco is needed before we jump to start_kernel(). While we're at it, also move the sh_cpu_init() jump until after we've zeroed BSS, as this has caused some undesirable results in sh_cpu_init(). Signed-off-by: Paul Mundt commit 298476220d1f793ca0ac6c9e5dc817e1ad3e9851 Author: Paul Mundt Date: Wed Sep 27 14:57:44 2006 +0900 sh: Add control register barriers. Currently when making changes to control registers, we typically need some time for changes to take effect (8 nops, generally). However, for sh4a we simply need to do an icbi.. This is a simple patch for implementing a general purpose ctrl_barrier() which functions as a control register write barrier. There's some additional documentation in the patch itself, but it's pretty self explanatory. There were also some places where we were not doing the barrier, which didn't seem to have any adverse effects on legacy parts, but certainly did on sh4a. It's safer to have the barrier in place for legacy parts as well in these cases, though this does make flush_tlb_all() more expensive (by an order of 8 nops). We can ifdef around the flush_tlb_all() case for now if it's clear that all legacy parts won't have a problem with this. Signed-off-by: Paul Mundt commit 749cf486920bf53f16e6a6889d9635a91ffb6c82 Author: Paul Mundt Date: Wed Sep 27 14:55:41 2006 +0900 sh: Add flag for MMU PTEA capability. Add CPU_HAS_PTEA, refactor some of the cpu flag settings. Signed-off-by: Paul Mundt commit 94c0fa520cc169ccf661e9c03b5b95f74d1520b8 Author: kogiidena Date: Wed Sep 27 14:53:35 2006 +0900 sh: landisk board support. This adds support for the I-O DATA Landisk. Signed-off-by: kogiidena Signed-off-by: Paul Mundt commit 634bf4f69b925950ddb09ef99ad7516a449a4333 Author: Paul Mundt Date: Wed Sep 27 14:48:09 2006 +0900 sh: Fix libata build. Drop virt_to_bus() from sg_dma_address() so libata builds. While we're at it, move sg_dma_address() and sg_dma_len() from pci.h to scatterlist.h. Signed-off-by: Paul Mundt commit 24ab54cb49c099d691c68fdd1ac6a0c2f5177da4 Author: Ollie Wild Date: Wed Sep 27 14:46:24 2006 +0900 sh: Fix TCP payload csum bug in csum_partial_copy_generic(). There's a bug in the Hitachi SuperH csum_partial_copy_generic() implementation. If the supplied length is 1 (and several alignment conditions are met), the function immediately branches to label 4. However, the assembly at label 4 expects the length to be stored in register r2. Since this has not occurred, subsequent behavior is undefined. This can cause bad payload checksums in TCP connections. I've fixed the problem by initializing register r2 prior to the branch instruction. Signed-off-by: Ollie Wild Signed-off-by: Paul Mundt commit 8b395265f81817385f12e62f03f795efb732a445 Author: Paul Mundt Date: Wed Sep 27 14:38:02 2006 +0900 sh: Fix fatal oops in copy_user_page() on sh4a (SH7780). We had a pretty interesting oops happening, where copy_user_page() was down()'ing p3map_sem[] with a bogus offset (particularly, an offset that hadn't been initialized with sema_init(), due to the mismatch between cpu_data->dcache.n_aliases and what was assumed based off of the old CACHE_ALIAS value). Luckily, spinlock debugging caught this for us, and so we drop the old hardcoded CACHE_ALIAS for sh4 completely and rely on the run-time probed cpu_data->dcache.alias_mask. This in turn gets the p3map_sem[] index right, and everything works again. While we're at it, also convert to 4-level page tables.. Signed-off-by: Paul Mundt commit 75c92acdd5b19a5e3536ed670e1122d73c635b4a Author: Paul Mundt Date: Wed Sep 27 14:36:44 2006 +0900 sh: Wire up new syscalls. The syscall table has lagged behind a bit, wire up the new ones.. Signed-off-by: Paul Mundt commit ef9a1d4c0c383f75710f6adf2abb8cc264877e2c Author: Alexey Dobriyan Date: Wed Sep 27 14:32:57 2006 +0900 sh: remove cpu_online() definition from It's defined in and log is horribly flooded by "redefined" messages. Signed-off-by: Alexey Dobriyan Signed-off-by: Paul Mundt commit 5b19c9081fbd0882c936ec087bf9055a20251dec Author: Paul Mundt Date: Wed Sep 27 14:31:40 2006 +0900 sh: Support for SH7770/SH7780 CPU subtypes. Merge support for SH7770 and SH7780 SH-4A subtypes. Signed-off-by: Paul Mundt commit 555ef1963029d19d2367acd09f6b9a6a0056f217 Author: Paul Mundt Date: Wed Sep 27 14:30:11 2006 +0900 sh: Add SH7750S/SH7091 rules for SH7750 oprofile driver. Update oprofile build rules for additional subtypes, particularly SH7750S/SH7091. Signed-off-by: Paul Mundt commit a80fd21e52cc09ff1e4d36de5781173a5b87b2dc Author: Paul Mundt Date: Wed Sep 27 14:26:53 2006 +0900 sh: earlyprintk= support and cleanups. Allow multiple early printk consoles via earlyprintk=. With this change earlyprintk is no longer enabled by default, it must be specified on the kernel command line. Optionally with ,keep to prevent unreg by tty_io. Signed-off-by: Paul Mundt commit e86d6b66f5b38680746b2cb71186d90af17f150f Author: Paul Mundt Date: Wed Sep 27 14:20:54 2006 +0900 sh: prefetch()/prefetchw() support. SH-2/3/4 are able to prefetch, add support for it.. Signed-off-by: Paul Mundt commit e7be853df79fe8ae08ba7d933bd21e1dbb0db7bc Author: Toshinobu Sugioka Date: Wed Sep 27 14:13:14 2006 +0900 sh: Fix a sign extension bug in memset(). Minor sign-extension bug in SH-specific memset().. Signed-off-by: Toshinobu Sugioka Signed-off-by: Paul Mundt commit 73388cc7c648861742e584a97fbffed16afc7dc3 Author: Paul Mundt Date: Wed Sep 27 14:11:33 2006 +0900 sh: Refactor PRR masking to catch newer SH7760 cuts. Newer SH7760 cuts have a range of acceptable PRR values.. Signed-off-by: Paul Mundt commit b638d0b921dc95229af0dfd09cd24850336a2f75 Author: Richard Curnow Date: Wed Sep 27 14:09:26 2006 +0900 sh: Optimized cache handling for SH-4/SH-4A caches. This reworks some of the SH-4 cache handling code to more easily accomodate newer-style caches (particularly for the > direct-mapped case), as well as optimizing some of the old code. Signed-off-by: Richard Curnow Signed-off-by: Paul Mundt commit fdfc74f9fcebdda14609159d5010b758a9409acf Author: Paul Mundt Date: Wed Sep 27 14:05:52 2006 +0900 sh: Support for SH-4A memory barriers. SH-4A supports 'synco' as a barrier, sprinkle it around the cache ops as necessary.. Signed-off-by: Paul Mundt commit 36efc35447154317f9ffc5163a1793b5f7ff3de1 Author: Paul Mundt Date: Wed Sep 27 14:02:09 2006 +0900 sh: RTS7751R2D board updates. More of the same, trivial cleanups, and moving options to their own board-specific Kconfig. Signed-off-by: Paul Mundt commit e8fb67f8e05bb1f4c07c3585967cfc6d44822ab0 Author: Paul Mundt Date: Wed Sep 27 13:56:28 2006 +0900 sh: HS7751RVoIP board updates. Various cleanups for HS7751RVoIP. Mostly just getting rid of the old mach.c and splitting codec configuration in to its own Kconfig. Signed-off-by: Paul Mundt commit 7e27b9b720e74f471f0f0880c56578d07206c0af Author: Andriy Skulysh Date: Wed Sep 27 13:48:32 2006 +0900 sound: SH DAC audio driver updates. Update the SH DAC audio driver for the clock framework. Signed-off-by: Andriy Skulysh Signed-off-by: Paul Mundt commit 048839dc548a5315b733993dfc7d082e1e848061 Author: Andriy Skulysh Date: Wed Sep 27 13:47:22 2006 +0900 video: hitfb suspend/resume and updates. suspend/resume support for hitfb, as well as some other minor cleanups. Signed-off-by: Andriy Skulysh Signed-off-by: Paul Mundt commit 6d75e650f1d0d59fd97c7629f0903ef18e8dfb7b Author: Paul Mundt Date: Wed Sep 27 13:42:57 2006 +0900 sh: Move hd64461.h to a more sensible location. With the I/O rework for hd64461 we're down to a single header, so move it by itself and get rid of the directory. Signed-off-by: Paul Mundt commit d95fb13c960ae19e9fd4a95807eb68fa20caf537 Author: Paul Mundt Date: Wed Sep 27 13:30:08 2006 +0900 sh: Fixup TMU_TOCR definition for SH7300. SH7300 has a different TMU_TOCR, make the TMU code work again. Signed-off-by: Paul Mundt commit 3530570fd43632b60b00e5ea17519d2bd69d1434 Author: Paul Mundt Date: Wed Sep 27 13:28:23 2006 +0900 sh: Kill off dead code for SE and SystemH boards. Some of these have suffered some bitrot, and so there is some degree of dead code that has been left sitting around, clean it up.. Signed-off-by: Paul Mundt commit 5c930e8cbfaa9dfdf9fa082fd891c6e3ab6ef2fc Author: Paul Mundt Date: Wed Sep 27 13:20:22 2006 +0900 video: Disable vgacon for SuperH. We don't support this on SH, so just disable it.. Signed-off-by: Paul Mundt commit 3f787fe2e077ecfe43ad9ad56f12a8e21cffafc3 Author: Paul Mundt Date: Wed Sep 27 13:11:57 2006 +0900 sh: hugetlb updates. For some of the larger sizes we permitted spanning pages across several PTEs, but this turned out to not be generally useful. This reverts the sh hugetlbpage interface to something more sensible using huge pages at single PTE granularity. Signed-off-by: Paul Mundt commit 4bcac20a7a01d49dffb5e88a8140efa34927c383 Author: Andriy Skulysh Date: Wed Sep 27 13:07:38 2006 +0900 sh: hp6xx mach-type cleanups. Some minor cleanups for the updated consolidated hp6xx mach-type. Signed-off-by: Andriy Skulysh Signed-off-by: Paul Mundt commit e4c2cfee5d5cf3e4c16b423be23551aeddf2717b Author: Paul Mundt Date: Wed Sep 27 12:31:01 2006 +0900 sh: Various cosmetic cleanups. We had quite a bit of whitespace damage, clean most of it up.. Signed-off-by: Stuart Menefy Signed-off-by: Arthur Othieno Signed-off-by: Paul Mundt commit 7f1be8924791535c5fdc6749d1f119e141baa122 Author: rafalbilski@interia.pl Date: Sun Sep 24 20:28:13 2006 +0200 [CPUFREQ] Longhaul - Disable arbiter CLE266 Please ignore previous message. This patch is adding support for CPU connected to CLE266 chipset. For older CPU this is only way. For "Powersaver" processor this way will be used if ACPI C3 isn't supported. I have tested it. It seems to work exacly like ACPI. But it is less safe. On CLE266 chipset port 0x22 is blocking processor access to PCI bus too. Signed-off-by: Rafa³ Bilski Signed-off-by: Dave Jones commit 7357db1209f27210f97b2a9dd22177f1886a1198 Author: Alan Cox Date: Tue Sep 26 17:56:55 2006 +0100 [AGPGART] Use pci_get_slot not pci_find_slot Signed-off-by: Alan Cox Signed-off-by: Dave Jones commit 0497c8ca282915a1c36d51db33fbf2629d7346f3 Author: Venkatesh Pallipadi Date: Mon Sep 25 11:23:32 2006 -0700 [CPUFREQ] Fix section mismatch warning Make the sections proper and get rid of section mismatch warnings. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Dave Jones commit 0e37b159aa7427bf311487e3ea03d8aa5ff5956e Author: Dave Jones Date: Tue Sep 26 23:02:34 2006 -0400 [CPUFREQ] Fix cut-n-paste bug in suspend printk Signed-off-by: Dave Jones commit a56d276c05a80ce727902076a3b4c6247705e2df Author: Paul Mundt Date: Wed Sep 27 11:43:24 2006 +0900 sh: Make hs7751rvoip/rts7751r2d use pm_power_off. These were previously sprinkled in machine_power_off(), though missed being updated when the rest of the boards switched over. Signed-off-by: Paul Mundt commit 50e98e72e459e43b6b9a5449e35bb6fc54e21149 Author: Paul Mundt Date: Wed Sep 27 11:40:05 2006 +0900 sh: Kill off the .stack section. We had a special .stack section in the ld script that was being used to position r15 initially. This is nonsensical, as we can just use a THREAD_SIZE offset from the init_thread_union instead (as every other arch does). Signed-off-by: Paul Mundt commit 6ae5e8d7598ce01ac0e7dab1b89894c7386a2e61 Author: Paul Mundt Date: Wed Sep 27 11:37:33 2006 +0900 sh: Fix kGDB NMI handling. in_nmi shifted down a few labels, so we were inadvertently clearing the lower byte of do_syscall_trace, badness ensues. Signed-off-by: Paul Mundt commit 1c5f8f85df96dd7c17d63eed2d7da18b3ad00b6d Author: Paul Mundt Date: Wed Sep 27 11:36:10 2006 +0900 sh: Move syscall table in to syscall.S. Move the syscall table in to its own file, as per sh64. The entry.S bits will end up being considerably different in the sh2/sh2a cases, so this lets us keep things in sync somewhat.. Signed-off-by: Paul Mundt commit 765ae317ce030217af556dc46bec238dab15091e Author: Paul Mundt Date: Wed Sep 27 11:31:32 2006 +0900 sh: Fixup some uninitialized spinlocks. Fix use of uninitialized spinlocks, caught with spinlock debugging.. Signed-off-by: Paul Mundt commit a252710fc5b63b24934905ca47ecf661702d7f00 Author: Paul Mundt Date: Wed Sep 27 11:29:55 2006 +0900 sh: flush_cache_range() cleanup and optimizations. flush_cache_range() wasn't page aligning the end of the range, we can't assume that it will always be page aligned, and we ended up getting unaligned faults in some rare call paths. Additionally, we add a small optimization to just purge the dcache entirely if the range is large enough that the page table walking will take longer. We use an arbitrary value of 64 pages for the large range size, as per sh64. Signed-off-by: Paul Mundt commit e4e3b5ccd77226c9c4dbb0737106b868dfc182d9 Author: Tom Rini Date: Wed Sep 27 11:28:20 2006 +0900 sh: Add a simple cmpxchg(). We didn't have one of these before, a simple implementation borrowed from MIPS as well as the __HAVE_ARCH_CMPXCHG bits. Signed-off-by: Tom Rini Signed-off-by: Paul Mundt commit 0c91c1a7012911e4b0180a1c1ae258e2b706f987 Author: Paul Mundt Date: Wed Sep 27 11:16:20 2006 +0900 sh: Move smc37c93x.h for SystemH board use. SystemH needs this header as well, not just 770x SE. Signed-off-by: Paul Mundt commit c9d86d76c1cdd76d67292ab75643db66573ca7dd Author: Kenji Kaneshige Date: Tue Sep 19 17:04:33 2006 -0700 pciehp - fix wrong return value This patch fixes the problem that trying to enable already enabled slot disables the slot by returning the proper value from pciehp_enable_slot()/pciehp_disable_slot(). Signed-off-by: Kenji Kaneshige Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit aa4f63cad4f70a52adbabb66ac6c8b6072910fdf Author: Satoru Takeuchi Date: Tue Sep 12 10:24:14 2006 -0700 IA64: PCI: dont disable irq which is not enabled This patch prevents pcibios_disable_device() from disabling interrupts of devices which is not enabled. Signed-off-by: Kenji Kaneshige Signed-off-by: MUNEDA Takahiro Signed-off-by: Satoru Takeuchi Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit 600812ecead0da2e7b6f9e5f5aad68b1ad8ae581 Author: Satoru Takeuchi Date: Tue Sep 12 10:22:53 2006 -0700 acpiphp: add support for ioapic hot-remove This patch adds support for ioapics hot-remove. Signed-off-by: Kenji Kaneshige Signed-off-by: MUNEDA Takahiro Signed-off-by: Satoru Takeuchi Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit 23186279658cea6d42a050400d3e79c56cb459b4 Author: Satoru Takeuchi Date: Tue Sep 12 10:21:44 2006 -0700 PCI: assign ioapic resource at hotplug We need to assign resources to ioapics being hot-added. This patch changes pbus_assign_resources_sorted() to assign resources if the ioapic has no assigned resources. Signed-off-by: Kenji Kaneshige Signed-off-by: MUNEDA Takahiro Signed-off-by: Satoru Takeuchi Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit d5cdb67236dba94496de052c9f9f431e1fc658f4 Author: Satoru Takeuchi Date: Tue Sep 12 10:19:00 2006 -0700 acpiphp: disable bridges Currently acpiphp calls pci_enable_device() against all hot-added bridges, but acpiphp does not call pci_disable_device() against them in hot-remove. So ioapic hot-remove would fail. This patch fixes this issue. Signed-off-by: Kenji Kaneshige Signed-off-by: MUNEDA Takahiro Signed-off-by: Satoru Takeuchi Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit 0dad3510ee82bcf8a380b81a2184a664a911ef9c Author: Satoru Takeuchi Date: Tue Sep 12 10:17:46 2006 -0700 acpiphp: stop bus device before acpi_bus_trim Contrary to PCI bridge hot-add, we need to follow the sequence below for PCI bridge hot-removal. (1) Stop devices (detach drivers, remove from the global list, etc.) (2) Unbind ACPI node from the devices (remove the _PRT entries) (3) Remove devices (remove from the device list, etc.) This patch fixes acpiphp driver to follow above sequence for P2P bridge hot-removal. Signed-off-by: Kenji Kaneshige Signed-off-by: MUNEDA Takahiro Signed-off-by: Satoru Takeuchi Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit 24f8aa9b464b73e0553f092b747770940ee0ea54 Author: Satoru Takeuchi Date: Tue Sep 12 10:16:36 2006 -0700 PCI: add pci_stop_bus_device This patch adds pci_stop_bus_device() which stops a PCI device (detach the driver, remove from the global list and so on) and any children. This is needed for ACPI based PCI-to-PCI bridge hot-remove, and it will be also needed for ACPI based PCI root bridge hot-remove. Signed-off-by: Kenji Kaneshige Signed-off-by: MUNEDA Takahiro Signed-off-by: Satoru Takeuchi Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit 9b1d19ee86746618a8b43d2aaef8319c01af1514 Author: Satoru Takeuchi Date: Tue Sep 12 10:15:10 2006 -0700 acpiphp: do not initialize existing ioapics Currently acpiphp initializes all ioapics under the bus on which hot-add event occured. It also initializes already working ioapics. This patch fixes this bug. Signed-off-by: Kenji Kaneshige Signed-off-by: MUNEDA Takahiro Signed-off-by: Satoru Takeuchi Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit b99feebe597f7b8c566048e11dbbd2d6df9abc83 Author: Satoru Takeuchi Date: Tue Sep 12 10:13:44 2006 -0700 acpiphp: initialize ioapics before starting devices Currently acpiphp initializes ioapics after starting devices, but ioapics should be initialized before starting devices. This patch fixes this bug. Signed-off-by: Kenji Kaneshige Signed-off-by: MUNEDA Takahiro Signed-off-by: Satoru Takeuchi Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit 287af2fbe902206fabd42ade4e94f77db900083e Author: Satoru Takeuchi Date: Tue Sep 12 10:12:16 2006 -0700 acpiphp: set hpp values before starting devices Currently acpiphp sets hpp values after starting devices, but the values should be set before starting devices. This patch fixes this bug. Signed-off-by: Kenji Kaneshige Signed-off-by: MUNEDA Takahiro Signed-off-by: Satoru Takeuchi Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit 753388c2e91c15c12550bb20dda05ce657cfdc3e Author: Satoru Takeuchi Date: Wed Sep 6 16:47:28 2006 +0900 PCI Hotplug: cleanup pcihp skeleton code. Cleanup pcihp skeleton code. Fix some typos and remove some unnecessary blank lines. Signed-off-by: Satoru Takeuchi Signed-off-by: Greg Kroah-Hartman commit b56a5a23bfecd9cac9187164a9d5f22d287c48b9 Author: Michael S. Tsirkin Date: Mon Aug 21 16:22:22 2006 +0300 PCI: Restore PCI Express capability registers after PM event Restore PCI Express capability registers after PM event. This includes maxumum MTU for PCI express and other vital data. Signed-off-by: Michael S. Tsirkin Signed-off-by: Greg Kroah-Hartman commit 6d47a5e4c3f8b6458002065d98a9cc6ff90fb597 Author: Adrian Bunk Date: Mon Aug 14 23:07:38 2006 -0700 PCI: drivers/pci/hotplug/acpiphp_glue.c: make a function static Signed-off-by: Adrian Bunk Acked-by: MUNEDA Takahiro Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 50b0075520a0acba9cabab5203bbce918b966d9a Author: Alan Cox Date: Wed Aug 16 17:42:18 2006 +0100 PCI: Multiprobe sanitizer There are numerous drivers that can use multithreaded probing but having some kind of global flag as the way to control this makes migration to threaded probing hard and since it enables it everywhere and is almost as likely to cause serious pain as holding a clog dance in a minefield. If we have a pci_driver multithread_probe flag to inherit you can turn it on for one driver at a time. From playing so far however I think we need a different model at the device layer which serializes until the called probe function says "ok you can start another one now". That would need some kind of flag and semaphore plus a helper function. Anyway in the absence of that this is a starting point to usefully play with this stuff Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit b19441af185559118e8247382ea4f2f76ebffc6d Author: Greg Kroah-Hartman Date: Mon Aug 28 11:43:25 2006 -0700 PCI: fix __must_check warnings Signed-off-by: Greg Kroah-Hartman commit 660a0e8fdf85f30b1e5f6905a78361476094eb7c Author: Greg Kroah-Hartman Date: Mon Aug 28 11:43:25 2006 -0700 PCI Hotplug: fix __must_check warnings Signed-off-by: Greg Kroah-Hartman commit e1b95dc6b1cd02c3625ba3d1d770d095d6a4b313 Author: Greg Kroah-Hartman Date: Mon Aug 28 11:43:25 2006 -0700 SHPCHP: fix __must_check warnings Cc: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman commit 4bf3392e0bf55e5aabbd7bbdbc52cc58eb63f837 Author: Zhang, Yanmin Date: Mon Jul 31 15:26:16 2006 +0800 PCI-Express AER implemetation: pcie_portdrv error handler Patch 4 implements error handlers for pcie_portdrv. Signed-off-by: Zhang Yanmin Signed-off-by: Greg Kroah-Hartman commit 6c2b374d74857e892080ee726184ec1d15e7d4e4 Author: Zhang, Yanmin Date: Mon Jul 31 15:21:33 2006 +0800 PCI-Express AER implemetation: AER core and aerdriver Patch 3 implements the core part of PCI-Express AER and aerdrv port service driver. When a root port service device is probed, the aerdrv will call request_irq to register irq handler for AER error interrupt. When a device sends an PCI-Express error message to the root port, the root port will trigger an interrupt, by either MSI or IO-APIC, then kernel would run the irq handler. The handler collects root error status register and schedules a work. The work will call the core part to process the error based on its type (Correctable/non-fatal/fatal). As for Correctable errors, the patch chooses to just clear the correctable error status register of the device. As for the non-fatal error, the patch follows generic PCI error handler rules to call the error callback functions of the endpoint's driver. If the device is a bridge, the patch chooses to broadcast the error to downstream devices. As for the fatal error, the patch resets the pci-express link and follows generic PCI error handler rules to call the error callback functions of the endpoint's driver. If the device is a bridge, the patch chooses to broadcast the error to downstream devices. Signed-off-by: Zhang Yanmin Signed-off-by: Greg Kroah-Hartman commit 48408157ebf5b2c6dc1e04ba5d258012f6a7f356 Author: Zhang, Yanmin Date: Mon Jul 31 15:18:39 2006 +0800 PCI-Express AER implemetation: export pcie_port_bus_type Patch 2 exports pcie_port_bus_type. Signed-off-by: Zhang Yanmin Signed-off-by: Greg Kroah-Hartman commit 47402400c6496dd114463deb3a2ba2d64055284e Author: Zhang, Yanmin Date: Mon Jul 31 15:15:18 2006 +0800 PCI-Express AER implemetation: aer howto document PCI-Express AER (Advanced Error Reporting) provides more robust error reporting. The series of patches enable kernel support to AER. The initial patches were written by Tom Long Nguyen. I ported them to the kernel 2.6.18-rc3. Many thanks to Rajesh Shah and Narayanan Chandramouli for their great review comments and testing help. Patch 1 consists of the pciaer-howto.txt document. Signed-off-by: Zhang Yanmin Signed-off-by: Greg Kroah-Hartman commit 20d516602c022997feb24a9f1a806fc986b9e4e8 Author: Randy Dunlap Date: Sat Jul 8 22:58:25 2006 -0700 PCIE: check and return bus_register errors Have pcie_port_bus_register() notice and return errors. Mark it __must_check so that its caller(s) must check its return value. Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit 6397c75cbc4d7dbc3d07278b57c82a47dafb21b5 Author: Brice Goglin Date: Thu Aug 31 01:55:32 2006 -0400 MSI: Blacklist PCI-E chipsets depending on Hypertransport MSI capability Introduce msi_ht_cap_enabled() to check the MSI capability in the Hypertransport configuration space. It is used in a generic quirk quirk_msi_ht_cap() to check whether MSI is enabled on hypertransport chipset, and a nVidia specific quirk quirk_nvidia_ck804_msi_ht_cap() where two 2 HT MSI mappings have to be checked. Both quirks set the PCI_BUS_FLAGS_NO_MSI bus flag when MSI is disabled. Signed-off-by: Brice Goglin Signed-off-by: Greg Kroah-Hartman commit 46ff34633ed09f36ebc4b5c40ac37e592172df74 Author: Brice Goglin Date: Thu Aug 31 01:55:24 2006 -0400 MSI: Rename PCI_CAP_ID_HT_IRQCONF into PCI_CAP_ID_HT 0x08 is the HT capability, while PCI_CAP_ID_HT_IRQCONF would be the subtype 0x80 that mpic_scan_ht_pic() uses. Rename PCI_CAP_ID_HT_IRQCONF into PCI_CAP_ID_HT. And by the way, use it in the ipath driver instead of defining its own HT_CAPABILITY_ID. Signed-off-by: Brice Goglin Signed-off-by: Greg Kroah-Hartman commit fe97064c2870e174a6ff4a93feb11a70c4b71cc5 Author: Brice Goglin Date: Thu Aug 31 01:55:15 2006 -0400 MSI: Export the PCI_BUS_FLAGS_NO_MSI flag in sysfs Export the PCI_BUS_FLAGS_NO_MSI flag of a PCI bus in the sysfs files of its parent device and make it writable. Could be used to: * disable MSI on a device which has not been blacklisted yet * allow MSI when some setpci hacks enable MSI support (for instance on the ServerWorks HT2000 chipset where the MSI HT cap is disabled by default). Architecture where some bus have no parent chipset cannot use this strategy to change MSI support. If the chipset does not have a subordinate bus, its 'bus_msi' file is empty. Also document and warn about the possible danger of changing the flag. Signed-off-by: Brice Goglin Signed-off-by: Greg Kroah-Hartman commit 24334a12533e9ac70dcb467ccd629f190afc5361 Author: Brice Goglin Date: Thu Aug 31 01:55:07 2006 -0400 MSI: Factorize common code in pci_msi_supported() pci_enable_msi() and pci_enable_msix() use the same code to detect whether MSI might be enabled on this device. Factorize this code in pci_msi_supported(). And improve the documentation about the fact that only the root chipset must support MSI, but it is hard to find the root bus so we check all parent busses MSI flags. Signed-off-by: Brice Goglin Signed-off-by: Greg Kroah-Hartman commit 3f79e107f72e8efa86cd2f21356692b712713b5c Author: Brice Goglin Date: Thu Aug 31 01:54:56 2006 -0400 MSI: Cleanup existing MSI quirks Move MSI quirks in CONFIG_PCI_MSI, document why the serverworks quirk does not simply set PCI_BUS_FLAGS_NO_MSI, and create a generic quirk for other chipsets where setting PCI_BUS_FLAGS_NO_MSI is fine. Signed-off-by: Brice Goglin Signed-off-by: Greg Kroah-Hartman commit d33b6fba2c4350651f3f61ff2ab858a2f116e9a4 Author: Matthew Wilcox Date: Fri Jun 30 02:31:24 2006 -0700 Resources: insert identical resources above existing resources If you have two resources which aree exactly the same size, insert_resource() currently inserts the new one below the existing one. This is wrong because there's no way to insert a resource of the same size above an existing one. I took this opportunity to rewrite the initial loop to be a for-loop instead of a goto-loop and fix the documentation. Signed-off-by: Matthew Wilcox Cc: Ivan Kokshaysky Cc: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 6d3aae9d74221b00e2cbf50a353527e5a71a58ba Author: Jean Delvare Date: Sun Sep 3 22:41:08 2006 +0200 i2c: Drop unimplemented slave functions i2c: Drop unimplemented slave functions Drop the function declarations for slave mode support of i2c adapters. This was never implemented, and by the time it is I bet we will want something different anyway. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 8f9082c5ce0e2c2f7ad0211b0c089f680d2efc11 Author: Jean Delvare Date: Sun Sep 3 22:39:46 2006 +0200 i2c: Constify i2c_algorithm declarations, part 2 i2c: Constify i2c_algorithm declarations, part 2 Make struct i2c_algorithm declarations const in all i2c bus drivers where it is possible. Signed-off-by: Jean Delvare Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit 9e11a9fbfe48a2f65188aae64bf4f690e40ea2f4 Author: Jean Delvare Date: Sun Sep 3 22:38:52 2006 +0200 i2c: Constify i2c_algorithm declarations, part 1 i2c: Constify i2c_algorithm declarations, part 1 Make struct i2c_algorithm declarations const in all i2c algorithm drivers. Signed-off-by: Jean Delvare Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit af71ff690b92894f66ccede27f731150dc10d80d Author: David Brownell Date: Sun Sep 3 22:37:11 2006 +0200 i2c: Let drivers constify i2c_algorithm data i2c: Let drivers constify i2c_algorithm data Let drivers constify I2C algorithm method operations tables, moving them from ".data" to ".rodata". Signed-off-by: David Brownell Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 872188420997f7f7c1b968fd9bce6578e4c3d45f Author: Jean Delvare Date: Sun Sep 3 22:36:14 2006 +0200 i2c-isa: Restore driver owner i2c-isa: Restore driver owner Commit 2b48716d1d2f2edb1e7cbc5ecf1cb2cb39373e33 back in January 2006 was a bit overzealous. It removed .owner from all i2c drivers, including i2c-isa ones, while they still need it. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit c243353a90fae3a9a85d2bd79b1df06bb21c568a Author: Rudolf Marek Date: Sun Sep 3 22:35:21 2006 +0200 i2c-viapro: Add support for the VT8237A and VT8251 i2c-viapro: Add support for the VT8237A and VT8251 Documentation update included. Compile tested. Signed-off-by: Rudolf Marek Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 114fd18397eb0eacf51ac784f7d5c929b8499715 Author: Jean Delvare Date: Sun Sep 3 22:25:04 2006 +0200 i2c: Warn on i2c client creation failure i2c: Warn on i2c client creation failure Warn when an i2c client creation fails. If we don't, the user will never know something wrong happened, as i2c client creation is typically called through an attach_adapter callback, those return value we currently ignore for technical reasons. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 7eff82c8b1511017ae605f0c99ac275a7e21b867 Author: Jean Delvare Date: Sun Sep 3 22:24:00 2006 +0200 i2c-core: Drop useless bitmaskings i2c-core: Drop useless bitmaskings The code generated is exactly the same. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 9b4ccb86b4abe644ffd218720da2f942b6a20fc2 Author: Adrian Bunk Date: Sun Sep 3 22:22:50 2006 +0200 i2c-algo-pcf: Discard the mdelay data struct member i2c-algo-pcf: Discard the mdelay data struct member Just as i2c-algo-bit, i2c-algo-pcf has an unused mdelay struct member, which we can get rid of to spare some code and memory. Signed-off-by: Adrian Bunk Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 7b288a018ac563f5babe0818f581d8f8a4fdcbfb Author: Jean Delvare Date: Sun Sep 3 22:22:12 2006 +0200 i2c-algo-bit: Cleanups i2c-algo-bit: Cleanups * Uninline long functions (saves around 1 kB or 15%) * Refactor code in sclhi() * Drop redundant udelay on repeated start Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 8202632647278eba7223727dc442f49227c040d0 Author: David Hubbard Date: Sun Sep 3 22:21:20 2006 +0200 i2c-isa: Fail adding driver on attach_adapter error i2c-isa: Fail adding driver on attach_adapter error Signed-off-by: David Hubbard Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 7d9db67febf67dd76329a9dd8f97cf4611a8ac2e Author: Jean Delvare Date: Sun Sep 3 22:20:24 2006 +0200 i2c: __must_check fixes (chip drivers) i2c: __must_check fixes (chip drivers) Check for error on sysfs file creation. Delete sysfs files on device removal. The approach taken for the most complex case (pcf8591) is similar to what Mark M. Hoffman proposed for hardware monitoring chip drivers. Signed-off-by: Jean Delvare Cc: Ben Gardner Cc: Aurelien Jarno Signed-off-by: Greg Kroah-Hartman commit b32d20dc8b187e03605f091dbde9a78676a2a642 Author: Jean Delvare Date: Sun Sep 3 22:19:25 2006 +0200 i2c-dev: attach/detach_adapter cleanups i2c-dev: attach/detach_adapter cleanups * Only print that an adapter was attached when it succeeds. * i2c_dev == NULL on detach simply means that the attach failed before, this isn't an error per se. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 7a8d29cec7a53cf1a29dc5055aa9d1fa0f95830f Author: Jean Delvare Date: Sun Aug 13 23:46:44 2006 +0200 i2c-stub: Chip address as a module parameter i2c-stub: Chip address as a module parameter Add a mandatory chip_addr parameter to i2c-stub. This parameter defines to which chip address the driver will respond, instead of reponding to all addresses as before. The idea is to prevent the users from loading i2c-stub at random and being then confused by the results of sensors-detect or other user-space tools. Signed-off-by: Jean Delvare Signed-off-by: Mark M. Hoffman Signed-off-by: Greg Kroah-Hartman commit 6c805d2ce9d910ea915d7dbe4aed0a91f138be07 Author: Jean Delvare Date: Sun Aug 13 23:45:52 2006 +0200 i2c: Plan i2c-isa for removal i2c: Plan i2c-isa for removal i2c-isa doesn't make much sense in the device driver model. Drivers relying on it are better implemented as platform drivers. We must wait for recent versions of libsensors (2.10.0 or later) to be widely deployed beforehand, though. This move should also make it easier to convert i2c-core to the device driver model. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 010d442c4a295a73e90e93c5e42579cee61c5cc7 Author: Komal Shah Date: Sun Aug 13 23:44:09 2006 +0200 i2c: New bus driver for TI OMAP boards i2c: New bus driver for TI OMAP boards This patch adds I2C bus driver for various Texas Instruments (TI) OMAP1/2 (http://www.ti.com/omap) series based boards like OMAP1510/1610/1710/242x. Signed-off-by: Komal Shah Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit a0d9c63d3640bd4fc90a408e8334754ef44bcf48 Author: Jean Delvare Date: Sun Aug 27 11:46:49 2006 +0200 i2c-algo-bit: Discard the mdelay data struct member i2c-algo-bit: Discard the mdelay data struct member The i2c_algo_bit_data structure has an mdelay member, which is not used by the algorithm code (the code has always been ifdef'd out.) Let's discard it to save some code and memory. Signed-off-by: Jean Delvare Acked-by: Mauro Carvalho Chehab Cc: Adrian Bunk Signed-off-by: Greg Kroah-Hartman commit 8241cb1401873e18bba746fd3f6c56ce4252a61f Author: Jean Delvare Date: Sun Aug 13 23:40:09 2006 +0200 i2c-matroxfb: Struct init conversion i2c-matroxfb: Struct init conversion Convert the struct i2c_algo_bit_data initialization to proper C99 style. Signed-off-by: Jean Delvare Acked-by: Petr Vandrovec Signed-off-by: Greg Kroah-Hartman commit be53f9b2a08e647396ceaa004199ae4b032a9bd2 Author: Arthur Othieno Date: Sun Aug 13 23:39:11 2006 +0200 i2c: Fix copy-n-paste in subsystem Kconfig i2c: Fix copy-n-paste in subsystem Kconfig We have: drivers/i2c/Kconfig:2:# Character device configuration Which is obviously not true.. Signed-off-by: Arthur Othieno Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit a294de4e97a7a0cdeb949a3b2fbd4d81addc6d8c Author: Domen Puncer Date: Sun Aug 13 23:37:13 2006 +0200 i2c-au1550: Add I2C support for Au1200 i2c-au1550: Add I2C support for Au1200 Signed-off-by: Domen Puncer Signed-off-by: Ralf Baechle Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 6ed07134792655db12fddaafbf870425331a21f6 Author: Domen Puncer Date: Sun Aug 13 23:36:27 2006 +0200 i2c-au1550: Add SMBus functionality flag i2c-au1550: Add SMBus functionality flag Add SMBus functionality flag, so we can use eeprom and similar drivers. Signed-off-by: Domen Puncer Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 8859942ede8154c1e90e3b0d1b60aecf0cfaa169 Author: Domen Puncer Date: Sun Aug 13 23:35:40 2006 +0200 i2c-au1550: Fix timeout problem i2c-au1550: Fix timeout problem Fix from Jordan Crouse: If the transmit and recieve FIFOS are not empty, forceably flush them rather then waiting for them to drain on their own. This solves at least a problem reported by Clem Taylor: http://www.linux-mips.org/archives/linux-mips/2006-05/msg00240.html (1% of I2C transactions would timeout) Signed-off-by: Domen Puncer Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 643bd3fbd9dc73ed3dc1e4f6980e6f15fdbb9bb6 Author: Jean Delvare Date: Sun Aug 13 23:34:05 2006 +0200 i2c-sibyte: Kip Walker is gone i2c-sibyte: Kip Walker is gone Kip Walker no longer works at Broadcom, and his e-mail address there bounces back, so let's drop it. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 51c3711704b66986373408cbc0540abea43d2380 Author: Jean Delvare Date: Sun Aug 13 23:33:16 2006 +0200 i2c-algo-sibyte: Merge into i2c-sibyte i2c-algo-sibyte: Merge into i2c-sibyte Merge i2c-algo-sibyte into i2c-sibyte, as this is a complete, hardware-dependent SMBus implementation and not a reusable algorithm. Perform some basic coding style cleanups while we're here (mainly space-based indentation replaced by tabulations.) Signed-off-by: Jean Delvare Cc: Ralf Baechle Signed-off-by: Greg Kroah-Hartman commit 3fd39687540bd5d0501f413c91461d3b9fcbb525 Author: Jean Delvare Date: Sun Aug 13 23:32:37 2006 +0200 i2c-algo-sibyte: Cleanups i2c-algo-sibyte: Cleanups * Delete empty algo_control implementation. * Simplify i2c_sibyte_del_bus. * Delete empty module init and cleanup functions. * Drop out-of-date #ifdef MODULE construct. Signed-off-by: Jean Delvare Cc: Ralf Baechle Signed-off-by: Greg Kroah-Hartman commit defcb46ed4666095677c8f52904b9e328587a20d Author: Jean Delvare Date: Tue Aug 15 18:30:24 2006 +0200 i2c: __must_check fixes, i2c-dev i2c: __must_check fixes (i2c-dev) Check for error on sysfs file creation. Check for error on device creation. Delete sysfs file on device destruction. I couldn't test this one beyond compilation, as it applies on top of another patch in Greg's tree [1] which breaks all my systems when I apply it (my udev isn't recent enough.) Anyone with bleeding edge udev is welcome to test and report. [1] http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/i2c/i2c-dev-device.patch Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit b119c6c952a086f74202ccda4b7ed72161bb6522 Author: Jean Delvare Date: Tue Aug 15 18:26:30 2006 +0200 i2c: __must_check fixes (core drivers) i2c: __must_check fixes (core drivers) Check for error on sysfs file creation. Check for error on device registration. Check for error on class device registration. Greg, I am not familiar with completion, can you please tell me if I need to take care of it in the error paths (as I did in this patch, see /* Needed? */ comments), or if it isn't needed? These patches were tested, including forced errors, so they should work fine. But of course more testing can't hurt. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 22f76e744dc41096987c6df8270b5c249511cde5 Author: Jean Delvare Date: Sat Jul 1 17:20:57 2006 +0200 i2c-dev: Drop the client template i2c-dev: Drop the client template Drop the i2c-dev client template. This saves about 360 bytes of memory. I got the idea from a similar cleanup Hans-Frieder Vogt made to i2c-nforce2 recently. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit f3b3aadbbd66d8a020550b01b37d9b1ea559f2c3 Author: Jean Delvare Date: Sat Jul 1 17:17:38 2006 +0200 i2c-dev: Use a list for data storage i2c-dev: Use a list for data storage Use a list instead of a static array for storing the i2c-dev data. Given that most systems have less than 10 i2c busses, most of the space was wasted, so this saves around 1 kB of memory (2 kB on 64-bit archs.) The drawback is that lookup was in O(1) and is now in O(N), but given that the values of N are always small, I don't think this is a problem. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit 9455e4c9abf76fa02170743859b2ddbb484e7fdf Author: Jean Delvare Date: Sat Jul 1 17:16:57 2006 +0200 i2c-dev: Cleanups i2c-dev: Cleanups * We no more need to include platform_device.h. * Delete the to_i2c_dev macro, which is no more used (and no more valid either.) * Drop i2c_dev.minor. Now that the minor number always matches the i2c adapter number, this field is redundant with i2c_dev.adap->nr. * Delete i2c_dev_get_by_adapter() which is now redundant with i2c_dev_get_by_minor() for the same reason. * Drop the local variable dev in i2cdev_attach_adapter(), we can easily do without it. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman commit df8f0ec1a413ae610899f009e25dc9777881e149 Author: Al Stone Date: Sat Aug 12 11:08:12 2006 -0600 [IA64] minor reformatting to vmlinux.lds.S Minor reformatting to vmlinux.lds.S to make it 80-column usable, in accordance with Linux coding style. Signed-off-by: Al Stone Signed-off-by: Tony Luck commit ddb4f0df0424d174567a011a176782ffa4202071 Author: Hidetoshi Seto Date: Tue Sep 26 15:27:56 2006 -0700 [IA64] CMC/CPE: Reverse the order of fetching log and checking poll threshold This patch reverses the order of fetching log from SAL and checking poll threshold. This will fix following trivial issues: - If SAL_GET_SATE_INFO is unbelievably slow (due to huge system or just its silly implementation) and if it takes more than 1/5 sec, CMCI/CPEI will never switch to CMCP/CPEP. - Assuming terrible flood of interrupt (continuous corrected errors let all CPUs enter to handler at once and bind them in it), CPUs will be serialized by IA64_LOG_LOCK(*). Now we check the poll threshold after the lock and log fetch, so we need to call SAL_GET_STATE_INFO (num_online_cpus() + 4) times in the worst case. if we can check the threshold before the lock, we can shut up interrupts quickly without waiting preceding log fetches, and the number of times will be reduced to (num_online_cpus()) in the same situation. Signed-off-by: Hidetoshi Seto Signed-off-by: Tony Luck commit b29e7132b5a9f2496beed37beef7ba4d010afb2c Author: Russ Anderson Date: Tue Sep 26 14:47:48 2006 -0500 [IA64] PAL calls need physical mode, stacked PAL_CACHE_READ and PAL_CACHE_WRITE need to be called in physical mode with stacked registers. Signed-off-by: Russ Anderson (rja@sgi.com) Signed-off-by: Tony Luck commit 8f9e146732dcba5161dad3747ee73be1f8c13133 Author: Russ Anderson Date: Mon Sep 18 18:37:15 2006 -0500 [IA64] ar.fpsr not set on MCA/INIT kernel entry When entering the kernel due to an MCA or INIT, ar.fpsr (ar40) was not getting set to the kernel default value (remaining at the user value). The effect depends on the user setting of ar.fpsr. In the test case, the effect was addresses printing with strange hex values. Setting ar.fpsr in ia64_set_kernel_registers sets it for both the MCA and INIT paths. The user value of ar.fpsr is correctly saved (in ia64_state_save) and restored (in ia64_state_restore). Below is an example of output with very strange hex values. Anyone know the value of hex 'g'? :-) Processes interrupted by INIT - 0 (cpu 14 task 0xdfffg55g7a4c6gA) Signed-off-by: Russ Anderson (rja@sgi.com) Signed-off-by: Tony Luck commit 43ed3baf623410b3fa6ca14a9d3f6deca3493c56 Author: Hidetoshi Seto Date: Tue Sep 26 14:44:37 2006 -0700 [IA64] printing support for MCA/INIT Printing message to console from MCA/INIT handler is useful, however doing oops_in_progress = 1 in them exactly makes something in kernel wrong. Especially it sounds ugly if system goes wrong after returning from recoverable MCA. This patch adds ia64_mca_printk() function that collects messages into temporary-not-so-large message buffer during in MCA/INIT environment and print them out later, after returning to normal context or when handlers determine to down the system. Also this print function is exported for use in extensional MCA handler. It would be useful to describe detail about recovery. NOTE: I don't think it is sane thing if temporary message buffer is enlarged enough to hold whole stack dumps from INIT, so buffering is disabled during stack dump from INIT-monarch (= default_monarch_init_process). please fix it in future. Signed-off-by: Hidetoshi Seto Acked-by: Russ Anderson Signed-off-by: Tony Luck commit 8aca23103c2ed2cf158adbe92f4f17ee69463d1a Author: Krzysztof Halasa Date: Tue Sep 26 23:24:16 2006 +0200 [PATCH] Make PC300 WAN driver compile again This patch removes accesses to the HDLC-internal data structures from pc300 driver, thus enabling it to compile but breaking part of its functionality. Signed-off-by: Krzysztof Halasa Signed-off-by: Jeff Garzik commit eb2a2fd91f7c8a53b15063d6f08cf22b9a56cbfb Author: Krzysztof Halasa Date: Tue Sep 26 23:23:45 2006 +0200 [PATCH] Modularize generic HDLC This patch enables building of individual WAN protocol support routines (parts of generic HDLC) as separate modules. All protocol-private definitions are moved from hdlc.h file to protocol drivers. User-space interface and interface between generic HDLC and underlying low-level HDLC drivers are unchanged. Signed-off-by: Krzysztof Halasa Signed-off-by: Jeff Garzik commit 816add4e986499145135c4014a7c8a8857f9f3c3 Author: Jes Sorensen Date: Thu Sep 14 07:10:30 2006 -0400 [IA64] trim output of show_mem() Cut the number of lines of memory info output per node from five to one line. Signed-off-by: Jes Sorensen Signed-off-by: Tony Luck commit fb4633019fd0a871cdf315e1f4082f4c6926af82 Author: Jeff Garzik Date: Tue Sep 26 17:16:32 2006 -0400 [libata] One more s/15/ATA_SECONDARY_IRQ/ substitution Signed-off-by: Jeff Garzik commit 709a6c1c07673a9f7879b5f7306dc8d723db93a2 Author: Jes Sorensen Date: Wed Sep 13 08:43:42 2006 -0400 [IA64] show_mem() printk levels Use the default sysrq printk level for printing show_mem() output both for disconfig and contig versions. This is consistent with the printk level used on other architectures (well ia32 at least). Signed-off-by: Jes Sorensen Signed-off-by: Tony Luck commit f5a3f3dc189485d607fbd42678cc23958acc0a6e Author: Zou Nan hai Date: Thu Sep 14 08:25:15 2006 +0800 [IA64] Make gp value point to Region 5 in mca handler MCA dispatch code take physical address of GP passed from SAL, then call DATA_PA_TO_VA twice on GP before call into C code. The first time is in ia64_set_kernel_register, the second time is in VIRTUAL_MODE_ENTER. The gp is changed to a virtual address in region 7 because DATA_PA_TO_VA is implemented by dep instruction. However when notify blocks were called from MCA handler code, because notify blocks are supported by callback function pointers, gp value value was switched to region 5 again. The patch set gp register to kernel gp of region 5 at entry of MCA dispatch. Signed-off-by: Zou Nan hai Signed-off-by: Tony Luck commit efbf3f14204b77e6afc8c13571357173de9ab707 Author: Jeff Garzik Date: Tue Sep 26 17:10:53 2006 -0400 [libata] pata_serverworks: fill in ->irq_clear hook Required by libata, as it is called unconditionally. Fixes an obvious oops. Signed-off-by: Jeff Garzik commit 68d0d7abcc4cfcf0a1eeb49785cb32ec05473e42 Author: Alan Cox Date: Tue Sep 26 22:24:31 2006 +0100 [PATCH] pata_serverworks: correct PCI ID in cable detection table Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 5c55cd63a77a85f603c98c2171a8054ca34b6a9f Author: Tony Luck Date: Tue Sep 26 14:04:42 2006 -0700 Revert "[IA64] Unwire set/get_robust_list" This reverts commit 2636255488484e04d6d54303d2b0ec30f7ef7e02. Jakub Jelinek provided the missing futex_atomic_cmpxchg_inatomic() function, so now it should be safe to re-enable these syscalls. Signed-off-by: Tony Luck commit a192dc16000241dc02990a36b6830839b73c44de Author: Jakub Jelinek Date: Tue Sep 26 14:00:56 2006 -0700 [IA64] Implement futex primitives Implement futex_atomic_op_inuser() and futex_atomic_cmpxchg_inatomic() on IA64 in order to fully support all futex functionality. Signed-off-by: Jakub Jelinek Signed-off-by: David Woodhouse Signed-off-by: Tony Luck commit fd1dfc6f0165e2ad426665e517103672d6832f90 Author: Christoph Lameter Date: Tue Sep 5 11:56:51 2006 -0700 [IA64-SGI] Do not request DMA memory for BTE The GFP_DMA option usually does nothing on SN2 since all of memory is in thei DMA zone and the BTE has always been capable of addressing all of memory. So there is no need to get memory from a restricted range of memory (which is what GFP_DMA is for). Remove useless __GFP_DMA option. Signed-off-by: Christoph Lameter Signed-off-by: Tony Luck commit 35589a8fa8138244e7f2ef9317c440aa580c9335 Author: Keshavamurthy Anil S Date: Tue Sep 26 12:03:13 2006 -0700 [IA64] Move perfmon tables from thread_struct to pfm_context This patch renders thread_struct->pmcs[] and thread_struct->pmds[] OBSOLETE. The actual table is moved to pfm_context structure which saves space in thread_struct (in turn saving space in task_struct which frees up more space for kernel stacks). Signed-off-by: Stephane Eranian Signed-off-by: Anil S Keshavamurthy Signed-off-by: Tony Luck commit dd562c05410e13e878a3ee0deb8ac06db2e132c7 Author: Stephane Eranian Date: Thu Sep 21 10:35:44 2006 -0700 [IA64] Add interface so modules can discover whether multithreading is on. Add is_multithreading_enabled() to check whether multi-threading is enabled independently of which cpu is currently online Signed-off-by: stephane eranian Signed-off-by: Tony Luck commit fd32cb3a9c9f9399421408e8734cd8a6d9d1a09f Author: Keshavamurthy Anil S Date: Mon Sep 25 16:32:20 2006 -0700 [IA64] kprobes: fixup the pagefault exception caused by probehandlers If the user-specified kprobe handler causes the page fault when accessing user space address, fixup this fault since do_page_fault() should not continue as the kprobe handler are run with preemption disabled. Signed-off-by: Anil S Keshavamurthy Signed-off-by: Andrew Morton Signed-off-by: Tony Luck commit 214ddde2f95037e129eff7e895869771719c7c1b Author: bibo mao Date: Tue Sep 26 11:20:37 2006 -0700 [IA64] kprobe opcode 16 bytes alignment on IA64 On IA64 instruction opcode must be 16 bytes alignment, in kprobe structure there is one element to save original instruction, currently saved opcode is not statically allocated in kprobe structure, that can not assure 16 bytes alignment. This patch dynamically allocated kprobe instruction opcode to assure 16 bytes alignment. Signed-off-by: bibo mao Acked-by: Anil S Keshavamurthy Signed-off-by: Tony Luck commit daac0acd597618b99bba5f8fff31f21e4f283154 Author: Alan Cox Date: Tue Sep 26 17:55:37 2006 +0100 [PATCH] libata-sff: use our IRQ defines Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit c961922b73dab429a759f560952fd4c3f60bd6b3 Author: Alan Cox Date: Tue Sep 26 17:53:38 2006 +0100 [PATCH] libata-eh: Remove layering violation and duplication when handling absent ports This removes the layering violation where drivers have to fiddle directly with EH flags. Instead we now recognize -ENOENT means "no port" and do the handling in the core code. This also removes an instance of a call to disable the port, and an identical printk from each driver doing this. Even better - future rule changes will be in one place only. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 4735ebedf37731160e3d3efc9fc9d4939c66fefa Author: Alan Cox Date: Tue Sep 26 17:37:22 2006 +0100 [PATCH] libata: tighten rules for legacy dependancies The legacy and QDI drivers are ISA/VLB bus [we don't have a VLB define but ISA will do nicely]. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 02f076aaa1478a91762de522ecb029efbc279690 Author: Alan Cox Date: Tue Sep 26 17:35:32 2006 +0100 [PATCH] libata: refuse to register IRQless ports We don't currently support pure polled operation so when we meet a BIOS which forgot to assign an IRQ to a PCI device it all goes a little pear shaped. Trap this case properly. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit e8216dee838c09776680a6f1a2e54d81f3cdfa14 Author: Heiko Carstens Date: Mon Sep 25 23:33:11 2006 -0700 [PATCH] s390: fix cmm kernel thread handling Convert cmm's usage of kernel_thread to kthread_run. Also create the cmmthread at module load time, so it is possible to check if creation of the thread fails. In addition the cmmthread now gets terminated when the module gets unloaded instead of leaving a stale kernel thread. Also check the return values of other registration functions at module load and handle their return values appropriately. Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8df8c3304cfc7d68e9a6a7b6df6c64783cd6991 Author: Jeff Dike Date: Mon Sep 25 23:33:10 2006 -0700 [PATCH] Make UML use ptrace-abi.h Include the host architecture's ptrace-abi.h instead of ptrace.h. There was some cpp mangling of names around the ptrace.h include to avoid symbol clashes between UML and the host architecture. Most of these can go away. The exception is struct pt_regs, which is convenient to have in userspace, but must be renamed in order that UML can define its own. ptrace-x86_64.h needed to have some now-obsolete cpp cruft and a declaration removed. Signed-off-by: Jeff Dike Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 70e0eb8ef143f3729065c504177413ffe165af22 Author: Jeff Dike Date: Mon Sep 25 23:33:09 2006 -0700 [PATCH] Split i386 and x86_64 ptrace.h The use of SEGMENT_RPL_MASK in the i386 ptrace.h introduced by x86-allow-a-kernel-to-not-be-in-ring-0.patch broke the UML build, as UML includes the underlying architecture's ptrace.h, but has no easy access to the x86 segment definitions. Rather than kludging around this, as in the past, this patch splits the userspace-usable parts, which are the bits that UML needs, of ptrace.h into ptrace-abi.h, which is included back into ptrace.h. Thus, there is no net effect on i386. As a side-effect, this creates a ptrace header which is close to being usable in /usr/include. x86_64 is also treated in this way for consistency. There was some trailing whitespace there, which is cleaned up. Signed-off-by: Jeff Dike Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b1fc0b1f21c4082d24d1f456a846b4fa7d16a70b Author: Alan Cox Date: Mon Sep 25 23:33:08 2006 -0700 [PATCH] UML: tty locking Ensure current->signal->tty doesn't get freed during log_exec(). Signed-off-by: Alan Cox Acked-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75e29b18d9a46bf3193278e92dc95609a8cca2ab Author: Jeff Dike Date: Mon Sep 25 23:33:08 2006 -0700 [PATCH] uml: stack usage reduction The KSTK_* macros used an inordinate amount of stack. In order to overcome an impedance mismatch between their interface, which just returns a single register value, and the interface of get_thread_regs, which took a full pt_regs, the implementation created an on-stack pt_regs, filled it in, and returned one field. do_task_stat calls KSTK_* twice, resulting in two local pt_regs, blowing out the stack. This patch changes the interface (and name) of get_thread_regs to just return a single register from a jmp_buf. The include of archsetjmp.h" in registers.h to get the definition of jmp_buf exposed a bogus include of in start_up.c. shouldn't be used anywhere any more since UML uses the klibc setjmp/longjmp. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bf61f50d63b4d9e30d7a86a2d44bb300ae7c1dd4 Author: Paolo 'Blaisorblade' Giarrusso Date: Mon Sep 25 23:33:07 2006 -0700 [PATCH] uml: clean our set_ether_mac Clean set_ether_mac usage. Maybe could also be removed, but surely it can't be a global function taking a void* argument. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Acked-by: Jeff Dike Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 602cc2418177a5b80f533f569e5a42c4495988c9 Author: Jeff Dike Date: Mon Sep 25 23:33:06 2006 -0700 [PATCH] uml: Remove unused variable timer_irq_inited was useless, so it is removed. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 537ae946e808d0f22d660f7a3500832fe0c07d14 Author: Jeff Dike Date: Mon Sep 25 23:33:05 2006 -0700 [PATCH] uml: timer cleanups set_interval returns an error instead of panicing if setitimer fails. Some of its callers now check the return. enable_timer is largely tt-mode-specific, so it is marked as such, and the only skas-mode caller is made to call set-interval instead. user_time_init was a no-value-added wrapper around set_interval, so it is gone. Since set_interval is now called from kernel code, callers no longer pass ITIMER_* to it. Instead, they pass a flag which is converted into ITIMER_REAL or ITIMER_VIRTUAL. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4b84c69b5f6c08a540e3683f1360a6cdef2806c7 Author: Jeff Dike Date: Mon Sep 25 23:33:04 2006 -0700 [PATCH] uml: Move signal handlers to arch code Have most signals go through an arch-provided handler which recovers the sigcontext and then calls a generic handler. This replaces the ARCH_GET_SIGCONTEXT macro, which was somewhat fragile. On x86_64, recovering %rdx (which holds the sigcontext pointer) must be the first thing that happens. sig_handler duly invokes that first, but there is no guarantee that I can see that instructions won't be reordered such that %rdx is used before that. Having the arch provide the handler seems much more robust. Some signals in some parts of UML require their own handlers - these places don't call set_handler any more. They call sigaction or signal themselves. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 19bdf0409f25a85a45874a5a8da6f3e4edcf4a49 Author: Jeff Dike Date: Mon Sep 25 23:33:04 2006 -0700 [PATCH] uml: SIGIO cleanups - Various cleanups in the sigio code. - Removed explicit zero-initializations of a few structures. - Improved some error messages. - An API change - there was an asymmetry between reactivate_fd calling maybe_sigio_broken, which goes through all the machinery of figuring out if a file descriptor supports SIGIO and applying the workaround to it if not, and deactivate_fd, which just turns off the descriptor. This is changed so that only activate_fd calls maybe_sigio_broken, when the descriptor is first seen. reactivate_fd now calls add_sigio_fd, which is symmetric with ignore_sigio_fd. This removes a recursion which makes a critical section look more critical than it really was, obsoleting a big comment to that effect. This requires keeping track of all descriptors which are getting the SIGIO treatment, not just the ones being polled at any given moment, so that reactivate_fd, through add_sigio_fd, doesn't try to tell the SIGIO thread about descriptors it doesn't care about. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6edf428ed177e333863a8e5c37751a9ec176f241 Author: Jeff Dike Date: Mon Sep 25 23:33:03 2006 -0700 [PATCH] uml: Improve SIGBUS diagnostics UML can get a SIGBUS anywhere if the tmpfs mount being used for its memory runs out of space. This patch adds a printk before the panic to provide a clue as to what likely went wrong. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b7aaad9ba4f2a059a70014be12a921eceebfc47 Author: Jeff Dike Date: Mon Sep 25 23:33:02 2006 -0700 [PATCH] uml: Fix handling of failed execs of helpers There were some bugs in handling failures to exec helper programs. errno was passed back from the child with the wrong sign. It was also ignored. In the case where it mattered, the errno from the (successful) read in the parent was used instead. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e1f65a67d76341795ea527d30bfdca03999d46b Author: Jeff Dike Date: Mon Sep 25 23:33:01 2006 -0700 [PATCH] uml: Whitespace fixes arch/um/kernel/tlb.c had some pretty serious whitespace problems. I also fixed some returns. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f80e9466e18288df7391c9d21532c4125ac9c62 Author: Jeff Dike Date: Mon Sep 25 23:33:01 2006 -0700 [PATCH] uml: Fix stack alignment Stack randomization needs to be conditional on the personality allowing it. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 91b165c0594ab78c64f26d26e3174e6dfd60ed9d Author: Jeff Dike Date: Mon Sep 25 23:33:00 2006 -0700 [PATCH] uml: Use ARRAY_SIZE more assiduously There were a bunch of missed ARRAY_SIZE opportunities. Also, some formatting fixes in the affected areas of code. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13c06be399902c9ebda08e092edb1614bb4a3761 Author: Jeff Dike Date: Mon Sep 25 23:32:59 2006 -0700 [PATCH] uml: Use klibc setjmp/longjmp This patch adds an implementation of setjmp and longjmp to UML, allowing access to the inside of a jmpbuf without needing the access macros formerly provided by libc. The implementation is stolen from klibc. I copy the relevant files into arch/um. I have another patch which avoids the copying, but requires klibc be in the tree. setjmp and longjmp users required some tweaking. Includes of were removed and includes of the UML longjmp.h were added where necessary. There are also replacements of siglongjmp with UML_LONGJMP which I somehow missed earlier. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5c6ba4e08ab9c9e390a0f3a7d9a5c332f5cc6ef Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:58 2006 -0700 [PATCH] PM: Add pm_trace switch Add the pm_trace attribute in /sys/power which has to be explicitly set to one to really enable the "PM tracing" code compiled in when CONFIG_PM_TRACE is set (which modifies the machine's CMOS clock in unpredictable ways). Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7d145aa3abf4d96c91f37c012facd5cfbb9010d1 Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:57 2006 -0700 [PATCH] i386: Detect clock skew during suspend Detect the situations in which the time after a resume from disk would be earlier than the time before the suspend and prevent them from happening on i386. Signed-off-by: Rafael J. Wysocki Acked-by: John Stultz Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e1da95ae38afdcda83328300c4aed755d9fc01a6 Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:57 2006 -0700 [PATCH] suspend: make it possible to disable serial console suspend Hack uart_suspend_port() and uart_resume_port() so that serial console ports are not suspended if CONFIG_DISABLE_CONSOLE_SUSPEND is set. This makes it possible to debug the suspend and resume routines of all device drivers as well as the lowest-level swsusp code with the help of the serial console. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c8eb8b4025175f967af0ba8e933f23aa9954dc35 Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:56 2006 -0700 [PATCH] PM: make it possible to disable console suspending Change suspend_console() so that it waits for all consoles to flush the remaining messages and make it possible to switch the console suspending off with the help of a Kconfig option. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Cc: Stefan Seyfried Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 940864ddabdb180e02041c4dcd46ba6f9eee732f Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:55 2006 -0700 [PATCH] swsusp: Use memory bitmaps during resume Make swsusp use memory bitmaps to store its internal information during the resume phase of the suspend-resume cycle. If the pfns of saveable pages are saved during the suspend phase instead of the kernel virtual addresses of these pages, we can use them during the resume phase directly to set the corresponding bits in a memory bitmap. Then, this bitmap is used to mark the page frames corresponding to the pages that were saveable before the suspend (aka "unsafe" page frames). Next, we allocate as many page frames as needed to store the entire suspend image and make sure that there will be some extra free "safe" page frames for the list of PBEs constructed later. Subsequently, the image is loaded and, if possible, the data loaded from it are written into their "original" page frames (ie. the ones they had occupied before the suspend). The image data that cannot be written into their "original" page frames are loaded into "safe" page frames and their "original" kernel virtual addresses, as well as the addresses of the "safe" pages containing their copies, are stored in a list of PBEs. Finally, the list of PBEs is used to copy the remaining image data into their "original" page frames (this is done atomically, by the architecture-dependent parts of swsusp). Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b788db79896ef2a5817b9395ad63573b254a6d93 Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:54 2006 -0700 [PATCH] swsusp: Introduce memory bitmaps Introduce the memory bitmap data structure and make swsusp use in the suspend phase. The current swsusp's internal data structure is not very efficient from the memory usage point of view, so it seems reasonable to replace it with a data structure that will require less memory, such as a pair of bitmaps. The idea is to use bitmaps that may be allocated as sets of individual pages, so that we can avoid making allocations of order greater than 0. For this reason the memory bitmap structure consists of several linked lists of objects that contain pointers to memory pages with the actual bitmap data. Still, for a typical system all of these lists fit in a single page, so it's reasonable to introduce an additional mechanism allowing us to allocate all of them efficiently without sacrificing the generality of the design. This is done with the help of the chain_allocator structure and associated functions. We need to use two memory bitmaps during the suspend phase of the suspend-resume cycle. One of them is necessary for marking the saveable pages, and the second is used to mark the pages in which to store the copies of them (aka image pages). First, the bitmaps are created and we allocate as many image pages as needed (the corresponding bits in the second bitmap are set as soon as the pages are allocated). Second, the bits corresponding to the saveable pages are set in the first bitmap and the saveable pages are copied to the image pages. Finally, the first bitmap is used to save the kernel virtual addresses of the saveable pages and the second one is used to save the contents of the image pages. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0bcd888d64684f896ffa70c1d16a42b00753c184 Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:52 2006 -0700 [PATCH] swsusp: Introduce some helpful constants Introduce some constants that hopefully will help improve the readability of code in kernel/power/snapshot.c. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75534b50cc658e951bcb213c2763c81e9f7b0b48 Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:52 2006 -0700 [PATCH] Change the name of pagedir_nosave The name of the pagedir_nosave variable does not make sense any more, so it seems reasonable to change it to something more meaningful. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dcbb5a54f6e3984efa24772394f2225b11495c55 Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:51 2006 -0700 [PATCH] swsusp: clean up suspend header Remove some things that are no longer used or defined elsewhere from suspend.h and make the inline version of software_suspend() return the right error code. Signed-off-by: Rafael J. Wysocki Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd560bb2f9e2cd451bb3942af43da19632ba4a8e Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:50 2006 -0700 [PATCH] swsusp: Fix alloc_pagedir Get rid of the FIXME in kernel/power/snapshot.c#alloc_pagedir() and simplify the functions called by it. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f6143aa60ed71e58578bc92cc64d98158a694d99 Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:50 2006 -0700 [PATCH] swsusp: Reorder memory-allocating functions Move some functions in kernel/power/snapshot.c to a better place (in the same file) and introduce free_image_page() (will be necessary in the future). Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f623f0db8e6aa86a37be86167e4ff478821a9f4f Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:49 2006 -0700 [PATCH] swsusp: Fix mark_free_pages Clean up mm/page_alloc.c#mark_free_pages() and make it avoid clearing PageNosaveFree for PageNosave pages. This allows us to get rid of an ugly hack in kernel/power/snapshot.c#copy_data_pages(). Additionally, the page-copying loop in copy_data_pages() is moved to an inline function. Signed-off-by: Rafael J. Wysocki Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e3920fb42c8ddfe63befb54d95c0e13eabacea9b Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:48 2006 -0700 [PATCH] Disable CPU hotplug during suspend The current suspend code has to be run on one CPU, so we use the CPU hotplug to take the non-boot CPUs offline on SMP machines. However, we should also make sure that these CPUs will not be enabled by someone else after we have disabled them. The functions disable_nonboot_cpus() and enable_nonboot_cpus() are moved to kernel/cpu.c, because they now refer to some stuff in there that should better be static. Also it's better if disable_nonboot_cpus() returns an error instead of panicking if something goes wrong, and enable_nonboot_cpus() has no reason to panic(), because the CPUs may have been enabled by the userland before it tries to take them online. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8eff5ac294e12531c4195e0c15a222d3c9015e5 Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:46 2006 -0700 [PATCH] Make swsusp avoid memory holes and reserved memory regions on x86_64 On x86_64 machines with more than 2 GB of RAM there are large memory gaps (with no corresponding kernel virtual addresses) and reserved memory regions between areas of usable physical RAM. Moreover, if CONFIG_FLATMEM is set, they appear within the normal zone. swsusp should not try to save them, so the corresponding page structs have to be marked as 'nosave'. Signed-off-by: Rafael J. Wysocki Cc: Mel Gorman Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb13a28b0f5ada60861868c4fa48a12bd0cb8dea Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:46 2006 -0700 [PATCH] swsusp: struct snapshot_handle cleanup Add comments describing struct snapshot_handle and its members, change the confusing name of its member 'page' to 'cur'. Signed-off-by: Rafael J. Wysocki Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae83c5eef59ffe6eb61110b8c8fd1ea3e0881712 Author: Rafael J. Wysocki Date: Mon Sep 25 23:32:45 2006 -0700 [PATCH] swsusp: clean up browsing of pfns Clean up some loops over pfns for each zone in snapshot.c: reduce the number of additions to perform, rework detection of saveable pages and make the code a bit less difficult to understand, hopefully. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 546e0d271941dd1ff6961e2a1f7eac75f1fc277e Author: Andrew Morton Date: Mon Sep 25 23:32:44 2006 -0700 [PATCH] swsusp: read speedup Implement async reads for swsusp resuming. Crufty old PIII testbox: 15.7 MB/s -> 20.3 MB/s Sony Vaio: 14.6 MB/s -> 33.3 MB/s I didn't implement the post-resume bio_set_pages_dirty(). I don't really understand why resume needs to run set_page_dirty() against these pages. It might be a worry that this code modifies PG_Uptodate, PG_Error and PG_Locked against the image pages. Can this possibly affect the resumed-into kernel? Hopefully not, if we're atomically restoring its mem_map? Cc: Pavel Machek Cc: "Rafael J. Wysocki" Cc: Jens Axboe Cc: Laurent Riffard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8c002494b55119a3fd1dddee83b4fb75cfda47e5 Author: Andrew Morton Date: Mon Sep 25 23:32:43 2006 -0700 [PATCH] swsusp: add read-speed instrumentation Add some instrumentation to the swsusp readin code to show what bandwidth we're achieving. Cc: Pavel Machek Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab954160350c91c77ae03740ef90458c3ad5412c Author: Andrew Morton Date: Mon Sep 25 23:32:42 2006 -0700 [PATCH] swsusp: write speedup Switch the swsusp writeout code from 4k-at-a-time to 4MB-at-a-time. Crufty old PIII testbox: 12.9 MB/s -> 20.9 MB/s Sony Vaio: 14.7 MB/s -> 26.5 MB/s The implementation is crude. A better one would use larger BIOs, but wouldn't gain any performance. The memcpys will be mostly pipelined with the IO and basically come for free. The ENOMEM path has not been tested. It should be. Cc: Pavel Machek Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a4f7577c9ef393ca80c783f02ffbc125de771c7 Author: Andrew Morton Date: Mon Sep 25 23:32:41 2006 -0700 [PATCH] swsusp: add write-speed instrumentation Add some instrumentation to the swsusp writeout code to show what bandwidth we're achieving. Cc: Pavel Machek Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 930631edd4b1fe2781d9fe90edbe35d89dfc94cc Author: Steven Whitehouse Date: Mon Sep 25 23:32:40 2006 -0700 [PATCH] add DIV_ROUND_UP() Add the DIV_ROUND_UP() helper macro: divide `n' by `d', rounding up. Stolen from the gfs2 tree(!) because the swsusp patches need it. Signed-off-by: Steven Whitehouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 060ec3d52db417a4fa554b6e14594ca62418c326 Author: Fernando J. Pereda Date: Mon Sep 25 23:32:37 2006 -0700 [PATCH] alpha: Fix ALPHA_EV56 dependencies typo There appears to be a typo in the EV56 config option. NORITAKE and PRIMO are be able to set a variation of either. Signed-off-by: Daniel Drake Cc: Richard Henderson Cc: Ivan Kokshaysky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 182daa55679d9b3557d27609e7ab4bfab749ac5b Author: Josh Triplett Date: Mon Sep 25 23:32:36 2006 -0700 [PATCH] mtrr: Add lock annotations for prepare_set and post_set The functions prepare_set and post_set in kernel/cpu/mtrr/generic.c wrap the spinlock set_atomicity_lock: prepare_set returns with the lock held, and post_set releases the lock without acquiring it. Add lock annotations to these two functions so that sparse can check callers for lock pairing, and so that sparse will not complain about these functions since they intentionally use locks in this manner. Signed-off-by: Josh Triplett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c7f40ff15aba95bc09a759024d62b2c344ef0856 Author: john stultz Date: Mon Sep 25 23:32:35 2006 -0700 [PATCH] i386: Kill references to xtime Remove all references to xtime in i386 and replace them w/ get/set_timeofday(). Requires some ugly and uncertain changes to APM, but has been lightly tested to work. Signed-off-by: John Stultz Acked-by: Ingo Molnar Acked-by: Mikael Pettersson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0f0f1b400ce3c4780b9d974bc69e8b558d99aba4 Author: Alan Cox Date: Mon Sep 25 23:32:34 2006 -0700 [PATCH] Voyager: tty locking Voyager fiddles with current->signal.tty without locking. It turns out that the code in question has already cleared current->signal.tty correctly because daemonize() does the right thing already. The signal handling also appears to be incorrect as it does an unprotected sigfillset that also appears unneccessary. As I don't have a bowtie and am therefore not a qualified voyager maintainer I leave that to James. Signed-off-by: Alan Cox Acked-by: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3bc0dbc81d36fd38991b4373f6de8e1a507605a Author: Andrew Morton Date: Mon Sep 25 23:32:33 2006 -0700 [PATCH] smp_call_function_single() cleanup If we're going to implement smp_call_function_single() on three architecture with the same prototype then it should have a declaration in a non-arch-specific header file. Move it into . Cc: Stephane Eranian Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eaa70773e750cc09d60938bceacd028bc76b8e3a Author: Stephane Eranian Date: Mon Sep 25 23:32:32 2006 -0700 [PATCH] i386: add smp_call_function_single Continiung the series of small patches necessary for the perfmon subsystem, here is a patch that adds support for the smp_call_function_single() function for i386. It exists for almost all other architectures but i386. The perfmon subsystem needs it in one case to free some state on a designated remote CPU. Signed-off-by: Stephane Eranian Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27d26666fc495166036f4ee2208df25ae7f89ab8 Author: Rusty Russell Date: Mon Sep 25 23:32:32 2006 -0700 [PATCH] x86: remove unused include from efi_stub.S Remove unnecessary include from efi_stub.S Signed-off-by: Zachary Amsden Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2965a0e6da0ccd8971ccf2c00a02bfa6e212acdb Author: Rusty Russell Date: Mon Sep 25 23:32:31 2006 -0700 [PATCH] x86: trivial move of ptep_set_access_flags Move ptep_set_access_flags to be closer to the other ptep accessors, and make the indentation standard. Signed-off-by: Zachary Amsden Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6049742dbcecf170e903638a029f4dc280b9d53d Author: Rusty Russell Date: Mon Sep 25 23:32:30 2006 -0700 [PATCH] x86: trivial move of __HAVE macros in i386 pagetable headers Move the __HAVE_ARCH_PTEP defines to accompany the function definitions. Anything else is just a complete nightmare to track through the 2/3-level paging code, and this caused duplicate definitions to be needed (pte_same), which could have easily been taken care of with the asm-generic pgtable functions. Signed-off-by: Zachary Amsden Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 673eae8230a192f07b8715b872d6925521e9738d Author: Rusty Russell Date: Mon Sep 25 23:32:29 2006 -0700 [PATCH] x86: trivial pgtable.h __ASSEMBLY__ move Parsing generic pgtable.h in assembler is simply crazy. None of this file is needed in assembler code, and C inline functions and structures routine break one or more different compiles. Signed-off-by: Zachary Amsden Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 753b9f86e7aef76c2beda32668ce528f90cb1733 Author: Dave Hansen Date: Mon Sep 25 23:32:29 2006 -0700 [PATCH] x86: enable VMSPLIT for highmem kernels The current VMSPLIT Kconfig option is disabled whenever highmem is on. This is a bit screwy because the people who need to change VMSPLIT the most tend to be the ones with highmem and constrained lowmem. So, remove the highmem dependency. But, re-include the dependency for the "full 1GB of lowmem" option. You can't have the full 1GB of lowmem and highmem because of the need for the vmalloc(), kmap(), etc... areas. I thought there would be at least a bit of tweaking to do to get it to work, but everything seems OK. Boot tested on a 4GB x86 machine, and a 12GB 3-node NUMA-Q: elm3b82:~# cat /proc/meminfo MemTotal: 3695412 kB MemFree: 3659540 kB ... LowTotal: 2909008 kB LowFree: 2892324 kB ... elm3b82:~# zgrep PAE /proc/config.gz CONFIG_X86_PAE=y larry:~# cat /proc/meminfo MemTotal: 11845900 kB MemFree: 11786748 kB ... LowTotal: 2855180 kB LowFree: 2830092 kB Signed-off-by: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5091e746848f74c9a2c0579b4ef8d8cd1a6b135d Author: Ian Campbell Date: Mon Sep 25 23:32:28 2006 -0700 [PATCH] Translate asm version of ELFNOTE macro into preprocessor macro I've come across some problems with the assembly version of the ELFNOTE macro currently in -mm. (in x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch) The first is that older gas does not support :varargs in .macro definitions (in my testing 2.17 does while 2.15 does not, I don't know when it became supported). The Changes file says binutils >= 2.12 so I think we need to avoid using it. There are no other uses in mainline or -mm. Old gas appears to just ignore it so you get "too many arguments" type errors. Secondly it seems that passing strings as arguments to assembler macros is broken without varargs. It looks like they get unquoted or each character is treated as a separate argument or something and this causes all manner of grief. I think this is because of the use of -traditional when compiling assembly files. Therefore I have translated the assembler macro into a pre-processor macro. I added the desctype as a separate argument instead of including it with the descdata as the previous version did since -traditional means the ELFNOTE definition after the #else needs to have the same number of arguments (I think so anyway, the -traditional CPP semantics are pretty fscking strange!). With this patch I am able to define elfnotes in assembly like this with both old and new assemblers. ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz, "linux") ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz, "2.6") ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz, "xen-3.0") ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, .long, __PAGE_OFFSET) Which seems reasonable enough. Signed-off-by: Ian Campbell Acked-by: Jeremy Fitzhardinge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9c9b8b388296ad5a306ab238dc677cfe6ff4cb12 Author: Jeremy Fitzhardinge Date: Mon Sep 25 23:32:26 2006 -0700 [PATCH] x86: put .note.* sections into a PT_NOTE segment in vmlinux This patch will pack any .note.* section into a PT_NOTE segment in the output file. To do this, we tell ld that we need a PT_NOTE segment. This requires us to start explicitly mapping sections to segments, so we also need to explicitly create PT_LOAD segments for text and data, and map the sections to them appropriately. Fortunately, each section will default to its previous section's segment, so it doesn't take many changes to vmlinux.lds.S. This only changes i386 for now, but I presume the corresponding changes for other architectures will be as simple. This change also adds , which defines C and Assembler macros for actually creating ELF notes. Signed-off-by: Jeremy Fitzhardinge Cc: Eric W. Biederman Cc: Hollis Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 461a9afff5e731d6337c0f5b08a1e727ccd57e0a Author: Zachary Amsden Date: Mon Sep 25 23:32:25 2006 -0700 [PATCH] x86: add a bootparameter to reserve high linear address space Add a boot parameter to reserve high linear address space for hypervisors. This is necessary to allow dynamically loaded hypervisor modules, which might not happen until userspace is already running, and also provides a useful tool to benchmark the performance impact of reduced lowmem address space. Signed-off-by: Zachary Amsden Signed-off-by: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 052e79941a042e5be4feffa03b1fd60d93fb9e9a Author: Jeremy Fitzhardinge Date: Mon Sep 25 23:32:25 2006 -0700 [PATCH] x86: make __FIXADDR_TOP variable to allow it to make space for a hypervisor Make __FIXADDR_TOP a variable, so that it can be set to not get in the way of address space a hypervisor may want to reserve. Original patch by Gerd Hoffmann Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Chris Wright Cc: Gerd Hoffmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f093394d75cd9c5df82c7a99c5eb5d7ce7ba199 Author: Rusty Russell Date: Mon Sep 25 23:32:24 2006 -0700 [PATCH] x86: roll all the cpuid asm into one __cpuid call It's a little neater, and also means only one place to patch for paravirtualization. Signed-off-by: Rusty Russell Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 027a8c7e6067a1bcdef6775d1b1c08729dfbae51 Author: Chris Wright Date: Mon Sep 25 23:32:23 2006 -0700 [PATCH] x86: implement always-locked bit ops, for memory shared with an SMP hypervisor Add "always lock'd" implementations of set_bit, clear_bit and change_bit and the corresponding test_and_ functions. Also add "always lock'd" implementation of cmpxchg. These give guaranteed strong synchronisation and are required for non-SMP kernels running on an SMP hypervisor. Signed-off-by: Ian Pratt Signed-off-by: Christian Limpach Signed-off-by: Chris Wright Signed-off-by: Jeremy Fitzhardinge Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 05f4a3ec94281347e05c81eafefcfe5ea545c94c Author: Rusty Russell Date: Mon Sep 25 23:32:22 2006 -0700 [PATCH] x86: remove locally-defined ldt structure in favour of standard type arch/i386/kernel/reboot.c defines its own struct to describe an ldt entry: it should use struct Xgt_desc_struct (currently load_ldt is a macro, so doesn't complain: paravirt patches make it warn). Signed-off-by: Rusty Russell Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c94a62aae6ebc99b416e55c023b6f5a1d19a400b Author: Neil Horman Date: Mon Sep 25 23:32:21 2006 -0700 [PATCH] apm: clean up module initalization Clean up module initalization for apm.c. I had started by auditing for proper return code checks in misc_register, but I found that in the event of an initalization failure, a proc file and a kernel thread were left hanging out. this patch properly cleans up those loose ends on any initalization failure. Signed-off-by: Neil Horman Acked-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a750363e6075a28e5542ce93a69c620c0cfd605 Author: Rolf Eike Beer Date: Mon Sep 25 23:32:20 2006 -0700 [PATCH] Use BUG_ON(foo) instead of "if (foo) BUG()" in include/asm-i386/dma-mapping.h Signed-off-by: Rolf Eike Beer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99325326a57b6a56595bb097655bee9fd27d77b0 Author: Chuck Ebbert <76306.1226@compuserve.com> Date: Mon Sep 25 23:32:19 2006 -0700 [PATCH] i386: show_registers(): try harder to print failing code show_registers() tries to dump failing code starting 43 bytes before the offending instruction, but this address can be bad, for example in a device driver where the failing instruction is less than 43 bytes from the start of the driver's code. When that happens, try to dump code starting at the failing instruction instead of printing no code at all. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Cc: Andi Kleen Cc: Keith Owens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1447c27d38faf8fb03d4599e8082e507453ea3cf Author: Clemens Ladisch Date: Mon Sep 25 23:32:17 2006 -0700 [PATCH] hpet rtc emulation: add watchdog timer To prevent the emulated RTC timer from stopping when interrupts are delayed for too long, disable interrupts around all of the register initialization, and check that the interrupt handler did not schedule the next interrupt in the past. Signed-off-by: Clemens Ladisch Cc: Venkatesh Pallipadi Cc: Andi Kleen Cc: Vojtech Pavlik Cc: Robert Picco Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2514183dff2d5282cb745af34f56d1b98e5b2df8 Author: Haavard Skinnemoen Date: Mon Sep 25 23:32:17 2006 -0700 [PATCH] AVR32 MTD: AT49BV6416 platform device for ATSTK1000 FRegister a platform device for the AT49BV6416 NOR flash chip on the ATSTK1000 development board for use by the physmap MTD driver. The SMC timings are set up before the platform device is registered so that no board-specific mapping driver is necessary. Signed-off-by: Haavard Skinnemoen Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc157b75960f1f33566074e820342690216629b9 Author: Haavard Skinnemoen Date: Mon Sep 25 23:32:16 2006 -0700 [PATCH] AVR32 MTD: Static Memory Controller driver This patchset adds the necessary drivers and infrastructure to access the external flash on the ATSTK1000 board through the MTD subsystem. With this stuff in place, it will be possible to use a jffs2 filesystem stored in the external flash as a root filesystem. It might also be possible to update the boot loader if you drop the write protection of partition 0. As suggested by David Woodhouse, I reworked the patches to use the physmap driver instead of introducing a separate mapping driver for the ATSTK1000. I've also cleaned up the hsmc header by removing useless comments and converting spaces to tabs (my headerfile generator needs some work.) Unfortunately, I couldn't unlock the flash in fixup_use_atmel_lock because the erase regions hadn't been set up yet, so I had to do it from cfi_amdstd_setup instead. This patch: This adds a simple API for configuring the static memory controller along with an implementation for the Atmel HSMC. Signed-off-by: Haavard Skinnemoen Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f97f7f9400de47ae837170bb274e90ad3934386 Author: Haavard Skinnemoen Date: Mon Sep 25 23:32:13 2006 -0700 [PATCH] avr32 architecture This adds support for the Atmel AVR32 architecture as well as the AT32AP7000 CPU and the AT32STK1000 development board. AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for cost-sensitive embedded applications, with particular emphasis on low power consumption and high code density. The AVR32 architecture is not binary compatible with earlier 8-bit AVR architectures. The AVR32 architecture, including the instruction set, is described by the AVR32 Architecture Manual, available from http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It features a 7-stage pipeline, 16KB instruction and data caches and a full Memory Management Unit. It also comes with a large set of integrated peripherals, many of which are shared with the AT91 ARM-based controllers from Atmel. Full data sheet is available from http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf while the CPU core implementation including caches and MMU is documented by the AVR32 AP Technical Reference, available from http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf Information about the AT32STK1000 development board can be found at http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918 including a BSP CD image with an earlier version of this patch, development tools (binaries and source/patches) and a root filesystem image suitable for booting from SD card. Alternatively, there's a preliminary "getting started" guide available at http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links to the sources and patches you will need in order to set up a cross-compiling environment for avr32-linux. This patch, as well as the other patches included with the BSP and the toolchain patches, is actively supported by Atmel Corporation. [dmccr@us.ibm.com: Fix more pxx_page macro locations] [bunk@stusta.de: fix `make defconfig'] Signed-off-by: Haavard Skinnemoen Signed-off-by: Adrian Bunk Signed-off-by: Dave McCracken Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53e62d3aaa60590d4a69b4e07c29f448b5151047 Author: Ralf Baechle Date: Mon Sep 25 23:32:10 2006 -0700 [PATCH] Alchemy: Delete unused pt_regs * argument from au1xxx_dbdma_chan_alloc The third argument of au1xxx_dbdma_chan_alloc's callback function is not used anywhere. Signed-off-by: Ralf Baechle Cc: David Howells Cc: Russell King Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cf134483b2cd657039b305777215c531a1009947 Author: David Howells Date: Mon Sep 25 23:32:09 2006 -0700 [PATCH] FRV: Optimise ffs() Optimise ffs(x) by using fls(x & x - 1) which we optimise to use the SCAN instruction. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a8ad27d03f17e6154c61e81d4a7028c56ca6390d Author: David Howells Date: Mon Sep 25 23:32:08 2006 -0700 [PATCH] FRV: Implement fls64() Implement fls64() for FRV without recource to conditional jumps. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 92fc707208bb2e601c24b5ab65db37bcb361b658 Author: David Howells Date: Mon Sep 25 23:32:07 2006 -0700 [PATCH] FRV: Fix fls() to handle bit 31 being set correctly Fix FRV fls() to handle bit 31 being set correctly (it should return 32 not 0). Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af8c65b57aaa4ae321af34dbfc5ca7f5625263fe Author: David Howells Date: Mon Sep 25 23:32:07 2006 -0700 [PATCH] FRV: permit __do_IRQ() to be dispensed with Permit __do_IRQ() to be dispensed with based on a configuration option. Signed-off-by: David Howells Cc: Benjamin Herrenschmidt Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 88d6e19900366781739df033e9c0e2532e715fa5 Author: David Howells Date: Mon Sep 25 23:32:06 2006 -0700 [PATCH] FRV: improve FRV's use of generic IRQ handling Improve FRV's use of generic IRQ handling: (*) Use generic_handle_irq() rather than __do_IRQ() as the latter is obsolete. (*) Don't implement enable() and disable() ops as these will fall back to using unmask() and mask(). (*) Provide mask_ack() functions to avoid a call each to mask() and ack(). (*) Make the cascade handlers always return IRQ_HANDLED. (*) Implement the mask() and unmask() functions in the same order as they're listed in the ops table. Signed-off-by: David Howells Cc: Benjamin Herrenschmidt Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1bcbba306048ed86b935d57a95d887c23d52c94b Author: David Howells Date: Mon Sep 25 23:32:04 2006 -0700 [PATCH] FRV: Use the generic IRQ stuff Make the FRV arch use the generic IRQ code rather than having its own routines for doing so. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d6b5eeea5eb644232cbbbe1c927fdf051e60fa5 Author: Andrew Morton Date: Mon Sep 25 23:32:04 2006 -0700 [PATCH] binfmt_elf: consistently use loff_t As David Howells points out, binfmt_elf sometimes uses off_t, sometimes uses loff_t. Use loff_t throughout. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b20c8122a3204496fca8b5343c93b60fe11dad04 Author: Stephen Smalley Date: Mon Sep 25 23:32:03 2006 -0700 [PATCH] selinux: fix tty locking Take tty_mutex when accessing ->signal->tty in selinux code. Noted by Alan Cox. Longer term, we are looking at refactoring the code to provide better encapsulation of the tty layer, but this is a simple fix that addresses the immediate bug. Signed-off-by: Stephen Smalley Acked-by: Alan Cox Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc7e982b84aceef0a040c88ff659eb5c83818f72 Author: Eric Paris Date: Mon Sep 25 23:32:02 2006 -0700 [PATCH] SELinux: convert sbsec semaphore to a mutex This patch converts the semaphore in the superblock security struct to a mutex. No locking changes or other code changes are done. Signed-off-by: Eric Paris Acked-by: Stephen Smalley Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 23970741720360de9dd0a4e87fbeb1d5927aa474 Author: Eric Paris Date: Mon Sep 25 23:32:01 2006 -0700 [PATCH] SELinux: change isec semaphore to a mutex This patch converts the remaining isec->sem into a mutex. Very similar locking is provided as before only in the faster smaller mutex rather than a semaphore. An out_unlock path is introduced rather than the conditional unlocking found in the original code. Signed-off-by: Eric Paris Acked-by: Stephen Smalley Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 296fddf7513c155adbd3a443d12add1f62b5cddb Author: Eric Paris Date: Mon Sep 25 23:32:00 2006 -0700 [PATCH] SELinux: eliminate inode_security_set_security inode_security_set_sid is only called by security_inode_init_security, which is called when a new file is being created and needs to have its incore security state initialized and its security xattr set. This helper used to be called in other places in the past, but now only has the one. So this patch rolls inode_security_set_sid directly back into security_inode_init_security. There also is no need to hold the isec->sem while doing this, as the inode is not available to other threads at this point in time. Signed-off-by: Eric Paris Acked-by: Stephen Smalley Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3f8771420737004da55159c2f2dc0b6f483a4ef Author: Darrel Goeddel Date: Mon Sep 25 23:31:59 2006 -0700 [PATCH] selinux: add support for range transitions on object classes Introduces support for policy version 21. This version of the binary kernel policy allows for defining range transitions on security classes other than the process security class. As always, backwards compatibility for older formats is retained. The security class is read in as specified when using the new format, while the "process" security class is assumed when using an older policy format. Signed-off-by: Darrel Goeddel Signed-off-by: Stephen Smalley Acked-by: James Morris Acked-by: Eric Paris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 016b9bdb81d9c9c7800e4e224ade38d8b37669d3 Author: Stephen Smalley Date: Mon Sep 25 23:31:58 2006 -0700 [PATCH] selinux: enable configuration of max policy version Enable configuration of SELinux maximum supported policy version to support legacy userland (init) that does not gracefully handle kernels that support newer policy versions two or more beyond the installed policy, as in FC3 and FC4. [bunk@stusta.de: improve Kconfig help text] Signed-off-by: Stephen Smalley Acked-by: James Morris Acked-by: Eric Paris Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a2f44f01a67a6ecca71515af999895b45a2aeb0 Author: Stephen Smalley Date: Mon Sep 25 23:31:58 2006 -0700 [PATCH] selinux: replace ctxid with sid in selinux_audit_rule_match interface Replace ctxid with sid in selinux_audit_rule_match interface for consistency with other interfaces. Signed-off-by: Stephen Smalley Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a70cd40cb291c25b67ec0da715a49d76719329d Author: Stephen Smalley Date: Mon Sep 25 23:31:57 2006 -0700 [PATCH] selinux: rename selinux_ctxid_to_string Rename selinux_ctxid_to_string to selinux_sid_to_string to be consistent with other interfaces. Signed-off-by: Stephen Smalley Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 62bac0185ad3dfef11d9602980445c54d45199c6 Author: Stephen Smalley Date: Mon Sep 25 23:31:56 2006 -0700 [PATCH] selinux: eliminate selinux_task_ctxid Eliminate selinux_task_ctxid since it duplicates selinux_task_get_sid. Signed-off-by: Stephen Smalley Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89fa30242facca249aead2aac03c4c69764f911c Author: Christoph Lameter Date: Mon Sep 25 23:31:55 2006 -0700 [PATCH] NUMA: Add zone_to_nid function There are many places where we need to determine the node of a zone. Currently we use a difficult to read sequence of pointer dereferencing. Put that into an inline function and use throughout VM. Maybe we can find a way to optimize the lookup in the future. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4415cc8df630b05d3a54267d5f3e5c0b63a4ec05 Author: Christoph Lameter Date: Mon Sep 25 23:31:55 2006 -0700 [PATCH] Hugepages: Use page_to_nid rather than traversing zone pointers I found two location in hugetlb.c where we chase pointer instead of using page_to_nid(). Page_to_nid is more effective and can get the node directly from page flags. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5a291b98b2116d669449885abef3000f747504b3 Author: Ram Gupta Date: Mon Sep 25 23:31:54 2006 -0700 [PATCH] oom-kill: update comments to reflect current code Update the comments for __oom_kill_task() to reflect the code changes. Signed-off-by: Ram Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 83e33a4711760469f5c3861b8ffea4947656d4eb Author: Christoph Lameter Date: Mon Sep 25 23:31:53 2006 -0700 [PATCH] zone reclaim with slab: avoid unecessary off node allocations Minor performance fix. If we reclaimed enough slab pages from a zone then we can avoid going off node with the current allocation. Take care of updating nr_reclaimed when reclaiming from the slab. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ff38490c836dc379ff7ec45b10a15a662f4e5f6 Author: Christoph Lameter Date: Mon Sep 25 23:31:52 2006 -0700 [PATCH] zone_reclaim: dynamic slab reclaim Currently one can enable slab reclaim by setting an explicit option in /proc/sys/vm/zone_reclaim_mode. Slab reclaim is then used as a final option if the freeing of unmapped file backed pages is not enough to free enough pages to allow a local allocation. However, that means that the slab can grow excessively and that most memory of a node may be used by slabs. We have had a case where a machine with 46GB of memory was using 40-42GB for slab. Zone reclaim was effective in dealing with pagecache pages. However, slab reclaim was only done during global reclaim (which is a bit rare on NUMA systems). This patch implements slab reclaim during zone reclaim. Zone reclaim occurs if there is a danger of an off node allocation. At that point we 1. Shrink the per node page cache if the number of pagecache pages is more than min_unmapped_ratio percent of pages in a zone. 2. Shrink the slab cache if the number of the nodes reclaimable slab pages (patch depends on earlier one that implements that counter) are more than min_slab_ratio (a new /proc/sys/vm tunable). The shrinking of the slab cache is a bit problematic since it is not node specific. So we simply calculate what point in the slab we want to reach (current per node slab use minus the number of pages that neeed to be allocated) and then repeately run the global reclaim until that is unsuccessful or we have reached the limit. I hope we will have zone based slab reclaim at some point which will make that easier. The default for the min_slab_ratio is 5% Also remove the slab option from /proc/sys/vm/zone_reclaim_mode. [akpm@osdl.org: cleanups] Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 972d1a7b140569084439a81265a0f15b74e924e0 Author: Christoph Lameter Date: Mon Sep 25 23:31:51 2006 -0700 [PATCH] ZVC: Support NR_SLAB_RECLAIMABLE / NR_SLAB_UNRECLAIMABLE Remove the atomic counter for slab_reclaim_pages and replace the counter and NR_SLAB with two ZVC counter that account for unreclaimable and reclaimable slab pages: NR_SLAB_RECLAIMABLE and NR_SLAB_UNRECLAIMABLE. Change the check in vmscan.c to refer to to NR_SLAB_RECLAIMABLE. The intend seems to be to check for slab pages that could be freed. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8417bba4b151346ed475fcc923693c9e3be89063 Author: Christoph Lameter Date: Mon Sep 25 23:31:51 2006 -0700 [PATCH] Replace min_unmapped_ratio by min_unmapped_pages in struct zone *_pages is a better description of the role of the variable. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d00bcc98d7ec2c87391c9d9e1cca519ef64d33ef Author: Christoph Lameter Date: Mon Sep 25 23:31:50 2006 -0700 [PATCH] Extract the allocpercpu functions from the slab allocator The allocpercpu functions __alloc_percpu and __free_percpu() are heavily using the slab allocator. However, they are conceptually slab. This also simplifies SLOB (at this point slob may be broken in mm. This should fix it). Signed-off-by: Christoph Lameter Cc: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 39bbcb8f88154c4ac9853baf3f1134af4c987517 Author: Christoph Lameter Date: Mon Sep 25 23:31:49 2006 -0700 [PATCH] mm: do not check unpopulated zones for draining and counter updates If a zone is unpopulated then we do not need to check for pages that are to be drained and also not for vm counters that may need to be updated. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 006d22d9bbb7e66279ba5cc4556b54eeaf8fd556 Author: Christoph Lameter Date: Mon Sep 25 23:31:48 2006 -0700 [PATCH] Optimize free_one_page Free one_page currently adds the page to a fake list and calls free_page_bulk. Fee_page_bulk takes it off again and then calles __free_one_page. Make free_one_page go directly to __free_one_page. Saves list on / off and a temporary list in free_one_page for higher ordered pages. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 46a82b2d5591335277ed2930611f6acb4ce654ed Author: Dave McCracken Date: Mon Sep 25 23:31:48 2006 -0700 [PATCH] Standardize pxx_page macros One of the changes necessary for shared page tables is to standardize the pxx_page macros. pte_page and pmd_page have always returned the struct page associated with their entry, while pte_page_kernel and pmd_page_kernel have returned the kernel virtual address. pud_page and pgd_page, on the other hand, return the kernel virtual address. Shared page tables needs pud_page and pgd_page to return the actual page structures. There are very few actual users of these functions, so it is simple to standardize their usage. Since this is basic cleanup, I am submitting these changes as a standalone patch. Per Hugh Dickins' comments about it, I am also changing the pxx_page_kernel macros to pxx_page_vaddr to clarify their meaning. Signed-off-by: Dave McCracken Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2e7b7d0aa021847c59f882b066e7d3812902870 Author: Siddha, Suresh B Date: Mon Sep 25 23:31:47 2006 -0700 [PATCH] fix potential stack overflow in mm/slab.c On High end systems (1024 or so cpus) this can potentially cause stack overflow. Fix the stack usage. Signed-off-by: Suresh Siddha Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 980128f223fa3c75e3ebdde650c9f1bcabd4c0a2 Author: Christoph Lameter Date: Mon Sep 25 23:31:46 2006 -0700 [PATCH] Define easier to handle GFP_THISNODE In many places we will need to use the same combination of flags. Specify a single GFP_THISNODE definition for ease of use in gfp.h. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fbd98167e653535c5816be154f2149c0efa7757d Author: Christoph Lameter Date: Mon Sep 25 23:31:45 2006 -0700 [PATCH] Profiling: require buffer allocation on the correct node Profiling really suffers with off node buffers. Fail if no memory is available on the nodes. The profiling code can deal with these failures should they occur. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1192d526412b1b8ccb1493064cea06efc12c772b Author: Christoph Lameter Date: Mon Sep 25 23:31:45 2006 -0700 [PATCH] Cleanup: Add zone pointer to get_page_from_freelist There are frequent references to *z in get_page_from_freelist. Add an explicit zone variable that can be used in all these places. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bd1b1677b5d4f39deda068bf5cc43ce3aaec839f Author: Christoph Lameter Date: Mon Sep 25 23:31:44 2006 -0700 [PATCH] Guarantee that the uncached allocator gets pages on the correct node The uncached allocator manages per node pools. Specify __GFP_THISNODE in order to force allocation on the indicated node or fail. The uncached allocator has already logic to deal with failing allocations. Signed-off-by: Christoph Lameter Cc: Andy Whitcroft Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d99cfb5f46191fc68f1343feeb2cf835001f7d7 Author: Christoph Lameter Date: Mon Sep 25 23:31:43 2006 -0700 [PATCH] sys_move_pages: Do not fall back to other nodes If the user specified a node where we should move the page to then we really do not want any other node. Signed-off-by: Christoph Lameter Cc: Andy Whitcroft Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b819d204cf602eab1a53a9ec4b8d2ca51e02a1d Author: Christoph Lameter Date: Mon Sep 25 23:31:40 2006 -0700 [PATCH] Add __GFP_THISNODE to avoid fallback to other nodes and ignore cpuset/memory policy restrictions Add a new gfp flag __GFP_THISNODE to avoid fallback to other nodes. This flag is essential if a kernel component requires memory to be located on a certain node. It will be needed for alloc_pages_node() to force allocation on the indicated node and for alloc_pages() to force allocation on the current node. Signed-off-by: Christoph Lameter Cc: Andy Whitcroft Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 056c62418cc639bf2fe962c6a6ee56054b838bc7 Author: Ravikiran G Thirumalai Date: Mon Sep 25 23:31:38 2006 -0700 [PATCH] slab: fix lockdep warnings Place the alien array cache locks of on slab malloc slab caches on a seperate lockdep class. This avoids false positives from lockdep [akpm@osdl.org: build fix] Signed-off-by: Ravikiran Thirumalai Signed-off-by: Shai Fultheim Cc: Thomas Gleixner Acked-by: Arjan van de Ven Cc: Ingo Molnar Cc: Pekka Enberg Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ed3a4ef95ef1a13a424378c34ebd9b7e593f212 Author: Christoph Lameter Date: Mon Sep 25 23:31:38 2006 -0700 [PATCH] slab: do not panic when alloc_kmemlist fails and slab is up It is fairly easy to get a system to oops by simply sizing a cache via /proc in such a way that one of the chaches (shared is easiest) becomes bigger than the maximum allowed slab allocation size. This occurs because enable_cpucache() fails if it cannot reallocate some caches. However, enable_cpucache() is used for multiple purposes: resizing caches, cache creation and bootstrap. If the slab is already up then we already have working caches. The resize can fail without a problem. We just need to return the proper error code. F.e. after this patch: # echo "size-64 10000 50 1000" >/proc/slabinfo -bash: echo: write error: Cannot allocate memory notice no OOPS. If we are doing a kmem_cache_create() then we also should not panic but return -ENOMEM. If on the other hand we do not have a fully bootstrapped slab allocator yet then we should indeed panic since we are unable to bring up the slab to its full functionality. Signed-off-by: Christoph Lameter Cc: Pekka Enberg Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 117f6eb1d8b8deb6f19fc88fc15bdb413c2a0c79 Author: Christoph Lameter Date: Mon Sep 25 23:31:37 2006 -0700 [PATCH] slab: extract __kmem_cache_destroy from kmem_cache_destroy The ability to free memory allocated to a slab cache is also useful if an error occurs during setup of a slab. So extract the function. Signed-off-by: Christoph Lameter Cc: Pekka Enberg Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dbe5e69d2d6e591996ea2b817b887d03b60bb143 Author: Christoph Hellwig Date: Mon Sep 25 23:31:36 2006 -0700 [PATCH] slab: optimize kmalloc_node the same way as kmalloc [akpm@osdl.org: export fix] Signed-off-by: Christoph Hellwig Acked-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da6052f7b33abe55fbfd7d2213815f58c00a88d4 Author: Nick Piggin Date: Mon Sep 25 23:31:35 2006 -0700 [PATCH] update some mm/ comments Let's try to keep mm/ comments more useful and up to date. This is a start. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5ac9c5aec7c4bc57fa93f2d37d760a22cb7bd33 Author: Ravikiran G Thirumalai Date: Mon Sep 25 23:31:34 2006 -0700 [PATCH] Add some comments to slab.c Also, checks if we get a valid slabp_cache for off slab slab-descriptors. We should always get this. If we don't, then in that case we, will have to disable off-slab descriptors for this cache and do the calculations again. This is a rare case, so add a BUG_ON, for now, just in case. Signed-off-by: Alok N Kataria Signed-off-by: Ravikiran Thirumalai Signed-off-by: Shai Fultheim Cc: Pekka Enberg Cc: Manfred Spraul Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dfd54cbcc0b834652389ce99b5e656ea5f44a3c1 Author: Heiko Carstens Date: Mon Sep 25 23:31:33 2006 -0700 [PATCH] bootmem: use MAX_DMA_ADDRESS instead of LOW32LIMIT Introduce ARCH_LOW_ADDRESS_LIMIT which can be set per architecture to override the 4GB default limit used by the bootmem allocater within __alloc_bootmem_low() and __alloc_bootmem_low_node(). E.g. s390 needs a 2GB limit instead of 4GB. Acked-by: Ingo Molnar Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b72f160443cb78b2f8addae6e331d2adaa70f869 Author: Nick Piggin Date: Mon Sep 25 23:31:32 2006 -0700 [PATCH] oom: more printk Print the name of the task invoking the OOM killer. Could make debugging easier. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5081dde33f7a61d28d9b185cc386f12cb837c7a4 Author: Nick Piggin Date: Mon Sep 25 23:31:32 2006 -0700 [PATCH] oom: kthread infinite loop fix Skip kernel threads, rather than having them return 0 from badness. Theoretically, badness might truncate all results to 0, thus a kernel thread might be picked first, causing an infinite loop. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af5b912435de32fbede08cee949429823ed49781 Author: Nick Piggin Date: Mon Sep 25 23:31:31 2006 -0700 [PATCH] oom: swapoff tasks tweak PF_SWAPOFF processes currently cause select_bad_process to return straight away. Instead, give them high priority, so we will kill them first, however we also first ensure no parallel OOM kills are happening at the same time. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a3ede107e422a0c53d28024b0aa902ca22a8768 Author: Nick Piggin Date: Mon Sep 25 23:31:30 2006 -0700 [PATCH] oom: handle oom_disable exiting Having the oomkilladj == OOM_DISABLE check before the releasing check means that oomkilladj == OOM_DISABLE tasks exiting will not stop the OOM killer. Moving the test down will give the desired behaviour. Also: it will allow them to "OOM-kill" themselves if they are exiting. As per the previous patch, this is required to prevent OOM killer deadlocks (and they don't actually get killed, because they're already exiting -- they're simply allowed access to memory reserves). Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 50ec3bbffbe8a96347c54832d48110a5bc9e9ff8 Author: Nick Piggin Date: Mon Sep 25 23:31:29 2006 -0700 [PATCH] oom: handle current exiting If current *is* exiting, it should actually be allowed to access reserved memory rather than OOM kill something else. Can't do this via a straight check in page_alloc.c because that would allow multiple tasks to use up reserves. Instead cause current to OOM-kill itself which will mark it as TIF_MEMDIE. The current procedure of simply aborting the OOM-kill if a task is exiting can lead to OOM deadlocks. In the case of killing a PF_EXITING task, don't make a lot of noise about it. This becomes more important in future patches, where we can "kill" OOM_DISABLE tasks. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7887a3da753e1ba8244556cc9a2b38c815bfe256 Author: Nick Piggin Date: Mon Sep 25 23:31:29 2006 -0700 [PATCH] oom: cpuset hint cpuset_excl_nodes_overlap does not always indicate that killing a task will not free any memory we for us. For example, we may be asking for an allocation from _anywhere_ in the machine, or the task in question may be pinning memory that is outside its cpuset. Fix this by just causing cpuset_excl_nodes_overlap to reduce the badness rather than disallow it. Signed-off-by: Nick Piggin Acked-by: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ff1ffb4870b007b86f21e5f27eeb11498c4c077 Author: Nick Piggin Date: Mon Sep 25 23:31:28 2006 -0700 [PATCH] oom: reclaim_mapped on oom Potentially it takes several scans of the lru lists before we can even start reclaiming pages. mapped pages, with young ptes can take 2 passes on the active list + one on the inactive list. But reclaim_mapped may not always kick in instantly, so it could take even more than that. Raise the threshold for marking a zone as all_unreclaimable from a factor of 4 time the pages in the zone to 6. Introduce a mechanism to force reclaim_mapped if we've reached a factor 3 and still haven't made progress. Previously, a customer doing stress testing was able to easily OOM the box after using only a small fraction of its swap (~100MB). After the patches, it would only OOM after having used up all swap (~800MB). Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 408d85441cd5a9bd6bc851d677a10c605ed8db5f Author: Nick Piggin Date: Mon Sep 25 23:31:27 2006 -0700 [PATCH] oom: use unreclaimable info __alloc_pages currently starts shooting if page reclaim has failed to free up swap_cluster_max pages in one run through the priorities. This is not always a good indicator on its own, so make use of the all_unreclaimable logic as well: don't consider going OOM until all zones we're interested in are unreclaimable. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6ddab3b9ebebc88bfdd8107c64f12d7e4480c559 Author: Peter Zijlstra Date: Mon Sep 25 23:31:26 2006 -0700 [PATCH] mm: swap write failure fixup Currently we can silently drop data if the write to swap failed. It usually doesn't result in data-corruption because on page-in the process will receive SIGBUS (assuming write-failure implies read-failure). This assumption might or might not be valid. This patch will avoid the page being discarded after a failed write. But will print a warning the sysadmin _should_ take to heart, if a lot of swap space becomes un-writeable, OOM is not far off. Tested by making the write fail 'randomly' once every 50 writes or so. [akpm@osdl.org: printk warning fix] Signed-off-by: Peter Zijlstra Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca5f9703dffa012cc46166e6206c5a992910e041 Author: Pekka Enberg Date: Mon Sep 25 23:31:25 2006 -0700 [PATCH] slab: respect architecture and caller mandated alignment As explained by Heiko, on s390 (32-bit) ARCH_KMALLOC_MINALIGN is set to eight because their common I/O layer allocates data structures that need to have an eight byte alignment. This does not work when CONFIG_SLAB_DEBUG is enabled because kmem_cache_create will override alignment to BYTES_PER_WORD which is four. So change kmem_cache_create to ensure cache alignment is always at minimum what the architecture or caller mandates even if slab debugging is enabled. Cc: Heiko Carstens Cc: Christoph Lameter Signed-off-by: Manfred Spraul Signed-off-by: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db37648cd6ce9b828abd6d49aa3d269926ee7b7d Author: Nick Piggin Date: Mon Sep 25 23:31:24 2006 -0700 [PATCH] mm: non syncing lock_page() lock_page needs the caller to have a reference on the page->mapping inode due to sync_page, ergo set_page_dirty_lock is obviously buggy according to its comments. Solve it by introducing a new lock_page_nosync which does not do a sync_page. akpm: unpleasant solution to an unpleasant problem. If it goes wrong it could cause great slowdowns while the lock_page() caller waits for kblockd to perform the unplug. And if a filesystem has special sync_page() requirements (none presently do), permanent hangs are possible. otoh, set_page_dirty_lock() is usually (always?) called against userspace pages. They are always up-to-date, so there shouldn't be any pending read I/O against these pages. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28e4d965e6131ace1e813e93aebca89ac6b82dc1 Author: Nick Piggin Date: Mon Sep 25 23:31:23 2006 -0700 [PATCH] mm: remove_mapping() safeness Some users of remove_mapping had been unsafe. Modify the remove_mapping precondition to ensure the caller has locked the page and obtained the correct mapping. Modify callers to ensure the mapping is the correct one. [hugh@veritas.com: swapper_space fix] Signed-off-by: Nick Piggin Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bfa5bf6d6446f0028187a727f792fbc7934228ad Author: Rolf Eike Beer Date: Mon Sep 25 23:31:22 2006 -0700 [PATCH] Add kerneldocs for some functions in mm/memory.c These functions are already documented quite well with long comments. Now add kerneldoc style header to make this turn up in everyones favorite doc format. Signed-off-by: Rolf Eike Beer Cc: "Randy.Dunlap" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ff6f08295d90ab20d25200ef485ebb45b1b8d71 Author: Martin Peschke Date: Mon Sep 25 23:31:21 2006 -0700 [PATCH] CPU hotplug compatible alloc_percpu() This patch splits alloc_percpu() up into two phases. Likewise for free_percpu(). This allows clients to limit initial allocations to online cpu's, and to populate or depopulate per-cpu data at run time as needed: struct my_struct *obj; /* initial allocation for online cpu's */ obj = percpu_alloc(sizeof(struct my_struct), GFP_KERNEL); ... /* populate per-cpu data for cpu coming online */ ptr = percpu_populate(obj, sizeof(struct my_struct), GFP_KERNEL, cpu); ... /* access per-cpu object */ ptr = percpu_ptr(obj, smp_processor_id()); ... /* depopulate per-cpu data for cpu going offline */ percpu_depopulate(obj, cpu); ... /* final removal */ percpu_free(obj); Signed-off-by: Martin Peschke Cc: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8bc719d3cab8414938f9ea6e33b58d8810d18068 Author: Martin Schwidefsky Date: Mon Sep 25 23:31:20 2006 -0700 [PATCH] out of memory notifier Add a notifer chain to the out of memory killer. If one of the registered callbacks could release some memory, do not kill the process but return and retry the allocation that forced the oom killer to run. The purpose of the notifier is to add a safety net in the presence of memory ballooners. If the resource manager inflated the balloon to a size where memory allocations can not be satisfied anymore, it is better to deflate the balloon a bit instead of killing processes. The implementation for the s390 ballooner is included. [akpm@osdl.org: cleanups] Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 19655d3487001d7df0e10e9cbfc27c758b77c2b5 Author: Christoph Lameter Date: Mon Sep 25 23:31:19 2006 -0700 [PATCH] linearly index zone->node_zonelists[] I wonder why we need this bitmask indexing into zone->node_zonelists[]? We always start with the highest zone and then include all lower zones if we build zonelists. Are there really cases where we need allocation from ZONE_DMA or ZONE_HIGHMEM but not ZONE_NORMAL? It seems that the current implementation of highest_zone() makes that already impossible. If we go linear on the index then gfp_zone() == highest_zone() and a lot of definitions fall by the wayside. We can now revert back to the use of gfp_zone() in mempolicy.c ;-) Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f6726e54a9410e2e4cee864947c05e954051916 Author: Christoph Lameter Date: Mon Sep 25 23:31:18 2006 -0700 [PATCH] Apply type enum zone_type After we have done this we can now do some typing cleanup. The memory policy layer keeps a policy_zone that specifies the zone that gets memory policies applied. This variable can now be of type enum zone_type. The check_highest_zone function and the build_zonelists funnctionm must then also take a enum zone_type parameter. Plus there are a number of loops over zones that also should use zone_type. We run into some troubles at some points with functions that need a zone_type variable to become -1. Fix that up. [pj@sgi.com: fix set_mempolicy() crash] Signed-off-by: Christoph Lameter Signed-off-by: Paul Jackson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e4785bcf0c8503224fa6c17d8e0228de781bff6 Author: Christoph Lameter Date: Mon Sep 25 23:31:17 2006 -0700 [PATCH] mempolicies: fix policy_zone check There is a check in zonelist_policy that compares pieces of the bitmap obtained from a gfp mask via GFP_ZONETYPES with a zone number in function zonelist_policy(). The bitmap is an ORed mask of __GFP_DMA, __GFP_DMA32 and __GFP_HIGHMEM. The policy_zone is a zone number with the possible values of ZONE_DMA, ZONE_DMA32, ZONE_HIGHMEM and ZONE_NORMAL. These are two different domains of values. For some reason seemed to work before the zone reduction patchset (It definitely works on SGI boxes since we just have one zone and the check cannot fail). With the zone reduction patchset this check definitely fails on systems with two zones if the system actually has memory in both zones. This is because ZONE_NORMAL is selected using no __GFP flag at all and thus gfp_zone(gfpmask) == 0. ZONE_DMA is selected when __GFP_DMA is set. __GFP_DMA is 0x01. So gfp_zone(gfpmask) == 1. policy_zone is set to ZONE_NORMAL (==1) if ZONE_NORMAL and ZONE_DMA are populated. For ZONE_NORMAL gfp_zone() yields 0 which is < policy_zone(ZONE_NORMAL) and so policy is not applied to regular memory allocations! Instead gfp_zone(__GFP_DMA) == 1 which results in policy being applied to DMA allocations! What we realy want in that place is to establish the highest allowable zone for a given gfp_mask. If the highest zone is higher or equal to the policy_zone then memory policies need to be applied. We have such a highest_zone() function in page_alloc.c. So move the highest_zone() function from mm/page_alloc.c into include/linux/gfp.h. On the way we simplify the function and use the new zone_type that was also introduced with the zone reduction patchset plus we also specify the right type for the gfp flags parameter. Signed-off-by: Christoph Lameter Signed-off-by: Lee Schermerhorn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b9b15780f808efa2c897f337644ba7a2bec03ecc Author: Christoph Lameter Date: Mon Sep 25 23:31:16 2006 -0700 [PATCH] reduce MAX_NR_ZONES: fix i386 SRAT check for MAX_NR_ZONES We cannot check MAX_NR_ZONES since it not defined in the preprocessor anymore. So remove the check. The maximum number of zones per node for i386 is 3 since i386 does not support ZONE_DMA32. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27bf71c2a7e596ed34e9bf2d4a5030321a09a1ad Author: Christoph Lameter Date: Mon Sep 25 23:31:15 2006 -0700 [PATCH] reduce MAX_NR_ZONES: remove display of counters for unconfigured zones eventcounters: Do not display counters for zones that are not available on an arch Do not define or display counters for the DMA32 and the HIGHMEM zone if such zones were not configured. [akpm@osdl.org: s390 fix] [heiko.carstens@de.ibm.com: s390 fix] Signed-off-by: Christoph Lameter Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e53ef38d05dd59ed281a35590e4a5b64d8ff4c52 Author: Christoph Lameter Date: Mon Sep 25 23:31:14 2006 -0700 [PATCH] reduce MAX_NR_ZONES: make ZONE_HIGHMEM optional Make ZONE_HIGHMEM optional - ifdef out code and definitions related to CONFIG_HIGHMEM - __GFP_HIGHMEM falls back to normal allocations if there is no ZONE_HIGHMEM - GFP_ZONEMASK becomes 0x01 if there is no DMA32 and no HIGHMEM zone. [jdike@addtoit.com: build fix] Signed-off-by: Jeff Dike Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb0e7942bdcbbd2f90e61cb4cfa4fa892a873f8a Author: Christoph Lameter Date: Mon Sep 25 23:31:13 2006 -0700 [PATCH] reduce MAX_NR_ZONES: make ZONE_DMA32 optional Make ZONE_DMA32 optional - Add #ifdefs around ZONE_DMA32 specific code and definitions. - Add CONFIG_ZONE_DMA32 config option and use that for x86_64 that alone needs this zone. - Remove the use of CONFIG_DMA_IS_DMA32 and CONFIG_DMA_IS_NORMAL for ia64 and fix up the way per node ZVCs are calculated. - Fall back to prior GFP_ZONEMASK of 0x03 if there is no DMA32 zone. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f1b6248682f8b39ca3c7e549dfc216d26c4109b Author: Christoph Lameter Date: Mon Sep 25 23:31:13 2006 -0700 [PATCH] reduce MAX_NR_ZONES: use enum to define zones, reformat and comment Use enum for zones and reformat zones dependent information Add comments explaning the use of zones and add a zones_t type for zone numbers. Line up information that will be #ifdefd by the following patches. [akpm@osdl.org: comment cleanups] Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 98d2b0ebda72fc39cdefd3720d50b9b3ce409085 Author: Christoph Lameter Date: Mon Sep 25 23:31:12 2006 -0700 [PATCH] reduce MAX_NR_ZONES: page allocator ZONE_HIGHMEM cleanup page allocator ZONE_HIGHMEM fixups 1. We do not need to do an #ifdef in si_meminfo since both counters in use are zero if !CONFIG_HIGHMEM. 2. Add #ifdef in si_meminfo_node instead to avoid referencing zone information for ZONE_HIGHMEM if we do not have HIGHMEM (may not be there after the following patches). 3. Replace the use of ZONE_HIGHMEM with MAX_NR_ZONES in build_zonelists_node 4. build_zonelists_node: Remove BUG_ON for ZONE_HIGHMEM. Zone will be optional soon and thus BUG_ON cannot be triggered anymore. 5. init_free_area_core: Replace a use of ZONE_HIGHMEM with NR_MAX_ZONES. [akpm@osdl.org: cleanups] Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1f60a5a419cc60aff27daffb150f5a3a3a79ef4 Author: Christoph Lameter Date: Mon Sep 25 23:31:11 2006 -0700 [PATCH] reduce MAX_NR_ZONES: move HIGHMEM counters into highmem.c/.h Move totalhigh_pages and nr_free_highpages() into highmem.c/.h Move the totalhigh_pages definition into highmem.c/.h. Move the nr_free_highpages function into highmem.c [yoichi_yuasa@tripeaks.co.jp: build fix] Signed-off-by: Christoph Lameter Signed-off-by: Yoichi Yuasa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 182e8e237349e7b6354f45aee4780b6423fd6a50 Author: Christoph Lameter Date: Mon Sep 25 23:31:10 2006 -0700 [PATCH] reduce MAX_NR_ZONES: make display of highmem counters conditional on CONFIG_HIGHMEM Do not display HIGHMEM memory sizes if CONFIG_HIGHMEM is not set. Make HIGHMEM dependent texts and make display of highmem counters optional Some texts are depending on CONFIG_HIGHMEM. Remove those strings and remove the display of highmem counter values if CONFIG_HIGHMEM is not set. [akpm@osdl.org: remove some ifdefs] Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f06a96844a577c43249fce25809a4fae07407f46 Author: Christoph Lameter Date: Mon Sep 25 23:31:10 2006 -0700 [PATCH] reduce MAX_NR_ZONES: fix MAX_NR_ZONES array initializations Fix array initialization in lots of arches The number of zones may now be reduced from 4 to 2 for many arches. Fix the array initialization for the zones array for all architectures so that it is not initializing a fixed number of elements. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 776ed98b842ee8551793f842fe028c8091f3633e Author: Christoph Lameter Date: Mon Sep 25 23:31:09 2006 -0700 [PATCH] reduce MAX_NR_ZONES: remove two strange uses of MAX_NR_ZONES I keep seeing zones on various platforms that are never used and wonder why we compile support for them into the kernel. Counters show up for HIGHMEM and DMA32 that are alway zero. This patch allows the removal of ZONE_DMA32 for non x86_64 architectures and it will get rid of ZONE_HIGHMEM for arches not using highmem (like 64 bit architectures). If an arch does not define CONFIG_HIGHMEM then ZONE_HIGHMEM will not be defined. Similarly if an arch does not define CONFIG_ZONE_DMA32 then ZONE_DMA32 will not be defined. No current architecture uses all the 4 zones (DMA,DMA32,NORMAL,HIGH) that we have now. The patchset will reduce the number of zones for all platforms. On many platforms that do not have DMA32 or HIGHMEM this will reduce the number of zones by 50%. F.e. ia64 only uses DMA and NORMAL. Large amounts of memory can be saved for larger systemss that may have a few hundred NUMA nodes. With ZONE_DMA32 and ZONE_HIGHMEM support optional MAX_NR_ZONES will be 2 for many non i386 platforms and even for i386 without CONFIG_HIGHMEM set. Tested on ia64, x86_64 and on i386 with and without highmem. The patchset consists of 11 patches that are following this message. One could go even further than this patchset and also make ZONE_DMA optional because some platforms do not need a separate DMA zone and can do DMA to all of memory. This could reduce MAX_NR_ZONES to 1. Such a patchset will hopefully follow soon. This patch: Fix strange uses of MAX_NR_ZONES Sometimes we use MAX_NR_ZONES - x to refer to a zone. Make that explicit. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f71bf0cac730ccb5ebcdf21747db75ae0445ccde Author: Franck Bui-Huu Date: Mon Sep 25 23:31:08 2006 -0700 [PATCH] bootmem: miscellaneous coding style fixes It fixes various coding style issues, specially when spaces are useless. For example '*' go next to the function name. Signed-off-by: Franck Bui-Huu Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbc7b92e337ac349ca917f9bf0b6be4743c14f3a Author: Franck Bui-Huu Date: Mon Sep 25 23:31:07 2006 -0700 [PATCH] bootmem: use pfn/page conversion macros It also creates get_mapsize() helper in order to make the code more readable when it calculates the boot bitmap size. Signed-off-by: Franck Bui-Huu Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e786e86a542ccc1133f333402526ad00b9c088ae Author: Franck Bui-Huu Date: Mon Sep 25 23:31:06 2006 -0700 [PATCH] bootmem: remove useless headers inclusions Signed-off-by: Franck Bui-Huu Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bb0923a66820718f636736b22ce47372f79e3400 Author: Franck Bui-Huu Date: Mon Sep 25 23:31:05 2006 -0700 [PATCH] bootmem: limit to 80 columns width Signed-off-by: Franck Bui-Huu Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 71fb2e8f8753b66b1f4295aa264a2eb4e69381e8 Author: Franck Bui-Huu Date: Mon Sep 25 23:31:05 2006 -0700 [PATCH] bootmem: remove useless parentheses in bootmem header file Signed-off-by: Franck Bui-Huu Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 69d49e681d7c7ed864a1ba45efc1e78433df8b9a Author: Franck Bui-Huu Date: Mon Sep 25 23:31:04 2006 -0700 [PATCH] bootmem: mark link_bootmem() as part of the __init section Signed-off-by: Franck Bui-Huu Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d1a07d487d8b36658404839cdf03a974968cefd Author: Franck Bui-Huu Date: Mon Sep 25 23:31:03 2006 -0700 [PATCH] bootmem: remove useless __init in header file __init in headers is pretty useless because the compiler doesn't check it, and they get out of sync relatively frequently. So if you see an __init in a header file, it's quite unreliable and you need to check the definition anyway. Signed-off-by: Franck Bui-Huu Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 91023300057e96de7f46e95166a3e02394ae72f9 Author: keith mannthey Date: Mon Sep 25 23:31:03 2006 -0700 [PATCH] convert i386 NUMA KVA space to bootmem Address a long standing issue of booting with an initrd on an i386 numa system. Currently (and always) the numa kva area is mapped into low memory by finding the end of low memory and moving that mark down (thus creating space for the kva). The issue with this is that Grub loads initrds into this similar space so when the kernel check the initrd it finds it outside max_low_pfn and disables it (it thinks the initrd is not mapped into usable memory) thus initrd enabled kernels can't boot i386 numa :( My solution to the problem just converts the numa kva area to use the bootmem allocator to save it's area (instead of moving the end of low memory). Using bootmem allows the kva area to be mapped into more diverse addresses (not just the end of low memory) and enables the kva area to be mapped below the initrd if present. I have tested this patch on numaq(no initrd) and summit(initrd) i386 numa based systems. [akpm@osdl.org: cleanups] Signed-off-by: Keith Mannthey Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b221385bc41d6789edde3d2fa0cb20d5045730eb Author: Adrian Bunk Date: Mon Sep 25 23:31:02 2006 -0700 [PATCH] mm/: make functions static This patch makes the following needlessly global functions static: - slab.c: kmem_find_general_cachep() - swap.c: __page_cache_release() - vmalloc.c: __vmalloc_node() Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 204ec841fbea3e5138168edbc3a76d46747cc987 Author: Peter Zijlstra Date: Mon Sep 25 23:31:01 2006 -0700 [PATCH] mm: msync() cleanup With the tracking of dirty pages properly done now, msync doesn't need to scan the PTEs anymore to determine the dirty status. From: Hugh Dickins In looking to do that, I made some other tidyups: can remove several #includes, and sys_msync loop termination not quite right. Most of those points are criticisms of the existing sys_msync, not of your patch. In particular, the loop termination errors were introduced in 2.6.17: I did notice this shortly before it came out, but decided I was more likely to get it wrong myself, and make matters worse if I tried to rush a last-minute fix in. And it's not terribly likely to go wrong, nor disastrous if it does go wrong (may miss reporting an unmapped area; may also fsync file of a following vma). Signed-off-by: Peter Zijlstra Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ee6a6457886a80415db209e87033b63f2b06558c Author: Peter Zijlstra Date: Mon Sep 25 23:31:00 2006 -0700 [PATCH] mm: fixup do_wp_page() Wrt. the recent modifications in do_wp_page() Hugh Dickins pointed out: "I now realize it's right to the first order (normal case) and to the second order (ptrace poke), but not to the third order (ptrace poke anon page here to be COWed - perhaps can't occur without intervening mprotects)." This patch restores the old COW behaviour for anonymous pages. Signed-off-by: Peter Zijlstra Acked-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e88dd6c11c5aef74d8b74a062767add53315533b Author: Peter Zijlstra Date: Mon Sep 25 23:30:59 2006 -0700 [PATCH] mm: small cleanup of install_page() Smallish cleanup to install_page(), could save a memory read (haven't checked the asm output) and sure looks nicer. Signed-off-by: Peter Zijlstra Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1e6098b23bb46e2b488fe9a26f831f867157483 Author: Peter Zijlstra Date: Mon Sep 25 23:30:59 2006 -0700 [PATCH] mm: optimize the new mprotect() code a bit mprotect() resets the page protections, which could result in extra write faults for those pages whose dirty state we track using write faults and are dirty already. Signed-off-by: Peter Zijlstra Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit edc79b2a46ed854595e40edcf3f8b37f9f14aa3f Author: Peter Zijlstra Date: Mon Sep 25 23:30:58 2006 -0700 [PATCH] mm: balance dirty pages Now that we can detect writers of shared mappings, throttle them. Avoids OOM by surprise. Signed-off-by: Peter Zijlstra Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d08b3851da41d0ee60851f2c75b118e1f7a5fc89 Author: Peter Zijlstra Date: Mon Sep 25 23:30:57 2006 -0700 [PATCH] mm: tracking shared dirty pages Tracking of dirty pages in shared writeable mmap()s. The idea is simple: write protect clean shared writeable pages, catch the write-fault, make writeable and set dirty. On page write-back clean all the PTE dirty bits and write protect them once again. The implementation is a tad harder, mainly because the default backing_dev_info capabilities were too loosely maintained. Hence it is not enough to test the backing_dev_info for cap_account_dirty. The current heuristic is as follows, a VMA is eligible when: - its shared writeable (vm_flags & (VM_WRITE|VM_SHARED)) == (VM_WRITE|VM_SHARED) - it is not a 'special' mapping (vm_flags & (VM_PFNMAP|VM_INSERTPAGE)) == 0 - the backing_dev_info is cap_account_dirty mapping_cap_account_dirty(vma->vm_file->f_mapping) - f_op->mmap() didn't change the default page protection Page from remap_pfn_range() are explicitly excluded because their COW semantics are already horrid enough (see vm_normal_page() in do_wp_page()) and because they don't have a backing store anyway. mprotect() is taught about the new behaviour as well. However it overrides the last condition. Cleaning the pages on write-back is done with page_mkclean() a new rmap call. It can be called on any page, but is currently only implemented for mapped pages, if the page is found the be of a VMA that accounts dirty pages it will also wrprotect the PTE. Finally, in fs/buffers.c:try_to_free_buffers(); remove clear_page_dirty() from under ->private_lock. This seems to be safe, since ->private_lock is used to serialize access to the buffers, not the page itself. This is needed because clear_page_dirty() will call into page_mkclean() and would thereby violate locking order. [dhowells@redhat.com: Provide a page_mkclean() implementation for NOMMU] Signed-off-by: Peter Zijlstra Cc: Hugh Dickins Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 725d704ecaca4a43f067092c140d4f3271cf2856 Author: Nick Piggin Date: Mon Sep 25 23:30:55 2006 -0700 [PATCH] mm: VM_BUG_ON Introduce a VM_BUG_ON, which is turned on with CONFIG_DEBUG_VM. Use this in the lightweight, inline refcounting functions; PageLRU and PageActive checks in vmscan, because they're pretty well confined to vmscan. And in page allocate/free fastpaths which can be the hottest parts of the kernel for kbuilds. Unlike BUG_ON, VM_BUG_ON must not be used to execute statements with side-effects, and should not be used outside core mm code. Signed-off-by: Nick Piggin Cc: Hugh Dickins Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a6ca1b99ed434f3fb41bbed647ed36c0420501e5 Author: James Bottomley Date: Mon Sep 25 23:30:55 2006 -0700 [PATCH] update to the kernel kmap/kunmap API Give non-highmem architectures access to the kmap API for the purposes of overriding (this is what the attached patch does). The proposal is that we should now require all architectures with coherence issues to manage data coherence via the kmap/kunmap API. Thus driver writers never have to write code like kmap(page) modify data in page flush_kernel_dcache_page(page) kunmap(page) instead, kmap/kunmap will manage the coherence and driver (and filesystem) writers don't need to worry about how to flush between kmap and kunmap. For most architectures, the page only needs to be flushed if it was actually written to *and* there are user mappings of it, so the best implementation looks to be: clear the page dirty pte bit in the kernel page tables on kmap and on kunmap, check page->mappings for user maps, and then the dirty bit, and only flush if it both has user mappings and is dirty. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3998b9301d3d55be8373add22b6bc5e11c1d9b71 Author: Jan Kara Date: Mon Sep 25 23:30:53 2006 -0700 [PATCH] jbd: fix commit of ordered data buffers Original commit code assumes, that when a buffer on BJ_SyncData list is locked, it is being written to disk. But this is not true and hence it can lead to a potential data loss on crash. Also the code didn't count with the fact that journal_dirty_data() can steal buffers from committing transaction and hence could write buffers that no longer belong to the committing transaction. Finally it could possibly happen that we tried writing out one buffer several times. The patch below tries to solve these problems by a complete rewrite of the data commit code. We go through buffers on t_sync_datalist, lock buffers needing write out and store them in an array. Buffers are also immediately refiled to BJ_Locked list or unfiled (if the write out is completed). When the array is full or we have to block on buffer lock, we submit all accumulated buffers for IO. [suitable for 2.6.18.x around the 2.6.19-rc2 timeframe] Signed-off-by: Jan Kara Cc: Badari Pulavarty Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 632bbfeee4f042c05bc65150b4433a297d3fe387 Author: Jan Blunck Date: Mon Sep 25 23:30:53 2006 -0700 [PATCH] trigger a syntax error if percpu macros are incorrectly used get_cpu_var()/per_cpu()/__get_cpu_var() arguments must be simple identifiers. Otherwise the arch dependent implementations might break. This patch enforces the correct usage of the macros by producing a syntax error if the variable is not a simple identifier. Signed-off-by: Jan Blunck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a2966b48fb784e437520e400ddc94874ddbd4e8 Author: Christoph Lameter Date: Mon Sep 25 23:30:51 2006 -0700 [PATCH] Fix longstanding load balancing bug in the scheduler The scheduler will stop load balancing if the most busy processor contains processes pinned via processor affinity. The scheduler currently only does one search for busiest cpu. If it cannot pull any tasks away from the busiest cpu because they were pinned then the scheduler goes into a corner and sulks leaving the idle processors idle. F.e. If you have processor 0 busy running four tasks pinned via taskset, there are none on processor 1 and one just started two processes on processor 2 then the scheduler will not move one of the two processes away from processor 2. This patch fixes that issue by forcing the scheduler to come out of its corner and retrying the load balancing by considering other processors for load balancing. This patch was originally developed by John Hawkes and discussed at http://marc.theaimsgroup.com/?l=linux-kernel&m=113901368523205&w=2. I have removed extraneous material and gone back to equipping struct rq with the cpu the queue is associated with since this makes the patch much easier and it is likely that others in the future will have the same difficulty of figuring out which processor owns which runqueue. The overhead added through these patches is a single word on the stack if the kernel is configured to support 32 cpus or less (32 bit). For 32 bit environments the maximum number of cpus that can be configued is 255 which would result in the use of 32 bytes additional on the stack. On IA64 up to 1k cpus can be configured which will result in the use of 128 additional bytes on the stack. The maximum additional cache footprint is one cacheline. Typically memory use will be much less than a cacheline and the additional cpumask will be placed on the stack in a cacheline that already contains other local variable. Signed-off-by: Christoph Lameter Cc: John Hawkes Cc: "Siddha, Suresh B" Cc: Ingo Molnar Cc: Nick Piggin Cc: Peter Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28b79ff9661b22e4c41c0d00d4ab8503e810f13d Author: Kyungmin Park Date: Tue Sep 26 09:45:28 2006 +0000 [MTD ONENAND] Check OneNAND lock scheme & all block unlock command support OneNAND lock scheme depends on density and process of chip. Some OneNAND chips support all block unlock Signed-off-by: Kyungmin Park Signed-off-by: David Woodhouse commit 8dd86eebc5315910ebfd9f30f1674254308be4b3 Author: Michael Krufky Date: Sat Sep 16 19:09:38 2006 -0300 V4L/DVB (4641): Trivial: use lowercase letters in hex subsystem ids Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit dab489df2a3eec77e2ed7a4499ec7b9ef09e35b7 Author: Michael Krufky Date: Fri Sep 15 15:41:23 2006 -0300 V4L/DVB (4639): Cx88: add autodetection for alternate revision of Leadtek PVR Add autodetection for PCI subsystem ID 107d:6632, to detect as a Leadtek PVR 2000 Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit aa481a654771217645188b64d82acfc38c2da892 Author: Steven Toth Date: Thu Sep 14 15:41:13 2006 -0300 V4L/DVB (4638): Basic DVB-T and analog TV support for the HVR1300. This is the first in a series of patches to add full WinTV-HVR1300 support to Linux. This first patch will enable analog TV support and DVB-T support. Later patches will add the hardware MPEG encoder support. Signed-off-by: Steven Toth Signed-off-by: Mauro Carvalho Chehab commit 1c2d034e3c0ce4c1c89f1636a9f4aa7615cc7474 Author: Mauro Carvalho Chehab Date: Thu Sep 14 13:36:34 2006 -0300 V4L/DVB (4637): Add a default method for VIDIOC_G_PARM For most drivers, VIDIOC_G_PARM will just return the current standard fps. So, instead of failing, drivers based on video_ioctl2 will implement the default method. Signed-off-by: Mauro Carvalho Chehab commit 3d265c96ccb8f72153b4e926053a79e1a52bf264 Author: Alan Cox Date: Thu Sep 14 11:53:16 2006 -0300 V4L/DVB (4635): Extend bttv and saa7134 to check for both AGP and PCI PCI failure case We could go and work out if the target object is AGP or PCI but the corner case of an Athlon 64 era box with PCI video is sufficiently unusual it doesn't seem worth the extra work, at least until other cases if any pop up. Signed-off-by: Alan Cox Signed-off-by: Mauro Carvalho Chehab commit 13f1371e8fb53df6b0a6c0cc7de56195bf132f1c Author: Alan Cox Date: Thu Sep 14 11:53:09 2006 -0300 V4L/DVB (4634): Zr36120: implement pcipci checks Again depends on the PCIAGP_FAIL patch for a define. Someone with more card knowledge should look at the ALIMAGIK case and whether latency can be safely to set to 0xA or so. Signed-off-by: Alan Cox Signed-off-by: Mauro Carvalho Chehab commit e355880b838c80ff53e6386a1caad10e6f719259 Author: Alan Cox Date: Thu Sep 14 11:47:55 2006 -0300 V4L/DVB (4632): Zoran: Implement pcipci failure check We should be doing this on all devices doing PCI<->PCI DMA. We only set the _FAIL ones when the DMA will fail or may cause crashes. This relies on the PCIAGP_FAIL patch I sent to Andrew already Signed-off-by: Alan Cox Signed-off-by: Mauro Carvalho Chehab commit d7e7a1567894146ca6c9442c824dded4f0f48dde Author: Oliver Endriss Date: Thu Sep 14 00:43:22 2006 -0300 V4L/DVB (4631): Av7110: remove V4L2_CAP_VBI_CAPTURE flag Implement fix suggested by Michael Hunold for a bug reported by Philipp Matthias Hahn: Starting "kdetv" on a Siemens DVB-C 1.x produced an oops because kdetv opened "/dev/vbi0". Remove the V4L2_CAP_VBI_CAPTURE flag because it does not work with this type of hardware anyway. Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab commit d98821e21ecbadb8c4dbf608d25454a8835c0667 Author: Oliver Endriss Date: Thu Sep 14 00:15:13 2006 -0300 V4L/DVB (4630): Av7110: FW_LOADER depemdency fixed Do not select FW_LOADER unless it is really required. Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab commit b04c1baf485f4c3a25d8dbc187156030f9247cb0 Author: Michal Majchrowicz Date: Wed Sep 13 16:42:42 2006 -0300 V4L/DVB (4629): Saa7134: add card support for Proteus Pro 2309 Add card support for Proteus Pro 2309, based on saa7130 bridge Signed-off-by: Michal Majchrowicz Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 666c73d9e123b9ea230fcb1e2bf47fe0294332a8 Author: Sascha Hauer Date: Wed Sep 13 13:26:11 2006 -0300 V4L/DVB (4628): Fix VIDIOC_ENUMSTD ioctl in videodev.c Do not return -EINVAL for index=0 in VIDIOC_ENUMSTD, because it is a valid index Signed-off-by: Sascha Hauer Signed-off-by: Mauro Carvalho Chehab commit d7fbefe06d2061de126095f903359ce1ef61faf3 Author: Sascha Hauer Date: Wed Sep 13 13:26:03 2006 -0300 V4L/DVB (4627): Vivi crashes with mplayer The vivi.current_norm field is not initialized in vivi.c, so a VIDIOC_G_STD ioctl without a prior call to VIDIOC_S_STD gives unpredictable results. mplayer does exactly this. Signed-off-by Sascha Hauer Signed-off-by: Mauro Carvalho Chehab commit 183d896a03e1f0e4ab69d75f123d33a62b47cf03 Author: Mauro Carvalho Chehab Date: Tue Sep 12 20:02:09 2006 -0300 V4L/DVB (4626): On saa7111/7113, LUMA_CTRL need a different value Also sends the proper saa71111 init table. Signed-off-by: Mauro Carvalho Chehab commit bc28287979592c015560f8837a98b63a3be8bbc1 Author: Cedric Le Goater Date: Mon Sep 11 16:31:45 2006 -0300 V4L/DVB (4624): Tvaudio: Replaced kernel_thread() with kthread_run() Replaced kernel_thread() with kthread_run() since kernel_thread() is deprecated in drivers/modules. Removed the completion and the wait queue which are now useless with kthread. Also removed the allow_signal() call as signals don't apply to kernel threads. Fixed a small race condition when thread is stopped. Please check if the timer vs. thread still works fine without the wait queue. Signed-off-by: Cedric Le Goater Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit c93a5c34887426daa70f3caf05881fafb1cd687f Author: Sascha Hauer Date: Mon Sep 11 09:49:19 2006 -0300 V4L/DVB (4622): Copy-paste bug in videodev.c This patch fixes a copy-paste bug in videodev.c where the vidioc_qbuf() function gets called for the dqbuf ioctl. Signed-off-by: Sascha Hauer Signed-off-by: Mauro Carvalho Chehab commit 5ab6b267e5684452e229c58f4a5ba9f267866d42 Author: Jose Alberto Reguero Date: Mon Sep 11 04:34:31 2006 -0300 V4L/DVB (4620): Fix AGC configuration for MOD3000P-based boards While converting the configuration for the old DiB3000MC-module to the new one a wrong AGC configuration was introduced. This is using the old one again. Signed-off-by: Jose Alberto Reguero Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 6386828cb1748ba466e3d9df5d650ffeab937fd2 Author: Mauro Carvalho Chehab Date: Sun Sep 10 12:47:50 2006 -0300 V4L/DVB (4619): Fixes some I2C dependencies on V4L devices Signed-off-by: Mauro Carvalho Chehab commit 83905b02af4ebc1cbc952401788cb92619393d04 Author: Alistair Buxton Date: Sun Sep 10 12:09:22 2006 -0300 V4L/DVB (4617): Problem with dibusb-mb.c USB IDs There seems to be an off by one error in the dibusb-mb.c which causes the "Artec T1 with AN2235" box to be detected as a totally different box - but it only happens if the Artec is one with the correct USB IDs. A patch is attached to the second post. However, even with this patch, the box still won't tune. It will tune using a 2.6.12 kernel though. Signed-off-by: Alistair Buxton Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 774c0de4aed4d5171e8c3cb47402265d278d2591 Author: Allan Third Date: Sun Sep 10 12:05:50 2006 -0300 V4L/DVB (4616): [PATCH] Nebula DigiTV USB RC support Attached is a patch against latest HG which adds remote control support to the DigiTV driver. It works for me; Signed-off-by: Allan Third Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit e9f964da79f6dcdd1c1a85dea84e9e7d7236729e Author: Ricardo Cerqueira Date: Sat Sep 9 12:24:08 2006 -0300 V4L/DVB (4614): Export symbol saa7134_tvaudio_setmute from saa7134 for saa7134-alsa saa7134-alsa now unmutes/mutes the line when opening/closing the capture device, and needs this symbol Signed-off-by: Ricardo Cerqueira Signed-off-by: Mauro Carvalho Chehab commit dafcaaf86a77c086ed663eb25da1ca42800e171c Author: Ricardo Cerqueira Date: Wed Sep 6 06:25:38 2006 -0300 V4L/DVB (4613): Unmute/mute saa7134 when opening/closing the audio capture device. This patch should enable unmuting the audio device when opening it (and posterior muting when closing it), doing away with the need for unmute ioctls or v4lctl usage. Signed-off-by: Ricardo Cerqueira Signed-off-by: Mauro Carvalho Chehab commit c8cd2ad3bb499ad684799b55ca10e260a9e2fd84 Author: Andrew de Quincey Date: Thu Sep 7 02:07:21 2006 -0300 V4L/DVB (4611): Add module-init-tools version comment. I've just determined that module-init-tools >=3.2 is needed for dvb_attach to work. This adds a comment to Kconfig about it. Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 92cd24fea4feefb9bde8efab3fdb25f525220672 Author: Andrew de Quincey Date: Thu Sep 7 00:31:55 2006 -0300 V4L/DVB (4610): Add tua6100 config wrapper I had forgotten to add the wrapper round the tua6100_attach function if its disabled in Kconfig Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 141276b57e1f83a86b8e77554b36511be0a7049c Author: Mauro Carvalho Chehab Date: Wed Sep 6 19:04:28 2006 -0300 V4L/DVB (4609): Improved i2c performance on software bitbang algoritm Software I2C were using a very conservative value of udelay=16, meaning about 20Kbps. According with Philips I2C datasheet, the i2c should answer well for times at the order of 4.7 us. So, using udelay=5 should work for all devices. After this patch, the speed should be close to 66,67 Kbps, with the current kernel software bitbang, with 30/60 duty cycle. Anyway, added a new parameter (i2c_udelay) that would allow using conservative values, if eventually a hardware doesn't support the datasheet values. Thanks to Jean Delvare for pointing this improvement. Signed-off-by: Mauro Carvalho Chehab commit 48c06d5e2d63c1d6282c0f7fe67741a39d6c1852 Author: Mauro Carvalho Chehab Date: Wed Sep 6 09:29:00 2006 -0300 V4L/DVB (4608a): V4L1 API conversion not finished yet Updates feature-removal-schedule.txt to reflect the current scheduled date to convert all V4L1 drivers to V4L2. Signed-off-by: Mauro Carvalho Chehab commit 1c72cfdcea00fbdcae37d096f2e58b4736d305fb Author: Andrew de Quincey Date: Tue Sep 5 17:58:20 2006 -0300 V4L/DVB (4607): Port budget-av to use the new tua6100 driver Port budget-av to use the new tua6100 driver Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 00be2e7c64157c845afff56f25677da706b151b6 Author: Andrew de Quincey Date: Tue Sep 5 17:53:06 2006 -0300 V4L/DVB (4606): Add driver for TUA6100 This driver was originally in budget-av.c, however I have extracted it into a seperate file to permit reuse. I also reworked the code to make it maintainable. I then examined the KNC1 windows drivers and rewrote the code in order to configure the PLL as they do. This solves a lot of reported tuning problems. Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit c4e4aac88737879a562760ac07e51167847f193d Author: Mike Isely Date: Sun Sep 3 13:33:10 2006 -0300 V4L/DVB (4604): Fix broken pvrusb2 build Fix broken build when 24XXX support is not selected. This is required due to the requirement of removing 24XXX ifdef's from the driver source. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 1e9dadbe7a0afa0c3eeae538164d8b9d489d3cc0 Author: Bradley Kite Date: Sat Sep 2 21:14:27 2006 -0300 V4L/DVB (4600): Fix DVB Front-End Signal Strength Inconsistency The cx22702 returns an 8 bit unshifted value for signal strength; this is inconsistent with most other frontends Signed-off-by: Bradley Derek Kite Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 81409ed08a7ecc6a3da08b9b0321fd070c57a721 Author: Bas Bloemsaat Date: Sun Sep 3 09:47:41 2006 -0300 V4L/DVB (4599): Adds Compro PS39U USB ID to Vicam driver Trivial patch to make Compro PS39U WebCam work with linux by using the vicam driver. The camera is just a vicam with another USB ID, so I added that ID to the driver, and it works now. Signed-off-by: Bas Bloemsaat Signed-off-by: Mauro Carvalho Chehab commit 97d9e80e75547e940a24ebcd2ec99e817bcf47d6 Author: Mauro Carvalho Chehab Date: Sun Sep 3 09:38:11 2006 -0300 V4L/DVB (4598): Fix a typo: VRES, instead o HRES Signed-off-by: Mauro Carvalho Chehab commit 3ad9fc37bacd74c5c05eb0bd4b76876e0daf8a2d Author: Mike Isely Date: Sat Sep 2 22:37:52 2006 -0300 V4L/DVB (4597): Improve resolution limit enforcements in pvrusb2 The pvrusb2 driver resolution limits are now programmed the following way, based on empirical measurements of the hardware: Vertical max: 480 for NTSC, 576 otherwise Vertical min: 75 for 24xxx, 17 otherwise Horizontal max: 720 Horizontal min: 720 for 24xxx, 19 otherwise Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 22ebb77dfa94904f534563512b70178f98bbe962 Author: Mike Isely Date: Sat Sep 2 22:33:02 2006 -0300 V4L/DVB (4596): Fix saa7115 miscalculation that breaks NTSC This repairs a problem introduced by a commit earlier applied. Thanks-to: Hans Verkuil Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 7f19d0278c86c7f27df287fd0bd5170fe75dc7d2 Author: Mike Isely Date: Sat Sep 2 15:56:33 2006 -0300 V4L/DVB (4595): Remove CONFIG_VIDEO_PVRUSB2_24XXX from pvrusb2 driver Support for 24xxx devices was previously explicitly bracketed with CONFIG_VIDEO_PVRUSB2_24XXX inside the code because we didn't trust the stability of these changes. We trust it now; so there's no reason to leave this out of the driver anymore. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 4d31256f378e1a5fca7f4f3fb8b0a0aa1fff4312 Author: Mike Isely Date: Sat Sep 2 15:54:23 2006 -0300 V4L/DVB (4594): Remove some dead data elements from pvrusb2 driver Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit d9dce96faec043f261dc5a57d43cfc0e2905f2a5 Author: Mauro Carvalho Chehab Date: Sat Sep 2 12:59:38 2006 -0300 V4L/DVB (4592): Fixes some troubles on saa7115 Scaling were not working fine; Some reserved registers were wrong; On some situations, saa7115 were not properly being initializated. Removed some duplicated code. Thanks-to: Hans Verkuil for co-working on this patch. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3e7d3e57350ab8b7b8ce930074a31c87f1cbc8cc Author: Mauro Carvalho Chehab Date: Fri Sep 1 18:39:05 2006 -0300 V4L/DVB (4586): Code were preventing saa7111 and saa7118 to work Signed-off-by: Mauro Carvalho Chehab commit 616b8b639e6491cfa63f79238a5c6fbee383eb09 Author: Hans Verkuil Date: Fri Sep 1 18:36:48 2006 -0300 V4L/DVB (4585): VIDIOC_G_SLICED_VBI_CAP now accepts a v4l2_buf_type, make it IOWR The VIDIOC_G_SLICED_VBI_CAP needs to receive the v4l2_buf_type field before it can return a result. Hence this ioctl must be IOWR, not IOR. Since this ioctl is still marked experimental we can make this change. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b31e341be01475e016842a662946b4fc9cff6bd4 Author: Hans Verkuil Date: Fri Sep 1 18:36:10 2006 -0300 V4L/DVB (4584): Fix VIDIOC_S_FMT min/max check in pvrusb2 Acked-by: Mike Isely Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f2a49bc72bd2993356b3640cc105646ae56b10b8 Author: Hans Verkuil Date: Fri Sep 1 18:32:55 2006 -0300 V4L/DVB (4582): VIDIOC_INT_S_REGISTER is IOW, not IOR. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d87edf264a1f7d7678015e5a6752cde877434d4b Author: Mauro Carvalho Chehab Date: Fri Sep 1 09:37:11 2006 -0300 V4L/DVB (4573): Fix: There were some missing breaks at register check routine Without the breaks, saa7115 were not initializing PLL2. Signed-off-by: Mauro Carvalho Chehab commit 66440ccbf2f4077ce59c9692a2c7288201ea0171 Author: Mauro Carvalho Chehab Date: Wed Aug 30 19:52:14 2006 -0300 V4L/DVB (4565): Fix scaling calculus Signed-off-by: Mauro Carvalho Chehab commit 4fcd7d8f7b6ce0a0adb3edd6d6edcbf2fd05a02b Author: Unai Uribarri Date: Sun Aug 27 23:01:24 2006 -0300 V4L/DVB (4561): Sync'ing dvb-usb-remote with changes in USB input subsystem This patch fixes the physical address and takes into account recent changes in the USB input subsystem. Acked-by: Dmitry Torokhov Signed-off-by: Unai Uribarri Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 58f56cbe29042dca81fd59c05fb2055d58557d1e Author: Mauro Carvalho Chehab Date: Wed Aug 30 05:44:31 2006 -0300 V4L/DVB (4556): Fix a typo. Signed-off-by: Mauro Carvalho Chehab commit 59ba9154952baddfaea18e9decf91c040511c0ed Author: Mauro Carvalho Chehab Date: Wed Aug 30 05:34:36 2006 -0300 V4L/DVB (4555): Cleanup: removed hardcoded tables saa7115 module is capable of calculating the proper FIR tables. However, there were 4 hardcoded tables for the standard resolution. Signed-off-by: Mauro Carvalho Chehab commit 66ec1193ba2b4171c8f7e08245393d1b547ffd1e Author: Mauro Carvalho Chehab Date: Tue Aug 29 22:52:32 2006 -0300 V4L/DVB (4554): Renamed several common structs/functions to saa711x instead of saa7115 Signed-off-by: Mauro Carvalho Chehab commit 89f75ffc7e97d96ea76556671446d57d77c46beb Author: Mauro Carvalho Chehab Date: Tue Aug 29 22:07:03 2006 -0300 V4L/DVB (4553): Add support for saa7111 and partial support for saa7118 Signed-off-by: Mauro Carvalho Chehab commit 96ecfc4edf6bdb535b4ae3d87db2ba7f91596dd8 Author: Mauro Carvalho Chehab Date: Mon Aug 28 19:18:49 2006 -0300 V4L/DVB (4551): Added register aliases for saa711x registers, instead of using reg numbers Signed-off-by: Mauro Carvalho Chehab commit 236f16d241e16b269cd00ef0116975882f498be5 Author: Mauro Carvalho Chehab Date: Mon Aug 28 08:25:29 2006 -0300 V4L/DVB (4550): Make saa7115 to report the complete chipset name Signed-off-by: Mauro Carvalho Chehab commit 44b579d63678609a16265a0acdb6405fafd173d6 Author: Hans Verkuil Date: Sun Aug 27 19:22:15 2006 -0300 V4L/DVB (4548): Better temporal filter handling. Adjust temporal filter if necessary. The problem with the temporal filter is that it works well with full resolution capturing, but not when the capture window is scaled (the filter introduces a ghosting effect). So if the capture window changed, and there is no updated filter value, then the filter is set depending on whether the new window is full resolution or not. For full resolution a setting of 8 really improves the video quality, especially if the original video quality is suboptimal. Also report VBI Format in VIDIOC_LOG_STATUS, it was missing. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 299006612a811ba5acc92e2686f2e8b8bc10d4b7 Author: Hans Verkuil Date: Sat Aug 26 05:00:12 2006 -0300 V4L/DVB (4547): Add YUV HM12 and VBI IVTV format documentation. README.hm12: documentation on the HM12 YUV format used by the cx23415/6 chip. README.vbi: documentation on the V4L2_MPEG_STREAM_VBI_FMT_IVTV VBI format used in MPEG streams. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 784e8fe417d45b526eeb74794b7df43e11000f70 Author: Hans Verkuil Date: Sat Aug 26 03:17:58 2006 -0300 V4L/DVB (4546): Add u32 argument to VIDIOC_INT_RESET. The extra argument makes it possible to reset subsystems of a chip if that is supported. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1739adea321788e380794c1072c810d445090bca Author: Hans Verkuil Date: Sat Aug 26 03:05:17 2006 -0300 V4L/DVB (4545): Add missing v4l2_buf_type to struct v4l2_sliced_vbi_cap. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d7304dee3b7e29e801ba59bbf9a47440c196263d Author: Trent Piepho Date: Thu Aug 24 22:43:45 2006 -0300 V4L/DVB (4533): Tda9887: add configuration setting for L standard PLL gating Add a tuner config parameter for TDA9887, default_pll_gating_18, that changes the L standard PLL gating value from 36% to 0% (datasheet says 0%, tda9887 code says 18%). Turn this on for Microtune 4049FM5, as recomended by tuner datasheet. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 62a7b3e2ada3a76f1a6887b537c07517e90f72dd Author: Trent Piepho Date: Thu Aug 24 22:43:16 2006 -0300 V4L/DVB (4532): Isl6421: Release callback installed incorrectly The release callback was installed in ops.release, it should have been ops.release_sec. This prevented to front-end release from getting called. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit fb6065bbd915f9cf6022d52e114f5078654834b5 Author: Patrick Boettcher Date: Mon Aug 21 08:21:52 2006 -0300 V4L/DVB (4530): Another fix for the PID parsing Still the pid_parse bit was erased. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 559463bba8b91d36b12f6722dc27440567e4f6be Author: Patrick Boettcher Date: Sat Aug 19 16:13:53 2006 -0300 V4L/DVB (4529): Keep the PID parse bit when resetting the output mode Matthieu Castet found that with the rewritten dib3000mc-driver the PID-parsing was handled correctly. This changeset fixes it. Thanks Matthieu Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit ded38d2806b508b0b0f95581c103958949403daf Author: Jochen Issing Date: Sat Aug 19 16:03:21 2006 -0300 V4L/DVB (4528): PATCH: Club 3D zap250mini After some structural changes, here comes the updated patch for the Club 3D zap250mini USB dvb device. Adding support for a WideView-based device with a different "COLD" ID. Signed-off-by: Jochen Issing Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 56760f07a7948d53b807c8f00c1639df9acf97fd Author: Adrian Bunk Date: Tue Aug 15 11:38:40 2006 -0300 V4L/DVB (4525): Drivers/media/dvb/dvb-usb/dibusb-mb.c: NULL dereference The Coverity checker spotted the following "we dereference d->fe only when we know it's NULL" bug: <-- snip --> ... static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_device *d) { ... if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL) { d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; return -ENODEV; } ... <-- snip --> Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 1e805e679a4e92099c62cc952cd668a6c683e849 Author: Mauro Carvalho Chehab Date: Wed Aug 23 16:51:43 2006 -0300 V4L/DVB (4523): Fix a warning caused by a typo (comma instead of dot-comma) Signed-off-by: Mauro Carvalho Chehab commit 1450e6bedc58c731617d99b4670070ed3ccc91b4 Author: Mauro Carvalho Chehab Date: Wed Aug 23 10:08:41 2006 -0300 V4L/DVB (4519): Fixes Helper module dependencies against V4L APIs Signed-off-by: Mauro Carvalho Chehab commit 29adeee5340cb0de393330f962349ae88f747cea Author: Mauro Carvalho Chehab Date: Thu Aug 31 15:31:07 2006 -0300 V4L/DVB (4568): Added missing KS0197 Kconfig item Signed-off-by: Mauro Carvalho Chehab commit faa1cb2039141030c7179b530ea4c63246847bc3 Author: Mauro Carvalho Chehab Date: Tue Aug 22 18:49:17 2006 -0300 V4L/DVB (4518): Allow manually selecting the proper helper drivers There are several boards on V4L that can work with several different helper modules for audio/video encoding/decoding and similar stuff. This patch adds the capability of choicing between autoselecting the pertinent helper modules for each driver, or to manually selecting them. Acked-by: Michael Krufky Acked-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit fe9b5bb5e57a92df74bd7bc6a79a04671a65dddd Author: Mauro Carvalho Chehab Date: Tue Aug 22 15:38:18 2006 -0300 V4L/DVB (4516): Split audio/video encoders/decoders from main drivers Several audio/video encoders/decoders were just bound as if they were part of the core driver. In fact, they are generic enough to be used by other drivers as well, since they use I2C event bus to communicate. Signed-off-by: Mauro Carvalho Chehab commit 6e40773a9b8fe196720b913cff31a346a39483e2 Author: Mauro Carvalho Chehab Date: Tue Aug 22 15:37:41 2006 -0300 V4L/DVB (4515): Fixed module name, since it is, in fact, a decoder. Signed-off-by: Mauro Carvalho Chehab commit b961b9c5a27da21f78b5e02c687db9cee259468e Author: Mauro Carvalho Chehab Date: Tue Aug 22 12:21:18 2006 -0300 V4L/DVB (4514): Add some comments for Kconfig encoders/decoders itens Signed-off-by: Mauro Carvalho Chehab commit 897ea1307b40a17cb2d6b8d458eaa1573bf1a45e Author: Mauro Carvalho Chehab Date: Fri Sep 1 09:25:30 2006 -0300 V4L/DVB (4513): Split audio decoders from bttv Several audio decoders were just bound as if they were part of bttv driver. In fact, they are generic enough to be used by other drivers as well, since they use I2C event bus to communicate. Signed-off-by: Mauro Carvalho Chehab commit f70a7a918adeebe6be4a72742bff9399210c7541 Author: Alexey Dobriyan Date: Tue Aug 22 09:57:24 2006 -0300 V4L/DVB (4512): Ks0127: wire up i2c_add_driver() return value Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit d084aa706761060940110279794e6a4e83785858 Author: Eric Sesterhenn Date: Mon Aug 21 10:36:36 2006 -0300 V4L/DVB (4510): Fix signedness error in drivers/media/video/vivi.c when checking the -Wextra signedness warnings issued by gcc 4.1 I came across this one: drivers/media/video/vivi.c:1001: warning: comparison of unsigned expression < 0 is always false Since videobuf_reqbufs() returns negative values on errors the current code does no real error checking since gcc removes the comparison. This patch fixes this issue by making ret a normal, signed integer. Signed-off-by: Eric Sesterhenn Signed-off-by: Mauro Carvalho Chehab commit 3153d0d05d2b4e0466818e4f2319882010928d59 Author: Mauro Carvalho Chehab Date: Mon Aug 21 09:04:14 2006 -0300 V4L/DVB (4509): Added missing copyright Several changes at register stuff were done since commit b45009b0288a96a3458f4f8e93cb776678d41875, but I've forgot to add the copyright line for this. Those changes allowed cx88 to have multiple tuners, allowing it to support hardware with separated radio and video tuners. It also allows binding a tuner to an specific i2c address. Signed-off-by: Mauro Carvalho Chehab commit 0d0d871b3f3395820ec33a78fb2cc101b9bdcced Author: Mauro Carvalho Chehab Date: Fri Aug 18 07:40:28 2006 -0300 V4L/DVB (4508): Fix an array overflow on bt866 The Coverity checker spotted the following two array overflows. Registers 0xcc and 0xdc were cached on reg[] array, with only 128 elements, instead of 256. Signed-off-by: Mauro Carvalho Chehab commit eb42c42449b4d018881dc8f1856ce84cf74f90c5 Author: Mauro Carvalho Chehab Date: Fri Aug 18 07:31:22 2006 -0300 V4L/DVB (4507): Make tvp5150 an independent Kconfig item Signed-off-by: Mauro Carvalho Chehab commit 12500f07c6e179692ae3bd4d7bee9aa07ec74c25 Author: Mauro Carvalho Chehab Date: Fri Aug 18 07:31:10 2006 -0300 V4L/DVB (4506): TVP5150 routing logic were broken. As pointed by The Coverity checker, commit c7c0b34c27bbf0671807e902fbfea6270c8f138d broked input selection. Signed-off-by: Mauro Carvalho Chehab commit e738e35d1e9ae15b597c713e0b74e9a535020c0d Author: Ricardo Cerqueira Date: Thu Aug 17 18:40:28 2006 -0300 V4L/DVB (4504): Enable audio DMA restart on channel change even when cx88-alsa is compiled cx88-alsa can be compiled in (in distro built kernels, for example), but not used. In those cases, the audio DMA restart is needed for proper sound on NICAM channels. This patch enables the DMA restart even with ALSA, but the functions now check if cx88-alsa is really active. Signed-off-by: Ricardo Cerqueira Signed-off-by: Mauro Carvalho Chehab commit 4e318bef68e819f001a3c8af65401891893d3d54 Author: Christoph Pfister Date: Sat Aug 12 09:13:35 2006 -0300 V4L/DVB (4501): Add support for knc one dvb-s plus with 1894:0011 Apparently there are two types of knc1 dvb-s plus cards with different tuners (as for the knc1 dvb-s ones). This patch adds support for those cards with subsystem id 1894:0011. Successfully tested by: Benjamin Weber Signed-off-by: Christoph Pfister Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 0d7466146fa59cfa4b992a52cf274d603b475fd1 Author: Andrew de Quincey Date: Sat Aug 12 09:09:44 2006 -0300 V4L/DVB (4500): Fix KNC1 DVBC support This actually needs the same configuration as the other DVBC cards; simply no one had managed to test before to find out. Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 17bc98a41ae0ef82bab502ec1f9224ec5fcbe764 Author: Alexey Dobriyan Date: Sat Aug 12 22:01:27 2006 -0300 V4L/DVB (4499): CONFIG_PM=n slim: drivers/media/video/* Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit 4d98816be7f3e2ffe90093a8e41074ea348289df Author: Mauro Carvalho Chehab Date: Sat Aug 12 21:59:19 2006 -0300 V4L/DVB (4498): Offset parameter permission were 0x666, instead of 0x664 Although not dangerous, it may allow a normal user with access to a machine to untune a TV channel. Signed-off-by: Mauro Carvalho Chehab commit d536e9c41f78c9959c585181f8a1e7fe8b157197 Author: Chris Pascoe Date: Thu Aug 10 03:22:21 2006 -0300 V4L/DVB (4497): Reset USB part of DViCO Dual Digital during PCI driver attach If the FX2 does not reset properly during reboot, it can present an invalid USB device ID and fail to attach. Prevent this situation from occuring by resetting the USB part of the card when the PCI part probes. Also fix the GPIO configurations so that analog capture will not inadvertantly reset the USB part. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit fc3398d8b317bebe542f57c65572d9b9f52112f7 Author: Chris Pascoe Date: Thu Aug 10 03:17:42 2006 -0300 V4L/DVB (4496): Tuning tweaks for ZL10353 More register setup which improves the ZL10353's tuning characteristics. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit 8fb957841b2f4311e6418dcbef24564e4cebb87d Author: Chris Pascoe Date: Thu Aug 10 03:17:16 2006 -0300 V4L/DVB (4495): Fix "no data from ZL10353 based USB tuner" problem Force parallel transport stream output on the ZL10353 attached to a bluebird device. Addresses the problem where a frontend lock was observed, but no MPEG transport data was received. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit b5b168d7b9e28e0569ed4fe2c0a44fae71df30b5 Author: Oliver Endriss Date: Tue Aug 8 19:58:27 2006 -0300 V4L/DVB (4493): [lnbp21] release callback fixed lnbp21 module must use fe->ops.release_sec, not fe->ops.release. The release function of the frontend driver was never called for cards with lnbp21... Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab commit 7df0994d7bda8eb30b459e31f8b6be97a8f1b0b0 Author: Oliver Endriss Date: Tue Aug 8 19:51:04 2006 -0300 V4L/DVB (4492): [dvb_attach] dvb_frontend_detach fix dvb_frontend_detach() used invalid config option CONFIG_DVB_DETACH, so dvb_frontend_detach() did not call symbol_put_addr(). Replaced CONFIG_DVB_DETACH by CONFIG_DVB_CORE_ATTACH. Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab commit a2b9e3e74a8edbc4a9d266cc54cd30266215fbdf Author: Trent Piepho Date: Mon Aug 7 20:01:01 2006 -0300 V4L/DVB (4490): Whitespace cleanup from whitespace cleaning script Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 18795eb98d117dbb96fadfc17a7da44c93857fd6 Author: Trent Piepho Date: Mon Aug 7 19:43:21 2006 -0300 V4L/DVB (4488): Fix possible crash in Hauppauge eeprom reading If an eeprom defined two tuners and they supported more than eight standards combined (as opposed to each), it would overflow an array. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 40346b290fcbf95d17c05ffe5101a1b5de8af548 Author: Mauro Carvalho Chehab Date: Tue Aug 8 15:21:47 2006 -0300 V4L/DVB (4485): Fix a warning on PPC64 drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c: In function 'set_standard': drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c:33: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'v4l2_std_id' Signed-off-by: Mauro Carvalho Chehab commit d591b9ccbe27fe974702411cff422fb6c6c62ad2 Author: Andrew Morton Date: Tue Aug 8 10:52:22 2006 -0300 V4L/DVB (4484): Git-dvb: cadet build fix drivers/media/radio/radio-cadet.c: In function 'cadet_do_ioctl': drivers/media/radio/radio-cadet.c:362: warning: implicit declaration of function 'KERNEL_VERSION' Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit c6d74c2ce86a80c9859010eb65e622214a6993ed Author: Patrick Boettcher Date: Sun Aug 6 08:49:09 2006 -0300 V4L/DVB (4481): Make the dibx000-common-module GPL Forget to put the MODULE-define and thus to give the license. Now GPL Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 0e367a15ed08710098e2ff59aa25cec723c0a9d4 Author: Dave Jones Date: Mon Aug 7 13:18:56 2006 -0300 V4L/DVB (4480): Remove null chars from dvb names DVB null terminates its device names, which seems odd, and should be unnecessary. Acked-by: Alan Cox Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit ef76856d26087f897e163b9fd8b2f7bd0cd54fc7 Author: Yeasah Pell Date: Tue Sep 26 12:30:14 2006 -0300 V4L/DVB (4479): LNB voltage control was inverted for the benefit of geniatech cards on Kworld 1) It sets LNBDCPol differently based on the card type. Now it should work properly for both the kworld and geniatech cards. 2) It stops returning an error for the SEC_VOLTAGE_OFF voltage command (the cx88-dvb level handles the actual voltage on/off, but it still passes the ioctl down to the cx24123 level, which previously rejected the OFF as invalid so the ioctl would report failure) Acked-by: Manu Abraham Signed-off-by: Yeasah Pell Signed-off-by: Mauro Carvalho Chehab commit 8d90ee5e0e57b67e6e5c01cb14495fb69edccbbf Author: Oliver Endriss Date: Mon Aug 7 02:04:26 2006 -0300 V4L/DVB (4478): [av7110] Support Grundig DVB-T tuner for sub-system 13c2:0001 Some DVB-T cards with Grundig 29504-401 tuner use subsystem id 13c2:0001 (reported by Stuart Butterfield). Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab commit d93f8860cc55504b376b38b95d22efeb3cc10edd Author: Mauro Carvalho Chehab Date: Sun Aug 6 17:03:50 2006 -0300 V4L/DVB (4477): Improve hardware algorithm by setting the appropriate registers Hardware algorithm needs to be configured to: 1) Increase timeout constants, to detect weaker signals; 2) do a wider zigzag search. Acked-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab commit 8a36ecf0f4c0861330cc9e69885b0502fedac14a Author: Mauro Carvalho Chehab Date: Sun Aug 6 10:16:27 2006 -0300 V4L/DVB (4475): Fix most Compat32 stuff on V4L2 Tested on x64 with a bttv board. Most Get ioctls are fixed. The only non-completely working one is VIDIOCGAUDIO. All other IOR ioctls give the same results on x86_64 and i386 architectures. Thanks to Alastair Poole for part of this patch and tests on ppc64. Signed-off-by: Alastair Poole Signed-off-by: Mauro Carvalho Chehab commit 3702627899db1d6a818c6e0b4ba5205f94bfbef4 Author: Mauro Carvalho Chehab Date: Sun Aug 6 09:10:06 2006 -0300 V4L/DVB (4474): On some cases, depth were not returned. Signed-off-by: Mauro Carvalho Chehab commit a202a5bfb6c1d7c778f67f28b5f2caac21beafce Author: Patrick Boettcher Date: Sun Aug 6 06:40:58 2006 -0300 V4L/DVB (4472): Remove debug-print from dib3000mc Removed and commented a small debug function. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 294d83d7fed1ba5a15b625500b96b3fbf60138ad Author: matthieu castet Date: Thu Aug 3 06:36:17 2006 -0300 V4L/DVB (4470): MT2060: turn on the VGA The VGA was not turned on after calling sleep. This lead to bad performance in difficult areas. Signed-off-by: matthieu castet Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 0f69e7f3f5256ab392fc44e7340777348b5da2cd Author: Patrick Boettcher Date: Thu Aug 3 06:04:16 2006 -0300 V4L/DVB (4468): Another fix for attaching the DiB3000MC Another stupid fix for attaching the DiB3000MC. == 0 instead of != 0. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 4e66c97c9299d53f1d9167e42b05357f023099c8 Author: Patrick Boettcher Date: Tue Aug 8 15:48:11 2006 -0300 V4L/DVB: DiB3000MC: set FE to NULL after being freed DiB3000MC: set FE to NULL after being freed Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit a2c00a0eee751e298c916508b6fa5cee0d7d188d Author: Klaus Frahm Date: Sat Jul 29 18:49:36 2006 -0300 V4L/DVB (4464): FIX_ AverTV A800 trouble A new revision of the Avermedia A800 does not reenumerate after download the firmware. Signed-off-by: Klaus Frahm Signed-off-by: Martin Habbecke Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 6c95f61bcb3bd8dde9efc70f0ae9a83a7b7ac9cd Author: Patrick Boettcher Date: Sat Jul 29 18:24:21 2006 -0300 V4L/DVB (4463): New firmware for Nova-t-usb2 Thomas Rokamp and others are reporting: "I have now with success extracted a working firmware for the 93004 rev. C1A2." This patch increments the firmware version to 2. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 5a19f312162abd1356cdcda608f2b13502a383cc Author: Patrick Boettcher Date: Wed Aug 2 08:44:31 2006 -0300 V4L/DVB (4465): Attach the dib3000mc correctly Flynn Marquardt found out that there is problem with the new dib3000mc-driver when using with the real dib3000mc. It resulted in a segfault. Fixed two things: use the correct I2C address and do not attach a tuner, when the demod was previously failing. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 42afd061700edb43bb082bc65a2ddde431151d6b Author: Patrick Boettcher Date: Sat Jul 29 17:33:44 2006 -0300 V4L/DVB (4461): Added missing dibx000-common code and headers The first commit omitted the common-code and header-files. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit b7571f8d7e12cd70048331e6a0199a42dc995d99 Author: Patrick Boettcher Date: Tue Aug 8 15:48:10 2006 -0300 V4L/DVB: Complete rewrite of the DiB3000mc-driver A complete rewrite of the DiB3000MC/P driver has been done. It is now much more easy to maintain and to get improvements inside. Additionally the tuning time has been reduced and the usage of the driver is much more understandable now. Signed-off-by: Patrick Boettcher Signed-off-by: Francois KANOUNNIKOFF Signed-off-by: Mauro Carvalho Chehab commit 74340b0a8bc60b400c7e5fe4950303aa6f914d16 Author: Patrick Boettcher Date: Tue Jul 4 13:47:16 2006 -0300 V4L/DVB (4457): Remove dib3000-common-module removing the dib3000-common-module. The common stuff is not common anymore - it will be only used by the 3000mb-driver. A new 3000mc/p-driver will be added which will share common stuff with dib7000. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 46f73f936665ab26c8501634e6aa34464fcc1521 Author: Olivier DANET Date: Tue Aug 8 15:48:10 2006 -0300 V4L/DVB: Update for MT2060 to use dvb_tuner_ops new tuner api minor fixes for tuning Signed-off-by: Olivier DANET Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 83fa907963662ecaade803cec4c9c3e14b69ad7d Author: Patrick Boettcher Date: Sun May 14 10:49:42 2006 -0300 V4L/DVB (4454): Corrected debugging output of the mt2060 When debugging was disabled at lot of empty lines where printed anyway. Reported by Rolf Ahrenberg and Sergei Haller. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 825d51ef9ed956d896244f82b02988d370a7e47e Author: Patrick Boettcher Date: Tue Aug 8 15:48:10 2006 -0300 V4L/DVB: MT2060: Code cleanups, adding to new build-mechanism Some minor code cleanups and added the MT2060 to new v4l-dvb-build-system, preliminarily under dvb/frontends. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit a841e1f6d153c72e29802a33520f2c862792f7b0 Author: Sergei Haller Date: Sun May 14 10:47:21 2006 -0300 V4L/DVB (4453): [PATCH] dibcom mod3000p + mt2060 -- remote control + Added support for the remote control shipped with the pen drive size DVB-T receiver [ID 10b8:0bc7 DiBcom DiBcom USB2.0 DVB-T reference design (MOD3000P)] Signed-off-by: Sergei Haller Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 4de2730a1d2742aea67f24d1041bdc5e0bad37e3 Author: Patrick Boettcher Date: Mon Apr 17 13:22:15 2006 -0300 V4L/DVB (4451): MT2060: IF1 Offset from EEPROM, several updates - AGC gain set to 3 - The tuning sequence has been changed to match the DibCom driver ( from I2C spy captures ) - For LITE-ON adapters : The IF1 frequency is now tuned according to the calibration values stored in EEPROM. Signed-off-by: Patrick Boettcher Signed-off-by: Olivier DANET Signed-off-by: Mauro Carvalho Chehab commit d7357a53ef4d59724ad80560e47102e0095555b6 Author: Olivier DANET Date: Tue Aug 8 15:48:09 2006 -0300 V4L/DVB: Added support for LeadTek DVB-T USB clone Adding the USB ids for the LeadTek clone of the STK3000P-ref-design. Signed-off-by: Olivier DANET Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit cb25a74d49f3589c7868422ec48d219246a4fca4 Author: Patrick Boettcher Date: Fri Mar 31 18:48:39 2006 -0300 V4L/DVB (4446): Add support for the Artec T14 Adding the USB IDs to dibusb-mc.c for the Artec T14 USB Stick based on STK3000P reference design. Thanks to Thomas Rabe testing. Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit e4d6c1f74aaac1bbe5be50e7368e5ac99d54e5a2 Author: Patrick Boettcher Date: Tue Aug 8 15:48:09 2006 -0300 V4L/DVB: Cleanups for mt2060-integration - some coding style fixes for newly added mt2060 - moved agc-config from fixed values in dib3000mc to configurable ones - whitespace clean-ups for usb-id-file Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit a16bf5d5603184dc1db88f37051881b2eeacfd17 Author: Olivier DANET Date: Tue Aug 8 15:48:09 2006 -0300 V4L/DVB: Adding support for MT2060 and thus for some DVB-USB-devices based on it - MT2060 tuner driver - Added support for some USB DVB-T devices based on Dib3000P Signed-off-by: Olivier DANET Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 47922e9c3f583adf05a23842ff98f3b0bf7eec6d Author: Chris Pascoe Date: Sat Aug 5 23:47:16 2006 -0300 V4L/DVB (4441): Flexcop/nxt200x attach fix Address another case where the test in dvb-pll to see if a tuner's PLL responds when attaching may fail. Signed-off-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab commit f7b54b1067bc0ccc6a2a2051f039ce630083f927 Author: Michael Krufky Date: Tue Aug 8 15:48:08 2006 -0300 V4L/DVB (4439): Whitespace cleanups for cx88-dvb and saa7134-dvb This patch cleans up some whitespace problems after the dvb_attach changes in cx88-dvb.c and saa7134-dvb.c, and converts some capitalized i2c address constants to lowercase. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 4ad8eee5ac8d8336ac7965e4a4027a7b4ec080f1 Author: Michael Krufky Date: Tue Aug 8 15:48:08 2006 -0300 V4L/DVB (4438): Fix dvb_pll_attach for nxt2004-based cards The test in dvb-pll to see if a tuner's PLL responds when attaching fails on NXT2004 based boards before the firmware is loaded. This patch allows us to avoid this test by not passing an I2C bus handle to the dvb_pll_attach routine, just as Chris Pascoe has done for MT352 and ZL10353 based boards when used in cx88-dvb. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit c162dff6437d5f66c272b1811074ee32c53d17b9 Author: Chris Pascoe Date: Tue Aug 8 15:48:08 2006 -0300 V4L/DVB (4436): Dvb-pll support for MT352/ZL10353 based tuners. Typical wiring of MT352 and ZL10353 based tuners differs from dvb-pll's expectation that the PLL is directly accessible. On these boards, the PLL is actually hidden behind the demodulator, and as such can only be accessed via the demodulator's interface. It was failing to communicate with the PLL during an attach test and subsequently not connecting the tuner ops. By passing a NULL I2C bus handle to dvb_pll_attach, this accessibility check can be bypassed. Do this for the affected boards. Also fix a possible NULL dereference at sleep time, which would otherwise be exposed by this change. Signed-off-by: Chris Pascoe Acked-by: Andrew de Quincey Acked-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab commit 174ff219b7e3212f701f70c71860894716b0045b Author: Yeasah Pell Date: Tue Aug 8 15:48:08 2006 -0300 V4L/DVB (4435): HW algo Change this card to use HW ALGO tuning Signed-off-by: Yeasah Pell Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab commit 18c053b3c5414c385f4a67134fd963b98881aa0d Author: Yeasah Pell Date: Tue Aug 8 15:48:08 2006 -0300 V4L/DVB (4434): Change BER config Change the bit error counter configuration to be the actual BER. Originally it was reporting UCB. Signed-off-by: Yeasah Pell Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab commit d12a9b911c793ab5b6b02379880efd6fa3499575 Author: Yeasah Pell Date: Tue Aug 8 15:48:08 2006 -0300 V4L/DVB (4433): Soft decision threshold Set the Soft decision threshold properly for the specified FEC Signed-off-by: Yeasah Pell Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab commit bbdd11fa957913d6648cabbca59be1da479180ed Author: Manu Abraham Date: Tue Aug 8 15:48:08 2006 -0300 V4L/DVB (4432): Fix Circular dependencies Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab commit e4a49d76ca4e2c0b2b4c89d59d43486d781ffe95 Author: Andrew de Quincey Date: Tue Aug 8 15:48:07 2006 -0300 V4L/DVB (4428): Fix tda826x detection The tda826x detection was (correctly) cleaned up earlier, but unfortunately changing the number of received i2c messages from 2 -> 1 was missed. This fixes it. Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 17aafcc67feb359820488ffb0017405ad48b776e Author: Andrew de Quincey Date: Tue Aug 8 15:48:07 2006 -0300 V4L/DVB (4424): Add missing dvb-pll Kconfig infrastructure Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 0518999c5fd640bfac24c7c452e902007b1a2b0a Author: Mauro Carvalho Chehab Date: Tue Aug 8 15:48:07 2006 -0300 V4L/DVB (4422): Improved comment for AR device and fix some typos Signed-off-by: Mauro Carvalho Chehab commit b23056ef373c27a3bd089b40f45f4bc74674e71c Author: Mauro Carvalho Chehab Date: Tue Aug 8 15:48:07 2006 -0300 V4L/DVB (4421): V4L2 Conversion: saa5246a, saa5249, vino, hexium_orion, hexium_gemini Just a few adjustments were required on those drivers to be V4L2 compliant. Signed-off-by: Mauro Carvalho Chehab commit 704fd4a5672a5447a7f177838236eb13232be3c1 Author: Hans Verkuil Date: Tue Aug 8 15:48:07 2006 -0300 V4L/DVB (4417): Add support for PAL-Nc in cx24850. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 56b8df11345452103a75060a44429751ce71ee97 Author: Dmitry Torokhov Date: Tue Aug 8 15:48:06 2006 -0300 V4L/DVB (4413): Konicawc - handle errors from input_register_device() Compile-tested only (no hardware) Signed-off-by: Dmitry Torokhov Signed-off-by: Mauro Carvalho Chehab commit 5aff308c5e73307fc495b89b6421b491f56d3657 Author: Alan Cox Date: Tue Aug 8 15:47:50 2006 -0300 V4L/DVB (4410): Cleanups and fixes for dsbr100 Signed-off-by: Alan Cox Signed-off-by: Mauro Carvalho Chehab commit c0c7fa096623c0cfdd9d253de9d874558066cdbb Author: Hans J. Koch Date: Tue Aug 8 09:10:12 2006 -0300 V4L/DVB (4406): Convert radio-cadet to V4L2 API This is a card with RDS capabilities. RDS specifications didn't change from V4L1 to V4L2, so that part should be OK. This patch changed the following stuff: * The device can be opened multiple times. That's necessary because there are at least a radio application and an RDS application (rdsd) that want to open() the device. * Added a poll() function. Every character device should have that, and rdsd expects it as it uses select() on that file descriptor. * Converted the ioctls to V4L2. MUTE is not implemented correctly as the card doesn't seem to have a special bit for that. Probably there are a few more ioctls that should at least return 0 or an error. As I do not own such a card, I couldn't test anything. If there is anybody out there who owns such an ancient card, please test and report. I just checked that the code compiles. Signed-off-by: Hans J. Koch Signed-off-by: Mauro Carvalho Chehab commit 176ac9da4f09820a43fd48f0e74b1486fc3603ba Author: Andrew de Quincey Date: Tue Aug 8 09:10:11 2006 -0300 V4L/DVB (4405): Add missing KConfig I2C dependencies This was breaking the build if i2c was not previously set Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 8b9a46647b965f7033c198dd5e73d58b10e22a21 Author: Andrew de Quincey Date: Tue Aug 8 09:10:11 2006 -0300 V4L/DVB (4403): Use dprintk in tda826x. As opposed to printk() at the moment, which will fill logs uselessly Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 2b100e7d3c448dd369cf36ff38844b2440fab49d Author: Andrew de Quincey Date: Tue Aug 8 09:10:11 2006 -0300 V4L/DVB (4402): Fix budget-ci to use dvb_frontend_detach() I missed one call during the dvb_attach() development. Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 07e19c20c8cdd5e1cc96e0bc8a37f5322ce78cdb Author: Andrew de Quincey Date: Tue Aug 8 09:10:11 2006 -0300 V4L/DVB (4401): Disable tda10086 debug by default. Left on by accident. Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit ef09c071a2867279a49374c35b2a169f69fced73 Author: Trent Piepho Date: Tue Aug 8 09:10:11 2006 -0300 V4L/DVB (4400): Tda826x: Remove 0-byte I2C write; put tuner_ops info in static struct Remove the 0-byte write that precedes 2-byte read. Move initialize the info field in the static tuner_ops definition, so that it doesn't need to be done manually. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit e2ac28fa15696d3d9dc38923438ad39fe1235ecd Author: Igor M. Liplianin Date: Tue Aug 8 09:10:10 2006 -0300 V4L/DVB (4398): Add support for Acorp TV134DS + FlyDVB-S cards. Add support for Acorp TV134DS and FlyDVB-S cards (both based on tda10086+tda826x) Signed-off-by: Igor M. Liplianin Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit adc619ac6e3d3b4a175476b915befe37650ee109 Author: Andrew de Quincey Date: Tue Aug 8 09:10:10 2006 -0300 V4L/DVB (4397): Add tda10086 support for TT DVB-S-1401 Add the necessary code and makefile infrastructure Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 6bca3580c3303451b65afc98276edf40628dffe0 Author: Andrew de Quincey Date: Tue Aug 8 09:10:10 2006 -0300 V4L/DVB (4396): Add drivers for tda10086 + tda826x chips TDA10086 is a new DVB-S demodulator TDA826x is a DVB-S Silicon Tuner Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 2cd885aa0f35e9329292e5be2a6c9d424bba5531 Author: Andrew Morton Date: Tue Aug 8 09:10:09 2006 -0300 V4L/DVB (4394): Git-dvb: radio-sf16fmi build fix drivers/media/radio/radio-sf16fmi.c: In function 'fmi_do_ioctl': drivers/media/radio/radio-sf16fmi.c:147: warning: implicit declaration of function 'KERNEL_VERSION' Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit 0912ad0b0fdee374f1f49d75fee341980f0868b6 Author: Andrew de Quincey Date: Tue Aug 8 09:10:09 2006 -0300 V4L/DVB (4392): Fix dst_ca attach Move the call to dst_attach into the dst_attach function to eliminate problems caused with dvb_attach. Signed-off-by: Andrew de Quincey Acked-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab commit f52a838b74be70b4054ab27e435e9acb92d8c50a Author: Andrew de Quincey Date: Tue Aug 8 09:10:09 2006 -0300 V4L/DVB (4391): Refactor dvb_detach calls into a single dvb_frontend_detach function. Remove buggy dvb_detach() macro and replace with unified dvb_frontend_detach() call. Signed-off-by: Andrew de Quincey Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 2a514dea5fda67958c79f5137d4dcb272f8561e8 Author: Andrew de Quincey Date: Tue Aug 8 09:10:09 2006 -0300 V4L/DVB (4389): Remove duplication _release() op. I added a duplicate method during one of the previous dvb_attach attempts. This removes the unnecessary duplication. Signed-off-by: Andrew de Quincey Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 1f10c7afa1ac611c32ec4a2114788876a3f5d05e Author: Andrew de Quincey Date: Tue Aug 8 09:10:09 2006 -0300 V4L/DVB (4388): Remove frontend selection from cx88/saa7134 drivers Replaced with dvb_attach() Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 102a342bb9672f67a34fd185803aaded4ce8dd0f Author: Andrew de Quincey Date: Tue Aug 8 09:10:08 2006 -0300 V4L/DVB (4387): Add Kconfig infrastructure for dvb_attach Allow it to be en/disabled Disable it in < 2.6.17 due to symbol_xxx() bug Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 2bfe031df6bd5e3b8e503eba8e3b6461d7c2c27e Author: Andrew de Quincey Date: Tue Aug 8 09:10:08 2006 -0300 V4L/DVB (4386): Convert DVB devices to use dvb_attach() Only devices using > 1 frontend were ported; ones which did not are left using static binding. Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit d995506062c974133ba66d0822e58a923d4d74d9 Author: Andrew de Quincey Date: Tue Aug 8 09:10:08 2006 -0300 V4L/DVB (4385): Add dvb_attach() macro and supporting routines Add dvb_attach() macro and supporting routines Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit c10d14d62d7b7596fd5c7bb8aad3f2b56f8640e6 Author: Andrew de Quincey Date: Tue Aug 8 09:10:08 2006 -0300 V4L/DVB (4384): Remove remaining static function calls Rewrote _write() calls to use write() op. Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 13fef9335f4fe2a73e1733f8807e69711736faef Author: Andrew de Quincey Date: Tue Aug 8 09:10:08 2006 -0300 V4L/DVB (4383): Convert SEC drivers to new frontend API Convert SEC drivers to new frontend API Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit 94cbae5a1a1537ef5a402199f597e84dc5dd92cb Author: Andrew de Quincey Date: Tue Aug 8 09:10:07 2006 -0300 V4L/DVB (4382): Dvb_attach modifications to dvb frontend structures Add write() op Add release_sec() op Add change misc_priv->sec_priv data field Acked-by: Michael Krufky Acked-by: Trent Piepho Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab commit 0e957becc3d22bcdab550aadac36893c8e0cb36e Author: Adrian Bunk Date: Tue Aug 8 09:10:07 2006 -0300 V4L/DVB (4378): Ttpci/: remove unneeded #include 's Since av7110.c is the only file actually using something from this header, there's no reson for other files to Signed-off-by: Adrian Bunk Signed-off-by: Mauro Carvalho Chehab commit 094ddbe9506706187b58df91d64695547a807916 Author: Mike Isely Date: Tue Aug 8 09:10:07 2006 -0300 V4L/DVB (4377): Force horizontal resolution limits in the pvrusb2 driver This change causes the pvrusb2 driver to limit horizontal resolution to be only 720 if 24xxx device hardware is being used. This is a workaround for an unsolved problem in the driver where if the resolution is set to something other than 720 the video quality will be _seriously_ degraded. It only happens on 24xxx devices (29xxx are unaffected by the problem and unaffected by this change). Once the problem is finally solved, this small change can be removed. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 89ebd63fdddc83fabb5cc751d0e59a1350c1627c Author: Mike Isely Date: Tue Aug 8 09:10:07 2006 -0300 V4L/DVB (4376): Make it possible for run-time calculation of control min/max in pvrusb2 The internal control implementation in the pvrusb2 driver normally encodes integer range limits using literal values in a const structure. This change adds two function pointers, which if not null will be called through in order to determine integer min / max values. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit e95a191566685530ef49b702bbce0a33c57c3136 Author: Mike Isely Date: Tue Aug 8 09:10:07 2006 -0300 V4L/DVB (4375): Eliminate hardcoded limits in VIDIOC_[S|TRY]_FMT for pvrusb2 The pvrusb2 implementation for VIDIOC_[S|TRY]_FMT was hardcoding limits on the range for allowed resolution, but it would be much better if we instead just queried the internal control for these values. This then opens the door for the driver to adjust these limits based on the detected hardware. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 434449f4c8902198e6fa90023f60395230f36c23 Author: Mike Isely Date: Tue Aug 8 09:10:06 2006 -0300 V4L/DVB (4372): Clean up some post mpeg-controls issues in pvrusb2 Fix a few miscellaneous issues in the pvrusb2 driver related to use of the new mpeg controls. This also should fix problems involving update of the saa7115 / cx25840 configuration as control changes are made. Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab commit 1ddf5bc5472f4a45b00bee33fc8c96d4616f8561 Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:06 2006 -0300 V4L/DVB (4371): Included missing linux/version.h Signed-off-by: Mauro Carvalho Chehab commit 3ca57169ce979be1919b013230940bb5c7b3ba5d Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:06 2006 -0300 V4L/DVB (4370): Fix some typos on ioctl handling function Signed-off-by: Mauro Carvalho Chehab commit 22694c0c38ba023c6535f6b5b7925f9fb7a868fd Author: Trent Piepho Date: Tue Aug 8 09:10:05 2006 -0300 V4L/DVB (4366): Remove of couple of useless lines A buffer was set just before an if block, and then again in both branches of the if. Obvious coding error. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab commit e84fef6b4a9d36fea53354633c590a7800d9fd83 Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:05 2006 -0300 V4L/DVB (4364): V4L2 conversion: radio-maxiradio Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit 982eddb911b772295d5efc11f7c2b34c7fd6e60e Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:05 2006 -0300 V4L/DVB (4363): V4L2 conversion: radio-trust Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit 2acadefa311b480864d686fb3f7e5f79737d0187 Author: David Bussenschutt Date: Tue Aug 8 09:10:05 2006 -0300 V4L/DVB (4362): Cx88: Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann PCI TV Tuner card support Add support for Shenzhen Tungsten Ages Tech TE-DTV-250 OEM for Swann PCI TV Tuner Card Signed-off-by: David Bussenschutt Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit d1009bd733a9324baff74611e0635e17fce4dfa2 Author: Peter Naulls Date: Tue Aug 8 09:10:05 2006 -0300 V4L/DVB (4361): Cx88: add support for Norwood PCI TV Tuner (non-pro) This patch adds support for Norwood PCI TV Tuner (non-pro) Signed-off-by: Peter Naulls Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 5dbaa2cb757545f8238319d55aa75cc8fabc8212 Author: Michael Krufky Date: Tue Aug 8 09:10:04 2006 -0300 V4L/DVB (4360): Cx88: add autodetection support for AverMedia M150-D This patch adds autodetection support for the AverMedia M150-D blackbird MPEG encoder / analog video capture card. This board is known to work with the ASUS PVR 416 configuration. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit ad10c930e8857585cc316e96c15f02b42020bac6 Author: Eric Thomas Date: Tue Aug 8 09:10:04 2006 -0300 V4L/DVB (4359): Cx88: add initial support for Hauppauge HVR3000 trimode card add initial support for Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T only analog is working for now Signed-off-by: Eric Thomas Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit 2ab652993623954c7bfdadeba311d15a3e1494c0 Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:04 2006 -0300 V4L/DVB (4358): V4L2 conversion: radio-zoltrix Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit 30c48305ba3e785cef33ff90efcbf5d9bdc3cffe Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:04 2006 -0300 V4L/DVB (4357): V4L2 conversion: radio-typhoon Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit 55ac7b690f086112ab8ac35764189269cdfae768 Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:03 2006 -0300 V4L/DVB (4356): V4L2 conversion: radio-terratec Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit acda0e71857c8ec4e5348d08b53a52d35b92e6aa Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:02 2006 -0300 V4L/DVB (4355): V4L2 conversion: radio-sf16fmr2 Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit fa38ad6592558660086e8ed4b12e5fdf90e78f90 Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:02 2006 -0300 V4L/DVB (4354): A small fix at fmi->flags logic Signed-off-by: Mauro Carvalho Chehab commit a2ef73af4cd6cb46be13b11f9ce64d6b44f0350b Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:02 2006 -0300 V4L/DVB (4353): V4L2 conversion: radio-sf16fmi Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit f8c559f8c066a045fb3f70bbb35f9e7c2064b8ae Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:02 2006 -0300 V4L/DVB (4352): V4L2 conversion: radio-rtrack2 Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit b6055d7b1841e14ecc8c72a11490b42c85bf7bec Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:02 2006 -0300 V4L/DVB (4351): V4L2 conversion: radio-maestro Driver conversion to V4L2 API. Require some testing, since I don't have such hardware Signed-off-by: Mauro Carvalho Chehab commit 52afbc2f4f1ab78c038bc0d56273ca68021bd3d5 Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:01 2006 -0300 V4L/DVB (4350): V4L2 conversion: radio_gemtek-pci Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit d1c4ecdeec612a587e9b564839fc578f41d3049d Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:01 2006 -0300 V4L/DVB (4349): V4L2 conversion: radio_gemtek Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit 38ee04f04340ffd6af868499862341d11ed2b331 Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:01 2006 -0300 V4L/DVB (4348): Fix: compile for radio aimslab and aztech with V4L2 only All radio devices use an obsolete mode of opening/release driver. Since this is not V4L1 core, better to keep the method available for more time than to rewrite open/release without a radio device to test, since the newer method is much more complex than the previous one (although providing support for multiple opens and multiple devices). Signed-off-by: Mauro Carvalho Chehab commit a4366af40d7d2021499b84b8311336c944a9a71c Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:01 2006 -0300 V4L/DVB (4347): V4L2 conversion: radio_aztech Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit 46ff2c7250eece24974ddb2198421c83a69a6289 Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:01 2006 -0300 V4L/DVB (4346): V4L2 conversion: radio_aimslab Driver conversion to V4L2 API. Require some testing, since this obsolete hardware is not common those days. Signed-off-by: Mauro Carvalho Chehab commit b59b36db9e8f441868c9907d6ea8fe0cdcb77f39 Author: Mauro Carvalho Chehab Date: Tue Aug 8 09:10:00 2006 -0300 V4L/DVB (4339): Removed the remaining config.h stuff Since kernel include autoconf.h via command line, those config.h inclusion can be removed. Signed-off-by: Mauro Carvalho Chehab commit 2c591947b044513bcc42dd57ea61f41b5b462d93 Author: Hartmut Hackmann Date: Mon Aug 7 14:03:32 2006 -0300 V4L/DVB (4309): Added PCI ID of the Genius VideoWonder Dual Cardbus It is just another Lifeview clone Signed-off-by: Hartmut Hackmann Signed-off-by: Mauro Carvalho Chehab commit 1e9bfb979bab6051c125f56230bfeeefe603f99e Author: Hartmut Hackmann Date: Mon Aug 7 14:03:32 2006 -0300 V4L/DVB (4308): Added PCI ID for AverMedia DVB-T 777 with SAA7133 The change is just an additional PCI ID Signed-off-by: Hartmut Hackmann Signed-off-by: Mauro Carvalho Chehab commit 5eda227fc622799a543dd7606f1037e89cd9e21b Author: Hartmut Hackmann Date: Mon Aug 7 14:03:32 2006 -0300 V4L/DVB (4307): Added support for the md8800 quadro board Analog TV, CVBS, S-video and DVB-T are working, DVB-S not yet Signed-off-by: Hartmut Hackmann Signed-off-by: Mauro Carvalho Chehab commit 19e22576d29cadaba88f08fb958f4fcf0de9b16c Author: Alexander Tuschen Date: Sun Jul 16 15:03:17 2006 -0300 V4L/DVB (4442): [PATCH] Freecom DVB-T stick with ID 14aa:0225 Ok, here is the working patch for the Freecom DVB-T stick with USB-ID 14aa:0225. It uses the Firmware-file, wich Erich Focht created and wich can be obtainded from http://home.arcor.de/efocht/dvb-usb-wt220u-fc03.fw Also the original patch is from Erich. It adds the proper USB-IDs and I only had to change the endpoint of the MPEG-2 data-transfer to 0x86. Signed-off-by: Alexander Tuschen Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit 98638ee2edf86b80cf89486c4aabcd9ce471a54a Author: Kyungmin Park Date: Tue Sep 26 08:52:14 2006 +0000 [MTD ONENAND] Remove unused MTD_ONENAND_SYNC_READ configuration Now the bootloader configures the OneNAND sync. burst mode. So we don't access Sync. burst mode related registers in kernel. Signed-off-by: Kyungmin Park Signed-off-by: David Woodhouse commit 3f75f42d7733e73aca5c78326489efd4189e0111 Author: Andi Kleen Date: Tue Sep 26 10:52:42 2006 +0200 [PATCH] Don't set calgary iommu as default y Most systems don't need it. Signed-off-by: Andi Kleen commit dcf10307c3fff2bca4b104ad8fe4e3aa8dcb2ad1 Author: Dave Jones Date: Tue Sep 26 10:52:42 2006 +0200 [PATCH] i386/x86-64: New Intel feature flags Add supplemental SSE3 instructions flag, and Direct Cache Access flag. As described in "Intel Processor idenfication and the CPUID instruction AP485 Sept 2006" AK: also added for x86-64 Signed-off-by: Dave Jones Signed-off-by: Andi Kleen commit 3222b36f46c22f46697a0a53fa8804153a32669f Author: Dmitriy Zavin Date: Tue Sep 26 10:52:42 2006 +0200 [PATCH] x86: Add a cumulative thermal throttle event counter. The counter is exported to /sys that keeps track of the number of thermal events, such that the user knows how bad the thermal problem might be (since the logging to syslog and mcelog is rate limited). AK: Fixed cpu hotplug locking Signed-off-by: Dmitriy Zavin Signed-off-by: Andi Kleen commit 66aea9913cf435fe92ebb7bf869b4f15901ab993 Author: Dmitriy Zavin Date: Tue Sep 26 10:52:42 2006 +0200 [PATCH] i386: Make the jiffies compares use the 64bit safe macros. Signed-off-by: Dmitriy Zavin Signed-off-by: Andi Kleen commit 15d5f8398311f565682959daaca30e3ca7aea600 Author: Dmitriy Zavin Date: Tue Sep 26 10:52:42 2006 +0200 [PATCH] x86: Refactor thermal throttle processing Refactor the event processing (syslog messaging and rate limiting) into separate file therm_throt.c. This allows consistent reporting of CPU thermal throttle events. After ACK'ing the interrupt, if the event is current, the user (p4.c/mce_intel.c) calls therm_throt_process to log (and rate limit) the event. If that function returns 1, the user has the option to log things further (such as to mce_log in x86_64). AK: minor cleanup Signed-off-by: Dmitriy Zavin Signed-off-by: Andi Kleen commit 3b171672831b9633c2ed8fa94805255cd4d5af19 Author: Dmitriy Zavin Date: Tue Sep 26 10:52:42 2006 +0200 [PATCH] Add 64bit jiffies compares (for use with get_jiffies_64) The current time_before/time_after macros will fail typechecks when passed u64 values (as returned by get_jiffies_64()). On 64bit systems, this will just result in a warning about mismatching types without explicit casts, but since unsigned long and u64 (unsigned long long) are of same size, it will still work. On 32bit systems, a long is 32bits, so the value from get_jiffies_64() will be truncated by the cast and thus lose all the precision gained by 64bit jiffies. Signed-off-by: Dmitriy Zavin Signed-off-by: Andi Kleen commit b89ebd0b0a65d5371aa9ad98e873c4616056ca68 Author: Andi Kleen Date: Tue Sep 26 10:52:42 2006 +0200 [PATCH] Fix unwinder warning in traps.c Fix linux/arch/x86_64/kernel/traps.c: In function 'dump_trace': linux/arch/x86_64/kernel/traps.c:275: warning: cast to pointer from integer of different size with allnoconfig Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit 0637a70a5db98182d9ad3d6ae1ee30acf20afde9 Author: Andi Kleen Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] x86: Allow disabling early pci scans with pci=noearly or disallowing conf1 Some buggy systems can machine check when config space accesses happen for some non existent devices. i386/x86-64 do some early device scans that might trigger this. Allow pci=noearly to disable this. Also when type 1 is disabling also don't do any early accesses which are always type1. This moves the pci= configuration parsing to be a early parameter. I don't think this can break anything because it only changes a single global that is only used by PCI. Cc: gregkh@suse.de Cc: Trammell Hudson Signed-off-by: Andi Kleen commit 8f60774a116ced9b73ae3913d511687889efe725 Author: Andi Kleen Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] x86: Move direct PCI scanning functions out of line Saves about 200 bytes of code space. Signed-off-by: Andi Kleen commit f157cbb1eb9ce3f33a401ec6d20eb3eb852351a3 Author: Andi Kleen Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] i386/x86-64: Make all early PCI scans dependent on CONFIG_PCI This is useful on systems with broken PCI bus. Affects various scans in x86-64 and i386's early ACPI quirk scan. Cc: gregkh@suse.de Cc: len.brown@intel.com Cc: Trammell Hudson Signed-off-by: Andi Kleen commit 658fdbef66e5e9be79b457edc2cbbb3add840aa9 Author: Andi Kleen Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] Don't leak NT bit into next task SYSENTER can cause a NT to be set which might cause crashes on the IRET in the next task. Following similar i386 patch from Linus. Signed-off-by: Andi Kleen commit adf1423698f00d00b267f7dca8231340ce7d65ef Author: Jan Beulich Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] i386/x86-64: Work around gcc bug with noreturn functions in unwinder Current gcc generates calls not jumps to noreturn functions. When that happens the return address can point to the next function, which confuses the unwinder. This patch works around it by marking asynchronous exception frames in contrast normal call frames in the unwind information. Then teach the unwinder to decode this. For normal call frames the unwinder now subtracts one from the address which avoids this problem. The standard libgcc unwinder uses the same trick. It doesn't include adjustment of the printed address (i.e. for the original example, it'd still be kernel_math_error+0 that gets displayed, but the unwinder wouldn't get confused anymore. This only works with binutils 2.6.17+ and some versions of H.J.Lu's 2.6.16 unfortunately because earlier binutils don't support .cfi_signal_frame [AK: added automatic detection of the new binutils and wrote description] Signed-off-by: Jan Beulich Signed-off-by: Andi Kleen commit ab2e0b46cb9a197fab7d98e147cac7cd41a14047 Author: Andi Kleen Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] Fix some broken white space in ia32_signal.c No functional changes Signed-off-by: Andi Kleen commit 536e3ee4fed13d2d4bbf1b775174aba0cadf6aba Author: Andi Kleen Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] Initialize argument registers for 32bit signal handlers. In case the user space was compiled with -mregparm=3 Following i386. Pointed out by Albert Cahalan Signed-off-by: Andi Kleen commit dd54a11004b2c9a1f136225f880e021a43b0eadc Author: Andi Kleen Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] Remove all traces of signal number conversion This was old code that was needed for iBCS and x86-64 never supported that. Pointed out by Albert Cahalan Signed-off-by: Andi Kleen commit 2049336f60d297c85ac977245b9326ec00396114 Author: Andi Kleen Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] Don't synchronize time reading on single core AMD systems We do some additional CPU synchronization in gettimeofday et.al. to make sure the time stamps are always monotonic over multiple CPUs. But on single core systems that is not needed. So don't do it. Signed-off-by: Andi Kleen commit 9ddab42d1e65dfbdb14588346d47fb142090ab40 Author: Andi Kleen Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] Remove outdated comment in x86-64 mmconfig code Cc: gregkh@suse.de Signed-off-by: Andi Kleen commit 27fbe5b28a2ffef171c6005f304ea4f80fcdcc01 Author: Andi Kleen Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] Use string instructions for Core2 copy/clear It is faster than using a unrolled loop for the use cases the kernel cares about (cached, sizes typically < 4K) Signed-off-by: Andi Kleen commit 35d534a3ff4905c0a7bddbad0fc9df55967742c7 Author: Matthew Garrett Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] x86: - restore i8259A eoi status on resume Got it. i8259A_resume calls init_8259A(0) unconditionally, even if auto_eoi has been set. Keep track of the current status and restore that on resume. This fixes it for AMD64 and i386. Signed-off-by: Matthew Garrett Signed-off-by: Andi Kleen commit f354b3a92af9b132b188b9c8ebbfb74de699926d Author: Dave Jones Date: Tue Sep 26 10:52:41 2006 +0200 [PATCH] i386: Split multi-line printk in oops output. Sometimes, bug reports come in where we've had an oops, and the only record we have is what the reporter saw on screen shortly before the system locked up completely. Unfortunatly, syslog only prints lines beginning with KERN_EMERG to the console, so some lines get lost. An example of this can be seen at https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=203723 Some of this information isn't vital to diagnosis, but some parts are useful, such as the tainted flag. Signed-off-by: Dave Jones Signed-off-by: Andi Kleen commit 2817716ace8c397685bd702223cc5a8a42c7e997 Author: Jeremy Fitzhardinge Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] i386: Fix pack_descriptor() Fix pack_descriptor: 1. flags are bits 20-23 in the high word 2. limit's 4 msb are bits 16-19 in the high word These haven't mattered so far, because all users have had small limits and a flags setting of 0. Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Andi Kleen =================================================================== commit de09bddb9d6f96785be470c832b881e6d72d589f Author: Andi Kleen Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] i386: Add MMCFG resources to i386 too Following earlier x86-64 patch Cc: gregkh@suse.de Signed-off-by: Andi Kleen commit 4c6e052adfe285ede5884e4e8c4d33af33932c13 Author: Aaron Durbin Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] MMCONFIG and new Intel motherboards On Sat, Sep 09, 2006 at 04:14:29PM +0200, Andi Kleen wrote: > [patch] Looks reasonable, but probably not for 2.6.18 because this stuff > is already too fragile and it is probably too risky to do any big changes now > since not enough testing time is left. Can you please resubmit > it with proper description and signed-off-by line? I can queue it for .19 then > > -Andi Patch inserts PCI memory mapped config region(s) into the resource map. This will allow for the MMCCONFIG regions to be marked as busy in the iomem address space as well as the regions(s) showing up in /proc/iomem. Signed-off-by: Aaron Durbin Signed-off-by: Andi Kleen commit 56dd669a138c40ea6cdae487f233430d12372767 Author: Aaron Durbin Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] Insert GART region into resource map Patch inserts the GART region into the iomem resource map. The GART will then be visible within /proc/iomem. It will also allow for other users utilizing the GART to subreserve the region (agp or IOMMU). Signed-off-by: Aaron Durbin Signed-off-by: Andi Kleen commit 9abd79280bbb9f56049f0168f412c3538cadb6eb Author: Andi Kleen Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] i386/x86-64: Only do MCFG e820 check when type 1 works Needs earlier patch to split type 1 probing from use. This patch should fix the x86 macs where type 1 PCI config space access doesn't work, but MCFG does. They also don't have a usable e820 table so the e820 sanity check failed. Instead assume now that if type 1 doesn't work then MCFG must work and don't do the e820 check. Signed-off-by: Andi Kleen commit 5e544d618f0fb21011f36f28d5e3952b9dc109d2 Author: Andi Kleen Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] i386/x86-64: PCI: split probing and initialization of type 1 config space access First probe if type1/2 accesses work, but then only initialize them at the end. This is useful for a later patch that needs this information inbetween. Signed-off-by: Andi Kleen commit a15da49debaf7f09460a886b0ecd08588410715e Author: Andi Kleen Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] Fix idle notifiers Previously exit_idle would be called more often than enter_idle Now instead of using complicated tests just keep track of it using the per CPU variable as a flip flop. I moved the idle state into the PDA to make the access more efficient. Original bug report and an initial patch from Stephane Eranian, but redone by AK. Cc: Stephane Eranian Signed-off-by: Andi Kleen commit 1c9c0a6ca35e9325cea811d734d6ab7352be086b Author: Eric W. Biederman Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] Remove experimental mark of kexec kexec has been marked experimental for a year now and all of the serious problems have been worked through. So it is time (if not past time) to remove the experimental mark. Signed-off-by: Eric W. Biederman Signed-off-by: Andi Kleen commit 371c2f2783eb880df333d0e9ac35c78143e79d0a Author: Eric W. Biederman Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] i386: Remove experimental mark of kexec kexec has been marked experimental for a year now and all of the serious problems have been worked through. So it is time (if not past time) to remove the experimental mark. Signed-off-by: Eric W. Biederman Signed-off-by: Andi Kleen commit b38337a624c4d3c2c3d9cdf27d952ca94181c6a8 Author: Andi Kleen Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] Mark per cpu data initialization __initdata again Before 2.6.16 this was changed to work around code that accessed CPUs not in the possible map. But that code should be all fixed now, so mark it __initdata again. Signed-off-by: Andi Kleen commit 73bb5117a448bdf0b56232ca28451fe4c534cb3a Author: Andi Kleen Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] Remove unused asm-x86_64/mmx.h Signed-off-by: Andi Kleen commit fd167e42b237e0688005b3dec380eb5a6e5f3585 Author: Andi Kleen Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] Define __bad_pda_field as noreturn This quietens so warnings about uninitialized use of the return value of the pda read operations. Signed-off-by: Andi Kleen commit c1a9d41f4f103bfef2ed0bea1e95b3190e39e448 Author: Andi Kleen Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] Reindent macros in pda.h Reindent the macros in x86-64 pda.h, making them much more readable. Follows Jeremy's i386 version of this. No functional changes Signed-off-by: Andi Kleen commit 383d079bfdfcfccd6a720405a510fe325b3e6576 Author: Andi Kleen Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] Fix some stylistic issues in uaccess.h - Replace some broken white space. - Replace __ keywords with standard names No functional changes. Signed-off-by: Andi Kleen commit 26c13f2b5bbb03f798f8907db20296347e6c7ca6 Author: Andi Kleen Date: Tue Sep 26 10:52:40 2006 +0200 [PATCH] Check return values of __copy_to_user in uname emulation Quietens some new warnings Signed-off-by: Andi Kleen commit 758333458aa719bfc26ec16eafd4ad3a9e96014d Author: Andi Kleen Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] Check return value of copy_to_user in compat_sys_pselect7 Fix linux/fs/compat.c: In function compat_sys_pselect7 linux/fs/compat.c:1869: warning: ignoring return value of copy_to_user, declared with attribute warn_unused_result To make it easier to handle I changed to semantics to not try to write out a timespec if an error occurred. I hope that's ok. Cc: dwmw2@infradead.org Signed-off-by: Andi Kleen commit 95912008ba1fb9d0677c1ce5930aeb0e85ba5710 Author: Andi Kleen Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] Add __must_check to copy_*_user Following i386. And also fix the two occurrences that caused warnings in arch/x86_64/* Signed-off-by: Andi Kleen commit 3022d734a54cbd2b65eea9a024564821101b4a9a Author: Andi Kleen Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] Fix zeroing on exception in copy_*_user - Don't zero for __copy_from_user_inatomic following i386. This will prevent spurious zeros for parallel file system writers when one does a exception - The string instruction version didn't zero the output on exception. Oops. Also I cleaned up the code a bit while I was at it and added a minor optimization to the string instruction path. Signed-off-by: Andi Kleen commit f0f4c3432e5e1087b3a8c0e6bd4113d3c37497ff Author: adurbin@google.com Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] i386: add HPET(s) into resource map Add HPET(s) into resource map. This will allow for the HPET(s) to be visibile within /proc/iomem. Signed-off-by: Aaron Durbin Signed-off-by: Andi Kleen commit 54dbc0c9ebefb38840c6b07fa6eabaeb96c921f5 Author: adurbin@google.com Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] insert IOAPIC(s) and Local APIC into resource map This patch places the IOAPIC(s) and the Local APIC specified by ACPI tables into the resource map. The APICs will then be visible within /proc/iomem Signed-off-by: Aaron Durbin Signed-off-by: Andi Kleen commit ec5c09269ba9cd3b9cf879390db6d5c7dcdcaf1e Author: Chuck Ebbert <76306.1226@compuserve.com> Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] i386: Do better early exception handlers Add early i386 fault handlers with debug information for common faults. Handles: divide error invalid opcode protection fault page fault Also adds code to detect early recursive/multiple faults and halt the system when they happen (taken from x86_64.) Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Andi Kleen Cc: Andi Kleen Cc: Ingo Molnar Signed-off-by: Andrew Morton commit 78be3706b21a232310590fe00258b224177ac05f Author: Rusty Russell Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] i386: Allow a kernel not to be in ring 0 We allow for the fact that the guest kernel may not run in ring 0. This requires some abstraction in a few places when setting %cs or checking privilege level (user vs kernel). This is Chris' [RFC PATCH 15/33] move segment checks to subarch, except rather than using #define USER_MODE_MASK which depends on a config option, we use Zach's more flexible approach of assuming ring 3 == userspace. I also used "get_kernel_rpl()" over "get_kernel_cs()" because I think it reads better in the code... 1) Remove the hardcoded 3 and introduce #define SEGMENT_RPL_MASK 3 2) Add a get_kernel_rpl() macro, and don't assume it's zero. And: Clean up of patch for letting kernel run other than ring 0: a. Add some comments about the SEGMENT_IS_*_CODE() macros. b. Add a USER_RPL macro. (Code was comparing a value to a mask in some places and to the magic number 3 in other places.) c. Add macros for table indicator field and use them. d. Change the entry.S tests for LDT stack segment to use the macros Signed-off-by: Rusty Russell Signed-off-by: Zachary Amsden Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen commit 0da5db313317e3195482d3e660a1074857374a89 Author: Rusty Russell Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] i386: Abstract sensitive instructions Abstract sensitive instructions in assembler code, replacing them with macros (which currently are #defined to the native versions). We use long names: assembler is case-insensitive, so if something goes wrong and macros do not expand, it would assemble anyway. Resulting object files are exactly the same as before. Signed-off-by: Rusty Russell Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen commit 7b0bda74f7e77f362eaeee837e7911238acf4c76 Author: Andi Kleen Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] Fix a PDA warning uncovered by the new type checking Fix linux/arch/x86_64/kernel/process.c: In function __switch_to: linux/arch/x86_64/kernel/process.c:626: warning: assignment makes integer from pointer without a cast Signed-off-by: Andi Kleen commit 85691f135db78f3548107a0abe383dfab3bc38fa Author: Jeremy Fitzhardinge Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] Type checking for write_pda() I just added type checking for assignments the PDA in the i386 PDA code. Here's the x86-64 equivalent. (Obviously this doesn't contain the latest x86-64 PDA change.) Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Andi Kleen commit baf5695dd1a49bb48a3daf08726d7f243f42e97e Author: Andi Kleen Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] Use %c instead of %P modifier in pda access Apparently that is the more official way to get numbers without $ in inline assembly Signed-off-by: Andi Kleen commit 96e540492ab54423f3693958329e095878f1f12b Author: Andi Kleen Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] Fix a irqcount comment in entry.S Signed-off-by: Andi Kleen commit 4f7fd4d7a79193ceda4ce77f75e22917d33fa154 Author: Arjan van de Ven Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] Add the -fstack-protector option to the CFLAGS Add a feature check that checks that the gcc compiler has stack-protector support and has the bugfix for PR28281 to make this work in kernel mode. The easiest solution I could find was to have a shell script in scripts/ to do the detection; if needed we can make this fancier in the future without making the makefile too complex. Signed-off-by: Arjan van de Ven Signed-off-by: Andi Kleen CC: Andi Kleen CC: Sam Ravnborg commit 3162f751d04086a9d006342de63ac8f44fe0f72a Author: Arjan van de Ven Date: Tue Sep 26 10:52:39 2006 +0200 [PATCH] Add the __stack_chk_fail() function GCC emits a call to a __stack_chk_fail() function when the stack canary is not matching the expected value. Since this is a bad security issue; lets panic the kernel rather than limping along; the kernel really can't be trusted anymore when this happens. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Andi Kleen CC: Andi Kleen commit 0a4254058037eb172758961d0a5b94f4320a1425 Author: Arjan van de Ven Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] Add the canary field to the PDA area and the task struct This patch adds the per thread cookie field to the task struct and the PDA. Also it makes sure that the PDA value gets the new cookie value at context switch, and that a new task gets a new cookie at task creation time. Signed-off-by: Arjan van Ven Signed-off-by: Ingo Molnar Signed-off-by: Andi Kleen CC: Andi Kleen commit b62a5c740df1e3d49a97349fce0c6a23f633d7fe Author: Arjan van de Ven Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] Add the Kconfig option for the stackprotector feature This patch adds the config options for -fstack-protector. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Andi Kleen CC: Andi Kleen commit 29a9af60e2120f874d0c600bf9e27617254a0488 Author: Arjan van de Ven Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] Add comments to the PDA structure to annotate offsets Change the comments in the pda structure to make the first fields to have their offset documented and to have the comments aligned. The stack protector series needs a field at offset 40 (gcc ABI); annotate upto 40 for that reason. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Andi Kleen CC: Andi Kleen commit 027a51cef330433ba5924fc92fb25ef48bcfc1a3 Author: Andi Kleen Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] Document my tree in Documentation/HOWTO Signed-off-by: Andi Kleen commit e8c7391de4cd91b2cbb0c791f69ba1e066595848 Author: Andi Kleen Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] Don't use kernel_text_address in oops context Because it can take spinlocks. Suggested by Mathieu Desnoyers Cc: Mathieu Desnoyers Signed-off-by: Andi Kleen commit 3566561bfadffcb5dbc85d576be80c0dbf2cccc9 Author: Magnus Damm Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] i386: Avoid overwriting the current pgd (V4, i386) kexec: Avoid overwriting the current pgd (V4, i386) This patch upgrades the i386-specific kexec code to avoid overwriting the current pgd. Overwriting the current pgd is bad when CONFIG_CRASH_DUMP is used to start a secondary kernel that dumps the memory of the previous kernel. The code introduces a new set of page tables. These tables are used to provide an executable identity mapping without overwriting the current pgd. Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen commit 4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f Author: Magnus Damm Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] Avoid overwriting the current pgd (V4, x86_64) kexec: Avoid overwriting the current pgd (V4, x86_64) This patch upgrades the x86_64-specific kexec code to avoid overwriting the current pgd. Overwriting the current pgd is bad when CONFIG_CRASH_DUMP is used to start a secondary kernel that dumps the memory of the previous kernel. The code introduces a new set of page tables. These tables are used to provide an executable identity mapping without overwriting the current pgd. Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen commit f574164491d00d28b727d713685fb5edc9138200 Author: Keith Owens Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] Remove most of the special cases for the debug IST stack Remove most of the special cases for the debug IST stack. This is a follow on clean up patch, it requires the bug fix patch that adds orig_ist. Signed-off-by: Keith Owens Signed-off-by: Andi Kleen commit 575400d1b483fbe9e03c68758059bfaf4e4768d1 Author: H. Peter Anvin Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] i386: Fix the EDD code misparsing the command line The EDD code would scan the command line as a fixed array, without taking account of either whitespace, null-termination, the old command-line protocol, late overrides early, or the fact that the command line may not be reachable from INITSEG. This should fix those problems, and enable us to use a longer command line. Signed-off-by: H. Peter Anvin Signed-off-by: Andi Kleen commit 53ee11ae0d73f28029a5f0d991bc4dcd7c817e7a Author: Andi Kleen Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] Optimize PDA accesses slightly Based on a idea by Jeremy Fitzhardinge: Replace the volatiles and memory clobbers in the PDA access with telling gcc about access to a proxy PDA structure that doesn't actually exist. But the dummy accesses give a defined ordering for read/write accesses. Also add some memory barriers to the early GS initialization to make sure no PDA access is moved before it. Advantage is some .text savings (probably most from better code for accessing "current"): text data bss dec hex filename 4845647 1223688 615864 6685199 66020f vmlinux 4837780 1223688 615864 6677332 65e354 vmlinux-pda 1.2% smaller code Cc: Jeremy Fitzhardinge Signed-off-by: Andi Kleen commit 80d2679cbc8e170011c9649fb8fb684ffd7e5c8f Author: Andi Kleen Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] x86: Remove incorrect comment about ACPI e820 entries They cannot be actually freed because the FACS table has a shared-with-the-BIOS lock. Signed-off-by: Andi Kleen commit f2a9e1dec27189a09ff642f2648e49ad9e76607b Author: Ian Campbell Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] Put .note.* sections into a PT_NOTE segment This patch updates x86_64 linker script to pack any .note.* sections into a PT_NOTE segment in the output file. To do this, we tell ld that we need a PT_NOTE segment. This requires us to start explicitly mapping sections to segments, so we also need to explicitly create PT_LOAD segments for text and data, and map the sections to them appropriately. Fortunately, each section will default to its previous section's segment, so it doesn't take many changes to vmlinux.lds.S. The corresponding change is already made for i386 in -mm and I'd like this patch to join it. The section to segment mappings do change as do the segment flags so some time in -mm would be good for that reason as well, just in case. In particular .data and .bss move from the text segment to the data segment and .data.cacheline_aligned .data.read_mostly are put in the data segment instead of a separate one. I think that it would be possible to exactly match the existing section to segment mapping and flags but it would be a more intrusive change and I'm not sure there is a reason for the existing layout other than it is what you get by default if you don't explicitly specify something else. If there is a reason for the existing layout then I will of course make the more intrusive change. If there is no reason we could probably drop the executable or writable flags from some segments but I don't know how much attention is paid to them anyway so it might not be worth the effort. The vsyscall related sections need to go in a different segment to the normal data segment and so I invented a "user" segment to contain them. I believe this should appear to be another data segment as far as the kernel is concerned so the flags are setup accordingly. The notes will be used in the Xen paravirt_ops backend to provide additional information to the domain builder. I am in the process of converting the xen-unstable kernels and tools over to this scheme at the moment to support this in the future. It has been suggested to me that the notes segment should have flags 0 (i.e. not readable) since it is only used by the loader and is not used at runtime. For now I went with a readable segment since that is what the i386 patch uses. AK: dropped NOTES addition right now because the needed infrastructure for that is not merged yet Signed-off-by: Ian Campbell Signed-off-by: Andi Kleen commit 26374c7b7dca1ff90607c83d9b82e917119f0456 Author: Eric W. Biederman Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] Reload CS when startup_64 is used. In long mode the %cs is largely a relic. However there are a few cases like iret where it matters that we have a valid value. Without this patch it is possible to enter the kernel in startup_64 without setting %cs to a valid value. With this patch we don't care what %cs value we enter the kernel with, so long as the cs shadow register indicates it is a privileged code segment. Thanks to Magnus Damm for finding this problem and posting the first workable patch. I have moved the jump to set %cs down a few instructions so we don't need to take an extra jump. Which keeps the code simpler. Signed-of-by: Eric W. Biederman Signed-off-by: Andi Kleen commit 0136611c62e8650e354b95c76dff6d2ce6030eff Author: Andi Kleen Date: Tue Sep 26 10:52:38 2006 +0200 [PATCH] optimize hweight64 for x86_64 Based on patch from David Rientjes , but changed by AK. Optimizes the 64-bit hamming weight for x86_64 processors assuming they have fast multiplication. Uses five fewer bitops than the generic hweight64. Benchmark on one EMT64 showed ~25% speedup with 2^24 consecutive calls. Define a new ARCH_HAS_FAST_MULTIPLIER that can be set by other architectures that can also multiply fast. Signed-off-by: Andi Kleen commit 8380aabb99719af583447133f19a4d8074b5c337 Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Remove non e820 fallbacks in high level code Drop support for non e820 BIOS calls to get the memory map. The boot assembler code still has some support, but not the C code now. Signed-off-by: Andi Kleen commit b3698c03eb6d4581e879d6bb0f183ed8dda96d37 Author: Paolo 'Blaisorblade' Giarrusso Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Fix boot code head.S warning When compiling a 64-bit kernel on an Ubuntu 6.06 32bit system (whose GCC is also a cross-compiler for x86_64) I've seen that head.o is compiled as a 64-bit file (while it should not) and ld complaining about this during linking: [AK: it happens on all systems with new binutils] ld: warning: i386:x86-64 architecture of input file `arch/x86_64/boot/compressed/head.o' is incompatible with i386 output I've verified that removing -m64 from compilation flags to turn "-m64 -traditional -m32" into "-traditional -m32" fixes the issue. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andi Kleen commit 7a0a2dff1cac1df82acfa0395bc9bc1bf0bc16ef Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Add a missing check for irq flags tracing in NMI NMIs are not supposed to track the irq flags, but TRACE_IRQS_IRETQ did it anyways. Add a check. Cc: mingo@elte.hu Signed-off-by: Andi Kleen commit aecc63615e15de861db7436c50dade495639132c Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Fix coding style and output of the mptable parser Give the printks a consistent prefix. Add some missing white space. Cc: len.brown@intel.com Signed-off-by: Andi Kleen commit e4251e130deef9de5226cc36faa70a1c6671d3c5 Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Remove some cruft in apic id checking during processor setup - Remove a define that was used only once - Remove the too large APIC ID check because we always support the full 8bit range of APICs. - Restructure code a bit to be simpler. Cc: len.brown@intel.com Signed-off-by: Andi Kleen commit f2c2cca3acef8b253a36381d9b469ad4fb08563a Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Remove APIC version/cpu capability mpparse checking/printing ACPI went to great trouble to get the APIC version and CPU capabilities of different CPUs before passing them to the mpparser. But all that data was used was to print it out. Actually it even faked some data based on the boot cpu, not on the actual CPU being booted. Remove all this code because it's not needed. Cc: len.brown@intel.com Signed-off-by: Andi Kleen commit 5e6b0bfe5b452957b7be4b6ef181cd41880f8359 Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Use proper accessors to change PSE bits in change_page_attr() Use normal pte accessors in change_page_attr() to access the PSE bits. Signed-off-by: Andi Kleen commit df992848f5aa803fcacd2c5e7d67034bb89e3fa3 Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Fix pte_exec/mkexec and use it in change_page_attr() Fix the pte_exec/mkexec page table accessor functions to really use the NX bit. Previously they only checked the USER bit, but weren't actually used for anything. Then use them in change_page_attr() to manipulate the NX bit properly. Signed-off-by: Andi Kleen commit d3cf7f061521c78ad62e275eb6fbdc8f43fc75a7 Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Remove bogus warning from early_ioremap It is correct for its only caller right now, but not for possible future others. Signed-off-by: Andi Kleen commit 151f8cc1169f9052095b2be36183ab132d75c6c2 Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Remove safe_smp_processor_id() And replace all users with ordinary smp_processor_id. The function was originally added to get some basic oops information out even if the GS register was corrupted. However that didn't work for some anymore because printk is needed to print the oops and it uses smp_processor_id() already. Also GS register corruptions are not particularly common anymore. This also helps the Xen port which would otherwise need to do this in a special way because it can't access the local APIC. Cc: Chris Wright Signed-off-by: Andi Kleen commit 34464a5b8937b79801776dfb6970c1b949fed4be Author: Rafael J. Wysocki Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Detect clock skew during suspend Detect the situations in which the time after a resume from disk would be earlier than the time before the suspend and prevent them from happening on x86_64. Signed-off-by: Rafael J. Wysocki Signed-off-by: Andi Kleen commit a549b86dd0f3cbffcd5f9343f4ae7fcd59f7e756 Author: Chuck Ebbert <76306.1226@compuserve.com> Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] i386: annotate FIX_STACK() and the rest of nmi() In i386's entry.S, FIX_STACK() needs annotation because it replaces the stack pointer. And the rest of nmi() needs annotation in order to compile with these new annotations. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Andi Kleen commit 1164c9994fe37d5b7035a5cf9328c98dd38af7b1 Author: Andrew Morton Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] make numa_emulation() __init Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen commit 1bb4996bcebca1cde49d964b4e012699ce180e61 Author: Andi Kleen Date: Tue Sep 26 10:52:37 2006 +0200 [PATCH] Move compiler check for modules to ia64 only Apparently IA64 needs it, but i386/x86-64 don't anymore since gcc 2.95 support was dropped. Nobody else on linux-arch requested keeping it generically Cc: tony.luck@intel.com Cc: kaos@sgi.com Signed-off-by: Andi Kleen commit dbf9272e863bf4b17ee8e3c66c26682b2061d40d Author: Andi Kleen Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] Don't force reserve the 640k-1MB range From i386 x86-64 inherited code to force reserve the 640k-1MB area. That was needed on some old systems. But we generally trust the e820 map to be correct on 64bit systems and mark all areas that are not memory correctly. This patch will allow to use the real memory in there. Or rather the only way to find out if it's still needed is to try. So far I'm optimistic. Signed-off-by: Andi Kleen commit f704cb935006580db0495e54d3c82631f6e2a984 Author: Dave Jones Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] x86: remove config.h includes from asm-i386 & asm-x86_64 This is now automatically included by kbuild. Signed-off-by: Dave Jones Signed-off-by: Andi Kleen commit 06039754d775d3e48e4a292e4f353321205eff53 Author: Fernando Luis Vázquez Cao Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] i386: Disallow kprobes on NMI handlers A kprobe executes IRET early and that could cause NMI recursion and stack corruption. Note: This problem was originally spotted and solved by Andi Kleen in the x86_64 architecture. This patch is an adaption of his patch for i386. AK: Merged with current code which was a bit different. AK: Removed printk in nmi handler that shouldn't be there in the first time AK: Added missing include. AK: added KPROBES_END Signed-off-by: Fernando Vazquez Signed-off-by: Andi Kleen commit 6f6b1e0477ccb2f25a9b045e38440347d2ce21c8 Author: Fernando Luis Vázquez Cao Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] i386: Disallow kprobes on NMI handlers A kprobe executes IRET early and that could cause NMI recursion and stack corruption. Note: This problem was originally spotted by Andi Kleen. This patch adds fixes not included in his original patch. [AK: Jan Beulich originally discovered these classes of bugs] Signed-off-by: Fernando Vazquez Signed-off-by: Andi Kleen commit e9dff0ee6694b2edd40b1b448cb786f6a7b02336 Author: Magnus Damm Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] i386: mark cpu cache functions as __cpuinit Mark i386-specific cpu cache functions as __cpuinit. They are all only called from arch/i386/common.c:display_cache_info() that already is marked as __cpuinit. Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen commit 5f0f1c166647860bb2c2a206338e7d9af3834753 Author: Magnus Damm Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] i386: mark cpu identify functions as __cpuinit Mark i386-specific cpu identification functions as __cpuinit. They are all only called from arch/i386/common.c:identify_cpu() that already is marked as __cpuinit. Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen commit b4af3f7cf11e6b5904af08a652d4a2429af17c74 Author: Magnus Damm Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] i386: mark cpu init functions as __cpuinit, data as __cpuinitdata Mark i386-specific cpu init functions as __cpuinit. They are all only called from arch/i386/common.c:identify_cpu() that already is marked as __cpuinit. This patch also removes the empty function init_umc(). Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen commit 95414930548871c6c92a5b0e607b12b81f3d84d8 Author: Magnus Damm Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] i386: mark cpu_dev structures as __cpuinitdata The different cpu_dev structures are all used from __cpuinit callers what I can tell. So mark them as __cpuinitdata instead of __initdata. I am a little bit unsure about arch/i386/common.c:default_cpu, especially when it comes to the purpose of this_cpu. Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen commit ed77504b2007ff7ce56841227467ac3ead52df62 Author: Magnus Damm Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] mark init_amd() as __cpuinit The init_amd() function is only called from identify_cpu() which is already marked as __cpuinit. So let's mark it as __cpuinit. Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen commit 68bbc172cd1b0ee01814304b8a7bef8922d5fdca Author: Magnus Damm Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] i386: remove redundant generic_identify() calls when identifying cpus cpu_dev->c_identify is only called from arch/i386/common.c:identify_cpu(), and this after generic_identify() already has been called. There is no need to call this function twice and hook it in c_identify - but I may be wrong, please double check before applying. This patch also removes generic_identify() from cpu.h to avoid unnecessary future nesting. Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen commit 6ad916581181a105d7832a7dec9e1eb58f7a1621 Author: Keith Mannthey Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] x86_64 kernel mapping fix Fix for the x86_64 kernel mapping code. Without this patch the update path only inits one pmd_page worth of memory and tramples any entries on it. now the calling convention to phys_pmd_init and phys_init is to always pass a [pmd/pud] page not an offset within a page. Signed-off-by: Keith Mannthey Signed-off-by: Andi Kleen Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton commit abf0f10948b316b577851ef21c728341f1046552 Author: Andrew Morton Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] wire up oops_enter()/oops_exit() Implement pause_on_oops() on x86_64. AK: I redid the patch to do the oops_enter/exit in the existing oops_begin()/end(). This makes it much shorter. Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen commit e07e23e1fd3000289fc7ccc6c71879070d3b19e0 Author: Arjan van de Ven Date: Tue Sep 26 10:52:36 2006 +0200 [PATCH] non lazy "sleazy" fpu implementation Right now the kernel on x86-64 has a 100% lazy fpu behavior: after *every* context switch a trap is taken for the first FPU use to restore the FPU context lazily. This is of course great for applications that have very sporadic or no FPU use (since then you avoid doing the expensive save/restore all the time). However for very frequent FPU users... you take an extra trap every context switch. The patch below adds a simple heuristic to this code: After 5 consecutive context switches of FPU use, the lazy behavior is disabled and the context gets restored every context switch. If the app indeed uses the FPU, the trap is avoided. (the chance of the 6th time slice using FPU after the previous 5 having done so are quite high obviously). After 256 switches, this is reset and lazy behavior is returned (until there are 5 consecutive ones again). The reason for this is to give apps that do longer bursts of FPU use still the lazy behavior back after some time. [akpm@osdl.org: place new task_struct field next to jit_keyring to save space] Signed-off-by: Arjan van de Ven Signed-off-by: Andi Kleen Cc: Andi Kleen Signed-off-by: Andrew Morton commit 73fea175303926055440c06bc8894f0c5c58afc8 Author: Ashok Raj Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] i386: Support physical cpu hotplug for x86_64 This patch enables ACPI based physical CPU hotplug support for x86_64. Implements acpi_map_lsapic() and acpi_unmap_lsapic() to support physical cpu hotplug. Signed-off-by: Ashok Raj Signed-off-by: Andi Kleen Cc: Andi Kleen Cc: "Brown, Len" Signed-off-by: Andrew Morton commit 40bee2ee73c745922e9b2d5595c46f19d1cf1b6f Author: Brice Goglin Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] fix bus numbering format in mmconfig warning Make an mmconfig warning print the bus id with a regular format. Signed-off-by: Brice Goglin Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton commit c0d83745cc67ed71a08c14739a0b286d0239b1e2 Author: Magnus Damm Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] i386: mark two more functions as __init cyrix_identify() should be __init because transmeta_identify() is. tsc_init() is only called from setup_arch() which is marked as __init. These two section mismatches have been detected using running modpost on a vmlinux image compiled with CONFIG_RELOCATABLE=y. Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen commit aada06c9b7f4cdedbeb2bc905893cf1923a0abad Author: Magnus Damm Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] i386: clean up topology.c There is no need to duplicate the topology_init() function. Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen commit ba4d40bb5c465f0a4dcc30d02dab80c2cb7e1ff3 Author: Eric W. Biederman Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] Auto size the per cpu area. Now for a completely different but trivial approach. I just boot tested it with 255 CPUS and everything worked. Currently everything (except module data) we place in the per cpu area we know about at compile time. So instead of allocating a fixed size for the per_cpu area allocate the number of bytes we need plus a fixed constant for to be used for modules. It isn't perfect but it is much less of a pain to work with than what we are doing now. AK: fixed warning Signed-off-by: Eric W. Biederman Signed-off-by: Andi Kleen commit 522e93e3fcdbf00ba85c72fde6df28cfc0486a65 Author: Rusty Russell Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] i386: Descriptor and trap table cleanups. The implementation comes from Zach's [RFC, PATCH 10/24] i386 Vmi descriptor changes: Descriptor and trap table cleanups. Add cleanly written accessors for IDT and GDT gates so the subarch may override them. Note that this allows the hypervisor to transparently tweak the DPL of the descriptors as well as the RPL of segments in those descriptors, with no unnecessary kernel code modification. It also allows the hypervisor implementation of the VMI to tweak the gates, allowing for custom exception frames or extra layers of indirection above the guest fault / IRQ handlers. Signed-off-by: Zachary Amsden Signed-off-by: Rusty Russell Signed-off-by: Andi Kleen commit 02ba1a32dbd3d406530a17a2643a8f0f8cbf3acc Author: Andi Kleen Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] i386: move kernel_thread_helper into entry.S And add proper CFI annotation to it which was previously impossible. This prevents "stuck" messages by the dwarf2 unwinder when reaching the top of a kernel stack. Includes feedback from Jan Beulich Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit 3d08a256da8aed5300bd0752200ece426f49b050 Author: Adrian Bunk Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] i386: Make enable_local_apic static enable_local_apic can now become static. Cc: len.brown@intel.com Signed-off-by: Adrian Bunk Signed-off-by: Andi Kleen commit e8924acb2ef46b96c93f97025815ef3843cb67a2 Author: Adrian Bunk Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] i386: Make acpi_force static acpi_force can become static. Cc: len.brown@intel.com Signed-off-by: Adrian Bunk Signed-off-by: Andi Kleen commit 474c256841074b913e76e392082373e12103a75d Author: Andi Kleen Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] i386: make fault notifier unconditional and export it It's needed for external debuggers and overhead is very small. Also make the actual notifier chain they use static Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit 273819a2d982faace30e587b86a0683882251fe7 Author: Andi Kleen Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] make fault notifier unconditional and export it It's needed for external debuggers and overhead is very small. Also make the actual notifier chain they use static Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit 5e4edbb711417be40f350a319db39888a4edd450 Author: Andi Kleen Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] i386: Fix warning in mpparse.c Fix linux/arch/i386/kernel/mpparse.c: In function #MP_bus_info#: linux/arch/i386/kernel/mpparse.c:232: warning: comparison is always false due to limited range of data type Signed-off-by: Andi Kleen commit 2717941c6a1d8fa543ddca337d450ab30ef91543 Author: Andi Kleen Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] Make boot_param_data pure BSS Since it's all zero. Actually I think gcc 4+ will do that automatically, but earlier compilers won't Signed-off-by: Andi Kleen commit 1edf777803bdd2aeeb04cf44508fd9b88737fba8 Author: Andi Kleen Date: Tue Sep 26 10:52:35 2006 +0200 [PATCH] i386/x86-64: Improve Kconfig description of CRASH_DUMP Improve Kconfig description of CONFIG_CRASH_DUMP. Previously it was too brief to be useful. Cc: vgoyal@in.ibm.com Cc: ebiederm@xmission.com Signed-off-by: Andi Kleen commit cbf9b4bb76c9ce53b7fdde0dffcd000951b5f0d4 Author: Dimitri Sivanich Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] X86_64 monotonic_clock goes backwards I've noticed some erratic behavior while testing the X86_64 version of monotonic_clock(). While spinning in a loop reading monotonic clock values (pinned to a single cpu) I noticed that the difference between subsequent values occasionally went negative (time going backwards). I found that in the following code: this_offset = get_cycles_sync(); /* FIXME: 1000 or 1000000? */ --> offset = (this_offset - last_offset)*1000 / cpu_khz; } return base + offset; the offset sometimes turns out to be 0, even though this_offset > last_offset. +Added fix From: Toyo Abe The x86_64-mm-monotonic-clock.patch in 2.6.18-rc4-mm2 made a change to the updating of monotonic_base. It now uses cycles_2_ns(). I suggest that a set_cyc2ns_scale() should be done prior to the setup_irq(). Because cycles_2_ns() can be called from the timer ISR right after the irq0 is enabled. Signed-off-by: Toyo Abe Signed-off-by: Dimitri Sivanich Signed-off-by: Andi Kleen commit d28c4393a7bf558538e9def269c1caeab6ec056f Author: Prasanna S.P Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] x86: error_code is not safe for kprobes This patch moves the entry.S:error_entry to .kprobes.text section, since code marked unsafe for kprobes jumps directly to entry.S::error_entry, that must be marked unsafe as well. This patch also moves all the ".previous.text" asm directives to ".previous" for kprobes section. AK: Following a similar i386 patch from Chuck Ebbert AK: Also merged Jeremy's fix in. +From: Jeremy Fitzhardinge KPROBE_ENTRY does a .section .kprobes.text, and expects its users to do a .previous at the end of the function. Unfortunately, if any code within the function switches sections, for example .fixup, then the .previous ends up putting all subsequent code into .fixup. Worse, any subsequent .fixup code gets intermingled with the code its supposed to be fixing (which is also in .fixup). It's surprising this didn't cause more havok. The fix is to use .pushsection/.popsection, so this stuff nests properly. A further cleanup would be to get rid of all .section/.previous pairs, since they're inherently fragile. +From: Chuck Ebbert <76306.1226@compuserve.com> Because code marked unsafe for kprobes jumps directly to entry.S::error_code, that must be marked unsafe as well. The easiest way to do that is to move the page fault entry point to just before error_code and let it inherit the same section. Also moved all the ".previous" asm directives for kprobes sections to column 1 and removed ".text" from them. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Andi Kleen commit 3ca113ea74836a80645c79adba24caaa7a74120c Author: Dave Jones Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] i386: don't taint UP K7's running SMP kernels. We have a test that looks for invalid pairings of certain athlon/durons that weren't designed for SMP, and taint accordingly (with 'S') if we find such a configuration. However, this test shouldn't fire if there's only a single CPU present. It's perfectly valid for an SMP kernel to boot on UP hardware for example. AK: changed to num_possible_cpus() Signed-off-by: Dave Jones Signed-off-by: Andi Kleen commit 5758d5dfef1c514200bda3f29ba700f1c3e3bc99 Author: Jeremy Fitzhardinge Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] i386: fix dubious segment register clear in cpu_init() Fix a very dubious piece of code in arch/i386/kernel/cpu/common.c:cpu_init(). This clears out %fs and %gs, but clobbers %eax in the process without telling gcc. It turns out that gcc happens to be not using %eax at that point anyway so it doesn't matter much, but it looks like a bomb waiting to go off. This does end up saving an instruction, because gcc wants %eax==0 for the set_debugreg()s below. Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Andi Kleen commit 3b8d1fe0f28202ce1592d9fbc216959b49b72c95 Author: Andi Kleen Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] Don't force frame pointers for lockdep Now that stacktrace supports dwarf2 don't force frame pointers for lockdep anymore Cc: mingo@elte.hu Signed-off-by: Andi Kleen commit a32cf3975bed3b84491f8ffeb24abe8c45d86ab0 Author: Andi Kleen Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] i386: Get ebp from unwinder state when continuing fallback backtrace Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit 950fee84557416a3427dd404a13addc4be7b3e6c Author: Andi Kleen Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] i386: Terminate backtrace fallback early if unwinder stack pointer is zero Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit 2b14a78cd07a52001b8c3865ed615d8b9b905b78 Author: Andi Kleen Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] i386: Do stacktracer conversion too Following x86-64 patches. Reuses code from them in fact. Convert the standard backtracer to do all output using callbacks. Use the x86-64 stack tracer implementation that uses these callbacks to implement the stacktrace interface. This allows to use the new dwarf2 unwinder for stacktrace and get better backtraces. Cc: mingo@elte.hu Signed-off-by: Andi Kleen commit be7a91709b90825990e571b2f20cea937d5eef6c Author: Andi Kleen Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] Check for end of stack trace before falling back Signed-off-by: Andi Kleen commit c0b766f13d8e1189ce4d00e54700c9d96b543b9a Author: Andi Kleen Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] Merge stacktrace and show_trace This unifies the standard backtracer and the new stacktrace in memory backtracer. The standard one is converted to use callbacks and then reimplement stacktrace using new callbacks. The main advantage is that stacktrace can now use the new dwarf2 unwinder and avoid false positives in many cases. I kept it simple to make sure the standard backtracer stays reliable. Cc: mingo@elte.hu Signed-off-by: Andi Kleen commit c9538ed49272fb244ac06ba643ff076a68a77e12 Author: Andi Kleen Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] Move unwind_init earlier Needed for use of the unwinder in lockdep, because lockdep runs really early too. Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit b7f5e3c7742d5332b78b831131f43fc3630e6322 Author: Andi Kleen Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] Don't access the APIC in safe_smp_processor_id when it is not mapped yet Lockdep can call the dwarf2 unwinder early, and the dwarf2 code uses safe_smp_processor_id which tries to access the local APIC page. But that doesn't work before the APIC code has set up its fixmap. Check for this case and always return boot cpu then. Cc: jbeulich@novell.com Cc: mingo@elte.hu Signed-off-by: Andi Kleen commit 3fa7c794fe4dc127f7fac3fad4d13628e68f89ce Author: Andi Kleen Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] Avoid recursion in lockdep when stack tracer takes locks The new dwarf2 unwinder needs to take locks to do backtraces inside modules. This patch makes sure lockdep which calls stacktrace is not reentered. Thanks to Ingo for suggesting this simpler approach. Cc: mingo@elte.hu Signed-off-by: Andi Kleen commit 5a1b3999d6cb7ab87f1f3b1700bc91839fd6fa29 Author: Andi Kleen Date: Tue Sep 26 10:52:34 2006 +0200 [PATCH] x86: Some preparationary cleanup for stack trace - Remove unused all_contexts parameter No caller used it - Move skip argument into the structure (needed for followon patches) Cc: mingo@elte.hu Signed-off-by: Andi Kleen commit 4ea8a5d8b57cd504b4b2de1212523848e7ab50cf Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] Calgary IOMMU: eradicate sole remaining 80 chars per line offender Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit 4ccf4ae3144360ab9c00d0b53427f43369287bfb Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] remove tce_cache_blast_stress() tce_cache_blast_stress was useful during bringup to stress the IOMMU's cache flushing. Now that we quiesce DMAs on every cache flush, using _stress() brings the machine down to its knees once you put it under load. Remove this debug / bringup code that isn't useful anymore completely. Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit 796e4390e0378e1e57c033349610cfc741696a3d Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] only verify the allocation bitmap if CONFIG_IOMMU_DEBUG is on Introduce new function verify_bit_range(). Define two versions, one for CONFIG_IOMMU_DEBUG enabled and one for disabled. Previously we were checking that the bitmap was consistent every time we allocated or freed an entry in the TCE table, which is good for debugging but incurs an unnecessary penalty on non debug builds. Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit de684652f34f57cb60d4d78d09139a0e0c5e7b1b Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] print whether CONFIG_IOMMU_DEBUG is enabled Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit 2ade2920dcefdf5595c6380ebed131c964190855 Author: Chuck Ebbert <76306.1226@compuserve.com> Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] i386/x86-64: rename is_at_popf(), add iret to tests and fix is_at_popf() needs to test for the iret instruction as well as popf. So add that test and rename it to is_setting_trap_flag(). Also change max insn length from 16 to 15 to match reality. LAHF / SAHF can't affect TF, so the comment in x86_64 is removed. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Andi Kleen commit 91cd444e56ebe0c2acd9576a045d77490b26f607 Author: Andi Kleen Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] x86: Remove unneeded externs in acpi/boot.c And move one into proto.h Cc: len.brown@intel.com Signed-off-by: Andi Kleen commit 2b94ab2fd55768030e177a6ec224dedd031ad06b Author: Fernando Luis Vázquez Cao Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] Replace local_save_flags+local_irq_disable with The combination of "local_save_flags" and "local_irq_disable" seems to be equivalent to "local_irq_save" (see code snips below). Consequently, replace occurrences of local_save_flags+local_irq_disable with local_irq_save. * local_irq_save #define raw_local_irq_save(flags) \ do { (flags) = __raw_local_irq_save(); } while (0) static inline unsigned long __raw_local_irq_save(void) { unsigned long flags = __raw_local_save_flags(); raw_local_irq_disable(); return flags; } * local_save_flags #define raw_local_save_flags(flags) \ do { (flags) = __raw_local_save_flags(); } while (0) Signed-off-by: Fernando Vazquez Signed-off-by: Andi Kleen commit 52d522f53f137c7903db22f9196a48ad8658fb2b Author: Andi Kleen Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] Fix sparse warnings in compat aout code Signed-off-by: Andi Kleen commit ddb15ec130d38cb8076a9926040c7435b126db65 Author: Andi Kleen Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] Fix most sparse warnings in sys_ia32.c Mostly by adding casts. I didn't touch the "invalid access past ..." which are caused by the sigset conversion. Signed-off-by: Andi Kleen commit dd2994f619752fb731f21c89ad16536dd6673948 Author: Andi Kleen Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] Add sparse annotations to quiet sparse in arch/x86_64/mm/fault.c Fixes linux/arch/x86_64/mm/fault.c:125:7: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/mm/fault.c:125:7: expected void [noderef] * linux/arch/x86_64/mm/fault.c:125:7: got unsigned char *[assigned] instr linux/arch/x86_64/mm/fault.c:163:8: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/mm/fault.c:163:8: expected void [noderef] * linux/arch/x86_64/mm/fault.c:163:8: got unsigned char *[assigned] instr linux/arch/x86_64/mm/fault.c:179:9: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/mm/fault.c:179:9: expected void [noderef] * linux/arch/x86_64/mm/fault.c:179:9: got unsigned long * Signed-off-by: Andi Kleen commit 131cfd7bd54767ec8959e013f83839442a54d546 Author: Andi Kleen Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] Add sparse annotation to vsyscall.c Fixes linux/arch/x86_64/kernel/vsyscall.c:276:7: warning: constant 0x0f40000000000 is so big it is long linux/arch/x86_64/kernel/vsyscall.c:80:14: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/kernel/vsyscall.c:80:14: expected void const volatile [noderef] *addr linux/arch/x86_64/kernel/vsyscall.c:80:14: got void * linux/arch/x86_64/kernel/vsyscall.c:200:7: warning: incorrect type in assignment (different address spaces) linux/arch/x86_64/kernel/vsyscall.c:200:7: expected unsigned short [usertype] *map1 linux/arch/x86_64/kernel/vsyscall.c:200:7: got void [noderef] * linux/arch/x86_64/kernel/vsyscall.c:203:7: warning: incorrect type in assignment (different address spaces) linux/arch/x86_64/kernel/vsyscall.c:203:7: expected unsigned short [usertype] *map2 linux/arch/x86_64/kernel/vsyscall.c:203:7: got void [noderef] * linux/arch/x86_64/kernel/vsyscall.c:215:10: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/kernel/vsyscall.c:215:10: expected void volatile [noderef] *addr linux/arch/x86_64/kernel/vsyscall.c:215:10: got unsigned short [usertype] *map2 linux/arch/x86_64/kernel/vsyscall.c:217:10: warning: incorrect type in argument 1 (different address spaces) linux/arch/x86_64/kernel/vsyscall.c:217:10: expected void volatile [noderef] *addr linux/arch/x86_64/kernel/vsyscall.c:217:10: got unsigned short [usertype] *map1 Signed-off-by: Andi Kleen commit 3bd4d18cbab622c504f131f3c0029c3aa29c05be Author: Andi Kleen Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] Move e820 map into e820.c Minor cleanup. Keep setup.c free from unrelated clutter. Signed-off-by: Andi Kleen commit c31fbb1ad890b11f037c16496e53f28877c12722 Author: Andi Kleen Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] Clean up acpi_numa variable Move it into srat.c No need to clutter up setup.c for it And remove use in setup.c completely - it only guarded a printk which can be done unconditionally. Signed-off-by: Andi Kleen commit df3bb57d2c0160ccd1ee51322f50aa295c3b0858 Author: Andi Kleen Date: Tue Sep 26 10:52:33 2006 +0200 [PATCH] i386/x86-64: Move acpi_disabled variables into acpi/boot.c Removes code duplication between i386/x86-64. Not needed anymore in setup.c since early_param cleanup Cc: len.brown@intel.com Signed-off-by: Andi Kleen commit 43c85c9c5dff76efc1e411d3302840027ea92004 Author: Andi Kleen Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] Remove need for early lockdep init I think it was only needed for the printks and we can do them later. I put in a single early_printk so that we know the kernel is alive (early_printk doesn't need any locks) This makes some things easier for initialization of unwind for lockdep, which is needed by later patches. cc: mingo@elte.hu Signed-off-by: Andi Kleen commit 2c8c0e6b8d7700a990da8d24eff767f9ca223b96 Author: Andi Kleen Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] Convert x86-64 to early param Instead of hackish manual parsing Requires earlier i386 patchkit, but also fixes i386 early_printk again. I removed some obsolete really early parameters which didn't do anything useful. Also made a few parameters that needed it early (mostly oops printing setup) Also removed one panic check that wasn't visible without early console anyways (the early console is now initialized after that panic) This cleans up a lot of code. Signed-off-by: Andi Kleen commit 1a3f239ddf9208f2e52d36fef1c1c4518cbbbabe Author: Rusty Russell Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] i386: Replace i386 open-coded cmdline parsing with This patch replaces the open-coded early commandline parsing throughout the i386 boot code with the generic mechanism (already used by ppc, powerpc, ia64 and s390). The code was inconsistent with whether it deletes the option from the cmdline or not, meaning some of these will get passed through the environment into init. This transformation is mainly mechanical, but there are some notable parts: 1) Grammar: s/linux never set's it up/linux never sets it up/ 2) Remove hacked-in earlyprintk= option scanning. When someone actually implements CONFIG_EARLY_PRINTK, then they can use early_param(). [AK: actually it is implemented, but I'm adding the early_param it in the next x86-64 patch] 3) Move declaration of generic_apic_probe() from setup.c into asm/apic.h 4) Various parameters now moved into their appropriate files (thanks Andi). 5) All parse functions which examine arg need to check for NULL, except one where it has subtle humor value. AK: readded acpi_sci handling which was completely dropped AK: moved some more variables into acpi/boot.c Cc: len.brown@intel.com Signed-off-by: Rusty Russell Signed-off-by: Andi Kleen commit 33df0d19ea425d28bd5afb48898af32237fe81af Author: Rusty Russell Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] Allow early_param and identical __setup to exist We currently assume that boot parameters which are handled by early_param() will not overlap boot parameters handled by __setup: if they do, behaviour is dependent on link order, usually meaning __setup will not get called. ACPI wants to use early_param("pci"), and pci uses __setup("pci="), so we modify the core to let them coexist: "pci=noacpi" will now get passed to both. Signed-off-by: Rusty Russell Signed-off-by: Andi Kleen commit 9ca33eb6981549c0d1b7aea7f99f1ba602161356 Author: Andi Kleen Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] Use early CPU identify before early command line parsing This makes it possible to modify CPU flags in command line options without hacks. And remove another copy in head64.c Signed-off-by: Andi Kleen commit d4d35854a1cf7fb170c8e133a5e40a9d19e7fc17 Author: Chuck Ebbert <76306.1226@compuserve.com> Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] remove lock prefix from is_at_popf() tests The lock prefix will cause an exception when used with the popf instruction, so no need to continue searching after it's found. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Andi Kleen commit 145106e81090fcdfb57b7f2e90b98c6445b6f33d Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] remove superflous BUG_ON's in nommu and gart There's no need to check for invalid DMA data direction in nommu and gart since we do it in dma-mapping.h anyway before calling the individual dma-ops. Signed-off-by: Muli Ben-Yehuda Signed-off-by: Andi Kleen commit 29a6c25bd63dbd52e73d25268402d065ad84c0fe Author: Eric W. Biederman Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] Fix gdt table size in trampoline.S Allows easier extension of the GDT by using the proper C symbol for the size in the descriptor. Signed-off-by: Eric W. Biederman Signed-off-by: Andi Kleen commit 8d379dad8f1670d233ac67b76b1c5a42ad3714a3 Author: Jan Beulich Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] annotate arch/x86_64/lib/*.S Add unwind annotations to arch/x86_64/lib/*.S, and also use the macros provided by linux/linkage.h where-ever possible. Some of the alternative instructions handling needed to be adjusted so that the replacement code would also have valid unwind information. Signed-off-by: Jan Beulich Signed-off-by: Andi Kleen commit fb2e28485679418e459583605f9b19807a72ceca Author: Andi Kleen Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] i386: Clean up spin/rwlocks - Inline spinlock strings into their inline functions - Convert macros to typesafe inlines - Replace some leftover __asm__ __volatile__s with asm volatile Signed-off-by: Andi Kleen commit 8b059d2373c16b6d32787a49daf8ccf72dc61b71 Author: Andi Kleen Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] Clean up spin/rwlocks - Inline spinlock strings into their inline functions - Convert macros to typesafe inlines - Replace some leftover __asm__ __volatile__s with asm volatile Signed-off-by: Andi Kleen commit a752d7194c4fb5a3e767c95542d04fc5decb1d52 Author: Chuck Ebbert <76306.1226@compuserve.com> Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] fix is_at_popf() for compat tasks When testing for the REX instruction prefix, first check for 32-bit mode because in compat mode the REX prefix is an increment instruction. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Andi Kleen commit 8578bdf835d6d6ece6718858d351456367b8a5cf Author: Andi Kleen Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] Don't use lock section for mutexes and semaphores Lock sections cannot be handled by the dwarf2 unwinder. Disadvantage is a taken branch in the hot path. Signed-off-by: Andi Kleen commit 7ca2b49b06a6d26e89e3535653889f1d7892b085 Author: Andi Kleen Date: Tue Sep 26 10:52:32 2006 +0200 [PATCH] i386: Remove lock section support in semaphore.h Lock sections don't work the new dwarf2 unwinder This generates slightly smaller code. It adds one more taken jump to the fast path. Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit add659bf8aa92f8b3f01a8c0220557c959507fb1 Author: Andi Kleen Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] i386: Remove lock section support in rwsem.h Lock sections don't work the new dwarf2 unwinder This generates slightly smaller code. It adds one more taken jump to the fast path. Also move the trampolines into semaphore.S and add proper CFI annotations. Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit 01215ad8d83e18321d99e9b5750a6f21cac243a2 Author: Andi Kleen Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] i386: Remove lock section support in mutex.h Lock sections don't work the new dwarf2 unwinder This generates slightly smaller code. It adds one more taken jump to the fast path. Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit 0577f148b5e9a773020e3da1e6332a7c6df9d601 Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] Calgary IOMMU: save a bit of space in bus_info Make translation_disabled a uchar rather than an int Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit a4fc520a0ff92810eea46d74bf742ef73849302e Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] Calgary IOMMU: calgary_init_one_nontraslated() can return void Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit 871b17008e93d7e96f96829ce5f0393c9902d25b Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] Calgary IOMMU: fix reference counting of Calgary PCI devices The pci_get_device() API decrements the reference count on the 'from' parameter when it continues searching. Therefore, take a ref count on Calgary bus when we initialize them in either translated or non-translated mode. Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit b8f4fe66a560b5ccbb4d4d0d2df356a5d9b98b83 Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] Calgary IOMMU: fix error path memleak in calgary_free_tar We were freeing the iommu_table and leaking the bitmap pages. Also rename it to calgary_free_bus, which is more accurate. Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit 9f2dc46d5ec6fd7787182d2232a1003af11879f1 Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] Calgary IOMMU: break out of pci_find_device_reverse if dev not found Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit f38db651d5da5e10235fd7dd31095969fb7ef6fb Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] Calgary IOMMU: consolidate per bus data structures Move the tce_table_kva array, disabled bitmap and bus_to_phb array into a new per bus 'struct calgary_bus_info'. Also slightly reorganize build_tce_table and tce_table_setparms to avoid exporting bus_info to tce.c. Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit 5f4a7a93886ce1a4327f6028cc05d423f39eebf0 Author: Muli Ben-Yehuda Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] Calgary IOMMU: rearrange 'struct iommu_table' members Rearrange struct members loosely based on size for improved alignment and to save a few bytes. Signed-off-by: Muli Ben-Yehuda Signed-off-by: Jon Mason Signed-off-by: Andi Kleen commit 352f7bae81faa2befa2a3c02b84478dce16b8fd6 Author: Andi Kleen Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] Add stack documentation document from Keith Owens Describes the stack organization on x86-64. I changed it a bit and removed some obsolete information and the questions. Cc: kaos@sgi.com Signed-off-by: Andi Kleen commit ba9c231f7499ff6918c069c72ff5fd836c76b963 Author: Jan Beulich Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] i386: initialize end-of-memory variables as early as possible Move initialization of all memory end variables to as early as possible, so that dependent code doesn't need to check whether these variables have already been set. Change the range check in kunmap_atomic to actually make use of this so that the no-mapping-estabished path (under CONFIG_DEBUG_HIGHMEM) gets used only when the address is inside the lowmem area (and BUG() otherwise). Signed-off-by: Jan Beulich Signed-off-by: Andi Kleen commit 3b94355c47e2b025a7ececa0a14180e8fce6b0f1 Author: Jan Beulich Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] remove int_delivery_dest The genapic field and the accessor macro weren't used anywhere. Signed-off-by: Jan Beulich Signed-off-by: Andi Kleen commit caff0710ebf6f2c44cbd2b8b31fd6329148bed2e Author: Jan Beulich Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] initialize end of memory variables as early as possible While an earlier patch already did a small step into that direction, this patch moves initialization of all memory end variables to as early as possible, so that dependent code doesn't need to check whether these variables have already been set. Also, remove a misleading (perhaps just outdated) comment, and make static a variable only used in a single file. Signed-off-by: Jan Beulich Signed-off-by: Andi Kleen commit 44cc45267bbe7c64f7d85b074bd670b48b5abdfb Author: Andi Kleen Date: Tue Sep 26 10:52:31 2006 +0200 [PATCH] Remove obsolete CVS $Id$ from assembler files in arch/x86_64/kernel/* CVS hasn't been used for a long time for them. Signed-off-by: Andi Kleen commit e2414910f212c52d9d7c64c99a22863488ac5b48 Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] x86: Detect CFI support in the assembler at runtime ... instead of using a CONFIG option. The config option still controls if the resulting executable actually has unwind information. This is useful to prevent compilation errors when users select CONFIG_STACK_UNWIND on old binutils and also allows to use CFI in the future for non kernel debugging applications. Cc: jbeulich@novell.com Cc: sam@ravnborg.org Signed-off-by: Andi Kleen commit fe7414a2882c953788af13a7f2c9d570ed8f71c5 Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] Use BUILD_BUG_ON in apic.c build sanity checking Makes code a little shorter. Signed-off-by: Andi Kleen commit 19f03ffecdb599c1f64113b6dda0a1f143d2bab9 Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] i386: Clean up code style in mpparse.c ACPI code Remove some unlinuxy ways to write function parameter definitions. Remove some stray "return;"s No functional change. Cc: len.brown@intel.com Signed-off-by: Andi Kleen commit efec3b9a3282714c8441b9bf476f8358bed9ecaa Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] Fix up some non linuxy style in ACPI functions in mpparse.c No functional changes. Cc: len.brown@intel.com Signed-off-by: Andi Kleen commit 276ec1a76ad204d47947894a914e10e798400ffb Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] Remove some unneeded ACPI externs in mpparse.c They are not used in this file so remove them. i386 didn't have them either. Cc: len.brown@intel.com Signed-off-by: Andi Kleen commit a01fd3baff5e2e744f9d1af0e5d3e6b6082e4dcf Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] Remove useless wrapper in mpparse.c code It used to contain support code for NUMAQ, but that is long gone already on 64bit. Signed-off-by: Andi Kleen commit 55f05ffaa788e039df2f1ebe0d7bfbcb6f39d0b4 Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] Replace mp bus array with bitmap for bus not pci Since we only support PCI and ISA legacy busses now there is no need to have an full array with checking. Signed-off-by: Andi Kleen commit dfa4698c50bf85b7927214b0e4a3dc4bc3b3c4a9 Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] Move early chipset quirks out to new file They did not really belong into io_apic.c. Move them into a new file and clean it up a bit. Also remove outdated ATI quirk that was obsolete, Signed-off-by: Andi Kleen commit edd965229669f8f8dfddec8c863250440fb65ab3 Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] Remove MPS table APIC renumbering The MPS table specification says that the operating system should renumber the IO-APICs following the table as needed. However in ACPI this is not allowed or neeeded and all x86-64 systems are ACPI compliant. The code was already disabled on some systems because it caused problems there. Remove it completely now. CC: mdomsch@dell.com Signed-off-by: Andi Kleen commit 606bd58de6542e847c51b1b6d83a4cd70a632fe7 Author: Diego Calleja Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] x86: AUX_DEVICE_INFO is one byte long, use 'movb' Bugzilla #6552 says: "In arch/i386/boot/setup.S, movw is used instead of movb for PS/2 mouse information, although it is unsigned char. This does not harm, because the jmp instruction overwritten by movw is used before executing movw, and never be used again" I've no idea if this is a real bug or how it gets fixed, so I'm submitting it for review instead of letting it die of boredom in bugzilla. Aditionally to i386, I've changed x86-64, which mirrors the same code. Credits to Yoshinori K. Okuji, who found the problem and suggested a fix. Signed-off-by: Diego Calleja Signed-off-by: Andi Kleen commit cf4c6a2f27f5db810b69dcb1da7f194489e8ff88 Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] i386: Factor out common io apic routing entry access The IO APIC code had lots of duplicated code to read/write 64bit routing entries into the IO-APIC. Factor this out int common read/write functions In a few cases the IO APIC lock is taken more often now, but this isn't a problem because it's all initialization/shutdown only slow path code. Similar to earlier x86-64 patch. Includes a fix by Jiri Slaby for a mistake that broke resume Signed-off-by: Andi Kleen commit eea0e11c1f0d6ef89e64182b2f1223a4ca2b74a2 Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] Factor out common io apic routing entry access The IO APIC code had lots of duplicated code to read/write 64bit routing entries into the IO-APIC. Factor this out int common read/write functions In a few cases the IO APIC lock is taken more often now, but this isn't a problem because it's all initialization/shutdown only slow path code. Signed-off-by: Andi Kleen commit c1a58b42b428e717afbbb298356e041cea54ad17 Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] i386/x86-64: Remove obsolete sanity check in mptable parsing It apparently has never triggered in many years. Signed-off-by: Andi Kleen commit a8fcf1a24a16e1c735c795d99773b5dcefb71518 Author: Andi Kleen Date: Tue Sep 26 10:52:30 2006 +0200 [PATCH] Remove obsolete PIC mode PIC mode is an outdated way to drive the APICs that was used on some early MP boards. It is not supported in the ACPI model. It is unlikely to be ever configured by any x86-64 system Remove it thus. Signed-off-by: Andi Kleen commit e50991343488edf25d58820be1684322808c763c Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] Remove leftover MCE/EISA support No 64bit EISA or Microchannel systems ever. Remove the left over code in the IO-APIC driver and the mptable parser Signed-off-by: Andi Kleen commit 5cb6b99928a8f1a1bbdac7a16b88aef8cb64d432 Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] Remove pirq overwrite support This was an old workaround for broken MP-BIOS. The user could specify overwrites on the command line. I've never seen it being used for anything on 64bit. So get rid of it for now. Signed-off-by: Andi Kleen commit 2e91a17b35116885373e04af142b1d08cf1b47bf Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] Add some comments to entry.S And remove some old obsolete ones. Signed-off-by: Andi Kleen commit 107878bb14b1fb6bddc646f4d5e72e8beaa2f6a2 Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] i386: Minor fixes & cleanup to tlb flush (based on x86-64 changes) - Add a proper memory clobber to invlpg - Remove an unused extern Signed-off-by: Andi Kleen commit b1c78c0fcc29097567e1afc39701012e6d89adb7 Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] Clean up and minor fixes to TLB flush - Convert CR* accesses to dedicated inline functions and rewrite the rest as C inlines - Don't do a double flush for global flushes (pointed out by Zach Amsden) This was a bug workaround for old CPUs that don't do 64bit and is obsolete. - Add a proper memory clobber to invlpg - Remove an unused extern Signed-off-by: Andi Kleen commit 3f14c746a61ec932c204aca820c02c293118c5df Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] Remove old "focus disabled" chipset errata workaround The new systems already use focus disabled and the comment was completely outdated. Signed-off-by: Andi Kleen commit 6c96a29f20762e8ce40b674f906055d009c302ee Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] Remove apic mismatch counter Nobody has been setting the mismatch counter and the ifdef was never set so remove it. Signed-off-by: Andi Kleen commit 7f11d8a5efd625ffa41cde1d8472f85e885478ec Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] Remove all ifdefs for local/io apic IO-APIC or local APIC can only be disabled at runtime anyways and Kconfig has forced these options on for a long time now. The Kconfigs are kept only now for the benefit of the shared acpi boot.c code. Signed-off-by: Andi Kleen commit 5ba5891d44a6acade44887a0f3195489d46c12de Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] Add some comments what tce.c actually does Signed-off-by: Andi Kleen commit cc1e684a9f1cc069b2ac249aa11486613369dd69 Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] Remove leftover CVS Id in thunk.S And move the comment to a proper place. Signed-off-by: Andi Kleen commit ecaf45ee5ce60afe7cc46e91d82c1b0cbda09387 Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] i386: Redo semaphore and rwlock assembly helpers - Move them to a pure assembly file. Previously they were in a C file that only consisted of inline assembly. Doing it in pure assembler is much nicer. - Add a frame.i include with FRAME/ENDFRAME macros to easily add frame pointers to assembly functions - Add dwarf2 annotation to them so that the new dwarf2 unwinder doesn't get stuck on them - Random cleanups Includes feedback from Jan Beulich and a UML build fix from Andrew Morton. Cc: jbeulich@novell.com Cc: jdike@addtoit.com Signed-off-by: Andi Kleen commit 07c9819b31eda7954feddc83f2fae035f31c11e1 Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] i386: add alternative-asm.h to allow LOCK_PREFIX replacement in .S files LOCK_PREFIX is replaced by nops on UP systems, so it has to be a special macro. Previously this was only possible from C. Allow it for pure assembly files too. Similar to earlier x86-64 patch. Signed-off-by: Andi Kleen commit b06babac45e1546dfb504f1f25eb0495632bfc41 Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] Add proper alignment to ENTRY Previously it didn't align. Use the same one as the C compiler in blended mode, which is good for K8 and Core2 and doesn't hurt on P4. Signed-off-by: Andi Kleen commit 1a015b5644ec6df0a2c4cbeff1f8a3d24ba0478e Author: Andi Kleen Date: Tue Sep 26 10:52:29 2006 +0200 [PATCH] i386: Remove const case for rwlocks rwlocks are now out of line, so it near never triggers. Also it was incompatible with the new dwarf2 unwinder because it had unannotiatable push/pops. Signed-off-by: Andi Kleen commit 9a0b26e6bc4ae1979d9bcc6194e57a71b2b5cac6 Author: Andi Kleen Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] Clean up read write lock assembly - Move the slow path fallbacks to their own assembly files This makes them much easier to read and is needed for the next change. - Add CFI annotations for unwinding (XXX need review) - Remove constant case which can never happen with out of line spinlocks - Use patchable LOCK prefixes - Don't use lock sections anymore for inline code because they can't be expressed by the unwinder (this adds one taken jump to the lock fast path) Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit b4062b16094038334d9bbadac0397a3fc9e981b0 Author: Andi Kleen Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] Support patchable lock prefix for pure assembly files Signed-off-by: Andi Kleen commit 538b5b419c7ae39a4b2deb15278da36102e42346 Author: Andi Kleen Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] Document backtracer selection options Signed-off-by: Andi Kleen commit 31679f38d88696ed032d59e457f1605c97e7d719 Author: Andi Kleen Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] Simplify profile_pc on x86-64 Use knowledge about EFLAGS layout (bits 22:63 are always 0) to distingush EFLAGS word and kernel address in the spin lock stack frame. Signed-off-by: Andi Kleen commit 0cb91a2293648507886563ccb91979cfc94d6a4b Author: Andi Kleen Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] i386: Account spinlocks to the caller during profiling for !FP kernels This ports the algorithm from x86-64 (with improvements) to i386. Previously this only worked for frame pointer enabled kernels. But spinlocks have a very simple stack frame that can be manually analyzed. Do this. Signed-off-by: Andi Kleen commit c16b63e09d9d03158e0a92e961234e94c4862620 Author: Andi Kleen Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] i386/x86-64: Don't randomize stack top when no randomization personality is set Based on patch from Frank van Maarseveen , but extended. Signed-off-by: Andi Kleen commit d5d9ca6d882f7c8d47ef91a701fc042cbebbc334 Author: Adam Henley Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] A few trivial spelling and grammar fixes A few trivial spelling and grammar mistakes picked up in "arch/x86_64/aperture.c", "arch/x86_64/crash.c" and "arch/x86_64/apic.c". I think all are correct fixes but am ever aware of my fallibility :o) This is my first patch submission so all feedback is appreciated, esp. WRT CCing to Linus, Andi and trivial@kernel.org, is this correct? And which is the most appropriate kernel version to diff against? If any. Should apply cleanly to 2.6.18-rc1 Signed-off-by: Adam Henley Signed-off-by: Andi Kleen - adam commit 3034d11c930f795d61321c9244c4ffaaabf0c282 Author: Andi Kleen Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] Don't print virtual address in HPET initialization virtual addresses don't belong into kernel logs for non debugging Cc: clemens@ladisch.de Signed-off-by: Andi Kleen commit d3a4f48d4866b8623ca9adde8ce4e5fde979c132 Author: Stephane Eranian Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] x86-64 TIF flags for debug regs and io bitmap in ctxsw Hello, Following my discussion with Andi. Here is a patch that introduces two new TIF flags to simplify the context switch code in __switch_to(). The idea is to minimize the number of cache lines accessed in the common case, i.e., when neither the debug registers nor the I/O bitmap are used. This patch covers the x86-64 modifications. A patch for i386 follows. Changelog: - add TIF_DEBUG to track when debug registers are active - add TIF_IO_BITMAP to track when I/O bitmap is used - modify __switch_to() to use the new TIF flags : eranian@hpl.hp.com Signed-off-by: Andi Kleen commit 2f766d16062d0147edff91be15de4a950667ca42 Author: Andi Kleen Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] Clean up asm/smp.h includes No need to include it from entry.S Drop all the #ifdef __ASSEMBLY__ Signed-off-by: Andi Kleen commit 3cfc348bf90ffaa777c188652aa297f04eb94de8 Author: Andi Kleen Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] x86: Add portable getcpu call For NUMA optimization and some other algorithms it is useful to have a fast to get the current CPU and node numbers in user space. x86-64 added a fast way to do this in a vsyscall. This adds a generic syscall for other architectures to make it a generic portable facility. I expect some of them will also implement it as a faster vsyscall. The cache is an optimization for the x86-64 vsyscall optimization. Since what the syscall returns is an approximation anyways and user space often wants very fast results it can be cached for some time. The norma methods to get this information in user space are relatively slow The vsyscall is in a better position to manage the cache because it has direct access to a fast time stamp (jiffies). For the generic syscall optimization it doesn't help much, but enforce a valid argument to keep programs portable I only added an i386 syscall entry for now. Other architectures can follow as needed. AK: Also added some cleanups from Andrew Morton Signed-off-by: Andi Kleen commit c08c820508233b424deab3302bc404bbecc6493a Author: Vojtech Pavlik Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] Add the vgetcpu vsyscall This patch adds a vgetcpu vsyscall, which depending on the CPU RDTSCP capability uses either the RDTSCP or CPUID to obtain a CPU and node numbers and pass them to the program. AK: Lots of changes over Vojtech's original code: Better prototype for vgetcpu() It's better to pass the cpu / node numbers as separate arguments to avoid mistakes when going from SMP to NUMA. Also add a fast time stamp based cache using a user supplied argument to speed things more up. Use fast method from Chuck Ebbert to retrieve node/cpu from GDT limit instead of CPUID Made sure RDTSCP init is always executed after node is known. Drop printk Signed-off-by: Vojtech Pavlik Signed-off-by: Andi Kleen commit a670fad0adb1cc6202a607d250f10bd380593905 Author: Vojtech Pavlik Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] Add initalization of the RDTSCP auxilliary values This patch adds initalization of the RDTSCP auxilliary values to CPU numbers to time.c. If RDTSCP is available, the MSRs are written with the respective values. It can be later used to initalize per-cpu timekeeping variables. AK: Some cleanups. Move externs into headers and fix CPU hotplug. Signed-off-by: Vojtech Pavlik Signed-off-by: Andi Kleen commit 81af4449af9c9b686a4eeeb00112614621655704 Author: Vojtech Pavlik Date: Tue Sep 26 10:52:28 2006 +0200 [PATCH] Add macros for rdtscp This patch adds macros for reading tsc via the RDTSCP instruction, as well as writing the auxilliary MSR read by RDTSCP to msr.h [AK: changed rdtscp definition for old binutils] Signed-off-by: Vojtech Pavlik Signed-off-by: Andi Kleen commit 248dcb2ffffe8f3e4a369556a68988788c208111 Author: Venkatesh Pallipadi Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] x86: i386/x86-64 Add nmi watchdog support for new Intel CPUs AK: This redoes the changes I temporarily reverted. Intel now has support for Architectural Performance Monitoring Counters ( Refer to IA-32 Intel Architecture Software Developer's Manual http://www.intel.com/design/pentium4/manuals/253669.htm ). This feature is present starting from Intel Core Duo and Intel Core Solo processors. What this means is, the performance monitoring counters and some performance monitoring events are now defined in an architectural way (using cpuid). And there will be no need to check for family/model etc for these architectural events. Below is the patch to use this performance counters in nmi watchdog driver. Patch handles both i386 and x86-64 kernels. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Andi Kleen commit 1de84979dfc527c422abf63f27beabe43892989b Author: Andi Kleen Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] i386: Enable NMI watchdog by default I've had good experiences with having this on by default on x86-64. It turns nasty hangs into easier to debug oopses. Enable the local APIC wdog by default for systems newer than 2004. This comes from a strange compromise: according to arjan the reason it was off by default was some old IBM systems that corrupted registered when NMI happened in SMI. Can't remember more specific, but >= 2004 should avoid these. It's probably overly broad because most older systems should be ok (and the really old systems won't be supported by the local apic watchdog anyways) Signed-off-by: Andi Kleen commit 260d6790b6a2a0a048b7f96d154c2b49f1e6515a Author: Vivek Goyal Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] i386: Kdump i386 nmi event notification fix After a crash we should wait for NMI IPI event and not for external NMI or NMI watchdog tick. Signed-off-by: Vivek Goyal Signed-off-by: Andi Kleen Cc: Don Zickus Cc: Andi Kleen Signed-off-by: Andrew Morton commit 3f22c5789eb76fd9aabe4be37ba609c793f046f9 Author: Vivek Goyal Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] kdump x86_64 nmi event notification fix After a crash we should wait for NMI IPI event and not for external NMI or NMI watchdog tick. Signed-off-by: Vivek Goyal Signed-off-by: Andi Kleen Cc: Don Zickus Cc: Andi Kleen Signed-off-by: Andrew Morton commit c7c19f8e5e564fb1a354a065befc8a88a9bb08fd Author: Adrian Bunk Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] i386: make functions static This patch makes the following needlessly global functions static: - nmi_int.c: profile_exceptions_notify() - nmi_timer_int.c: profile_timer_exceptions_notify() Signed-off-by: Adrian Bunk Signed-off-by: Andi Kleen commit fac58550e80c307bf17cfa0dd544fca4eff120a5 Author: Andi Kleen Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] Fix up panic messages for different NMI panics When a unknown NMI happened the panic would claim a NMI watchdog timeout. Also it would check the variable set by nmi_watchdog=panic and panic then. Fix up the panic message to be generic Unconditionally panic on unknown NMI when panic on unknown nmi is enabled. Noticed by Jan Beulich Cc: jbeulich@novell.com Signed-off-by: Andi Kleen commit 4038f901cf102a40715b900984ed7540a9fa637f Author: Shaohua Li Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] i386/x86-64: Fix NMI watchdog suspend/resume Making NMI suspend/resume work with SMP. We use CPU hotplug to offline APs in SMP suspend/resume. Only BSP executes sysdev's .suspend/.resume method. APs should follow CPU hotplug code path. And: +From: Don Zickus Makes the start/stop paths of nmi watchdog more robust to handle the suspend/resume cases more gracefully. AK: I merged the two patches together Signed-off-by: Shaohua Li Signed-off-by: Andi Kleen Cc: Don Zickus Cc: Andi Kleen Signed-off-by: Andrew Morton commit c41c5cd3b20a2d81c30498f13b1527847a8fdf69 Author: Don Zickus Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] x86: x86 clean up nmi panic messages Clean up some of the output messages on the nmi error paths to make more sense when they are displayed. This is mainly a cosmetic fix and shouldn't impact any normal code path. Signed-off-by: Don Zickus Signed-off-by: Andi Kleen commit 8da5adda91df3d2fcc5300e68da491694c9af019 Author: Don Zickus Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] x86: Allow users to force a panic on NMI To quote Alan Cox: The default Linux behaviour on an NMI of either memory or unknown is to continue operation. For many environments such as scientific computing it is preferable that the box is taken out and the error dealt with than an uncorrected parity/ECC error get propogated. A small number of systems do generate NMI's for bizarre random reasons such as power management so the default is unchanged. In other respects the new proc/sys entry works like the existing panic controls already in that directory. This is separate to the edac support - EDAC allows supported chipsets to handle ECC errors well, this change allows unsupported cases to at least panic rather than cause problems further down the line. Signed-off-by: Don Zickus Signed-off-by: Andi Kleen commit e33e89ab1a8d295de0500b697f4f31c3ceee9aa2 Author: Don Zickus Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] x86: Add abilty to enable/disable nmi watchdog from procfs (update) Adds a new /proc/sys/kernel/nmi_watchdog call that will enable/disable the nmi watchdog. By entering a non-zero value here, a user can enable the nmi watchdog to monitor the online cpus in the system. By entering a zero value here, a user can disable the nmi watchdog and free up a performance counter which could then be utilized by the oprofile subsystem, otherwise oprofile may be short a counter when in use. Signed-off-by: Don Zickus Signed-off-by: Andi Kleen Cc: Andi Kleen Signed-off-by: Andrew Morton commit 407984f1af259b31957c7c05075a454a751bb801 Author: Don Zickus Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] x86: Add abilty to enable/disable nmi watchdog with sysctl Adds a new /proc/sys/kernel/nmi call that will enable/disable the nmi watchdog. Signed-off-by: Don Zickus Signed-off-by: Andi Kleen commit 2fbe7b25c8edaf2d10e6c1a4cc9f8afe714c4764 Author: Don Zickus Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] i386/x86-64: Remove un/set_nmi_callback and reserve/release_lapic_nmi functions Removes the un/set_nmi_callback and reserve/release_lapic_nmi functions as they are no longer needed. The various subsystems are modified to register with the die_notifier instead. Also includes compile fixes by Andrew Morton. Signed-off-by: Don Zickus Signed-off-by: Andi Kleen commit 957dc87c1bd849440f0eef27e2ade67387001e13 Author: Andi Kleen Date: Tue Sep 26 10:52:27 2006 +0200 [PATCH] Add ppoll/pselect syscalls Needed TIF_RESTORE_SIGMASK first Signed-off-by: Andi Kleen commit 1d001df19d5323e642ba8ac821c713675ebccd82 Author: Andi Kleen Date: Tue Sep 26 10:52:26 2006 +0200 [PATCH] Add TIF_RESTORE_SIGMASK We need TIF_RESTORE_SIGMASK in order to support ppoll() and pselect() system calls. This patch originally came from Andi, and was based heavily on David Howells' implementation of same on i386. I fixed a typo which was causing do_signal() to use the wrong signal mask. Signed-off-by: David Woodhouse Signed-off-by: Andi Kleen commit 3adbbcce9a49b900d4cc118cdccfdefa78bf1afb Author: Don Zickus Date: Tue Sep 26 10:52:26 2006 +0200 [PATCH] x86: Cleanup NMI interrupt path This patch cleans up the NMI interrupt path. Instead of being gated by if the 'nmi callback' is set, the interrupt handler now calls everyone who is registered on the die_chain and additionally checks the nmi watchdog, reseting it if enabled. This allows more subsystems to hook into the NMI if they need to (without being block by set_nmi_callback). Signed-off-by: Don Zickus Signed-off-by: Andi Kleen commit b7471c6da94d30d3deadc55986cc38d1ff57f9ca Author: Don Zickus Date: Tue Sep 26 10:52:26 2006 +0200 [PATCH] i386: Add SMP support on i386 to reservation framework This patch includes the changes to make the nmi watchdog on i386 SMP aware. A bunch of code was moved around to make it simpler to read. In addition, it is now possible to determine if a particular NMI was the result of the watchdog or not. This feature allows the kernel to filter out unknown NMIs easier. Signed-off-by: Don Zickus Signed-off-by: Andi Kleen commit f2802e7f571c05f9a901b1f5bd144aa730ccc88e Author: Don Zickus Date: Tue Sep 26 10:52:26 2006 +0200 [PATCH] Add SMP support on x86_64 to reservation framework This patch includes the changes to make the nmi watchdog on x86_64 SMP aware. A bunch of code was moved around to make it simpler to read. In addition, it is now possible to determine if a particular NMI was the result of the watchdog or not. This feature allows the kernel to filter out unknown NMIs easier. Signed-off-by: Don Zickus Signed-off-by: Andi Kleen commit cb9c448c661d40ce2efbce8e9c19cc4d420d8ccc Author: Don Zickus Date: Tue Sep 26 10:52:26 2006 +0200 [PATCH] i386: Utilize performance counter reservation framework in oprofile Incorporates the new performance counter reservation system in oprofile. Also cleans up a lot of the initialization code. The code original zero'd out every register associated with performance counters regardless if those registers were used or not. This causes issues with the nmi watchdog. Now oprofile tries to reserve registers and gives up if it can't get them. Cc: levon@movementarian.org Cc: oprofile-list@lists.sf.net Signed-off-by: Don Zickus Signed-off-by: Andi Kleen commit 828f0afda123a96ff4e8078f057a302f4b4232ae Author: Don Zickus Date: Tue Sep 26 10:52:26 2006 +0200 [PATCH] x86: Add performance counter reservation framework for UP kernels Adds basic infrastructure to allow subsystems to reserve performance counters on the x86 chips. Only UP kernels are supported in this patch to make reviewing easier. The SMP portion makes a lot more changes. Think of this as a locking mechanism where each bit represents a different counter. In addition, each subsystem should also reserve an appropriate event selection register that will correspond to the performance counter it will be using (this is mainly neccessary for the Pentium 4 chips as they break the 1:1 relationship to performance counters). This will help prevent subsystems like oprofile from interfering with the nmi watchdog. Signed-off-by: Don Zickus Signed-off-by: Andi Kleen commit b07f8915cda3fcd73b8b68075ba1e6cd0673365d Author: Andi Kleen Date: Tue Sep 26 10:52:26 2006 +0200 [PATCH] x86: Temporarily revert parts of the Core 2 nmi nmi watchdog support This makes merging easier. They are readded a few patches later. Signed-off-by: Andi Kleen commit 874c4fe389d1358f82c96dc9b5092fc5c7690604 Author: Andi Kleen Date: Tue Sep 26 10:52:26 2006 +0200 [PATCH] i386: Allow to use GENERICARCH for UP kernels There are some machines around (large xSeries or Unisys ES7000) that need physical IO-APIC destination mode to access all of their IO devices. This currently doesn't work in UP kernels as used in distribution installers. This patch allows to compile even UP kernels as GENERICARCH which allows to use physical or clustered APIC mode. Signed-off-by: Andi Kleen commit 9142e0c8396b25ed4cb549b5efa636065768ebe0 Author: Andi Kleen Date: Tue Sep 26 10:52:26 2006 +0200 [PATCH] i386: Update defconfig This is based on the x86-64 defconfig which works on a wide range of systems. Signed-off-by: Andi Kleen commit 265baba316ea258ca015aa79bc6f107cd9fce2b3 Author: Andi Kleen Date: Tue Sep 26 10:52:26 2006 +0200 [PATCH] Update defconfig Signed-off-by: Andi Kleen commit 47e777e02e7b21eaa4686a70069c9583c126aea8 Author: Kyungmin Park Date: Mon Sep 25 23:53:28 2006 +0000 [MTD ONENAND] Fix OneNAND probe - fix OneNAND probe whether OneNAND Sync. Burst read mode or not - fix OneNAND reset wait problem Signed-off-by: Kyungmin Park Signed-off-by: David Woodhouse commit 7e9f4b2d3e21e87c26025810413ef1592834e63b Author: Alan Stern Date: Mon Sep 18 16:28:06 2006 -0400 Driver core: Don't call put methods while holding a spinlock The klist utility routines currently call _put methods while holding a spinlock. This is of course illegal; a put routine could try to unregister a device and hence need to sleep. No problems have arisen until now because in many cases klist removals were done synchronously, so the _put methods were never actually used. In other cases we may simply have been lucky. This patch (as784) reworks the klist routines so that _put methods are called only _after_ the klist's spinlock has been released. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 81107bf531d2524afbcd61f3b4ad57a71295d591 Author: Alan Stern Date: Mon Sep 18 16:24:28 2006 -0400 Driver core: Remove unneeded routines from driver core This patch (as783) simplifies the driver core slightly by removing four unnecessary _get and _put methods. It is vital that when a driver is removed from its bus's klist of registered drivers, or when a device is removed from a driver's klist of bound devices, that the klist updates complete synchronously. Otherwise the kernel might try binding an unregistered driver to a newly-registered device, or adding a device to the klist for a new driver before it has been removed from the old driver's klist. Since the removals must be synchronous, they don't need to update any reference counts. Hence the _get and _put methods can be dispensed with. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit f2eaae197f4590c4d96f31b09b0ee9067421a95c Author: Alan Stern Date: Mon Sep 18 16:22:34 2006 -0400 Driver core: Fix potential deadlock in driver core There is a potential deadlock in the driver core. It boils down to the fact that bus_remove_device() calls klist_remove() instead of klist_del(), thereby waiting until the reference count of the klist_node in the bus's klist of devices drops to 0. The refcount can't reach 0 so long as a modprobe process is trying to bind a new driver to the device being removed, by calling __driver_attach(). The problem is that __driver_attach() tries to acquire the device's parent's semaphore, but the caller of bus_remove_device() is quite likely to own that semaphore already. It isn't sufficient just to replace klist_remove() with klist_del(). Doing so runs the risk that the device would remain on the bus's klist of devices for some time, and so could be bound to another driver even after it was unregistered. What's needed is a new way to distinguish whether or not a device is registered, based on a criterion other than whether its klist_node is linked into the bus's klist of devices. That way driver binding can fail when the device is unregistered, even if it is still linked into the klist. This patch (as782) implements the solution, by adding a new bitflag to indiate when a struct device is registered, by testing the flag before allowing a driver to bind a device, and by changing the definition of the device_is_registered() inline. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 0f397f865076e3471ec884ee73ad5e34165fac2a Author: Greg Kroah-Hartman Date: Tue Jul 18 10:59:59 2006 -0700 PCI: enable driver multi-threaded probe This provides a build and run-time option to turn on multhreaded probe for all PCI drivers. It can cause bad problems on multi-processor machines that take a while to find their root disks, and play havoc on machines that don't use persistant device names for block or network devices. But it can cause speedups on some machines, my tiny laptop's boot goes up by 0.4 seconds, and my desktop boots up several seconds faster. Use at your own risk!!! Signed-off-by: Greg Kroah-Hartman commit d779249ed4cb3b50690de6de8448829d65a1cd08 Author: Greg Kroah-Hartman Date: Tue Jul 18 10:59:59 2006 -0700 Driver Core: add ability for drivers to do a threaded probe This adds the infrastructure for drivers to do a threaded probe, and waits at init time for all currently outstanding probes to complete. A new kernel thread will be created when the probe() function for the driver is called, if the multithread_probe bit is set in the driver saying it can support this kind of operation. I have tested this with USB and PCI, and it works, and shaves off a lot of time in the boot process, but there are issues with finding root boot disks, and some USB drivers assume that this can never happen, so it is currently not enabled for any bus type. Individual drivers can enable this right now if they wish, and bus authors can selectivly turn it on as well, once they determine that their subsystem will work properly with it. Signed-off-by: Greg Kroah-Hartman commit f20a9ead0d005fbeeae3fc21a96f9bf197ac1c1c Author: Andrew Morton Date: Mon Aug 14 22:43:23 2006 -0700 sysfs: add proper sysfs_init() prototype Don't be crufty. Mark it __must_check too. Cc: "Randy.Dunlap" Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit f86db396ff455ed586751d21816a1ebd431264e5 Author: Andrew Morton Date: Mon Aug 14 22:43:20 2006 -0700 drivers/base: check errors Add lots of return-value checking. : fix bus_rescan_devices()] Cc: "Randy.Dunlap" Signed-off-by: Cornelia Huck Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 370226449ced358e52d198081120826ef52c166b Author: Brian Walsh Date: Mon Aug 14 22:43:19 2006 -0700 drivers/base: Platform notify needs to occur before drivers attach to the device The platform_notify call for Arm and PPC architectures needs to be called before the driver attaches to the device. The problem only presents itself when hotplugging certain devices while the driver is already loaded. Signed-off-by: Brian Walsh Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 8a6914ab7c95d471c23b42268aa8e1f55b3d2fdb Author: Andrew Morton Date: Mon Aug 14 22:43:19 2006 -0700 v4l-dev2: handle __must_check We get hundreds of these: include/media/v4l2-dev.h:348: warning: ignoring return value of 'class_device_create_file', declared with attribute warn_unused_result Handle it, and propagate the __must_check back a level. Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit cebc04ba9aeb3a646cc746300421fc0e5aa4f253 Author: Andrew Morton Date: Mon Aug 14 22:43:18 2006 -0700 add CONFIG_ENABLE_MUST_CHECK Those 1500 warnings can be a bit of a pain. Add a config option to shut them up. Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 4a7fb6363f2d1a6c09a10253937f672f3c7929e1 Author: Andrew Morton Date: Mon Aug 14 22:43:17 2006 -0700 add __must_check to device management code We're getting a lot of crashes in the sysfs/kobject/device/bus/class code and they're very hard to diagnose. I'm suspecting that in some cases this is because drivers aren't checking return values and aren't handling errors correctly. So the code blithely blunders on and crashes later in very obscure ways. There's just no reason to ignore errors which can and do occur. So the patch sprinkles __must_check all over these APIs. Causes 1,513 new warnings. Heh. Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 35acfdd7253025e8441883fd8f879f5240844f95 Author: Yoichi Yuasa Date: Sat Jul 15 01:30:11 2006 +0900 Driver core: fixed add_bind_files() definition When CONFIG_HOTPLUG is n, add_bind_files() definition is wrong. This patch has fixed it. Signed-off-by: Yoichi Yuasa Signed-off-by: Greg Kroah-Hartman commit 9de72ee59029087fc8300633113c75a5fe73a7b8 Author: Dmitry Torokhov Date: Sat Jul 15 00:31:54 2006 -0400 Driver core: fix comments in drivers/base/power/resume.c Driver core: fix comments in drivers/base/power/resume.c Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman commit 995982ca79d9262869513948ec7c540f32035491 Author: Randy.Dunlap Date: Mon Jul 10 23:05:25 2006 -0700 sysfs_remove_bin_file: no return value, dump_stack on error Make sysfs_remove_bin_file() void. If it detects an error, printk the file name and call dump_stack(). sysfs_hash_and_remove() now returns an error code indicating its success or failure so that sysfs_remove_bin_file() can know success/failure. Convert the only driver that checked the return value of sysfs_remove_bin_file(). Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit 10188012daa586ae7fcbef272e4db4f404741adf Author: Randy Dunlap Date: Tue Jul 11 20:49:41 2006 -0700 kobject: must_check fixes Check all __must_check warnings in lib/kobject.c Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit 2589f1887b0bf9f08ec3d7f3c5705ccb7c628076 Author: Greg Kroah-Hartman Date: Tue Sep 19 09:39:19 2006 -0700 Driver core: add ability for devices to create and remove bin files Makes it easier for devices to create and remove binary attribute files so they don't have to call directly into sysfs. This is needed to help with the conversion from struct class_device to struct device. Signed-off-by: Greg Kroah-Hartman commit c47ed219ba81632595e9f02e27318151fec16c9e Author: Greg Kroah-Hartman Date: Wed Sep 13 15:34:05 2006 +0200 Class: add support for class interfaces for devices When moving class_device usage over to device, we need to handle class_interfaces properly with devices. This patch adds that support. Signed-off-by: Greg Kroah-Hartman commit c205ef4880273d2de4ee5388d4e52227ff688cc4 Author: Greg Kroah-Hartman Date: Mon Aug 7 22:19:37 2006 -0700 Driver core: create devices/virtual/ tree This change creates a devices/virtual/CLASS_NAME tree for struct devices that belong to a class, yet do not have a "real" struct device for a parent. It automatically creates the directories on the fly as needed. Cc: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit a2de48cace5d0993da6cfa28b276ae724dc3569b Author: Greg Kroah-Hartman Date: Mon Jul 3 14:31:12 2006 -0700 Driver core: add device_rename function The network layer needs this to convert to using struct device instead of a struct class_device. Signed-off-by: Greg Kroah-Hartman commit 2620efef7029bb040430f50f0fc148f2d5e002ad Author: Greg Kroah-Hartman Date: Wed Jun 28 16:19:58 2006 -0700 Driver core: add ability for classes to handle devices properly This adds two new callbacks to the class structure: int (*dev_uevent)(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size); void (*dev_release)(struct device *dev); And one pointer: struct device_attribute * dev_attrs; which all corrispond with the same thing as the "normal" class devices do, yet this is for when a struct device is bound to a class. Someday soon, struct class_device will go away, and then the other fields in this structure can be removed too. But this is necessary in order to get the transition to work properly. Tested out on a network core patch that converted it to use struct device instead of struct class_device. Signed-off-by: Greg Kroah-Hartman commit 64bb5d2c116478dba7501d2acf078ed74ba30c1f Author: Greg Kroah-Hartman Date: Wed Jun 28 16:19:58 2006 -0700 Driver core: allow devices in classes to have no parent This fixes an oops when a device is attached to a class, yet has no "parent" device. An example of this would be the "lo" device in the network core. We should create a "virtual" subdirectory under /sys/devices/ for these, but no one seems to agree on a proper name for it yet... Oh, and update my copyright on the driver core. Signed-off-by: Greg Kroah-Hartman commit de0ff00d723fd821d372496e2c084805644aa5e1 Author: Greg Kroah-Hartman Date: Tue Jun 27 00:06:09 2006 -0700 Driver core: add groups support to struct device This is needed for the network class devices in order to be able to convert over to use struct device. Signed-off-by: Greg Kroah-Hartman commit 386415d88b1ae50304f9c61aa3e0db082fa90428 Author: David Brownell Date: Sun Sep 3 13:16:45 2006 -0700 PM: platform_bus and late_suspend/early_resume Teach platform_bus about the new suspend_late/resume_early PM calls, issued with IRQs off. Do we really need sysdev and friends any more, or can janitors start switching its users over to platform_device so we can do a minor code-ectomy? Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit bb84c89f94851161f387285d0a449b4a3f29f4df Author: Pavel Machek Date: Thu Aug 31 22:02:11 2006 -0700 PM: device_suspend/resume may sleep This adds warning when someone tries them from atomic context. Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 84ed64ee8f7dfd89f59857124dbeb8a350c6e03d Author: Rafael J. Wysocki Date: Wed Aug 30 23:38:06 2006 +0200 PM: add /sys/power documentation to Documentation/ABI The file sysfs-power that documents the interface in the /sys/power/ directory is added to Documentation/ABI/testing. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 1d3a82af45428c5e8deaa119cdeb79611ae46371 Author: David Brownell Date: Wed Aug 30 14:09:47 2006 -0700 PM: no suspend_prepare() phase Remove the new suspend_prepare() phase. It doesn't seem very usable, has never been tested, doesn't address fault cleanup, and would need a sibling resume_complete(); plus there are no real use cases. It could be restored later if those issues get resolved. Signed-off-by: David Brownell Cc: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 1ebfd79eb46a89eacf3cbdf4a463d5d572d3557b Author: Pavel Machek Date: Wed Aug 30 13:50:27 2006 -0700 PM: schedule /sys/devices/.../power/state for removal This lists the /sys/devices/.../power/state file, and its internal support, as due for removal next year. Signed-off-by: Pavel Machek Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 2bca293e56b6a8cd16bb6e70a09b2adac9c723b5 Author: David Brownell Date: Wed Aug 30 13:54:36 2006 -0700 PM: add kconfig option for deprecated .../power/state files Add a new PM_SYSFS_DEPRECATED config option to control whether or not the /sys/devices/.../power/state files are provided. This will make it easier to get rid of that mechanism when the time comes, and to verify that userspace tools work right without it. Signed-off-by: David Brownell Acked-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman commit 047bda36150d11422b2c7bacca1df324c909c0b3 Author: David Brownell Date: Wed Aug 30 14:12:48 2006 -0700 PM: update docs for writing .../power/state Updates to match current code: - Make writes to the /sys/devices/.../power/state files fail cleanly if the device requires the irqs-off call variants. - Fix comments describing the /sys/devices/.../power/state file writes to match the code; the last several releases have invalidated the previous text. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 4fc0840006bf3df69dcf92397fdcaf85a542f939 Author: David Brownell Date: Thu Aug 10 16:38:28 2006 -0700 updated Documentation/power/devices.txt This turned into a rewrite of Documentation/power/devices.txt: - Provide more of the "big picture" - Fixup some of the horribly ancient/obsolete description of device suspend() semantics; lots of text just got deleted. - Add a decent description of PM_EVENT_* codes, including the new PRETHAW code needed in some swsusp scenarios. - Describe the new PM factorization from Linus: * class suspend, current suspend, then suspend_late * NOT suspend_prepare, it wasn't really usable * resume_early, current resume, class resume. - Updates power/state docs to be correct, and deprecate its usage except for driver testing. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit f1cc0a894c963923b766eb2d455747495e6e982d Author: David Brownell Date: Mon Aug 14 23:11:08 2006 -0700 PM: issue PM_EVENT_PRETHAW This patch is the first of this series that should actually change any behavior ... by issuing the new event, now tha the rest of the kernel is prepared to receive it. This converts the PM core to issue the new PRETHAW message, which the rest of the kernel is now ready to receive. Signed-off-by: David Brownell Cc: "Rafael J. Wysocki" Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 185849991d592497e43bcd264c6152af1261ffe2 Author: David Brownell Date: Mon Aug 14 23:11:06 2006 -0700 PM: USB HCDs use PM_EVENT_PRETHAW This teaches several USB host controller drivers to treat PRETHAW as a chip reset since the controller, and all devices connected to it, are no longer in states compatible with how the snapshotted suspend() left them. Signed-off-by: David Brownell Cc: "Rafael J. Wysocki" Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit c78a7c2dd913e68ce853d43edaba14eac91b2fd1 Author: David Brownell Date: Mon Aug 14 23:11:06 2006 -0700 PM: video drivers and PM_EVENT_PRETHAW Video drivers which explicitly test for messages reporting PM_EVENT_FREEZE will now handle PM_EVENT_PRETHAW the same way. Signed-off-by: David Brownell Cc: "Rafael J. Wysocki" Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit b887d2e63c8857149ef59eb6e05adfaa018b8ebf Author: David Brownell Date: Mon Aug 14 23:11:05 2006 -0700 PM: PCI and IDE handle PM_EVENT_PRETHAW Convert some framework code to handle the new PRETHAW message. - IDE just treats it like a FREEZE. - The pci_choose_state() thingie still doesn't use PCI_D0 when it gets a FREEZE (and now PRETHAW) event, which seems rather buglike but wasn't something to change with this patch. Signed-off-by: David Brownell Cc: "Rafael J. Wysocki" Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 82bb67f2c1f9ef438c56ac24e7dca027fe7289b5 Author: David Brownell Date: Mon Aug 14 23:11:04 2006 -0700 PM: define PM_EVENT_PRETHAW This adds a new pm_message_t event type to use when preparing to restore a swsusp snapshot. Devices that have been initialized by Linux after resume (rather than left in power-up-reset state) may need to be reset; this new event type give drivers the chance to do that. The drivers that will care about this are those which understand more hardware states than just "on" and "reset", relying on hardware state during resume() methods to be either the state left by the preceding suspend(), or a power-lost reset. The best current example of this class of drivers are USB host controller drivers, which currently do not work through swsusp when they're statically linked. When the swsusp freeze/thaw mechanism kicks in, a troublesome third state could exist: one state set up by a different kernel instance, before a snapshot image is resumed. This mechanism lets drivers prevent that state. Signed-off-by: David Brownell Cc: "Rafael J. Wysocki" Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 8b4b8a24e4e49dc9fe36d4d079f6d2c23f942b03 Author: David Brownell Date: Mon Aug 14 23:11:03 2006 -0700 fix broken/dubious driver suspend() methods Small driver suspend() fixes in preparation for the PRETHAW events: - Only compare message events for equality against PM_EVENT_* codes; not against integers, or using greater/less-than comparisons. (PM_EVENT_* should really become a __bitwise thing.) - Explicitly test for SUSPEND events (rather than not-something-else) before suspending devices. - Removes more of the confusion between a pm_message_t (wraps event code) and a "state" ... suspend() originally took a target system state. These updates are correct and appropriate even without new PM_EVENT codes. benh: "I think in the Mesh case, we should handle the freeze case as well or we might get wild DMA." Signed-off-by: David Brownell Acked-by: Pavel Machek Cc: Greg KH Cc: Paul Mackerras Acked-by: Benjamin Herrenschmidt Cc: Mauro Carvalho Chehab Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 8f4bcc20ee39f9c087f3532672e3e5f086e92281 Author: David Brownell Date: Sun Jul 9 16:28:28 2006 -0700 make suspend quieter Fix a goof in Linus' recent PM API updates: don't emit any messages in the typical NOP "already suspended it" late suspend case. Signed-off-by: David Brownell Acked-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman commit cbd69dbbf1adfce6e048f15afc8629901ca9dae5 Author: Linus Torvalds Date: Sat Jun 24 14:50:29 2006 -0700 Suspend changes for PCI core Changes the PCI core to use the new suspend infrastructure changes. Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 7c8265f51073bc8632a99de78d5fd19117ed78b7 Author: Linus Torvalds Date: Sat Jun 24 14:50:29 2006 -0700 Suspend infrastructure cleanup and extension Allow devices to participate in the suspend process more intimately, in particular, allow the final phase (with interrupts disabled) to also be open to normal devices, not just system devices. Also, allow classes to participate in device suspend. Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit ceeee1fb2897651b434547eb26d93e6d2ff5a1a5 Author: Greg Kroah-Hartman Date: Tue Apr 9 12:14:34 2002 -0700 SYSFS: allow sysfs_create_link to create symlinks in the root of sysfs This is needed to make the compatible link for /sys/block in the future. Signed-off-by: Greg Kroah-Hartman commit 6468b3afa7bcd9b0abc5997e5330d78f0bb6626a Author: Randy Dunlap Date: Thu Jul 20 08:16:42 2006 -0700 Debugfs: kernel-doc fixes for debugfs Fix kernel-doc and typos/spellos in fs/debugfs/. Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit eea3f8911f34001d2450a272c2d02f175279b53c Author: Juha Yrjölä Date: Thu Aug 3 19:06:25 2006 +0300 sysfs: Make poll behaviour consistent When no events have been reported by sysfs_notify(), sd->s_events was previously set to zero. The initial value for new readers is also zero, so poll was blocking, regardless of whether the attribute was read by the process or not. Make poll behave consistently by setting the initial value of sd->s_events to non-zero. Signed-off-by: Juha Yrjola Signed-off-by: Greg Kroah-Hartman commit ab7d7371acc68fa9130b079a9ba879191202035f Author: Miguel Ojeda Sandonis Date: Wed Sep 13 15:34:05 2006 +0200 Driver core: add const to class_create Adds const to class_create second parameter, because: struct class { const char * name; /*...*/ } Signed-off-by: Miguel Ojeda Sandonis Signed-off-by: Greg Kroah-Hartman commit 5cbe5f8a5897470698222ac9924429056e57d84c Author: Greg Kroah-Hartman Date: Thu Aug 10 01:19:19 2006 -0400 device_create(): make fmt argument 'const char *' Signed-off-by: Greg Kroah-Hartman commit ddd5d35a8f7c1924049e8b6877b3177c1787e6a3 Author: Dmitry Torokhov Date: Thu Aug 10 01:18:18 2006 -0400 class_device_create(): make fmt argument 'const char *' Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman commit d81d9d6b9f7d0af7d4341951d48d296681878f7a Author: Kay Sievers Date: Sun Aug 13 06:17:09 2006 +0200 deprecate PHYSDEV* keys deprecate PHYSDEV* values in the uevent environment These values are no longer needed and inconsistent with the stacking of class devices. The event environment should not carry properties of a parent device. The key PHYSDEVDRIVER is available as DRIVER, PHYDEVBUS is indentical SUBSYSTEM. Class devices should not carry any of these values. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 6d99eb33f55879bc71ddba077e09cf8a61129707 Author: jens m. noedler Date: Sun Sep 10 18:46:33 2006 +0200 Documentation/ABI: devfs is not obsolete, but removed! Signed-off-by: Jens M. Noedler Signed-off-by: Greg Kroah-Hartman commit 29da9f6d9cc3685ae7f6c8b817f6ed8864c78a4c Author: Jeff Garzik Date: Mon Sep 25 21:56:33 2006 -0400 [libata] Fix oops introduced in non-uniform port handling fix Noticed by several people. Signed-off-by: Jeff Garzik commit b7de567bf3187ccf776e2fe0e241593cdcba5459 Author: Jonathan Corbet Date: Mon Sep 25 16:25:37 2006 -0700 [PATCH] VIDIOC_ENUMSTD bug The v4l2 API documentation for VIDIOC_ENUMSTD says: To enumerate all standards applications shall begin at index zero, incrementing by one until the driver returns EINVAL. The actual code, however, tests the index this way: if (index<=0 || index >= vfd->tvnormsize) { ret=-EINVAL; So any application which passes in index=0 gets EINVAL right off the bat - and, in fact, this is what happens to mplayer. So I think the following patch is called for, and maybe even appropriate for a 2.6.18.x stable release. Signed-off-by: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1cc5f7142eca352109895fe20b1fc6405dd17727 Author: Ed Swierk Date: Mon Sep 25 16:25:36 2006 -0700 [PATCH] load_module: no BUG if module_subsys uninitialized Invoking load_module() before param_sysfs_init() is called crashes in mod_sysfs_setup(), since the kset in module_subsys is not initialized yet. In my case, net-pf-1 is getting modprobed as a result of hotplug trying to create a UNIX socket. Calls to hotplug begin after the topology_init initcall. Another patch for the same symptom (module_subsys-initialize-earlier.patch) moves param_sysfs_init() to the subsys initcalls, but this is still not early enough in the boot process in some cases. In particular, topology_init() causes /sbin/hotplug to run, which requests net-pf-1 (the UNIX socket protocol) which can be compiled as a module. Moving param_sysfs_init() to the postcore initcalls fixes this particular race, but there might well be other cases where a usermodehelper causes a module to load earlier still. The patch makes load_module() return an error rather than crashing the kernel if invoked before module_subsys is initialized. Cc: Mark Huang Cc: Greg KH Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bfa0e9a07cd31f3858239dbc93011b82780acf4b Author: keith mannthey Date: Mon Sep 25 16:25:35 2006 -0700 [PATCH] i386: fix flat mode numa on a real numa system If there is only 1 node in the system cpus should think they are apart of some other node. If cases where a real numa system boots the Flat numa option make sure the cpus don't claim to be apart on a non-existent node. Signed-off-by: Keith Mannthey Cc: Andy Whitcroft Cc: Dave Hansen Cc: Andi Kleen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3212fe1594e577463bc8601d28aa008f520c3377 Author: KAMEZAWA Hiroyuki Date: Mon Sep 25 16:25:31 2006 -0700 [PATCH] cpu to node relationship fixup: map cpu to node Assume that a cpu is *physically* offlined at boot time... Because smpboot.c::smp_boot_cpu_map() canoot find cpu's sapicid, numa.c::build_cpu_to_node_map() cannot build cpu<->node map for offlined cpu. For such cpus, cpu_to_node map should be fixed at cpu-hot-add. This mapping should be done before cpu onlining. This patch also handles cpu hotremove case. Signed-off-by: KAMEZAWA Hiroyuki Cc: "Luck, Tony" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 08992986497471ce575f23796268fb1b50b5c2ab Author: KAMEZAWA Hiroyuki Date: Mon Sep 25 16:25:21 2006 -0700 [PATCH] cpu to node relationship fixup: acpi_map_cpu2node Problem description: We have additional_cpus= option for allocating possible_cpus. But nid for possible cpus are not fixed at boot time. cpus which is offlined at boot or cpus which is not on SRAT is not tied to its node. This will cause panic at cpu onlining. Usually, pxm_to_nid() mapping is fixed at boot time by SRAT. But, unfortunately, some system (my system!) do not include full SRAT table for possible cpus. (Then, I use additiona_cpus= option.) For such possible cpus, pxm<->nid should be fixed at hot-add. We now have acpi_map_pxm_to_node() which is also used at boot. It's suitable here. Signed-off-by: KAMEZAWA Hiroyuki Cc: "Luck, Tony" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 25981de5b836581364612a4b1fe27db3b5d1f861 Author: Michael Hanselmann Date: Mon Sep 25 16:25:07 2006 -0700 [PATCH] backlight: fix oops in __mutex_lock_slowpath during head /sys/class/graphics/fb0/* Seems like not all drivers use the framebuffer_alloc() function and won't have an initialized mutex. But those don't have a backlight, anyway. Signed-off-by: Michael Hanselmann Cc: Olaf Hering Cc: "Antonino A. Daplas" Cc: Daniel R Thompson Cc: Jon Smirl Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3ef9ead31ae995251b420ac98398bd7545bf4e1 Author: David Rientjes Date: Mon Sep 25 16:24:57 2006 -0700 [PATCH] do not free non slab allocated per_cpu_pageset Stops panic associated with attempting to free a non slab-allocated per_cpu_pageset. Signed-off-by: David Rientjes Acked-by: Christoph Lameter Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 24fd425edd53ea580cad917e825c1f6715e9b939 Author: keith mannthey Date: Mon Sep 25 16:24:39 2006 -0700 [PATCH] i386 bootioremap / kexec fix With CONFIG_PHYSICAL_START set to a non default values the i386 boot_ioremap code calculated its pte index wrong and users of boot_ioremap have their areas incorrectly mapped (for me SRAT table not mapped during early boot). This patch removes the addr < BOOT_PTE_PTRS constraint. [ Keith says this is applicable to 2.6.16 and 2.6.17 as well ] Signed-off-by: Keith Mannthey Cc: Vivek Goyal Cc: Dave Hansen Cc: Cc: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b16f21f144010aa627c58b3a33be49ebfd685dc Author: Peter Zijlstra Date: Mon Sep 25 16:24:23 2006 -0700 [PATCH] rtc: lockdep fix/workaround BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted) [] show_trace_log_lvl+0x58/0x171 [] show_trace+0xd/0x10 [] dump_stack+0x19/0x1b [] trace_hardirqs_on+0xa2/0x11e [] _spin_unlock_irq+0x22/0x26 [] rtc_get_rtc_time+0x32/0x176 [] hpet_rtc_interrupt+0x92/0x14d [] handle_IRQ_event+0x20/0x4d [] __do_IRQ+0x94/0xef [] do_IRQ+0x9e/0xbd [] common_interrupt+0x25/0x2c DWARF2 unwinder stuck at common_interrupt+0x25/0x2c Signed-off-by: Peter Zijlstra Acked-by: Ingo Molnar Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c0ba7e5147829eaa607351997bccd06200a8db12 Author: Ian Kent Date: Mon Sep 25 16:24:16 2006 -0700 [PATCH] autofs4: zero timeout prevents shutdown If the timeout of an autofs mount is set to zero then umounts are disabled. This works fine, however the kernel module checks the expire timeout and goes no further if it is zero. This is not the right thing to do at shutdown as the module is passed an option to expire mounts regardless of their timeout setting. This patch allows autofs to honor the force expire option. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c32a8fd7cb33f30bcd855188dc8e243b144c5cee Author: Henne Date: Mon Sep 25 22:00:46 2006 +0200 [PATCH] ata-piix: fixes kerneldoc error Fixes an error in kerneldoc of ata_piix.c. Signed-off-by: Henrik Kretzschmar Signed-off-by: Jeff Garzik commit cc3afe6f856054a3752ef2b3ccc5eebf33bd5024 Author: Al Viro Date: Sat Sep 23 01:33:40 2006 +0100 [PATCH] more s2io __iomem annotations Signed-off-by: Al Viro Signed-off-by: Jeff Garzik commit 0c5649af3accc7f2941c5eebcc613e1a81b03448 Author: Al Viro Date: Sat Sep 23 01:32:40 2006 +0100 [PATCH] restore __iomem annotations in e1000 Signed-off-by: Al Viro Signed-off-by: Jeff Garzik commit ee705dba75c2f7daae5403ad4599b6738e2da7a0 Author: Al Viro Date: Sat Sep 23 01:28:17 2006 +0100 [PATCH] 64bit bugs in s2io le32_to_cpu() on 64bit values Signed-off-by: Al Viro Signed-off-by: Jeff Garzik commit 8a8e447b2aa1f9139d0bfc94a2a3426be9c8d40a Author: Jay Vosburgh Date: Fri Sep 22 21:56:15 2006 -0700 [PATCH] bonding: Fix primary selection error at enslavement time At enslavement time, the primary slave might not be activated if there is already an active slave and the new slave is the primary. Replaced complicated logic with a call to bond_select_active_slave(), which does the right thing. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=6378 Signed-off-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit 89cc76f95af3608d83a1d70b3c76b71ffe66e1f7 Author: Jay Vosburgh Date: Fri Sep 22 21:55:32 2006 -0700 [PATCH] bonding: Don't mangle LACPDUs Fixed handling of 802.3ad LACPDUs. Do not byte swap data in place in the packet. Updated nomenclature of "__ntohs_lacpdu" to be "htons"; it was previously used for both ntohs and htons operations, but only called ntohs functions. Signed-off-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit f5b2b966f032f22d3a289045a5afd4afa09f09c6 Author: Jay Vosburgh Date: Fri Sep 22 21:54:53 2006 -0700 [PATCH] bonding: Validate probe replies in ARP monitor Add logic to check ARP request / reply packets used for ARP monitor link integrity checking. The current method simply examines the slave device to see if it has sent and received traffic; this can be fooled by extraneous traffic. For example, if multiple hosts running bonding are behind a common switch, the probe traffic from the multiple instances of bonding will update the tx/rx times on each other's slave devices. Signed-off-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit 70298705bb29fb7982b85089adf17cd37b94baa7 Author: jamal Date: Fri Sep 22 21:54:37 2006 -0700 [PATCH] bonding: Don't release slaves when master is admin down When a bonding netdevice is admin-ed down it loses the slaves attributes (set via ifenslave). This is not consistent with other behavior of netdevices (example a qdisc attached to a netdevice doesnt disappear or an attached IP address etc). The included patch fixes this. Ive tested by ifenslaving, downing the bond, checking /proc and making sure it still has the slaves, up-ing the bond and making sure things continue to work. Jay/Bonding folks if you are ok with it, just ACK it or include it in your tree etc. Otherwise we can discuss. Acked-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit 0b680e753724d31a9c45f059d1aad29df54584a1 Author: Jay Vosburgh Date: Fri Sep 22 21:54:10 2006 -0700 [PATCH] bonding: Add priv_flag to avoid event mishandling Add priv_flag to specifically identify bonding-involved devices. Needed because IFF_MASTER is an unreliable identifier (vlan interfaces above bonding will inherit IFF_MASTER). Misidentification of devices would cause notifier events for other devices to be erroneously processed by bonding, causing various havoc. Bug discovered by Martin Papik ; this patch is modified from his original. Signed-off-by: Martin Papik Signed-off-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit 54ef313714070b397d3857289f0fd099b7643631 Author: Jay Vosburgh Date: Fri Sep 22 21:53:39 2006 -0700 [PATCH] bonding: Handle large hard_header_len The bonding driver fails to adjust its hard_header_len when enslaving interfaces. Whenever an interface with a hard_header_len greater than the ETH_HLEN default is enslaved, the potential for an oops exists, and if the oops happens while responding to an arp request, for example, the system panics. GIANFAR devices may use an extended hard_header for VLAN or hardware checksumming. Enslaving such a device and then transmitting over it causes a kernel panic. Patch modified from submitter's original, but submitter agreed with this patch in private email. Signed-off-by: Mark Huth Signed-off-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit a50d8de2cc872818b61e60c20c75be3f19aa6887 Author: Jay Vosburgh Date: Fri Sep 22 21:53:25 2006 -0700 [PATCH] bonding: Remove unneeded NULL test Remove unneeded test for NULL. Reported by Thomas Dillig and Isil Dillig via Stephen Hemminger . Signed-off-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit 65509645ae05886eccc81b8a453afea07f0eabb6 Author: Kenzo Iwami Date: Fri Sep 22 21:53:08 2006 -0700 [PATCH] bonding: Format fix in seq_printf call Though link_failure_count is type unsigned int, this value is outputted to /proc/net/bonding/bondX file using "%d" instead of "%u". The attached patch fixes this problem. Signed-off-by: Kenzo Iwami Acked-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit 8bb5f96b0c1f430e6be56edd6c7032bcedd86ff0 Author: Jay Vosburgh Date: Fri Sep 22 21:52:51 2006 -0700 [PATCH] bonding: Convert delay value from s16 to int The value of "downdelay/miimon" and "updelay/miimon" are stored in slave->delay. The type of downdelay, updelay, and miimon are all int. However, slave->delay is type short, and it is not possible to store the value of "downdelay/miimon" or "updelay/miimon" in some cases. (For example, miimon=1 downdelay=32768) The attached patch fixes this problem. Signed-off-by: Kenzo Iwami Acked-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit 94dbffd540eea601aecad07e2df5bfd8a46672f3 Author: Jay Vosburgh Date: Fri Sep 22 21:52:15 2006 -0700 [PATCH] bonding: Allow bonding to enslave a 10 Gig adapter Allow channel bonding to enslave a 10 Gig adapter without errors. Signed-off-by: Mitch Williams Acked-by: Jay Vosburgh Signed-off-by: Jeff Garzik commit e8126c82ccbfd39ccf3d22645207fbcc798021a3 Author: Jeff Garzik Date: Mon Sep 25 20:06:24 2006 -0400 Delete unused drivers/net/gt64240eth.h Noticed by Yoichi Yuasa. Signed-off-by: Jeff Garzik commit 64f6b64dfb8cdda21652f24a0fb0a68e2f0b0022 Author: Stephen Hemminger Date: Sat Sep 23 21:25:28 2006 -0700 [PATCH] skge: fiber support Add support for older fiber versions of the SysKonnect board. These chipsets use an internal PHY so they require special handling. The older sk98lin driver already supported these Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 46798c897e235e71e1e9c46a5e6e9adfffd8b85d Author: Jesper Juhl Date: Mon Sep 25 16:39:24 2006 -0700 [PATCH] fix possible NULL ptr deref in forcedeth There seems to be a possible NULL pointer deref bug in drivers/net/forcedeth.c::nv_loopback_test(). If dev_alloc_skb() fails, the next line will call skb_put() with a NULL first argument which it'll then try to deref - kaboom: a NULL pointer deref. Found by coverity (#1337). Signed-off-by: Jesper Juhl Cc: Ayaz Abdulla Cc: Manfred Spraul Cc: Stephen Hemminger Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit 84c22d7901f793bd267b5f79270080964b252826 Author: Eric Sesterhenn Date: Mon Sep 25 16:39:22 2006 -0700 [PATCH] Signedness issue in drivers/net/phy/phy_device.c While checking gcc 4.1 -Wextra warnings, I stumbled across the following two warnings: drivers/net/phy/phy_device.c:528: warning: comparison of unsigned expression < 0 is always false drivers/net/phy/phy_device.c:546: warning: comparison of unsigned expression < 0 is always false Since phy_read() returns an integer and can return negative values, it seems to me the best way to get proper error handling working again is to make val an int. Currently it is an u32, so the < 0 check always fails. Signed-off-by: Eric Sesterhenn Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit 0fe2480aded9504434e24815c410cbebb4f4efad Author: Michal Piotrowski Date: Mon Sep 25 16:39:21 2006 -0700 [PATCH] drivers/net/typhoon.c Removal of old code Signed-off-by: Michal Piotrowski Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit f8d9c9c876d3a2a109caa2c06b2761af0337c2f4 Author: Michal Piotrowski Date: Mon Sep 25 16:39:21 2006 -0700 [PATCH] drivers/net/tokenring/lanstreamer.h Removal of old code Signed-off-by: Michal Piotrowski Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit 9098f5ba6947944d9b0d3e989535ab55ae6af3f6 Author: Michal Piotrowski Date: Mon Sep 25 16:39:20 2006 -0700 [PATCH] drivers/net/tokenring/lanstreamer.c Removal of old code Signed-off-by: Michal Piotrowski Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit bef363a1e07a913508cf10ab2d7e2b11e6313257 Author: Michal Piotrowski Date: Mon Sep 25 16:39:19 2006 -0700 [PATCH] drivers/net/acenic.c Removal of old code Signed-off-by: Michal Piotrowski Cc: Jeff Garzik Cc: Jes Sorensen Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit 6432dc1f44ff3f02a304db26717c4f76e2e57be9 Author: Deepak Saxena Date: Mon Sep 25 16:39:18 2006 -0700 [PATCH] Update smc91x driver with ARM Versatile board info We need to specify a Versatile-specific SMC_IRQ_FLAGS value or the new generic IRQ layer will complain thusly: No IRQF_TRIGGER set_type function for IRQ 25 () Signed-off-by: Deepak Saxena Cc: Jeff Garzik Cc: Russell King Cc: Nicolas Pitre Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit be5b6d3d6cb7311893c9fbeebf094591d5f760a8 Author: David S. Miller Date: Mon Sep 25 14:08:37 2006 -0700 [SOUND] sparc/amd7930: Use __devinit and __devinitdata as needed. Fixes section-mismatch errors. Signed-off-by: David S. Miller commit efdbc1a7caf770b1b312000a42c630597f06973d Author: David S. Miller Date: Mon Sep 25 14:04:49 2006 -0700 [SUNLANCE]: Mark sparc_lance_probe_one as __devinit. Fixes section mismatch warnings when built as a module. Also, mark find_ledma and sun4 init function as __devinit too. Signed-off-by: David S. Miller commit a4c0291aa942dceddabe23bf2b74addb958d0964 Author: David S. Miller Date: Mon Sep 25 14:00:45 2006 -0700 [SPARC64]: Fix section-mismatch errors in solaris emul module. init_socksys() was marked __init but invoked from a non-__init function. Use the correct module_{init,exit}() faciltiies while we're here and eliminate some seriously bogus ifdefs. Signed-off-by: David S. Miller commit 4cc6773508299377099aa30cf30e6a2196c5872d Author: Paul Moore Date: Mon Sep 25 15:57:13 2006 -0700 [NetLabel]: update docs with website information Now that all of the supporting pieces of NetLabel have a home at SourceForge update the Kconfig help text and add an entry to the MAINTAINERS file. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit fd3858554b62c3af6b7664b5c58ad864c87116c9 Author: Paul Moore Date: Mon Sep 25 15:56:37 2006 -0700 [NetLabel]: rework the Netlink attribute handling (part 2) At the suggestion of Thomas Graf, rewrite NetLabel's use of Netlink attributes to better follow the common Netlink attribute usage. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit fcd48280643e92ec6cb29a04e9079dd7b6b5bfef Author: Paul Moore Date: Mon Sep 25 15:56:09 2006 -0700 [NetLabel]: rework the Netlink attribute handling (part 1) At the suggestion of Thomas Graf, rewrite NetLabel's use of Netlink attributes to better follow the common Netlink attribute usage. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 4fe5d5c07ab615a52fd1b0ceba5aeed7c612821a Author: Paul Moore Date: Mon Sep 25 15:54:03 2006 -0700 [Netlink]: add nla_validate_nested() Add a new function, nla_validate_nested(), to validate nested Netlink attributes. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 22acb19a91d2b551ea37647747972e5286284b22 Author: Paul Moore Date: Mon Sep 25 15:53:37 2006 -0700 [NETLINK]: add nla_for_each_nested() to the interface list At the top of include/net/netlink.h is a list of Netlink interfaces, however, the nla_for_each_nested() macro was not listed. This patch adds this interface to the list at the top of the header file. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit df2115c3134d0d1a18c1f37f5192394e7f64d1e0 Author: Paul Moore Date: Mon Sep 25 15:53:13 2006 -0700 [NetLabel]: change the SELinux permissions Change NetLabel to use the 'recvfrom' socket permission and the SECINITSID_NETMSG SELinux SID as the NetLabel base SID for incoming packets. This patch effectively makes the old, and currently unused, SELinux NETMSG permissions NetLabel permissions. Signed-of-by: Paul Moore Signed-off-by: David S. Miller commit 609c92feea5652809319bb77f19d24a44615687d Author: Paul Moore Date: Mon Sep 25 15:52:37 2006 -0700 [NetLabel]: make the CIPSOv4 cache spinlocks bottom half safe The CIPSOv4 cache traversal routines are triggered both the userspace events (cache invalidation due to DOI removal or updated SELinux policy) and network packet processing events. As a result there is a problem with the existing CIPSOv4 cache spinlocks as they are not bottom-half/softirq safe. This patch converts the CIPSOv4 cache spin_[un]lock() calls into spin_[un]lock_bh() calls to address this problem. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 14a72f53fb1bb5d5c2bdd8cf172219519664729a Author: Paul Moore Date: Mon Sep 25 15:52:01 2006 -0700 [NetLabel]: correct improper handling of non-NetLabel peer contexts Fix a problem where NetLabel would always set the value of sk_security_struct->peer_sid in selinux_netlbl_sock_graft() to the context of the socket, causing problems when users would query the context of the connection. This patch fixes this so that the value in sk_security_struct->peer_sid is only set when the connection is NetLabel based, otherwise the value is untouched. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit b77d95c78fb0ec330cd53e0d297ffa4fd2975e32 Author: David Woodhouse Date: Mon Sep 25 21:58:50 2006 +0100 [MTD NAND] Provide prototype for newly-exported nand_wait_ready() Signed-off-by: David Woodhouse commit 9663265626fd683faa3f7a994bb6db073581807e Author: David Woodhouse Date: Mon Sep 25 21:52:21 2006 +0100 [MTD] Remove #ifndef __KERNEL__ hack in Now that we have headers_install, we don't need this crap. Signed-off-by: David Woodhouse commit a67ab2bde752b26be75d4b68ecead9a14692eac5 Author: Larry Finger Date: Thu Sep 14 08:28:54 2006 -0500 [PATCH] bcm43xx: fix netdev watchdog timeouts The setup for running long periodic work has a bug that leads to netdev watchdog tx timeouts. This change eliminates the timeouts. Signed-off-by: Michael Buesch Acked-by: Larry Finger Signed-off-by: John W. Linville commit 583afd1e4f25c87000c85ad7d03f5299fd4155dc Author: Ulrich Kunitz Date: Wed Sep 13 02:42:38 2006 +0100 [PATCH] zd1211rw: Add LED support This patch includes a big cleanup of the existing unused LED code, and adds support for controlling the LED. The link LED will blink if the device is not associated. The LED switches between 2 seconds on and 1 second off. If the device is associated the LED is switched on. The link LED also indicates packet TX. I do a little bit more led resetting than the vendor driver, but the device works now as expected for single LED and double LED devices. Signed-off-by: Ulrich Kunitz Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit bc5f06a8aaa29a79c9da2cedb5b9779b8081289c Author: Ulrich Kunitz Date: Wed Sep 13 02:42:12 2006 +0100 [PATCH] zd1211rw: Added workqueue For housekeeping and watchdog tasks a workqueue is created. The central workqueue is not used to prevent crashes creates by bugs. It might be changed, when the housekeeping is stabilized. Signed-off-by: Ulrich Kunitz Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 44976c66bb2b44e4cf29a259a0cd6adadf8eb031 Author: Ulrich Kunitz Date: Wed Sep 13 02:41:35 2006 +0100 [PATCH] zd1211rw: Removes wrong assertions Checking whether a mutex is not locked directly before mutex_lock() is called, doesn't make sense. The whole point of mutex_lock() is to block, if the mutex is locked. Signed-off-by: Ulrich Kunitz Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit cbb5e6bbb29a850dcb87d8efa30b457ce8014369 Author: Ulrich Kunitz Date: Wed Sep 13 02:41:02 2006 +0100 [PATCH] zd1211rw: 16-bit writes for physical control registers Caused by the fact that physical control registers appear to have only a width of 16 bit, 32-bit writes are not required. Signed-off-by: Ulrich Kunitz Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 927db87fb1523101653eae44ac27223a30a18ada Author: Daniel Drake Date: Tue Sep 12 23:37:25 2006 +0100 [PATCH] softmac: Update MAINTAINERS entry This mailing list has been deactivated. Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 8aeb9fc5699f1b3c64ba152910f7c5c075c3a93a Author: Larry Finger Date: Tue Sep 12 15:29:04 2006 -0500 [PATCH] bcm43xx-softmac: improve wrong firmware message An error message is changed to a printk as the original dprintk would be optimized away if debugging were not enabled. If the error is triggered, a more meaningful message is returned. Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit b2f206f4a711b0b1e6d3cdca52e919a986aceada Author: Larry Finger Date: Tue Sep 12 12:40:32 2006 -0500 [PATCH] bcm43xx-softmac: update noise handling In bcm43xx-softmac, the bcm43xx_stats struct contains a variable that is no longer used. In addition, two TODO entries related to noise processing in bcm43xx_rx have been completed, and as unused one is removed. Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit a271ca5bbb1df988806bead8910b603819f4190f Author: Larry Finger Date: Mon Sep 11 21:50:56 2006 -0500 [PATCH] bcm43xx-softmac: update PHY initialization This patch updates the PHY initialization code for bcm43xx-softmac to conform with recent changes in the clean-room specs at http://bcm-specs.sipsolutions.net. Mostly, these changes implement the sequence needed for chips with GPHY revision 8; however, the patch also corrects a typo in one address, and some parts that were missing from the spec when the initial coding was done. Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit 919ee6ddcd3fcff09dee90c11af17a802196ad1f Author: Jean Tourrilhes Date: Tue Aug 29 18:01:40 2006 -0700 [PATCH] WE-21 for ipw2200 Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit b978d0278c3a4c41bda806743c6ef5dca86b4c61 Author: Larry Finger Date: Thu Aug 31 10:01:39 2006 -0500 [PATCH] bcm43xx: WE-21 support Patch to make bcm43xx-softmac be compatible with the revised SSID length of WE-21. Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit a6082f4032a9667e844fecd974f17268249fb966 Author: Daniel Drake Date: Wed Aug 30 03:46:27 2006 +0100 [PATCH] WE-21 for zd1211rw Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 22b99262f59ddf5d283e19047e37dbc3be907e93 Author: Jean Tourrilhes Date: Tue Aug 29 18:07:11 2006 -0700 [PATCH] WE-21 for zd1201 Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit de9621bc5637be5f9e3e3ff2fc1475b3de41132e Author: Jean Tourrilhes Date: Tue Aug 29 18:05:37 2006 -0700 [PATCH] WE-21 for wl3501 Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit 4ced38ac48137e1928dd40de3cdc074ec31c059d Author: Jean Tourrilhes Date: Tue Aug 29 18:04:09 2006 -0700 [PATCH] WE-21 for ray_cs Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit bad04f2ce00da5aaa6c8e97b1b80ad2ebd755b8b Author: Jean Tourrilhes Date: Tue Aug 29 18:03:23 2006 -0700 [PATCH] WE-21 for Prism54 Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit eeec9f1a931262d69811135092c8447d6dccc3e6 Author: Jean Tourrilhes Date: Tue Aug 29 18:02:31 2006 -0700 [PATCH] WE-21 for orinoco Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit 5b63bae0ab750942e84bfb9b353e6222583457a2 Author: Jean Tourrilhes Date: Tue Aug 29 18:00:48 2006 -0700 [PATCH] WE-21 for ipw2100 Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit 9fb08363f1f6d360dbaf6d7f51b9e7ca07c05ecd Author: Jean Tourrilhes Date: Tue Aug 29 17:59:47 2006 -0700 [PATCH] WE-21 for hostap Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit 6a484db472e77218252025d31d4ef96dbc11ada9 Author: Jean Tourrilhes Date: Tue Aug 29 17:59:03 2006 -0700 [PATCH] WE-21 for atmel Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit 7f8544cc95c7f521847fa760ce38d932e6ab4542 Author: Jean Tourrilhes Date: Tue Aug 29 17:58:11 2006 -0700 [PATCH] WE-21 for airo Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit baef186519c69b11cf7e48c26e75feb1e6173baa Author: John W. Linville Date: Fri Sep 8 16:04:05 2006 -0400 [PATCH] WE-21 support (core API) This is version 21 of the Wireless Extensions. Changelog : o finishes migrating the ESSID API (remove the +1) o netdev->get_wireless_stats is no more o long/short retry This is a redacted version of a patch originally submitted by Jean Tourrilhes. I removed most of the additions, in order to minimize future support requirements for nl80211 (or other WE successor). CC: Jean Tourrilhes Signed-off-by: John W. Linville commit a6d967a485c67ec8a1276261f39d81ace6a3e308 Author: Jeff Garzik Date: Mon Sep 25 15:33:09 2006 -0400 [libata] No need for all those arch libata-portmap.h headers They all contain the same thing. Instead, have a single generic one in include/asm-generic, and permit an arch to override as needed. Signed-off-by: Jeff Garzik commit 956e944c7690ea994757a8cbedbb6241e1d9138f Author: David Woodhouse Date: Mon Sep 25 17:12:39 2006 +0100 [MTD NAND] Allow override of page read and write functions. - allow high-level nand_write_page() function to be overridden - likewise low-level write_page_raw() and read_page_raw() functions - Clean up the abuse of chip->ecc.{write,read}_page() with MTD_OOB_RAW Signed-off-by: David Woodhouse commit 4bf63fcb83dc761853f69a77b15e47712689020b Author: David Woodhouse Date: Mon Sep 25 17:08:04 2006 +0100 [MTD NAND] Allocate chip->buffers separately to allow it to be overridden In particular, the board driver might need it to be DMAable. Signed-off-by: David Woodhouse commit 3b85c3211ebde263a86c8cd3c7277fdd2e440310 Author: David Woodhouse Date: Mon Sep 25 17:06:53 2006 +0100 [MTD NAND] Split nand_scan() into two parts; allow board driver to intervene Signed-off-by: David Woodhouse commit 4b648b0253c0976e944ea07e38a2d53ad4d0b30e Author: David Woodhouse Date: Mon Sep 25 17:05:24 2006 +0100 [MTD NAND] Export nand_wait_ready() for use by board drivers Signed-off-by: David Woodhouse commit fb60cf4ab52f3520c2119aa42f7d4ed8e7594eb6 Author: Tony Lindgren Date: Mon Sep 25 13:28:17 2006 +0300 ARM: OMAP: Remove common pm.c There is now separate pm.c for OMAP1 and OMAP2. Signed-off-by: Tony Lindgren commit 90afd5cb2ac0977c38e83b6b21493da911b242b3 Author: Tony Lindgren Date: Mon Sep 25 13:27:20 2006 +0300 ARM: OMAP: Sync clocks with linux-omap tree Mostly clean up CONFIG_OMAP_RESET_CLOCKS. Also includes a patch from Imre Deak to make McSPI clocks use id. Signed-off-by: Tony Lindgren commit 1630b52ddf4fc27e0dc421a57e4788bf9d3886cc Author: Komal Shah Date: Mon Sep 25 12:51:08 2006 +0300 [PATCH] ARM: OMAP: Check gpio_fck not gpio_ick Check gpio_fck not gpio_ick. Signed-off-by: Komal Shah Signed-off-by: Tony Lindgren commit 709eb3e5ccb304dca011c41456da5ffd246d7271 Author: Tony Lindgren Date: Mon Sep 25 12:45:45 2006 +0300 ARM: OMAP: Sync DMA with linux-omap tree This patch syncs OMAP DMA code with linux-omap tree. Mostly allow changing DMA callback function and set OMAP2 specific transfer mode. Signed-off-by: Tony Lindgren commit ddc32a87497d8806e361cfe7168f173396fe9219 Author: Juha Yrjola Date: Mon Sep 25 12:41:50 2006 +0300 ARM: OMAP2: Make sure peripherals can be accessed after clk_enable Some peripherals seem to need additional delay until they can actually be accessed after enabling their FCLK and ICLK. Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit dc0d794e488090082b7194738a08f18db0874900 Author: Juha Yrjola Date: Mon Sep 25 12:41:49 2006 +0300 ARM: OMAP2: Keep both APLLs active during bootup Enabling and disabling the 54 MHz and 96 MHz APLLs can happen unnecessarily often during bootup. Make sure they're kept enabled during init. Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit dee45648a5e2f3075c51f5d6b5da65b32235d3f9 Author: Juha Yrjola Date: Mon Sep 25 12:41:47 2006 +0300 ARM: OMAP: Add sanity check to clk_disable BUG() if the clock use count is already zero. Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit bee7930f4aa501de4e3c793640c3af31fd3867e2 Author: Hiroshi DOYU Date: Mon Sep 25 12:41:46 2006 +0300 ARM: OMAP: GPIO: IRQSTATUS2 workaround for retention state In OMAP2420, an incoming GPIO interrupt always sets both GPIO_IRQSTATUS1 and GPIO_IRQSTATUS2, even if the relevant bit is disabled in GPIO_IRQENABLE1/2 and DSP doesn't use GPIO at all. GPIO_IRQSTATUS1 is for MPU and GPIO_IRQSTATUS2 is for DSP. If IRQSTATUS is set, this will prevent the system from going to idle state. This patch also clears IRQSTATUS2 to avoid the above situation. Signed-off-by: Hiroshi DOYU Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit 0d9356cbb5d7a0bc8628f74fb15fd7268372c7fe Author: Tony Lindgren Date: Mon Sep 25 12:41:45 2006 +0300 ARM: OMAP: Fix typo for 24xx GPIO resume Fix typo for 24xx GPIO resume Signed-off-by: Tony Lindgren commit 39020842b3d8a450e80724a71d5df676535d249e Author: Juha Yrjola Date: Mon Sep 25 12:41:44 2006 +0300 ARM: OMAP: OMAP2 dmtimer power management support GPT1 will be set into non-posted mode, and the wakeup register is set for all timers. Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit ab0a2b9b9f536d860681dacbfb5784bd76e88a1e Author: Juha Yrjola Date: Mon Sep 25 12:41:43 2006 +0300 ARM: OMAP: Add support for forcing osc_ck on Some boards might use the oscillator clock for powering external peripherals. Add support for making sure osc_ck stays active even when trying to go to sleep. Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit 12583a70ac6b6641905e37fdd61a7f711fb4ce2b Author: Timo Teras Date: Mon Sep 25 12:41:42 2006 +0300 ARM: OMAP: Add enable/disable functions for dmtimer Add enable/disable functions which effectively control the GPT iclk and fclk. Signed-off-by: Timo Teras Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit 893a668ee2a0bd28fbeb639ae97dd60ec8b7db66 Author: David Brownell Date: Mon Sep 25 12:41:41 2006 +0300 ARM: OMAP: Remove Remove superfluous/recursive locking for GPIO Remove Remove superfluous/recursive locking for GPIO Signed-off-by: David Brownell Signed-off-by: Tony Lindgren commit 14188b3a4cbffd317ac65434750481d2ee14e09e Author: Tony Lindgren Date: Mon Sep 25 12:41:40 2006 +0300 ARM: OMAP: Fix spinlock recursion for dyntick Fix spinlock recursion for dyntick. Modified version based on Imre Deak's earlier patch. Signed-off-by: Tony Lindgren commit e4d5ee8109c210b65becfc1ef7697a0ce4eaf3c4 Author: Komal Shah Date: Mon Sep 25 12:41:39 2006 +0300 ARM: OMAP: Remove IVA IRQ bank ARM11 can't access the IVA interrupt controller from IVA slave port. From Richard Woodruff: "The 0x40000000 is an IVA-ARM7 local bus address. The IVA-INTC is NOT accessible through the IVA-L3-Slave Port. The current TRM does say this directly and indirectly in a few spots and in figures." Signed-off-by: Komal Shah Signed-off-by: Tony Lindgren commit 4196dd6baabccdef3786c1d51d75e041313af848 Author: Tony Lindgren Date: Mon Sep 25 12:41:38 2006 +0300 ARM: OMAP: Reset GPIO irq state after free_irq() This is needed to reset GPIO after free_irq(). Signed-off-by: Tony Lindgren commit eaca33df44c0d00bc12b16e72b728ade25adf14d Author: Juha Yrjola Date: Mon Sep 25 12:41:37 2006 +0300 ARM: OMAP: Add write memory barriers to OMAP2 clock code After adjusting clock parameters, OMAP2 CPUs need a memory barrier to make sure the changes go into effect immediately. Otherwise bad things will happen if we try to access the peripheral whose clock is just being enabled. Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit dbab288be47ddc84ad52ff926ea1a0efd33acb57 Author: Samuel Ortiz Date: Mon Sep 25 12:41:36 2006 +0300 ARM: OMAP: Fix OMAP2 clock.c typo A forgotten parenthesis in clock.c caused the PLL stabilization loop to not be executed correctly. Signed-off-by: Samuel Ortiz Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit fa4bb626c660ada7cad3cc7e45da14f8ec17847c Author: Timo Teras Date: Mon Sep 25 12:41:35 2006 +0300 ARM: OMAP: Use GPT iclk only when needed This patch makes the OMAP2 dmtimers module using the interface clocks only while the registers are accessed (except GPT1 which has iclk enabled all the time). Signed-off-by: Timo Teras Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit 123e9a5573098dbb10194c18d6d575620d0e94f3 Author: Tony Lindgren Date: Mon Sep 25 12:41:34 2006 +0300 ARM: OMAP: DMA source and destination addresses are unsigned Also export some omap24xx specific DMA functions. Signed-off-by: Tony Lindgren commit f37e4580c409e290f6e482007c3573cdb4470bf9 Author: Imre Deak Date: Mon Sep 25 12:41:33 2006 +0300 ARM: OMAP2: Dynamic allocator for GPMC memory space Add support for assigning memory regions dynamically to peripherals attached to GPMC interface. Platform specific code should now call gpmc_cs_request to get a free GPMC memory region instead of using a fixed address. Make the H4 and Apollon platform initialization use the new API. Signed-off-by: Imre Deak Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit 2eaff915744b6c8db7770fa9e841fd1c0105fb0b Author: Jonathan McDowell Date: Mon Sep 25 12:41:31 2006 +0300 ARM: OMAP: Add some extra #defines for Amstrad Delta This patch adds some further #defines regarding GPIOs and latch bits for the Amstrad Delta; the drivers that use them will be submitted at a later date but there's no reason not to have the information already there and available for use. Signed-off-by: Jonathan McDowell Signed-off-by: Tony Lindgren commit 193e68be335890a99879799bdcd06e18247c110a Author: Jonathan McDowell Date: Mon Sep 25 12:41:30 2006 +0300 ARM: OMAP: Fix OMAP1 compilation after MPUIO check change The recent MPUIO range change fix breaks compilation if CONFIG_ARCH_OMAP24XX isn't defined; it should be OMAP_MAX_GPIO_LINES not MAX_GPIO_LINES I believe. This one liner fixes it. Signed-off-by: Jonathan McDowell Signed-off-by: Tony Lindgren commit 75a1d10e2f110380adaa9b993fd417537e2f85ba Author: Mark Howell Date: Mon Sep 25 12:41:29 2006 +0300 ARM: OMAP: mux: add config for 16xx SPI pins This patch adds pin mux info for the SPI master/slave interface on OMAP16xx. Data from OMAP 1611/1612 TRM and errata. Works for me on my 1611/H2 with current git kernel. Signed-off-by: Mark Howell Signed-off-by: Tony Lindgren commit b5beef5d5dddef820eb36c97216487ed7cf68971 Author: Imre Deak Date: Mon Sep 25 12:41:28 2006 +0300 ARM: OMAP: Sleep is prevented when no LCD is attached We have to make sure that the LCD DMA external destination bit is cleared by default, otherwise OMAP won't sleep. Signed-off-by: Imre Deak Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit 5a4e86daa29e73a02ce8eb484837813e341a0b8a Author: Imre Deak Date: Mon Sep 25 12:41:27 2006 +0300 ARM: OMAP: GPIO: fix MPUIO check - MPUIO doesn't exist on OMAP2 - no error was returned for too big MPUIO numbers Signed-off-by: Imre Deak Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit 0e0a198690f5769e5687cb0d66e4486796ccdef0 Author: Tony Lindgren Date: Mon Sep 25 12:41:26 2006 +0300 ARM: OMAP: Remove sys_ck and sys_clkout from McBSP for 24xx McBSP does not need sys_ck or sys_clkout. If the devices connected to McBSP need sys_clkout, they need to request it. Signed-off-by: Tony Lindgren commit abc45e1d69542281fb2b40968e5d112f51976623 Author: Kyungmin Park Date: Mon Sep 25 12:41:25 2006 +0300 ARM: OMAP: Apollon MMC support Apollon board MMC supports on OMAP2 TODO: We have to check MMC on H4 Signed-off-by: Kyungmin Park Signed-off-by: Tony Lindgren commit d1284b5f11aa946d732d60a402dfeec86a7bb2ef Author: Kevin Hilman Date: Mon Sep 25 12:41:24 2006 +0300 ARM: OMAP: 2420 boot BUG(): failure to map SRAM ARM: OMAP: Fix SRAM static mapping for EMU devices. Fix SRAM static mapping for EMU devices. Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren commit 93bda4c0214441b0bb03b61c2bf1d6727896a750 Author: Samuel Ortiz Date: Mon Sep 25 12:41:22 2006 +0300 ARM: OMAP: Added OMAP24xx camera IRQ definition Signed-off-by: Samuel Ortiz Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit df51a84d93e776b7481d937ccd60be1b27d320c5 Author: Imre Deak Date: Mon Sep 25 12:41:21 2006 +0300 ARM: OMAP: timer32k: fix tick count calculation when reprogramming Reprogramming takes places before putting the CPU into idle mode if the dynamic tick option is enabled. The timer is then set to expire at the next pending timer event. Because some time has already passed since the last reported jiffy we have to wait less than the time specified in jiffies. Also make sure we don't set a load value of 0 whose outcome is unspecified according to the TRM. Signed-off-by: Imre Deak Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren commit ae78dcf79aefa98a1ed245898467eb6d3bfc11e6 Author: Tony Lindgren Date: Mon Sep 25 12:41:20 2006 +0300 ARM: OMAP: Avoid sleeping during arch_reset If we call clk_get() from arch_reset we get ugly messages before reboot. Signed-off-by: Tony Lindgren commit 7d95ded91149564100a3181d341361aedcfd5bf5 Author: Tony Lindgren Date: Wed Sep 20 13:03:34 2006 +0100 [ARM] 3838/1: ARM: DCC debug console support for ARM11 Adds support for CONFIG_DEBUG_ICEDCC for ARM11. Tested on ARM1136 (OMAP2420). Signed-off-by: Tony Lindgren Signed-off-by: Russell King commit baf97ce6eda5891ee45fae9c1b06db855bb697e1 Author: Russell King Date: Thu Sep 21 17:00:08 2006 +0100 [ARM] Cleanups for 4cc9bd2eaa1063c68341c1c00e66660adcfdf254 - Document the meaning for OP_SCALAR, OP_SD and add OP_DD. - Formatting cleanups - Remove now redundant code for making compare instructions operate on scalar values. Signed-off-by: Russell King commit 4cc9bd2eaa1063c68341c1c00e66660adcfdf254 Author: Gen FUKATSU Date: Thu Sep 21 14:08:24 2006 +0100 [ARM] 3789/4: Fix VFP emulation to ignore VECITR for scalar instruction VECITR in Floating-Point Exception register indicates the number of remaining short vector iterations after a potential exception was detected. In case of exception caused by scalar instructions, VECITR is NOT updated. Therefore emulation for VFP must ignore VECITR field and treat "veclen" as zero when recognizing scalar instructing. Signed-off-by: Gen Fukatsu Signed-off-by: Russell King commit f8c440b209581809c5c8acac599410f23597a7b8 Author: Dan Fandrich Date: Wed Sep 20 23:28:51 2006 +0100 [ARM] 3792/2: Fix description of ZBOOT_ROM_BSS The documentation for the ZBOOT_ROM_BSS config option describes it as "The base address of 64KiB of read/write memory in the target for the ROM-able zImage..." In actuality, it requires more than 100 KiB of space in addition to enough space to hold the decompressed kernel. This patch fixes the description in the Kconfig file. Signed-off-by: Dan Fandrich Signed-off-by: Russell King commit a71ebdfa5243765e455a9ec2d6360e1704c6599e Author: George G. Davis Date: Thu Sep 21 03:57:04 2006 +0100 [ARM] 3853/1: Fix flush_ptrace_access() thinko for nonaliasing VIPT cache case Fix thinko in the flush_ptrace_access() "if (expr)" for the ARM VIPT non-aliasing cache case. We only need to flush cache when VM_EXEC is set in vma->vm_flags but "if (expr) always evaluates to true on UP systems for the ARM VIPT non-aliasing cache case. Signed-off-by: George G. Davis Signed-off-by: Russell King commit e7cc2c59cc83558fc26f17eee3c8f901119f0a7c Author: Lennert Buytenhek Date: Thu Sep 21 03:35:20 2006 +0100 [ARM] 3852/1: convert atomic bitops and __xchg over to raw_local_irq_{save,restore} Thomas Gleixner noticed that bitops.h should also use the raw_* irq disable/enable variants, and __xchg needs them as well. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 0c92e830bd39f3e6cf7b151dffecafbdc623496c Author: Lennert Buytenhek Date: Thu Sep 21 02:46:03 2006 +0100 [ARM] 3851/1: iop3xx: add io-data glantank support Add support for the IO-Data GLAN Tank, from Martin Michlmayr. Signed-off-by: Martin Michlmayr Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit e60d07b6cd38a7afb85f2cf51aebcb3359b63819 Author: Lennert Buytenhek Date: Thu Sep 21 02:42:12 2006 +0100 [ARM] 3850/1: iop3xx: add thecus n2100 support Add support for the Thecus n2100 (80219-based.) Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 17b602b1c1a38f3f0a4461bb1f571346e751b36b Author: Lennert Buytenhek Date: Thu Sep 21 02:24:38 2006 +0100 [ARM] 3849/1: fix get_unaligned() for gcc >= 4.1 gcc 4.1's __typeof__ propagates 'const', which breaks get_unaligned(). Rewrite get_unaligned() not to use __typeof__. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 3b7a86c2f01dafa797908fdcf386f51eb0d01f29 Author: Ben Dooks Date: Wed Sep 20 21:57:06 2006 +0100 [ARM] 3846/1: S3C24XX: Fix osiris memory map The memory mapping for the Osiris machine are all off by one bit, and the base address has been fixed for writing (bit25 is being checked by the write, but not on read) Signed-off-by: Ben Dooks Signed-off-by: Russell King commit bccd7458c0f6229a8cfbfad6c1fc0894b1d5fee8 Author: Ben Dooks Date: Wed Sep 20 21:15:29 2006 +0100 [ARM] 3844/1: S3C24XX: update s3c2410_defconfig New s3c2410_defconfig, updated 2.6.18 Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 7f61a84076ce4a6fe83a381751e33972f2a91ddc Author: Ben Dooks Date: Wed Sep 20 20:54:54 2006 +0100 [ARM] 3843/1: S3C24XX: Remove modfication lines from comments Remove the redundant Modification lines from the top of the files in arch/arm/mach-s3c2410 Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 72d70d06d8e431f40fc2d41710615735c0a84aed Author: Ben Dooks Date: Wed Sep 20 20:46:09 2006 +0100 [ARM] 3842/1: S3C2412: Rename LCD device The S3C2412 LCD controller is different enough to warrant renaming the platform device. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit d9bc55faf7aaeea1d098bc8511d074837edb149d Author: Ben Dooks Date: Wed Sep 20 20:39:15 2006 +0100 [ARM] 3841/1: S3C2412: Add new IDCODE 32412003 Add new code for the S3C2412 Signed-off-by: Ben Dooks Signed-off-by: Russell King commit b6c440a98eb3245fb06d411f1bc9d584269e95d5 Author: Ben Dooks Date: Wed Sep 20 20:32:33 2006 +0100 [ARM] 3840/1: S3C2412: Add machine VSTMS Add new machine VSTMS Signed-off-by: Ben Dooks Signed-off-by: Thomas Gleixner Signed-off-by: Russell King commit 1649adc78d46db79510b92ffd58486ca82a86549 Author: Russell King Date: Sat Sep 23 20:48:24 2006 +0100 [ARM] Update mach-types Signed-off-by: Russell King commit 8337dd68aaef4faaa15e126f9f5c3f6f02711508 Author: Lennert Buytenhek Date: Mon Sep 18 23:32:04 2006 +0100 [ARM] 3834/1: iop3xx: remove per-board defconfigs Remove the old per-board defconfigs. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 2d703ca0f9098fe0d6b1dbd668cf6eec3f701fb6 Author: Lennert Buytenhek Date: Mon Sep 18 23:31:31 2006 +0100 [ARM] 3833/1: iop3xx: add per-mach defconfigs Add one defconfig for all iop32x boards and one defconfig for all iop33x boards. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit c852ac80440db9b0a47f48578e9c6303078abbc1 Author: Lennert Buytenhek Date: Mon Sep 18 23:26:25 2006 +0100 [ARM] 3832/1: iop3xx: coding style cleanup Since the iop32x code isn't iop321-specific, and the iop33x code isn't iop331-specfic, do a s/iop321/iop32x/ and s/iop331/iop33x/, and tidy up the code to conform to the coding style guidelines somewhat better. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 475549faa161f4e002225f2ef75fdd2a6d83d151 Author: Lennert Buytenhek Date: Mon Sep 18 23:25:33 2006 +0100 [ARM] 3831/1: iop3xx: factor out common register defines Factor out the register defines for a number of other peripherals common to the iop32x and iop33x. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit c680b77efe4542830bb170e1cc40db1c47c569bc Author: Lennert Buytenhek Date: Mon Sep 18 23:24:52 2006 +0100 [ARM] 3830/1: iop3xx: board support file cleanup Revamp the iop3xx board support: move the support code for each iop board type into its own file, start using platform serial and platform physmap flash devices, switch to a per-board time tick rate, and get rid of the ARCH_EP80219 and STEPD config options by doing the relevant checks at run time. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 7412b10f7967ef4210ed6f793004d23642dc5140 Author: Lennert Buytenhek Date: Mon Sep 18 23:24:10 2006 +0100 [ARM] 3829/1: iop3xx: optimise irq entry macros Squeeze three instructions out of the iop32x irq demuxer, and nine out of the iop33x irq demuxer by using the hardware vector generator. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit d7d214e974b94e8332d1f6c16f6f19b661dfa855 Author: Lennert Buytenhek Date: Mon Sep 18 23:23:38 2006 +0100 [ARM] 3828/1: iop3xx: remove useless loadsp macro The iop33x loadsp hunk in arch/arm/boot/compressed/head.S serves no purpose -- remove it. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 72edd84a6b2db1a21d1ed07929cae560e276a0a6 Author: Lennert Buytenhek Date: Mon Sep 18 23:23:07 2006 +0100 [ARM] 3827/1: iop3xx: add common gpio module Implement the gpio_line_{config,get,set} API for iop3xx. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 610300e8f4f833904096ca1233ffd9dbd73fb11f Author: Lennert Buytenhek Date: Mon Sep 18 23:22:24 2006 +0100 [ARM] 3826/1: iop3xx: remove IOP3??_IRQ_OFS irq offset Get rid of the unused IOP3??_IRQ_OFS irq offset define, start IRQ numbering from zero. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 38ce73ebd74a9a1738b73619557f2397c59ba628 Author: Lennert Buytenhek Date: Mon Sep 18 23:21:38 2006 +0100 [ARM] 3825/1: iop3xx: use cp6 enable/disable macros Add CP6 enable/disable sequences to the timekeeping code and the IRQ code. As a result, we can't depend on CP6 access being enabled when we enter get_irqnr_and_base anymore, so switch the latter over to using memory-mapped accesses for now. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 0b29de4a6ac0936f56b974a3c19bd9c24ac5b5d7 Author: Lennert Buytenhek Date: Mon Sep 18 23:20:55 2006 +0100 [ARM] 3824/1: iop3xx: add cp6 enable/disable macros Add macros to enable and disable access to CP6. On the iop3xx, enabling CP6 access unfortunately also enables access to that coprocessor from unprivileged code, so we need these macros to enable and disable access to the coprocessor whenever we need to access it. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 863753a81e4f863015be34900dc2ba3637622f34 Author: Lennert Buytenhek Date: Mon Sep 18 23:19:02 2006 +0100 [ARM] 3823/1: iop3xx: switch iop32x/iop33x over to shared time code Switch the iop32x and iop33x code over to the common time implementation, and remove the (nearly identical) iop32x and iop33x time implementations. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 48388b2a56ae5e0f1c422e84d536f31729469b17 Author: Lennert Buytenhek Date: Mon Sep 18 23:18:16 2006 +0100 [ARM] 3822/1: iop3xx: rewrite time handling Merge and rewrite the iop32x/iop33x time code to do lost jiffy tracking properly, and put the result in plat-iop/time.c. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 7e9740b11529a0a69789fbe92d324f293e6266f6 Author: Lennert Buytenhek Date: Mon Sep 18 23:17:36 2006 +0100 [ARM] 3821/1: iop3xx: switch iop32x/iop33x over to shared pci code Switch the iop32x and iop33x code over to the common PCI implementation, and remove the (nearly identical) iop32x and iop33x PCI implementations. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 0cb015f9dea8a40d82d170be1a4f39ff909890bf Author: Lennert Buytenhek Date: Mon Sep 18 23:16:23 2006 +0100 [ARM] 3820/1: iop3xx: factor out shared pci code Merge the iop32x PCI code and iop33x PCI code into plat-iop/pci.c. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit e25d64f1242e8586f6e20c26fd876a4d956a6c45 Author: Lennert Buytenhek Date: Mon Sep 18 23:15:21 2006 +0100 [ARM] 3819/1: iop3xx: factor out shared i2c code Move the i2c bits shared between iop32x and iop33x to plat-iop/i2c.c and include/asm-arm/hardware/iop3xx.h. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 7ae1f7ec525c32db441836ab0ab010b85cb819a2 Author: Lennert Buytenhek Date: Mon Sep 18 23:12:53 2006 +0100 [ARM] 3818/1: iop3xx: introduce arch/arm/plat-iop for shared iop32x/iop33x code Introduce the arch/arm/plat-iop directory, for code shared between the iop32x and iop33x, and move the common memory map setup bits there. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 3f7e5815f4b774270e6506962de37af85aa9c830 Author: Lennert Buytenhek Date: Mon Sep 18 23:10:26 2006 +0100 [ARM] 3817/1: iop3xx: split the iop3xx mach into iop32x and iop33x Split the iop3xx mach type into iop32x and iop33x -- split the config symbols, and move the code in the mach-iop3xx directory to the mach-iop32x and mach-iop33x directories. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 98954df6917cb8f7e65f4f0f79ed641112fcf6b6 Author: Lennert Buytenhek Date: Mon Sep 18 23:02:25 2006 +0100 [ARM] 3816/1: iop3xx: rename config symbols Rename CONFIG_ARCH_IOP321 to CONFIG_ARCH_IOP32X and CONFIG_ARCH_IOP331 to CONFIG_ARCH_IOP33X. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit cdf3f8e0387e81477dee72ecb2e3be28feac05c8 Author: Ben Dooks Date: Tue Sep 19 10:04:18 2006 +0100 [ARM] 3836/1: S3C24XX: Clear both EINT and INT status before sleep Clear both the EINT and INT status before going to sleep, otherwise we may end up being woken by something that was not set in our wakeup map. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 50dedf168c1afd23cbc6c4fd8429c9e931b4e813 Author: Ben Dooks Date: Mon Sep 18 10:19:06 2006 +0100 [ARM] 3806/2: S3C2412: Fix GPIO VA when only S3C2412 selected The s3c24xx_va_gpio2 variable is only used when the S3C2412 and another cpu-type is being used in the kernel. This patch ensures it is not set when it is not being used. Fixes bug report by Thomas Gleixner. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 0033a2f0d028400ad04588efbd5740c73f0eb740 Author: Ben Dooks Date: Tue Sep 19 09:51:32 2006 +0100 [ARM] 3803/2: S3C24XX: PM split S3C2410 out of core pm Remove the S3C2410 specific items out of the core PM code. Add sysdev driver for all the S3C24XX series that used the S3C2410 PM code. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 34348012d6b43eca5e241fe97381420d5758866c Author: Ben Dooks Date: Mon Sep 18 23:52:03 2006 +0100 [ARM] 3800/2: S3C2412: DMA channel mappings DMA channel mappings for the S3C2312 Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 197c9444d6093b70c8faa24e7ab04a2423c9d14d Author: Lennert Buytenhek Date: Sat Sep 16 10:52:02 2006 +0100 [ARM] 3814/1: move 80200 dma_inv_range() erratum check out of line On stepping A0/A1 of the 80200, invalidating D-cache by line doesn't clear the dirty bits, which means that if we invalidate a dirty line, the dirty data can still be written back to memory later on. To work around this, dma_inv_range() on these two processors is implemented as dma_flush_range() (i.e. do a clean D-cache line before doing the invalidate D-cache line.) For this, we currently have a processor ID check in xscale_dma_inv_range(), but a better solution is to add a separate cache_fns and proc_info for A0/A1 80200. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 51635ad282ead58b9d164f07e1fb62a9456b427c Author: Lennert Buytenhek Date: Sat Sep 16 10:50:22 2006 +0100 [ARM] 3813/1: prevent >= 4G /dev/mem mmap() Prevent userland from mapping in physical address regions >= 4G by checking for that in valid_mmap_phys_addr_range(). Unfortunately, we cannot override valid_mmap_phys_addr_range() without also overriding valid_phys_addr_range(), so copy drivers/char/mem.c's version of valid_phys_addr_range() over to arch/arm/mm/mmap.c as well. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit bf11d26cb96fe8221ef056eedab692e91634cc65 Author: Lennert Buytenhek Date: Sat Sep 16 10:48:02 2006 +0100 [ARM] 3811/1: ep93xx: add cirrus logic edb9312 support Add Cirrus Logic EDB9312 support. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 8dd5c845bbc26c3517398abc3e5477b4b42e7176 Author: Lennert Buytenhek Date: Sat Sep 16 10:47:18 2006 +0100 [ARM] 3810/1: switch atomic helpers over to raw_local_irq_{save,restore} Now that we have raw_* variants of local_irq_$FOO(), switch the atomic helpers over to use those raw_* variants. This is necessary when using lockdep on pre-ARMv6 hardware, as lockdep uses atomic_t counters in the trace_hardirqs_off() path. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King commit 34148c6990d2f0107b53fe4ddf29b1ba30e613d3 Author: Ben Dooks Date: Sat Sep 16 00:12:53 2006 +0100 [ARM] 3805/1: S3C2412: LCD register update Add LCD register definitions for the S3C2412. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 3e9fc8e5de0fb00226325cf34eb08411eb72ec6d Author: Ben Dooks Date: Sat Sep 16 00:11:32 2006 +0100 [ARM] 3804/1: S3C2442: LCD register update Add LCD register definitions for the S3C2442. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 58095d7f39edc919cd3c63c6109ad282e7085da1 Author: Ben Dooks Date: Sat Sep 16 00:04:23 2006 +0100 [ARM] 3802/1: S3C24XX: PM tidy up cache flushing Change to using flush_cache_all() in pm.c and also remove the need to flush the cache in the PM code. This changes the sleep.S code to have an entry to store the registers for resume, and then a second entry (after the caches are cleaned) to do the suspend and resume. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 1e582fc73781da47eddd90c75bf97f191e4f450f Author: Ben Dooks Date: Sat Sep 16 00:01:39 2006 +0100 [ARM] 3801/1: S3C24XX: Move IRQ PM out of pm.c Seperate the IRQ power management code out of the pm.c file, and add it to the relevant system class devices. Also make the suspend and resume code take notice of the fact these registers can be moved by compile time code. Add fix from Ilya Yanok to also save the INTSUBMSK over sleep. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 3fc3a25ba47735296984ddbb2e6ba504017ec3e1 Author: Ben Dooks Date: Fri Sep 15 23:46:20 2006 +0100 [ARM] 3799/1: S3C2442: DMA channel mappings DMA channel mappings for the S3C2442 Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 98c418a002ce5f3110eeb31d1ce8261f5199997d Author: Ben Dooks Date: Fri Sep 15 23:45:17 2006 +0100 [ARM] 3798/1: S3C2440: DMA channel mappings S3C2440 DMA channel mappings Signed-off-by: Ben Dooks Signed-off-by: Russell King commit c374fe7148f1b13854186a7a14c4a2c4ffe3134b Author: Ben Dooks Date: Fri Sep 15 23:44:00 2006 +0100 [ARM] 3797/1: S3C2410: DMA channel mappings DMA channel mappings for the S3C2410 Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 505788cccbb96cd496b646594c8a5fcdc26bc2d9 Author: Ben Dooks Date: Fri Sep 15 23:42:24 2006 +0100 [ARM] 3796/1: S3C24XX: Add per-cpu DMA channel mapper Allow each CPU type in the S3C24XX range to select the DMA channel mapping it supports. We change the DMA registration to use an virtual channel number that the DMA system will allocate to a hardware channel at request time. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit fd88edd20fb0e8e2729aa8ce565316242189ceea Author: Ben Dooks Date: Fri Sep 15 23:34:34 2006 +0100 [ARM] 3795/1: S3C24XX: add base AC97 registers Add base definitions for the AC97 register definitions. Signed-off-by: Ben Dooks Signed-off-by: Russell King commit 597811ec167fa01c926a0957a91d9e39baa30e64 Author: Stephen Hemminger Date: Sun Sep 24 20:13:03 2006 -0700 [TCP]: make cubic the default Change default congestion control used from BIC to the newer CUBIC which it the successor to BIC but has better properties over long delay links. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 3d2573f7ebe507e372a23cdd3c8b03305d6e90aa Author: Stephen Hemminger Date: Sun Sep 24 20:11:58 2006 -0700 [TCP]: default congestion control menu Change how default TCP congestion control is chosen. Don't just use last installed module, instead allow selection during configuration, and make sure and use the default regardless of load order. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 5b7c714ec27584b18279b741b6043016f8adb9de Author: Roland Dreier Date: Sun Sep 24 20:09:33 2006 -0700 [ATM] he: Fix __init/__devinit conflict he_init_one() is declared __devinit, but calls lots of init functions that are marked __init. However, if CONFIG_HOTPLUG is enabled, __devinit functions go into normal .text, which leads to WARNING: drivers/atm/he.o - Section mismatch: reference to .init.text: from .text between 'he_start' (at offset 0x2130) and 'he_service_tbrq' Fix this by changing the __init functions to __devinit. Signed-off-by: Roland Dreier Signed-off-by: David S. Miller commit 7c250413e5b7c3dfae89354725b70c76d7621395 Author: Al Viro Date: Mon Sep 25 02:57:57 2006 +0100 [PATCH] pata_pdc2027x iomem annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 355edd2e396ef919d14a605fb4e45466ee2b64d1 Author: Al Viro Date: Mon Sep 25 02:57:22 2006 +0100 [PATCH] fix idiocy in asd_init_lseq_mdp() To whoever had written that code: a) priority of >> is higher than that of & b) priority of typecast is higher than that of any binary operator c) learn the fscking C Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 3cc27547d6ee2d50ecdd11e9127bc3cd1947e8dd Author: Al Viro Date: Mon Sep 25 02:55:40 2006 +0100 [PATCH] SCSI gfp_t annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 855fc73bf81e8f99606d6f5914c5b7c3b079d718 Author: Al Viro Date: Mon Sep 25 02:54:46 2006 +0100 [PATCH] wrong thing iounmapped (qla3xxx) ql3xxx_probe() does ioremap and stores result in ->mem_map_registers. On failure exit it does iounmap() of the same thing. OTOH, ql3xxx_remove() does iounmap() of ->mmap_virt_base which is (a) never assigned and (b) never used other than in that iounmap() call. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit ee111d111b69c2a216d674081107fe3b3829aa9a Author: Al Viro Date: Mon Sep 25 02:53:53 2006 +0100 [PATCH] qla3xxx iomem annotations the driver is still shite, though... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 8a1cdc9ca264c49ad0b896e43468fe6a4b0b646c Author: Matthew Wilcox Date: Sun Sep 24 20:22:52 2006 -0600 [PATCH] Revert ABI-breaking change in /proc Some user tools parse /proc/scsi/scsi, so we can't yet change the names. Change the existing ones back to their old names, and add an admonition to not make the same mistake that I did. Andrew Morton reports that this was breaking YDL 4.1 userspace. Signed-off-by: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d6c7ae22d4fadbc83677ea1a6144eea8911e319 Author: Yasuyuki Kozakai Date: Sun Sep 24 19:28:47 2006 -0700 [NETFILTER]: Add dscp,DSCP headers to header-y This patch adds xt_dscp.h and xt_DSCP.h to the kernel headers which are exported via 'make headers_install'. These are necessary for userspace to add rules using dscp match and DSCP target. Signed-off-by: Yasuyuki Kozakai Signed-off-by: David S. Miller commit 6a3670c4f1b97373425340ab2dc0a66c25983d46 Author: Al Viro Date: Sun Sep 24 23:45:29 2006 +0100 [PATCH] missing include (free_irq() use) Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit ae97dd9af17f0c7f5142b46c4289623176c477f3 Author: Al Viro Date: Sun Sep 24 23:42:57 2006 +0100 [PATCH] NULL noise removal Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 3e597c6045502dd0fa98a61aa95ba178f8a2cc03 Author: Al Viro Date: Sun Sep 24 23:42:20 2006 +0100 [PATCH] fix iptables __user misannotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 1db2ea398ffbfd9ea46d509ff0e4a85bb4b8c0ea Author: Al Viro Date: Sun Sep 24 23:41:42 2006 +0100 [PATCH] netlabel gfp annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 8abf1064c786ef5435b2d53cc8e9ebee13020de6 Author: Al Viro Date: Sun Sep 24 23:41:00 2006 +0100 [PATCH] libata won't build on SUN4 marked as such... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 9317fd4c60962d3a9423b5f9bb5d1b10cf8a0699 Author: Al Viro Date: Sun Sep 24 23:40:00 2006 +0100 [PATCH] libata won't build on m68k and m32r no ioread*(), for one thing Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 638b093255e12e066ae16b8750f37383603f7bd8 Author: Al Viro Date: Sun Sep 24 23:39:25 2006 +0100 [PATCH] restore libata build on frv Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 2722de7fed1601eb7de84f929e00776d37a4cf5f Author: David Woodhouse Date: Sun Sep 24 23:44:57 2006 +0100 Don't remove $(INSTALL_HDR_PATH)/install before headers_install. Signed-off-by: David Woodhouse commit 5cc8d246d0ebbdf827d4bb7c3de175377d244d73 Author: Jesper Juhl Date: Sun Sep 24 14:01:08 2006 +0200 kbuild: add distclean info to 'make help' and more details for 'clean' Add distclean info, that was previously missing, to 'make help'. Also add a few more details to the 'make clean' help text. Signed-off-by: Jesper Juhl Signed-off-by: Sam Ravnborg commit 5026b38cd2cd98e65f34cc6b079d5a155eae5881 Author: Randy Dunlap Date: Fri Sep 22 12:37:56 2006 -0700 dontdiff: add utsrelease.h Add auto-generated utsrelease.h to dontdiff file. Signed-off-by: Randy Dunlap Signed-off-by: Sam Ravnborg commit a5fa393b54c98044f50b0768f82336c510e68f3d Author: Rolf Eike Beer Date: Mon Aug 14 08:16:47 2006 +0200 kbuild: fix "mkdir -p" usage in scripts/package/mkspec "mkdir -p" does not only mean not to complain if the directory already exists, but also to create the parent directories if needed. This patch removes "lib" from the list of directories to create as we will also create "lib/modules". Signed-off-by: Rolf Eike Beer Signed-off-by: Sam Ravnborg commit 1ef988569051d47e990fe5bbea22fb9b64152098 Author: Robert P. J. Day Date: Tue Sep 12 12:38:19 2006 -0400 kbuild: correct and clarify versioning info in Makefile The attached patch clarifies the creation of KERNELRELEASE and corrects an error regarding the use of $(LOCALVERSION). Signed-off-by: Sam Ravnborg commit 2e99f3190f274c6783758ff511edb64e60753c9f Author: Robert P. J. Day Date: Thu Sep 21 09:39:41 2006 -0400 kbuild: fixup Documentation/kbuild/modules.txt Signed-off-by: Sam Ravnborg commit da7c04083c113c67800f1e13fe92a186e1f9084e Author: Aron Griffis Date: Thu Sep 21 00:27:02 2006 -0400 kbuild: Extend kbuild/defconfig tags support to exuberant ctags The following patch extends kbuild/defconfig tags support to exuberant ctags. The previous support is only for emacs ctags/etags programs. This patch also corrects the kconfig regex for the emacs invocation. Previously it would miss some instances because it assumed /^config instead of /^[ \t]*config Signed-off-by: Aron Griffis Signed-off-by: Sam Ravnborg commit 39e6e9cf902462abe624735fd95a51b01ceeda6f Author: Bryce Harrington Date: Wed Sep 20 12:43:37 2006 -0700 kbuild: fix for some typos in Documentation/makefiles.txt I noticed a few typos while reading makefiles.txt to learn about the kbuild system. Attached is a patch against 2.6.18 to fix them. Remove trailing whitespace while we are there.. Signed-off-by: Bryce Harrington Signed-off-by: Sam Ravnborg commit 1c7bafe7206d928eaccbcbd08d868733e0fb7054 Author: Robert P. J. Day Date: Wed Sep 13 07:57:50 2006 -0400 kbuild: clarify "make C=" build option Clarify the use of "make C=" in the top-level Makefile, and fix a typo in the Documentation file. Signed-off-by: Sam Ravnborg commit e41217129c66775d59c95978378ca42c53dd42c6 Author: Robert P. J. Day Date: Mon Sep 11 12:39:19 2006 -0400 Documentaion: update Documentation/Changes with minimum versions Based on conversations with greg kh (and noticing a simple typo), these are the actual minimal versions for 2.6.18. Signed-off-by: Sam Ravnborg commit b32c8268475358cfa18cf9373e6f95c661a7a142 Author: Robert P. J. Day Date: Mon Sep 11 12:09:42 2006 -0400 kbuild: update help in top level Makefile Signed-off-by: Sam Ravnborg commit c53ddacdc08d41f812f1e637d214251d14c07a3d Author: Kirill Korotaev Date: Thu Sep 7 13:08:54 2006 -0700 kbuild: fail kernel compilation in case of unresolved module symbols At stage 2 modpost utility is used to check modules. In case of unresolved symbols modpost only prints warning. IMHO it is a good idea to fail compilation process in case of unresolved symbols (at least in modules coming with kernel), since usually such errors are left unnoticed, but kernel modules are broken. - new option '-w' is added to modpost: if option is specified, modpost only warns about unresolved symbols - modpost is called with '-w' for external modules in Makefile.modpost Signed-off-by: Andrey Mirkin Signed-off-by: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg commit 2212692913281e5fddb1c50c8c123378cfc42169 Author: Sam Ravnborg Date: Tue Aug 8 16:45:41 2006 +0200 kbuild: remove debug left-over from Makefile.host Signed-off-by: Sam Ravnborg commit 7b5b82038184d19f611be166a70fd11824109a71 Author: Sam Ravnborg Date: Mon Aug 7 21:55:33 2006 +0200 kbuild: create output directory for hostprogs with O=.. build hostprogs-y only supported creating output directory for the final program. Extend this to also cover the situation where a .o file (used when host program is made from compositie objects) is locate in another directory. First user of this is the built-in lxdialog that. Signed-off-by: Sam Ravnborg commit 93659af1ce4974b1882668fee06458c0ac9315fd Author: Sam Ravnborg Date: Wed Aug 9 08:23:55 2006 +0200 kbuild: add missing return statement in modpost.c:secref_whitelist() Noticed by: Magnus Damm Signed-off-by: Sam Ravnborg commit 4635281c8ea26e9f718c28f8f7713d10ad332eff Author: Sam Ravnborg Date: Tue Aug 8 21:41:18 2006 +0200 kbuild: preperly align SYSMAP output Align filenames for SYSMAP with other filenames Signed-off-by: Sam Ravnborg commit b805aa0e79c78bd05ad1f5c52ec126a19531edb0 Author: Sam Ravnborg Date: Tue Aug 8 21:36:08 2006 +0200 kbuild: make -rR is now default Do not specify -rR anymore - it is default. Signed-off-by: Sam Ravnborg commit 45d506bd65e2e35881d8276c111b647807823d19 Author: Sam Ravnborg Date: Tue Aug 8 21:35:14 2006 +0200 kbuild: make V=2 tell why a target is rebuild tell why a a target got build enabled by make V=2 Output (listed in the order they are checked): (1) - due to target is PHONY (2) - due to target missing (3) - due to: file1.h file2.h (4) - due to command line change (5) - due to missing .cmd file (6) - due to target not in $(targets) (1) We always build PHONY targets (2) No target, so we better build it (3) Prerequisite is newer than target (4) The command line stored in the file named dir/.target.cmd differed from actual command line. This happens when compiler options changes (5) No dir/.target.cmd file (used to store command line) (6) No dir/.target.cmd file and target not listed in $(targets) This is a good hint that there is a bug in the kbuild file This patch is inspired by a patch from: Milton Miller Cc: Milton Miller Signed-off-by: Sam Ravnborg commit 12715d20af9fd9179daca7a1cd2cf3db3c2c494f Author: Sam Ravnborg Date: Tue Aug 8 20:43:39 2006 +0200 kbuild: modpost on vmlinux regardless of CONFIG_MODULES Based on patch from: Magnus Damm This has the advantage that all section mismatch checks are run regardless of modules being enabled or not. When running modpost on vmlinux output: MODPOST vmlinux When running modpost on modules output count of modules like this: MODPOST 5 modules Signed-off-by: Sam Ravnborg commit 9e157a5aa899f1ef73780e4755b57ddeb9225079 Author: Magnus Damm Date: Tue Aug 8 17:32:11 2006 +0900 kbuild: ignore references from ".pci_fixup" to ".init.text" The modpost code is extended to ignore references from ".pci_fixup" to ".init.text". Signed-off-by: Magnus Damm commit a07f6033ca135a94a69c6874d028f01338e2535c Author: Jan Engelhardt Date: Thu Jul 27 22:14:29 2006 +0200 kbuild: linguistic fixes for Documentation/kbuild/makefiles.txt I have done a look-through through Documentation/kbuild/ and my corrections (proposed) are attached. Cc'ed are original author Michael (responsible for comitting changes to these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer). Signed-off-by: Jan Engelhardt Signed-off-by: Sam Ravnborg commit d9a7ff664667e1991652db0bb0cb0abea96ec716 Author: Jan Engelhardt Date: Thu Jul 27 22:14:29 2006 +0200 kbuild: linguistic fixes for Documentation/kbuild/modules.txt I have done a look-through through Documentation/kbuild/ and my corrections (proposed) are attached. Cc'ed are original author Michael (responsible for comitting changes to these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer). Signed-off-by: Jan Engelhardt Signed-off-by: Sam Ravnborg commit 83dcde4e1b64e39d34358ea9c5e6259af6aa50da Author: Jan Engelhardt Date: Thu Jul 27 22:14:29 2006 +0200 kconfig: linguistic fixes for Documentation/kbuild/kconfig-language.txt I have done a look-through through Documentation/kbuild/ and my corrections (proposed) are attached. Cc'ed are original author Michael (responsible for comitting changes to these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer). Signed-off-by: Jan Engelhardt Signed-off-by: Sam Ravnborg commit 65ff22ee3bd0b0816e5e192b59f24a7538e5d497 Author: Olaf Hering Date: Tue Jul 25 18:42:26 2006 -0700 remove RPM_BUILD_ROOT from asm-offsets.h No file in rpm binary package should have the RPM_BUILD_ROOT string in it. To simplify building of external modules, our kernel-source package contains some temp files from the Kbuild system. asm/asm-offsets.h is one of the files that contains the absolute path if make O=$O is used. * This file was generated by /var/tmp/kernel-source-2.6.14_rc4-build/usr/src/linux-2.6.14-rc4-2/Kbuild Remove the $RPM_BUILD_ROOT string in the shipped tempfile. Signed-off-by: Olaf Hering Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg commit 07aea3a71fc6b07744691eec2dfea705a7b30280 Author: Sam Ravnborg Date: Sun Jul 23 20:47:50 2006 +0200 kbuild: use in-kernel unifdef Let headers_install use in-kernel unifdef Signed-off-by: Sam Ravnborg commit 14a036d2dc304797f3624c06bd6d2a1e9b59e45a Author: Sam Ravnborg Date: Sun Jul 23 20:41:30 2006 +0200 kbuild: replace use of strlcpy with a dedicated implmentation in unifdef Signed-off-by: Sam Ravnborg commit 01f1c8799ad8b23c190d59cf1c9e28e6fed390a4 Author: Sam Ravnborg Date: Sun Jul 23 20:39:59 2006 +0200 kbuild: add unifdef This patch contains a raw copy of unifdef.c Next patch will modify it and add infrastructure to use it Adding unifdef to the kernel is acked by the author. The reason to add unifdef as part of the kernel source is that it is not yet a common utility on most distributions. Signed-off-by: Sam Ravnborg commit 48f1f0589dd09df6ea07d41c737db3218ad2cb79 Author: Sam Ravnborg Date: Sun Jul 23 19:37:44 2006 +0200 kbuild: consistently decide when to rebuild a target Consistently decide when to rebuild a target across all of if_changed, if_changed_dep, if_changed_rule. PHONY targets are now treated alike (ignored) for all targets While add it make Kbuild.include almost readable by factoring out a few bits to some common variables and reuse this in Makefile.build. Signed-off-by: Sam Ravnborg commit d3660a8cbdfad620af88b85b7bbfff29160f14c2 Author: Matthew Wilcox Date: Thu Jul 13 12:54:07 2006 -0600 kconfig: support DOS line endings Kconfig doesn't currently handle config files with DOS line endings. While these are, of course, an abomination, etc, etc, it can be handy to not have to convert them first. It's also a tiny patch and even adds support for lines ending in just \r or even \n\r. Signed-off-by: Matthew Wilcox Signed-off-by: Sam Ravnborg commit 6d71627581e96efb3717960b79fc2167a4617977 Author: David Woodhouse Date: Sun Sep 24 22:16:03 2006 +0100 New 'make headers_install_all' target. Install headers for _all_ architectures, suitable for making a tarball release or extracting them for use in a separate package. Signed-off-by: David Woodhouse commit de78912582bc1f95733d53e0d40779c0cd7b0686 Author: David Woodhouse Date: Sun Sep 24 22:15:14 2006 +0100 Use dependencies for 'make headers_install'. Re-export header files only if either they or their controlling Kbuild file has actually changed. Also allow for similar dependencies with 'headers_check', once we properly create the dependencies for those. Signed-off-by: David Woodhouse commit e41542f5167d6b506607f8dd111fa0a3e468ccb8 Author: Ian McDonald Date: Fri Sep 22 14:28:01 2006 +1200 [DCCP]: Introduce dccp_probe This adds DCCP probing shamelessly ripped off from TCP probes by Stephen Hemminger. I've put in here support for further CCID3 variables as well. Andrea/Arnaldo might look to extend for CCID2. Signed-off-by: Ian McDonald Signed-off-by: Arnaldo Carvalho de Melo commit b4daf69722c49670d355d66439abda5ab5d4c5db Author: David Woodhouse Date: Sun Sep 24 22:07:25 2006 +0100 [S390] Unexport , export in its place. Signed-off-by: David Woodhouse commit 9e72cbf353e259bd30ab472d72d7bdb9be23fb12 Author: David Woodhouse Date: Sun Sep 24 22:06:48 2006 +0100 Remove dead netfilter_logging.h from include/linux/Kbuild Signed-off-by: David Woodhouse commit 3dd9a7c3a155ee96160876cba92439fdc96d7e0b Author: Ian McDonald Date: Fri Sep 22 14:26:44 2006 +1200 [DCCP]: Use constants for CCIDs With constants for CCID numbers this now uses them in some places. Signed-off-by: Ian McDonald Signed-off-by: Arnaldo Carvalho de Melo commit b83eff641ed39bd631535b9a8971e161b056f541 Author: Ian McDonald Date: Fri Sep 22 14:25:36 2006 +1200 [DCCP]: Introduce constants for CCID numbers Signed-off-by: Ian McDonald Signed-off-by: Arnaldo Carvalho de Melo commit 0d5dc6c2dd7a3cd2b2f505b0625c4ec9c0e5b4f0 Author: Mark Fasheh Date: Thu Sep 14 14:44:51 2006 -0700 ocfs2: Teach ocfs2_drop_lock() to use ->set_lvb() callback With this, we don't need to pass an additional struct with function pointer. Now that the callbacks are fully used, comment the remaining API. Signed-off-by: Mark Fasheh commit b5e500e23e532795fbf79a3cdbcb014f207fdb2a Author: Mark Fasheh Date: Wed Sep 13 22:01:16 2006 -0700 ocfs2: Remove ->unblock lockres operation Have ocfs2_process_blocked_lock() call ocfs2_generic_unblock_lock(), which gets to be ocfs2_unblock_lock() now that it's the only possible unblock function. Remove the ->unblock() callback from the structure, and all lock type specific unblock functions. Signed-off-by: Mark Fasheh commit cc567d89b3af4294580c9c97610d2c1018032e33 Author: Mark Fasheh Date: Wed Sep 13 21:52:21 2006 -0700 ocfs2: move downconvert worker to lockres ops This way lock types don't have to manually pass it to ocfs2_generic_unblock_lock(). Signed-off-by: Mark Fasheh commit 08280f11de91beac2f5234ce5fc2ed246dfe6a86 Author: Mark Fasheh Date: Wed Sep 13 21:41:56 2006 -0700 ocfs2: Remove unused dlmglue functions The meta data unblocking code no longer needs ocfs2_do_unblock_meta() or ocfs2_can_downconvert_meta_lock(), so remove them. Signed-off-by: Mark Fasheh commit 810d5aeba18825c754cf47db59eb83814a54bb27 Author: Mark Fasheh Date: Wed Sep 13 21:39:52 2006 -0700 ocfs2: Have the metadata lock use generic dlmglue functions Fill in the ->check_downconvert and ->set_lvb callbacks with meta data specific operations and switch ocfs2_unblock_meta() to call ocfs2_generic_unblock_lock() Signed-off-by: Mark Fasheh commit 5ef0d4ea087740908f4fb57606f6c09e3b90c477 Author: Mark Fasheh Date: Wed Sep 13 21:21:52 2006 -0700 ocfs2: Add ->set_lvb callback in dlmglue This allows a lock type to set the value block before downconvert. Signed-off-by: Mark Fasheh commit 16d5b9567ad5241b5c6e0cc4778c1af6c04bb801 Author: Mark Fasheh Date: Wed Sep 13 21:10:12 2006 -0700 ocfs2: Add ->check_downconvert callback in dlmglue This will allow lock types to force a requeue of a lock downconvert. Signed-off-by: Mark Fasheh commit f7fbfdd1fc91543253ba742a926a29c289f8e6ca Author: Mark Fasheh Date: Wed Sep 13 21:02:29 2006 -0700 ocfs2: Check for refreshing locks in generic unblock function Tidy up the exit path a bit too. Signed-off-by: Mark Fasheh commit b80fc012e03f8f207911b5eafe6916b000e03c8b Author: Mark Fasheh Date: Tue Sep 12 22:08:14 2006 -0700 ocfs2: don't unconditionally pass LVB flags Allow a lock type to specifiy whether it makes use of the LVB. The only type which does this right now is the meta data lock. This should save us some space on network messages since they won't have to needlessly transmit value blocks. Signed-off-by: Mark Fasheh commit aa2623ad80577b37637914e809bafa36994ccdf1 Author: Mark Fasheh Date: Tue Sep 12 21:58:23 2006 -0700 ocfs2: combine inode and generic blocking AST functions There is extremely little difference between the two now. We can remove the callback from ocfs2_lock_res_ops as well. Signed-off-by: Mark Fasheh commit 54a7e7552e484c08db221e49c4519ccdeb8882d0 Author: Mark Fasheh Date: Tue Sep 12 21:49:13 2006 -0700 ocfs2: Add ->get_osb() dlmglue locking operation Will be used to find the ocfs2_super structure from a given lockres. Signed-off-by: Mark Fasheh commit 2a45f2d13e1dd91bc110801f5818379f2699509c Author: Mark Fasheh Date: Tue Sep 12 21:36:58 2006 -0700 ocfs2: remove ->unlock_ast() callback from ocfs2_lock_res_ops This was always defined to the same function in all locks, so clean things up by removing and passing ocfs2_unlock_ast() directly to the DLM. Signed-off-by: Mark Fasheh commit e92d57df273a3a7e57688e1d4f5a894870d550d2 Author: Mark Fasheh Date: Tue Sep 12 21:34:35 2006 -0700 ocfs2: combine inode and generic AST functions There is extremely little difference between the two now. We can remove the callback from ocfs2_lock_res_ops as well. Signed-off-by: Mark Fasheh commit f625c9793b6cc64aeb1b6387039d09019c214352 Author: Mark Fasheh Date: Tue Sep 12 21:24:53 2006 -0700 ocfs2: Clean up lock resource refresh flags Use of the refresh mechanism is lock-type wide, so move knowledge of that to the ocfs2_lock_res_ops structure. Signed-off-by: Mark Fasheh commit 24c19ef40474c3930597f31ae233dc06319bd881 Author: Mark Fasheh Date: Fri Sep 22 17:28:19 2006 -0700 ocfs2: Remove i_generation from inode lock names OCFS2 puts inode meta data in the "lock value block" provided by the DLM. Typically, i_generation is encoded in the lock name so that a deleted inode on and a new one in the same block don't share the same lvb. Unfortunately, that scheme means that the read in ocfs2_read_locked_inode() is potentially thrown away as soon as the meta data lock is taken - we cannot encode the lock name without first knowing i_generation, which requires a disk read. This patch encodes i_generation in the inode meta data lvb, and removes the value from the inode meta data lock name. This way, the read can be covered by a lock, and at the same time we can distinguish between an up to date and a stale LVB. This will help cold-cache stat(2) performance in particular. Since this patch changes the protocol version, we take the opportunity to do a minor re-organization of two of the LVB fields. Signed-off-by: Mark Fasheh commit f9e2d82e6395cfa0802446b54b63cc412089d82c Author: Mark Fasheh Date: Tue Sep 12 15:35:49 2006 -0700 ocfs2: Encode i_generation in the meta data lvb When i_generation is removed from the lockname, this will help us determine whether a meta data lvb has information that is in sync with the local struct inode. Signed-off-by: Mark Fasheh commit 4d3b83f7364269b66cdda271f680bd99e77afd96 Author: Mark Fasheh Date: Tue Sep 12 15:22:18 2006 -0700 ocfs2: Free up some space in the lvb lvb_version doesn't need to be a whole 32 bits. Make it an 8 bit field to free up some space. This should be backwards compatible until we use one of the fields, in which case we'd bump the lvb version anyway. Signed-off-by: Mark Fasheh commit 0027dd5bc213bc639e09dd002a4ab56bd18317c3 Author: Mark Fasheh Date: Thu Sep 21 16:51:28 2006 -0700 ocfs2: Remove special casing for inode creation in ocfs2_dentry_attach_lock() We can't use LKM_LOCAL for new dentry locks because an unlink and subsequent re-create of a name/inode pair may result in the lock still being mastered somewhere in the cluster. Signed-off-by: Mark Fasheh commit 1ba9da2ffa54b56a6346746248bfa38124d499a6 Author: Mark Fasheh Date: Fri Sep 8 14:22:54 2006 -0700 ocfs2: manually d_move() during ocfs2_rename() Make use of FS_RENAME_DOES_D_MOVE to avoid a race condition that can occur during ->rename() if we d_move() outside of the parent directory cluster locks, and another node discovers the new name (created during the rename) and unlinks it. d_move() will unconditionally rehash a dentry - which will leave stale data in the system. Signed-off-by: Mark Fasheh commit 349457ccf2592c14bdf13b6706170ae2e94931b1 Author: Mark Fasheh Date: Fri Sep 8 14:22:21 2006 -0700 [PATCH] Allow file systems to manually d_move() inside of ->rename() Some file systems want to manually d_move() the dentries involved in a rename. We can do this by making use of the FS_ODD_RENAME flag if we just have nfs_rename() unconditionally do the d_move(). While there, we rename the flag to be more descriptive. OCFS2 uses this to protect that part of the rename operation with a cluster lock. Signed-off-by: Mark Fasheh Cc: Trond Myklebust Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit 1390334b4c697b7588d5661fcf6acaeec409cf4c Author: Mark Fasheh Date: Fri Sep 8 14:21:43 2006 -0700 ocfs2: Remove the dentry vote This is unused now. Signed-off-by: Mark Fasheh commit 379dfe9d0db99ed33fb089fcb9c07f5f92566e9e Author: Mark Fasheh Date: Fri Sep 8 14:21:03 2006 -0700 ocfs2: Hook rest of the file system into dentry locking API Actually replace the vote calls with the new dentry operations. Make any necessary adjustments to get the scheme to work. Signed-off-by: Mark Fasheh commit 80c05846f604bab6d61e9732c262420ee9f5f358 Author: Mark Fasheh Date: Fri Sep 8 14:43:18 2006 -0700 ocfs2: Add dentry tracking API Replace the dentry vote mechanism with a cluster lock which covers a set of dentries. This allows us to force d_delete() only on nodes which actually care about an unlink. Every node that does a ->lookup() gets a read only lock on the dentry, until an unlink during which the unlinking node, will request an exclusive lock, forcing the other nodes who care about that dentry to d_delete() it. The effect is that we retain a very lightweight ->d_revalidate(), and at the same time get to make large improvements to the average case performance of the ocfs2 unlink and rename operations. This patch adds the higher level API and the dentry manipulation code. Signed-off-by: Mark Fasheh commit d680efe9d8fe0eb99d9dd063a4def6b362cdb40d Author: Mark Fasheh Date: Fri Sep 8 14:14:34 2006 -0700 ocfs2: Add new cluster lock type Replace the dentry vote mechanism with a cluster lock which covers a set of dentries. This allows us to force d_delete() only on nodes which actually care about an unlink. Every node that does a ->lookup() gets a read only lock on the dentry, until an unlink during which the unlinking node, will request an exclusive lock, forcing the other nodes who care about that dentry to d_delete() it. The effect is that we retain a very lightweight ->d_revalidate(), and at the same time get to make large improvements to the average case performance of the ocfs2 unlink and rename operations. This patch adds the cluster lock type which OCFS2 can attach to dentries. A small number of fs/ocfs2/dcache.c functions are stubbed out so that this change can compile. Signed-off-by: Mark Fasheh commit f0681062b8e369d9fb6f3ce10f4e3fc8cea5f910 Author: Mark Fasheh Date: Fri Sep 8 11:40:10 2006 -0700 ocfs2: Update dlmglue for new dlmlock() API File system lock names are very regular right now, so we really only need to pass an extra parameter to dlmlock(). Signed-off-by: Mark Fasheh commit ea5b3a187e2724fa9d08b2fbd3898c149ed95c6b Author: Mark Fasheh Date: Fri Sep 8 11:39:27 2006 -0700 ocfs2: Update dlmfs for new dlmlock() API We just need to add a namelen field to the user_lock_res structure, and update a few debug prints. Instead of updating all debug prints, I took the opportunity to remove a few that are likely unnecessary these days. Signed-off-by: Mark Fasheh commit 3384f3df5ed939a25135e1b2734fb7cdee1720a8 Author: Mark Fasheh Date: Fri Sep 8 11:38:29 2006 -0700 ocfs2: Allow binary names in the DLM The OCFS2 DLM uses strlen() to determine lock name length, which excludes the possibility of putting binary values in the name string. Fix this by requiring that string length be passed in as a parameter. Signed-off-by: Mark Fasheh commit e2c73698af3dac89328eef2b55f6746e0507d2bc Author: Mark Fasheh Date: Fri Sep 8 11:37:32 2006 -0700 ocfs2: Silence dlm error print An AST can be delivered via the network after a lock has been removed, so no need to print an error when we see that. Signed-off-by: Mark Fasheh commit 00e4d116a7ef94eb910be037912b0b2fc09f608b Author: Gerrit Renker Date: Fri Sep 22 09:33:58 2006 +0100 [DCCP]: Allow default/fallback service code. This has been discussed on dccp@vger and removes the necessity for applications to supply service codes in each and every case. If an application does not want to provide a service code, that's fine, it will be given 0. Otherwise, service codes can be set via socket options as before. This patch has been tested using various client/server configurations (including listening on multiple service codes). Signed-off-by: Gerrit Renker Signed-off-by: Arnaldo Carvalho de Melo commit e18fa700c9a31360bc8f193aa543b7ef7b39a06b Author: Jeff Garzik Date: Sun Sep 24 11:13:19 2006 -0400 Move several *_SUPER_MAGIC symbols to include/linux/magic.h. Signed-off-by: Jeff Garzik commit 2ed6d22cec37d9a3df4c5bacf1160dee7700106e Author: Russell King Date: Sun Sep 24 10:46:43 2006 +0100 [MMC] Don't check READY_FOR_DATA when reading There's no point checking to see if the card is ready to accept data when we're reading from it - sending the command only wastes precious bus bandwidth. Signed-off-by: Russell King commit 42431acbac43eb47c774c29d370f5c59136805bf Author: Russell King Date: Sun Sep 24 10:44:09 2006 +0100 [MMC] MMC_CAP_BYTEBLOCK flag for non-log2 block sizes capable hosts Some MMC hosts can only handle log2 block sizes. Unfortunately, the MMC password support needs to be able to send non-log2 block sizes. Provide a capability so that the MMC password support can decide whether it should use this support or not. The unfortunate side effect of this host limitation is that any MMC card protected by a password which is not a log2 block size can not be accessed on a host which only allows a log2 block size. This change just adds the flag. The MMC password support code needs updating to use it (if and when it is finally submitted.) Signed-off-by: Russell King commit 1b73c4bb063c4aa0cdc25425809bb87f65ee75af Author: James Bottomley Date: Sat Sep 23 22:07:20 2006 -0500 [SCSI] scsi_transport_fc: fixup netlink arguments nlmsg_multicast now takes an extra allocation flag, so add it to the use in the fibre channel transport class. Signed-off-by: James Bottomley commit dfdc58ba354adb80d67c99f7be84f95a8e02e466 Author: James Bottomley Date: Wed Sep 20 12:00:18 2006 -0400 [SCSI] SPI transport class: misc DV fixes Key more of the domain validation settings off the inquiry data from the disk (in particular, don't try IU or DT unless the disk claims to support them. Also add a new dv_in_progress flag to prevent recursive DV. Signed-off-by: James Bottomley commit 6973dddee264723720e18ad2be5a0a454c0f52d9 Author: David S. Miller Date: Sat Sep 23 18:32:38 2006 -0700 [SPARC64]: Update defconfig. Signed-off-by: David S. Miller commit e17ba8f51f69782abc4575dd30848ba5eafaa797 Author: David S. Miller Date: Sat Sep 23 18:31:42 2006 -0700 [SPARC64]: Fix sched_clock() wrapping every ~17 seconds. Unfortunately, sparc64 doesn't have an easy way to do a "64 X 64 --> 128" bit multiply like PowerPC and IA64 do. We were doing a "64 X 64 --> 64" bit multiple which causes overflow very quickly with a 30-bit quotient shift. So use a quotientshift count of 10 instead of 30, just like x86 and ARM do. This also fixes the wrapping of printk timestamp values every ~17 seconds. Signed-off-by: David S. Miller commit a07f353701acae77e023f6270e8af353b37af7c4 Author: Alan Cox Date: Fri Sep 15 15:34:32 2006 +0100 [SCSI] Switch some more scsi drivers to pci_get_device and refcounted pci structures Signed-off-by: Alan Cox Signed-off-by: James Bottomley commit 1a68d41a334a406d4bd35999f0be4d47f193e477 Author: Alan Cox Date: Mon Sep 18 19:18:34 2006 +0100 [SCSI] eata_pio cleanup and PCI fix This started as a PCI reference fixup but to do that I need to build it, to build it I need to fix it and its full of 32bitisms and uglies. It has been resurrected, I'm not sure if this is a thank you for the work on the license stuff or punishment for some unknown misdeed however 8). I've also fixed a memory scribble in the init code. One oddity - the changes from HZ * to constants are deliberate. Whoever originally wrote the code (or cleaned it up) used HZ for a cycle timing loop even though is not HZ related. I've put it back to the counts used in the old days when the driver was most used. Signed-off-by: Alan Cox Signed-off-by: James Bottomley commit 2538363eb51a70948ed36bf3971a728268d10766 Author: Mark Haverkamp Date: Tue Sep 19 09:00:39 2006 -0700 [SCSI] aacraid: README update Received from Mark Salyzyn: This patch to the driver's documentation adds a few new product entries, sorts the entries on OEM lines first for easy searching, followed by product id order to make it easier to compare against the open source pci list. The driver has 'family match' so is somewhat future proof, no code changes are required to recognize the new products. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley commit ac5826ca91243272f97b3f01e80d71e3618f105f Author: Mark Haverkamp Date: Tue Sep 19 09:00:18 2006 -0700 [SCSI] aacraid: remove scsi_remove_device Received from Mark Salyzyn: Until the system is stabilized, I am suggesting the enclosed modification to prevent the driver from tickling the panic. Once sysfs and friends are stabilized, the patch may be backed out. We have yet to evaluate if we really want to relinquish existing Scsi Devices in any case, holding on to them as configuration of arrays comes and goes makes some sense as well. As a result, we have opted to pull the lines rather than comment them in legacy. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley commit 76a7f8fdc0c2381ae1ba55ef71837712223ecb3c Author: Mark Haverkamp Date: Tue Sep 19 09:00:02 2006 -0700 [SCSI] aacraid: merge rx and rkt code Received from Mark Salyzyn: The only real difference between the rkt and rx platform modules is the offset of the message registers. This patch recognizes this similarity and simplifies the driver to reduce it's code footprint and to improve maintainability by reducing the code duplication. Visibly, the 'rkt.c' portion of this patch looks more complicated than it really is. View it as retaining the rkt-only specifics of the interface. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley commit 653ba58d55feb708c6f97e6f3e84901b3a03c9c0 Author: Mark Haverkamp Date: Tue Sep 19 08:59:43 2006 -0700 [SCSI] aacraid: expose physical devices Received from Mark Salyzyn: I am placing this functionality into an insmod parameter. Normally the physical components are exported to sg, and are blocked from showing up in sd. Note that the pass-through I/O path via the driver through the Firmware to the physical disks is not an optimized path, the card is designed for Hardware RAID, elevator sorting and caching. This should not be used as a means for utilizing the aacraid based controllers as a generic scsi/SATA/SAS controller, performance should suck by a few percentage points, any RAID meta-data on the drives will confuse the controller about who owns the drives and there is a high risk of destroying content in both directions. Unreliable and for experimentation or strange controlled circumstances only. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley commit 65101355450df2d935f8d56ac3abef279f28a0e2 Author: Mark Haverkamp Date: Tue Sep 19 08:59:23 2006 -0700 [SCSI] aacraid: misc cleanup Received from Mark Salyzyn: Basically cleanup, nothing here will have an affect. Adjusting some error codes, removing superfluous definitions and code fragments. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley commit 73af07de3e32b9ac328c3d1417258bb98a9b0a9b Author: Herbert Xu Date: Sun Sep 24 09:30:19 2006 +1000 [CRYPTO] hmac: Fix error truncation by unlikely() The error return values are truncated by unlikely so we need to save it first. Thanks to Kyle Moffett for spotting this. Signed-off-by: Herbert Xu Signed-off-by: Linus Torvalds commit 9cbb889786548c1212fb77a9df8d09ed883a3480 Author: Swen Schillig Date: Thu Sep 21 16:29:31 2006 +0200 [SCSI] zfcp: update maintainers file As Andreas stated he will not maintain the zfcp driver anymore. Instead I will take over the responsibility. Signed-off-by: Swen Schillig Signed-off-by: James Bottomley commit 99005e91eb2289c0ff0875257b5d18d9b7cc4eb7 Author: Andreas Herrmann Date: Mon Sep 18 22:32:15 2006 +0200 [SCSI] zfcp: update maintainers file Removed myself as maintainer of the s390 zfcp driver -- I will not maintain it any longer. Signed-off-by: Andreas Herrmann Signed-off-by: James Bottomley commit 8165428610446ea9e6aa9dfa5485ab78e58cc9fc Author: Andreas Herrmann Date: Mon Sep 18 22:30:36 2006 +0200 [SCSI] zfcp: fix: avoid removal of fsf reqs before qdio queues are down Fix the fix ... One of my previous fixes introduced removal of all fsf requests in zfcp's eh_host_reset_handler. But this must not happen before qdio queues are shut down. So, I revert the changes of zfcp_scsi_eh_host_reset_handler. Signed-off-by: Andreas Herrmann Signed-off-by: James Bottomley commit 2abbe866c8eb0296e3f5343bcf73e5371522a738 Author: Andreas Herrmann Date: Mon Sep 18 22:29:56 2006 +0200 [SCSI] zfcp: introduce struct timer_list in struct zfcp_fsf_req This instance will be used whenever a timer is needed for a request by zfcp. Signed-off-by: Andreas Herrmann Signed-off-by: James Bottomley commit 4eff4a36516d72e4f6ede901141214a7e05607e7 Author: Andreas Herrmann Date: Mon Sep 18 22:29:20 2006 +0200 [SCSI] zfcp: fix: use correct req_id in eh_abort_handler zfcp's eh_abort_handler used the wrong request ID to identify the request to be aborted. The bug was introduced with commit fea9d6c7bcd8ff1d60ff74f27ba483b3820b18a3 for improved management of request IDs. The bug is fixed with this patch. Signed-off-by: Andreas Herrmann Signed-off-by: James Bottomley commit dd52e0eaf891cd85bf2ca057c15ed6bfd76db4e6 Author: Heiko Carstens Date: Mon Sep 18 22:28:49 2006 +0200 [SCSI] zfcp: create private slab caches to guarantee proper data alignment Create private slab caches in order to guarantee proper alignment of data structures that get passed to hardware. Sidenote: with this patch slab cache debugging will finally work on s390 (at least no known problems left). Furthermore this patch does some minor cleanups: - store ptr for transport template in struct zfcp_data Signed-off-by: Heiko Carstens Signed-off-by: Andreas Herrmann Compile fix ups and Signed-off-by: James Bottomley commit d136205182b1ea4897da31e325a296f8831a6796 Author: Heiko Carstens Date: Mon Sep 18 22:28:04 2006 +0200 [SCSI] zfcp: remove zfcp_ccw_unregister function Remove unused zfcp_ccw_unregister function (leftover from zfcp's module_exit era). Signed-off-by: Heiko Carstens Signed-off-by: Andreas Herrmann Signed-off-by: James Bottomley commit cf2b5d3fcab77a9390293920ec5b49e67eced200 Author: Doug Ledford Date: Sun Sep 17 07:38:15 2006 +0200 [SCSI] aic7xxx: pause sequencer before touching SBLKCTL Some cards need to pause the sequencer before the SBLKCTL register is touched. This fixes a PCI related oops seen on powerpc macs with this card caused by trying to ascertain the bus signalling before beginning domain validation. Signed-off-by: James Bottomley commit 3e3c60e3a8c7013d55768aa7256bb5a7f66b0bb4 Author: James Bottomley Date: Wed Sep 6 09:04:40 2006 -0500 [SCSI] aic7xxx: avoid checking SBLKCTL register for certain cards For cards that don't support LVD, checking the SBLKCTL register to determine the bus singalling doesn't work. So, check that the card supports LVD first (AHC_ULTRA2) before checking the register. Signed-off-by: James Bottomley commit 231839102b54512ced7d3ee7fc9b8bcf5e3b583b Author: Douglas Gilbert Date: Sat Sep 16 20:30:47 2006 -0400 [SCSI] scsi_debug version 1.80 See http://www.torque.net/sg/sdebug26.html for more information on the scsi_debug driver. ChangeLog: - add 'vpd_use_hostno' parameter to allow simulated hosts to see the same set of targets (and luns). For testing multipath software. - add 'fake_rw' parameter to ignore the data in READ and WRITE commands - add support for log subpages (new in SPC-4) - yield appropriate block descriptor for MODE SENSE commands (only for pdt=0 (i.e. disks)) - REQUEST SENSE response no longer shows the stopped power condition (SAT changed to agree with SPC-3) Signed-off-by: Douglas Gilbert Signed-off-by: James Bottomley commit 79da342c31ea839277060c1d2086aaf3b5cd85a4 Author: Al Viro Date: Sat Sep 23 18:21:35 2006 +0100 [PATCH] more get_property() fallout Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 4ac493b1d5bfd332f3dee64baaa620961bab6cdc Author: Al Viro Date: Sat Sep 23 18:20:56 2006 +0100 [PATCH] briq_panel: read() and write() get __user pointers, damnit annotated, fixed a roothole in ->write(). Dereferencing user-supplied pointer is a Bad Idea(tm)... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 2efc80cb8ddc341d81de996920e3b2ad8a12b1f7 Author: Al Viro Date: Sat Sep 23 16:45:55 2006 +0100 [PATCH] #elif that should've been #elif defined #elif CONFIG_44x in ibm4xx.h should've been #elif defined(CONFIG_44x) Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 13b5aeccc4350e5069c723e8f9becd7208ee02f2 Author: Al Viro Date: Sat Sep 23 16:44:58 2006 +0100 [PATCH] more fallout from get_property returning pointer to const Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit d7b2004528a967f2ba0bf31b1eb0da6a876960e6 Author: Al Viro Date: Sat Sep 23 16:44:16 2006 +0100 [PATCH] missing includes from infiniband merge indirect chains of includes are arch-specific and can't be relied upon... (hell, even attempt to build it for itanic would trigger vmalloc.h ones; err.h triggers on e.g. alpha). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 5f77043f0f7851aa6139fb9a8b297497b540b397 Author: Herbert Xu Date: Sun Sep 24 00:40:41 2006 +1000 [CRYPTO] hmac: Fix hmac_init update call The crypto_hash_update call in hmac_init gave the number 1 instead of the length of the sg list in bytes. This is a missed conversion from the digest => hash change. As tcrypt only tests crypto_hash_digest it didn't catch this. Signed-off-by: Herbert Xu Signed-off-by: Linus Torvalds commit 4c8bd7eeee4c8f157fb61fb64b57500990b42e0e Author: David Miller Date: Fri Sep 22 22:31:36 2006 -0700 [KERNEL] Do not truncate to 'int' in ALIGN() macro. Signed-off-by: David S. Miller Signed-off-by: Linus Torvalds commit 2d2f8d59b14bec6c745e219a350ac51d9e00673f Author: Jesper Juhl Date: Fri Sep 15 14:43:11 2006 +0200 [SCSI] megaraid: Make megaraid_ioctl() check copy_to_user() return value Check copy_to_user() return value in drivers/scsi/megaraid.c::megadev_ioctl() This gets rid of this little warning: drivers/scsi/megaraid.c:3661: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result Signed-off-by: Jesper Juhl Acked-by: "Ju, Seokmann" Signed-off-by: James Bottomley commit 5fcda4224529c4e550c917668d5e96c1d3e7039b Author: James Bottomley Date: Thu Sep 14 17:04:58 2006 -0500 [SCSI] aha152x: remove static host array Fix this driver not to use a static two element host array instead use a list. This should fix panic on multiple eject reinsert of the pcmcia version of this device. Signed-off-by: James Bottomley commit 10d19ae5e1715c27db7009df6d59179774e7b8a1 Author: malahal@us.ibm.com Date: Thu Sep 7 15:12:42 2006 -0700 [SCSI] aic94xx: Fix for a typo in aic94xx_init() Signed-off-by: Malahal Naineni Signed-off-by: James Bottomley commit f2d719c65ad8f10afa7bec11315faa7badf4ecb9 Author: Alexis Bruemmer Date: Thu Sep 7 14:32:16 2006 -0700 [SCSI] aic94xx: Removes Reliance on FLASH Manufacture IDs This patch removes the reliance on FLASH Manufacture IDs for validation. Signed-off-by: Alexis Bruemmer Signed-off-by: James Bottomley commit 08d3ad6a518051bfaefd5d6a8005e20c036996c3 Author: David Woodhouse Date: Sat Sep 23 16:20:48 2006 +0100 [MTD] Whitespace cleanup in SSFDC driver. Says akpm: ' - search for "( " and " )", fix.' Signed-off-by: David Woodhouse commit 3253b669eed7194ae490acb4aadab7262bbfeb8d Author: Stefan Richter Date: Thu Sep 14 22:05:16 2006 +0200 ieee1394: raw1394: arm functions slept in atomic context Sleeping functions like copy_to_user were accessed inside spinlocks in raw1394's arm_register, arm_unregister, arm_get_buf, arm_set_buf. http://bugzilla.kernel.org/show_bug.cgi?id=7120 Signed-off-by: Stefan Richter Tested-by: David Trent (cherry picked from e575953ec17c3f5c1e738847d2d16c241bb99783 commit) commit 9a05eded5d17a425b9d9ed9dd80f518429dde4e8 Author: David Woodhouse Date: Sat Sep 23 10:56:24 2006 +0100 [MTD] SSFDC translation layer minor cleanup Don't include . Don't say 'MB' where you mean 'MiB'. Don't allocate 512 bytes on the stack. Signed-off-by: David Woodhouse commit 892e4fba1cb5cdc70f3acc65e024e541c0b2d559 Author: David Woodhouse Date: Sat Sep 23 10:24:36 2006 +0100 [MTD] Fix dependencies with CONFIG_MTD=m CMDLINEPARTS shouldn't be selectable, and neither should SSFDC, which can be a tristate anyway. Signed-off-by: David Woodhouse commit f0063c4489a00ed5395378ef80a7edea4272f20b Author: Takashi Iwai Date: Fri Sep 22 15:30:42 2006 +0200 [ALSA] intel8x0m - Free irq in suspend Free the irq handler in suspend and reacquire in resume as well as intel8x0 audio driver does. Some devices may change the irq line dynamically during suspend/resume. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 8b0c4149e82170ebc44b96e9ed96545f8ebd7c81 Author: Takashi Iwai Date: Fri Sep 22 15:27:55 2006 +0200 [ALSA] Move CONFIG_SND_AC97_POWER_SAVE to pci/Kconfig Moved the entry of CONFIG_SND_AC97_POWER_SAVE from drivers/Kconfig to more appropriate place, pci/Kconfig. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit fef8a0c03daa1aaf3f83e45da2b14674c073a9f5 Author: Clemens Ladisch Date: Fri Sep 22 11:00:51 2006 +0200 [ALSA] usb-audio: add mixer control names for the Aureon 5.1 MkII Add a mixer name map for the TerraTec Aureon 5.1 MkII USB. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela commit dbf91dd47d90e1d91d5daf37ca30728f4e11c5e3 Author: Clemens Ladisch Date: Fri Sep 22 10:58:40 2006 +0200 [ALSA] ES1938: remove duplicate field initialization Remove the duplicate and inconsistent initialization of the kcontrol access field. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela commit 92b9ac78f934616d08c72747607bfb0fa51ee52d Author: Clemens Ladisch Date: Fri Sep 22 10:57:36 2006 +0200 [ALSA] usb-audio: increase number of packets per URB To decrease the USB interrupts rate, increase both the default and the maximum number of packets per URB. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela commit eb995a8c82dba4a8e027c99ac5001fbc287a115c Author: Takashi Iwai Date: Thu Sep 21 14:28:21 2006 +0200 [ALSA] hda-codec - Fix headphone auto-toggle on sigmatel codec Fix/optimize the headphone auto-toggle function on sigmatel codecs. The headphone pins are kept as output. When headhpones are unplugged, you cannot hear anyway ;) Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 5c79b1f887f8edcd399baa164b66a1c08566c994 Author: Takashi Iwai Date: Thu Sep 21 13:34:13 2006 +0200 [ALSA] hda-intel - A slight cleanup of timeout check in azx_get_response() A slight cleanup of timeout check in azx_get_response() to check jiffies for HZ-independent timeout. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 314634bc81325dcfeb31ed138647d428b1f26cbf Author: Takashi Iwai Date: Thu Sep 21 11:56:18 2006 +0200 [ALSA] hda-codec - Fix mic input with STAC92xx codecs Fixed mic input with STAC92xx codecs. The mic pin was sometimes set to OUTPUT by the headphone jack detection. Also, try to assign a secondary mic as front-mic (or vice versa) in the auto-detection if possible. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 7ffffecc7c4df08ad89723ca32d936ff09b5b3ff Author: Josef 'Jeff' Sipek Date: Thu Sep 21 11:33:42 2006 +0200 [ALSA] mixart: Use SEEK_{SET,CUR,END} instead of hardcoded values mixart: Use SEEK_{SET,CUR,END} instead of hardcoded values Signed-off-by: Josef 'Jeff' Sipek Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit d158da81ee9a1fa70d980f58b0f143fa873ca9ed Author: Josef 'Jeff' Sipek Date: Thu Sep 21 11:33:14 2006 +0200 [ALSA] gus: Use SEEK_{SET,CUR,END} instead of hardcoded values gus: Use SEEK_{SET,CUR,END} instead of hardcoded values Signed-off-by: Josef 'Jeff' Sipek Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit dd47a33806bfe93c08b071c4d26a2390cbbc9e65 Author: Josef 'Jeff' Sipek Date: Thu Sep 21 11:32:43 2006 +0200 [ALSA] opl4: Use SEEK_{SET,CUR,END} instead of hardcoded values opl4: Use SEEK_{SET,CUR,END} instead of hardcoded values Signed-off-by: Josef 'Jeff' Sipek Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit e6f8f108a19638d7c6535ab393a228ed9d4804a6 Author: Josef 'Jeff' Sipek Date: Thu Sep 21 11:31:58 2006 +0200 [ALSA] sound core: Use SEEK_{SET,CUR,END} instead of hardcoded values sound core: Use SEEK_{SET,CUR,END} instead of hardcoded values Signed-off-by: Josef 'Jeff' Sipek Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit eb06ed8f4c2440558ebf465e8baeac6367d90201 Author: Takashi Iwai Date: Wed Sep 20 17:10:27 2006 +0200 [ALSA] hda-codec - Support multiple headphone pins Some machines have multiple headpohne pins (usually on the lpatop and on the docking station) while the current hda-codec driver assumes a single headphone pin. Now it supports multiple hp pins (at least for detection). The sigmatel 92xx code supports this new multiple hp pins. It detects all hp pins for auto-muting, too. Also, the driver checks speaker pins in addition. In some cases, all line-out, speaker and hp-pins coexist. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 33ef765131bcf82bc5fca3f25d8313fa4df93ce0 Author: Nicolas Graziano Date: Tue Sep 19 14:23:14 2006 +0200 [ALSA] hda_intel prefer 24bit instead of 20bit If I understand the hda_intel code, for format > 20bit it only advertise the SNDRV_PCM_FMTBIT_S32_LE format and play it at 32 bit, 20 bit or 24 bit. But if the 20bit and 24bit are available, actually it prefer the 20bit format. This path is to prefer the 24bit format instead of 20bit. Signed-off-by: Nicolas Graziano Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit a922625126cc9bf593d801879a965b9f0eae6958 Author: Takashi Iwai Date: Sun Sep 17 22:05:54 2006 +0200 [ALSA] hda-codec - Add vendor ids for Motorola and Conexant Added string entries for Motorola and Conexant vendor ids. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 5720fddd62367bb44335ec83f6371ce91e9ead12 Author: Takashi Iwai Date: Sun Sep 17 22:04:17 2006 +0200 [ALSA] hda-codec - Add device id for Motorola si3054-compatible codec Added the device id for Motorola si3054-compatible modem codec on a Gateway laptop. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 2b1181ed83ee8b0afbf9ba3e4f789f00375b2a17 Author: Takashi Iwai Date: Sun Sep 17 22:02:22 2006 +0200 [ALSA] Add missing compat ioctls for ALSA control API Added the missing 32bit-compat ioctl entries for ALSA control API (espcially for recent additions of TLV stuff). Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 783eaf4671a4f5a95102aedb5a45e1f8adab945c Author: Takashi Iwai Date: Sun Sep 17 22:00:51 2006 +0200 [ALSA] powermac - Fix Oops when conflicting with aoa driver Fixed Oops when conflictin with aoa driver due to lack of i2c initialization. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 307192065c55dbc70159037c1e3006a9f761192b Author: Johannes Berg Date: Sun Sep 17 21:59:25 2006 +0200 [ALSA] aoa: add locking to tas codec Looks like I completely forgot to do this. This patch adds locking to the tas codec so two userspace programs can't hit the controls at the same time. Tested on my powerbook, but I obviously can't find any problems even without it since it doesn't do SMP. Signed-off-by: Johannes Berg Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 43001c9515cf87935c50e84b3e27b1f3b3776b5d Author: Takashi Iwai Date: Fri Sep 8 12:30:03 2006 +0200 [ALSA] hda-intel - Fix suspend/resume with MSI Fixed suspend/resume with MSI enablement. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 854b66e44260320c21ebe4b8a18e189f2e45b5be Author: Takashi Iwai Date: Fri Sep 8 12:27:38 2006 +0200 [ALSA] ak4xxx - Remove bogus IPGA controls Remove IPGA volume controls and merge the IPGA range to ADC volume controls. These two volumes are not really independent but connected simply in different ranges 0-0x7f and 0x80-max. It doesn't make sense to provide two controls. Since both 0x7f and 0x80 specify 0dB, a hack is needed for IPGA range to skip 0x80 (increment one) for such controls. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 8f88820ee49359ea33af42845456ce9dbf54d39a Author: Liam Girdwood Date: Thu Sep 7 18:07:46 2006 +0200 [ALSA] Fix WM9705 AC97 patch build error This patch fixes a build error (introduced by me) in ac97_patch.c wrt WM9705 touchscreen. o Removed spurious '3D' from character after |= operation (0x3D is ASCII for '=') Signed-off-by: Liam Girdwood Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit e08a007d1041e0bc3df6b855043d8efde91851aa Author: Takashi Iwai Date: Thu Sep 7 17:52:14 2006 +0200 [ALSA] hda-codec - Fix SPDIF device number of ALC codecs Assign the SPDIF always to the secondary device (dev#1) to keep the same configuration. Move the optional capture device to the third device (dev#2). hda_intel now just ignores the NULL entries in the pcm arrays from codecs. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit dafbbb1fdbf103b24d0f7aa645625b6bd558c896 Author: Takashi Iwai Date: Thu Sep 7 12:40:00 2006 +0200 [ALSA] hda-intel - Fix pci_disable_msi() call Fix the order to call pci_disable_msi() to be after free_irq(). (Otherwise pci_disable_msi() bugs you.) Also, added a description of disable_msi option to documentation. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit cd417d4fe89638a2848980cb389b9781d4913173 Author: Takashi Iwai Date: Wed Sep 6 16:03:11 2006 +0200 [ALSA] hda-codec - Add support for LG LW25 laptop Added the support for LG LW25 laptop with ALC880 codec. It's the same codec model as LG LW20 (model=lg-lw). Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 9d19f48cfe2570562c2c6226780a7ca627b0f1f1 Author: Takashi Iwai Date: Wed Sep 6 14:27:46 2006 +0200 [ALSA] Add pcm_class attribute to PCM sysfs entry This patch adds a new attribute, pcm_class, to each PCM sysfs entry. It's useful to detect what kind of PCM stream is, for example, HAL can check whether it's a modem or not. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit a7da6ce564a80952d9c0b210deca5a8cd3474a31 Author: Takashi Iwai Date: Wed Sep 6 14:03:14 2006 +0200 [ALSA] hda-codec - Add independent headphone volume control This patch addes the support of the independent 'Headphone' volume control to the generic codec parser. Some codecs (e.g. Conexant) have separate connections to the headphone and the independent amp adjustment is needed. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 160ea0dc6b86e2c0c4d325c06bf402bfdde7c1c7 Author: Richard Fish Date: Wed Sep 6 13:58:25 2006 +0200 [ALSA] [snd-intel-hda] enable center/LFE speaker on some laptops This patch adds LFE mixer controls for laptops with a stac9200 and a mono speaker pin with amplifier. Signed-off-by: Richard Fish Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 0b59397268ed418e139db3806f7956ffcb18b33d Author: Takashi Iwai Date: Wed Sep 6 13:35:27 2006 +0200 [ALSA] Add dB information to es1938 driver Added the dB information to ESS Solo (es1938) driver. The new compound dB range TLVs are used for non-linear native volume controls. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 55a29af5ed5d914f017e6a7c613a4d7cc34f82d9 Author: Takashi Iwai Date: Wed Sep 6 12:15:34 2006 +0200 [ALSA] Add definition of TLV dB range compound Added the definition of TLV dB range compound. It contains one or more dB-range or linear-volume TLV entries with min/max ranges. Used for volume controls with non-linear curves. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 311e70a4741c736795da082da7290164d9cf3726 Author: Takashi Iwai Date: Wed Sep 6 12:13:37 2006 +0200 [ALSA] hdsp - Fix auto-updating of firmware Fixed the auto-updating of firmware if the breakout box was switched off/on. The firmware binary itself was already cached but it wasn't loaded properly. Also, request_firmware() is issued if the box was with firmware at module loading time but later it's erased. The auto-update is triggered at each PCM action (open, prepare, etc) and at opening proc files. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit ea543f1ee61bbfdf6cac4b79d66c7840d5b00037 Author: Krzysztof Helt Date: Tue Sep 5 20:25:05 2006 +0200 [ALSA] sparc dbri: SMP fixes The dbri driver hangs when used in kernel compiled with SMP support due to inproper locking. The patch fixes it. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 679e28eef835cbd30de78c2f80bf488cba1b7e40 Author: Ville Syrjala Date: Mon Sep 4 12:28:51 2006 +0200 [ALSA] es1968: Fix hw volume Fix maestro2 hardware volume control. Tested on a Dell Inspiron 7000. Signed-off-by: Ville Syrjala Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit bd25b7cae1e763b292f359170e16bccd01c7ee5c Author: Ville Syrjala Date: Mon Sep 4 12:28:24 2006 +0200 [ALSA] ac97: Fix AD1819 volume range AD1819 volume registers can hold extra bits which do not affect the actual volume. Add a res_table to the codec patch to fix the problem. PCM, line and mic volume were tested. Signed-off-by: Ville Syrjala Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 93ed150375187ae7917ed1e3b9b830b9d4065bad Author: Tobin Davis Date: Fri Sep 1 21:03:12 2006 +0200 [ALSA] hda-codec - Add 5 stack audio support for Intel 965 systems This patch renames the 965_2112 function ids to 965_3ST, and adds functional support for 965_5ST (5 stack 7.1 surround). Signed-off-by: Tobin Davis Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 35a49934a7180fd80fb0bb3777d125dd939df50e Author: Takashi Iwai Date: Fri Sep 1 17:09:44 2006 +0200 [ALSA] Add dB scale information to mixart driver Added the dB scale information to mixart driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 2fd53a7e9b1392f9cc3002a24f3c13b2796e70c3 Author: Andreas Schwab Date: Fri Sep 1 17:15:36 2006 +0200 [ALSA] [PPC,SOUND] Fix audio gpio state detection When booting with line out or headphone plugged, you won't hear anything. The problem is that after reset all channels are muted, but the actual value of the gpio port doesn't exactly match the active_val settings as expected by check_audio_gpio. For example, the line_mute port is set to 7, but check_audio_gpio would expect 0xd or 0xf, thus its return value indicates that it is not active, even though it is. AFAICS only looking at the low bit is enough to determine whether the port is active. Signed-off-by: Andreas Schwab Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 927fc866025857c109219d4ed62d8c3cbc02713a Author: Pavel Machek Date: Thu Aug 31 17:03:43 2006 +0200 [ALSA] sound/pci/hda/intel_hda: small cleanups Cleanup whitespace. Signed-off-by: Pavel Machek Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 929861c669a443cf667ec0d80ac73a567ed4543c Author: Takashi Iwai Date: Thu Aug 31 16:55:40 2006 +0200 [ALSA] hda-intel - Remove volatile Removed volatile from the position buffer pointer. Also, use synchronize_irq() instead of unreliable msleep(1) in the driver remove callback. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit f640c3205aca4fe231beccc9e719c946cf3fee7a Author: Takashi Iwai Date: Wed Aug 30 16:57:37 2006 +0200 [ALSA] Add dB scale information to ice1724 driver Added the dB scale information to each board support code of ice1724 driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 680ef792a1afdb3bf38e4a0296cce996a5b95317 Author: Takashi Iwai Date: Wed Aug 30 16:56:30 2006 +0200 [ALSA] Add dB scale information to ice1712 driver Added the dB scale information for native digital volumes of ice1712 driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 723b2b0d36fa7cea81a962af2d40d88520d5a5f1 Author: Takashi Iwai Date: Wed Aug 30 16:49:54 2006 +0200 [ALSA] Clean up and add TLV support to AK4xxx i2c driver - Clean up the code in AK4xxx-ADDA i2c code. - Fix capture gain controls for AK5365 - Changed the static table for DAC/ADC mixer labels to use structs - Implemented TLV entries for each AK codec The volumes in AK4524, AK4528 and AK5365 are corrected with a table to be suitable for dB conversion. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit d0ae48471570c680333cbe28c143bbab887a4ec2 Author: Takashi Iwai Date: Tue Aug 29 18:15:15 2006 +0200 [ALSA] Add missing dB scale information to vxpocket driver Added the missing dB scale information for Mic volume to vxpocket driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit a79eee8d3d8a80c37d235e1181d67c3705c7bbfe Author: Luke Ross Date: Tue Aug 29 10:46:32 2006 +0200 [ALSA] Support for non-standard rates in USB audio driver There's at least one USB audio chipset out there which supports only one non-standard rate (ID 0e6a:0310 supports 46875Hz). There's a few other patches for this card which are unsatisfactory because they attempt to map this rate to 44.1k leading to sound distortion. The patch below uses SNDRV_PCM_RATE_KNOT to properly support the non-standard rates where they are available. Signed-off-by: Luke Ross Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 9f458e7fb5b92385d348fb6039ba7211a6d6ba6e Author: Andrey Liakhovets Date: Mon Aug 28 16:52:41 2006 +0200 [ALSA] ac97 - Fix VIA EPIA sound problem Fix the bad sound quality on VIA EPIA system using VIA VT1617A (ALSA bug#2381). Signed-off-by: Andrey Liakhovets Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 33925186d843e7004288cd3d87843c5a1dbf55a4 Author: Takashi Iwai Date: Mon Aug 28 13:29:42 2006 +0200 [ALSA] ymfpci - Add TLV entries for native volume controls Added the linear volume TLV entries for YMFPCI native volume controls. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 063a40d9111ce7558f2fdfa4f85acfc47eb27353 Author: Takashi Iwai Date: Mon Aug 28 13:20:13 2006 +0200 [ALSA] Add the definition of linear volume TLV Added the definition of linear volume TLV type. Some DSP chips and codecs (e.g. AK codec) use linear volume control. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 1f14d167f0233342eab53bb1a429ddad1e848de4 Author: Krzysztof Helt Date: Mon Aug 28 13:01:31 2006 +0200 [ALSA] sparc dbri: OSS layer fix This patch removes setting of incorrect stop_threshold value inside the driver. After the change, playback through the OSS layer works correctly. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 99dabfe716002c54b4dffa545460dc74bc632c22 Author: Krzysztof Helt Date: Mon Aug 28 13:00:45 2006 +0200 [ALSA] dbri sparc: fixes TS leak This patch fixes time slot leak in the dbri driver. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit aaad3653a5f073ce9eaef4efd387cf7fc3a53d18 Author: Krzysztof Helt Date: Mon Aug 28 12:59:23 2006 +0200 [ALSA] sparc dbri: recording is back This patch fixes sound recording after the driver convertion to ring buffered version. It also contains small clean ups to the driver. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 2c7782b420ee137057eeec7c24a565ac85fc1988 Author: Takashi Iwai Date: Fri Aug 25 13:11:26 2006 +0200 [ALSA] hda-codec - Use model=ref for some Dell laptops Force to choose model=ref for some Dell laptops with STAC9200 codec chip for fixing the silent mic recording problem (possibly due to a BIOS bug). Reference: ALSA bug#2038 So far, applied to Inspiron 630m, Latitude D620 and 120L. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 18c1c3f694105ab2a6f43e054e23f9a751b2f869 Author: Takashi Iwai Date: Fri Aug 25 11:39:34 2006 +0200 [ALSA] Return error if no user TLV is defined Retrun error to user TLV_READ ioctl if no TLV is defined. (Until now, nothing was written and rerunred successfully.) Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 86148e84c218e49b54521e8dae7bb78eb66c4281 Author: Takashi Iwai Date: Thu Aug 24 12:36:36 2006 +0200 [ALSA] Fix errors with user TLV_WRITE Fixed the errors at checking info.access field during user TLV_WRITE call. It should have been zero-initialized. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 1186ed8c7dc9c0185e783beddf241509cc224f1a Author: Takashi Iwai Date: Wed Aug 23 19:53:28 2006 +0200 [ALSA] Add dB scale information to vxpocket and vx222 drivers Added the dB scale information to vxpocket and vx222 drivers. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit c6ff77f71fe692fa48fe02dbfe74a01f3d5e55e2 Author: Takashi Iwai Date: Wed Aug 23 19:53:02 2006 +0200 [ALSA] Add dB scale information to pcxhr driver Added the dB scale information to pcxhr driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 3479307f8ca3cbf4181b8bf7d8c824156a9e63b7 Author: Jochen Voss Date: Wed Aug 23 18:35:35 2006 +0200 [ALSA] Fix volume control for the AK4358 DAC Fix volume control for the AK4358 DAC. The attenuation control registers of the AK4358 use only 7bit for the volume, the msb is used to enable attenuation output. Without this patch there are 256 volume levels the lower 128 of which are mute. Signed-off-by: Jochen Voss Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 071c73ad5fce436ee00c9422b7ca0c5d629451fb Author: Takashi Iwai Date: Wed Aug 23 18:34:06 2006 +0200 [ALSA] hda-codec - Fix mic capture with generic parser Fixed the mic capture with generic parser of hda-codec driver - Use VREF80 for mic pins if available - Handle multiple inputs correctly on audio-input widget node. Confirmed on a conexant codec chip. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 11b44bbde52b6c50ed8c9ba579d7ee9ff5b48cd8 Author: Richard Fish Date: Wed Aug 23 18:31:34 2006 +0200 [ALSA] hda-codec - restore HDA sigmatel pin configs on resume This patch restores the Intel HDA Sigmatel codec pin configuration on resume. Most of it is dedicated to saving the BIOS pin configuration if necessary, so that even unrecognized chips can be resumed correctly. Signed-off-by: Richard Fish Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 6d8590650eb81d2c869c7adf4b469071cec11eee Author: Guillaume Munch Date: Tue Aug 22 17:15:47 2006 +0200 [ALSA] hda-codec - Support for SigmaTel 9872 - AR11M and AR11S uses the same chip hence we claim to support the AR Series. - Added commentary about STAC9225s which shares the same id as CXD9872RD. - Added entry for 7662 but won't work automatically until pci_subdevice is known. - 'vaio' model now corresponds to CXD9872RD_VAIO for backward compat. - Replaced STAC766x_VAIO with CXD9872RD_VAIO, STAC9872AK_VAIO, STAC9872K_VAIO and CXD9872AKD_VAIO - Added 'vaio-ar' model for potential future modifications. Signed-off-by: Guillaume Munch Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 7b89190cf6ecd5075c272b4ec12f65a4ce45a762 Author: Magnus Sandin Date: Tue Aug 22 13:33:12 2006 +0200 [ALSA] ac97 - Enable S/PDIF on ASUS P5P800-VM mobo The attached patch will force building the S/PDIF controls on the PCU SSID for Asus P5P800-VM motherboard, even if the AC97_EI_SPDIF bit is not set. Signed-off-by: Magnus Sandin Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit bab282b912baf372d8f705357946ef691b621899 Author: Vladimir Avdonin Date: Tue Aug 22 13:31:58 2006 +0200 [ALSA] hda-codec - Fix for Acer laptops with ALC883 codec Patch enables the internal speaker on acer laptops with ALC883. Signed-off-by: Vladimir Avdonin Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit a1c7a7d890634eaec106e5fb3a7d9c92b8f85b0d Author: Takashi Iwai Date: Tue Aug 22 13:16:39 2006 +0200 [ALSA] Add dB scale information to opl3sa2 driver Added the dB scale information to opl3sa2 driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit eac06a10d2b814dfacc36a8fff35ef07bf4eec8e Author: Takashi Iwai Date: Tue Aug 22 13:16:25 2006 +0200 [ALSA] Add dB scale information to ad1848 driver Added the dB scale information to ad1848 driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 0e7febf15851fb438b9518654340d1f704d202e5 Author: Takashi Iwai Date: Tue Aug 22 13:16:01 2006 +0200 [ALSA] Add dB scale information to ad1816a driver Added the dB scale information to ad1816a driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit fb567a8e4f077b7b084c0558706339c35a4fb186 Author: Takashi Iwai Date: Wed Aug 23 13:07:19 2006 +0200 [ALSA] Add dB scale information to dummy driver Added the dB scale information to dummy driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit a0aef8edfc9d6d682dba557fe42599297cbc329a Author: Takashi Iwai Date: Wed Aug 23 13:01:37 2006 +0200 [ALSA] Add dB scale information to trident driver Added the dB scale information to trident driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 666c70ffd1c4be795de988f26a8ab13524d4ed47 Author: Takashi Iwai Date: Wed Aug 23 12:32:06 2006 +0200 [ALSA] Add dB scale information to fm801 driver Added the dB scale information to fm801 driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 9f6ab25063f04597e02968ae8393e8f4703c1563 Author: Takashi Iwai Date: Wed Aug 23 12:14:25 2006 +0200 [ALSA] Add dB scale information to cs4281 driver Added the dB scale information to cs4281 driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 9107226d2ca8a15534da96313a1d370fb1eb8f9e Author: Takashi Iwai Date: Wed Aug 23 12:04:34 2006 +0200 [ALSA] Add dB scale information to ak4531 codec Added the dB scale information to ak4531 codec driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 7058c042001e111c601e1b031d9bcb8b5d392b74 Author: Takashi Iwai Date: Mon Aug 21 18:44:54 2006 +0200 [ALSA] Added TLV support to VIA82xx driver Added the TLV support to VIA82xx driver for addition of dB range information. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 2f3482fbbd5dac7d0e86fe5b7ac5c1e51d52b084 Author: Takashi Iwai Date: Mon Aug 21 18:44:31 2006 +0200 [ALSA] Add TLV support to AC97 codec driver Added the TLV support to AC97 codec driver for addition of dB range information. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 7376d013fc6d3a45d748e0ce758ca9412b01b9dd Author: Stephen Hemminger Date: Mon Aug 21 19:17:46 2006 +0200 [ALSA] intel_hda: MSI support Simple patch to enable Message Signalled Interrupts for the HDA Intel audio controller. Tested with: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03) MSI is better because it means audio doesn't end up sharing IRQ with USB. Signed-off-by: Stephen Hemminger Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 93f09c4cc111506db2ffa6220b7a3d7f73e41aa3 Author: Adrian Bunk Date: Mon Aug 21 19:22:45 2006 +0200 [ALSA] make sound/pci/emu10k1/emu10k1.c:snd_emu10k1_resume() static This patch makes the needlessly global snd_emu10k1_resume() static. Signed-off-by: Adrian Bunk Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit ab93c7ae54a81bcecb77608ca89eea140f1d45ad Author: Krzysztof Helt Date: Wed Aug 23 11:37:36 2006 +0200 [ALSA] sparc dbri: hardware constrains added This patch adds ALSA hardware constrains so stereo is possible only with 16-bit format. It contains small cleanups to ring buffered code as well. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 1be54c824be9b5e163cd83dabdf0ad3ac81c72a8 Author: Krzysztof Helt Date: Mon Aug 21 19:30:57 2006 +0200 [ALSA] sparc dbri: ring buffered version It is a complete rework of low level layer to work on ring buffers for comands and data descriptors. This removes annoying noise due to delay in data buffer switching. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 294a30dc8cf13c492913f2ed3a6540bdf6e84e39 Author: Krzysztof Helt Date: Mon Aug 21 19:29:59 2006 +0200 [ALSA] sparc dbri: simplifed linking time slot function A simplified routines to link and unlink time slots. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit d1fdf07e22efdb9fa53739c0f0fec1f6b24c2056 Author: Krzysztof Helt Date: Mon Aug 21 19:29:18 2006 +0200 [ALSA] sparc dbri: fixed setting of burst size after reset A proper way to set DBRI's burst size. The size must be set after each chip reset. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 470f1f1a1c2597fab98339ab0966dbf602d604f0 Author: Krzysztof Helt Date: Mon Aug 21 19:28:16 2006 +0200 [ALSA] sparc dbri: more driver cleanup A general clean up and redudant code removal. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit c27354460b1e0cbcd9dfc9232a76bd56c46dce89 Author: Krzysztof Helt Date: Mon Aug 21 19:27:35 2006 +0200 [ALSA] sparc dbri: removal of dri_desc struct The structure is in big part redudant. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit e96224ae974844d3f4e84f927ca4b17f1a2079a3 Author: Takashi Iwai Date: Mon Aug 21 17:57:44 2006 +0200 [ALSA] hda-intel - Switch to polling mode for CORB/RIRB communication Automatically switch to polling mode for CORB/RIRB communication if the irq-driven mode seems not working well. If the polling mode still doesn't work, switch to single_cmd mode as fallback. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 81d3dbde76eedcd3ede8a73eb72790d67fa254a9 Author: Tobin Davis Date: Tue Aug 22 19:44:45 2006 +0200 [ALSA] hda-codec - Add support for new Intel boards with Stac9227 codec This patch adds full 5.1 audio support for Intel boards with the SigmaTel 9227 codec chip (946, 963, 965 series). Signed-off-by: Tobin Davis Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 948a4db217235ba51c41d8e7c2ffcf9432e57274 Author: Tobin Davis Date: Tue Aug 22 19:43:46 2006 +0200 [ALSA] hda-codec - add missing device ids for Intel 945 boards This patch adds missing device ids for Intel 945 motherboards. Signed-off-by: Tobin Davis Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 79cf0d376fbf1cdf8e9c7c70c3a7c7434a716879 Author: Takashi Iwai Date: Tue Aug 22 16:35:19 2006 +0200 [ALSA] Fix missing selection of CONFIG_VIDEO_DEV from SND_FM801_TEA575X Fixed the missing selection of CONFIG_VIDEO_DEV from SND_FM801_TEA575X. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 68a6abd97f8b9aa072e36b1901531e7bb69b6efc Author: Tobin Davis Date: Mon Aug 21 19:02:10 2006 +0200 [ALSA] hda-codec - Fix headphone output for some Intel 945 systems This patch enables headphone output at initialization for Intel 945 based systems that don't have proper detection circuitry. Signed-off-by: Tobin Davis Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 2aaeee8bd1cf51b6ed7c751a8472cb77f3ddc642 Author: Tobin Davis Date: Mon Aug 21 19:01:12 2006 +0200 [ALSA] hda-codec - add missing device ids This patch adds missing device ids for Intel 915 and D102GGC motherboards. Signed-off-by: Tobin Davis Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit adf75dcab1deb9625538f74906508c1f6136fd98 Author: Clemens Ladisch Date: Fri Aug 18 09:03:45 2006 +0200 [ALSA] riptide: fix compile errors with older gcc Change the syntax of a union initialization that is not understood by gcc 2.x. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela commit c256652466127872f1b2e510431dc25524ba40ba Author: Takashi Iwai Date: Thu Aug 17 18:21:36 2006 +0200 [ALSA] Add missing TLV callbacks for HD-audio codecs Added missing TLV callbacks for HD-audio codec supports. Also cleaned up the tlv callback for ad1986a (no mutex is needed there). Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit e05d696424f21b59eccff35d04938f0d6588cd94 Author: Takashi Iwai Date: Thu Aug 17 17:12:19 2006 +0200 [ALSA] Fix some typos in snd-dummy driver Fixed some typos in snd-dummy driver. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 16727d94adf9a1376775fd34d982778c7f3506df Author: Krzysztof Helt Date: Thu Aug 17 16:59:28 2006 +0200 [ALSA] sparc dbri: removal of redudant volatile keywords It removes redudant volatile keywords. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 5fc3a2b250716b34ca7c0128475bbedf795f1ac2 Author: Krzysztof Helt Date: Thu Aug 17 16:58:45 2006 +0200 [ALSA] sparc dbri: removal of unused struct members It removes unused or rarely used members of defined structures. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 7cf0a95310f21f3c986288a483801b1d5694dee1 Author: Takashi Iwai Date: Thu Aug 17 16:23:07 2006 +0200 [ALSA] Fix compile errors with older gcc Fixed compile errors with older gcc for initialization of a union. sound/pci/ca0106/ca0106_mixer.c: At top level: sound/pci/ca0106/ca0106_mixer.c:499: unknown field 'p' specified in initializer sound/pci/ca0106/ca0106_mixer.c:499: warning: missing braces around initializer sound/pci/ca0106/ca0106_mixer.c:499: warning: (near initialization for 'snd_ca0106_volume_ctls[0].tlv') Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 99ccc560b73ff7381153dc1391d18391373931d3 Author: Guillaume Munch Date: Wed Aug 16 19:35:12 2006 +0200 [ALSA] Add support for Sony Vaio AR 11B This patch adds automatic detection for Sigmatel ID 7664, the sound chip in Sony Vaio AR 11B (european name). - patch_stac7661 becomes patch_stac766x - .id = 0x83847664 is added Signed-off-by: Guillaume Munch Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit d244bf897b2e7933112067ec8d8dc1d47b86145f Author: Magnus Sandin Date: Wed Aug 16 15:25:23 2006 +0200 [ALSA] Fix for LG K1 Express Laptop Attached is the patch for the LG K1 Express (K1-2333V) laptop that enables sound output. Signed-off-by: Magnus Sandin Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 80b556f26b3830ad5bd6ff9f701675ac8afcb263 Author: Alexey Dobriyan Date: Wed Aug 16 12:56:53 2006 +0200 [ALSA] emu10k1x: simplify around pci_register_driver() Report errors to modprobe as side effect. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 5e4968e24ced93b7b130e7e1fc947a79f82776bf Author: Tobias Klauser Date: Wed Aug 16 12:56:16 2006 +0200 [ALSA] sound/pci/fm801: Use ARRAY_SIZE macro Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 6fb982803522bc86ca61774c6edf317f77165453 Author: Krzysztof Helt Date: Wed Aug 16 12:54:29 2006 +0200 [ALSA] sparc dbri removal of DBRI_NO_INTS This patch removes define DBR_NO_INTS and all code related to handling more than one dbri irq statuses block. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 42fe7647911d0bcaf81aac46db73a3b24387df6d Author: Krzysztof Helt Date: Wed Aug 16 12:53:34 2006 +0200 [ALSA] dbri driver cleanup This is a small clean up of the dbri driver for sparc machines. It contains also a fix to DBRI interrupt queue initialization. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit fe25befde9723ba7d921c100bf00d7643323e5a7 Author: Jaroslav Kysela Date: Tue Aug 15 14:39:07 2006 +0200 [ALSA] ice1712 - fix 1600->16000Hz value typo Signed-off-by: Jaroslav Kysela commit 22309c3e0c8911865cad0aa94f53a9afadaad7ee Author: Takashi Iwai Date: Wed Aug 9 16:57:28 2006 +0200 [ALSA] Added model for Uniwill laptop with ALC861 Added a new model 'uniwill-m31' for Uniwill laptops with ALC861 codec chip. The patch is taken from ALSA bug#2035, and modifeid. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit f24e9f586b377749dff37554696cf3a105540c94 Author: Takashi Iwai Date: Wed Aug 9 14:51:14 2006 +0200 [ALSA] Select I2C and I2C_POWERMAC in aoa/codecs/Kconfig Added the missing selection of I2C and I2C_POWERMAC for Onyx and TAS codecs in aoa/codecs/Kconfig. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit cf93907b98c82c2157e5bbe766bee8f1c5bb87b2 Author: Takashi Iwai Date: Wed Aug 9 14:33:27 2006 +0200 [ALSA] Fix compile warnings in ak4xxx-adda.c Fixed compile warnings in ak4xxx-adda.c reagarding missing enum cases in switch. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 30ba6e207a915a6c70f22ccb3f9169d1cce88466 Author: Jochen Voss Date: Wed Aug 9 14:26:26 2006 +0200 [ALSA] Revolution 5.1 - complete the AK5365 support Complete the AK5365 support. This adds a boolean control to toggle the soft mute feature of the AK5365 chip. Signed-off-by: Jochen Voss Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 96d9e9347c9c5ca980bef22b4add7d437d79034f Author: Jochen Voss Date: Tue Aug 8 21:13:42 2006 +0200 [ALSA] Revolution 5.1 - register the AK5365 ADC with ALSA Enable capture support for the M-Audio Revolution 5.1 card, by registering the ADC with ALSA. Signed-off-by: Jochen Voss Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 683fe1537e660c322c8af953773921e814791193 Author: Jochen Voss Date: Tue Aug 8 21:12:44 2006 +0200 [ALSA] Revolution 5.1 - add AK5365 ADC support Add support for the AK5365 ADC. Signed-off-by: Jochen Voss Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit f5a5ffad072ec3c1fd636174c30f0ba52fe0259f Author: Danny Tholen Date: Tue Aug 8 18:59:07 2006 +0200 [ALSA] [snd-hda-intel] fix sound on some Asus W6A chips This patch adds support in ALSA snd-hda-intel driver for Asus W6A motherboard as reported in MDV Bugzilla #19962 (see http://qa.mandriva.com/show_bug.cgi?id=19962) Signed-off-by: Danny Tholen Signed-off-by: Thomas Backlund Signed-off-by: Thierry Vignaud Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 25b6c43b3d6258f3e87244eeb2b9347dc5e83c40 Author: Takashi Iwai Date: Tue Aug 8 13:01:14 2006 +0200 [ALSA] Fix the preselected model for HP machine Fixed the preselected model for a HP machine with SSID 103c:3010 to use hp-3013 (ALSA bug#2157). Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 727f317a10da74b4e5c6d968bbba07767bfea794 Author: Takashi Iwai Date: Fri Aug 4 19:08:03 2006 +0200 [ALSA] usb-audio - Fix a typo of CONFIG_PROC_FS Fixed a typo of CONFIG_PROC_FS in usbaudio.c. The stream proc file appears again. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 2529bba7606b23c1b7161d3c2ad486162e8650f9 Author: Takashi Iwai Date: Fri Aug 4 12:57:19 2006 +0200 [ALSA] Fix substream selection in PCM and rawmidi The PCM and rawmidi substreams can be selected explicitly by opening control handle and set via *_PREFER_SUBDEVICE ioctl. But, when multiple controls are opened, the driver gets confused. The patch fixes the initialization of prefer_*_subdevice and the check of multiple controls. The first set subdevice is picked up as the valid one. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit f03d68fe343d70bb06ecdb3d70dcf0e678ed99f9 Author: Dmitry Torokhov Date: Thu Aug 3 15:06:14 2006 +0200 [ALSA] ppc-beep - handle errors from input_register_device() ppc-beep: handle errors from input_register_device() (Also fixed the wrong memory release in the error path.) Signed-off-by: Dmitry Torokhov Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 548a648b98318e4b843b636dd2c7f42377e19a00 Author: Takashi Iwai Date: Mon Jul 31 16:51:51 2006 +0200 [ALSA] Fix control/status mmap with shared PCM substream The flag to avoid 32bit-incompatible mmap for control/status records should be outside the pcm substream instance since a substream can be shared among multiple opens. Now it's flagged in pcm_file list that is directly assigned to file->private_data. Also, removed snd_pcm_add_file() and remove_file() functions and substream.files field that are not really used in the code. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 1c3985580445ef9225c1ea7714d6d963f7626eeb Author: Ondrej Zary Date: Mon Jul 31 12:51:57 2006 +0200 [ALSA] es18xx - Add PnP BIOS support This patch adds PnP BIOS support to es18xx driver. It allows ESS ES18xx sound chips integrated in some notebooks (such as DTK FortisPro TOP-5A) that don't appear as ISA cards (they aren't recognized by ISA PnP, only by PnP BIOS) to 'just work' automatically. Signed-off-by: Ondrej Zary Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit f3302a59cf6961712658db63b66ea5902c17d5e1 Author: Matt Porter Date: Mon Jul 31 12:49:34 2006 +0200 [ALSA] hda: sigmatel 9205 family support Adds support for the '9205 family' which includes some other part numbers but 9205 is the first one. These are 4 channel codecs, some have digital mic capability. Support for the digital mic feature will come later. Signed-off-by: Matt Porter Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 7012b2dac71988f61b520b33c70c63be372b5994 Author: James Courtier-Dutton Date: Fri Jul 28 22:27:56 2006 +0100 [ALSA] snd-emu10k1: Add a comment explaining the conversion function for dB gain. Signed-off-by: James Courtier-Dutton Signed-off-by: Jaroslav Kysela commit 4e195a7b78618c89b06547f3140e67a69ec23272 Author: Takashi Iwai Date: Fri Jul 28 14:47:34 2006 +0200 [ALSA] Fix noisy output with shared channel mode with hd-audio - Fix the wrong initialization of num_dacs when changing the channel mode between 2 and multi-channel modes. It must be evaluated after calling snd_hda_ch_mode_put() - Added the similar check of num_dacs fix in Realtek code. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 35aec4e2affb99d52b4b744ddb09767eb6e05580 Author: Takashi Iwai Date: Fri Jul 28 14:44:31 2006 +0200 [ALSA] Don't set up the same PID twice in snd_hda_multi_out_analog_prepare Check the hp_nid whether it's identical with front pin to avoid the setup of the same widget node twice. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 4b146cb087b4a668511f6c991da1dc40e2e04b0d Author: Takashi Iwai Date: Fri Jul 28 14:42:36 2006 +0200 [ALSA] Misc fixes for Realtek HD-audio codecs - Added model=arima for Arima W820Di1 with ALC882 codec chip - Added EAPD-control verbs to TCL S700 init verbs - Added missing model strings for Realtek codecs (to be specified via module option explicitly for testing/debugging) Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 68ab801e32bbe2caac8b8c6e6e94f41fe7d687ad Author: Matthias Koenig Date: Thu Jul 27 16:59:23 2006 +0200 [ALSA] Add snd-mts64 driver for ESI Miditerminal 4140 Added snd-mts64 driver for Ego Systems (ESI) Miditerminal 4140 by Matthias Koenig . The driver requires parport (CONFIG_PARPORT). Signed-off-by: Matthias Koenig Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 9265d199616630c2eb993ffe40c9daef3d6873b3 Author: Takashi Iwai Date: Thu Jul 27 15:50:14 2006 +0200 [ALSA] Fix Makefile of cs5535audio Use ifeq instead of ifdef in Makefile to make the maintenance of out-of-kernel tree easier. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit bc6c531eb53de8a0ba355f76ce2bd28f58e46707 Author: Jaroslav Kysela Date: Thu Jul 27 10:44:30 2006 +0200 [ALSA] HDA driver - do not set mute flag for dB scale (follow HDA specification) Signed-off-by: Jaroslav Kysela commit b7c6b03405896bc181e1e2c9c06628c3b1681af5 Author: Takashi Iwai Date: Tue Jul 25 15:29:37 2006 +0200 [ALSA] via82xx - Add dxs_support entry for a FSC machine Added dxs_support=5 entry for a FSC machine. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 827a56ea3d9c3d5f80c5520ba9d487f9b7069238 Author: Takashi Iwai Date: Tue Jul 25 14:51:16 2006 +0200 [ALSA] Added model for ASUS M2NPV-VM mobo Added the proper model (3stack) for ASUS M2NPV-VM mobo with AD1986A codec. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 304dcaac91f0d26543b31fd7e63726f096c826ee Author: Takashi Iwai Date: Tue Jul 25 14:51:16 2006 +0200 [ALSA] Add support of Benq laptop with ALC262 Added the support of Benq laptop with ALC262 codec. A model string 'benq' is added, too. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 6d177ba7839dd7ed391c2f36b121eb09d1eaee4c Author: Takashi Iwai Date: Tue Jul 25 14:51:15 2006 +0200 [ALSA] Add hp-bpc model type for HP laptops Added 'hp-bpc' model type for HP xw4400-compatible laptops. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 5a053d012d0576e9306009939ca81a86547ef35a Author: Takashi Iwai Date: Tue Jul 25 14:51:15 2006 +0200 [ALSA] Add model entry for Clevo m665n laptop Added the proper model entry for Clevo m665n laptop with ALC880 codec. Also, added a model string 'clevo' to enable the clevo-type model option. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 0a197f005a27766f5c9e0d960e7650748ec1ee4f Author: Takashi Iwai Date: Tue Jul 25 14:51:14 2006 +0200 [ALSA] Add model entry for Samsung X10 laptop Added the proper model entry (laptop-eapd) for Samsung X10-T2300 Culesa laptop with AD1986A codec. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 31508f83f591dc8764427b6321c89f8f9e84bad2 Author: James Courtier-Dutton Date: Sat Jul 22 17:02:10 2006 +0100 [ALSA] snd-emu10k1: Implement dB gain infomation. Signed-off-by: James Courtier-Dutton Signed-off-by: Jaroslav Kysela commit fff36e472b4315df77513f4339c5c199c6aad28b Author: James Courtier-Dutton Date: Sat Jul 22 15:02:48 2006 +0100 [ALSA] snd-ca0106: Fix dB gain TLVs. Signed-off-by: James Courtier-Dutton Signed-off-by: Jaroslav Kysela commit f1265391ea002a28933dc1a8a55948c0ed64c9d0 Author: Clemens Ladisch Date: Fri Jul 21 10:46:18 2006 +0200 [ALSA] usb-audio: add more Yamaha devices Add some quirks for some unknown Yamaha USB MIDI devices. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela commit 6e9059b05fa733045d7845ac70c5ba0a05e3c2d1 Author: Clemens Ladisch Date: Fri Jul 21 10:45:19 2006 +0200 [ALSA] system timer: remove unused snd_timer_system_private.timer field Remove the snd_timer_system_private structure's timer field that was never used. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela commit cd93fe4770ca607c7f39260c02941deccbd77b8b Author: Clemens Ladisch Date: Mon Jul 17 16:53:57 2006 +0200 [ALSA] timer: fix timer rescheduling When checking whether a hardware timer needs to be rescheduled, we have to compare against the previously scheduled interval and not against the actual interval between the last two interrupts. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela commit de2696d8bc9c81874b3743e0c27708760cb7fb52 Author: Clemens Ladisch Date: Mon Jul 17 16:52:09 2006 +0200 [ALSA] system timer: clear correction value when timer stops Do not retain the old correction value when the timer was stopped. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela commit 6ed5eff025b72cb84a884d4be05f854f13b1542f Author: Clemens Ladisch Date: Mon Jul 17 16:51:37 2006 +0200 [ALSA] system timer: accumulate correction for multiple lost ticks When multiple timer interrupts arrive too late, correct for all delays instead of ignoring the earlier ones. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela commit 17f48ec3f15ddb8080b151304ee887c68f7e4650 Author: Clemens Ladisch Date: Mon Jul 17 16:50:56 2006 +0200 [ALSA] system timer: fix lost ticks correction adjustment Fix the adjustment of the lost ticks correction variable in the case when the correction has been fully taken into account in the next timer expiration value. Subtracting the scheduled ticks value would result in an underflow. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela commit 7bc5ba7e02f63a5732fdf99e7471f54738f6f918 Author: Takashi Iwai Date: Fri Jul 14 15:18:19 2006 +0200 [ALSA] Add TLV support to snd-usb-audio driver Added TLV-read support to snd-usb-audio driver for passing the volume dB scale information to user-space. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 6a65d793b0a82c7e190d9fd92a479401b6a127ca Author: Takashi Iwai Date: Fri Jul 14 14:39:34 2006 +0200 [ALSA] Remove unused tlv_rw field from struct snd_kcontrol Remove unused tlv_rw field from struct snd_kcontrol. The callback is set in tlv.c field, instead. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 11b3a7555aa1b1629614e919889a4479dfe6f37b Author: James Courtier-Dutton Date: Sat Jul 8 16:39:30 2006 +0100 [ALSA] snd-emu10k1: Implement 24bit capture via Philips 1361T ADC for SB0240 card. Signed-off-by: James Courtier-Dutton Signed-off-by: Jaroslav Kysela commit 22a27c7f8d0752b38b315d6a192c338d45ea28d5 Author: Matt Porter Date: Thu Jul 6 18:49:10 2006 +0200 [ALSA] hda: fix sigmatel 9227/8/9 codec support SigmaTel 9227/8/9 IDs must use the 927x patch. Signed-off-by: Matt Porter Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 302e9c5af4fb3ea258917ee6a32e9e45f578b231 Author: Jaroslav Kysela Date: Wed Jul 5 17:39:49 2006 +0200 [ALSA] HDA codec & CA0106 - add/fix TLV support Signed-off-by: Jaroslav Kysela commit 7f0e2f8bb851f5e0a2e0fef465b7b6f36c7aa7be Author: Jaroslav Kysela Date: Wed Jul 5 17:39:14 2006 +0200 [ALSA] HDA codec - little code & comment cleanup Signed-off-by: Jaroslav Kysela commit 8aa9b586e42099817163aba01d925c2660c4dbbe Author: Jaroslav Kysela Date: Wed Jul 5 17:34:51 2006 +0200 [ALSA] Control API - more robust TLV implementation - added callback option - added READ/WRITE/COMMAND flags to access member - added WRITE/COMMAND ioctls - added SNDRV_CTL_EVENT_MASK_TLV for TLV change notifications - added TLV support to ELEM_ADD ioctl Signed-off-by: Jaroslav Kysela commit 6bbe13ecbbce4415a5a7959b3bc35b18313025e0 Author: Jaroslav Kysela Date: Tue Jul 4 13:39:55 2006 +0200 [ALSA] fm801: fixed broken previous patch for the FM tuner only code - do not allocate and enable interrupt - do not do the FM tuner mute (it should be handled more cleanly) Signed-off-by: Jaroslav Kysela commit e0a5d82a966172c5f1dff6229d4a07be2222e8b3 Author: Andy Shevchenko Date: Tue Jul 4 12:05:14 2006 +0200 [ALSA] fm801: Support FM only card Signed-off-by: Andy Shevchenko Signed-off-by: Jaroslav Kysela commit 82466ad76d60c35bf1c48ba1b9c98c35d82fc385 Author: Mike Rapoport Date: Thu Jun 29 17:15:33 2006 +0200 [ALSA] add codec-specific controls for UCB1400 This patch adds some codec-specific controls for Philips UCB1400 codec. Signed-off-by: Mike Rapoport Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 6dbe662874ba08585eaf732d126762c25ac8e3f7 Author: Takashi Iwai Date: Tue Jun 27 18:28:53 2006 +0200 [ALSA] Add experimental support of aggressive AC97 power-saving mode Added CONFIG_SND_AC97_POWER_SAVE kernel config to enable the support of aggressive AC97 power-saving mode. In this mode, the AC97 powerdown register bits are dynamically controlled at each open/close of PCM streams. The mode is activated via power_save option for snd-ac97-codec driver. As default it's off. It can be turned on/off on the fly via sysfs, too. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 2b29b13c5794f648cd5e839796496704d787f5a6 Author: Takashi Iwai Date: Fri Jun 23 14:38:26 2006 +0200 [ALSA] Deprecate snd_card_free_in_thread() Deprecated snd_card_free_in_thread(), replaced with snd_card_free_when_closed(). Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit c461482c8072bb073e6146db320d3da85cdc89ad Author: Takashi Iwai Date: Fri Jun 23 14:38:23 2006 +0200 [ALSA] Unregister device files at disconnection Orignally proposed by Sam Revitch . Unregister device files at disconnection to avoid the futher accesses. Also, the dev_unregister callback is removed and replaced with the combination of disconnect + free. A new function snd_card_free_when_closed() is introduced, which is used in USB disconnect callback. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 746d4a02e68499fc6c1f8d0c43d2271853ade181 Author: Takashi Iwai Date: Fri Jun 23 14:37:59 2006 +0200 [ALSA] Fix disconnection of proc interface - Add the linked list to each proc entry to enable a single-shot disconnection (unregister) - Deprecate snd_info_unregister(), use snd_info_free_entry() - Removed NULL checks of snd_info_free_entry() Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 42750b04c5baa7c5ffdf0a8be2b9b320efdf069f Author: Jaroslav Kysela Date: Thu Jun 1 18:34:01 2006 +0200 [ALSA] Control API - TLV implementation for additional information like dB scale This patch implements a TLV mechanism to transfer an additional information like dB scale to the user space. The types might be extended in future. Acked-by: Takashi Iwai Signed-off-by: Jaroslav Kysela commit 026ed5c9185dcc4b2df92e98c3d61a01cea19cbf Author: Chuck Lever Date: Wed Sep 20 14:33:07 2006 -0400 NFS: unmark NFS direct I/O as experimental Remove the EXPERIMENTAL flag from the NFS_DIRECTIO option. Test plan: Unset the EXPERIMENTAL kernel build option and check to see that the NFS direct I/O option is still available. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit f551e44ff11d3e2ec8f37907bb88ec2433cc8b74 Author: Chuck Lever Date: Wed Sep 20 14:33:04 2006 -0400 NFS: add comments clarifying the use of nfs_post_op_update() Comments-only change to clarify a detail of the NFS protocol and how it is implemented in Linux. Test plan: None. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit a53a3c58fd83e572a7c768d88b4c4e9840a57e82 Author: Steve Dickson Date: Wed Sep 6 11:51:21 2006 -0400 NFSv4: rpc_mkpipe creating socket inodes w/out sk buffers This patch stop rpc_mkpipe from create S_IFSOCK nodes what don't have associated sk buffers attached (which causes SELinux to oops during NFSv4 mounts). Instead the S_IFIFO mode bit is set which probably make more sense and seems to work just fine during my connectathon and fsx testing... Signed-off-by: Steve Dickson Signed-off-by: Trond Myklebust commit aec5e175288c711cbe44750276f61efa3fa3d370 Author: Josef 'Jeff' Sipek Date: Sat Sep 16 21:09:32 2006 -0400 NFS: Use SEEK_END instead of hardcoded value Signed-off-by: Josef 'Jeff' Sipek Signed-off-by: Trond Myklebust commit 51b6ded4d9a94a61035deba1d8f51a54e3a3dd86 Author: Trond Myklebust Date: Fri Sep 15 16:31:56 2006 -0400 NFSv4: When mounting with a port=0 argument, substitute port=2049 RFC3530 states that the registered port 2049 for the NFS protocol should be the default configuration in order to allow clients not to use the RPC binding protocols. If the mount program sends us a port=0, we therefore substitute port=2049. Signed-off-by: Trond Myklebust commit 2066fe89b459c3c787c811b3369df191cddd93d8 Author: Trond Myklebust Date: Fri Sep 15 08:30:46 2006 -0400 NFSv4: Poll more aggressively when handling NFS4ERR_DELAY Change the initial retry delay from 1s to 0.1s (and then back off exponentially). Signed-off-by: Trond Myklebust commit c514983d8d2260020543a81589a2b8c7d4bdab4e Author: Trond Myklebust Date: Fri Sep 15 08:25:04 2006 -0400 NFSv4: Handle the condition NFS4ERR_FILE_OPEN Retry a few times before we give up: the error is usually due to ordering issues with asynchronous RPC calls. Signed-off-by: Trond Myklebust commit 6b30954ebb569fa1b2abdb21f2f4290eec76bf80 Author: Trond Myklebust Date: Thu Sep 14 14:03:14 2006 -0400 NFSv4: Retry lease recovery if it failed during a synchronous operation. Signed-off-by: Trond Myklebust commit 97db8f41792839a6912fd21be8b61dd6c50db58f Author: Trond Myklebust Date: Thu Sep 14 14:03:14 2006 -0400 NFS: Don't invalidate the symlink we just stuffed into the cache And slight optimisation of nfs_end_data_update(): directories never have delegations anyway. Signed-off-by: Trond Myklebust commit 5f004cf2aa8494708fd8d78e78142b7b2748e765 Author: Trond Myklebust Date: Thu Sep 14 14:03:14 2006 -0400 NFS: Make read() return an ESTALE if the file has been deleted Currently, a read() request will return EIO even if the file has been deleted on the server, simply because that is what the VM will return if the call to readpage() fails to update the page. Ensure that readpage() marks the inode as stale if it receives an ESTALE. Then return that error to userland. Signed-off-by: Trond Myklebust commit 2dec51466a08ac1c67da41bfd0518d43d983a2eb Author: J. Bruce Fields Date: Tue Sep 12 11:53:23 2006 -0400 NFSv4: It's perfectly legal for clp to be NULL here.... Signed-off-by: J. Bruce Fields Signed-off-by: Trond Myklebust commit fd6840714d9cf6e93f1d42b904860a94df316b85 Author: Trond Myklebust Date: Tue Sep 5 12:27:44 2006 -0400 NFS: nfs_lookup - don't hash dentry when optimising away the lookup If the open intents tell us that a given lookup is going to result in a, exclusive create, we currently optimize away the lookup call itself. The reason is that the lookup would not be atomic with the create RPC call, so why do it in the first place? A problem occurs, however, if the VFS aborts the exclusive create operation after the lookup, but before the call to create the file/directory: in this case we will end up with a hashed negative dentry in the dcache that has never been looked up. Fix this by only actually hashing the dentry once the create operation has been successfully completed. Signed-off-by: Trond Myklebust commit 762d4527c2fc19d821a13d9a3455ccc2d4073731 Author: Trond Myklebust Date: Sun Sep 3 00:51:55 2006 -0400 SUNRPC: Fix Oops in pmap_getport_done There is no guarantee that the parent task still exists when we exit from the portmapper. Save the xprt instead. Signed-off-by: Trond Myklebust commit 6b6ca86b77b62b798cf9ca2599036420abce7796 Author: Trond Myklebust Date: Tue Sep 5 12:55:57 2006 -0400 SUNRPC: Add refcounting to the struct rpc_xprt In a subsequent patch, this will allow the portmapper to take a reference to the rpc_xprt for which it is updating the port number, fixing an Oops. Signed-off-by: Trond Myklebust commit da45828e2835057045150b318c4fbe9bb91f18dd Author: Trond Myklebust Date: Thu Aug 31 15:44:52 2006 -0400 SUNRPC: Clean up soft task error handling - Ensure that the task aborts the RPC call only when it has actually timed out. - Ensure that req->rq_majortimeo is initialised correctly. Signed-off-by: Trond Myklebust commit 76303992b4701124f4cd0791ae2049ab4332f02c Author: Trond Myklebust Date: Wed Aug 30 14:32:49 2006 -0400 SUNRPC: Handle ENETUNREACH, EHOSTUNREACH and EHOSTDOWN socket errors In case of any of the above errors occuring, delay for 3 seconds, then handle as if it were a timeout error. Signed-off-by: Trond Myklebust commit 8014793b1b2869445adfe678d64cdacd10e99d53 Author: Trond Myklebust Date: Thu Aug 31 18:24:08 2006 -0400 SUNRPC: rpc_delay() should not clobber the rpc_task->tk_status Doing so prevents stuff like call_encode() from working correctly. Signed-off-by: Trond Myklebust commit 297de4f65698ee1e1c75e27d57933b5fa8227e72 Author: andros@citi.umich.edu Date: Tue Aug 29 12:19:41 2006 -0400 Fix a referral error Oops Fix an oops when the referral server is not responding. Check the error return from nfs4_set_client() in nfs4_create_referral_server. Signed-off-by: Andy Adamson Signed-off-by: Trond Myklebust commit 058ad9cbf14b3c7480d01b20280cb4d5858f7a50 Author: Chuck Lever Date: Sun Aug 27 17:23:53 2006 -0400 NFS: NFS_ROOT should use the new rpc_create API Teach NFS_ROOT to use the new rpc_create API instead of the old two-call API for creating an RPC transport. Test plan: Compile the kernel with the NFS client build-in, and set CONFIG_NFS_ROOT. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 6daabf1b04c89f1fbd8eab5450261360943c8e20 Author: David Howells Date: Thu Aug 24 15:44:16 2006 -0400 NFS: Fix up compiler warnings on 64-bit platforms in client.c Fix up warnings from compiling on ppc64. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 158998b6fe36f6acef087f574c96d44713499cc9 Author: Trond Myklebust Date: Thu Aug 24 01:03:17 2006 -0400 SUNRPC: Make rpc_mkpipe() take the parent dentry as an argument Signed-off-by: Trond Myklebust commit 5dd3177ae5012c1e2ad7a9ffdbd0e0d0de2f60e4 Author: Trond Myklebust Date: Thu Aug 24 01:03:05 2006 -0400 NFSv4: Fix a use-after-free issue with the nfs server. Signed-off-by: Trond Myklebust commit 275a082fe9308e710324e26ccb5363c53d8fd45f Author: Trond Myklebust Date: Tue Aug 22 20:06:24 2006 -0400 Add a real API for dealing with blk_congestion_wait() Signed-off-by: Trond Myklebust commit 94a6d75320b3681e6e728b70e18bd186cb55e682 Author: Chuck Lever Date: Tue Aug 22 20:06:23 2006 -0400 NFS: Use cached page as buffer for NFS symlink requests Now that we have a copy of the symlink path in the page cache, we can pass a struct page down to the XDR routines instead of a string buffer. Test plan: Connectathon, all NFS versions. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 873101b33776780d32610fc4c90c7358a5e98f51 Author: Chuck Lever Date: Tue Aug 22 20:06:23 2006 -0400 NFS: copy symlinks into page cache before sending NFS SYMLINK request Currently the NFS client does not cache symlinks it creates. They get cached only when the NFS client reads them back from the server. Copy the symlink into the page cache before sending it. Test plan: Connectathon, all NFS versions. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 4f390c152bc87165da4b1f5b7d870b46fb106d4e Author: Chuck Lever Date: Tue Aug 22 20:06:22 2006 -0400 NFS: Fix double d_drop in nfs_instantiate() error path If the LOOKUP or GETATTR in nfs_instantiate fail, nfs_instantiate will do a d_drop before returning. But some callers already do a d_drop in the case of an error return. Make certain we do only one d_drop in all error paths. This issue was introduced because over time, the symlink proc API diverged slightly from the create/mkdir/mknod proc API. To prevent other coding mistakes of this type, change the symlink proc API to be more like create/mkdir/mknod and move the nfs_instantiate call into the symlink proc routines so it is used in exactly the same way for create, mkdir, mknod, and symlink. Test plan: Connectathon, all versions of NFS. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit d3db90e270791b21cd00d3c094884bffa907cc9e Author: Chuck Lever Date: Tue Aug 22 20:06:22 2006 -0400 NFS: remove a no-longer-needed error check in nfs_symlink() In the early days of NFS, there was no duplicate reply cache on the server. Thus retransmitted non-idempotent requests often found that the request had already completed on the server. To avoid passing an unanticipated return code to unsuspecting applications, NFS clients would often shunt error codes that implied the request had been retried but already completed. Thanks to NFS over TCP, duplicate reply caches on the server, and network performance and reliability improvements, it is safe to remove such checks. Test plan: None. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit b86acd501a34227e0ed2b2d54dc8002c1701ce17 Author: Chuck Lever Date: Tue Aug 22 20:06:22 2006 -0400 SUNRPC: export new RPC client functions with _GPL This patch is optional. It has been suggested that the RPC client internal functions used by upper layer protocols (such as NFS) be exported via EXPORT_SYMBOL_GPL. This patch does that. Test plan: Compile kernel with CONFIG_NFS enabled as a module. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit ff9aa5e56df60cc8565a93cc868fe25ae3f20e49 Author: Chuck Lever Date: Tue Aug 22 20:06:21 2006 -0400 SUNRPC: Eliminate xprt_create_proto and rpc_create_client The two function call API for creating a new RPC client is now obsolete. Remove it. Also, remove an unnecessary check to see whether the caller is capable of using privileged network services. The kernel RPC client always uses a privileged ephemeral port by default; callers are responsible for checking the authority of users to make use of any RPC service, or for specifying that a nonprivileged port is acceptable. Test plan: Repeated runs of Connectathon locking suite. Check network trace to ensure correctness of NLM requests and replies. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 9e1968c58d72c4b85d8a69bda1e194f9701fb224 Author: Chuck Lever Date: Tue Aug 22 20:06:21 2006 -0400 SUNRPC: Convert RPC portmapper to use new rpc_create() API Replace xprt_create_proto/rpc_create_client calls in pmap_clnt.c with new rpc_create() API. Test plan: Repeated runs of Connectathon locking suite. Check network trace for proper PMAP calls and replies. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit ae5c79476f36512d1100e162606bb5691f2cce5a Author: Chuck Lever Date: Tue Aug 22 20:06:21 2006 -0400 NFSD: Convert NFS server callback logic to use new rpc_create API Replace xprt_create_proto/rpc_create_client call in NFS server callback functions to use new rpc_create() API. Test plan: NFSv4 delegation functionality tests. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 41877d207c46f050b709f452703ade20c3b4a096 Author: Chuck Lever Date: Tue Aug 22 20:06:20 2006 -0400 NFS: Convert NFS client to use new rpc_create() API Convert NFS client mount logic to use rpc_create() instead of the old xprt_create_proto/rpc_create_client API. Test plan: Mount stress tests. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit e1ec78928b4d5a31b7a847e65c6009f4229f7c0f Author: Chuck Lever Date: Tue Aug 22 20:06:20 2006 -0400 LOCKD: Convert to use new rpc_create() API Replace xprt_create_proto/rpc_create_client with new rpc_create() interface in the Network Lock Manager. Note that the semantics of NLM transports is now "hard" instead of "soft" to provide a better guarantee that lock requests will get to the server. Test plan: Repeated runs of Connectathon locking suite. Check network trace to ensure NLM requests are working correctly. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit c2866763b4029411d166040306691773c12d4caf Author: Chuck Lever Date: Tue Aug 22 20:06:20 2006 -0400 SUNRPC: use sockaddr + size when creating remote transport endpoints Prepare for more generic transport endpoint handling needed by transports that might use different forms of addressing, such as IPv6. Introduce a single function call to replace the two-call xprt_create_proto/rpc_create_client API. Define a new rpc_create_args structure that allows callers to pass in remote endpoint addresses of varying length. Test-plan: Compile kernel with CONFIG_NFS enabled. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 6ca948238724c945bd353f51d54ae7d285f3889f Author: Chuck Lever Date: Tue Aug 22 20:06:19 2006 -0400 SUNRPC: Clean-up after previous patches. Remove some unused macros related to accessing an RPC peer address Test plan: Compile kernel with CONFIG_NFS option enabled. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit c4efcb1d3e0bc76aeb9ca6301d19a5079893c6c9 Author: Chuck Lever Date: Tue Aug 22 20:06:19 2006 -0400 SUNRPC: Use "sockaddr_storage" for storing RPC client's remote peer address IPv6 addresses are big (128 bytes). Now that no RPC client consumers treat the addr field in rpc_xprt structs as an opaque, and access it only via the API calls, we can safely widen the field in the rpc_xprt struct to accomodate larger addresses. Test plan: Compile kernel with CONFIG_NFS enabled. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit e7f7865743fff3d3938ec7540e5a784d662426da Author: Chuck Lever Date: Tue Aug 22 20:06:19 2006 -0400 SUNRPC: Teach rpc_pipe.c to use new rpc_peeraddr() API Hide the details of how the RPC client stores remote peer addresses from the RPC pipefs implementation. Test plan: Connectathon with Kerberos 5 authentication. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit f425eba437f0051bde979ea2eef8bc875a77cd00 Author: Chuck Lever Date: Tue Aug 22 20:06:18 2006 -0400 SUNRPC: Create API for displaying remote peer address Provide an API for formatting the remote peer address for printing without exposing its internal structure. The address could be dynamic, so we support a function call to get the address rather than reading it straight out of a structure. Test-plan: Destructive testing (unplugging the network temporarily). Probably need to rig a server where certain services aren't running, or that returns an error for some typical operation. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit edb267a688fcee5335d596752f117a30c7152e44 Author: Chuck Lever Date: Tue Aug 22 20:06:18 2006 -0400 SUNRPC: add xprt switch API for printing formatted remote peer addresses Add a new method to the transport switch API to provide a way to convert the opaque contents of xprt->addr to a human-readable string. Test plan: Compile kernel with CONFIG_NFS enabled. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 39d7bbcb5ba5e9d8d658b70903dd7939400e57db Author: Chuck Lever Date: Tue Aug 22 20:06:18 2006 -0400 SUNRPC: remove extraneous header inclusions include/linux/sunrpc/clnt.h already includes include/linux/sunrpc/xprt.h. We can remove xprt.h from source files that already include clnt.h. Likewise include/linux/sunrpc/timer.h. Test plan: Compile kernel with CONFIG_NFS enabled. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 081f79a9b09b634f0dc08ed014e0195464d52535 Author: Chuck Lever Date: Tue Aug 22 20:06:17 2006 -0400 SUNRPC: Teach the RPC portmapper to use the new rpc_peeraddr() API. Hide the details of how the RPC client stores remote peer addresses from the RPC portmapper. Test plan: Destructive testing (unplugging the network temporarily). Connectathon with UDP and TCP. NFSv2/3 and NFSv4 mounting should be carefully checked. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 44c31be261540acf66ddd730631ead8009cc361d Author: Chuck Lever Date: Tue Aug 22 20:06:17 2006 -0400 LOCKD: Teach lockd to use the new rpc_peeraddr() API Hide the details of how the RPC client stores remote peer addresses from the Network Lock Manager. Test plan: Destructive testing (unplugging the network temporarily). Connectathon with UDP and TCP. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit ed39440a2573abc926f230267000f21fa5a87822 Author: Chuck Lever Date: Tue Aug 22 20:06:17 2006 -0400 SUNRPC: create API for getting remote peer address Provide an API for retrieving the remote peer address without allowing direct access to the rpc_xprt struct. Test-plan: Compile kernel with CONFIG_NFS enabled. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit bbf7c1dd2ae2b4040b41b1065ee9b1b6905b1605 Author: Chuck Lever Date: Tue Aug 22 20:06:16 2006 -0400 SUNRPC: Introduce transport switch callout for pluggable rpcbind Introduce a clean transport switch API for plugging in different types of rpcbind mechanisms. For instance, rpcbind can cleanly replace the existing portmapper client, or a transport can choose to implement RPC binding any way it likes. Test plan: Destructive testing (unplugging the network temporarily). Connectathon with UDP and TCP. NFSv2/3 and NFSv4 mounting should be carefully checked. Probably need to rig a server where certain services aren't running, or that returns an error for some typical operation. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 5b1eacbcd78930d976eb50a93f1779d311b553d1 Author: Chuck Lever Date: Tue Aug 22 20:06:16 2006 -0400 SUNRPC: Support for RPC child tasks no longer needed The previous patches removed the last user of RPC child tasks, so we can remove support for child tasks from net/sunrpc/sched.c now. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit c4a5692fb83f23008c720fe84454d5603e80b103 Author: Chuck Lever Date: Tue Aug 22 20:06:16 2006 -0400 SUNRPC: Clean-up after recent changes to sunrpc/pmap_clnt.c Add comments for external functions, use modern function definition style, and fix up dprintk formatting. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 4a68179d38874c37be2802442a71b847f5d1a2a9 Author: Chuck Lever Date: Tue Aug 22 20:06:15 2006 -0400 SUNRPC: Make RPC portmapper use per-transport storage Move connection and bind state that was maintained in the rpc_clnt structure to the rpc_xprt structure. This will allow the creation of a clean API for plugging in different types of bind mechanisms. This brings improvements such as the elimination of a single spin lock to control serialization for all in-kernel RPC binding. A set of per-xprt bitops is used to serialize tasks during RPC binding, just like it now works for making RPC transport connections. Test-plan: Destructive testing (unplugging the network temporarily). Connectathon with UDP and TCP. NFSv2/3 and NFSv4 mounting should be carefully checked. Probably need to rig a server where certain services aren't running, or that returns an error for some typical operation. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit ec739ef03dc926d05051c8c5838971445504470a Author: Chuck Lever Date: Tue Aug 22 20:06:15 2006 -0400 SUNRPC: Create a helper to tell whether a transport is bound Hide the contents and format of xprt->addr by eliminating direct uses of the xprt->addr.sin_port field. This change is required to support alternate RPC host address formats (eg IPv6). Test-plan: Destructive testing (unplugging the network temporarily). Repeated runs of Connectathon locking suite with UDP and TCP. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 9c5bf38d85a31b946664bcc21078ef5bb10672f7 Author: Trond Myklebust Date: Tue Aug 22 20:06:14 2006 -0400 NFS: Fix nfs_alloc_client() The scheme to indicate which services have been started up appears to be seriously broken. Signed-off-by: Trond Myklebust commit 36b15c54cd0d6f707a3ac03e4a2a60bb530a95b9 Author: Trond Myklebust Date: Tue Aug 22 20:06:14 2006 -0400 NFS: Ensure NFSv2/v3 mounts respect the NFS_MOUNT_SECFLAVOUR flag Signed-off-by: Trond Myklebust commit 738a35195941ecf604d3070e2a053e1df3de350b Author: David Howells Date: Sun Jul 30 14:58:27 2006 -0400 NFS: Secure the roots of the NFS subtrees in a shared superblock Invoke security_d_instantiate() on root dentries after allocating them with dentry_alloc_anon(). Normally dentry_alloc_root() would do that, but we don't call that as we don't want to assign a name to the root dentry at this point (we may discover the real name later). Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 27ba851244f627a302d0fc6469d1ad413fc34fcb Author: David Howells Date: Sun Jul 30 14:40:56 2006 -0400 NFS: Fix error handling Fix an error handling problem: nfs_put_client() can be given a NULL pointer if nfs_free_server() is asked to destroy a partially initialised record. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 6aaca566503296a73f956908ec98173946134fe2 Author: David Howells Date: Tue Aug 22 20:06:13 2006 -0400 NFS: Add server and volume lists to /proc Make two new proc files available: /proc/fs/nfsfs/servers /proc/fs/nfsfs/volumes The first lists the servers with which we are currently dealing (struct nfs_client), and the second lists the volumes we have on those servers (struct nfs_server). Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 54ceac4515986030c2502960be620198dd8fe25b Author: David Howells Date: Tue Aug 22 20:06:13 2006 -0400 NFS: Share NFS superblocks per-protocol per-server per-FSID The attached patch makes NFS share superblocks between mounts from the same server and FSID over the same protocol. It does this by creating each superblock with a false root and returning the real root dentry in the vfsmount presented by get_sb(). The root dentry set starts off as an anonymous dentry if we don't already have the dentry for its inode, otherwise it simply returns the dentry we already have. We may thus end up with several trees of dentries in the superblock, and if at some later point one of anonymous tree roots is discovered by normal filesystem activity to be located in another tree within the superblock, the anonymous root is named and materialises attached to the second tree at the appropriate point. Why do it this way? Why not pass an extra argument to the mount() syscall to indicate the subpath and then pathwalk from the server root to the desired directory? You can't guarantee this will work for two reasons: (1) The root and intervening nodes may not be accessible to the client. With NFS2 and NFS3, for instance, mountd is called on the server to get the filehandle for the tip of a path. mountd won't give us handles for anything we don't have permission to access, and so we can't set up NFS inodes for such nodes, and so can't easily set up dentries (we'd have to have ghost inodes or something). With this patch we don't actually create dentries until we get handles from the server that we can use to set up their inodes, and we don't actually bind them into the tree until we know for sure where they go. (2) Inaccessible symbolic links. If we're asked to mount two exports from the server, eg: mount warthog:/warthog/aaa/xxx /mmm mount warthog:/warthog/bbb/yyy /nnn We may not be able to access anything nearer the root than xxx and yyy, but we may find out later that /mmm/www/yyy, say, is actually the same directory as the one mounted on /nnn. What we might then find out, for example, is that /warthog/bbb was actually a symbolic link to /warthog/aaa/xxx/www, but we can't actually determine that by talking to the server until /warthog is made available by NFS. This would lead to having constructed an errneous dentry tree which we can't easily fix. We can end up with a dentry marked as a directory when it should actually be a symlink, or we could end up with an apparently hardlinked directory. With this patch we need not make assumptions about the type of a dentry for which we can't retrieve information, nor need we assume we know its place in the grand scheme of things until we actually see that place. This patch reduces the possibility of aliasing in the inode and page caches for inodes that may be accessed by more than one NFS export. It also reduces the number of superblocks required for NFS where there are many NFS exports being used from a server (home directory server + autofs for example). This in turn makes it simpler to do local caching of network filesystems, as it can then be guaranteed that there won't be links from multiple inodes in separate superblocks to the same cache file. Obviously, cache aliasing between different levels of NFS protocol could still be a problem, but at least that gives us another key to use when indexing the cache. This patch makes the following changes: (1) The server record construction/destruction has been abstracted out into its own set of functions to make things easier to get right. These have been moved into fs/nfs/client.c. All the code in fs/nfs/client.c has to do with the management of connections to servers, and doesn't touch superblocks in any way; the remaining code in fs/nfs/super.c has to do with VFS superblock management. (2) The sequence of events undertaken by NFS mount is now reordered: (a) A volume representation (struct nfs_server) is allocated. (b) A server representation (struct nfs_client) is acquired. This may be allocated or shared, and is keyed on server address, port and NFS version. (c) If allocated, the client representation is initialised. The state member variable of nfs_client is used to prevent a race during initialisation from two mounts. (d) For NFS4 a simple pathwalk is performed, walking from FH to FH to find the root filehandle for the mount (fs/nfs/getroot.c). For NFS2/3 we are given the root FH in advance. (e) The volume FSID is probed for on the root FH. (f) The volume representation is initialised from the FSINFO record retrieved on the root FH. (g) sget() is called to acquire a superblock. This may be allocated or shared, keyed on client pointer and FSID. (h) If allocated, the superblock is initialised. (i) If the superblock is shared, then the new nfs_server record is discarded. (j) The root dentry for this mount is looked up from the root FH. (k) The root dentry for this mount is assigned to the vfsmount. (3) nfs_readdir_lookup() creates dentries for each of the entries readdir() returns; this function now attaches disconnected trees from alternate roots that happen to be discovered attached to a directory being read (in the same way nfs_lookup() is made to do for lookup ops). The new d_materialise_unique() function is now used to do this, thus permitting the whole thing to be done under one set of locks, and thus avoiding any race between mount and lookup operations on the same directory. (4) The client management code uses a new debug facility: NFSDBG_CLIENT which is set by echoing 1024 to /proc/net/sunrpc/nfs_debug. (5) Clone mounts are now called xdev mounts. (6) Use the dentry passed to the statfs() op as the handle for retrieving fs statistics rather than the root dentry of the superblock (which is now a dummy). Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit cf6d7b5de8535a9f0088c5cc28ee2dae87371b4a Author: David Howells Date: Tue Aug 22 20:06:12 2006 -0400 NFS: Start rpciod in server common management Start rpciod in the server common (nfs_client struct) management code rather than in the superblock management code. This means we only need to "start" it once per server instead of once per superblock. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 5006a76cca8f86c6975c16fcf67e83b8b0eee2b6 Author: David Howells Date: Tue Aug 22 20:06:12 2006 -0400 NFS: Eliminate client_sys in favour of cl_rpcclient Eliminate nfs_server::client_sys in favour of nfs_client::cl_rpcclient as we only really need one per server that we're talking to since it doesn't have any security on it. The retransmission management variables are also moved to the common struct as they're required to set up the cl_rpcclient connection. The NFS2/3 client and client_acl connections are thenceforth derived by cloning the cl_rpcclient connection and post-applying the authorisation flavour. The code for setting up the initial common connection has been moved to client.c as nfs_create_rpc_client(). All the NFS program definition tables are also moved there as that's where they're now required rather than super.c. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 8fa5c000d7f986ef9cdc6d95f9f7fcee20e0a7d6 Author: David Howells Date: Tue Aug 22 20:06:12 2006 -0400 NFS: Move rpc_ops from nfs_server to nfs_client Move the rpc_ops from the nfs_server struct to the nfs_client struct as they're common to all server records of a particular NFS protocol version. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 1f163415dc05983830bcc47b33c155b2528b1574 Author: David Howells Date: Tue Aug 22 20:06:11 2006 -0400 NFS: Make better use of inode* dereferencing macros Make better use of inode* dereferencing macros to hide dereferencing chains (including NFS_PROTO and NFS_CLIENT). Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 27951bd26031f6c27d38df9e94623bbe208a2464 Author: David Howells Date: Tue Aug 22 20:06:11 2006 -0400 NFS: Maintain a common server record for NFS2/3 as well as for NFS4 Maintain a common server record for NFS2/3 as well as for NFS4 so that common stuff can be moved there from struct nfs_server. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 509de8111656a7d89b4a1a5f430f4460ce510f0f Author: David Howells Date: Tue Aug 22 20:06:11 2006 -0400 NFS: Add extra const qualifiers Add some extra const qualifiers into NFS. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 0c7d90cfed91a283228017ba6faf37ee0bcd32b1 Author: David Howells Date: Tue Aug 22 20:06:10 2006 -0400 NFS: Use the dentry superblock directly in nfs_statfs() Use the nominated dentry's superblock directly in the NFS statfs() op to get a file handle, rather than using s_root (which will become a dummy dentry in a future patch). Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 24c8dbbb5f777187d660393599641ab3307b4b97 Author: David Howells Date: Tue Aug 22 20:06:10 2006 -0400 NFS: Generalise the nfs_client structure Generalise the nfs_client structure by: (1) Moving nfs_client to a more general place (nfs_fs_sb.h). (2) Renaming its maintenance routines to be non-NFS4 specific. (3) Move those maintenance routines to a new non-NFS4 specific file (client.c) and move the declarations to internal.h. (4) Make nfs_find/get_client() take a full sockaddr_in to include the port number (will be required for NFS2/3). (5) Make nfs_find/get_client() take the NFS protocol version (again will be required to differentiate NFS2, 3 & 4 client records). Also: (6) Make nfs_client construction proceed akin to inodes, marking them as under construction and providing a function to indicate completion. (7) Make nfs_get_client() wait interruptibly if it finds a client that it can share, but that client is currently being constructed. (8) Make nfs4_create_client() use (6) and (7) instead of locking cl_sem. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit e9326dcab413848e70ab746c7c5363da13e5f801 Author: David Howells Date: Tue Aug 22 20:06:10 2006 -0400 NFS: Add a server capabilities NFS RPC op Add a set_capabilities NFS RPC op so that the server capabilities can be set. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 2b3de4411b3ccaeb00018c99d1bbe7203554cf7f Author: David Howells Date: Tue Aug 22 20:06:09 2006 -0400 NFS: Add a lookupfh NFS RPC op Add a lookup filehandle NFS RPC op so that a file handle can be looked up without requiring dentries and inodes and other VFS stuff when doing an NFS4 pathwalk during mounting. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit b7162792b5c0e0f6e91b8997f8e6bbc76ec5420a Author: David Howells Date: Tue Aug 22 20:06:09 2006 -0400 NFS: Return an error when starting the idmapping pipe Return an error when starting the idmapping pipe so that we can detect it failing. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 7539bbab8062aadc1db95a22b377146843cfa88f Author: David Howells Date: Tue Aug 22 20:06:09 2006 -0400 NFS: Rename nfs_server::nfs4_state Rename nfs_server::nfs4_state to nfs_client as it will be used to represent the client state for NFS2 and NFS3 also. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit adfa6f980bd46974e6b32b22dd0c45e3f52063f4 Author: David Howells Date: Tue Aug 22 20:06:08 2006 -0400 NFS: Rename struct nfs4_client to struct nfs_client Rename struct nfs4_client to struct nfs_client so that it can become the basis for a general client record for NFS2 and NFS3 in addition to NFS4. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 5ae1fbce142b67bf59e15fb1af96e88a96abde7b Author: David Howells Date: Tue Aug 22 20:06:08 2006 -0400 NFS: Fix NFS4 callback up/down prototypes Make the nfs_callback_up()/down() prototypes just do nothing if NFS4 is not enabled. Also make the down function void type since we can't really do anything if it fails. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 0a8ea4372b2868842986118ca90912f3382e6c5a Author: David Howells Date: Tue Aug 22 20:06:08 2006 -0400 NFS: Disambiguate nfs_stat_to_errno() Rename the NFS4 version of nfs_stat_to_errno() so that it doesn't conflict with the common one used by NFS2 and NFS3. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 7d4e2747a0412583526a162fbbd6edeeafcceb08 Author: David Howells Date: Tue Aug 22 20:06:07 2006 -0400 NFS: Fix up split of fs/nfs/inode.c Fix ups for the splitting of the superblock stuff out of fs/nfs/inode.c, including: (*) Move the callback tcpport module param into callback.c. (*) Move the idmap cache timeout module param into idmap.c. (*) Changes to internal.h: (*) namespace-nfs4.c was renamed to nfs4namespace.c. (*) nfs_stat_to_errno() is in nfs2xdr.c, not nfs4xdr.c. (*) nfs4xdr.c is contingent on CONFIG_NFS_V4. (*) nfs4_path() is only uses if CONFIG_NFS_V4 is set. Plus also: (*) The sec_flavours[] table should really be const. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 770bfad846ab6628444428467b11fa6773ae9ea1 Author: David Howells Date: Tue Aug 22 20:06:07 2006 -0400 NFS: Add dentry materialisation op The attached patch adds a new directory cache management function that prepares a disconnected anonymous function to be connected into the dentry tree. The anonymous dentry is transferred the name and parentage from another dentry. The following changes were made in [try #2]: (*) d_materialise_dentry() now switches the parentage of the two nodes around correctly when one or other of them is self-referential. The following changes were made in [try #7]: (*) d_instantiate_unique() has had the interior part split out as function __d_instantiate_unique(). Callers of this latter function must be holding the appropriate locks. (*) _d_rehash() has been added as a wrapper around __d_rehash() to call it with the most obvious hash list (the one from the name). d_rehash() now calls _d_rehash(). (*) d_materialise_dentry() is now __d_materialise_dentry() and is static. (*) d_materialise_unique() added to perform the combination of d_find_alias(), d_materialise_dentry() and d_add_unique() that the NFS client was doing twice, all within a single dcache_lock critical section. This reduces the number of times two different spinlocks were being accessed. The following further changes were made: (*) Add the dentries onto their parents d_subdirs lists. Signed-Off-By: David Howells Signed-off-by: Trond Myklebust commit 979df72e6f963b42ee484f2eca049c3344da0ba7 Author: Trond Myklebust Date: Tue Jul 25 11:28:19 2006 -0400 NFS: Add an ACCESS cache memory shrinker A pinned inode may in theory end up filling memory with cached ACCESS calls. This patch ensures that the VM may shrink away the cache in these particular cases. The shrinker works by iterating through the list of inodes on the global nfs_access_lru_list, and removing the least recently used access cache entry until it is done (or until the entire cache is empty). Signed-off-by: Trond Myklebust commit cfcea3e8c66c2dcde98d5c2693d4bff50b5cac97 Author: Trond Myklebust Date: Tue Jul 25 11:28:18 2006 -0400 NFS: Add a global LRU list for the ACCESS cache ...in order to allow the addition of a memory shrinker. Signed-off-by: Trond Myklebust commit 1c3c07e9f6cc50dab2aeb8051325e317d4f6c70e Author: Trond Myklebust Date: Tue Jul 25 11:28:18 2006 -0400 NFS: Add a new ACCESS rpc call cache to the linux nfs client The current access cache only allows one entry at a time to be cached for each inode. Add a per-inode red-black tree in order to allow more than one to be cached at a time. Should significantly cut down the time spent in path traversal for shared directories such as ${PATH}, /usr/share, etc. Signed-off-by: Trond Myklebust commit 183798799216fad36c7219fe8d4d6dee6b8fa755 Author: Jeff Garzik Date: Fri Sep 22 21:19:05 2006 -0400 net/ieee80211: fix more crypto-related build breakage Signed-off-by: Jeff Garzik commit c03efdb202a4882f426ce49766859af4058c9b8a Author: Al Viro Date: Sat Sep 23 01:29:34 2006 +0100 [PATCH] fallout from hcd-core patch missing le16_to_cpu() Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 956295d50dc5462722f029de64d44a7ecba54e69 Author: Al Viro Date: Sat Sep 23 01:27:30 2006 +0100 [PATCH] fix the survivors of fbcon_vbl_handler() renaming In |Author: James Simmons |Date: Thu Mar 13 22:37:08 2003 -0800 | | [FBCON] Cursor handling clean up. I nuked several static variables. we have -static void fbcon_vbl_handler(int irq, void *dummy, struct pt_regs *fp) +static void fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) and 3 years later a couple of instances missed back then still remains there. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 5932ef077716e3e798eaba6738ef874849f62a17 Author: Al Viro Date: Sat Sep 23 01:26:02 2006 +0100 [PATCH] sun4: fix sbus_setup_iommu() iommu_init() and iounit_init() are never called for sun4, but that's not enough - these calls should be ifdefed out since the functions in question simply do not exist for CONFIG_SUN4 kernel. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit a07562e03a3f4a1276931e3fb3cb532622a6c616 Author: Al Viro Date: Sat Sep 23 01:25:18 2006 +0100 [PATCH] asm/backlight.h is ppc-only Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 00ddaf20b0049c65ddd0c2b1cbed16c7a433e47c Author: Al Viro Date: Sat Sep 23 01:22:46 2006 +0100 [PATCH] sanitize frv archclean Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 55ae922323c90fdcb733c13ccf0da2ee72763913 Author: Al Viro Date: Sat Sep 23 01:24:25 2006 +0100 [PATCH] aoa is pmac-only Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 634965f5cfda1763f51e7916cfa49265b70e2a8d Author: Al Viro Date: Sat Sep 23 01:20:31 2006 +0100 [PATCH] memcpy_fromio() missing in istallion memcpy() from iomem is a bad thing... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit cc9bd99e9adfa4f44ea050a63fb41a3f764acf84 Author: Al Viro Date: Sat Sep 23 01:18:41 2006 +0100 [PATCH] fix ancient breakage in ebus_init() Back when pci_dev had base_address[], loop of form base = &...->base_address[0]; for (.....) { ... *base++ = addr; } was fine, but when that array got spread in ->resource[...].start replacing the initialization with base = &...->resource[0].start; was not a sufficient modification. IOW this code got broken for cases when there had been more than one resource to fill. All way back in 2.3.41-pre3... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit a83fbf635992442edf6aa3252e4008d4a08edf12 Author: Al Viro Date: Sat Sep 23 00:10:18 2006 +0100 [PATCH] fix missing ifdefs in syscall classes hookup for generic targets several targets have no ....at() family and m32r calls its only chown variant chown32(), with __NR_chown being undefined. creat(2) is also absent in some targets. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 9b6b0b81f0de6a17ce57c818d1f403253c200e1f Author: Jim Lewis Date: Fri Sep 22 17:22:53 2006 -0700 [PATCH] Spidernet: add ethtool -S (show statistics) Add the ethtool -S (show statistics) feature to the Spidernet ethernet driver. I have tested it extensively and believe it is ready to be applied. Signed-off-by: James K Lewis Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit ff2a2e0172fd11b1bfb9b45ee1b996d3f10669af Author: Ralf Baechle Date: Fri Sep 22 20:15:30 2006 -0400 [NET] GT96100: Delete bitrotting ethernet driver Code for the EV96100 evaluation board hasn't compiled since at least November 15, 2003, so it is being deleted as of 2.6.18 due to lack of a user base. Signed-off-by: Ralf Baechle Signed-off-by: Jeff Garzik commit 06ede91017d015a03cf8c1c87b3ff668f9a846e0 Author: Dale Farnsworth Date: Wed Sep 20 12:24:34 2006 -0700 [PATCH] mv643xx_eth: restrict to 32-bit PPC_MULTIPLATFORM No 64-bit PPC_MULTIPLATFORM platforms use the mv643xx_eth driver, so build it only on PPC32. Signed-off-by: Dale Farnsworth Acked-by: Sven Luther Signed-off-by: Jeff Garzik commit 1d22e05df8183b36b3cc0760344774040abc74d5 Author: Lennert Buytenhek Date: Fri Sep 22 02:28:13 2006 +0200 [PATCH] Cirrus Logic ep93xx ethernet driver The Cirrus Logic ep93xx is an ARM SoC that includes an ethernet MAC -- this patch adds a driver for that ethernet MAC. Signed-off-by: Lennert Buytenhek Signed-off-by: Jeff Garzik commit 24669f7d00d387799fc6a39452ab22d7f078f043 Author: Jeremy Fitzhardinge Date: Tue Sep 12 18:55:53 2006 -0700 [CPUFREQ] sw_any_bug_dmi_table can be used on resume, so it isn't initdata sw_any_bug_dmi_table can be used on resume, so it isn't initdata. Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Dave Jones commit ddad65df0048e210c93640b59b3bad12701febb6 Author: Dave Jones Date: Fri Sep 22 19:15:23 2006 -0400 [CPUFREQ] Fix some more CPU hotplug locking. Lukewarm IQ detected in hotplug locking BUG: warning at kernel/cpu.c:38/lock_cpu_hotplug() [] lock_cpu_hotplug+0x42/0x65 [] cpufreq_update_policy+0x25/0xad [] kprobe_flush_task+0x18/0x40 [] schedule+0x63f/0x68b [] __link_module+0x0/0x1f [] __cond_resched+0x16/0x34 [] cond_resched+0x26/0x31 [] wait_for_completion+0x17/0xb1 [] cpufreq_stat_cpu_callback+0x13/0x20 [cpufreq_stats] [] cpufreq_stats_init+0x74/0x8b [cpufreq_stats] [] sys_init_module+0x91/0x174 [] sysenter_past_esp+0x56/0x79 As there are other places that call cpufreq_update_policy without the hotplug lock, it seems better to keep the hotplug locking at the lower level for the time being until this is revamped. Signed-off-by: Dave Jones commit 9cd330d36b32ed48d49561b165842db20bd153cc Author: Krishna Kumar Date: Fri Sep 22 15:22:58 2006 -0700 IB: Fix typo in kerneldoc for ib_set_client_data() Signed-off-by: Krishna Kumar Signed-off-by: Roland Dreier commit a8bfca024326560d86c6323b0504288ca55a75fc Author: Eli Cohen Date: Fri Sep 22 15:22:58 2006 -0700 IPoIB: Add some likely/unlikely annotations in hot path Signed-off-by: Eli Cohen Signed-off-by: Roland Dreier commit 507c33504686e733a14ef0b2dc9db0c20fae4653 Author: Dotan Barak Date: Thu Sep 21 18:26:43 2006 +0300 IPoIB: Remove unused include of vmalloc.h IPoIB doesn't use anything from , so don't include it. Signed-off-by: Dotan Barak Signed-off-by: Roland Dreier commit 5ccd025553d73e523212ee0860b7f4a75e886bfa Author: Eli Cohen Date: Fri Sep 22 15:22:56 2006 -0700 IPoIB: Rejoin all multicast groups after a port event When ipoib_ib_dev_flush() is called because of a port event, the driver needs to rejoin all multicast groups, since the flush will call ipoib_mcast_dev_flush() (via ipoib_ib_dev_down()). Otherwise no (non-broadcast) multicast groups will be rejoined until the networking core calls ->set_multicast_list again, and so multicast reception will be broken for potentially a long time. Signed-off-by: Eli Cohen Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier commit d0df6d6d4539241179a1ef5394787825bf05bbce Author: Roland Dreier Date: Fri Sep 22 15:22:56 2006 -0700 IPoIB: Create MCGs with all attributes required by RFC RFC 4391 ("Transmission of IP over InfiniBand (IPoIB)") says: If the IB multicast group does not already exist, one must be created first with the IPoIB link MTU. The MGID MUST use the same P_Key, Q_Key, SL, MTU, and HopLimit as those used in the broadcast-GID. The rest of attributes SHOULD follow the values used in the broadcast-GID as well. However, the current IPoIB driver is only setting the attributes required by the InfiniBand spec to create a multicast group, so in particular the MTU and HopLimit are not being set. Add these attributes when creating MCGs, and also set the Rate attribute, since IPoIB pays attention to that attribute as well. Signed-off-by: Roland Dreier commit aec79fcc3ea3b536a2788b4e22b7ebabbb176485 Author: Michael S. Tsirkin Date: Mon Sep 18 22:17:08 2006 +0300 IB/sa: fix ib_sa_selector names Relevant SA queries are actually "greater than" / "less than", not "greater than or equal" / "less than or equal" as the names imply. (See IB spec 1.2 Vol 1, 15.2.5.16 PATHRECORD/Table 205 PathRecord) Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier commit 5755d6dad95808a24a65dd9e61e23c305f9b077c Author: Roland Dreier Date: Fri Sep 22 15:22:55 2006 -0700 IB/iser: INFINIBAND_ISER depends on INET iSER won't build without CONFIG_INET enabled, so make Kconfig reflect that. Signed-off-by: Roland Dreier commit d35cc330a2058a32410ef42784b8d3b942f37b8b Author: Roland Dreier Date: Fri Sep 22 15:22:55 2006 -0700 IB/mthca: Simplify calls to mthca_cq_clean() If a QP has separate send and receive CQs, then the send CQ will never have receive completions from that QP in it. So when cleaning the send CQ, there's no need to pass in an SRQ pointer, even if the QP is attached to an SRQ. Signed-off-by: Roland Dreier commit 951f7fc1372da3d826b1d975b3cc5e3db92af5d0 Author: Or Gerlitz Date: Fri Sep 22 15:22:54 2006 -0700 RDMA/cma: Document rdma_accept() error handling Document the reject sending and modifying QP to error done in rdma_accept(). Signed-off-by: Or Gerlitz Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit b3b30f5e8a0c50db3d76b6f7c7cc50245aeb57fd Author: Jack Morgenstein Date: Tue Aug 15 21:11:18 2006 +0300 IB/mthca: Recover from catastrophic errors Trigger device remove and then add when a catastrophic error is detected in hardware. This, in turn, will cause a device reset, which we hope will recover from the catastrophic condition. Since this might interefere with debugging the root cause, add a module option to suppress this behaviour. Signed-off-by: Jack Morgenstein Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier commit 07eeec0627e93a1a753c4df004a97a4d0a7b9ceb Author: Or Gerlitz Date: Tue Sep 12 09:03:33 2006 -0700 RDMA/cma: Document rdma_destroy_id() function Clarify that rdma_destroy_id cancels outstanding asynchronous operations on the Associated id. Signed-off-by: Or Gerlitz Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit a70d059009f4a207e2a9c794f40fc8c870096d54 Author: Michael S. Tsirkin Date: Mon Aug 28 16:32:50 2006 +0300 IB/cm: Do not track remote QPN in timewait state Do not track remote QPN in TimeWait state, since QP is not connected. Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier commit c1a0b23bf477c2e1068905f4e2b5c3cee139e853 Author: Michael S. Tsirkin Date: Mon Aug 21 16:40:12 2006 -0700 IB/sa: Require SA registration Require users to register with SA module, to prevent the sa_query module text from going away while an SA query callback is still running. Update all in-tree users for the new interface. Signed-off-by: Michael S. Tsirkin Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 2439a6e65ff09729c3b4215f134dc5cd4e8a30c0 Author: Roland Dreier Date: Fri Sep 22 15:22:52 2006 -0700 IPoIB: Refactor completion handling Split up ipoib_ib_handle_wc() into ipoib_ib_handle_rx_wc() and ipoib_ib_handle_tx_wc() to make the code easier to read. This will also help implement NAPI in the future. Signed-off-by: Roland Dreier commit d81110285f7f6c07a0ce8f99a5ff158a647cd649 Author: Erez Zilber Date: Mon Sep 11 12:26:33 2006 +0300 IB/iser: Do not use FMR for a single dma entry sg Fast Memory Registration (fmr) is used to register for rdma an sg whose elements are not linearly sequential after dma mapping. The IB verbs layer provides an "all dma memory MR (memory region)" which can be used for RDMA-ing a dma linearly sequential buffer. Change the code to use the dma mr instead of doing fmr when dma mapping produces a single dma entry sg. Signed-off-by: Erez Zilber Signed-off-by: Roland Dreier commit e981f1d4b8288072ba7cf6b7141cd4aefb404383 Author: Erez Zilber Date: Mon Sep 11 12:24:00 2006 +0300 IB/iser: fix some debug prints fix and add some debug prints related to iser handling of memory for rdma. Signed-off-by: Erez Zilber Signed-off-by: Roland Dreier commit 8dfa0876d3dde5f9c1818a4c35caaabc3ddba78b Author: Erez Zilber Date: Mon Sep 11 12:22:30 2006 +0300 IB/iser: make FMR "page size" be 4K and not PAGE_SIZE As iser is able to use at most one rdma operation for the execution of a scsi command, and registration of the sg associated with scsi command has its restrictions, the code checks if an sg is "aligned for rdma". Alignment for rdma is measured in "fmr page" units whose possible resolutions are different between HCAs and can be smaller, equal or bigger to the system page size. When the system page size is bigger than 4KB (eg the default with ia64 kernels) there a bigger chance that an sg would be aligned for rdma if the fmr page size is 4KB. Change the code to create FMR whose pages are of size 4KB and to take that into account when processing the sg. Signed-off-by: Erez Zilber Signed-off-by: Roland Dreier commit 8072ec2f8f6790df91e85d833e672c9c30a7ab3c Author: Erez Zilber Date: Mon Sep 11 12:20:54 2006 +0300 IB/iser: Limit the max size of a scsi command Currently, the data length of a command coming down from scsi-ml is limited only by the size of its sg list (sg_tablesize). The max data length may be different for different page size values. By setting max_sectors, we limit the data length to max_sectors*512 bytes. Signed-off-by: Erez Zilber Signed-off-by: Roland Dreier commit 777a71dd4d901f055967ddbd038d2a74ffce0eb8 Author: Erez Zilber Date: Mon Sep 11 12:19:17 2006 +0300 IB/iser: fix a check of SG alignment for RDMA dma mapping may include a "compaction" of the sg associated with scsi command. Hence, the size of the maximal prefix of the SG which is aligned for rdma must be compared against the length of the dma mapped sg (mem->dma_nents) and not against the size of it before it was mapped (mem->size). Signed-off-by: Erez Zilber Signed-off-by: Roland Dreier commit 61a73c708f37295892176bc911b178278df6a091 Author: Sean Hefty Date: Fri Sep 1 15:33:55 2006 -0700 RDMA/cma: Protect against adding device during destruction Closes a window where address resolution can attach an rdma_cm_id to a device during destruction of the rdma_cm_id. This can result in the rdma_cm_id remaining in the device list after its memory has been freed. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit f94b533d091a42da92d908eb7b3f9ade1923f90d Author: Tom Tucker Date: Fri Sep 22 15:22:48 2006 -0700 RDMA/amso1100: Add driver for Ammasso 1100 RNIC Add a driver for the Ammasso 1100 gigabit ethernet RNIC. Signed-off-by: Tom Tucker Signed-off-by: Steve Wise Signed-off-by: Roland Dreier commit 07ebafbaaa72aa6a35472879008f5a1d1d469a0c Author: Tom Tucker Date: Thu Aug 3 16:02:42 2006 -0500 RDMA: iWARP Core Changes. Modifications to the existing rdma header files, core files, drivers, and ulp files to support iWARP, including: - Hook iWARP CM into the build system and use it in rdma_cm. - Convert enum ib_node_type to enum rdma_node_type, which includes the possibility of RDMA_NODE_RNIC, and update everything for this. Signed-off-by: Tom Tucker Signed-off-by: Steve Wise Signed-off-by: Roland Dreier commit 922a8e9fb2e0711212badce47a41137e2ca04cb3 Author: Tom Tucker Date: Thu Aug 3 16:02:40 2006 -0500 RDMA: iWARP Connection Manager. Add an iWARP Connection Manager (CM), which abstracts connection management for iWARP devices (RNICs). It is a logical instance of the xx_cm where xx is the transport type (ib or iw). The symbols exported are used by the transport independent rdma_cm module, and are available also for transport dependent ULPs. Signed-off-by: Tom Tucker Signed-off-by: Steve Wise Signed-off-by: Roland Dreier commit 3cd965646b7cb75ae84dd0daf6258adf20e4f169 Author: Roland Dreier Date: Fri Sep 22 15:22:46 2006 -0700 IB: Whitespace fixes Remove some trailing whitespace that has snuck in despite the best efforts of whitespace=error-all. Also fix a few other whitespace bogosities. Signed-off-by: Roland Dreier commit f06d26537559113207e4b73af6a22eaa5c5e9dc3 Author: Sean Hefty Date: Mon Aug 28 15:15:18 2006 -0700 IB/cm: Randomize starting comm ID Randomize the starting local comm ID to avoid getting a rejected connection due to a stale connection after a system reboot or reloading of the ib_cm. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 2b3e258e5dd1938e2708eb5354ad8ba056fe8154 Author: James Lentini Date: Mon Aug 28 15:12:04 2006 -0700 IB/mad: Remove unused includes The ib_mad module does not use a kthread function, but mad_priv.h includes . mad_rmpp.c does not do any DMA-related stuff, but includes . Remove the unused includes. Signed-off-by: James Lentini Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 75ab13443e4575c00788ba9861105745b9dda05c Author: Sean Hefty Date: Mon Aug 28 15:10:32 2006 -0700 IB/mad: Add support for dual-sided RMPP transfers. The implementation assumes that any RMPP request that requires a response uses DS RMPP. Based on the RMPP start-up scenarios defined by the spec, this should be a valid assumption. That is, there is no start-up scenario defined where an RMPP request is followed by a non-RMPP response. By having this assumption we avoid any API changes. In order for a node that supports DS RMPP to communicate with one that does not, RMPP responses assume a new window size of 1 if a DS ACK has not been received. (By DS ACK, I'm referring to the turn-around ACK after the final ACK of the request.) This is a slight spec deviation, but is necessary to allow communication with nodes that do not generate the DS ACK. It also handles the case when a response is sent after the request state has been discarded. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 76842405fca5f8b8e08d91558ecd3b922265034a Author: Sean Hefty Date: Mon Aug 28 11:57:42 2006 -0700 IB/cm: Use correct reject code for invalid GID Set the reject code properly when rejecting a request that contains an invalid GID. A suitable GID is returned by the IB CM in the additional reject information (ARI). This is a spec compliancy issue. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit c1f250c0b45cdfdd89b21f2b866f317439aa21de Author: Sean Hefty Date: Mon Aug 28 11:55:52 2006 -0700 IB/cm: Enable atomics along with RDMA reads Enable atomic operations along with RDMA reads if a local RDMA read/atomic depth is provided by the user. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier commit 9e583b85c2a0215dc7f4427361b4f75fcc0316af Author: Jack Morgenstein Date: Mon Aug 28 19:12:39 2006 +0300 IB/mthca: Return correct number of bits for static rate in query_qp Incorrect number of bits was taken for static_rate field. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier commit f6f76725b5ed8085c602b16bfd309c9957fb84c8 Author: Jack Morgenstein Date: Mon Aug 28 19:10:34 2006 +0300 IB/mthca: Return port number for unconnected QPs in query_qp port_num was not being returned for unconnected QPs. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier commit b046a04e162dc7f468700a0817acda0321b2b3ae Author: Jack Morgenstein Date: Mon Aug 28 19:08:53 2006 +0300 IB/mthca: Fix default static rate returned for Tavor in AV When default static rate is returned for Tavor, need to translate it to an ib rate value. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier commit 30fc5c3130bdbc7cc051a2d6054ad38360d408a8 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:48 2006 -0700 IB/ipath: control receive polarity inversion Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit e35d710d0c5b74bc9833d6a3791706bd577a3724 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:46 2006 -0700 IB/ipath: fix return value from ipath_poll This stops the generic poll code from waiting for a timeout. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit d821f02a6ebed97e35e0bc7575452cfc6f9073cb Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:45 2006 -0700 IB/ipath: allow SMA to be disabled This is useful for testing purposes. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit a78aa6fb156f9954562c9539aeb25dbec1ffca10 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:44 2006 -0700 IB/ipath: handle sq_sig_all field correctly Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 0b81e4f79af8322c7142701982f40d1431dedf19 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:43 2006 -0700 IB/ipath: put a limit on the number of QPs that can be created Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit ca4ce383acfb05b8035453cdbbfd4f8ae36c7a69 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:42 2006 -0700 IB/ipath: validate path_mig_state properly Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit fc8cf8cdfc3ce328c577b18ebcd60a5595f2a283 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:41 2006 -0700 IB/ipath: be more strict about testing the modify QP verb Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit ff0b8597ec3e7db6b37130a195cb3d673dafea27 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:40 2006 -0700 IB/ipath: add serial number to hardware freeze error message Also added the word "Hardware" after "Fatal" to make it more obvious that it's hardware, not software. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 525d0ca1d452ed336c1d907fb20c104467a8a47b Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:39 2006 -0700 IB/ipath: support new QLogic product naming scheme This patch only renames files, fixes product names, and updates comments. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 092260b8f966ebe0742045416082e9a81bd971d1 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:38 2006 -0700 IB/ipath: account for attached QPs correctly Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit eae33d47a797e159306567643284a98ae7428ec4 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:37 2006 -0700 IB/ipath: do not allow use of CQ entries with invalid counts Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 98341f261893acd7bc5abee5ddc35337ef49e457 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:36 2006 -0700 IB/ipath: add new minor device to allow sending of diag packets Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 32c0a26c8f91dbc2797175c2bdff42b54f66c71d Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:35 2006 -0700 IB/ipath: trivial cleanups Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 0fd41363e0785247b7c19127318abc8b5eacc86b Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:34 2006 -0700 IB/ipath: remove stale references to userspace SMA When we first submitted a userspace subnet management agent, it was rejected, so we left it out of the final driver submission. This patch removes a number of vestigial references to it. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit b55f4f06c834a67f949a5219c5f97ffafa240989 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:33 2006 -0700 IB/ipath: simplify debugging code after ipath_core and ib_ipath merger Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 34b2aafea38efdf02cd8107a6e1057e2a297c447 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:32 2006 -0700 IB/ipath: simplify layering code A lot of ipath layer code was only called in one place. Now that the ipath_core and ib_ipath drivers are merged, it's more sensible to simply inline the simple stuff that the layer code was doing. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit b1c1b6a30eac88665a35a207cc5e6233090b9d65 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:31 2006 -0700 IB/ipath: merge ipath_core and ib_ipath drivers There is little point in keeping the two drivers separate, so we are merging them. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 367fe711c5dc85dbc3265cf01e34d4d6fbd55f06 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:30 2006 -0700 IB/ipath: drop requirement that PIO buffers be mmaped write-only Some userlands try to mmap these pages read-write, so accommodate them. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit ba11203a11835737df980ef3dd3bd8325b9cc94e Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:29 2006 -0700 IB/ipath: fix handling of kpiobufs Change comment: no longer imply that user can set ipath_kpiobufs to zero. Actually set ipath_kpiobufs from parameter. Previously only altered per-device ipath_lastport_piobuf, which was over-written in chip init. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 8e280d94e29af67035637fb957daba7ae0d23583 Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:28 2006 -0700 IB/ipath: fix for crash on module unload, if cfgports < portcnt Allocate enough pointers for all possible ports, to avoid problems in cleanup/unload. Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit c27fef26271d352b5546c33239edeb0dcb4fc0cc Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:27 2006 -0700 IB/ipath: lock resource limit counters correctly Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit eb9dc6f48dc7537ce53163109625bd992150e0cf Author: Bryan O'Sullivan Date: Fri Aug 25 11:24:26 2006 -0700 IB/ipath: More changes to support InfiniPath on PowerPC 970 systems Ordering of writethrough store buffers needs to be forced, and we need to use ifdef to get writethrough behavior to InfiniPath buffers, because there is no generic way to specify that at this time (similar to code in char/drm/drm_vm.c and block/z2ram.c). Signed-off-by: John Gregor Signed-off-by: Bryan O'Sullivan Signed-off-by: Roland Dreier commit 373d9915803aebbbf7fd3841efd9dac31c32e148 Author: Ralph Campbell Date: Fri Sep 22 15:22:26 2006 -0700 IB/ipath: Performance improvements via mmap of queues Improve performance of userspace post receive, post SRQ receive, and poll CQ operations for ipath by allowing userspace to directly mmap() receive queues and completion queues. This eliminates the copying between userspace and the kernel in the data path. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 9bc57e2d19db4da81c1150120658cc3658a99ed4 Author: Ralph Campbell Date: Fri Aug 11 14:58:09 2006 -0700 IB/uverbs: Pass userspace data to modify_srq and modify_qp methods Pass a struct ib_udata to the low-level driver's ->modify_srq() and ->modify_qp() methods, so that it can get to the device-specific data passed in by the userspace driver. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 64f817ba98095156149ba5991592d5d039f6da74 Author: Ralph Campbell Date: Fri Sep 22 15:22:24 2006 -0700 IB/uverbs: Allow resize CQ operation to return driver-specific data Add a ib_uverbs_resize_cq_resp.driver_data field so that low-level drivers can return data from a resize CQ operation to userspace. Have ib_uverbs_resize_cq() only copy the cqe field, to avoid having to bump the userspace ABI. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit fab97220c9e409a98b1956ba677ddd2dd43b0b95 Author: Heiko J Schick Date: Fri Sep 22 15:22:22 2006 -0700 IB/ehca: Add driver for IBM eHCA InfiniBand adapters Add a driver for IBM GX bus InfiniBand adapters, which are usable with some pSeries/System p systems. Signed-off-by: Heiko J Schick Signed-off-by: Roland Dreier commit 3b9f9a1c3903b64c38505f9fed3bb11e48dbc931 Author: Noriaki TAKAMIYA Date: Fri Sep 22 14:45:56 2006 -0700 [IPV6] ADDRCONF: Mobile IPv6 Home Address support. IFA_F_HOMEADDRESS is introduced for Mobile IPv6 Home Addresses on Mobile Node. The IFA_F_HOMEADDRESS flag should be set for Mobile IPv6 Home Addresses for 2 purposes. 1) We need to check this on receipt of Type 2 Routing Header (RFC3775 Secion 6.4), 2) We prefer Home Address(es) in source address selection (RFC3484 Section 5 Rule 4). Signed-off-by: Noriaki TAKAMIYA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 55ebaef1d5db9c1c76ba01a87fd986db5dee550d Author: Noriaki TAKAMIYA Date: Fri Sep 22 14:45:27 2006 -0700 [IPV6] ADDRCONF: Allow non-DAD'able addresses. IFA_F_NODAD flag, similar to IN6_IFF_NODAD in BSDs, is introduced to skip DAD. This flag should be set to Mobile IPv6 Home Address(es) on Mobile Node because DAD would fail if we should perform DAD; our Home Agent protects our Home Address(es). Signed-off-by: Noriaki TAKAMIYA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit fc26d0abd5afd2b5268a7dbdbf8be1095ce5703e Author: YOSHIFUJI Hideaki Date: Fri Sep 22 14:44:53 2006 -0700 [IPV6] NDISC: Fix is_router flag setting. We did not send appropriate IsRouter flag if the forwarding setting is positive even value. Let's give 1/0 value to ndisc_send_na(). Also, existing users of ndisc_send_na() give 0/1 to override, we can omit redundant operation in that function. Bug hinted by Nicolas Dichtel . Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 8814c4b533817df825485ff32ce6ac406c3a54d1 Author: YOSHIFUJI Hideaki Date: Fri Sep 22 14:44:24 2006 -0700 [IPV6] ADDRCONF: Convert addrconf_lock to RCU. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit fbea49e1e2404baa2d88ab47e2db89e49551b53b Author: YOSHIFUJI Hideaki Date: Fri Sep 22 14:43:49 2006 -0700 [IPV6] NDISC: Add proxy_ndp sysctl. We do not always need proxy NDP functionality even we enable forwarding. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 62dd93181aaa1d5a501a9cebcb254f44b8a48af7 Author: Ville Nuorvala Date: Fri Sep 22 14:43:19 2006 -0700 [IPV6] NDISC: Set per-entry is_router flag in Proxy NA. We have sent NA with router flag from the node-wide forwarding configuration. This is not appropriate for proxy NA, and it should be set according to each proxy entry's configuration. This is used by Mobile IPv6 home agent to support physical home link in acting as a proxy router for mobile node which is not a router, for example. Based on MIPL2 kernel patch. Signed-off-by: Ville Nuorvala Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki commit 5f3e6e9e19f50a6910aec2dbd479187aabba04b7 Author: Ville Nuorvala Date: Fri Sep 22 14:42:46 2006 -0700 [IPV6] NDISC: Avoid updating neighbor cache for proxied address in receiving NA. This aims at proxying router not updating neighbor cache entry for proxied address when it receives NA because either the proxied node is off link or it has already sent a NA to the proxied router. Based on MIPL2 kernel patch. Signed-off-by: Ville Nuorvala Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki commit 74553b09dcd9194cbda737016f0b89f245145670 Author: Ville Nuorvala Date: Fri Sep 22 14:42:18 2006 -0700 [IPV6]: Don't forward packets to proxied link-local address. Proxying router can't forward traffic sent to link-local address, so signal the sender and discard the packet. This behavior is clarified by Mobile IPv6 specification (RFC3775) but might be required for all proxying router. Based on MIPL2 kernel patch. Signed-off-by: Ville Nuorvala Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki commit e21e0b5f19ac7835a244c2016f7ed726f971b3e9 Author: Ville Nuorvala Date: Fri Sep 22 14:41:44 2006 -0700 [IPV6] NDISC: Handle NDP messages to proxied addresses. It is required to respond to NDP messages sent directly to the "target" unicast address. Proxying node (router) is required to handle such messages. To achieve this, check if the packet in forwarding patch is NDP message. With this patch, the proxy neighbor entries are always looked up in forwarding path. We may want to optimize further. Based on MIPL2 kernel patch. Signed-off-by: Ville Nuorvala Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki commit 4c5de695cf7f71c85ad8cfff509f6475b8bd4d27 Author: Patrick McHardy Date: Wed Sep 20 12:11:30 2006 -0700 [NETFILTER]: PPTP conntrack: fix another GRE keymap leak When the master PPTP connection times out while still having unfullfilled expectations (and a GRE keymap entry) associated with it, the keymap entry is not destroyed. Add a destroy callback to struct ip_conntrack_helper and use it to destroy PPTP siblings when the master is destroyed. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit fd5e3befa405ea64d4db6b393b821644bf963c57 Author: Patrick McHardy Date: Wed Sep 20 12:11:12 2006 -0700 [NETFILTER]: PPTP conntrack: fix GRE keymap leak When destroying the GRE expectations without having seen the GRE connection the keymap entry is not freed, leading to a memory leak and, in case of a following call within the same session, failure during expectation setup. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 62fbe9c82b20197a4f9c54f7add5d368418ba277 Author: Patrick McHardy Date: Wed Sep 20 12:10:52 2006 -0700 [NETFILTER]: PPTP conntrack: fix PPTP_IN_CALL message types Fix incorrectly used message types and call IDs: - PPTP_IN_CALL_REQUEST (PAC->PNS) contains a PptpInCallRequest (icreq) message and the PAC call ID - PPTP_IN_CALL_REPLY (PNS->PAC) contains a PptpInCallReply (icack) message and the PNS call ID Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 750a58423309b56751076329e9edf61b93213e0f Author: Patrick McHardy Date: Wed Sep 20 12:10:37 2006 -0700 [NETFILTER]: PPTP conntrack: check call ID before changing state For rejected calls the state is set to PPTP_CALL_NONE even for non-matching call ids. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 87a0117afdfe64473a6c802501bc15aee145ebb8 Author: Patrick McHardy Date: Wed Sep 20 12:10:21 2006 -0700 [NETFILTER]: PPTP conntrack: clean up debugging cruft Also make sure not to hand packets received in an invalid state to the NAT helper since it will mangle the packet with invalid data. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 4c651756d502e72a68b0bc6fb20bb18c68785227 Author: Patrick McHardy Date: Wed Sep 20 12:10:06 2006 -0700 [NETFILTER]: PPTP conntrack: consolidate header parsing Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit a1073406a124c1d3b33a0f06bfb8078a9ddd1985 Author: Patrick McHardy Date: Wed Sep 20 12:09:51 2006 -0700 [NETFILTER]: PPTP conntrack: consolidate header size checks Also make sure not to pass undersized messages to the NAT helper. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit cf9f81523ef3e95d9f222c896d266e4562999150 Author: Patrick McHardy Date: Wed Sep 20 12:09:34 2006 -0700 [NETFILTER]: PPTP conntrack: simplify expectation handling Remove duplicated expectation handling in the NAT helper and simplify the remains in the conntrack helper. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 857c06da2ba2e00b81677c2f6740048d87da0207 Author: Patrick McHardy Date: Wed Sep 20 12:09:19 2006 -0700 [NETFILTER]: PPTP conntrack: remove unnecessary cid/pcid header pointers Just the values are needed, not the memory locations. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 6013c0a13e335674a783215e182c367406294392 Author: Patrick McHardy Date: Wed Sep 20 12:08:56 2006 -0700 [NETFILTER]: PPTP conntrack: fix header definitions Fix a few header definitions to match RFC2637. Most importantly the PptpOutCallRequest header included an invalid padding field and a size check was disabled because of this. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 5256f663a0228af9bf69ba74ad9f0928f35713f7 Author: Patrick McHardy Date: Wed Sep 20 12:08:41 2006 -0700 [NETFILTER]: PPTP conntrack: remove more dead code The calculated sequence numbers are not used for anything. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit a1ad1deed5bf6fa06f2213b7f1a794de4cf791a6 Author: Patrick McHardy Date: Wed Sep 20 12:08:23 2006 -0700 [NETFILTER]: PPTP conntrack: remove dead code The call ID in reply packets is never changed, remove the code. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 955b944293dd4c931ec866ebe19a6b2463b8f9a0 Author: Patrick McHardy Date: Wed Sep 20 12:08:03 2006 -0700 [NETFILTER]: PPTP conntrack: get rid of unnecessary byte order conversions The conntrack structure contains the call ID in host byte order for no reason, get rid of back and forth conversions. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit edd5a329cf69c112882e03c8ab55e985062a5d2a Author: Patrick McHardy Date: Wed Sep 20 12:07:39 2006 -0700 [NETFILTER]: PPTP conntrack: fix whitespace errors Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 127f15dd659b20e722561ff8c86dc058e1a72323 Author: Patrick McHardy Date: Wed Sep 20 12:07:23 2006 -0700 [NETFILTER]: ipt_hashlimit: add compat conversion functions Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 02c63cf777c331121bfb6e9c1440a9835ad2f2a8 Author: Patrick McHardy Date: Wed Sep 20 12:07:06 2006 -0700 [NETFILTER]: xt_limit: add compat conversion functions Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 7ce975b9da93b46dbf6ba70a1b4751bec211d079 Author: Patrick McHardy Date: Wed Sep 20 12:06:40 2006 -0700 [NETFILTER]: xt_CONNMARK: add compat conversion functions Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit f1eda05386ade8dad4e8e9b48ecbd9432b6739d9 Author: Patrick McHardy Date: Wed Sep 20 12:06:25 2006 -0700 [NETFILTER]: xt_connmark: add compat conversion functions Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit be7263b7b72ed9d5d25958f2b71e77e889e4845a Author: Patrick McHardy Date: Wed Sep 20 12:06:10 2006 -0700 [NETFILTER]: xt_MARK: add compat conversion functions Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit bc80b656657251fc936d2d93fc70d5566c1c7d29 Author: Patrick McHardy Date: Wed Sep 20 12:05:54 2006 -0700 [NETFILTER]: xt_mark: add compat conversion functions Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 Author: Patrick McHardy Date: Wed Sep 20 12:05:37 2006 -0700 [NETFILTER]: x_tables: simplify compat API Split the xt_compat_match/xt_compat_target into smaller type-safe functions performing just one operation. Handle all alignment and size-related conversions centrally in these function instead of requiring each module to implement a full-blown conversion function. Replace ->compat callback by ->compat_from_user and ->compat_to_user callbacks, responsible for converting just a single private structure. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 79030ed07de673e8451a03aecb9ada9f4d75d491 Author: Patrick McHardy Date: Wed Sep 20 12:05:08 2006 -0700 [NETFILTER]: ip_tables: revision support for compat code Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit bec71b162747708d4b45b0cd399b484f52f2901a Author: Patrick McHardy Date: Wed Sep 20 12:04:08 2006 -0700 [NETFILTER]: ip_tables: fix module refcount leaks in compat error paths Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 1192e403e9ea2dc23bbbe2b4fe9bdbc47e8c6056 Author: Brian Haley Date: Wed Sep 20 12:03:46 2006 -0700 [NETFILTER]: make some netfilter globals __read_mostly Signed-off-by: Brian Haley Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit c1fe3ca5106d9568791433fa6c7f27e71ac69e1b Author: George Hansper Date: Wed Sep 20 12:03:23 2006 -0700 [NETFILTER]: TCP conntrack: improve dead connection detection Don't count window updates as retransmissions. Signed-off-by: George Hansper Signed-off-by: Patrick McHardy commit 71cd83a8bde61612b277fd5bf91503ac1ad61e23 Author: Alexey Dobriyan Date: Wed Sep 20 12:02:44 2006 -0700 [NETFILTER]: xt_policy: remove dups in .family sparse "defined twice" warning Signed-off-by: Alexey Dobriyan Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 7cf73936fe6bb9b027b75fd8fa3c634fe74843d3 Author: Patrick McHardy Date: Wed Sep 20 12:02:21 2006 -0700 [NETFILTER]: ip6t_HL: remove write-only variable Noticed by Alexey Dobriyan Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit ca39df6cdfbe2ea210e31117f5d469576cfe9008 Author: Patrick McHardy Date: Wed Sep 20 12:01:34 2006 -0700 [NETFILTER]: ipt_TTL: fix checksum update bug Fix regression introduced by the incremental checksum patches. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 5251e2d2125407bbff0c39394a4011be9ed8b5d0 Author: Pablo Neira Ayuso Date: Wed Sep 20 12:01:06 2006 -0700 [NETFILTER]: conntrack: fix race condition in early_drop On SMP environments the maximum number of conntracks can be overpassed under heavy stress situations due to an existing race condition. CPU A CPU B atomic_read() ... early_drop() ... ... atomic_read() allocate conntrack allocate conntrack atomic_inc() atomic_inc() This patch moves the counter incrementation before the early drop stage. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 01f348484dd8509254d045e3ad49029716eca6a1 Author: Pablo Neira Ayuso Date: Wed Sep 20 12:00:45 2006 -0700 [NETFILTER]: ctnetlink: simplify the code to dump the conntrack table Merge the bits to dump the conntrack table and the ones to dump and zero counters in a single piece of code. This patch does not change the default behaviour if accounting is not enabled. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 90d47db4a06f93f7339618b2a4f0cb032ef8d6d5 Author: Dmitry Mishin Date: Wed Sep 20 12:00:21 2006 -0700 [NETFILTER]: x_tables: small check_entry & module_refcount cleanup While standard_target has target->me == NULL, module_put() should be called for it as for others, because there were try_module_get() before. Signed-off-by: Dmitry Mishin Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 9123de2c043996050bacf77031cad845f5976f5d Author: Patrick McHardy Date: Wed Sep 20 11:59:42 2006 -0700 [NETFILTER]: ip6table_mangle: reroute when nfmark changes in NF_IP6_LOCAL_OUT Now that IPv6 supports policy routing we need to reroute in NF_IP6_LOCAL_OUT when the mark value changes. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 57dab5d0bfee21663ed20222b4cedeb0655ba1f3 Author: Patrick McHardy Date: Wed Sep 20 11:59:25 2006 -0700 [NETFILTER]: xt_limit: don't reset state on unrelated rule updates The limit match reinitializes its state whenever the ruleset changes, which means it will forget about previously used credits. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit ecb70c95c45ece0935b076295388267f6d8db65c Author: Patrick McHardy Date: Wed Sep 20 11:59:06 2006 -0700 [NETFILTER]: ipt_TCPMSS: misc cleanup - remove debugging cruft - remove printk for reallocation failures - remove unused addition Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 2be344c4461d29b99113f62fa91c5ceab9997329 Author: Patrick McHardy Date: Wed Sep 20 11:58:50 2006 -0700 [NETFILTER]: ipt_TCPMSS: remove impossible condition Every skb must have a dst_entry at this point. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 68e1f188de535865d4543bae92d168c007857e7b Author: Patrick McHardy Date: Wed Sep 20 11:58:35 2006 -0700 [NETFILTER]: ipt_TCPMSS: reformat - fix whitespace error - break lines at 80 characters - reformat some expressions to be more readable Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 50b9f1d509eb998db73cd769c9511186474f566e Author: Patrick McHardy Date: Wed Sep 20 11:58:17 2006 -0700 [NETFILTER]: xt_conntrack: clean up overly long lines Also fix some whitespace errors and use the NAT bits instead of deriving the state manually. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit df0933dcb027e156cb5253570ad694b81bd52b69 Author: Patrick McHardy Date: Wed Sep 20 11:57:53 2006 -0700 [NETFILTER]: kill listhelp.h Kill listhelp.h and use the list.h functions instead. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 1bf38a36b6a0e810dafae048fdbb999e587f0f2f Author: Patrick McHardy Date: Wed Sep 20 11:57:09 2006 -0700 [NETFILTER]: remove unused include file Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit c55e2f4997a104d66b59bdf1aa8ab125d09ae00a Author: Al Viro Date: Tue Sep 19 13:23:19 2006 -0700 [IPV4]: ipip and ip_gre encapsulation bugs Handling of ipip and ip_gre ICMP error relaying is b0rken; it accesses 8bit field + 3 reserved octets as host-endian 32bit, does comparison, subtraction and stuffs the result back. That breaks on big-endian. Fixed, made endian-clean. [ Note that this effected code is permanently commented out with and ifdef, so this error couldn't actually cause problems for anyone. -DaveM ] Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 593f16aa627d61da447c76ee5a159450174627f6 Author: Andrea Bittau Date: Tue Sep 19 13:15:33 2006 -0700 [DCCP] CCID2: Add helper functions for changing important CCID2 state Introduce methods which manipulate interesting congestion control state such as pipe and rtt estimate. This is useful for people wishing to monitor the variables of CCID and instrument the code [perhaps using Kprobes]. Personally, I am a fan of encapsulation---that justifies this change =D. Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit 374bcf32c86e1b56eab832bbb6b21e636707eab6 Author: Andrea Bittau Date: Tue Sep 19 13:14:43 2006 -0700 [DCCP] CCID2: Halve cwnd once upon multiple losses in a single RTT When multiple losses occur in one RTT, the window should be halved only once [a single "congestion event"]. This is now implemented, although not perfectly. Slightly changed the interface for changing the cwnd: pass hctx instead of dp. This is required in order to allow for change_cwnd to be called from _init(). Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit 07978aabd52ce67f59971872c80f76d6e3ca18ae Author: Andrea Bittau Date: Tue Sep 19 13:13:37 2006 -0700 [DCCP] CCID2: Allocate seq records on demand Allocate more sequence state on demand. Each time a packet is sent out by CCID2, a record of it needs to be kept. This list of records grows proportionally to cwnd. Previously, the length of this list was hardcored and therefore the cwnd could only grow to this value (of 128). Now, records are allocated on demand as necessary---cwnd may grow as it wishes. The exceptional case of when memory is not available is not handled gracefully. Perhaps, cwnd should be capped at that point. Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit 8d424f6ca2d02026dadff409770639d720375afb Author: Andrea Bittau Date: Tue Sep 19 13:12:44 2006 -0700 [DCCP] CCID2: Add Kconfig option for CCID2 debug Allow the user to choose whether or not to enable CCID2 debugging via Kconfig. Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit 446dec30c7f305ed1bb0092b0a8d9367d842a33f Author: Andrea Bittau Date: Tue Sep 19 13:10:11 2006 -0700 [DCCP] CCID2: Tell DCCP to quickly check whether cwnd is available If not enough cwnd is available, tell the sender to check again as soon as possible. This will increase CPU utilization (polling frequently for cwnd) but will improve network performance. That is, the sender will need to wait less before detecting the increase of cwnd. A better architecture would be for the CCID to call-back (or dequeue) from DCCP when it is able to transmit traffic -- not the other way around as it currently occurs. Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit 69263bcfb5016bc3bdd099607a4232cba06f8491 Author: Adrian Bunk Date: Fri Sep 22 14:28:11 2006 -0700 [ATM]: proper prototypes in net/atm/mpc.h (and reduce ifdef clutter) Signed-off-by: Adrian Bunk Signed-off-by: Chas Williams Signed-off-by: David S. Miller commit d458c25ce24ce00ea547e9976e293e7835416253 Author: Andrea Bittau Date: Tue Sep 19 13:07:20 2006 -0700 [DCCP] CCID2: Initialize ssthresh to infinity Initialize the slow-start threshold to infinity. This way, upon connection initiation, slow-start will be exited only upon a packet loss. This patch will allow connections to quickly gain speed. Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit 29651cda97b0a9e4ac0fbeb5ea731a9909f0f128 Author: Andrea Bittau Date: Tue Sep 19 13:06:46 2006 -0700 [DCCP] CCID2: Fix jiffie wrap issues Jiffies are now handled correctly (I hope) in CCID2. If they wrap, no problem. Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit 4a0a50fb43912b4a593d2416c507a198fe607a6d Author: Andrea Bittau Date: Tue Sep 19 13:06:16 2006 -0700 [DCCP] ackvec: Remove unused variables Get rid of unused variables in ackvector state. Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit 8e27e4650cb7e73aa4dd97d860539e7605ac7e39 Author: Andrea Bittau Date: Tue Sep 19 13:05:35 2006 -0700 [DCCP] ackvec: Fix how DCCP_ACKVEC_STATE_NOT_RECEIVED is used Fix the way state is masked out. DCCP_ACKVEC_STATE_NOT_RECEIVED is defined as appears in the packet, therefore bit shifting is not required. This fix allows CCID2 to correctly detect losses. Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit 23d06e3b986677ec57007a24891fa9deb09ac973 Author: Andrea Bittau Date: Tue Sep 19 13:04:54 2006 -0700 [DCCP] ACKVEC: fix ackvector length calculation Fix ackvector length calculation upon receiving an "ack-of-ack". This patch avoids the ackvector from growing too large which causes it to not be inserted into packets. Signed-off-by: Andrea Bittau Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit a1e59abf824969554b90facd44a4ab16e265afa4 Author: Patrick McHardy Date: Tue Sep 19 12:57:34 2006 -0700 [XFRM]: Fix wildcard as tunnel source Hashing SAs by source address breaks templates with wildcards as tunnel source since the source address used for hashing/lookup is still 0/0. Move source address lookup to xfrm_tmpl_resolve_one() so we can use the real address in the lookup. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 1ef9696c909060ccdae3ade245ca88692b49285b Author: Alexey Kuznetsov Date: Tue Sep 19 12:52:50 2006 -0700 [TCP]: Send ACKs each 2nd received segment. It does not affect either mss-sized connections (obviously) or connections controlled by Nagle (because there is only one small segment in flight). The idea is to record the fact that a small segment arrives on a connection, where one small segment has already been received and still not-ACKed. In this case ACK is forced after tcp_recvmsg() drains receive buffer. In other words, it is a "soft" each-2nd-segment ACK, which is enough to preserve ACK clock even when ABC is enabled. Signed-off-by: Alexey Kuznetsov Signed-off-by: David S. Miller commit 4eb327b517cf85f6cb7dcd5691e7b748cbe8c343 Author: Venkat Yekkirala Date: Tue Sep 19 10:24:19 2006 -0700 [SELINUX]: Fix bug in security_sid_mls_copy The following fixes a bug where random mem is being tampered with in the non-mls case; encountered by Jashua Brindle on a gentoo box. Signed-off-by: Venkat Yekkirala Acked-by: Stephen Smalley Signed-off-by: James Morris commit 161643660129dd7d98f0b12418c0a2710ffa7db6 Author: Adrian Bunk Date: Mon Sep 18 00:40:38 2006 -0700 [SCTP]: Cleanups This patch contains the following cleanups: - make the following needlessly global function static: - socket.c: sctp_apply_peer_addr_params() - add proper prototypes for the several global functions in include/net/sctp/sctp.h Note that this fixes wrong prototypes for the following functions: - sctp_snmp_proc_exit() - sctp_eps_proc_exit() - sctp_assocs_proc_exit() The latter was spotted by the GNU C compiler and reported by David Woodhouse. Signed-off-by: Adrian Bunk Acked-by: Sridhar Samudrala Signed-off-by: David S. Miller commit 7198f8cec12ccec6d6f2e18c08ecc8c66c8aaf93 Author: Thomas Graf Date: Mon Sep 18 00:13:46 2006 -0700 [IPV6] address: Support NLM_F_EXCL when adding addresses iproute2 doesn't provide the NLM_F_CREATE flag when adding addresses, it is assumed to be implied. The existing code issues a check on said flag when the modify operation fails (likely due to ENOENT) before continueing to create it, this leads to a hard to predict result, therefore the NLM_F_CREATE check is removed. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 680a27a23af45307095ae432dd0bc859e1fbe219 Author: Thomas Graf Date: Mon Sep 18 00:13:07 2006 -0700 [IPV6] address: Allow address changes while device is administrative down Same behaviour as IPv4, using IFF_UP is a no-no anyway. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 0ab6803bc90a8ee5c860ef09334b30007d1746be Author: Thomas Graf Date: Mon Sep 18 00:12:35 2006 -0700 [IPV6] address: Convert address dumping to new netlink api Replaces INET6_IFADDR_RTA_SPACE with a new function calculating the total required message size for all address messages. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 101bb229691c438bce4d7f13006494dd4de6910a Author: Thomas Graf Date: Mon Sep 18 00:11:52 2006 -0700 [IPV6] address: Add put_ifaddrmsg() and rt_scope() Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 85486af00b620ebe26fe0fa72172c115667a2fba Author: Thomas Graf Date: Mon Sep 18 00:11:24 2006 -0700 [IPV6] address: Add put_cacheinfo() to dump struct cacheinfo Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 1b29fc2c8bf42d8fc5310f3770d7fd7ddf4386c0 Author: Thomas Graf Date: Mon Sep 18 00:10:50 2006 -0700 [IPV6] address: Convert address lookup to new netlink api Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit b933f7166ba376967f88a598ff04256f6d1b0b21 Author: Thomas Graf Date: Mon Sep 18 00:10:19 2006 -0700 [IPV6] address: Convert address deletion to new netlink api Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 461d8837faac141f4676bf451b3339d0e48656d1 Author: Thomas Graf Date: Mon Sep 18 00:09:49 2006 -0700 [IPV6] address: Convert address addition to new netlink api Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 94aec08ea426903a3fb3cafd4d8b900cd50df702 Author: Brian Haley Date: Mon Sep 18 00:05:22 2006 -0700 [NETFILTER]: Change tunables to __read_mostly Change some netfilter tunables to __read_mostly. Also fixed some incorrect file reference comments while I was in there. (this will be my last __read_mostly patch unless someone points out something else that needs it) Signed-off-by: Brian Haley Acked-by: Patrick McHardy Signed-off-by: David S. Miller commit 4cbf1cae9f08c76ed92700090a69a5b1f1f6a982 Author: Brian Haley Date: Mon Sep 18 00:04:22 2006 -0700 [SCTP]: Change globals to __read_mostly Change sctp globals to __read_mostly. Signed-off-by: Brian Haley Signed-off-by: David S. Miller commit 9c1ea148ad8bb06538b43908891afedebeaf361b Author: Brian Haley Date: Mon Sep 18 00:03:41 2006 -0700 [BRIDGE]: Change sysctl tunables to __read_mostly Change some bridge sysctl tunables to __read_mostly. Signed-off-by: Brian Haley Signed-off-by: David S. Miller commit eb328111efde7bca782f340fe805756039ec6a0c Author: Thomas Graf Date: Mon Sep 18 00:01:59 2006 -0700 [GENL]: Provide more information to userspace about registered genl families Additionaly exports the following information when providing the list of registered generic netlink families: - protocol version - header size - maximum number of attributes - list of available operations including - id - flags - avaiability of policy and doit/dumpit function libnl HEAD provides a utility to read this new information: 0x0010 nlctrl version 1 hdrsize 0 maxattr 6 op GETFAMILY (0x03) [POLICY,DOIT,DUMPIT] 0x0011 NLBL_MGMT version 1 hdrsize 0 maxattr 0 op unknown (0x02) [DOIT] op unknown (0x03) [DOIT] .... Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 78e5b8916e7db119850f57ce8548fbb9767078fc Author: Patrick McHardy Date: Wed Sep 13 20:35:36 2006 -0700 [RTNETLINK]: Fix netdevice name corruption When changing a device by ifindex without including a IFLA_IFNAME attribute, the ifname variable contains random garbage and is used to change the device name. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit d1d9facfd1b326e0df587c96f0ee55de2ae9f946 Author: James Morris Date: Fri Sep 1 00:32:12 2006 -0700 [XFRM]: remove xerr_idxp from __xfrm_policy_check() It seems that during the MIPv6 respin, some code which was originally conditionally compiled around CONFIG_XFRM_ADVANCED was accidently left in after the config option was removed. This patch removes an extraneous pointer (xerr_idxp) which is no longer needed. Signed-off-by: James Morris Acked-by: Masahide NAKAMURA Signed-off-by: David S. Miller commit eb878e84575fbce21d2edb079eada78bfa27023d Author: Jamal Hadi Salim Date: Thu Aug 31 17:42:59 2006 -0700 [IPSEC]: output mode to take an xfrm state as input param Expose IPSEC modes output path to take an xfrm state as input param. This makes it consistent with the input mode processing (which already takes the xfrm state as a param). Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit fda9ef5d679b07c9d9097aaf6ef7f069d794a8f9 Author: Dmitry Mishin Date: Thu Aug 31 15:28:39 2006 -0700 [NET]: Fix sk->sk_filter field access Function sk_filter() is called from tcp_v{4,6}_rcv() functions with arg needlock = 0, while socket is not locked at that moment. In order to avoid this and similar issues in the future, use rcu for sk->sk_filter field read protection. Signed-off-by: Dmitry Mishin Signed-off-by: Alexey Kuznetsov Signed-off-by: Kirill Korotaev commit dc435e6dac1439340eaeceef84022c4e4749796d Author: Masahide NAKAMURA Date: Thu Aug 31 15:18:49 2006 -0700 [IPV6] MIP6: Fix to update IP6CB when cloned skbuff is received at HAO. Signed-off-by: Masahide NAKAMURA Signed-off-by: David S. Miller commit a9917c06652165fe4eeb9ab7a5d1e0674e90e508 Author: Masahide NAKAMURA Date: Thu Aug 31 15:14:32 2006 -0700 [XFRM] STATE: Fix flusing with hash mask. This is a minor fix about transformation state flushing for net-2.6.19. Please apply it. Signed-off-by: David S. Miller commit ff9b5e0f08cb650d113eef0c654f931c0a7ae730 Author: Herbert Xu Date: Thu Aug 31 15:11:02 2006 -0700 [TCP]: Fix rcv mss estimate for LRO By passing a Linux-generated TSO packet straight back into Linux, Xen becomes our first LRO user :) Unfortunately, there is at least one spot in our stack that needs to be changed to cope with this. The receive MSS estimate is computed from the raw packet size. This is broken if the packet is GSO/LRO. Fortunately the real MSS can be found in gso_size so we simply need to use that if it is non-zero. Real LRO NICs should of course set the gso_size field in future. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 3015d5d4e5b15eddea272a697e83391100581932 Author: Thomas Graf Date: Thu Aug 31 15:04:30 2006 -0700 [RTNETLINK]: Fix typo causing wrong skb to be freed A typo introduced by myself which leads to freeing the skb containing the netlink message when it should free the newly allocated skb for the reply. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 18adaf067cf013fc2690d3830eba99ff800795b4 Author: Brian Haley Date: Thu Aug 31 15:03:36 2006 -0700 [AF_UNIX]: Change max_dgram_qlen sysctl to __read_mostly Signed-off-by: Brian Haley Signed-off-by: David S. Miller commit 7a42c2175703f54a3640f25dc078c8190a4f904e Author: Brian Haley Date: Thu Aug 31 15:03:02 2006 -0700 [NET]: Change somaxconn sysctl to __read_mostly Signed-off-by: Brian Haley Signed-off-by: David S. Miller commit 28a7b327b8cc8ea35662d360d3d11d60195debc9 Author: Adrian Bunk Date: Wed Aug 30 15:03:07 2006 -0700 [PKT_SCHED] act_simple.c: make struct simp_hash_info static This patch makes the needlessly global struct simp_hash_info static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller commit 7a0e1d602288370801c353221c6a938eab925053 Author: Paul Moore Date: Tue Aug 29 17:56:04 2006 -0700 [NetLabel]: add some missing #includes to various header files Add some missing include files to the NetLabel related header files. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit e448e931309e703f51d71a557973c620ff12fbda Author: Paul Moore Date: Tue Aug 29 17:55:38 2006 -0700 [NetLabel]: uninline selinux_netlbl_inode_permission() Uninline the selinux_netlbl_inode_permission() at the request of Andrew Morton. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 7b3bbb926f4b3dd3a007dcf8dfa00203f52cb58d Author: Paul Moore Date: Tue Aug 29 17:55:11 2006 -0700 [NetLabel]: Cleanup ebitmap_import() Rewrite ebitmap_import() so it is a bit cleaner and easier to read. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit c1b14c0a46232246f61d3157bac1201e1e102227 Author: Paul Moore Date: Tue Aug 29 17:54:41 2006 -0700 [NetLabel]: Comment corrections. Fix some incorrect comments. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 1b7f775209bbee6b993587bae69acb9fc12ceb17 Author: Paul Moore Date: Tue Aug 29 17:54:17 2006 -0700 [NetLabel]: remove unused function prototypes Removed some older function prototypes for functions that no longer exist. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 99f59ed073d3c1b890690064ab285a201dea2e35 Author: Paul Moore Date: Tue Aug 29 17:53:48 2006 -0700 [NetLabel]: Correctly initialize the NetLabel fields. Fix a problem where the NetLabel specific fields of the sk_security_struct structure were not being initialized early enough in some cases. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit fc747e82b40ea50a62eb2aef55bedd4465607cb0 Author: Ian McDonald Date: Tue Aug 29 17:50:19 2006 -0700 [DCCP]: Tidyup CCID3 list handling As Arnaldo Carvalho de Melo points out I should be using list_entry in case the structure changes in future. Current code functions but is reliant on position and requires type cast. Noticed when doing this that I have one more variable than I needed so removing that also. Signed off by: Ian McDonald Signed-off-by: David S. Miller commit 8394e9b2faf539f82470b36c86f0485cab5278bd Author: Stephen Hemminger Date: Tue Aug 29 17:49:31 2006 -0700 [NETFILTER] bridge: debug message fixes If CONFIG_NETFILTER_DEBUG is enabled, it shouldn't change the actions of the filtering. The message about skb->dst being NULL is commonly triggered by dhclient, so it is useless. Make sure all messages end in newline. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 9bcfcaf5e9cc887eb39236e43bdbe4b4b2572229 Author: Stephen Hemminger Date: Tue Aug 29 17:48:57 2006 -0700 [NETFILTER] bridge: simplify nf_bridge_pad Do some simple optimization on the nf_bridge_pad() function and don't use magic constants. Eliminate a double call and the #ifdef'd code for CONFIG_BRIDGE_NETFILTER. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 07317621d004e8e6967f2dac8562825267e56135 Author: Stephen Hemminger Date: Tue Aug 29 17:48:17 2006 -0700 [NETFILTER] bridge: code rearrangement for clarity Cleanup and rearrangement for better style and clarity: Split the function nf_bridge_maybe_copy_header into two pieces Move copy portion out of line. Use Ethernet header size macros. Use header file to handle CONFIG_NETFILTER_BRIDGE differences Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit cd360007a0eb8cbf17c006cca42aa884d33f96be Author: Alexey Dobriyan Date: Mon Aug 28 23:58:32 2006 -0700 [IPV4]: Make struct sockaddr_in::sin_port __be16 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit def42ff4dd6f54ebcf78192579a8ff1f81d8e2e8 Author: Alexey Dobriyan Date: Mon Aug 28 23:57:56 2006 -0700 [IPV4]: Make struct in_addr::s_addr __be32 There will be relatively small increase in sparse endian warnings, but this (and sin_port) patch is a first step to make networking code endian clean. Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit 0719bdf1b5e7eb0d9c3c73ebbd9c9d5d382bb9e1 Author: Benoit Boissinot Date: Mon Aug 28 17:50:37 2006 -0700 [NETFILTER]: xt_CONNMARK.c build fix net/netfilter/xt_CONNMARK.c: In function 'target': net/netfilter/xt_CONNMARK.c:59: warning: implicit declaration of function 'nf_conntrack_event_cache' The warning is due to the following .config: CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CONNTRACK_EVENTS is not set CONFIG_IP_NF_CONNTRACK_NETLINK=m This change was introduced by: http://www.kernel.org/git/?p=linux/kernel/git/davem/net-2.6.19.git;a=commit;h=76e4b41009b8a2e9dd246135cf43c7fe39553aa5 Proposed solution (based on the define in include/net/netfilter/nf_conntrack_compat.h: Signed-off-by: Benoit Boissinot Acked-by: Pablo Neira Ayuso Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 33cc48966827165e49de1cb8ff4fb57c127d4be0 Author: YOSHIFUJI Hideaki Date: Mon Aug 28 13:19:30 2006 -0700 [IPV6] ROUTE: Fix dst reference counting in ip6_pol_route_lookup(). In ip6_pol_route_lookup(), when we finish backtracking at the top-level root entry, we need to hold it. Bug noticed by Mitsuru Chinen . Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 5176f91ea83f1a59eba4dba88634a4729d51d1ac Author: Thomas Graf Date: Sat Aug 26 20:13:18 2006 -0700 [NETLINK]: Make use of NLA_STRING/NLA_NUL_STRING attribute validation Converts existing NLA_STRING attributes to use the new validation features, saving a couple of temporary buffers. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit a5531a5d852008be40811496029012f4ad3093d1 Author: Thomas Graf Date: Sat Aug 26 20:11:47 2006 -0700 [NETLINK]: Improve string attribute validation Introduces a new attribute type NLA_NUL_STRING to support NUL terminated strings. Attributes of this kind require to carry a terminating NUL within the maximum specified in the policy. The `old' NLA_STRING which is not required to be NUL terminated is extended to provide means to specify a maximum length of the string. Aims at easing the pain with using nla_strlcpy() on temporary buffers. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit e3b4eadbea77ecb3c3a74d1bc81b392f454c7f2e Author: David S. Miller Date: Sat Aug 26 20:10:15 2006 -0700 [UDP]: saddr_cmp function should take const socket pointers This also kills a warning while building ipv6: net/ipv6/udp.c: In function ‘udp_v6_get_port’: net/ipv6/udp.c:66: warning: passing argument 3 of ‘udp_get_port’ from incompatible pointer type Signed-off-by: David S. Miller commit bed53ea7fef37820b7c92ad74feff1b817c6aae3 Author: David S. Miller Date: Sat Aug 26 20:06:49 2006 -0700 [UDP]: Mark udp_port_rover static. It is not referenced outside of net/ipv4/udp.c any longer. Signed-off-by: David S. Miller commit 25030a7f9eeab2dcefff036469e0e2b4f956198f Author: Gerrit Renker Date: Sat Aug 26 20:06:05 2006 -0700 [UDP]: Unify UDPv4 and UDPv6 ->get_port() This patch creates one common function which is called by udp_v4_get_port() and udp_v6_get_port(). As a result, * duplicated code is removed * udp_port_rover and local port lookup can now be removed from udp.h * further savings follow since the same function will be used by UDP-Litev4 and UDP-Litev6 In contrast to the patch sent in response to Yoshifujis comments (fixed by this variant), the code below also removes the EXPORT_SYMBOL(udp_port_rover), since udp_port_rover can now remain local to net/ipv4/udp.c. Signed-off-by: Gerrit Renker Signed-off-by: David S. Miller commit 6a28ec8cd0c6993a4ac0d52f4347f7ed077b5cac Author: David S. Miller Date: Sat Aug 26 19:48:49 2006 -0700 [NETFILTER]: Fix nf_conntrack_ftp.c build. Noticed by Adrian Bunk. Signed-off-by: David S. Miller commit e5d679f33900c71d1a76ba07c5b04055abd34480 Author: Alexey Dobriyan Date: Sat Aug 26 19:25:52 2006 -0700 [NET]: Use SLAB_PANIC Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit ff5dfe736dd9f6c74b206aa77c0465dfd503bdb9 Author: Johannes Berg Date: Sat Aug 26 19:17:53 2006 -0700 [NETLINK]: remove third bogus argument from NLA_PUT_FLAG This patch removes the 'value' argument from NLA_PUT_FLAG which is unused anyway. The documentation comment was already correct so it doesn't need an update :) Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 97e5848dd39e7e76bd6077735ebb5473763ab9c5 Author: Ian McDonald Date: Sat Aug 26 19:16:45 2006 -0700 [DCCP]: Introduce tx buffering This adds transmit buffering to DCCP. I have tested with CCID2/3 and with loss and rate limiting. Signed off by: Ian McDonald Signed-off-by: David S. Miller commit 2a0109a707d2b0ae48f124d3be0fdf1715c0107a Author: Ian McDonald Date: Sat Aug 26 19:15:35 2006 -0700 [DCCP]: Shift sysctls into feat.h This shifts further sysctls into feat.h. No change in functionality - shifting code only. Signed off by: Ian McDonald Signed-off-by: David S. Miller commit ef047f5e1085d6393748d1ee27d6327905f098dc Author: YOSHIFUJI Hideaki Date: Fri Sep 1 00:29:06 2006 -0700 [NET]: Use BUILD_BUG_ON() for checking size of skb->cb. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 366e4adc0f9ef33f56c62f980a7d83775e64abd0 Author: Patrick McHardy Date: Sat Aug 26 16:50:20 2006 -0700 [IPV6]: Fix routing by fwmark Fix mark comparison, also dump the mask to userspace when the mask is zero, but the mark is not (in which case the mark is dumped, so the mask is needed to make sense of it). Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 74975d40b16fd4bad24a2e2630dc7957d8cba013 Author: Alexey Dobriyan Date: Fri Aug 25 17:10:33 2006 -0700 [TCP] Congestion control (modulo lp, bic): use BUILD_BUG_ON Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit b4e9b520ca5d07a37ea59648e7f50f478e7487a3 Author: Patrick McHardy Date: Fri Aug 25 16:11:42 2006 -0700 [NET_SCHED]: Add mask support to fwmark classifier Support masking the nfmark value before the search. The mask value is global for all filters contained in one instance. It can only be set when a new instance is created, all filters must specify the same mask. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 88e91f290307d22ae88302e3a24f0c36905e8a6c Author: Patrick McHardy Date: Fri Aug 25 16:11:08 2006 -0700 [DECNET]: Add support for fwmark masks in routing rules Add support for fwmark masks. For compatibility a mask of 0xFFFFFFFF is used when a mark value != 0 is sent without a mask. Signed-off-by: Patrick McHardy Acked-by: Steven Whitehouse Signed-off-by: David S. Miller commit bbfb39cbf63829d1db607aa90cbdca557a3a131d Author: Patrick McHardy Date: Fri Aug 25 16:10:14 2006 -0700 [IPV4]: Add support for fwmark masks in routing rules Add a FRA_FWMASK attributes for fwmark masks. For compatibility a mask of 0xFFFFFFFF is used when a mark value != 0 is sent without a mask. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 267935b197d2a6e6924f9de2841f0470bfe63acd Author: David S. Miller Date: Fri Aug 25 16:07:48 2006 -0700 [IPV6]: Fix build with fwmark disabled. Based upon a patch by Brian Haley. Signed-off-by: David S. Miller commit cd9d742622fbc2190221e0b2aca80596bfd17733 Author: YOSHIFUJI Hideaki Date: Fri Aug 25 16:05:43 2006 -0700 [IPV6] ROUTE: Add support for fwmask in routing rules. Add support for fwmark masks. A mask of 0xFFFFFFFF is used when a mark value != 0 is sent without a mask. Based on patch for net/ipv4/fib_rules.c by Patrick McHardy . Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 2613aad5ab28579687519918cdc353af0eed5a3f Author: YOSHIFUJI Hideaki Date: Fri Aug 25 16:05:00 2006 -0700 [IPV6] ROUTE: Fix size of fib6_rule_policy. It should not be RTA_MAX+1 but FRA_MAX+1. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 6c5eb6a50741b882fd99fbb8178942ca2f74b724 Author: YOSHIFUJI Hideaki Date: Fri Aug 25 16:04:29 2006 -0700 [IPV6] ROUTE: Fix FWMARK support. - Add missing nla_policy entry. - type of fwmark is u32, not u8. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit acba48e1a3c95082af1e12c5efaaca3506103a92 Author: David S. Miller Date: Fri Aug 25 15:46:46 2006 -0700 [XFRM]: Respect priority in policy lookups. Even if we find an exact match in the hash table, we must inspect the inexact list to look for a match with a better priority. Noticed by Masahide NAKAMURA . Signed-off-by: David S. Miller commit 65e3d72654d9a33cdccd5c19777a5515ae9dd37d Author: Alexey Dobriyan Date: Fri Aug 25 00:38:03 2006 -0700 [TCP] tcp_bic: use BUILD_BUG_ON Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit 298969727e7b855d53f3becfa92c055914082ec4 Author: Alexey Dobriyan Date: Fri Aug 25 00:37:24 2006 -0700 [TCP] tcp_lp: use BUILD_BUG_ON Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit d4f3e9b735c72823aab597bfa4860d184658a609 Author: David S. Miller Date: Fri Aug 25 00:27:09 2006 -0700 [NET] in6_pton: Kill errant printf statement. Signed-off-by: David S. Miller commit 1884f78c7a8b456c654338e3eb2874a99688ea10 Author: YOSHIFUJI Hideaki Date: Mon Jun 19 03:20:32 2006 +0900 [NETFILTER] NF_CONNTRACK_FTP: Use in6_pton() to convert address string. Signed-off-by: YOSHIFUJI Hideaki commit 1aaec67f9335a17856dfacdd3e5cc6f4c18faeec Author: YOSHIFUJI Hideaki Date: Sun Jun 25 23:54:55 2006 +0900 [NET]: Add common helper functions to convert IPv6/IPv4 address string to network address structure. These helpers can be used in netfilter, cifs etc. Signed-off-by: YOSHIFUJI Hideaki commit 75bff8f023e02b045a8f68f36fa7da98dca124b8 Author: YOSHIFUJI Hideaki Date: Mon Aug 21 19:22:01 2006 +0900 [IPV6] ROUTE: Routing by FWMARK. Based on patch by Jean Lorchat . Signed-off-by: YOSHIFUJI Hideaki commit 2cc67cc731d9b693a08e781e98fec0e3a6d6ba44 Author: YOSHIFUJI Hideaki Date: Mon Aug 21 19:18:57 2006 +0900 [IPV6] ROUTE: Routing by Traffic Class. Signed-off-by: YOSHIFUJI Hideaki commit e731c248ba9e8c7025ae8b4a3fa48e4236b82e52 Author: YOSHIFUJI Hideaki Date: Thu Aug 24 23:18:12 2006 +0900 [IPV6] MIP6: Several obvious clean-ups. - Remove redundant code. Pointed out by Brian Haley . - Unify code paths with/without CONFIG_IPV6_MIP. - Use NIP6_FMT for IPv6 address textual presentation. - Fold long line. Pointed out by David Miller . Signed-off-by: YOSHIFUJI Hideaki commit e4bec827feda76d5e7417a2696a75424834d564f Author: David S. Miller Date: Fri Sep 22 15:17:35 2006 -0700 [IPSEC] esp: Defer output IV initialization to first use. First of all, if the xfrm_state only gets used for input packets this entropy is a complete waste. Secondly, it is often the case that a configuration loads many rules (perhaps even dynamically) and they don't all necessarily ever get used. This get_random_bytes() call was showing up in the profiles for xfrm_state inserts which is how I noticed this. Signed-off-by: David S. Miller commit ded7f1a16d50527359be02f8b04f9ba56bc923e6 Author: Ishai Rabinovitz Date: Tue Aug 15 17:34:52 2006 +0300 IB/srp: Add port/device attributes Add local_ib_device and local_ib_port attributes to srp scsi_host. These are needed when we want to connect to the same target through multiple distinct ports. Signed-off-by: Ishai Rabinovitz Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier commit 2a214182d23594915d6ae517b6368ba2eae055d2 Author: James Lentini Date: Fri Sep 22 15:17:20 2006 -0700 IB/mthca: Include the header we really want Signed-off-by: James Lentini Signed-off-by: Roland Dreier commit 1ccf6aa19aabc11587d6d7818a5729adfed0e3de Author: Roland Dreier Date: Fri Sep 22 15:17:20 2006 -0700 IB/uverbs: Fix lockdep warning when QP is created with 2 CQs Lockdep warns when userspace creates a QP that uses different CQs for send completions and receive completions, because both CQs are locked and their mutexes belong to the same lock class. However, we know that the mutexes are distinct and the nesting is safe (there is no possibility of AB-BA deadlock because the mutexes are locked with down_read()), so annotate the situation with SINGLE_DEPTH_NESTING to get rid of the lockdep warning. Signed-off-by: Roland Dreier commit ab10867621a96230757eb4a2a19d560b85f62ce9 Author: Roland Dreier Date: Fri Sep 22 15:17:19 2006 -0700 IB/uverbs: Use idr_read_cq() where appropriate There were two functions that open-coded idr_read_cq() in terms of idr_read_uobj() rather than using the helper. Signed-off-by: Roland Dreier commit 9217b27b12eb5ab910d14b3376c2b6cd13d87711 Author: Michael S. Tsirkin Date: Thu Aug 3 22:16:06 2006 +0300 IB/ipoib: Fix flush/start xmit race (from code review) Prevent flush task from freeing the ipoib_neigh pointer, while ipoib_start_xmit() is accessing the ipoib_neigh through the pointer it has loaded from the skb's hardware address. Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier commit 9fd558f454b666aca218a990d44f9e1ffac6ed4d Author: Michael S. Tsirkin Date: Fri Sep 22 15:17:18 2006 -0700 IB/mthca: Don't use privileged UAR for kernel access Make kernel use UAR2 instead of UAR1 for hardware access: this adds sanity checking from the hardware side, without any performance cost. Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier commit b27075735e371f481940a4920b329202334d2259 Author: Jack Morgenstein Date: Tue Sep 19 11:13:24 2006 +0300 IB/mthca: Fix lid used for sending traps The SM LID used to send traps to is incorrectly set to port LID. This is a regression from 2.6.17 -- after a PortInfo MAD is received, no traps are sent to the SM LID. The traps go to the loopback interface instead, and are dropped there. The SM LID should be taken from the sm_lid of the PortInfo response. The bug was introduced by commit 12bbb2b7be7f5564952ebe0196623e97464b8ac5: IB/mthca: Add client reregister event generation Signed-off-by: Jack Morgenstein Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier commit 44e36b42a8378be1dcf7e6f8a1cb2710a8903387 Author: David S. Miller Date: Thu Aug 24 04:50:50 2006 -0700 [XFRM]: Extract common hashing code into xfrm_hash.[ch] Signed-off-by: David S. Miller commit 2518c7c2b3d7f0a6b302b4efe17c911f8dd4049f Author: David S. Miller Date: Thu Aug 24 04:45:07 2006 -0700 [XFRM]: Hash policies when non-prefixed. This idea is from Alexey Kuznetsov. It is common for policies to be non-prefixed. And for that case we can optimize lookups, insert, etc. quite a bit. For each direction, we have a dynamically sized policy hash table for non-prefixed policies. We also have a hash table on policy->index. For prefixed policies, we have a list per-direction which we will consult on lookups when a non-prefix hashtable lookup fails. This still isn't as efficient as I would like it. There are four immediate problems: 1) Lots of excessive refcounting, which can be fixed just like xfrm_state was 2) We do 2 hash probes on insert, one to look for dups and one to allocate a unique policy->index. Althought I wonder how much this matters since xfrm_state inserts do up to 3 hash probes and that seems to perform fine. 3) xfrm_policy_insert() is very complex because of the priority ordering and entry replacement logic. 4) Lots of counter bumping, in addition to policy refcounts, in the form of xfrm_policy_count[]. This is merely used to let code path(s) know that some IPSEC rules exist. So this count is indexed per-direction, maybe that is overkill. Signed-off-by: David S. Miller commit c1969f294e624d5b642fc8e6ab9468b7c7791fa8 Author: David S. Miller Date: Thu Aug 24 04:00:03 2006 -0700 [XFRM]: Hash xfrm_state objects by source address too. The source address is always non-prefixed so we should use it to help give entropy to the bydst hash. Signed-off-by: David S. Miller commit a47f0ce05ae12ce9acad62896ff703175764104e Author: David S. Miller Date: Thu Aug 24 03:54:22 2006 -0700 [XFRM]: Kill excessive refcounting of xfrm_state objects. The refcounting done for timers and hash table insertions are just wasted cycles. We can eliminate all of this refcounting because: 1) The implicit refcount when the xfrm_state object is active will always be held while the object is in the hash tables. We never kfree() the xfrm_state until long after we've made sure that it has been unhashed. 2) Timers are even easier. Once we mark that x->km.state as anything other than XFRM_STATE_VALID (__xfrm_state_delete sets it to XFRM_STATE_DEAD), any timer that fires will do nothing and return without rearming the timer. Therefore we can defer the del_timer calls until when the object is about to be freed up during GC. We have to use del_timer_sync() and defer it to GC because we can't do a del_timer_sync() while holding x->lock which all callers of __xfrm_state_delete hold. This makes SA changes even more light-weight. Signed-off-by: David S. Miller commit 1c0953997567b22e32fdf85d3b4bc0f2461fd161 Author: David S. Miller Date: Thu Aug 24 03:30:28 2006 -0700 [XFRM]: Purge dst references to deleted SAs passively. Just let GC and other normal mechanisms take care of getting rid of DST cache references to deleted xfrm_state objects instead of walking all the policy bundles. Signed-off-by: David S. Miller commit c7f5ea3a4d1ae6b3b426e113358fdc57494bc754 Author: David S. Miller Date: Thu Aug 24 03:29:04 2006 -0700 [XFRM]: Do not flush all bundles on SA insert. Instead, simply set all potentially aliasing existing xfrm_state objects to have the current generation counter value. This will make routes get relooked up the next time an existing route mentioning these aliased xfrm_state objects gets used, via xfrm_dst_check(). Signed-off-by: David S. Miller commit 2575b65434d56559bd03854450b9b6aaf19b9c90 Author: David S. Miller Date: Thu Aug 24 03:26:44 2006 -0700 [XFRM]: Simplify xfrm_spi_hash It can use __xfrm{4,6}_addr_hash(). Signed-off-by: David S. Miller commit a624c108e5595b5827796c253481436929cd5344 Author: David S. Miller Date: Thu Aug 24 03:24:33 2006 -0700 [XFRM]: Put more keys into destination hash function. Besides the daddr, key the hash on family and reqid too. Signed-off-by: David S. Miller commit 9d4a706d852411154d0c91b9ffb3bec68b94b25c Author: David S. Miller Date: Thu Aug 24 03:18:09 2006 -0700 [XFRM]: Add generation count to xfrm_state and xfrm_dst. Each xfrm_state inserted gets a new generation counter value. When a bundle is created, the xfrm_dst objects get the current generation counter of the xfrm_state they will attach to at dst->xfrm. xfrm_bundle_ok() will return false if it sees an xfrm_dst with a generation count different from the generation count of the xfrm_state that dst points to. This provides a facility by which to passively and cheaply invalidate cached IPSEC routes during SA database changes. Signed-off-by: David S. Miller commit f034b5d4efdfe0fb9e2a1ce1d95fa7914f24de49 Author: David S. Miller Date: Thu Aug 24 03:08:07 2006 -0700 [XFRM]: Dynamic xfrm_state hash table sizing. The grow algorithm is simple, we grow if: 1) we see a hash chain collision at insert, and 2) we haven't hit the hash size limit (currently 1*1024*1024 slots), and 3) the number of xfrm_state objects is > the current hash mask All of this needs some tweaking. Remove __initdata from "hashdist" so we can use it safely at run time. Signed-off-by: David S. Miller commit 8f126e37c0b250310a48a609bedf92a19a5559ec Author: David S. Miller Date: Thu Aug 24 02:45:07 2006 -0700 [XFRM]: Convert xfrm_state hash linkage to hlists. Signed-off-by: David S. Miller commit edcd582152090bfb0ccb4ad444c151798a73eda8 Author: David S. Miller Date: Thu Aug 24 00:42:45 2006 -0700 [XFRM]: Pull xfrm_state_by{spi,src} hash table knowledge out of afinfo. Signed-off-by: David S. Miller commit 2770834c9f44afd1bfa13914c7285470775af657 Author: David S. Miller Date: Thu Aug 24 00:13:10 2006 -0700 [XFRM]: Pull xfrm_state_bydst hash table knowledge out of afinfo. Signed-off-by: David S. Miller commit 64d9fdda8e1bdf416b2d9203c3ad9c249ea301be Author: Masahide NAKAMURA Date: Wed Aug 23 22:54:07 2006 -0700 [XFRM] IPV6: Support Mobile IPv6 extension headers sorting. Support Mobile IPv6 extension headers sorting for two transformation policies. Mobile IPv6 extension headers should be placed after IPsec transport mode, but before transport AH when outbound. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 58c949d1b9551f3e4ba9dde4aeda341ecf5e42b5 Author: Masahide NAKAMURA Date: Wed Aug 23 22:51:02 2006 -0700 [XFRM] IPV6: Add sort functions to combine templates/states for IPsec. Add sort functions to combine templates/states for IPsec. Think of outbound transformation order we should be careful with transport AH which must be the last of all transport ones. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit f7b6983f0feeefcd2a594138adcffe640593d8de Author: Masahide NAKAMURA Date: Wed Aug 23 22:49:28 2006 -0700 [XFRM] POLICY: Support netlink socket interface for sub policy. Sub policy can be used through netlink socket. PF_KEY uses main only and it is TODO to support sub. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 41a49cc3c02ace59d4dddae91ea211c330970ee3 Author: Masahide NAKAMURA Date: Wed Aug 23 22:48:31 2006 -0700 [XFRM]: Add sorting interface for state and template. Under two transformation policies it is required to merge them. This is a platform to sort state for outbound and templates for inbound respectively. It will be used when Mobile IPv6 and IPsec are used at the same time. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 4e81bb8336a0ac50289d4d4c7a55e559b994ee8f Author: Masahide NAKAMURA Date: Wed Aug 23 22:43:30 2006 -0700 [XFRM] POLICY: sub policy support. Sub policy is introduced. Main and sub policy are applied the same flow. (Policy that current kernel uses is named as main.) It is required another transformation policy management to keep IPsec and Mobile IPv6 lives separate. Policy which lives shorter time in kernel should be a sub i.e. normally main is for IPsec and sub is for Mobile IPv6. (Such usage as two IPsec policies on different database can be used, too.) Limitation or TODOs: - Sub policy is not supported for per socket one (it is always inserted as main). - Current kernel makes cached outbound with flowi to skip searching database. However this patch makes it disabled only when "two policies are used and the first matched one is bypass case" because neither flowi nor bundle information knows about transformation template size. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki commit c11f1a15c522ddd3bbd2c32b5ce3e0b1831b22f2 Author: Masahide NAKAMURA Date: Wed Aug 23 22:38:14 2006 -0700 [XFRM] POLICY: Add Kconfig to support sub policy. Add Kconfig to support sub policy. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 01be8e5d59d7e6da5c425a31b43709c2a4a69b5d Author: Masahide NAKAMURA Date: Wed Aug 23 20:47:44 2006 -0700 [IPV6] MIP6: Ignore to report if mobility headers is rejected. Ignore to report user-space for known mobility headers rejected by destination options header transformation. Mobile IPv6 specification (RFC3775) says that mobility header is used with destination options header carrying home address option only for binding update message. Other type message cannot be used and node must drop it silently (and must not send binding error) if receving such packet. To achieve it, (1) application should use transformation policy and wild-card states to catch binding update message prior other packets (2) kernel doesn't report the reject to user-space not to send binding error message by application. This patch is for (2). Based on MIPL2 kernel patch. This patch was also written by: Ville Nuorvala Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 70182ed23d2559345aadb3cfb6a68a7c1cc0aa39 Author: Masahide NAKAMURA Date: Wed Aug 23 20:45:55 2006 -0700 [IPV6] MIP6: Report to user-space when home address option is rejected. Report to user-space when home address option is rejected. In receiving this message user-space application will send Mobile IPv6 binding error. It is rate-limited by kernel. Based on MIPL2 kernel patch. This patch was also written by: Ville Nuorvala Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 97a64b4577ae2bc5599dbd008a3cd9e25de9b9f5 Author: Masahide NAKAMURA Date: Wed Aug 23 20:44:06 2006 -0700 [XFRM]: Introduce XFRM_MSG_REPORT. XFRM_MSG_REPORT is a message as notification of state protocol and selector from kernel to user-space. Mobile IPv6 will use it when inbound reject is occurred at route optimization to make user-space know a binding error requirement. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit df0ba92a99ca757039dfa84a929281ea3f7a50e8 Author: Masahide NAKAMURA Date: Wed Aug 23 20:41:00 2006 -0700 [XFRM]: Trace which secpath state is reject factor. For Mobile IPv6 usage, it is required to trace which secpath state is reject factor in order to notify it to user space (to know the address which cannot be used route optimized communication). Based on MIPL2 kernel patch. This patch was also written by: Henrik Petander Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 2ce4272a699c731b9736d76126dc742353e381db Author: Masahide NAKAMURA Date: Wed Aug 23 20:39:03 2006 -0700 [IPV6] MIP6: Transformation support mobility header. Transformation support mobility header. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 6e8f4d48b265225bdf437bbf3151b0d6700dda22 Author: Masahide NAKAMURA Date: Wed Aug 23 20:36:47 2006 -0700 [IPV6] MIP6: Add sending mobility header functions through raw socket. Mobility header is built by user-space and sent through raw socket. Kernel just extracts its type to flow. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 7be96f7628469e56f91d51f13b03e9bcff113c7f Author: Masahide NAKAMURA Date: Wed Aug 23 20:35:31 2006 -0700 [IPV6] MIP6: Add receiving mobility header functions through raw socket. Like ICMPv6, mobility header is handled through raw socket. In inbound case, check only whether ICMPv6 error should be sent as a reply or not by kernel. Based on MIPL2 kernel patch. This patch was also written by: Ville Nuorvala This patch was also written by: Antti Tuominen Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 2b741653b6c824fe7520ee92b6795f11c5f24b24 Author: Masahide NAKAMURA Date: Wed Aug 23 20:34:26 2006 -0700 [IPV6] MIP6: Add Mobility header definition. Add Mobility header definition for Mobile IPv6. Based on MIPL2 kernel patch. This patch was also written by: Antti Tuominen Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit e23c7194a8a21e96b99106bdabde94614c4b84d6 Author: Masahide NAKAMURA Date: Wed Aug 23 20:33:28 2006 -0700 [XFRM] STATE: Add Mobile IPv6 route optimization protocols to netlink interface. Add Mobile IPv6 route optimization protocols to netlink interface. Route optimization states carry care-of address. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 3d126890dd67beffec27c1b6f51c040fc8d0b526 Author: Noriaki TAKAMIYA Date: Wed Aug 23 20:32:34 2006 -0700 [IPV6] MIP6: Add destination options header transformation. Add destination options header transformation for Mobile IPv6. Based on MIPL2 kernel patch. This patch was also written by: Ville Nuorvala Signed-off-by: Noriaki TAKAMIYA Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 2c8d7ca0f76103855ad1f2a930e05683b64a00eb Author: Noriaki TAKAMIYA Date: Wed Aug 23 20:31:11 2006 -0700 [IPV6] MIP6: Add routing header type 2 transformation. Add routing header type 2 transformation for Mobile IPv6. Based on MIPL2 kernel patch. Signed-off-by: Noriaki TAKAMIYA Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 27637df92e25dfb45dd71a93a2f4bf9c080fa627 Author: Masahide NAKAMURA Date: Wed Aug 23 19:29:47 2006 -0700 [IPV6] IPSEC: Support sending with Mobile IPv6 extension headers. Mobile IPv6 defines home address option as an option of destination options header. It is placed before fragment header then ip6_find_1stfragopt() is fixed to know about it. Home address option also carries final source address of the flow, then outbound AH calculation should take care of it like routing header case. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 793832361fe7e9c3fcae2edd1d293c583a0a095c Author: Masahide NAKAMURA Date: Wed Aug 23 19:27:25 2006 -0700 [IPV6] MIP6: Revert address to send ICMPv6 error. IPv6 source address is replaced in receiving packet with home address option carried by destination options header. To send ICMPv6 error back, original address which is received one on wire should be used. This function checks such header is included and reverts them. Based on MIPL2 kernel patch. This patch was also written by: Ville Nuorvala Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 8dd7368dd97def967bbb3aec67b882e8dfd1a528 Author: David S. Miller Date: Wed Aug 23 19:25:55 2006 -0700 [IPV6]: Put dsthao after flags in order to pack inet6_skb_parm better. Signed-off-by: David S. Miller commit a831f5bbc89a9978795504be9e1ff412043f8f77 Author: Masahide NAKAMURA Date: Wed Aug 23 19:24:48 2006 -0700 [IPV6] MIP6: Add inbound interface of home address option. Add inbound function of home address option by registering it to TLV table for destination options header. Based on MIPL2 kernel patch. This patch was also written by: Ville Nuorvala Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 842426e719f86cd5709617208efae93ff1a1e2d8 Author: Noriaki TAKAMIYA Date: Wed Aug 23 19:21:34 2006 -0700 [IPV6] MIP6: Add home address option definition. Add home address option definition for Mobile IPv6. Based on MIPL2 kernel patch. Signed-off-by: Noriaki TAKAMIYA Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit a80ff03e05e4343d647780c116b02ec86078fd24 Author: Masahide NAKAMURA Date: Wed Aug 23 19:19:50 2006 -0700 [IPV6]: Allow to replace skbuff by TLV parser. In receiving Mobile IPv6 home address option which is a TLV carried by destination options header, kernel will try to mangle source adderss of packet. Think of cloned skbuff it is required to replace it by the parser just like routing header case. This is a framework to achieve that to allow TLV parser to replace inbound skbuff pointer. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit c61a404325093250b676f40ad8f4dd00f3bcab5f Author: Masahide NAKAMURA Date: Wed Aug 23 19:18:35 2006 -0700 [IPV6]: Find option offset by type. This is a helper to search option offset from extension header which can carry TLV option like destination options header. Mobile IPv6 home address option will use it. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 280a9d340057ce1b3cca63084df22f4ef5b35fba Author: Masahide NAKAMURA Date: Wed Aug 23 19:17:12 2006 -0700 [IPV6] MIP6: Add socket option and ancillary data interface of routing header type 2. Add socket option and ancillary data interface of routing header type 2. Mobile IPv6 application will use this to send binding acknowledgement with the header without relation of confirmed route optimization (binding). Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 65d4ed92219b28875efb52de5700da8c3dfa83e1 Author: Masahide NAKAMURA Date: Wed Aug 23 19:16:22 2006 -0700 [IPV6] MIP6: Add inbound interface of routing header type 2. Add inbound interface of routing header type 2 for Mobile IPv6. Based on MIPL2 kernel patch. This patch was also written by: Ville Nuorvala Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 642ec62eee5bdc158e01029220c8a23c685778fb Author: Noriaki TAKAMIYA Date: Wed Aug 23 19:15:07 2006 -0700 [IPV6] MIP6: Add routing header type 2 definition. Add routing header type 2 definition for Mobile IPv6. Based on MIPL2 kernel patch. Signed-off-by: Noriaki TAKAMIYA Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki commit ee53826801a8fa7a0e333895421ef6d0e5fbfbf0 Author: Masahide NAKAMURA Date: Wed Aug 23 19:13:46 2006 -0700 [IPV6]: Add Kconfig to enable Mobile IPv6. Add Kconfig to enable Mobile IPv6. Based on MIPL2 kernel patch. Signed-off-by: Noriaki TAKAMIYA Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki commit 654b32c6aad19d2fd363813cd8a1a1e64daf611b Author: Masahide NAKAMURA Date: Wed Aug 23 19:12:56 2006 -0700 [XFRM]: Fix message about transformation user interface. Transformation user interface is not only for IPsec. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit e53820de0f81da1429048634cadc6ef5f50c2f8b Author: Masahide NAKAMURA Date: Wed Aug 23 19:12:01 2006 -0700 [XFRM] IPV6: Restrict bundle reusing For outbound transformation, bundle is checked whether it is suitable for current flow to be reused or not. In such IPv6 case as below, transformation may apply incorrect bundle for the flow instead of creating another bundle: - The policy selector has destination prefix length < 128 (Two or more addresses can be matched it) - Its bundle holds dst entry of default route whose prefix length < 128 (Previous traffic was used such route as next hop) - The policy and the bundle were used a transport mode state and this time flow address is not matched the bundled state. This issue is found by Mobile IPv6 usage to protect mobility signaling by IPsec, but it is not a Mobile IPv6 specific. This patch adds strict check to xfrm_bundle_ok() for each state mode and address when prefix length is less than 128. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 9afaca057980c02771f4657c455cc7592fcd7373 Author: Masahide NAKAMURA Date: Wed Aug 23 18:20:16 2006 -0700 [XFRM] IPV6: Update outbound state timestamp for each sending. With this patch transformation state is updated last used time for each sending. Xtime is used for it like other state lifetime expiration. Mobile IPv6 enabled nodes will want to know traffic status of each binding (e.g. judgement to request binding refresh by correspondent node, or to keep home/care-of nonce alive by mobile node). The last used timestamp is an important hint about it. Based on MIPL2 kernel patch. This patch was also written by: Henrik Petander Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 060f02a3bdd4d9ba8aa3c48e9b470672b1f3a585 Author: Noriaki TAKAMIYA Date: Wed Aug 23 18:18:55 2006 -0700 [XFRM] STATE: Introduce care-of address. Care-of address is carried by state as a transformation option like IPsec encryption/authentication algorithm. Based on MIPL2 kernel patch. Signed-off-by: Noriaki TAKAMIYA Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki commit 1b5c229987dc4d0c92a38fac0cde2aeec08cd775 Author: Masahide NAKAMURA Date: Wed Aug 23 18:11:50 2006 -0700 [XFRM] STATE: Support non-fragment outbound transformation headers. For originated outbound IPv6 packets which will fragment, ip6_append_data() should know length of extension headers before sending them and the length is carried by dst_entry. IPv6 IPsec headers fragment then transformation was designed to place all headers after fragment header. OTOH Mobile IPv6 extension headers do not fragment then it is a good idea to make dst_entry have non-fragment length to tell it to ip6_append_data(). Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 99505a843673faeae962a8cde128c7c034ba6b5e Author: Masahide NAKAMURA Date: Wed Aug 23 18:10:33 2006 -0700 [XFRM] STATE: Add a hook to obtain local/remote outbound address. Outbound transformation replaces both source and destination address with state's end-point addresses at the same time when IPsec tunnel mode. It is also required to change them for Mobile IPv6 route optimization, but we should care about the following differences: - changing result is not end-point but care-of address - either source or destination is replaced for each state This hook is a common platform to change outbound address. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 9e51fd371a022318c5b64b831c43026e89bc4f75 Author: Masahide NAKAMURA Date: Wed Aug 23 18:09:09 2006 -0700 [XFRM]: Rename secpath_has_tunnel to secpath_has_nontransport. On current kernel inbound transformation state is allowed transport and disallowed tunnel mode when mismatch is occurred between tempates and states. As the result of adding two more modes by Mobile IPv6, this function name is misleading. Inbound transformation can allow only transport mode when mismatch is occurred between template and secpath. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit fbd9a5b47ee9c319ff0cae584391241ce78ffd6b Author: Masahide NAKAMURA Date: Wed Aug 23 18:08:21 2006 -0700 [XFRM] STATE: Common receive function for route optimization extension headers. XFRM_STATE_WILDRECV flag is introduced; the last resort state is set it and receives packet which is not route optimized but uses such extension headers i.e. Mobile IPv6 signaling (binding update and acknowledgement). A node enabled Mobile IPv6 adds the state. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit f3bd484021d9486b826b422a017d75dd0bd258ad Author: Masahide NAKAMURA Date: Wed Aug 23 18:00:48 2006 -0700 [XFRM]: Restrict authentication algorithm only when inbound transformation protocol is IPsec. For Mobile IPv6 usage, routing header or destination options header is used and it doesn't require this comparison. It is checked only for IPsec template. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 1d71627d699eca831c1fbfb66ea67bb1fba41415 Author: Masahide NAKAMURA Date: Wed Aug 23 17:59:44 2006 -0700 [XFRM] STATE: Introduce route optimization mode. Route optimization is used with routing header and destination options header for Mobile IPv6. At outbound it makes header space like IPsec transport. At inbound it does nothing because exhdrs.c functions have responsibility to update skbuff information for these headers. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit aee5adb4307c4c63a4dc5f3b49984d76f8a71b5b Author: Masahide NAKAMURA Date: Wed Aug 23 17:57:28 2006 -0700 [XFRM] STATE: Add a hook to find offset to be inserted header in outbound. On current kernel, ip6_find_1stfragopt() is used by IPv6 IPsec to find offset to be inserted header in outbound for transport mode. (BTW, no usage may be needed for IPv4 case.) Mobile IPv6 requires another logic for routing header and destination options header respectively. This patch is common platform for the offset and adopts it to IPsec. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit eb2971b68a7d17a7d0fa2c7fc6fbc4bfe41cd694 Author: Masahide NAKAMURA Date: Wed Aug 23 17:56:04 2006 -0700 [XFRM] STATE: Search by address using source address list. This is a support to search transformation states by its addresses by using source address list for Mobile IPv6 usage. To use it from user-space, it is also added a message type for source address as a xfrm state option. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 6c44e6b7ab500d7e3e3f406c83325671be51a752 Author: Masahide NAKAMURA Date: Wed Aug 23 17:53:57 2006 -0700 [XFRM] STATE: Add source address list. Support source address based searching. Mobile IPv6 will use it. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 622dc8281a80374873686514e46f852093d91106 Author: Masahide NAKAMURA Date: Wed Aug 23 17:52:01 2006 -0700 [XFRM]: Expand XFRM_MAX_DEPTH for route optimization. XFRM_MAX_DEPTH is a limit of transformation states to be applied to the same flow. Two more extension headers are used by Mobile IPv6 transformation. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit dc00a525603650a1471c823a1e48c6505c2f9765 Author: Masahide NAKAMURA Date: Wed Aug 23 17:49:52 2006 -0700 [XFRM] STATE: Allow non IPsec protocol. It will be added two more transformation protocols (routing header and destination options header) for Mobile IPv6. xfrm_id_proto_match() can be handle zero as all, IPSEC_PROTO_ANY as all IPsec and otherwise as exact one. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 5794708f11551b6d19b10673abf4b0202f66b44d Author: Masahide NAKAMURA Date: Fri Sep 22 15:06:24 2006 -0700 [XFRM]: Introduce a helper to compare id protocol. Put the helper to header for future use. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 7e49e6de30efa716614e280d97963c570f3acf29 Author: Masahide NAKAMURA Date: Fri Sep 22 15:05:15 2006 -0700 [XFRM]: Add XFRM_MODE_xxx for future use. Transformation mode is used as either IPsec transport or tunnel. It is required to add two more items, route optimization and inbound trigger for Mobile IPv6. Based on MIPL2 kernel patch. This patch was also written by: Ville Nuorvala Signed-off-by: Masahide NAKAMURA Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 77d16f450ae0452d7d4b009f78debb1294fb435c Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:25:05 2006 -0700 [IPV6] ROUTE: Unify RT6_F_xxx and RT6_SELECT_F_xxx flags Unify RT6_F_xxx and RT6_SELECT_F_xxx flags into RT6_LOOKUP_F_xxx flags, and put them into ip6_route.h Signed-off-by: YOSHIFUJI Hideaki Acked-by: Ville Nuorvala commit 4e96c2b4180aff4f080b77314712073c6ca430e7 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:23:39 2006 -0700 [IPV6] KCONFIG: Add subtrees support. This is for developers only. Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Ville Nuorvala commit c0bece9f2aec546c3750ae3972f80e024a923f34 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:23:25 2006 -0700 [IPV6] ROUTE: Add credits about subtree fixes. Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit cb15d9c224fcc03b32396c1c7416e777c2dcca34 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:23:11 2006 -0700 [IPV6] NDISC: Search subtrees when backtracking on receipt of redirects. Signed-off-by: YOSHIFUJI Hideaki Acked-by: Ville Nuorvala commit 150730d5a53b1bbb486101b2a5fb82ff0d3f916e Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:22:55 2006 -0700 [IPV6] ROUTE: Purge clones on other trees when deleting a route. Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Ville Nuorvala commit 982f56f3a9be4651520c0fdd3d80a5d02e95a178 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:22:39 2006 -0700 [IPV6] ROUTE: Search subtree when backtracking. Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Ville Nuorvala Signed-off-by: David S. Miller commit 7fc33165a74301b2c5c90b2f2a1f6907cbd5c6f1 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:22:24 2006 -0700 [IPV6] ROUTE: Put SUBTREE() as FIB6_SUBTREE() into ip6_fib.h for future use. Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Ville Nuorvala Signed-off-by: David S. Miller commit fefc2a6c201aeafc1d0329a140de502d49f69d04 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:21:50 2006 -0700 [IPV6] ROUTE: Allow searching subtree only. Signed-off-by: YOSHIFUJI Hideaki Acked-by: Ville Nuorvala Signed-off-by: David S. Miller commit 825e288ef4c55a379a97e104c825eb9b74874099 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:21:29 2006 -0700 [IPV6] ROUTE: Make sure we do not exceed args in fib6_lookup_1(). Signed-off-by: YOSHIFUJI Hideaki Acked-by: Ville Nuorvala Signed-off-by: David S. Miller commit 3fc5e0440be7fab3abae4e801b0ef17e9b3b58c4 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:21:12 2006 -0700 [IPV6] ROUTE: Fix looking up a route on subtree. Even on RTN_ROOT node, we need to process its subtree first. Fix NULL pointer dereference in fib6_locate(). Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Ville Nuorvala Signed-off-by: David S. Miller commit 2285adc1e6c9f964f9625e7edcd233fccd7a7c92 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:20:54 2006 -0700 [IPV6] ROUTE: Prune clones from main tree as well. Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Ville Nuorvala Signed-off-by: David S. Miller commit 66729e18df08ee20a9824148236b89f56371659e Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:20:34 2006 -0700 [IPV6] ROUTE: Make sure we have fn->leaf when adding a node on subtree. Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Ville Nuorvala Signed-off-by: David S. Miller commit 8e1ef0a95b87e8b4292b2ba733e8cb854ea2d2fe Author: YOSHIFUJI Hideaki Date: Tue Aug 29 17:15:09 2006 -0700 [IPV6]: Cache source address as well in ipv6_pinfo{}. Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Ville Nuorvala Signed-off-by: David S. Miller commit cf6b1982599cbb60f410adeda659b0b29cdf7ad7 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:19:18 2006 -0700 [IPV6] ROUTE: Introduce a helper to check route validity. Signed-off-by: YOSHIFUJI Hideaki Acked-by: Ville Nuorvala Signed-off-by: David S. Miller commit af184765848c280c7e6190f45c827c5ea3881126 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:18:57 2006 -0700 [IPV6] NDISC: Initialize fl with outbound interface to lookup rules properly. Based on MIPL2 kernel patch. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Ville Nuorvala Signed-off-by: David S. Miller commit a6279458c534d01ccc39498aba61c93083ee0372 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:18:26 2006 -0700 [IPV6] NDISC: Search over all possible rules on receipt of redirect. Split up function for finding routes for redirects. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 5e032e32ecc2e6cb0385dc115ca9bfe5e19a9539 Author: YOSHIFUJI Hideaki Date: Wed Aug 23 17:12:24 2006 -0700 [IPV6] NDISC: Take source address into account for redirects. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Ville Nuorvala Signed-off-by: David S. Miller commit a57d27fc7107ddcc655ba2812cfebfce3163fd62 Author: David S. Miller Date: Tue Aug 22 22:20:14 2006 -0700 [RTNETLINK]: Don't return error on no-metrics. Instead just cancel the nested attribute and return 0. Signed-off-by: David S. Miller commit 2809486424df58043b380aeb9d7f402c031c46f6 Author: Thomas Graf Date: Tue Aug 22 13:52:17 2006 -0700 [NETFILTER]: x_tables: Fix typos after conversion to use mass registation helper Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 3fd091e73b81f131e1567c4d4a1ec042940bf2f7 Author: Vladislav Yasevich Date: Tue Aug 22 13:29:17 2006 -0700 [SCTP]: Remove multiple levels of msecs to jiffies conversions. The SCTP sysctl entries are displayed in milliseconds, but stored internally in jiffies. This results in multiple levels of msecs to jiffies conversion and as a result produces a truncation error. This patch makes things consistent in that we store and display defaults in milliseconds and only convert once for use by association. This patch also adds some sane min/max values so that we don't go off the deep end. Signed-off-by: Vladislav Yasevich Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller commit ce556b3a591fff3bebf8c5590a86aa98e1b2f153 Author: Patrick McHardy Date: Tue Aug 22 00:44:14 2006 -0700 [NETFILTER]: xt_tcpmss: minor cleanups - remove unused define - remove useless wrapper function - use new line for expression after condition Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 5fa2a7601f994bdd034e871b7ea1abd6969fbb6c Author: Patrick McHardy Date: Tue Aug 22 00:43:55 2006 -0700 [NETFILTER]: ip6_tables: consolidate dst and hbh matches The matches are identical besides one looking for NEXTHDR_HOP, the other for NEXTHDR_DEST. Remove ip6t_dst.c and handle both in ip6t_hbh.c. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 91270cf81765152f6e77953440beb4d3b34a71b5 Author: Patrick McHardy Date: Tue Aug 22 00:43:38 2006 -0700 [NETFILTER]: x_tables: add data member to struct xt_match Shared match functions can use this to make runtime decisions basen on the used match. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 53e26658282373b84ba85a0c9807cb762f7738a6 Author: Patrick McHardy Date: Tue Aug 22 00:43:20 2006 -0700 [NETFILTER]: nfnetlink: remove unnecessary packed attributes Remove unnecessary packed attributes in nfnetlink structures. Unfortunately in a few cases they have to stay to avoid changing structure sizes. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit efa741656e9ebf5fd6e0432b0d1b3c7f156392d3 Author: Patrick McHardy Date: Tue Aug 22 00:36:37 2006 -0700 [NETFILTER]: x_tables: remove unused size argument to check/destroy functions The size is verified by x_tables and isn't needed by the modules anymore. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit fe1cb10873b44cf89082465823ee6d4d4ac63ad7 Author: Patrick McHardy Date: Tue Aug 22 00:35:47 2006 -0700 [NETFILTER]: x_tables: remove unused argument to target functions Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 4470bbc749e5551cce914529309456f631e25120 Author: Patrick McHardy Date: Tue Aug 22 00:34:04 2006 -0700 [NETFILTER]: x_tables: make use of mass registation helpers Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 52d9c42ef2563d2c420eb23b96bf5a4cae9e167b Author: Patrick McHardy Date: Tue Aug 22 00:33:45 2006 -0700 [NETFILTER]: x_tables: add helpers for mass match/target registration Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 90528e6fe92ee1a353d6a639930e7d70d85b5c85 Author: Patrick McHardy Date: Tue Aug 22 00:33:26 2006 -0700 [NETFILTER]: xt_CONNMARK: use tabs for indentation Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit da878c8e5aae3eeceeee7af8d52633d7bc125edf Author: Patrick McHardy Date: Tue Aug 22 00:33:09 2006 -0700 [NETFILTER]: replace open coded checksum updates Replace open coded checksum update by nf_csum_update calls and clean up the surrounding code a bit. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 1158ba27bec6d1a20999099a938908cf85f47640 Author: Patrick McHardy Date: Tue Aug 22 00:32:47 2006 -0700 [NETFILTER]: nfnetlink_queue: fix typo in error message Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 1a31526baeed30aaa70503cee0ab281f78cae0d6 Author: Pablo Neira Ayuso Date: Tue Aug 22 00:32:23 2006 -0700 [NETFILTER]: ctnetlink: remove impossible events tests for updates IPCT_HELPER and IPCT_NATINFO bits are never set on updates. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit b3a27bfba51d445784eb0cd6451b73a73fb69cf9 Author: Pablo Neira Ayuso Date: Tue Aug 22 00:32:05 2006 -0700 [NETFILTER]: ctnetlink: check for listeners before sending expectation events This patch uses nfnetlink_has_listeners to check for listeners in userspace. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit b9a37e0c81c498be2db9f52063c53e55d76c815e Author: Pablo Neira Ayuso Date: Tue Aug 22 00:31:49 2006 -0700 [NETFILTER]: ctnetlink: dump connection mark ctnetlink dumps the mark iif the event mark happened Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 2521c12cf1a29f6c380b13ca32a38175f6beed08 Author: Pablo Neira Ayuso Date: Tue Aug 22 00:31:24 2006 -0700 [NETFILTER]: conntrack: introduce connection mark event This patch introduces the mark event. ctnetlink can use this to know if the mark needs to be dumped. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit b93ff78317c0b8f42830e2bb13dd8df596232528 Author: Daniel De Graaf Date: Tue Aug 22 00:30:55 2006 -0700 [NETFILTER]: ipt_recent: add module parameter for changing ownership of /proc/net/ipt_recent/* Signed-off-by: Daniel De Graaf Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit a468701db58a8b3e08e3f55fa6ac66db42014922 Author: Yasuyuki Kozakai Date: Tue Aug 22 00:30:26 2006 -0700 [NETFILTER]: x_tables: replace IPv4 DSCP target by address family independent version This replaces IPv4 DSCP target by address family independent version. This also - utilizes dsfield.h to get/mangle DS field in IPv4/IPv6 header - fixes Kconfig help text. Signed-off-by: Yasuyuki Kozakai Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 9ba1627617d396135a4d679542a3623d5819e628 Author: Yasuyuki Kozakai Date: Tue Aug 22 00:29:37 2006 -0700 [NETFILTER]: x_tables: replace IPv4 dscp match by address family independent version This replaces IPv4 dscp match by address family independent version. This also - utilizes dsfield.h to get the DS field in IPv4/IPv6 header, and - checks for the DSCP value from user space. - fixes Kconfig help text. Signed-off-by: Yasuyuki Kozakai Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 131852176c1f5b4350b4af811d1836db387d0c61 Author: Henrik Kretzschmar Date: Tue Aug 22 00:28:33 2006 -0700 [TG3]: Convert the pci_device_id table to PCI_DEVICE() Convert the pci_device_ids to PCI_DEVICE() macro. Saves 1.5k in the sourcefile. Signed-off-by: Henrik Kretzschmar Acked-by: Michael Chan Signed-off-by: David S. Miller commit 8abfedd889e46ad4977dfcdab737edf5c5803c62 Author: Sridhar Samudrala Date: Tue Aug 22 00:24:09 2006 -0700 [SCTP]: Use the flags value that is passed as an arg to sctp_accept. No need to do multiple dereferences - sk->sk_socket->file->f_flags Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller commit eb5fa39f5ef490c72901b547ac5e7211efd47d56 Author: Vladislav Yasevich Date: Tue Aug 22 00:23:13 2006 -0700 [SCTP]: Fix IPv6 address flag setting when doing peel-off/accept. During accept/peeloff we try to copy the list of bound addresses from the original endpoint to the new one. However, we forgot to set the flag to say that IPv6 is allowed on the new endpoint. Signed-off-by: Vladislav Yasevich Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller commit df7deeb5402087ea0387173aaf067d37a264a8f0 Author: Vladislav Yasevich Date: Tue Aug 22 00:19:51 2006 -0700 [SCTP]: Cleanup nomem handling in the state functions. This patch cleans up the "nomem" conditions that may occur during the processing by the state machine functions. In most cases we delay adding side-effect commands until all memory allocations are done. Signed-off-by: Vladislav Yasevich Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller commit ac0b04627269ff16c3c7ab854a65fe6780c6e3e5 Author: Sridhar Samudrala Date: Tue Aug 22 00:15:33 2006 -0700 [SCTP]: Extend /proc/net/sctp/snmp to provide more statistics. This patch adds more statistics info under /proc/net/sctp/snmp that should be useful for debugging. The additional events that are counted now include timer expirations, retransmits, packet and data chunk discards. The Data chunk discards include all the cases where a data chunk is discarded including high tsn, bad stream, dup tsn and the most useful one(out of receive buffer/rwnd). Also moved the SCTP MIB data structures from the generic include directories to include/sctp/sctp.h. Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller commit 72d3b2c970a2d5d2ccb1d1cab4fb76663c4f2e49 Author: David S. Miller Date: Tue Aug 22 00:13:07 2006 -0700 [IPV6]: Fixup ip6_del_rt() call for new args. Signed-off-by: David S. Miller commit ab364a6f96bad9625bdb97b5688c76c44eb1e96e Author: Thomas Graf Date: Tue Aug 22 00:01:47 2006 -0700 [IPv6] route: Convert GETROUTE to use new netlink api Fixes various unvalidated netlink attributes causing memory corruptions when left empty by userspace applications. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 2d7202bfdd28687073f5efef8d2f51bbab0af867 Author: Thomas Graf Date: Tue Aug 22 00:01:27 2006 -0700 [IPv6] route: Convert FIB6 dumping to use new netlink api Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 86872cb57925c46a6499887d77afb880a892c0ec Author: Thomas Graf Date: Tue Aug 22 00:01:08 2006 -0700 [IPv6] route: FIB6 configuration using struct fib6_config Replaces the struct in6_rtmsg based interface orignating from the ioctl interface with a struct fib6_config based on. Allows changing the interface without breaking the ioctl interface and avoids passing on tons of parameters. The recently introduced struct nl_info is used to pass on netlink authorship information for notifications. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 40e22e8f3d4d4f1ff68fb03683f007c53ee8b348 Author: Thomas Graf Date: Tue Aug 22 00:00:45 2006 -0700 [IPv6] route: Simplify ip6_ins_rt() Provide a simple ip6_ins_rt() for the majority of users and an alternative for the exception via netlink. Avoids code obfuscation. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit e0a1ad73d34fd6dfdb630479400511e9879069c0 Author: Thomas Graf Date: Tue Aug 22 00:00:21 2006 -0700 [IPv6] route: Simplify ip6_del_rt() Provide a simple ip6_del_rt() for the majority of users and an alternative for the exception via netlink. Avoids code obfuscation. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit e9ce1cd3cf6cf35b21d0ce990f2e738f35907386 Author: David S. Miller Date: Mon Aug 21 23:54:55 2006 -0700 [PKT_SCHED]: Kill pkt_act.h inlining. This was simply making templates of functions and mostly causing a lot of code duplication in the classifier action modules. We solve this more cleanly by having a common "struct tcf_common" that hash worker functions contained once in act_api.c can work with. Callers work with real action objects that have the common struct plus their module specific struct members. You go from a common object to the higher level one using a "to_foo()" macro which makes use of container_of() to do the dirty work. This also kills off act_generic.h which was only used by act_simple.c and keeping it around was more work than the it's value. Signed-off-by: David S. Miller commit 2e4ca75b31b6851dcc036c2cdebf3ecfe279a653 Author: Stephen Hemminger Date: Thu Aug 17 18:20:18 2006 -0700 [ETH]: indentation and cleanup Run ethernet support through Lindent and fix up. Applies after docbook comments patch Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit d3e01f71863da30a2d6bfca069a036168b6c8607 Author: Stephen Hemminger Date: Thu Aug 17 18:18:53 2006 -0700 [ETH]: docbook comments Add docbook style comments to ethernet support. Signed-off-by: Stephen Hemminger Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit e92b43a3455d3e817c13481bb3ea3cd29d0a47f4 Author: Stephen Hemminger Date: Thu Aug 17 18:17:37 2006 -0700 [NET] neighbour: reduce exports There are several symbols only used by rtnetlink and since it can not be a module, there is no reason to export them. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit d889ce3b29e55b91257964b4c9aac70b91fedd91 Author: Thomas Graf Date: Thu Aug 17 18:15:44 2006 -0700 [IPv4]: Convert route get to new netlink api Fixes various unvalidated netlink attributes causing memory corruptions when left empty by userspace applications. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit be403ea1856f1428b5912b42184acbba808c41d6 Author: Thomas Graf Date: Thu Aug 17 18:15:17 2006 -0700 [IPv4]: Convert FIB dumping to use new netlink api Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 4e902c57417c4c285b98ba2722468d1c3ed83d1b Author: Thomas Graf Date: Thu Aug 17 18:14:52 2006 -0700 [IPv4]: FIB configuration using struct fib_config Introduces struct fib_config replacing the ugly struct kern_rta prone to ordering issues. Avoids creating faked netlink messages for auto generated routes or requests via ioctl. A new interface net/nexthop.h is added to help navigate through nexthop configuration arrays. A new struct nl_info will be used to carry the necessary netlink information to be used for notifications later on. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit ab32ea5d8a760e7dd4339634e95d7be24ee5b842 Author: Brian Haley Date: Fri Sep 22 14:15:41 2006 -0700 [NET/IPV4/IPV6]: Change some sysctl variables to __read_mostly Change net/core, ipv4 and ipv6 sysctl variables to __read_mostly. Couldn't actually measure any performance increase while testing (.3% I consider noise), but seems like the right thing to do. Signed-off-by: Brian Haley Signed-off-by: David S. Miller commit 56fc85ac961e2c20dcb5ef07e2628b3f93de2e49 Author: Thomas Graf Date: Tue Aug 15 00:37:29 2006 -0700 [RTNETLINK]: Unexport rtnl socket Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 0ec6d3f467faeec5dd3b617959eb90e9d520113d Author: Thomas Graf Date: Tue Aug 15 00:37:09 2006 -0700 [NET] link: Convert notifications to use rtnl_notify() Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit bd5785ba3ac1c89aa4c351ceb2acd96686424d8c Author: Thomas Graf Date: Tue Aug 15 00:36:49 2006 -0700 [WIRELESS]: Convert notifications to use rtnl_notify() Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 280a306c539389156477cc9c07028d43fe4fbf86 Author: Thomas Graf Date: Tue Aug 15 00:36:28 2006 -0700 [BRIDGE]: Convert notifications to use rtnl_notify() Fixes a wrong use of current->pid as netlink pid. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 8c384bfa36b1dbeba8154da20d49167ce3e275c4 Author: Thomas Graf Date: Tue Aug 15 00:36:07 2006 -0700 [IPv6] prefix: Convert prefix notifications to use rtnl_notify() Fixes a wrong use of current->pid as netlink pid. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 8d7a76c9b17866f426fcbb531c81af7a1f53e071 Author: Thomas Graf Date: Tue Aug 15 00:35:47 2006 -0700 [IPv6] link: Convert link notifications to use rtnl_notify() Fixes a wrong use of current->pid as netlink pid. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 21713ebc4f119950e87d21c4637d5a750eea20e8 Author: Thomas Graf Date: Tue Aug 15 00:35:24 2006 -0700 [IPv6] route: Convert route notifications to use rtnl_notify() Fixes a wrong use of current->pid as netlink pid. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 5d620266431c03d1dac66287367c6da26c64a069 Author: Thomas Graf Date: Tue Aug 15 00:35:02 2006 -0700 [IPv6] address: Convert address notification to use rtnl_notify() Fixes a wrong use of current->pid as netlink pid. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit f21c7bc5f6a0a5bd03988886ff46656bc3f255b7 Author: Thomas Graf Date: Tue Aug 15 00:34:17 2006 -0700 [IPv4] route: Convert route notifications to use rtnl_notify() Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit d6062cbbd1f5e92c94e5eae9ef1a280ed48d56d5 Author: Thomas Graf Date: Tue Aug 15 00:33:59 2006 -0700 [IPv4] address: Convert address notification to use rtnl_notify() Adds support for NLM_F_ECHO allowing applications to easly see which address have been deleted, added, or promoted. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit dc738dd83e88c3c5de55431f8cfb758de5d4df48 Author: Thomas Graf Date: Tue Aug 15 00:33:35 2006 -0700 [DECNET]: Convert DECnet notifications to use rtnl_notify() Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit b8673311804ca29680dd584bd08352001fcbe2f8 Author: Thomas Graf Date: Tue Aug 15 00:33:14 2006 -0700 [NEIGH]: Convert neighbour notifications ot use rtnl_notify() Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit c17084d21c18497b506bd28b82d964bc9e6c424b Author: Thomas Graf Date: Tue Aug 15 00:32:48 2006 -0700 [NET] fib_rules: Convert fib rule notification to use rtnl_notify() Adds support for NLM_F_ECHO to simplify the process of identifying inserted rules with an auto generated priority. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 97676b6b5538b3e059d33b8338e7d5cc41c5f1f1 Author: Thomas Graf Date: Tue Aug 15 00:31:41 2006 -0700 [RTNETLINK]: Add rtnetlink notification interface Adds rtnl_notify() to send rtnetlink notification messages and rtnl_set_sk_err() to report notification errors as socket errors in order to indicate the need of a resync due to loss of events. nlmsg_report() is added to properly document the meaning of NLM_F_ECHO. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit d387f6ad10764fc2174373b4a1cca443adee36e3 Author: Thomas Graf Date: Tue Aug 15 00:31:06 2006 -0700 [NETLINK]: Add notification message sending interface Adds nlmsg_notify() implementing proper notification logic. The message is multicasted to all listeners in the group. The applications the requests orignates from can request a unicast back report in which case said socket will be excluded from the multicast to avoid duplicated notifications. nlmsg_multicast() is extended to take allocation flags to allow notification in atomic contexts. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 2942e90050569525628a9f34e0daaa9b661b49cc Author: Thomas Graf Date: Tue Aug 15 00:30:25 2006 -0700 [RTNETLINK]: Use rtnl_unicast() for rtnetlink unicasts Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit f8d8fda54a1bfcf8cf829e44c494b2b4582819aa Author: David S. Miller Date: Tue Aug 15 00:15:41 2006 -0700 [IPV6] udp: Fix type in previous change. UDPv6 stats are UDP6_foo not UDP_foo. Signed-off-by: David S. Miller commit 62872e2dcb3127b20a49e3b4b1d93523cf476cc4 Author: Stphane Witzmann Date: Tue Aug 15 00:09:17 2006 -0700 [ARCNET]: SoHard PCI support Add support for a SoHard PCI ARCnet card. Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 9c3bd6833a4df1abd9ecd3b51492b8949bf9cd11 Author: Bjorn Helgaas Date: Tue Aug 15 00:05:38 2006 -0700 [IRDA]: Replace hard-coded dev_self[] array sizes with ARRAY_SIZE() Several IR drivers used "for (i = 0; i < 4; i++)" to walk their dev_self[] table. Better to use ARRAY_SIZE(). And fix ali-ircc so it won't run off the end if we find too many adapters. Signed-off-by: Bjorn Helgaas Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 9a673e563e543a5c8a6f9824562e55e807b8a56c Author: Adrian Bunk Date: Tue Aug 15 00:03:53 2006 -0700 [SELINUX]: security/selinux/hooks.c: Make 4 functions static. This patch makes four needlessly global functions static. Signed-off-by: Adrian Bunk Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 97a4f3e7110619568aa239fe19143d9ec42dede5 Author: Alan Cox Date: Tue Aug 15 00:01:05 2006 -0700 [NETFILTER]: Make unused signal code go away so nobody copies its brokenness This code is wrong on so many levels, please lose it so it isn't replicated anywhere else. Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit a18135eb9389c26d36ef5c05bd8bc526e0cbe883 Author: David S. Miller Date: Tue Aug 15 00:00:09 2006 -0700 [IPV6]: Add UDP_MIB_{SND,RCV}BUFERRORS handling. Signed-off-by: David S. Miller commit 81aa646cc4df3779bcbf9d18cc2c0813ee9b3262 Author: Martin Bligh Date: Mon Aug 14 23:57:10 2006 -0700 [IPV4]: add the UdpSndbufErrors and UdpRcvbufErrors MIBs Signed-off-by: Martin Bligh Signed-off-by: Andrew Morton commit 2aa7f36cdb332a32849afbf25fcbf35dce5b1940 Author: Adrian Bunk Date: Mon Aug 14 23:55:20 2006 -0700 [DECNET]: cleanups - make the following needlessly global functions static: - dn_fib.c: dn_fib_sync_down() - dn_fib.c: dn_fib_sync_up() - dn_rules.c: dn_fib_rule_action() - remove the following unneeded prototype: - dn_fib.c: dn_cache_dump() Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 50da859d4e566fba90ebda87b843970d902c903e Author: Andreas Mohr Date: Mon Aug 14 23:54:30 2006 -0700 [TG3]: Constify firmware structs Constify largish areas of firmware data in Tigon3 ethernet driver. non-const: lsmod: tg3 101404 0 objdump -x: .rodata 000003e8 .data 00004a0c ls -l: -rw-r--r-- 1 root root 114404 2006-08-19 21:36 drivers/net/tg3.ko const: lsmod: tg3 101404 0 objdump -x: .rodata 000042c8 .data 00000b4c ls -l: -rw-r--r-- 1 root root 114532 2006-08-19 21:06 drivers/net/tg3.ko Signed-off-by: Andreas Mohr Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 90d41122f79c8c3687d965dde4c6d30a6e0cac4c Author: Adrian Bunk Date: Mon Aug 14 23:49:16 2006 -0700 [IPV6] ip6_fib.c: make code static Make the following needlessly global code static: - fib6_walker_lock - struct fib6_walker_list - fib6_walk_continue() - fib6_walk() Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit d1aa62f15b511457af2233150c960dc1fd02769b Author: Steven Whitehouse Date: Fri Aug 11 16:44:18 2006 -0700 [DECNET] Fix to decnet rules compare function Here is a fix to the DECnet rules compare function where we used 32bit values rather than 16bit values. Spotted by Patrick McHardy. Signed-off-by: Steven Whitehouse Signed-off-by: David S. Miller commit d880309ae17783c27016bf4f903782d322d0a2a1 Author: Steven Whitehouse Date: Fri Aug 11 16:43:41 2006 -0700 [DECNET] Fix to multiple tables routing Here is a fix to Patrick McHardy's increase number of routing tables patch for DECnet. I did just test this and it appears to be working fine with this patch. Signed-off-by: Steven Whitehouse Acked-by: Patrick McHardy Signed-off-by: David S. Miller commit b6fe17d6cc5d570b72f8e4da351b593c5a680355 Author: Stephen Hemminger Date: Tue Aug 29 17:06:13 2006 -0700 [NET] netdev: Check name length Some improvements to robust name interface. These API's are safe now by convention, but it is worth providing some safety checks against future bugs. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 3696f625e2efa1f1b228b276788274e1eb86fcfa Author: Stephen Hemminger Date: Thu Aug 10 23:36:01 2006 -0700 [HTB]: rbtree cleanup Add code to initialize rb tree nodes, and check for double deletion. This is not a real fix, but I can make it trap sometimes and may be a bandaid for: http://bugzilla.kernel.org/show_bug.cgi?id=6681 Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 0cef296da9331e871401076b8c0688b2b31fcadd Author: Stephen Hemminger Date: Thu Aug 10 23:35:38 2006 -0700 [HTB]: Use hlist for hash lists. Use hlist instead of list for the hash list. This saves space, and we can check for double delete better. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 87990467d387f922103db31678034785d8f21cb7 Author: Stephen Hemminger Date: Thu Aug 10 23:35:16 2006 -0700 [HTB]: Lindent Code was a mess in terms of indentation. Run through Lindent script, and cleanup the damage. Also, don't use, vim magic comment, and substitute inline for __inline__. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 18a63e868b04cf949643cc9d2c8a51d8cb5da9c4 Author: Stephen Hemminger Date: Thu Aug 10 23:34:02 2006 -0700 [HTB]: HTB_HYSTERESIS cleanup Change the conditional compilation around HTB_HYSTERSIS since code was splitting mid expression. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 9ac961ee05bfc837e5271be34ad7158e90dce7d9 Author: Stephen Hemminger Date: Thu Aug 10 23:33:16 2006 -0700 [HTB]: Remove lock macro. Get rid of the macro's being used to obscure the locking. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 3bf72957d2a553c343e4285463ef0a88139bdec4 Author: Stephen Hemminger Date: Thu Aug 10 23:31:08 2006 -0700 [HTB]: Remove broken debug code. The HTB network scheduler had debug code that wouldn't compile and confused and obfuscated the code, remove it. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit b801f54917b7c6e8540f877ee562cd0725e62ebd Author: Patrick McHardy Date: Thu Aug 10 23:12:34 2006 -0700 [NET]: Increate RT_TABLE_MAX to 2^32 Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit abcab268303c22d24fc89fedd35d82271d20f5da Author: Patrick McHardy Date: Thu Aug 10 23:11:47 2006 -0700 [DECNET]: Increase number of possible routing tables to 2^32 Increase the number of possible routing tables to 2^32 by replacing the fixed sized array of pointers by a hash table and replacing iterations over all possible table IDs by hash table walking. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 1b43af5480c351dbcb2eef478bafe179cbeb6e83 Author: Patrick McHardy Date: Thu Aug 10 23:11:17 2006 -0700 [IPV6]: Increase number of possible routing tables to 2^32 Increase number of possible routing tables to 2^32 by replacing iterations over all possible table IDs by hash table walking. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 1af5a8c4a11cfed0c9a7f30fcfb689981750599c Author: Patrick McHardy Date: Thu Aug 10 23:10:46 2006 -0700 [IPV4]: Increase number of possible routing tables to 2^32 Increase the number of possible routing tables to 2^32 by replacing the fixed sized array of pointers by a hash table and replacing iterations over all possible table IDs by hash table walking. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 9e762a4a89b302cb3b26a1f9bb33eff459eaeca9 Author: Patrick McHardy Date: Thu Aug 10 23:09:48 2006 -0700 [NET]: Introduce RTA_TABLE/FRA_TABLE attributes Introduce RTA_TABLE route attribute and FRA_TABLE routing rule attribute to hold 32 bit routing table IDs. Usespace compatibility is provided by continuing to accept and send the rtm_table field, but because of its limited size it can only carry the low 8 bits of the table ID. This implies that if larger IDs are used, _all_ userspace programs using them need to use RTA_TABLE. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 2dfe55b47e3d66ded5a84caf71e0da5710edf48b Author: Patrick McHardy Date: Thu Aug 10 23:08:33 2006 -0700 [NET]: Use u32 for routing table IDs Use u32 for routing table IDs in net/ipv4 and net/decnet in preparation of support for a larger number of routing tables. net/ipv6 already uses u32 everywhere and needs no further changes. No functional changes are made by this patch. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit d924424aaed116b362c6d0e667d912b77e655085 Author: Stephen Hemminger Date: Thu Aug 10 23:03:23 2006 -0700 [NEIGHBOUR]: Use ALIGN() macro. Rather than opencoding the mask, it looks better to use ALIGN() macro from kernel.h. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 1e38bb3a38d08129d08c904b10ea3ba08e22d297 Author: David S. Miller Date: Thu Aug 10 00:22:41 2006 -0700 [NET]: Kill double initialization in sock_alloc_inode. No need to set ei->socket.flags to zero twice. Signed-off-by: David S. Miller commit bf0d52492d82ad70684e17c8a46942c13d0e140e Author: Dave Jones Date: Fri Sep 22 14:00:29 2006 -0700 [NET]: Remove unnecessary config.h includes from net/ config.h is automatically included by kbuild these days. Signed-off-by: Dave Jones Signed-off-by: David S. Miller commit f0fd27d42e39b91f85e1840ec49b072fd6c545b8 Author: Stephen Hemminger Date: Wed Aug 9 21:03:17 2006 -0700 [NET]: sock_register interface changes The sock_register() doesn't change the family, so the protocols can define it read-only. No caller ever checks return value from sock_unregister() Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 55737fda0bc73cb20f702301d8b52938a5a43630 Author: Stephen Hemminger Date: Fri Sep 1 00:23:39 2006 -0700 [NET]: socket family using RCU Replace the gross custom locking done in socket code for net_family[] with simple RCU usage. Some reordering necessary to avoid sleep issues with sock_alloc. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 757dbb494be3309fe41ce4c62f8057d8b41d8897 Author: Stephen Hemminger Date: Wed Aug 9 20:50:00 2006 -0700 [NET]: drop unused elements from net_proto_family Three values in net_proto_family are defined but never used. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 89bddce58e85bb18b13f5077e8349ba9a3ee2597 Author: Stephen Hemminger Date: Fri Sep 1 00:19:31 2006 -0700 [NET] socket: code style cleanup Make socket.c conform to current style: * run through Lindent * get rid of unneeded casts * split assignment and comparsion where possible Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 53fad3cbff120d8987f377eff374cf4db4ecb177 Author: Sridhar Samudrala Date: Wed Aug 9 17:03:17 2006 -0700 [SUNRPC]: Remove the unnecessary check for highmem in xs_sendpages(). Just call kernel_sendpage() directly. Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller commit a22ec367b08455f95fa0096ce1999950b6f6911c Author: Steven Whitehouse Date: Wed Aug 9 16:00:57 2006 -0700 [DECNET]: Convert rwlock to spinlock As per Stephen Hemminger's recent patch to ipv4/fib_semantics.c this is the same change but for DECnet. Signed-off-by: Steven Whitehouse Signed-off-by: David S. Miller commit a8731cbf61c8768ea129780b70dc7dfc6795aad4 Author: Steven Whitehouse Date: Wed Aug 9 15:56:46 2006 -0700 [DECNET]: Covert rules to use generic code This patch converts the DECnet rules code to use the generic rules system created by Thomas Graf . Signed-off-by: Steven Whitehouse Acked-by: Thomas Graf Signed-off-by: David S. Miller commit 8f491069b40be5d627007a343f99759e9da6a178 Author: Herbert Xu Date: Wed Aug 9 15:47:12 2006 -0700 [IPV4]: Use network-order dport for all visible inet_lookup_* Right now most inet_lookup_* functions take a host-order hnum instead of a network-order dport because that's how it is represented internally. This means that users of these functions have to be careful about using the right byte-order. To add more confusion, inet_lookup takes a network-order dport unlike all other functions. So this patch changes all visible inet_lookup functions to take a dport and move all dport->hnum conversion inside them. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 832b4c5e184391773e462653aa862a8cab71f38d Author: Stephen Hemminger Date: Tue Aug 29 16:48:09 2006 -0700 [IPV4] fib: convert reader/writer to spinlock Ther is no point in using a more expensive reader/writer lock for a low contention lock like the fib_info_lock. The only reader case is in handling route redirects. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit b14295532421c40f82ee099fdbd3d011f022e756 Author: Ville Nuorvala Date: Tue Aug 8 16:44:17 2006 -0700 [IPV6]: Make sure fib6_rule_lookup doesn't return NULL The callers of fib6_rule_lookup don't expect it to return NULL, therefore it must return ip6_null_entry whenever fib_rule_lookup fails. Signed-off-by: Ville Nuorvala Signed-off-by: David S. Miller commit 99a92ff50424146ba01a222248fd47a1cd55b78f Author: Herbert Xu Date: Tue Aug 8 02:18:10 2006 -0700 [IPV4]: Uninline inet_lookup_listener By modern standards this function is way too big to be inlined. It's even bigger than __inet_lookup_listener :) Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 1a01912ae0a5666c4c24eaae2b4821711e2ad79a Author: Louis Nyffenegger Date: Tue Aug 8 00:56:11 2006 -0700 [INET]: Remove is_setbyuser patch The value is_setbyuser from struct ip_options is never used and set only one time (http://linux-net.osdl.org/index.php/TODO#IPV4). This little patch removes it from the kernel source. Signed-off-by: Louis Nyffenegger Signed-off-by: David S. Miller commit 0298f36a579b5bd7f10f6f6d57e5929977a865a1 Author: David S. Miller Date: Mon Aug 7 21:56:52 2006 -0700 [IPV4]: Kill fib4_rules_clean(). As noted by Adrian Bunk this function is totally unused. Signed-off-by: David S. Miller commit 8423a9aadfaa135fd5fd1ab8bbd4a1e76b4143c9 Author: David S. Miller Date: Mon Aug 7 21:54:37 2006 -0700 [IPV6]: Protect RTM_GETRULE table entry with IPV6_MULTIPLE_TABLES ifdef This is how IPv4 handles this case too. Based upon a patch from Andrew Morton. Signed-off-by: David S. Miller commit 8ce11e6a9faf1f1c849b77104adc1642c46aee95 Author: Adrian Bunk Date: Mon Aug 7 21:50:48 2006 -0700 [NET]: Make code static. This patch makes needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller commit e6242e928ef1e4ed853f909a7479e4934f4bcb70 Author: Sridhar Samudrala Date: Mon Aug 7 20:58:01 2006 -0700 [SUNRPC]: Update to use in-kernel sockets API. Signed-off-by: Sridhar Samudrala Acked-by: James Morris Signed-off-by: David S. Miller commit ac5a488ef252ed673cb067843e411f8cc43f7ab9 Author: Sridhar Samudrala Date: Mon Aug 7 20:57:31 2006 -0700 [NET]: Round out in-kernel sockets API This patch implements wrapper functions that provide a convenient way to access the sockets API for in-kernel users like sunrpc, cifs & ocfs2 etc and any future users. Signed-off-by: Sridhar Samudrala Acked-by: James Morris Signed-off-by: David S. Miller commit b63bbc5006a0a62fabc81c4f77e95f16ff16f340 Author: Thomas Graf Date: Mon Aug 7 18:00:57 2006 -0700 [NEIGH]: Move netlink neighbour table bits to linux/neighbour.h rtnetlink_rcv_msg() is not longer required to parse attributes for the neighbour tables layer, remove dependency on obsolete and buggy rta_buf. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit ca860fb39b4aa1479e2fea67435a2c1eac9ce789 Author: Thomas Graf Date: Mon Aug 7 18:00:18 2006 -0700 [NEIGH]: Convert neighbour table dumping to new netlink api Also fixes skipping of already dumped neighbours. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 6b3f8674bccbb2e784d01e44373fb730af6cb149 Author: Thomas Graf Date: Mon Aug 7 17:58:53 2006 -0700 [NEIGH]: Convert neighbour table modification to new netlink api Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 9067c722cf6930adf1df2d169de9094dd90b0c33 Author: Thomas Graf Date: Mon Aug 7 17:57:44 2006 -0700 [NEIGH]: Move netlink neighbour bits to linux/neighbour.h Moves netlink neighbour bits to linux/neighbour.h. Also moves bits to be exported to userspace from net/neighbour.h to linux/neighbour.h and removes __KERNEL__ guards, userspace is not supposed to be using it. rtnetlink_rcv_msg() is not longer required to parse attributes for the neighbour layer, remove dependency on obsolete and buggy rta_buf. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 8b8aec508302d4e63fd88f47894805115277f70f Author: Thomas Graf Date: Mon Aug 7 17:56:37 2006 -0700 [NEIGH]: Convert neighbour dumping to new netlink api Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 5208debd0f1da07bbb350f8b0b142775d4f002ea Author: Thomas Graf Date: Mon Aug 7 17:55:40 2006 -0700 [NEIGH]: Convert neighbour addition to new netlink api Fixes: Return EAFNOSUPPORT if no table matches the specified address family. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit a14a49d2b7b9290e87751f21f503f1954267d4c4 Author: Thomas Graf Date: Mon Aug 7 17:53:08 2006 -0700 [NEIGH]: Convert neighbour deletion to new netlink api Fixes: Return ENOENT if the neighbour is not found (was EINVAL) Return EAFNOSUPPORT if no table matches the specified address family. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 3226f6881719e61e00e92b4c85a8ef49aa4d42b1 Author: Patrick McHardy Date: Sun Aug 6 22:24:08 2006 -0700 [IPV6]: Fix policy routing lookup When the lookup in a table returns ip6_null_entry the policy routing lookup returns it instead of continuing in the next table, which effectively means it only searches the local table. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 6c813a7297e3af4cd7c3458e09e9ee3d161c6830 Author: Patrick McHardy Date: Sun Aug 6 22:22:47 2006 -0700 [IPV6]: Fix crash in ip6_del_rt ip6_null_entry doesn't have rt6i_table set, when trying to delete it the kernel crashes dereferencing table->tb6_lock. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit d7aba67f814729647c938ac6da2d5224b790f926 Author: Patrick McHardy Date: Sat Aug 5 02:20:42 2006 -0700 [IPV6]: Fix thinko in rt6_fill_node This looks like a mistake, the table ID is overwritten again. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 394f545db6e7e4d7a6a2fa3f543b755ca39d58ac Author: Patrick McHardy Date: Sat Aug 5 00:58:52 2006 -0700 [NETFILTER]: nf_queue: handle GSO packets Handle GSO packets in nf_queue by segmenting them before queueing to avoid breaking GSO in case they get mangled. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 4cf411de49c65140b3c259748629b561c0d3340f Author: Patrick McHardy Date: Sat Aug 5 00:58:33 2006 -0700 [NETFILTER]: Get rid of HW checksum invalidation Update hardware checksums incrementally to avoid breaking GSO. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 84fa7933a33f806bbbaae6775e87459b1ec584c0 Author: Patrick McHardy Date: Tue Aug 29 16:44:56 2006 -0700 [NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETE Replace CHECKSUM_HW by CHECKSUM_PARTIAL (for outgoing packets, whose checksum still needs to be completed) and CHECKSUM_COMPLETE (for incoming packets, device supplied full checksum). Patch originally from Herbert Xu, updated by myself for 2.6.18-rc3. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 8584d6df39db5601965f9bc5e3bf2fea833ad7bb Author: Patrick McHardy Date: Sat Aug 5 00:56:16 2006 -0700 [NETFILTER]: netbios conntrack: fix compile Fix compile breakage caused by move of IFA_F_SECONDARY to new header file. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 0844565fb8a9418f5a860aa480c1aef70319c9a2 Author: Thomas Graf Date: Fri Aug 4 23:05:56 2006 -0700 [NET]: Move netlink interface bits to linux/if.h Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit b60c5115f4abf0b961a18682889798dcfbe6a801 Author: Thomas Graf Date: Fri Aug 4 23:05:34 2006 -0700 [NET]: Convert link dumping to new netlink api Transforms netlink code to dump link tables to use the new netlink api. Makes rtnl_getlink() available regardless of the availability of the wireless extensions. Adding copy_rtnl_link_stats() avoids the structural dependency of struct rtnl_link_stats on struct net_device_stats and thus avoids troubles later on. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit da5e0494c542dddc56a1f1edfd30310ea30f41ff Author: Thomas Graf Date: Thu Aug 10 21:17:37 2006 -0700 [NET]: Convert link modification to new netlink api Transforms do_setlink() into rtnl_setlink() using the new netlink api. A warning message printed to the console is added in the event that a change request fails while part of the change request has been comitted already. The ioctl() based nature of net devices makes it almost impossible to move on to atomic netlink operations without obsoleting some of the functionality. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 1823730fbc89fadde72a7bb3b7bdf03cc7b8835c Author: Thomas Graf Date: Fri Aug 4 23:04:54 2006 -0700 [IPv4]: Move interface address bits to linux/if_addr.h Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 47f68512d2685431f1781830dfcbab31bda87644 Author: Thomas Graf Date: Fri Aug 4 23:04:36 2006 -0700 [IPV4]: Convert address dumping to new netlink api Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit dfdd5fd4e93d98e06be9ac9db84e3b98c6c26706 Author: Thomas Graf Date: Fri Aug 4 23:04:17 2006 -0700 [IPV4]: Convert address deletion to new netlink api Fixes various unvalidated netlink attributes causing memory corruptions when left empty by userspace. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 5c7539781d392629fb40b04aad9a1f197b66cd01 Author: Thomas Graf Date: Fri Aug 4 23:03:53 2006 -0700 [IPV4]: Convert address addition to new netlink api Adds rtm_to_ifaddr() transforming a netlink message to a struct in_ifaddr. Fixes various unvalidated netlink attributes causing memory corruptions when left empty by userspace applications. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit bf8b79e444a748963c71d2a58709e1ce5597e1b5 Author: Thomas Graf Date: Fri Aug 4 23:03:29 2006 -0700 [NETLINK]: Convert core netlink handling to new netlink api Fixes a theoretical memory and locking leak when the size of the netlink header would exceed the skb tailroom. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit fe4944e59c357f945f81bc67edb7ed1392e875ad Author: Thomas Graf Date: Fri Aug 4 23:03:05 2006 -0700 [NETLINK]: Extend netlink messaging interface Adds: nlmsg_get_pos() return current position in message nlmsg_trim() trim part of message nla_reserve_nohdr(skb, len) reserve room for an attribute w/o hdr nla_put_nohdr(skb, len, data) add attribute w/o hdr nla_find_nested() find attribute in nested attributes Fixes nlmsg_new() to take allocation flags and consider size. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit e1ef4bf23b1ced0bf78a1c98289f746486e5c912 Author: Thomas Graf Date: Fri Aug 4 03:39:22 2006 -0700 [IPV4]: Use Protocol Independant Policy Routing Rules Framework Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 101367c2f8c464ea96643192673aa18d88e6336d Author: Thomas Graf Date: Fri Aug 4 03:39:02 2006 -0700 [IPV6]: Policy Routing Rules Adds support for policy routing rules including a new local table for routes with a local destination. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 14c0b97ddfc2944982d078b8e33b088840068976 Author: Thomas Graf Date: Fri Aug 4 03:38:38 2006 -0700 [NET]: Protocol Independant Policy Routing Rules Framework Derived from net/ipv/fib_rules.c Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit c71099acce933455123ee505cc75964610a209ad Author: Thomas Graf Date: Fri Aug 4 23:20:06 2006 -0700 [IPV6]: Multiple Routing Tables Adds the framework to support multiple IPv6 routing tables. Currently all automatically generated routes are put into the same table. This could be changed at a later point after considering the produced locking overhead. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 5d0bbeeb144f631150881712607345c532e38e7e Author: Thomas Graf Date: Fri Aug 4 03:37:36 2006 -0700 [IPV6]: Remove ndiscs rt6_lock dependency (Ab)using rt6_lock wouldn't work anymore if rt6_lock is converted into a per table lock. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller commit 8161327311fe4da1684ed08015e141feb9a0a737 Author: Paul Moore Date: Thu Aug 3 16:50:39 2006 -0700 [NetLabel]: tie NetLabel into the Kconfig system Modify the net/Kconfig file to enable selecting the NetLabel Kconfig options. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 7420ed23a4f77480b5b7b3245e5da30dd24b7575 Author: Venkat Yekkirala Date: Fri Aug 4 23:17:57 2006 -0700 [NetLabel]: SELinux support Add NetLabel support to the SELinux LSM and modify the socket_post_create() LSM hook to return an error code. The most significant part of this patch is the addition of NetLabel hooks into the following SELinux LSM hooks: * selinux_file_permission() * selinux_socket_sendmsg() * selinux_socket_post_create() * selinux_socket_sock_rcv_skb() * selinux_socket_getpeersec_stream() * selinux_socket_getpeersec_dgram() * selinux_sock_graft() * selinux_inet_conn_request() The basic reasoning behind this patch is that outgoing packets are "NetLabel'd" by labeling their socket and the NetLabel security attributes are checked via the additional hook in selinux_socket_sock_rcv_skb(). NetLabel itself is only a labeling mechanism, similar to filesystem extended attributes, it is up to the SELinux enforcement mechanism to perform the actual access checks. In addition to the changes outlined above this patch also includes some changes to the extended bitmap (ebitmap) and multi-level security (mls) code to import and export SELinux TE/MLS attributes into and out of NetLabel. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 96cb8e3313c7a12e026c1ed510522ae6f6023875 Author: Paul Moore Date: Thu Aug 3 16:48:59 2006 -0700 [NetLabel]: CIPSOv4 and Unlabeled packet integration Add CIPSO/IPv4 and unlabeled packet management to the NetLabel subsystem. The CIPSO/IPv4 changes allow the configuration of CIPSO/IPv4 within the overall NetLabel framework. The unlabeled packet changes allows NetLabel to pass unlabeled packets without error. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit d15c345fe3b8dfda0fa5a1d2143a35fffa746a43 Author: Paul Moore Date: Thu Aug 3 16:48:37 2006 -0700 [NetLabel]: core NetLabel subsystem Add a new kernel subsystem, NetLabel, to provide explicit packet labeling services (CIPSO, RIPSO, etc.) to LSM developers. NetLabel is designed to work in conjunction with a LSM to intercept and decode security labels on incoming network packets as well as ensure that outgoing network packets are labeled according to the security mechanism employed by the LSM. The NetLabel subsystem is configured through a Generic NETLINK interface described in the header files included in this patch. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 446fda4f26822b2d42ab3396aafcedf38a9ff2b6 Author: Paul Moore Date: Thu Aug 3 16:48:06 2006 -0700 [NetLabel]: CIPSOv4 engine Add support for the Commercial IP Security Option (CIPSO) to the IPv4 network stack. CIPSO has become a de-facto standard for trusted/labeled networking amongst existing Trusted Operating Systems such as Trusted Solaris, HP-UX CMW, etc. This implementation is designed to be used with the NetLabel subsystem to provide explicit packet labeling to LSM developers. The CIPSO/IPv4 packet labeling works by the LSM calling a NetLabel API function which attaches a CIPSO label (IPv4 option) to a given socket; this in turn attaches the CIPSO label to every packet leaving the socket without any extra processing on the outbound side. On the inbound side the individual packet's sk_buff is examined through a call to a NetLabel API function to determine if a CIPSO/IPv4 label is present and if so the security attributes of the CIPSO label are returned to the caller of the NetLabel API function. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 11a03f78fbf15a866ba3bf6359a75cdfd1ced703 Author: Paul Moore Date: Thu Aug 3 16:46:20 2006 -0700 [NetLabel]: core network changes Changes to the core network stack to support the NetLabel subsystem. This includes changes to the IPv4 option handling to support CIPSO labels. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 8802f616f6de8576805f32e47602816f141118f2 Author: Paul Moore Date: Thu Aug 3 16:45:49 2006 -0700 [NetLabel]: documentation Documentation for the NetLabel system, this includes a basic overview of how NetLabel works, how LSM developers can integrate it into their favorite LSM, as well as documentation on the CIPSO related sysctl variables. Also, due to the difficulty of finding expired IETF drafts, I am including the IETF CIPSO draft that is the basis of the NetLabel CIPSO implementation. Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit a51c64f1e5c2876eab2a32955acd9e8015c91c15 Author: Venkat Yekkirala Date: Thu Jul 27 22:01:34 2006 -0700 [MLSXFRM]: Fix build with SECURITY_NETWORK_XFRM disabled. The following patch will fix the build problem (encountered by Andrew Morton) when SECURITY_NETWORK_XFRM is not enabled. As compared to git-net-selinux_xfrm_decode_session-build-fix.patch in -mm, this patch sets the return parameter sid to SECSID_NULL in selinux_xfrm_decode_session() and handles this value in the caller selinux_inet_conn_request() appropriately. Signed-off-by: Venkat Yekkirala Acked-by: James Morris Signed-off-by: David S. Miller commit 4237c75c0a35535d7f9f2bfeeb4b4df1e068a0bf Author: Venkat Yekkirala Date: Mon Jul 24 23:32:50 2006 -0700 [MLSXFRM]: Auto-labeling of child sockets This automatically labels the TCP, Unix stream, and dccp child sockets as well as openreqs to be at the same MLS level as the peer. This will result in the selection of appropriately labeled IPSec Security Associations. This also uses the sock's sid (as opposed to the isec sid) in SELinux enforcement of secmark in rcv_skb and postroute_last hooks. Signed-off-by: Venkat Yekkirala Signed-off-by: David S. Miller commit cb969f072b6d67770b559617f14e767f47e77ece Author: Venkat Yekkirala Date: Mon Jul 24 23:32:20 2006 -0700 [MLSXFRM]: Default labeling of socket specific IPSec policies This defaults the label of socket-specific IPSec policies to be the same as the socket they are set on. Signed-off-by: Venkat Yekkirala Signed-off-by: David S. Miller commit beb8d13bed80f8388f1a9a107d07ddd342e627e8 Author: Venkat Yekkirala Date: Fri Aug 4 23:12:42 2006 -0700 [MLSXFRM]: Add flow labeling This labels the flows that could utilize IPSec xfrms at the points the flows are defined so that IPSec policy and SAs at the right label can be used. The following protos are currently not handled, but they should continue to be able to use single-labeled IPSec like they currently do. ipmr ip_gre ipip igmp sit sctp ip6_tunnel (IPv6 over IPv6 tunnel device) decnet Signed-off-by: Venkat Yekkirala Signed-off-by: David S. Miller commit 4e2ba18eae7f370c7c3ed96eaca747cc9b39f917 Author: Venkat Yekkirala Date: Mon Jul 24 23:31:14 2006 -0700 [MLSXFRM]: Add security context to acquire messages using PF_KEY This includes the security context of a security association created for use by IKE in the acquire messages sent to IKE daemons using PF_KEY. This would allow the daemons to include the security context in the negotiation, so that the resultant association is unique to that security context. Signed-off-by: Venkat Yekkirala Signed-off-by: David S. Miller commit 0d681623d30c6565e8b62889f3aa3f4d4662c3e8 Author: Serge Hallyn Date: Mon Jul 24 23:30:44 2006 -0700 [MLSXFRM]: Add security context to acquire messages using netlink This includes the security context of a security association created for use by IKE in the acquire messages sent to IKE daemons using netlink/xfrm_user. This would allow the daemons to include the security context in the negotiation, so that the resultant association is unique to that security context. Signed-off-by: Serge Hallyn Signed-off-by: David S. Miller commit e0d1caa7b0d5f02e4f34aa09c695d04251310c6c Author: Venkat Yekkirala Date: Mon Jul 24 23:29:07 2006 -0700 [MLSXFRM]: Flow based matching of xfrm policy and state This implements a seemless mechanism for xfrm policy selection and state matching based on the flow sid. This also includes the necessary SELinux enforcement pieces. Signed-off-by: Venkat Yekkirala Signed-off-by: David S. Miller commit b6340fcd761acf9249b3acbc95c4dc555d9beb07 Author: Venkat Yekkirala Date: Mon Jul 24 23:28:37 2006 -0700 [MLSXFRM]: Add security sid to flowi This adds security to flow key for labeling of flows as also to allow for making flow cache lookups based on the security label seemless. Signed-off-by: Venkat Yekkirala Signed-off-by: David S. Miller commit 892c141e62982272b9c738b5520ad0e5e1ad7b42 Author: Venkat Yekkirala Date: Fri Aug 4 23:08:56 2006 -0700 [MLSXFRM]: Add security sid to sock This adds security for IP sockets at the sock level. Security at the sock level is needed to enforce the SELinux security policy for security associations even when a sock is orphaned (such as in the TCP LAST_ACK state). This will also be used to enforce SELinux controls over data arriving at or leaving a child socket while it's still waiting to be accepted. Signed-off-by: Venkat Yekkirala Signed-off-by: David S. Miller commit 08554d6b33e60aa8ee40bbef94505941c0eefef2 Author: Venkat Yekkirala Date: Mon Jul 24 23:27:16 2006 -0700 [MLSXFRM]: Define new SELinux service routine This defines a routine that combines the Type Enforcement portion of one sid with the MLS portion from the other sid to arrive at a new sid. This would be used to define a sid for a security association that is to be negotiated by IKE as well as for determing the sid for open requests and connection-oriented child sockets. Signed-off-by: Venkat Yekkirala Signed-off-by: David S. Miller commit 51bd39860ff829475aef611a3234309e37e090d9 Author: Venkat Yekkirala Date: Mon Jul 24 23:26:30 2006 -0700 [MLSXFRM]: Granular IPSec associations for use in MLS environments The current approach to labeling Security Associations for SELinux purposes uses a one-to-one mapping between xfrm policy rules and security associations. This doesn't address the needs of real world MLS (Multi-level System, traditional Bell-LaPadula) environments where a single xfrm policy rule (pertaining to a range, classified to secret for example) might need to map to multiple Security Associations (one each for classified, secret, top secret and all the compartments applicable to these security levels). This patch set addresses the above problem by allowing for the mapping of a single xfrm policy rule to multiple security associations, with each association used in the security context it is defined for. It also includes the security context to be used in IKE negotiation in the acquire messages sent to the IKE daemon so that a unique SA can be negotiated for each unique security context. A couple of bug fixes are also included; checks to make sure the SAs used by a packet match policy (security context-wise) on the inbound and also that the bundle used for the outbound matches the security context of the flow. This patch set also makes the use of the SELinux sid in flow cache lookups seemless by including the sid in the flow key itself. Also, open requests as well as connection-oriented child sockets are labeled automatically to be at the same level as the peer to allow for use of appropriately labeled IPSec associations. Description of changes: A "sid" member has been added to the flow cache key resulting in the sid being available at all needed locations and the flow cache lookups automatically using the sid. The flow sid is derived from the socket on the outbound and the SAs (unlabeled where an SA was not used) on the inbound. Outbound case: 1. Find policy for the socket. 2. OLD: Find an SA that matches the policy. NEW: Find an SA that matches BOTH the policy and the flow/socket. This is necessary since not every SA that matches the policy can be used for the flow/socket. Consider policy range Secret-TS, and SAs each for Secret and TS. We don't want a TS socket to use the Secret SA. Hence the additional check for the SA Vs. flow/socket. 3. NEW: When looking thru bundles for a policy, make sure the flow/socket can use the bundle. If a bundle is not found, create one, calling for IKE if necessary. If using IKE, include the security context in the acquire message to the IKE daemon. Inbound case: 1. OLD: Find policy for the socket. NEW: Find policy for the incoming packet based on the sid of the SA(s) it used or the unlabeled sid if no SAs were used. (Consider a case where a socket is "authorized" for two policies (unclassified-confidential, secret-top_secret). If the packet has come in using a secret SA, we really ought to be using the latter policy (secret-top_secret).) 2. OLD: BUG: No check to see if the SAs used by the packet agree with the policy sec_ctx-wise. (It was indicated in selinux_xfrm_sock_rcv_skb() that this was being accomplished by (x->id.spi == tmpl->id.spi || !tmpl->id.spi) in xfrm_state_ok, but it turns out tmpl->id.spi would normally be zero (unless xfrm policy rules specify one at the template level, which they usually don't). NEW: The socket is checked for access to the SAs used (based on the sid of the SAs) in selinux_xfrm_sock_rcv_skb(). Forward case: This would be Step 1 from the Inbound case, followed by Steps 2 and 3 from the Outbound case. Outstanding items/issues: - Timewait acknowledgements and such are generated in the current/upstream implementation using a NULL socket resulting in the any_socket sid (SYSTEM_HIGH) to be used. This problem is not addressed by this patch set. This patch: Add new flask definitions to SELinux Adds a new avperm "polmatch" to arbitrate flow/state access to a xfrm policy rule. Signed-off-by: Venkat Yekkirala Signed-off-by: David S. Miller commit 734a56285dbeedc6cc10aef6f700eeab7c65ea9f Author: David Woodhouse Date: Fri Sep 22 18:41:20 2006 +0100 Remove accidentally-added include/linux/utsrelease.h Signed-off-by: David Woodhouse commit e4e3295f0c0e1a09a46522359e24c0569e2e7b47 Author: David Woodhouse Date: Fri Sep 22 11:05:42 2006 +0100 Revert "[MTD] blkdev helper code: fix printk format warning" This reverts commit 668040fcd1e06fc3e68a92708cbdfa5a52c37d3c. The 'flags' field of the struct request is 'unsigned long'. Quite how Randy came to see 'long int format, different type arg' I don't know, but it doesn't seem to be the case any more. Signed-off-by: David Woodhouse commit 51197abf29657373bcf9803d87da3c3d8fc3a37e Author: Claudio Lanconelli Date: Fri Sep 22 11:01:37 2006 +0100 [MTD] Add SSFDC (SmartMedia) read-only translation layer Signed-off-by: Claudio Lanconelli Signed-off-by: David Woodhouse commit 98aacdfde05ccf512d4395eed0d4894eea2d163c Author: Jiri Slaby Date: Tue Sep 19 21:55:28 2006 +0200 [MTD] pmc551 pci cleanup Use pci_resource_start for getting start of regions and pci_iomap to not doing this directly by using dev->resource... (Thanks to Rolf Eike Beer) Signed-off-by: Jiri Slaby Signed-off-by: David Woodhouse commit 7fefb924d7aed7116fe2a68cdbfc9e36318e7300 Author: Jiri Slaby Date: Tue Sep 19 21:55:18 2006 +0200 [MTD] pmc551 use kzalloc Use kzalloc instad of kmalloc+memset(0). Signed-off-by: Jiri Slaby Signed-off-by: David Woodhouse commit cdf0a7d16980858e72f5d26bfe48abf01112fab5 Author: Jiri Slaby Date: Tue Sep 19 21:55:06 2006 +0200 [MTD] pmc551 whitespace cleanup Spaces were used for indent, there was more than 80 columns per line. Get rid of that stuff. Signed-off-by: Jiri Slaby Signed-off-by: David Woodhouse commit e417fcfb857b809e5dabc9b252ad70f090d553d1 Author: Lennert Buytenhek Date: Thu Sep 21 03:47:48 2006 +0200 [MTD] Remove iq80310 map driver The iq80310 mtd map driver depends on ARCH_IQ80310, which isn't defined anywhere in the tree (as we don't have 80310 support), and furthermore, everything the driver does can be done with physmap instead. Signed-off-by: Lennert Buytenhek Signed-off-by: David Woodhouse commit 6a545a0d6021a4d759ba6d0c1082d1abf8d64c84 Author: Frank Haverkamp Date: Wed Sep 20 17:24:52 2006 +0200 [MTD NAND] Fix in typo ndfc.c causing wrong ECC layout Due to this typo, a wrong ECC layout table is chosen. Signed-off-by: Frank Haverkamp Signed-off-by: David Woodhouse commit 17c2dae3aaff9b1e5d83996a5f098ad693f3aeca Author: Lennert Buytenhek Date: Thu Sep 21 23:16:48 2006 +0200 [MTD] physmap: add power management support Implement PM handling for physmap. Idea from Steven Scholz, patch by David Anders. Signed-off-by: Lennert Buytenhek Signed-off-by: David Woodhouse commit 25f0c659fe64832d8ee06aa623fffaad708dcf8b Author: Amol Lad Date: Thu Sep 21 18:12:43 2006 +0530 ioremap balanced with iounmap for drivers/mtd subsystem ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Tested (compilation only) with: - allmodconfig - Modifying drivers/mtd/maps/Kconfig and drivers/mtd/nand/Kconfig to make sure that the changed file is compiling without warning Signed-off-by: Amol Lad Signed-off-by: David Woodhouse commit dd8e9ed6ed544e2b924429d29cd2a6b55590109b Author: Alan Cox Date: Fri Sep 22 10:19:20 2006 +0100 [MTD] Switch to pci_get_device and do ref counting Signed-off-by: Alan Cox Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse commit 668040fcd1e06fc3e68a92708cbdfa5a52c37d3c Author: Randy Dunlap Date: Fri Sep 22 10:17:28 2006 +0100 [MTD] blkdev helper code: fix printk format warning Fix printk format warning(s): drivers/mtd/mtd_blkdevs.c:72: warning: long int format, different type arg (arg 2) Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse commit f40a6f1cc7fe522e51e1ac4c7ab3035a434f2cef Author: Brian Walsh Date: Fri Sep 22 10:16:16 2006 +0100 [MTD] Fix ixp4xx partition parsing. If the amount of flash is not divisible by 2 then the mask in parse_mtd_partitions would fail to work as designed. Passing in the base address corrects this problem. Signed-off-by: Brian Walsh Cc: Deepak Sanexa Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse commit f2dd117fa51dd8fc071b1352254c0d14d2399b0a Author: Michal Piotrowski Date: Fri Sep 22 10:13:46 2006 +0100 [JFFS2] Remove unneeded ifdefs from jffs2_fs_i.h We certainly don't need the check for Linux version > 2.5.2, and in fact we can also live without the __ECOS check, since we can just add it back in the eCos git tree which is automatically derived from the Linux fs/jffs2 subdirectory in the upstream git tree. Signed-off-by: Michal Piotrowski Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse commit cbc88ba83ff772d8c47d95ba0fef38ad888d6fcf Author: Michal Piotrowski Date: Fri Sep 22 10:09:44 2006 +0100 [MTD NAND] Remove old code in au1550nd.c Signed-off-by: Michal Piotrowski Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse commit 187ef15268e638603dea55a91fdfa29feaed6d13 Author: HÃ¥vard Skinnemoen Date: Fri Sep 22 10:07:08 2006 +0100 [MTD] Unlock NOR flash automatically where necessary Introduce the MTD_STUPID_LOCK flag which indicates that the flash chip is always locked after power-up, so all sectors need to be unlocked before it is usable. If this flag is set, and the chip provides an unlock() operation, mtd_add_device will unlock the whole MTD device if it's writeable. This means that non-writeable partitions will stay locked. Set MTD_STUPID_LOCK in fixup_use_atmel_lock() so that these chips will work as expected. Signed-off-by: HÃ¥vard Skinnemoen Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse commit 1694176a210189312e31b083bac1e1688981219a Author: David Woodhouse Date: Fri Sep 22 08:00:42 2006 +0100 Remove offsetof() from user-visible It's not used by anything user-visible, and it make g++ unhappy. Signed-off-by: David Woodhouse commit 69917c26c840e7de94522bf90fb190de63bf92bd Author: Benjamin Herrenschmidt Date: Fri Sep 22 12:56:30 2006 +1000 [POWERPC] Fix ohare IDE irq workaround on old powermacs Looks like a workaround for old bogus OF bitrot... This fixes it and hence fixes boot on some performa machines. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit e102926385b56e593b995ecc433f041b498a49e1 Author: Linas Vepstas Date: Thu Sep 21 18:25:56 2006 -0500 [POWERPC] EEH: Power4 systems sometimes need multiple resets. On detection of an EEH error, some Power4 systems seem to occasionally want to be reset twice before they report themselves as fully recovered. This patch re-arranges the code to attempt additional resets if the first one doesn't take. Signed-off-by: Linas Vepstas Signed-off-by: Paul Mackerras commit 3d574abd59d49173ac3096a19575a2f7430505be Author: Scott Wood Date: Thu Sep 21 13:11:52 2006 -0500 [POWERPC] Include in arch/powerpc/sysdev/fsl_soc.h for phys_addr_t. This patch causes fsl_soc.h to import the definition of phys_addr_t itself, rather than relying on its includer to do so. Signed-off-by: Scott Wood Signed-off-by: Paul Mackerras commit cc9881ce371dc7ff3ef5404feda59566fabaf521 Author: Nathan Lynch Date: Thu Sep 21 14:31:13 2006 -0500 [POWERPC] Demacrofy arch/powerpc/platforms/maple/pci.c Noticed that the U3_*CFA macros have some typos: #define U3_HT_CFA0(devfn, off) \ ((((unsigned long)devfn) << 8) | offset) (refers to offset rather than off) #define U3_AGP_CFA0(devfn, off) \ ((1 << (unsigned long)PCI_SLOT(dev_fn)) \ | (((unsigned long)PCI_FUNC(dev_fn)) << 8) \ (refers to dev_fn rather than devfn) Things happen to work, but there doesn't seem to be any reason these shouldn't be functions. Overall behavior should be unchanged. Signed-off-by: Nathan Lynch Signed-off-by: Paul Mackerras commit d608df5c7da6ee968aa2ad43c596d5f8d4022299 Author: Nathan Lynch Date: Thu Sep 21 14:25:34 2006 -0500 [POWERPC] Maple U3 HT - reject inappropriate config space access When there is a PCI-X mode 2 capable device behind the HT<->PCI-X bridge, the pci core decides that the device has the extended 4K config space, even though the bus is not operating in mode 2. This is because the u3_ht pci ops silently accept offsets greater than 255 but use only the 8 least significant bits, which means reading at offset 0x100 gets the data at offset 0x0, and causes confusion for lspci. Reject accesses to configuration space offsets greater than 255. Signed-off-by: Nathan Lynch Signed-off-by: Paul Mackerras commit ed709d134deeaea7925a3d748b33ca7e58cc683d Author: Scott Wood Date: Thu Sep 21 13:10:51 2006 -0500 [POWERPC] Fix IPIC pending register assignments This patch fixes the assignment of pending registers to IRQ numbers for the IPIC; the code previously assigned all IRQs to the high pending word regardless of which word the interrupt belonged to. Signed-off-by: Scott Wood Signed-off-by: Paul Mackerras commit 7d452c326c2ac879aced884411a0fe3ba75d9c87 Author: Arnd Bergmann Date: Thu Sep 21 12:29:51 2006 +0200 [POWERPC] powerpc: fix building gdb against asm/ptrace.h Ulrich Weigand found a bug with the current version of the asm-powerpc/ptrace.h that prevents building at least the SPU target version of gdb, since some ptrace opcodes are not defined. The problem seems to have originated in the merging of 32 and 64 bit versions of that file, the problem is that some opcodes are only valid on 64 bit kernels, but are also used by 32 bit programs, so they can't depends on the __powerpc64__ symbol. Signed-off-by: Arnd Bergmann Signed-off-by: Paul Mackerras commit 2954da897c40de0f3abdd6a100f2978f30d04068 Author: Michael Ellerman Date: Thu Sep 21 18:21:35 2006 +1000 [POWERPC] Remove DISCONTIGMEM cruft from page.h This looks like cruft to me, these functions don't exist AFAICT, and I can't see that it's possible to even enable DISCONTIGMEM on powerpc anymore. CC'ing some folks who might know better, based on the who-touched-it-last principle. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras commit caf81329c39b5c48f6cc0d78fa159b5a587e37f9 Author: Stephen Rothwell Date: Thu Sep 21 18:00:00 2006 +1000 [POWERPC] Merge iSeries i/o operations with the rest This patch changes the io operations so that they are out of line if CONFIG_PPC_ISERIES is set and includes a firmware feature check in that case. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras commit b8c06a2ab68661bf841e21003f4447f8d422aed3 Author: Steve French Date: Fri Sep 22 01:14:52 2006 +0000 [CIFS] statfs for cifs unix extensions no longer experimental Signed-off-by: Steve French commit 3e14a2867d8ccf555fe6e318eac0f8200399fe1c Author: Michel Daenzer Date: Fri Sep 22 04:26:35 2006 +1000 drm: Use register writes instead of BITBLT_MULTI packets for buffer swap blits This takes up two more ring buffer entries per rectangle blitted but makes sure the blit is performed top to bottom, reducing the likelyhood of tearing. Signed-off-by: Dave Airlie commit 54a56ac583ac66f3f4bc2c4cc3ef9b0676770742 Author: Dave Airlie Date: Fri Sep 22 04:25:09 2006 +1000 drm: use radeon specific names for radeon flags Signed-off-by: Dave Airlie commit 2f02cc3fb8960754a2a5df6a33f53528e0d830be Author: Eric Anholt Date: Fri Sep 22 04:19:34 2006 +1000 drm: add device/vendor id to drm_device_t for compat with FreeBSD drivers Signed-off-by: Dave Airlie commit e08870c87ab5b0c0c3cb05d0d0041240736493e4 Author: Thomas Hellstrom Date: Fri Sep 22 04:18:37 2006 +1000 drm: allow multiple addMaps with the same 32-bit map offsset. Reported on -mm kernels. Signed-off-by: Dave Airlie commit 214ff13d9ebbba7940f29bc89669f85f12533083 Author: Michel Daenzer Date: Fri Sep 22 04:12:11 2006 +1000 drm: fd.o Bug #7595: Avoid u32 overflows in radeon_check_and_fixup_offset(). The overflows could cause valid offsets to get rejected under some circumstances, e.g. when the framebuffer resides at the very end of the card's address space. Signed-off-by: Dave Airlie commit 47cc140931cc03076014fdbfdd512d6dd9d74d34 Author: Thomas Hellstrom Date: Fri Sep 22 04:04:18 2006 +1000 drm: Fix hashtab implementation leaking illegal error codes to user space. reported by Dave Airlie Signed-off-by: Dave Airlie commit 9b1a51b69c89028f18277e235533c160e7506ebb Author: Dave Airlie Date: Fri Sep 22 03:37:19 2006 +1000 drm: domain changes broke ppc r200 Freedesktop.org bug #8246 The domain changes regressed on PPC, go back to just using 0, as X.org's domain support is crap Signed-off-by: Dave Airlie commit 1f27ce6ab7ad7abf014ef7f181d494cf1107f9db Author: Dave Airlie Date: Sun Aug 27 11:11:14 2006 +1000 drm: fixup setversion return codes.. Frederik Deweerdt noticed some badness in setversion returns, however just making it work, breaks things... this code is hairy with backwards compat... Signed-off-by: Dave Airlie commit 46acbf13fb280e69c5cafe7c837d5a27c6e380c3 Author: Dave Airlie Date: Sun Aug 27 11:09:46 2006 +1000 drm: fixup i915 error codes Frederik Deweerdt pointed this out, I fixed a missing DRM error wrapper also. Signed-off-by: Dave Airlie commit b15ec36806ce3b89a2fddce958de9370efb249da Author: Dave Airlie Date: Sat Aug 19 17:43:52 2006 +1000 drm: realign sosme radeon code with drm git tree this applies some minor cleanups for the radeon driver, to use the 3D flush and reset the AGP flags on X recycle Signed-off-by: Dave Airlie commit d40c8533a5b8ca1887f81ae1c81136f3c40a8488 Author: Dave Airlie Date: Sat Aug 19 17:40:50 2006 +1000 drm: realign via driver with drm git tree This just realigns some code/whitespace between the kernel and main tree Signed-off-by: Dave Airlie commit 1f4eccfdb2a5f8b2751aea8cf2d6b00401c156e0 Author: Thomas Hellstrom Date: Fri Aug 18 16:37:10 2006 +1000 drm: remove hash tables on drm exit Signed-off-by: Dave Airlie commit fb41e54be4bad6f64d343d051d699efde3c92e2c Author: Adrian Bunk Date: Wed Aug 16 11:55:18 2006 +1000 drm: cleanups This patch contains the following cleanups: - make 3 needlessly global functions static - sis_mm.c: fix compile warnings with CONFIG_FB_SIS=y Signed-off-by: Adrian Bunk Signed-off-by: Dave Airlie commit c7aed1790254aed286b7bfb51167c2676df86f4b Author: Denis Vlasenko Date: Wed Aug 16 11:54:07 2006 +1000 drm: i810_dma.c: fix pointer arithmetic for 64-bit target First warning result from open-coded PTR_ERR, the rest is caused by code like this: *(u32 *) ((u32) buf_priv->kernel_virtual + used) I've also fixed a missing PTR_ERR in i830_dma.c Signed-off-by: Dave Airlie commit 0a0c721dc5d0de011e5d363cd454c60c66ca00ec Author: Thomas Hellstrom Date: Wed Aug 16 09:21:56 2006 +1000 drm: avoid kernel oops in some error paths calling drm_lastclose Signed-off-by: Dave Airlie commit bd5af0781aed12b9707d238c17cf55d46f9bf98d Author: Chuck Short Date: Wed Aug 16 09:17:53 2006 +1000 drm: allow detection of new VIA chipsets Update pci ids. patch location: http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=c ommitdiff;h=5195a64a27550a279b2ecaf400066a3823f2d053 Signed-off-by: Chuck Short Signed-off-by: Ben Collins Signed-off-by: Andrew Morton Signed-off-by: Dave Airlie commit 78eca43d0391f59c3b1505bb7bd38ff45b650aab Author: Andrew Morton Date: Wed Aug 16 09:15:51 2006 +1000 drm: fix i965 build bug Signed-off-by: Andrew Morton Signed-off-by: Dave Airlie commit a1d0fcf5a1cf56ae4711c7e0f857832724a67e8b Author: Andrew Morton Date: Mon Aug 14 11:35:15 2006 +1000 drm: remove FALSE/TRUE that snuck in with simple memory manager changes. Thanks to Andrew Morton for pointing these out, I've fixed a few his patch missed. Signed-off-by: Andrew Morton Signed-off-by: Dave Airlie commit c29b669caae4ed1630ef479e54bdde126a0378ec Author: Alan Hourihane Date: Sat Aug 12 16:29:24 2006 +1000 drm: Add support for Intel i965G chipsets. This is a patch prepared by Guangdeng Liao based off of Tungsten Graphics's final code drop. From: Alan Hourihane Signed-off-by: Dave Airlie commit d000b486ea1633380e6224c03e94227db46567ad Author: Dave Airlie Date: Sat Aug 12 16:03:52 2006 +1000 drm: add better explanation for i830/i915 Signed-off-by: Dave Airlie commit c2604ce05853939cf712ebc5acc0da4011289346 Author: Dave Airlie Date: Sat Aug 12 16:03:26 2006 +1000 drm: remove a tab that snuck in Signed-off-by: Dave Airlie commit 572225bedf8e39b5dd7cc687a51015edbb738401 Author: Dave Airlie Date: Tue Aug 8 22:17:02 2006 +1000 drm: fix return value in auth function This just fixes up the return value in the drm_auth:remove_magic Signed-off-by: Dave Airlie commit 7981bf7d494a6c4d45e22c54b0da887e5a67e705 Author: Thomas Hellstrom Date: Tue Aug 8 21:34:46 2006 +1000 drm: SiS 315 Awareness. Add support for the SiS 315 to the DRM. Signed-off-by: Dave Airlie commit 8d153f7107ff2c5d6e32053ae377c961187ab6b9 Author: Thomas Hellstrom Date: Mon Aug 7 22:36:47 2006 +1000 drm: update user token hashing and map handles Keep hashed user tokens, with the following changes: 32-bit physical device addresses are mapped directly to user-tokens. No duplicate maps are allowed, and the addresses are assumed to be outside of the range 0x10000000 through 0x30000000. The user-token is identical to the 32-bit physical start-address of the map. 64-bit physical device addressed are mapped to user-tokens in the range 0x10000000 to 0x30000000 with page-size increments. The user_token should not be interpreted as an address. Other map types, like upcoming TTM maps are mapped to user-tokens in the range 0x10000000 to 0x30000000 with page-size increments. The user_token should not be interpreted as an address. Implement hashed map lookups. Signed-off-by: Dave Airlie commit 8669cbc5e651bf4effa20e8c244a5a7d67da6fe9 Author: Thomas Hellstrom Date: Mon Aug 7 22:22:10 2006 +1000 drm: move drm authentication to new generic hash table. Fix drm_remove_magic potential memory leak / corruption. Move drm authentication token hashing to new generic hash table implementation. Signed-off-by: Dave Airlie commit 3d45dbd611d1441d667b06acced9fbad3c8fcb1b Author: Dave Airlie Date: Mon Aug 7 22:06:04 2006 +1000 drm: Add the P4VM800PRO (?) PCI ID. Signed-off-by: Dave Airlie commit ce65a44de07f73ceda1749812b75086b7add408d Author: Thomas Hellstrom Date: Mon Aug 7 22:03:22 2006 +1000 drm: add drm simple memory manager support for SiS and VIA drivers This add support to the SiS and VIA drivers for the simple memory manager. This fixes a lot of problems with the current simple code these drivers used, including locking and SMP issues. Signed-off-by: Dave Airlie commit 3a1bd924f36da202e480a0e0174b2878c0924a05 Author: Thomas Hellstrom Date: Mon Aug 7 21:30:28 2006 +1000 drm: add simple DRM memory manager, and hash table This adds the DRM hashtable and simple memory manager implementations from Tungsten Graphics, this is NOT the new memory manager, this is a replacement for the SIS and VIA memory managers. Signed-off-by: Dave Airlie commit b9b603dd1c99a68e65ad51cda25379441df2e17b Author: Michel Dänzer Date: Mon Aug 7 20:41:53 2006 +1000 drm: radeon: Use RADEON_RB3D_DSTCACHE_CTLSTAT instead of RADEON_RB2D_DSTCACHE_CTLSTAT. The latter seems to be a read-only mirror of the former. Signed-off-by: Dave Airlie commit ae1b1a4816ac11075d338af79a239f4c326d675c Author: Michel Dänzer Date: Mon Aug 7 20:37:46 2006 +1000 drm: radeon: fix up bus mastering when writeback is disabled When writeback isn't used, actually disable it in the hardware. Not doing this might waste bus bandwidth or even cause memory corruption or system crashes on systems that check bus transfers. No such incident has been reported though. Signed-off-by: Dave Airlie commit 8624ecbf68e90e5a8124514a0b7f92767fb80a62 Author: Michel Dänzer Date: Mon Aug 7 20:33:57 2006 +1000 drm: radeon: implement RADEON_PARAM_SCRATCH_OFFSET getparam When this succeeds, userspace can read the scratch register contents from th mapped writeback page directly. Signed-off-by: Dave Airlie commit 9ca941615ee6418cd38c13602960f29c7ac7d973 Author: Michel Dänzer Date: Mon Aug 7 20:31:30 2006 +1000 drm: radeon: add some debug output when getparam is called with unknown Signed-off-by: Dave Airlie commit 7a3f1f216b92724ff822fe3122272b7fd6a58f8c Author: Thomas Hellstrom Date: Mon Aug 7 20:28:29 2006 +1000 drm: missing mutex unlock Signed-off-by: Dave Airlie commit 332296016ee2e808b362de66bf6bec49c396e5bf Author: Dave Airlie Date: Mon Aug 7 20:23:42 2006 +1000 drm: remove the DRM pci domain This patch removes the pci_domain from the DRM device structure, and gets it via a macro that either asks the platform or does the alpha special case. jgarzik asked for this to just use the platform magic, but I've no alpha experience and I'd rather not just break it and wait for someone to give out. Signed-off-by: Dave Airlie commit 242ef0e1e7e5bb7e80c3620c1aa55168819d6fb8 Author: Dave Date: Tue Jul 18 04:01:01 2006 +1000 drm: remove local copies of pci bus/slot/func The drm keeps a local copy of these for little use. Signed-off-by: Dave Airlie commit 3d77461ecd7fb92bb888f69478e3518b3c947ce3 Author: Dave Airlie Date: Mon Aug 7 20:07:43 2006 +1000 drm: cleanup old compat code and DRM fns from Linux only code This patch removes some of the old compatibility macros from the DRM, and removes use of DRM wrappers from Linux specific code. Signed-off-by: Dave Airlie commit 7da8a2e5c1fd2ee513fdeac8d13c4f3623838fd0 Author: Josh Boyer Date: Wed Sep 20 09:11:59 2006 -0500 [POWERPC] 40x: Fix debug status register defines This fixes some debug register defines on PPC 40x that were incorrect. Signed-off-by: Josh Boyer Signed-off-by: Paul Mackerras commit 8b9b5a77e3aeb9650b511a8be4c61632999537db Author: Amy Fong Date: Mon Sep 18 23:07:24 2006 -0400 [POWERPC] Fix compile error in sbc8560 The following fixes compile errors in sbc8560. Signed-off-by: Amy Fong Signed-off-by: Paul Mackerras commit 6a1ca373a16b0e170164ab8a2d6d01eab2a22f6e Author: Linas Vepstas Date: Fri Sep 15 18:58:59 2006 -0500 [POWERPC] EEH: support MMIO enable recovery step Update to the PowerPC PCI error recovery code. Add code to enable MMIO if a device driver reports that it is capable of recovering on its own. One anticipated use of this having a device driver enable MMIO so that it can take a register dump, which might then be followed by the device driver requesting a full reset. Signed-off-by: Linas Vepstas Signed-off-by: Paul Mackerras commit 47b5c838af92d3504e99633bf568578203b7305f Author: Linas Vepstas Date: Fri Sep 15 18:57:42 2006 -0500 [POWERPC] EEH: enable MMIO/DMA on frozen slot Add wrapper around the rtas call to enable MMIO or DMA on a frozen pci slot. Signed-off-by: Linas Vepstas Signed-off-by: Paul Mackerras commit cb5b562444c27cf53f5d297bd7a89807ea614cf3 Author: Linas Vepstas Date: Fri Sep 15 18:56:35 2006 -0500 [POWERPC] EEH: code comment cleanup Clean up subroutine documentation; mostly formatting changes, with some new content. Signed-off-by: Linas Vepstas Signed-off-by: Paul Mackerras commit af525592187951a595c73de11b48969a13b5d5a3 Author: Linas Vepstas Date: Fri Sep 15 18:55:34 2006 -0500 [POWERPC] EEH: balance pcidev_get/put calls This corrects a pci_dev get/put imbalance that can occur only in highly unlikely situations (kmalloc failures, pci devices with overlapping resource addresses). No actual failures seen, this was spotted during code review. Signed-off-by: Linas Vepstas Signed-off-by: Paul Mackerras commit 4dbefe6459555d6fb9d08743615fbaa53894beb2 Author: Josh Boyer Date: Fri Sep 15 14:53:10 2006 -0500 [POWERPC] PPC: Fix xmon stack frame address in backtrace The stack frame address was being printed incorrectly in the backtrace option of XMON on PPC. This patch fixes it to print the actual stack address instead of the address of the local variable that contains it. Signed-off-by: Josh Boyer Signed-off-by: Paul Mackerras commit 838fdb4d2d0e4730364220b51be28a42d04c665e Author: Peter Bergner Date: Thu Sep 14 14:18:38 2006 -0500 [POWERPC] Add AT_PLATFORM value for Xilinx Virtex-4 FX Jakub noticed the cputable.c entry for Xilinx Virtex-4 FX was missing a .platform value, so the AT_PLATFORM value wouldn't be set correctly. This adds it. Signed-off-by: Peter Bergner Signed-off-by: Paul Mackerras commit ed9526b0d342a1c08a19f880c3f0c1d0fec4e8db Author: David Woodhouse Date: Thu Sep 21 09:33:55 2006 +0100 Clean up exported headers on CRIS This fixes most of the issues with exported headers on CRIS, although we do still need to deal with the asm/arch symlink. Signed-off-by: David Woodhouse commit 2a1b181eff32f497f285fcfc1e771ec469205908 Author: David Woodhouse Date: Thu Sep 21 09:05:25 2006 +0100 Fix v850 exported headers Signed-off-by: David Woodhouse commit f17b7bad396c8f748620f54a88754a1f5af02c8a Author: David Woodhouse Date: Thu Sep 21 09:01:45 2006 +0100 Don't advertise (or allow) headers_{install,check} where inappropriate. For architectures which don't have the include/asm-$(ARCH)/Kbuild file, like ARM26, UM, etc. Signed-off-by: David Woodhouse commit d28d1f10f99f8ab2fe2bd06c3d22397d0ba08687 Author: David Woodhouse Date: Thu Sep 21 08:55:28 2006 +0100 Remove UML header export No need for UML to export headers for userspace to build against. Signed-off-by: David Woodhouse commit cb16da6a71924772dc4580c16541dece2b9a8472 Author: David Woodhouse Date: Thu Sep 21 08:54:44 2006 +0100 Remove ARM26 header export. We ought to be able to use ARM headers; no need for special ARM26 version. Signed-off-by: David Woodhouse commit 0000f0b1bc9aa340356a8dcdb9e8b1dbbaf0afcb Author: David Woodhouse Date: Thu Sep 21 08:51:43 2006 +0100 Fix H8300 exported headers. Just clean up asm/page.h Signed-off-by: David Woodhouse commit 5daf3033aa4fc5ec0535816d8a8e94874160482e Author: David Woodhouse Date: Thu Sep 21 08:50:36 2006 +0100 Fix m68knommu exported headers Just clean up asm/page.h Signed-off-by: David Woodhouse commit 09087a1a8722fac30b1969a4a542cde064af13f8 Author: David Woodhouse Date: Thu Sep 21 08:48:27 2006 +0100 Fix exported headers for SPARC, SPARC64 Mostly removing files which have no business being used in userspace. Signed-off-by: David Woodhouse Signed-off-by: David S. Miller commit 47dbec79d1b9ce9e80bed932f345adc92049f05d Author: David Woodhouse Date: Sun Sep 17 08:39:39 2006 +0100 Fix 'make headers_check' on m32r > asm-m32r/page.h requires asm-generic/memory_model.h, which does not exist > asm-m32r/ptrace.h requires asm/m32r.h, which does not exist > asm-m32r/signal.h requires linux/linkage.h, which does not exist > asm-m32r/unistd.h requires asm/syscall.h, which does not exist > asm-m32r/user.h requires asm/processor.h, which does not exist Signed-off-by: Hirokazu Takata Signed-off-by: David Woodhouse commit 029669da25efa18ee4b8911e694fdcf4a11c8cbe Author: Paul Mundt Date: Wed Sep 20 03:27:17 2006 +0900 Fix 'make headers_check' on sh64 Cleanup for user headers, as noted: asm-sh64/page.h requires asm-generic/memory_model.h, which does not exist in exported headers asm-sh64/shmparam.h requires asm/cache.h, which does not exist in exported headers asm-sh64/signal.h requires asm/processor.h, which does not exist in exported headers asm-sh64/user.h requires asm/processor.h, which does not exist in exported headers Signed-off-by: Paul Mundt Signed-off-by: David Woodhouse commit b5233d0704c9a6147ebbfabc576d1638b3ac5274 Author: Paul Mundt Date: Wed Sep 20 03:25:34 2006 +0900 Fix 'make headers_check' on sh Cleanup for user headers, as noted: asm-sh/page.h requires asm-generic/memory_model.h, which does not exist in exported headers asm-sh/ptrace.h requires asm/ubc.h, which does not exist in exported headers Signed-off-by: Paul Mundt Signed-off-by: David Woodhouse commit 6b70c9559bcf381a6521e38b0dd5d3d4d905868a Author: Steve French Date: Thu Sep 21 07:35:29 2006 +0000 [CIFS] New POSIX locking code not setting rc properly to zero on successful unlock in case where server does not support POSIX locks and nobrl is not specified. Signed-off-by: Steve French commit 6ff6340abeaaf1a15587c87dac3e56754778cc7a Author: David Woodhouse Date: Thu Sep 21 08:34:39 2006 +0100 [HEADERS] Fix ARM 'make headers_check' Sanitise the ARM headers exported to userspace. Signed-off-by: David Woodhouse commit 2fe87f02a04ad6e7075023a87fe38eb458a4bb9d Author: Steve French Date: Thu Sep 21 07:02:52 2006 +0000 [CIFS] Support deep tree mounts (e.g. mounts to //server/share/path) Samba bugzilla #4040 Signed-off-by: Steve French commit 54caf44da31995df1f51174468fd9e83ca5c67a2 Author: Jeff Garzik Date: Thu Sep 21 00:08:10 2006 -0400 [netdrvr] mv643xx_eth: fix obvious typo, which caused build breakage The last minute fix submitted by the author fixed a bug, but broke the driver build. Noticed by Al Viro, since I can't build on said platform. Signed-off-by: Jeff Garzik commit 8ce90907ea534f10075a9eba5f83d6dd77b39cb6 Author: Jeff Garzik Date: Thu Sep 21 00:06:21 2006 -0400 [netdrvr] lp486e: fix typo inside #if 0'd code, but it bugged me. Really, we should probably just delete the driver. Signed-off-by: Jeff Garzik commit 3c164bd8153c4644a22dc2101b003c67cd2a0d0a Author: Rik Snel Date: Sat Sep 2 18:17:33 2006 +1000 [BLOCK] dm-crypt: trivial comment improvements Just some minor comment nits. - little-endian is better than low-endian - and since it is called essiv everywere it should also be essiv in the comments (and not ess_iv) Signed-off-by: Rik Snel Signed-off-by: Herbert Xu commit 3ad819c61f5f8347f39cdcbe652b3c60ec615888 Author: Herbert Xu Date: Sat Aug 26 18:44:31 2006 +1000 [CRYPTO] api: Deprecate crypto_digest_* and crypto_alg_available This patch marks the crypto_digest_* functions and crypto_alg_available as deprecated. They've been replaced by crypto_hash_* and crypto_has_* respectively. Signed-off-by: Herbert Xu commit 6010439f47e6b308c031dad7d99686030ef942dd Author: Herbert Xu Date: Sat Aug 26 18:34:10 2006 +1000 [CRYPTO] padlock: Convert padlock-sha to use crypto_hash This patch converts padlock-sha to use crypto_hash for its fallback. It also changes the fallback selection to use selection by type instead of name. This is done through the new CRYPTO_ALG_NEED_FALLBACK bit, which is set if and only if an algorithm needs a fallback of the same type. Signed-off-by: Herbert Xu commit e4d5b79c661c7cfca9d8d5afd040a295f128d3cb Author: Herbert Xu Date: Sat Aug 26 18:12:40 2006 +1000 [CRYPTO] users: Use crypto_comp and crypto_has_* This patch converts all users to use the new crypto_comp type and the crypto_has_* functions. Signed-off-by: Herbert Xu commit fce32d70ba834129b164c40c2d4260e5a7a7d850 Author: Herbert Xu Date: Sat Aug 26 17:35:45 2006 +1000 [CRYPTO] api: Add crypto_comp and crypto_has_* This patch adds the crypto_comp type to complete the compile-time checking conversion. The functions crypto_has_alg and crypto_has_cipher, etc. are also added to replace crypto_alg_available. Signed-off-by: Herbert Xu commit 35058687912aa2f0b4554383cc10be4e0683b9a4 Author: Herbert Xu Date: Thu Aug 24 19:10:20 2006 +1000 [CRYPTO] users: Use crypto_hash interface instead of crypto_digest This patch converts all remaining crypto_digest users to use the new crypto_hash interface. Signed-off-by: Herbert Xu commit dc64ddf4918f0da52df10d83c2a5941a547c2035 Author: Herbert Xu Date: Thu Aug 24 18:45:50 2006 +1000 [SCSI] iscsi: Use crypto_hash interface instead of crypto_digest This patch converts ISCSI to use the new crypto_hash interface instead of crypto_digest. It's a fairly straightforward substitution. Signed-off-by: Herbert Xu commit 8425165dfed27945e8509c141cea245d1739e372 Author: Herbert Xu Date: Sun Aug 20 15:25:22 2006 +1000 [CRYPTO] digest: Remove old HMAC implementation This patch removes the old HMAC implementation now that nobody uses it anymore. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 878b9014666217555d16073764f30e825cf18d2f Author: Herbert Xu Date: Sun Aug 20 15:17:04 2006 +1000 [CRYPTO] doc: Update documentation for hash and me This patch updates the documentation to reflect the switch from digest to hash. It also replaces notes about emailing James Morris to refer to me instead. Signed-off-by: Herbert Xu commit 1b489e11d4df82514792f9f981f31976f8a94ddf Author: Herbert Xu Date: Sun Aug 20 15:07:14 2006 +1000 [SCTP]: Use HMAC template and hash interface This patch converts SCTP to use the new HMAC template and hash interface. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 07d4ee583e21830ec5604d31f65cdc60a6eca19e Author: Herbert Xu Date: Sun Aug 20 14:24:50 2006 +1000 [IPSEC]: Use HMAC template and hash interface This patch converts IPsec to use the new HMAC template. The names of existing simple digest algorithms may still be used to refer to their HMAC composites. The same structure can be used by other MACs such as AES-XCBC-MAC. This patch also switches from the digest interface to hash. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit e9d41164e2fdd897fe4520c2079ea0000f6e0ec3 Author: Herbert Xu Date: Sat Aug 19 21:38:49 2006 +1000 [CRYPTO] tcrypt: Use HMAC template and hash interface This patch converts tcrypt to use the new HMAC template rather than the hard-coded version of HMAC. It also converts all digest users to use the new cipher interface. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 0796ae061e6da5de7cfc1af57dfd42a73908b1bf Author: Herbert Xu Date: Mon Aug 21 20:50:52 2006 +1000 [CRYPTO] hmac: Add crypto template implementation This patch rewrites HMAC as a crypto template. This means that HMAC is no longer a hard-coded part of the API. It's now a template that generates standard digest algorithms like any other. The old HMAC is preserved until all current users are converted. The same structure can be used by other MACs such as AES-XCBC-MAC. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 055bcee3102dc35f019b69df9c2618e9d6dd1c09 Author: Herbert Xu Date: Sat Aug 19 22:24:23 2006 +1000 [CRYPTO] digest: Added user API for new hash type The existing digest user interface is inadequate for support asynchronous operations. For one it doesn't return a value to indicate success or failure, nor does it take a per-operation descriptor which is essential for the issuing of requests while other requests are still outstanding. This patch is the first in a series of steps to remodel the interface for asynchronous operations. For the ease of transition the new interface will be known as "hash" while the old one will remain as "digest". This patch also changes sg_next to allow chaining. Signed-off-by: Herbert Xu commit 7226bc877a22244e8003924031435a4bffd52654 Author: Herbert Xu Date: Mon Aug 21 21:40:49 2006 +1000 [CRYPTO] api: Mark parts of cipher interface as deprecated Mark the parts of the cipher interface that have been replaced by block ciphers as deprecated. Thanks to Andrew Morton for suggesting doing this before removing them completely. Signed-off-by: Herbert Xu commit 03fd9cee7f46dddcd2562bc175d2c348502ce281 Author: Herbert Xu Date: Mon Aug 14 23:11:53 2006 +1000 [PATCH] scatterlist: Add const to sg_set_buf/sg_init_one pointer argument This patch adds a const modifier to the buf argument of sg_set_buf and sg_init_one. This lets people call it with pointers that are const. Signed-off-by: Herbert Xu commit efcf8023e299be605f217dc2c1b2754b5534569c Author: Herbert Xu Date: Sat Aug 5 16:28:19 2006 +1000 [CRYPTO] drivers: Remove obsolete block cipher operations This patch removes obsolete block operations of the simple cipher type from drivers. These were preserved so that existing users can make a smooth transition. Now that the transition is complete, they are no longer needed. Signed-off-by: Herbert Xu commit f12cc2090d721647c23dfce20834f4306db3b77d Author: Herbert Xu Date: Tue Aug 22 20:36:13 2006 +1000 [CRYPTO] users: Use block ciphers where applicable This patch converts all remaining users to use the new block cipher type where applicable. It also changes all simple cipher operations to use the new encrypt_one/decrypt_one interface. Signed-off-by: Herbert Xu commit 378c6697a282c383d89428380a3405bf95189347 Author: Herbert Xu Date: Tue Aug 22 20:33:54 2006 +1000 [SUNRPC] GSS: Use block ciphers where applicable This patch converts SUNRPC/GSS to use the new block cipher type where applicable. Signed-off-by: Herbert Xu commit 6b7326c8497f954c2cfcb4c49fe42be5b80887bc Author: Herbert Xu Date: Sun Jul 30 15:41:01 2006 +1000 [IPSEC] ESP: Use block ciphers where applicable This patch converts IPSec/ESP to use the new block cipher type where applicable. Similar to the HMAC conversion, existing algorithm names have been kept for compatibility. Signed-off-by: Herbert Xu commit 04ff12609445c7b462d7fc7f2d30dad442c922f3 Author: Herbert Xu Date: Sun Aug 13 08:50:00 2006 +1000 [IPSEC]: Add compatibility algorithm name support This patch adds a compatibility name field for each IPsec algorithm. This is needed when parameterised algorithms are used. For example, "md5" will become "hmac(md5)", and "aes" will become "cbc(aes)". Signed-off-by: Herbert Xu commit d1806f6a97a536b043fe50e6d8a25b061755cf50 Author: Herbert Xu Date: Tue Aug 22 20:29:17 2006 +1000 [BLOCK] dm-crypt: Use block ciphers where applicable This patch converts dm-crypt to use the new block cipher type where applicable. It also changes simple cipher operations to use the new encrypt_one/decrypt_one interface. Signed-off-by: Herbert Xu commit 69affe7fc52c14e4b81408a2076e9e58ba4af60a Author: Herbert Xu Date: Thu Sep 21 11:45:53 2006 +1000 [BLOCK] cryptoloop: Use block ciphers where applicable This patch converts cryptoloop to use the new block cipher type where applicable. As a result the ECB-specific and CBC-specific transfer functions have been merged. Signed-off-by: Herbert Xu commit cba83564d112e4aec52227f68670f8dbd4d4ac89 Author: Herbert Xu Date: Sun Aug 13 08:26:09 2006 +1000 [CRYPTO] tcrypt: Use block ciphers where applicable This patch converts tcrypt to use the new block cipher type where applicable. Signed-off-by: Herbert Xu commit a9e62fadf0b02ba4a1d945d1a75652507da94319 Author: Herbert Xu Date: Mon Aug 21 21:39:24 2006 +1000 [CRYPTO] s390: Added block cipher versions of CBC/ECB This patch adds block cipher algorithms for S390. Once all users of the old cipher type have been converted the existing CBC/ECB non-block cipher operations will be removed. Signed-off-by: Herbert Xu commit 28ce728a90cce3a0c6c0ed00354299de52db94b1 Author: Herbert Xu Date: Mon Aug 21 21:38:42 2006 +1000 [CRYPTO] padlock: Added block cipher versions of CBC/ECB This patch adds block cipher algorithms for cbc(aes) and ecb(aes) for the PadLock device. Once all users to the old cipher type have been converted the old cbc/ecb PadLock operations will be removed. Signed-off-by: Herbert Xu commit db131ef9084110d9e82549c0a627e157e8bb99d7 Author: Herbert Xu Date: Thu Sep 21 11:44:08 2006 +1000 [CRYPTO] cipher: Added block ciphers for CBC/ECB This patch adds two block cipher algorithms, CBC and ECB. These are implemented as templates on top of existing single-block cipher algorithms. They invoke the single-block cipher through the new encrypt_one/decrypt_one interface. This also optimises the in-place encryption and decryption to remove the cost of an IV copy each round. Signed-off-by: Herbert Xu commit 5cde0af2a9825dd1edaca233bd9590566579ef21 Author: Herbert Xu Date: Tue Aug 22 00:07:53 2006 +1000 [CRYPTO] cipher: Added block cipher type This patch adds the new type of block ciphers. Unlike current cipher algorithms which operate on a single block at a time, block ciphers operate on an arbitrarily long linear area of data. As it is block-based, it will skip any data remaining at the end which cannot form a block. The block cipher has one major difference when compared to the existing block cipher implementation. The sg walking is now performed by the algorithm rather than the cipher mid-layer. This is needed for drivers that directly support sg lists. It also improves performance for all algorithms as it reduces the total number of indirect calls by one. In future the existing cipher algorithm will be converted to only have a single-block interface. This will be done after all existing users have switched over to the new block cipher type. Signed-off-by: Herbert Xu commit 5c64097aa0f6dc4f27718ef47ca9a12538d62860 Author: Herbert Xu Date: Sat Aug 12 21:56:17 2006 +1000 [CRYPTO] scatterwalk: Prepare for block ciphers This patch prepares the scatterwalk code for use by the new block cipher type. Firstly it halves the size of scatter_walk on 32-bit platforms. This is important as we allocate at least two of these objects on the stack for each block cipher operation. It also exports the symbols since the block cipher code can be built as a module. Finally there is a hack in scatterwalk_unmap that relies on progress being made. Unfortunately, for hardware crypto we can't guarantee progress to be made since the hardware can fail. So this also gets rid of the hack by not advancing the address returned by scatterwalk_map. Signed-off-by: Herbert Xu commit f28776a369b12f9a03a822a8e1090ed670a41f4f Author: Herbert Xu Date: Sun Aug 13 20:58:18 2006 +1000 [CRYPTO] cipher: Added encrypt_one/decrypt_one This patch adds two new operations for the simple cipher that encrypts or decrypts a single block at a time. This will be the main interface after the existing block operations have moved over to the new block ciphers. It also adds the crypto_cipher type which is currently only used on the new operations but will be extended to setkey as well once existing users have been converted to use block ciphers where applicable. Signed-off-by: Herbert Xu commit e853c3cfa8cc24869ecd2526e589bcb176bc12e9 Author: Herbert Xu Date: Tue Aug 22 00:06:54 2006 +1000 [CRYPTO] api: Added crypto_type support This patch adds the crypto_type structure which will be used for all new crypto algorithm types, beginning with block ciphers. The primary purpose of this abstraction is to allow different crypto_type objects for crypto algorithms of the same type, in particular, there will be a different crypto_type objects for asynchronous algorithms. Signed-off-by: Herbert Xu commit 8f21cf0d2bae04ece761595036c9da8328b279aa Author: Herbert Xu Date: Sun Jul 30 11:53:45 2006 +1000 [CRYPTO] api: Feed flag directly to crypto_yield The sleeping flag used to determine whether crypto_yield can actually yield is really a per-operation flag rather than a per-tfm flag. This patch changes crypto_yield to take a flag directly so that we can start using a per-operation flag instead the tfm flag. Signed-off-by: Herbert Xu commit 6d7d684d635ac5a345f075015f2c84169c111c6a Author: Herbert Xu Date: Sun Jul 30 11:53:01 2006 +1000 [CRYPTO] api: Added crypto_alloc_base Up until now all crypto transforms have been of the same type, struct crypto_tfm, regardless of whether they are ciphers, digests, or other types. As a result of that, we check the types at run-time before each crypto operation. This is rather cumbersome. We could instead use different C types for each crypto type to ensure that the correct types are used at compile time. That is, we would have crypto_cipher/crypto_digest instead of just crypto_tfm. The appropriate type would then be required for the actual operations such as crypto_digest_digest. Now that we have the type/mask fields when looking up algorithms, it is easy to request for an algorithm of the precise type that the user wants. However, crypto_alloc_tfm currently does not expose these new attributes. This patch introduces the function crypto_alloc_base which will carry these new parameters. It will be renamed to crypto_alloc_tfm once all existing users have been converted. Signed-off-by: Herbert Xu commit 65b75c36f4e8422602826c75c803136e0da94122 Author: Herbert Xu Date: Mon Aug 21 21:18:50 2006 +1000 [CRYPTO] s390: Added missing driver name and priority Accelerated versions of crypto algorithms must carry a distinct driver name and priority in order to distinguish themselves from their generic counter- part. Signed-off-by: Herbert Xu commit f3f632d61ae9af85d436706ee8e33af1a7fb9c28 Author: Herbert Xu Date: Sun Aug 6 23:12:59 2006 +1000 [CRYPTO] api: Added asynchronous flag This patch adds the asynchronous flag and changes all existing users to only look up algorithms that are synchronous. Signed-off-by: Herbert Xu commit 7fed0bf271b374be4c98a5880faed4b1128e78e9 Author: Herbert Xu Date: Sun Aug 6 23:10:45 2006 +1000 [CRYPTO] api: Add common instance initialisation code This patch adds the helpers crypto_get_attr_alg and crypto_alloc_instance which can be used by simple one-argument templates like hmac to process input parameters and allocate instances. Signed-off-by: Herbert Xu commit df89820ebd5bbf4f3c6b5f8ee7d9e983107f6a91 Author: Herbert Xu Date: Fri Jul 14 10:42:27 2006 +1000 [CRYPTO] cipher: Removed special IV checks for ECB This patch makes IV operations on ECB fail through nocrypt_iv rather than calling BUG(). This is needed to generalise CBC/ECB using the template mechanism. Signed-off-by: Herbert Xu commit c907ee76d8456fe1d98f40b5febfc7802a73b784 Author: Herbert Xu Date: Mon Aug 21 22:04:03 2006 +1000 [CRYPTO] tcrypt: Use test_hash for crc32c Now that crc32c has been fixed to conform with standard digest semantics, we can use test_hash for it. I've turned the last test into a chunky test. Signed-off-by: Herbert Xu commit ee7564166da9e218c3f605ee78ff16599d4d5a05 Author: Herbert Xu Date: Sun Jul 9 14:49:42 2006 +1000 [CRYPTO] digest: Store temporary digest in tfm When the final result location is unaligned, we store the digest in a temporary buffer before copying it to the final location. Currently that buffer sits on the stack. This patch moves it to an area in the tfm, just like the CBC IV buffer. Signed-off-by: Herbert Xu commit 560c06ae1ab7c677002ea3b6ac83521bf12ee07d Author: Herbert Xu Date: Sun Aug 13 14:16:39 2006 +1000 [CRYPTO] api: Get rid of flags argument to setkey Now that the tfm is passed directly to setkey instead of the ctx, we no longer need to pass the &tfm->crt_flags pointer. This patch also gets rid of a few unnecessary checks on the key length for ciphers as the cipher layer guarantees that the key length is within the bounds specified by the algorithm. Rather than testing dia_setkey every time, this patch does it only once during crypto_alloc_tfm. The redundant check from crypto_digest_setkey is also removed. Signed-off-by: Herbert Xu commit 25cdbcd9e5d20e431f829cafce48a418830011f4 Author: Herbert Xu Date: Sun Aug 6 23:03:08 2006 +1000 [CRYPTO] crc32c: Fix unconventional setkey usage The convention for setkey is that once it is set it should not change, in particular, init must not wipe out the key set by it. In fact, init should always be used after setkey before any digestion is performed. The only user of crc32c that sets the key is tcrypt. This patch adds the necessary init calls there. Signed-off-by: Herbert Xu commit 58ec4152895b96f047dcf5e490ee49b4c574dec3 Author: Michal Ludvig Date: Mon Jul 17 08:14:58 2006 +1000 [CRYPTO] padlock-sha: TFMs don't need to be static TFMs are local variables. No need to declare them static. After all one is enough. Signed-off-by: Michal Ludvig Signed-off-by: Herbert Xu commit 5644bda5d6aa17a70b8842eb56365d501a5da159 Author: Michal Ludvig Date: Sun Aug 6 22:50:30 2006 +1000 [CRYPTO] padlock: Helper module padlock.ko Compile a helper module padlock.ko that will try to autoload all configured padlock algorithms. This also provides backward compatibility with the ancient times before padlock.ko was renamed to padlock-aes.ko Signed-off-by: Michal Ludvig Signed-off-by: Herbert Xu commit cb17530b0a4e01bd595a7ac437467a1a9833a15c Author: Adrian Bunk Date: Sat Jul 15 11:31:25 2006 +1000 [CRYPTO] padlock-sha: Make 2 functions static This patch makes two needlessly global functions static. Signed-off-by: Adrian Bunk Signed-off-by: Herbert Xu commit 6c833275152b454d311f0e70b5e6bf028b4a2aaf Author: Michal Ludvig Date: Wed Jul 12 12:29:38 2006 +1000 [CRYPTO] padlock: Driver for SHA1 / SHA256 algorithms Support for SHA1 / SHA256 algorithms in VIA C7 processors. Signed-off-by: Michal Ludvig Signed-off-by: Herbert Xu commit ccc17c34d676f116bd09dd36a3b01627bc6a2f8a Author: Michal Ludvig Date: Sat Jul 15 10:23:49 2006 +1000 [CRYPTO] padlock: Update private header file PADLOCK_CRA_PRIORITY is shared between padlock-aes and padlock-sha so it should be in the header. On the other hand "struct cword" is only used in padlock-aes.c so it's unnecessary to have it in padlock.h Signed-off-by: Michal Ludvig Signed-off-by: Herbert Xu commit db5e9a42373ae6d84c4b0179c2fe0aba866474e8 Author: Herbert Xu Date: Sun Jul 9 10:35:49 2006 +1000 [CRYPTO] padlock: Add compatibility alias after rename Whenever we rename modules we should add an alias to ensure that existing users can still locate the new module. This patch also gets rid of the now unused module function prototypes from padlock.h. Signed-off-by: Herbert Xu commit 1191f0a49390caf16f4a2831a4fc373757471ad6 Author: Michal Ludvig Date: Sun Aug 6 22:46:20 2006 +1000 [CRYPTO] padlock: Get rid of padlock-generic.c Merge padlock-generic.c into padlock-aes.c and compile AES as a standalone module. We won't make a monolithic padlock.ko with all supported algorithms, instead we'll compile each driver into its own module. Signed-off-by: Michal Ludvig Signed-off-by: Herbert Xu commit b14cdd6704c96474ba5c74b5959487beaa5ee1cd Author: Michal Ludvig Date: Sun Jul 9 09:02:24 2006 +1000 [CRYPTO] api: Add missing accessors for new crypto_alg fields Add missing accessors for cra_driver_name and cra_priority. Signed-off-by: Michal Ludvig Signed-off-by: Herbert Xu commit b3be9a6d9a78bb820f5242f43b98f38b0ca610a6 Author: Michal Ludvig Date: Sun Jul 9 08:59:38 2006 +1000 [CRYPTO] sha: Add module aliases for sha1 / sha256 Crypto modules should be loadable by their .cra_driver_name, so we should make MODULE_ALIAS()es with these names. This patch adds aliases for SHA1 and SHA256 only as that's what we need for PadLock-SHA driver. Signed-off-by: Michal Ludvig Signed-off-by: Herbert Xu commit 6bfd48096ff8ecabf955958b51ddfa7988eb0a14 Author: Herbert Xu Date: Thu Sep 21 11:39:29 2006 +1000 [CRYPTO] api: Added spawns Spawns lock a specific crypto algorithm in place. They can then be used with crypto_spawn_tfm to allocate a tfm for that algorithm. When the base algorithm of a spawn is deregistered, all its spawns will be automatically removed. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 492e2b63eb10c28f4f0b694264d74a8755cd1be0 Author: Herbert Xu Date: Thu Sep 21 11:35:17 2006 +1000 [CRYPTO] api: Allow algorithm lookup by type This patch also adds the infrastructure to pick an algorithm based on their type. For example, this allows you to select the encryption algorithm "aes", instead of any algorithm registered under the name "aes". For now this is only accessible internally. Eventually it will be made available through crypto_alloc_tfm. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 2b8c19dbdc692e81243a328725a02efb77b144a5 Author: Herbert Xu Date: Thu Sep 21 11:31:44 2006 +1000 [CRYPTO] api: Add cryptomgr The cryptomgr module is a simple manager of crypto algorithm instances. It ensures that parameterised algorithms of the type tmpl(alg) (e.g., cbc(aes)) are always created. This is meant to satisfy the needs for most users. For more complex cases such as deeper combinations or multiple parameters, a netlink module will be created which allows arbitrary expressions to be parsed in user-space. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 2825982d9d66ebba4b532a07391dfbb357f71c5f Author: Herbert Xu Date: Sun Aug 6 21:23:26 2006 +1000 [CRYPTO] api: Added event notification This patch adds a notifier chain for algorithm/template registration events. This will be used to register compound algorithms such as cbc(aes). In future this will also be passed onto user-space through netlink. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 4cc7720cd165273b08a72b4193146dffee58e34b Author: Herbert Xu Date: Sun Aug 6 21:16:34 2006 +1000 [CRYPTO] api: Add template registration A crypto_template generates a crypto_alg object when given a set of parameters. this patch adds the basic data structure fo templates and code to handle their registration/deregistration. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit cce9e06d100df19a327b19f23adad76e7bf63edd Author: Herbert Xu Date: Mon Aug 21 21:08:13 2006 +1000 [CRYPTO] api: Split out low-level API The crypto API is made up of the part facing users such as IPsec and the low-level part which is used by cryptographic entities such as algorithms. This patch splits out the latter so that the two APIs are more clearly delineated. As a bonus the low-level API can now be modularised if all algorithms are built as modules. Signed-off-by: Herbert Xu commit 9409f38a0c8773c04bff8dda8c552d7ea013d956 Author: Herbert Xu Date: Sun Aug 6 19:49:12 2006 +1000 [IPSEC]: Move linux/crypto.h inclusion out of net/xfrm.h The header file linux/crypto.h is only needed by a few files so including it in net/xfrm.h (which is included by half of the networking stack) is a waste. This patch moves it out of net/xfrm.h and into the specific header files that actually need it. Signed-off-by: Herbert Xu commit 6521f30273fbec65146a0f16de74b7b402b0f7b0 Author: Herbert Xu Date: Sun Aug 6 20:28:44 2006 +1000 [CRYPTO] api: Add crypto_alg reference counting Up until now we've relied on module reference counting to ensure that the crypto_alg structures don't disappear from under us. This was good enough as long as each crypto_alg came from exactly one module. However, with parameterised crypto algorithms a crypto_alg object may need two or more modules to operate. This means that we need to count the references to the crypto_alg object directly. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 72fa491912689ca69dd15f4266945d2c2f2819f8 Author: Herbert Xu Date: Sun May 28 09:05:24 2006 +1000 [CRYPTO] api: Rename crypto_alg_get to crypto_mod_get The functions crypto_alg_get and crypto_alg_put operates on the crypto modules rather than the algorithms. Therefore it makes sense to call them crypto_mod_get and crypto_alg_put respectively. This is needed because we need to have real algorithm reference counters for parameterised algorithms as they can be unregistered from below by when their parameter algorithms are themselves unregistered. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit eaf44088ff467410dd15a033fef118888002ffe6 Author: Joachim Fritschi Date: Tue Jun 20 21:12:02 2006 +1000 [CRYPTO] twofish: x86-64 assembly version The patch passed the trycpt tests and automated filesystem tests. This rewrite resulted in some nice perfomance increase over my last patch. Short summary of the tcrypt benchmarks: Twofish Assembler vs. Twofish C (256bit 8kb block CBC) encrypt: -27% Cycles decrypt: -23% Cycles Twofish Assembler vs. AES Assembler (128bit 8kb block CBC) encrypt: +18% Cycles decrypt: +15% Cycles Twofish Assembler vs. AES Assembler (256bit 8kb block CBC) encrypt: -9% Cycles decrypt: -8% Cycles Full Output: http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-twofish-c-x86_64.txt http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-twofish-asm-x86_64.txt http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-aes-asm-x86_64.txt Here is another bonnie++ benchmark with encrypted filesystems. Most runs maxed out the hd. It should give some idea what the module can do for encrypted filesystem performance even though you can't see the full numbers. http://homepages.tu-darmstadt.de/~fritschi/twofish/output_20060610_130806_x86_64.html Signed-off-by: Joachim Fritschi Signed-off-by: Herbert Xu commit b9f535ffe38f7eb61ac2219d32d97c377b69f70d Author: Joachim Fritschi Date: Tue Jun 20 20:59:16 2006 +1000 [CRYPTO] twofish: i586 assembly version The patch passed the trycpt tests and automated filesystem tests. This rewrite resulted in some nice perfomance increase over my last patch. Short summary of the tcrypt benchmarks: Twofish Assembler vs. Twofish C (256bit 8kb block CBC) encrypt: -33% Cycles decrypt: -45% Cycles Twofish Assembler vs. AES Assembler (128bit 8kb block CBC) encrypt: +3% Cycles decrypt: -22% Cycles Twofish Assembler vs. AES Assembler (256bit 8kb block CBC) encrypt: -20% Cycles decrypt: -36% Cycles Full Output: http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-twofish-asm-i586.txt http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-twofish-c-i586.txt http://homepages.tu-darmstadt.de/~fritschi/twofish/tcrypt-speed-aes-asm-i586.txt Here is another bonnie++ benchmark with encrypted filesystems. All runs with the twofish assembler modules max out the drivespeed. It should give some idea what the module can do for encrypted filesystem performance even though you can't see the full numbers. http://homepages.tu-darmstadt.de/~fritschi/twofish/output_20060611_205432_x86.html Signed-off-by: Joachim Fritschi Signed-off-by: Herbert Xu commit 758f570ea785a5fbcdca026dfab2e9e1a3f89726 Author: Joachim Fritschi Date: Tue Jun 20 20:39:29 2006 +1000 [CRYPTO] twofish: Fix the priority This patch adds a proper driver name and priority to the generic c implemtation to allow coexistance of c and assembler modules. Signed-off-by: Joachim Fritschi Signed-off-by: Herbert Xu commit 2729bb427f686e47970406d6bde6b11892885f29 Author: Joachim Fritschi Date: Tue Jun 20 20:37:23 2006 +1000 [CRYPTO] twofish: Split out common c code This patch splits up the twofish crypto routine into a common part ( key setup ) which will be uses by all twofish crypto modules ( generic-c , i586 assembler and x86_64 assembler ) and generic-c part. It also creates a new header file which will be used by all 3 modules. This eliminates all code duplication. Correctness was verified with the tcrypt module and automated test scripts. Signed-off-by: Joachim Fritschi Signed-off-by: Herbert Xu commit 799111020c66c41aef621a3b53ad112543754124 Author: Herbert Xu Date: Mon Aug 21 21:03:52 2006 +1000 [CRYPTO] api: Fixed crypto_tfm context alignment Previously the __aligned__ attribute was added to the crypto_tfm context member to ensure it is alinged correctly on architectures such as arm. Unfortunately kmalloc does not use the same minimum alignment rules as gcc so this is useless. This patch changes it to use kmalloc's minimum alignment. Signed-off-by: Herbert Xu commit eb35746ca5e2211569b91ebb44d55b88ec91f3b0 Author: Mark Fasheh Date: Wed Aug 9 13:23:08 2006 -0700 ocfs2: Remove overzealous BUG_ON() The truncate code was never supposed to BUG() on an allocator it doesn't know about, but rather to ignore it. Right now, this does nothing, but when we change our allocation paths to use all suballocator files, this will allow current versions of the fs module to work fine. Signed-off-by: Mark Fasheh commit f12033d206ea48928d8124cdd5d35d8008c18935 Author: Mark Fasheh Date: Wed Sep 13 18:57:57 2006 -0700 ocfs2: Don't print on unknown remote blocking call Signed-off-by: Mark Fasheh commit 02ed8416fe5b7e33b5bbf2d73f9af1d316806822 Author: Mark Fasheh Date: Thu Sep 14 10:28:06 2006 -0700 ocfs2: Remove EXPERIMENTAL dependency Things have been working pretty well for a while now. We should've probably done this at least one kernel revision ago, but it doesn't hurt to be paranoid. Signed-off-by: Mark Fasheh commit aa9588741db907785e4d92c8b768dd6c9077e6f0 Author: Mark Fasheh Date: Fri Apr 21 13:49:02 2006 -0700 ocfs2: implement directory read-ahead Uptodate.c now knows about read-ahead buffers. Use some more aggressive logic in ocfs2_readdir(). The two functions which currently use directory read-ahead are ocfs2_find_entry() and ocfs2_readdir(). Signed-off-by: Mark Fasheh commit e0b4096d34fbd6b30838c417100c9d0ef73c71f2 Author: Mark Fasheh Date: Tue Jul 11 14:38:54 2006 -0700 ocfs2: properly update i_mtime on buffered write We weren't always updating i_mtime on writes, so fix ocfs2_commit_write() to handle this. Signed-off-by: Mark Fasheh Acked-by: Zach Brown commit 0f62de2c9ca60a35f63122e7ea992cee8aae4bef Author: Tiger Yang Date: Thu Aug 31 20:39:47 2006 -0700 ocfs2: Fix directory link count checks in ocfs2_link() Remove the redundant "i_nlink >= OCFS2_LINK_MAX" check and adds an unlinked directory check in ocfs2_link(). Signed-off-by: Tiger Yang Signed-off-by: Mark Fasheh commit a663e30513d7ecc77dd71d474e7646bf78c0ba62 Author: Mark Fasheh Date: Wed Aug 9 11:45:07 2006 -0700 ocfs2: move nlink check in ocfs2_mknod() The dir nlink check in ocfs2_mknod() was being done outside of the cluster lock, which means we could have been checking against a stale version of the inode. Fix this by doing the check after the cluster lock instead. Signed-off-by: Mark Fasheh commit 471e3f57286da7ce8820ad42c77d5f5f49d56a41 Author: Mathieu Avila Date: Wed Sep 13 11:11:27 2006 -0700 ocfs2: Fix heartbeat sector calculation This fixes things for devices which set max_sectors to 8. Signed-off-by: Mark Fasheh commit 2d5625181fac18f572cbbd18878d28f5eebf4733 Author: Adrian Bunk Date: Mon Jul 10 01:32:51 2006 +0200 [PATCH] fs/ocfs2/ioctl.c should #include "ioctl.h" Every file should #include the headers containing the prototypes for its global functions. Signed-off-by: Adrian Bunk Signed-off-by: Mark Fasheh commit ca4d147e62df370c334898464023aa7f9126abe1 Author: Herbert Poetzl Date: Mon Jul 3 17:27:12 2006 -0700 ocfs2: add ext2 attributes Support immutable, and other attributes. Some renaming and other minor fixes done by myself. Signed-off-by: Herbert Poetzl Signed-off-by: Mark Fasheh commit b4c98f625fffee3a6f633082e9e4be3e952ca2ab Author: Joel Becker Date: Wed Sep 13 11:01:19 2006 -0700 configfs: Prevent duplicate subsystem names. For all child objects, creation comes through mkdir(2), so duplicate names are prevented. Subsystems, though, are registered by client drivers at init_module()/__init time. This patch prevents duplicate subsystem names. Signed-off-by: Joel Becker Signed-off-by: Mark Fasheh commit 36b35a5be0e4b406acd816e2122d153e875105be Author: Jeff Garzik Date: Wed Sep 20 17:48:53 2006 -0400 [libata] Delete pata_it8172 driver This MIPS platform is going away. Acked-by: Ralf Baechle Signed-off-by: Jeff Garzik commit d81bf551103cc3bc9e4f7ddf337511d6da0d088f Author: Francois Romieu Date: Wed Sep 20 21:31:20 2006 +0200 r8169: the MMIO region of the 8167 stands behin BAR#1 Reported by Matt Bockol to make its LOM (MSI 965 Neo) work. Signed-off-by: Francois Romieu commit 388c571cffc4ae4e64f0786333e811308acbbc10 Author: Michael Holzheu Date: Wed Sep 20 16:00:04 2006 +0200 [S390] hypfs crashes with invalid mount option. When an invalid mount option is specified, no root inode is created for hypfs, hypfs_fill_super() returns with -EINVAL and then hypfs_kill_super() is called. hypfs_kill_super() does not check if the root inode has been initialized. This patch adds this check. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 564337f34cc10fd8f30329e4e5f14f8995db5711 Author: Peter Oberparleiter Date: Wed Sep 20 16:00:01 2006 +0200 [S390] cio: subchannel evaluation function operates without lock css_evaluate_subchannel() operates subchannel without lock which can lead to erratic behavior caused by concurrent device access. Also split evaluation function to make it more readable. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit 28bdc6f6233f380ddc0b430cabd88ffeafea34c7 Author: Peter Oberparleiter Date: Wed Sep 20 15:59:59 2006 +0200 [S390] cio: always query all paths on path verification. Reappearing channel paths are sometimes not utilized by CCW devices because path verification incorrectly relies on path-operational-mask information which is not updated until a channel path has been used again. Modify path verification procedure to always query all available paths to a device. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit e0e32c8eba86fd5ea79eefad6f2c0b4988dfd02a Author: Peter Oberparleiter Date: Wed Sep 20 15:59:57 2006 +0200 [S390] cio: update path groups on logical CHPID changes. CHPIDs that are logically varied off will not be removed from a CCW device's path group because resign-from-pathgroup command is issued with invalid path mask of 0 because internal CCW operations are masked by the logical path mask after the relevant bits are cleared by the vary operation. Do not apply logical path mask to internal operations. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit dd9963f9dd0985e16e878fd3632ecadfc54d3fbb Author: Peter Oberparleiter Date: Wed Sep 20 15:59:54 2006 +0200 [S390] cio: subchannels in no-path state. Subchannel may incorrectly remain in state no-path after channel paths have reappeared. Currently the scan for subchannels which are using a channel path ends at the first occurrence if a full link address was provided by the channel subsystem. The scan needs to continue over all subchannels. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit dcd707b4bdc10b4fa20efa116dbaeded21513115 Author: Peter Oberparleiter Date: Wed Sep 20 15:59:52 2006 +0200 [S390] Replace nopav-message on VM. Specifying kernel parameter "dasd=nopav" on systems running under VM has no function but results in message "disable PAV mode". Correct message is "'nopav' not supported on VM". Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit db0c2d59087296b3567ec408abe17108db88b385 Author: Peter Oberparleiter Date: Wed Sep 20 15:59:49 2006 +0200 [S390] set modalias for ccw bus uevents. Add the MODALIAS environment variable for ccw bus uevents. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky commit 250b2dc83347feb73eb6bdf7511685e72b587e68 Author: Cornelia Huck Date: Wed Sep 20 15:59:47 2006 +0200 [S390] Get rid of DBG macro. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky commit 6c2a9e6df60478e712f3c3d98b5047778a82a3d7 Author: Gerald Schaefer Date: Wed Sep 20 15:59:44 2006 +0200 [S390] Use alternative user-copy operations for new hardware. This introduces new user-copy operations which are optimized for copying more than 256 Bytes on new hardware. Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit d02765d1af743567398eb6d523dea0ba5e5e7e8e Author: Gerald Schaefer Date: Wed Sep 20 15:59:42 2006 +0200 [S390] Make user-copy operations run-time configurable. Introduces a struct uaccess_ops which allows setting user-copy operations at run-time. Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit 6837a8c352efcc5efc70424e9bfd94ff9bfa9a47 Author: Gerald Schaefer Date: Wed Sep 20 15:59:39 2006 +0200 [S390] Cleanup in signal handling code. Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit 9282ed929758b82f448a40d3c17319d794970624 Author: Gerald Schaefer Date: Wed Sep 20 15:59:37 2006 +0200 [S390] Cleanup in page table related code. Changed and simplified some page table related #defines and code. Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit 31b58088292c7f00f0b81088bfb557285b0b6247 Author: Melissa Howland Date: Wed Sep 20 15:59:34 2006 +0200 [S390] Linux API for writing z/VM APPLDATA Monitor records. This patch delivers a new Linux API in the form of a misc char device that is useable from user space and allows write access to the z/VM APPLDATA Monitor Records collected by the *MONITOR System Service of z/VM. Signed-off-by: Melissa Howland Signed-off-by: Martin Schwidefsky commit e620c4940002348417e8d317d65bc7b152646493 Author: Christian Borntraeger Date: Wed Sep 20 15:59:32 2006 +0200 [S390] xpram off by one error. The xpram driver shows and uses 4096 bytes less than available. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit 07d43ce6a2ba0bb914078c3b066a7a3bab57599d Author: Heiko Carstens Date: Wed Sep 20 15:59:29 2006 +0200 [S390] Remove kexec experimental flag. Follow other architectures and remove kexec experimental flag. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 1f38d61347203055b55e34083cce7a9cd8c529a9 Author: Gerald Schaefer Date: Wed Sep 20 15:59:26 2006 +0200 [S390] cleanup appldata. Introduce asm header that contains the appldata data structures and the diag inline assembly. Signed-off-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky commit 45af3af8761a3f790fe414c017de039a08ccd780 Author: Christian Borntraeger Date: Wed Sep 20 15:59:24 2006 +0200 [S390] fix typo in vmcp. Fix comment typo in vmcp, it is z/VM and not v/VM. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit 9514e2311be97a01e8669c4de78e9fea37489f09 Author: Heiko Carstens Date: Wed Sep 20 15:59:22 2006 +0200 [S390] Kernel stack overflow handling. Substract the size of the initial stack frame from the correct register. Otherwise we will end up in a program check loop. Fix the offset into the save area as well. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 6981e936aa156c747bb3e6aea414bba673457115 Author: Frank Pavlic Date: Wed Sep 20 15:59:19 2006 +0200 [S390] qdio slsb processing state. The last SLSB has to be set to STATE_PROCESSING if we really want to use the PROCESSING feature. Signed-off-by: Frank Pavlic Signed-off-by: Martin Schwidefsky commit 81388d2a45b89c890b981cfc83b01ec15ae3483b Author: Heiko Carstens Date: Wed Sep 20 15:59:17 2006 +0200 [S390] Missing initialization in common i/o layer. Previous patch that was intended to reduce stack usage within common i/o layer didn't consider implicit memset(..., 0, ...) used with the initializations used before. Add these missing memsets wherever it's not obvious that the concerned memory region is zeroed. This should give the same semantics as before. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit e87bfe51b5ca2db99dd680bbb1e8fe3c94b607df Author: Heiko Carstens Date: Wed Sep 20 15:59:15 2006 +0200 [S390] convert some assembler to C. Convert GET_IPL_DEVICE assembler macro to C function. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 1375fc1fb0434a26f93c59b1b9f3fdb8bf90bba5 Author: Heiko Carstens Date: Wed Sep 20 15:59:12 2006 +0200 [S390] __exit cleanup. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 0fee644ada12c524abbf723132fbea6a082ecfc2 Author: Martin Schwidefsky Date: Wed Sep 20 15:59:10 2006 +0200 [S390] cleanup sysinfo and add system z9 specific extensions. With System z9 additional fields have been added to the output of the store system information instruction. This patch adds the new model information field and the alternate cpu capability fields to the output of /proc/sysinfo. While we at it clean up the code as well. Signed-off-by: Martin Schwidefsky commit b0035f127e007ea0afc8baad740093eb124f7b0b Author: Horst Hummel Date: Wed Sep 20 15:59:07 2006 +0200 [S390] dasd default debug level. Enhanced default DBF level to get most important messages in debug feature files. Signed-off-by: Horst Hummel Signed-off-by: Martin Schwidefsky commit a00bfd7147c0c5c04a59f7adcb0e6d8948b90a6e Author: Martin Schwidefsky Date: Wed Sep 20 15:59:05 2006 +0200 [S390] dasd deadlock after state change pending interrupt. The dasd_device_from_cdev function is called from interrupt context to get the struct dasd_device associated with a ccw device. The driver_data of the ccw device points to the dasd_devmap structure which contains the pointer to the dasd_device structure. The lock that protects the dasd_devmap structure is acquire with out irqsave. To prevent the deadlock in dasd_device_from_cdev if it is called from interrupt context the dependency to the dasd_devmap structure needs to be removed. Let the driver_data of the ccw device point to the dasd_device structure directly and use the ccw device lock to protect the access. Signed-off-by: Martin Schwidefsky commit 47addc84b450fd5e391ab118e178645cb0bbd89d Author: Frank Pavlic Date: Wed Sep 20 15:59:03 2006 +0200 [S390] qdio_get_micros return value. qdio_get_micros is supposed to return microseconds. The get_clock() return value needs to be shifted by 12 to get to microseconds. Signed-off-by: Frank Pavlic Signed-off-by: Martin Schwidefsky commit 7d5d688f724dd5a651d1ce7bc3ea7c03d28137a1 Author: Heiko Carstens Date: Wed Sep 20 15:59:00 2006 +0200 [S390] Use simple_strtoul instead of own cmm_strtoul wrapper. Fix compile warning with some configurations: arch/s390/mm/cmm.c:58: warning: 'cmm_strtoul' defined but not used Originally cmm_strtoul was introduced because simple_strtoul couldn't handle strings with hexadecimal numbers that contained a capital 'X'. Since this is no longer true cmm_strtoul can be removed. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 8301425534b87bae9990261f3008f39999be738c Author: Martin Schwidefsky Date: Wed Sep 20 15:58:58 2006 +0200 [S390] architecture co-maintainer. Add Heiko Carstens as co-maintainer for the s390 architecture. Signed-off-by: Martin Schwidefsky commit ba8ce5c6f0a15f08eae39880a0de296007f4a4e7 Author: Martin Schwidefsky Date: Wed Sep 20 15:58:56 2006 +0200 [S390] #undef in unistd.h Avoid using #undef in unistd.h. Signed-off-by: Martin Schwidefsky commit 8427082a506f7ae0abf82ce0047a045ec4309e59 Author: Heiko Carstens Date: Wed Sep 20 15:58:54 2006 +0200 [S390] fix syscall restart handling. If do_signal() gets called several times before returning to user space and no signal is pending (e.g. cancelled by a debugger) syscall restart handling could be done several times. This would change the user space PSW to an address prior to the syscall instruction. Fix this by making sure that syscall restart handling is only done once. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 39b083fe1c3c7b88939f6fa1b0b96e579f12e96f Author: Heiko Carstens Date: Wed Sep 20 15:58:51 2006 +0200 [S390] empty function defines. Use do { } while (0) constructs instead of empty defines to avoid subtle compile bugs. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit ff6b8ea68f4b7353f88b97024f28127e2148aa00 Author: Michael Holzheu Date: Wed Sep 20 15:58:49 2006 +0200 [S390] ipl/dump on panic. It is now possible to specify a ccw/fcp dump device which is used to automatically create a system dump in case of a kernel panic. The dump device can be configured under /sys/firmware/dump. In addition it is now possible to specify a ccw/fcp device which is used for the next reboot of Linux. The reipl device can be configured under /sys/firmware/reipl. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 331c982d4a6b43cdc0d056956a1cae8a7d6237bf Author: Michael Holzheu Date: Wed Sep 20 15:58:47 2006 +0200 [S390] hypfs compiler warnings. Add casts to avoid compiler warnings. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit f19bfb2c9b8675590fbecb43e5ce3b34ee321185 Author: Michael Holzheu Date: Wed Sep 20 15:58:44 2006 +0200 [S390] hypfs comment cleanup. Correct some comments in the hypervisor filesystem. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky commit 65912a84c0f33304fa5ea004c7b6ee58d5f5572e Author: Heiko Carstens Date: Wed Sep 20 15:58:41 2006 +0200 [S390] initrd vs. bootmem bitmap. Move initrd if the bitmap of the bootmem allocator would overwrite it. In addition this patch sets the default size and address of the initrd to 0. Therefore all boot loaders must set the initrd size and address correctly. This is especially relevant for ftp boot via HMC/SE, where this change requires a special patch file entry in the .ins file which sets these two values contained at address 0x10408 and 0x10410. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 4ba069b802c29eee066385f9826e2d83716626b4 Author: Michael Grundy Date: Wed Sep 20 15:58:39 2006 +0200 [S390] add kprobes support. Signed-off-by: Michael Grundy Signed-off-by: David Wilder Signed-off-by: Martin Schwidefsky commit 5432114baf0300286a6ca1b0aea549492a379432 Author: Ralph Wuerthner Date: Wed Sep 20 15:58:36 2006 +0200 [S390] zcrypt secure key cryptography extension. Allow the user space to send extended cprb messages directly to the PCIXCC / CEX2C cards. This allows the CCA library to construct special crypto requests that use "secure" keys that are stored on the card. Signed-off-by: Ralph Wuerthner Signed-off-by: Martin Schwidefsky commit acc46c0144b6d1cf0d77bb8b4d1b7dcd5dc28d71 Author: Greg Ungerer Date: Thu Sep 14 00:28:26 2006 +1000 [ARM] nommu: create flat.h to support uClinux flat binaries Create header with uClinux flat format binary support macros for ARM platforms. Derived from the m68knommu flat.h. Signed-off-by: Greg Ungerer Signed-off-by: Russell King commit 6a39dd6222dda5ee2414a1b42e8e62118742a49e Author: Daniel Jacobowitz Date: Wed Aug 30 15:02:08 2006 +0100 [ARM] 3759/2: Remove uses of %? Patch from Daniel Jacobowitz The ARM kernel has several uses of asm("foo%?"). %? is a GCC internal modifier used to output conditional execution predicates. However, no version of GCC supports conditionalizing asm statements. GCC 4.2 will correctly expand %? to the empty string in user asms. Earlier versions may reuse the condition from the previous instruction. In 'if (foo) asm ("bar%?");' this is somewhat likely to be right... but not reliable. So, the only safe thing to do is to remove the uses of %?. I believe the tlbflush.h occurances were supposed to be removed before, based on the comment about %? not working at the top of that file. Old versions of GCC could omit branches around user asms if the asm didn't mark the condition codes as clobbered. This problem hasn't been seen on any recent (3.x or 4.x) GCC, but it could theoretically happen. So, where %? was removed a cc clobber was added. Signed-off-by: Daniel Jacobowitz Signed-off-by: Russell King commit 681a4991f83742a0d2325afbf7b7f22045ad5b30 Author: Russell King Date: Sun Aug 27 12:38:34 2006 +0100 [ARM] Optimise VFP thread notify function a little The common case for the thread notifier is a context switch. Tell gcc that this is the most likely condition so it can optimise the function for this case. Signed-off-by: Russell King commit b36e4758dc1b9ff1f6d97e951edba22366230d11 Author: Russell King Date: Sun Aug 27 12:26:34 2006 +0100 [ARM] Fix kernel/fork.c for lockdep on ARM ARM has interrupts enabled over context switches (iow, has __ARCH_WANT_INTERRUPTS_ON_CTXSW defined.) The lockdep code in fork.c assumes that interrupts are always disabled. Fix this wrong assumption by making the initialisation of 'p->hardirqs_enabled' depend on __ARCH_WANT_INTERRUPTS_ON_CTXSW. Acked-by: Ingo Molnar Signed-off-by: Russell King commit 7ad1bcb25c5623f1f87c50fdf2272f58ff91db5a Author: Russell King Date: Sun Aug 27 12:07:02 2006 +0100 [ARM] Add ARM irqtrace support This adds support for irqtrace for lockdep on ARM. Signed-off-by: Russell King commit d84b47115a04d9f6b0da777e8aa8cd930d5b6b8b Author: Russell King Date: Mon Aug 21 19:23:38 2006 +0100 [ARM] Move mmu.c out of the way Rename mmu.c to context.c - it's the ARMv6 ASID context handling code rather than generic "mmu" handling code. Signed-off-by: Russell King commit 1b2e2b73b4c84c918686c04a00724197036c0847 Author: Russell King Date: Mon Aug 21 17:06:38 2006 +0100 [ARM] Cleanup arch/arm/mm a little Move top_pmd into arch/arm/mm/mm.h - nothing outside arch/arm/mm references it. Move the repeated definition of TOP_PTE into mm/mm.h, as well as a few function prototypes. Signed-off-by: Russell King commit fe3a1be59c851aba2330387596c6134bc5ec8397 Author: Martin Schwidefsky Date: Wed Sep 20 15:58:34 2006 +0200 [S390] zcrypt driver Makefile, Kconfig and monolithic build. The Makefile and Kconfig changes should be obvious. The monolithic build option is there to create an old-style z90crypt module for backward compatability to older distributions. Signed-off-by: Ralph Wuerthner Signed-off-by: Martin Schwidefsky commit 6684af1a07a1f88f3970bc90e5aed173d39168db Author: Martin Schwidefsky Date: Wed Sep 20 15:58:32 2006 +0200 [S390] zcrypt PCICC, PCIXCC coprocessor card ap bus drivers. Signed-off-by: Ralph Wuerthner Signed-off-by: Martin Schwidefsky commit 963ed931c3fd18082bfde0e8704a28955663abf4 Author: Martin Schwidefsky Date: Wed Sep 20 15:58:29 2006 +0200 [S390] zcrypt CEX2A, CEX2C, PCICA accelerator card ap bus drivers. Signed-off-by: Ralph Wuerthner Signed-off-by: Martin Schwidefsky commit 2dbc2418bac32a18a372ae9aec386f0fe9174389 Author: Martin Schwidefsky Date: Wed Sep 20 15:58:27 2006 +0200 [S390] zcrypt user space interface. The user space interface of the zcrypt device driver implements the old user space interface as defined by the old z90crypt driver. Everything is there, the /dev/z90crypt misc character device, all the lovely ioctls and the /proc file. Even writing to the z90crypt proc file to configure the crypto device still works. It stands to reason to remove the proc write function someday since a much cleaner configuration via the sysfs is now available. The ap bus device drivers register crypto cards to the zcrypt user space interface. The request router of the user space interface picks one of the registered cards based on the predicted latency for the request and calls the driver via a callback found in the zcrypt_ops of the device. The request router only knows which operations the card can do and the minimum / maximum number of bits a request can have. Signed-off-by: Cornelia Huck Signed-off-by: Ralph Wuerthner Signed-off-by: Martin Schwidefsky commit 1534c3820c26aca4e2567f97b8add8bea40e7e2b Author: Martin Schwidefsky Date: Wed Sep 20 15:58:25 2006 +0200 [S390] zcrypt adjunct processor bus. Add a bus for the adjunct processor interface. Up to 64 devices can be connect to the ap bus interface, each device with 16 domains. That makes 1024 message queues. The interface is asynchronous, the answer to a message sent to a queue needs to be received at some later point in time. Unfortunately the interface does not provide interrupts when a message reply is pending. So the ap bus needs to implement some fancy polling, each active queue is polled once per 1/HZ second or continuously if an idle cpus exsists and the poll thread is activ (see poll_thread parameter). The ap bus uses the sysfs path /sys/bus/ap and has two bus attributes, ap_domain and config_time. The ap_domain selects one of the 16 domains to be used for this system. This limits the maximum number of ap devices to 64. The config_time attribute contains the number of seconds between two ap bus scans to find new devices. The ap bus uses the modalias entries of the form "ap:tN" to autoload the ap driver for hardware type N. Currently known types are: 3 - PCICC, 4 - PCICA, 5 - PCIXCC, 6 - CEX2A and 7 - CEX2C. Signed-off-by: Cornelia Huck Signed-off-by: Ralph Wuerthner Signed-off-by: Martin Schwidefsky commit 7561b974e0cbbdca1bb880b55200afd9a1a20737 Author: Martin Schwidefsky Date: Wed Sep 20 15:58:22 2006 +0200 [S390] remove old z90crypt driver. The z90crypt driver has served its term. It is replaced by the shiny new zcrypt device driver. Signed-off-by: Martin Schwidefsky commit de1a3f1ce6c4c3b2b14cf9157a22d6b4c64f708e Author: Martin Schwidefsky Date: Wed Sep 20 15:58:20 2006 +0200 [S390] EX_TABLE macro. Add EX_TABLE helper macro to simplify creation of inline assembly exception table entries. Signed-off-by: Martin Schwidefsky commit b2c5f61920eeee9c4e78698de4fde4586fe5ae79 Author: Mark A. Greer Date: Tue Sep 19 14:05:08 2006 +1000 [POWERPC] Start arch/powerpc/boot code reorganization This abstracts the operations used in the bootwrapper, and defines the operations needed for the bootwrapper to run on an OF platform. The operations have been divided up into platform ops (platform_ops), firmware ops (fw_ops), device tree ops (dt_ops), and console ops (console_ops). The proper operations will be hooked up at runtime to provide the functionality that you need. Signed-off-by: Mark A. Greer Signed-off-by: Paul Mackerras commit a4dc7ff08915a2035aa6d6decc53fa1deaa410bb Author: Paul Mackerras Date: Tue Sep 19 14:06:27 2006 +1000 [POWERPC] Define of_read_ulong helper There are various places where we want to extract an unsigned long value from a device-tree property that can be 1 or 2 cells in length. This replaces some open-coded calculations, and one place where we assumed without checking that properties were the length we wanted, with a little of_read_ulong() helper. Signed-off-by: Paul Mackerras commit 19e59df4dc2e6f7b46190ee77ce7093769f597a7 Author: Stephen Rothwell Date: Thu Sep 14 14:55:36 2006 +1000 [POWERPC] iseries: eliminate a couple of warnings Copy and paste bug in io.h Signed-off-by: Stephen Rothwell commit 5adcaf50cf697aa4d0c731107003c1383b59b214 Author: Stephen Rothwell Date: Tue Sep 19 22:17:49 2006 +1000 [POWERPC] convert string i/o operations to C This produces essentially the same code and will make the iSeries i/o consolidation easier. The count parameter is changed to long since that will produce the same (better) code on 32 and 64 bit builds. Signed-off-by: Stephen Rothwell commit 73ea9e1bcb8eea4f3b2052fe7ccd7ee4b5a271a0 Author: Stephen Rothwell Date: Tue Sep 19 17:30:20 2006 +1000 [POWERPC] clean up ide io accessors Signed-off-by: Stephen Rothwell commit 661f1cdb8b3e3c2c44e97df122c1d5643c054ce8 Author: Stephen Rothwell Date: Tue Sep 19 16:52:55 2006 +1000 [POWERPC] remove unused asm routines _insw, _outsw, _insl amd _outsl are all unused, so remove them. Signed-off-by: Stephen Rothwell commit fa053d2f008cb73fa768b8e171486d8c0b33312b Author: Stephen Rothwell Date: Tue Sep 19 14:51:40 2006 +1000 [POWERPC] remove unused io accessors The io accessors insw_ns, outsw_ns, insl_ns and outsl_ns are unused (except for one unnecessary use in drivers/net/3c509.c that is addressed in a previous patch) and are only defined in powerpc/ppc, so remove them. Signed-off-by: Stephen Rothwell commit 9ca91e0fb5295e8317030feb889085e452cedab1 Author: Stephen Rothwell Date: Thu Sep 14 16:59:31 2006 +1000 [POWERPC] silence a warning Left over from the constifying of get_property. Signed-off-by: Stephen Rothwell commit 4f896e53eea70013fa48d0d8662680cf8aae8a43 Author: Stephen Rothwell Date: Thu Aug 24 13:29:33 2006 +1000 [POWERPC] make spinlocks work in a combined kernel If we build a pSeries/iSeries combined kernel, we will need this. Signed-off-by: Stephen Rothwell commit f8ec473387f70d103c83ffb3ab50cb2b1380d0c0 Author: Jeff Garzik Date: Tue Sep 19 15:27:07 2006 -0400 e1000, ixgb: Remove pointless wrappers Signed-off-by: Jeff Garzik commit fadcfa33b6319a5faf8af2287f08bf93a7f926b6 Author: David Woodhouse Date: Tue Sep 19 12:43:58 2006 +0100 [HEADERS] One line per header in Kbuild files to reduce conflicts Signed-off-by: David Woodhouse commit 90da11514562020ea7d697982f912ac949adc317 Author: Lennart Poettering Date: Tue Sep 19 01:59:55 2006 -0400 Input: add KEY_BLUETOOTH and KEY_WLAN definitions Some laptops have separate "rfkill" buttons for disabling/enabling Bluetooth and WLAN. Signed-off-by: Lennart Poettering Signed-off-by: Dmitry Torokhov commit 9a87fdded5742a9d14780e5dfd9c940d7862e0ec Author: Michael Hanselmann Date: Tue Sep 19 01:59:49 2006 -0400 Input: add new BUS_VIRTUAL bus type BUS_VIRTUAL can be used when creating virtual devices using uinput driver. Note that when uinput is used to drive a real piece of hardware "real" bus type (such as BUS_USB, BUS_BLUETOOTH) should be specified. Signed-off-by: Michael Hanselmann Signed-off-by: Dmitry Torokhov commit f35d0616bddf4efdfaedc5dfad2267202a3c739f Author: Marek Vasut Date: Tue Sep 19 01:59:32 2006 -0400 Input: add driver for stowaway serial keyboards Add support for stowaway and stowaway compatible (eg. dicota inutPDA) serial keyboards. Reported to work on palm zire71 and palm tungsten T3. Signed-off-by: Marek Vasut Signed-off-by: Andrew Morton Signed-off-by: Dmitry Torokhov commit 93590859884784520a1850767f86296abc2cdc6d Author: Alan Cox Date: Tue Sep 12 16:55:12 2006 +0100 [PATCH] libata: improve handling of diagostic fail (and hardware that misreports it) Our ATA probe code checks that a device is not reporting a diagnostic failure during start up. Unfortunately at least one device seems to like doing this - the Gigabyte iRAM. This is only done for the master right now (which is fine for the iRAM as it is SATA), as with PATA some combinations of ATAPI device seem to fool the check into seeing a drive that isn't there if it is applied to the slave. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 8624a1c93772d24a38ed10cfcd290e8a18ac5b0a Author: Stephen Rothwell Date: Tue Sep 19 11:54:49 2006 +1000 [PATCH] Remove powerpc specific parts of 3c509 driver On powerpc and ppc, insl_ns and insl are identical as are outsl_ns and outsl, so remove the conditional use of insl_ns and outsl_ns. Signed-off-by: Stephen Rothwell Signed-off-by: Jeff Garzik commit fea63e38013ec628ab3f7fddc4c2148064b7910a Author: Tejun Heo Date: Sat Sep 16 03:04:15 2006 +0900 [PATCH] libata: fix non-uniform ports handling Non-uniform ports handling got broken while updating libata to handle those in the same host. Only separate irq for the non-uniform secondary port was implemented while all other fields (host flags, transfer mode...) of the secondary port simply shared those of the first. For ata_piix combined mode, which ATM is the only user of non-uniform ports, this causes the secondary port assume the wrong type. This can cause PATA port to use SATA ops, which results in bogus check on PCS and detection failure. This patch adds ata_probe_ent->pinfo2 which points to optional port_info for the secondary port. For the time being, this seems to be the simplest solution. This workaround will be removed together with ata_probe_ent itself after init model is updated to allow more flexibility. Signed-off-by: Tejun Heo Cc: Alan Cox Cc: Nelson A. de Oliveira Signed-off-by: Jeff Garzik commit cb60736b32a84cbc9525b0bb4df26b04cbfbc8e8 Author: Arnaud Patard Date: Tue Sep 19 00:23:52 2006 -0400 Fix libata resource conflict for legacy mode When the libata is trying to handle legacy ide ports (0x1f0 for instance), it doesn't take care if the resource has childs or not. The result is that this situation : 0100-01fe : pnp 00:09 0170-0177 : libata 01f0-01f7 : libata is seen as conflict, which is wrong. The proposed fix is to detect childs and in this case, look at which child is conflicting. Signed-off-by: Arnaud Patard Signed-off-by: Jeff Garzik commit 26d36b642e2f024019f94819284a11273807571d Author: Alan Cox Date: Fri Sep 15 15:22:51 2006 +0100 [PATCH] s2io: Switch to pci_get_device We want the pci devices ref counted against hotplug. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit b921c3d8b64fe12948088be049785de49be50990 Author: Alan Cox Date: Fri Sep 15 15:27:06 2006 +0100 [PATCH] gt96100: move to pci_get_device API Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit 53ccce2395cdc3693c22b9a94764b66dc1a4fcb4 Author: Jan-Bernd Themann Date: Thu Sep 14 13:51:56 2006 +0200 [PATCH] ehea: bugfix for register access functions Hi Jeff, sorry to bother you again. We figured out that the readq function we included in the eHEA patch we sent yesterday to access eHEA registers is defined as little endian on POWER. This collides with our adapter. We talked to some PPC people who told us there is a discussion going on about new access functions. We were told to use __raw_readq / __raw_writeq for now. This patch fixes this bug found by our internal tests today. Please apply this small patch on the latest patch we sent you yesterday. If it is easier for you I can also give you the entire eHEA patch again. sorry and thanks a lot, Jan-Bernd Signed-off-by: Jan-Bernd Themann drivers/net/ehea/ehea.h | 2 +- drivers/net/ehea/ehea_hw.h | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) Signed-off-by: Jeff Garzik commit 72e8d6bbc151ca670c66d58a37e5bbfbc041db69 Author: Linas Vepstas Date: Mon Sep 18 20:58:06 2006 -0700 [PATCH] e1000 disable device on PCI error A recent patch in -mm3 titled "gregkh-pci-pci-don-t-enable-device-if-already-enabled.patch" causes pci_enable_device() to be a no-op if the kernel thinks that the device is already enabled. This change breaks the PCI error recovery mechanism in the e1000 device driver, since, after PCI slot reset, the card is no longer enabled. This is a trivial fix for this problem. Tested. Signed-off-by: Linas Vepstas Cc: John Ronciak Cc: Jesse Brandeburg Cc: Jeff Kirsher Acked-by: Auke Kok Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit c394f1eafef61c6666f5876afde6110a276c4c9f Author: Stefan Richter Date: Mon Aug 7 20:48:00 2006 +0200 ieee1394: sbp2: enable auto spin-up for all SBP-2 devices This is a follow-up to patch "ieee1394: sbp2: enable auto spin-up for Maxtor disks". When I 'ejected' an OXUF922 based HDD from a Mac OS X box, it was spun down by the Mac and did not spin up by itself when attached to a Linux box right after that. The first SCSI command that required the bridge to access the drive ended in sda:<6>sd 18:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Additional sense: Logical unit not ready, initializing cmd. required Therefore the flag which instructs scsi_mod to send START STOP UNIT with START=1 ("make medium ready") after such a condition is now enabled unconditionally for all FireWire storage devices. Signed-off-by: Stefan Richter commit 87730d045913f28e636cf53ad35950069a85c7f2 Author: Stefan Richter Date: Sat Sep 16 12:24:00 2006 +0200 MAINTAINERS: updates to IEEE 1394 subsystem maintainership - Stefan Richter snatches Jody's place - update path to linux1394.org's repo - remove now redundant entries of ohci1394 and sbp2 - promote eth1394 from Orphaned to Odd Fixes - Stefan takes patches to pcilynx but doesn't have the hardware Signed-off-by: Stefan Richter commit ea6104c22468239083857fa07425c312b1ecb424 Author: Stefan Richter Date: Sun Sep 17 19:41:45 2006 +0200 ieee1394: ohci1394: check for errors in suspend or resume Some of the suspend and resume litany may fail. Tell the PCI core about it. Signed-off-by: Stefan Richter commit f0645e7720e0baacbde61d7d1f0180309451c695 Author: Pavel Machek Date: Sun Sep 17 19:39:06 2006 +0200 set power state of firewire host during suspend Put firewire host controller in PCI Dx state for system suspend. (I was not able to measure any power savings, but it sounds like right thing to do, anyway.) Signed-off-by: Pavel Machek Update by stefanr: Shuffle with existing PPC_PMAC code. Set power state in the resume hook too. Signed-off-by: Stefan Richter commit 9531f13ae56b136d0ad09e6e5c8308a7dc58f3f0 Author: Stefan Richter Date: Thu Sep 7 20:36:00 2006 +0200 ieee1394: ohci1394: more obvious endianess handling Rename ohci1394's packet_swab to header_le32_to_cpu to better reflect what it actually does. Also, define a constant array as 'const' and check the array index properly. Signed-off-by: Stefan Richter commit cf82703dc6f8197341ca6be33cd38e80332685f0 Author: Stefan Richter Date: Thu Sep 7 15:52:00 2006 +0200 ieee1394: ohci1394: fix endianess bug in debug message The transaction labels were misprinted int the debug printk "Packet received from node..." due two byte-swapping once too often. Affected were big endian machines, except UniNorth based ones. Fix tested by Wolfgang Pfeiffer. Signed-off-by: Stefan Richter commit 98e238cd42be6c0852da519303cf0182690f8d9f Author: Stefan Richter Date: Thu Sep 7 01:06:00 2006 +0200 ieee1394: sbp2: don't prefer MODE SENSE 10 In the old days, sbp2 used to coerce all MODE SENSE commands into the 10 bytes version. When all command set conversions were removed from sbp2 several months ago, sdev->use_10_for_ms = 1 was added. Meaning, higher SCSI layers preferred the 10 bytes version but would try the 6 bytes version if the former failed. Recently, a problem with the 10 bytes version was discovered. An Initio INIC-1530 firmware accepted the 10 bytes version but replied with bogus data, showing the HDD incorrectly as write-protected. Since RBC actually mandates MODE SENSE (6), I checked which version was sent by Windows XP and Mac OS X 10.3 to an SBP-2 target hosted by Linux --- it was the 6 bytes version. (Exception: OS X sent the 10 bytes version to an MMC target. RBC and SBC got MODE SENSE (6).) Therefore, drop the use_10_for_ms flag from sbp2. Now the upper layers will try MODE SENSE (6) before MODE SENSE (10) on all SBP-2 devices. Signed-off-by: Stefan Richter commit a1842be898a2295ef513ed0a5d26f65d6283cb11 Author: Stefan Richter Date: Wed Sep 6 19:04:00 2006 +0200 ieee1394: nodemgr: grab class.subsys.rwsem in nodemgr_resume_ne nodemgr_resume_ne was iterating over nodemgr_ud_class.children without protection by nodemgr_ud_class.subsys.rwsem. FIXME: Shouldn't we rather use class->sem there, not class->subsys.rwsem? Signed-off-by: Stefan Richter commit 9b516010863195ba7db061233a3eeffe779130e8 Author: Stefan Richter Date: Wed Sep 6 19:04:00 2006 +0200 ieee1394: nodemgr: fix rwsem recursion nodemgr_update_pdrv grabbed an rw semaphore (as reader) which was already taken by its caller's caller, nodemgr_probe_ne (as reader too). Reported by Miles Lane, call path pointed out by Arjan van de Ven. FIXME: Shouldn't we rather use class->sem there, not class->subsys.rwsem? Signed-off-by: Stefan Richter commit b809289df06ff9453c1b19df74ea83aba311dfc6 Author: Stefan Richter Date: Wed Aug 30 18:22:00 2006 +0200 ieee1394: sbp2: more help in Kconfig Add some pointers to SCSI to the configuration menu item of sbp2. Signed-off-by: Stefan Richter commit 2cccbb555c77e641de9008660e08bdf17fc4206a Author: Stefan Richter Date: Mon Aug 14 18:59:00 2006 +0200 ieee1394: sbp2: prevent rare deadlock in shutdown Scsi_remove_device() may go into uninterruptible sleep if blocked. Therefore sbp2_remove() unblocks the Scsi_Host before the device is requested to be removed. But there could be another 1394 bus reset after that which would block the host again. The 1394 subsystem won't call sbp2_update() concurrently to sbp2_remove(), which is why there is no chance for sbp2_remove() to be unblocked by sbp2_update(). The fix is to tell sbp2's bus reset handler when a device is to be shut down so that it skips scsi_block_requests() on that host. As before, any new commands after a reset without reconnect will be failed quickly by sbp2scsi_queuecommand(). In the long term, means to go without scsi_block_requests() should be found. Signed-off-by: Stefan Richter commit 902abed1587805fe8513e10aef6643f58a6de0a6 Author: Stefan Richter Date: Mon Aug 14 18:56:00 2006 +0200 ieee1394: sbp2: update includes Remove unused includes. Add missing includes, i.e. explicitly include all used headers. Sort includes alphabetically. Replace one call to signal_pending(current) to avoid to include headers just for this line. Signed-off-by: Stefan Richter commit abbca103a02ff0e87569c38be518f9cb2d6baabc Author: Stefan Richter Date: Mon Aug 14 18:51:00 2006 +0200 ieee1394: sbp2: better handling of transport errors If the target signals a transport failure via status block, complete the request with DID_BUSY to indicate to the SCSI subsystem that the command may succeed when retried. Also log diagnostic information if the status block shows a transport related problem. It may point to hardware faults. Signed-off-by: Stefan Richter commit 4fc383c09d14783ca7d7e97e2134abbe7dc43230 Author: Stefan Richter Date: Mon Aug 14 18:46:00 2006 +0200 ieee1394: sbp2: recheck node generation in sbp2_update While sbp2_update() is doing its duties after a bus reset, another reset could happen. Don't accept new requests until the next undisturbed sbp2_update() or until sbp2_remove(). Signed-off-by: Stefan Richter commit 1f427e8055b1ab408395d6da421d93783120484c Author: Stefan Richter Date: Mon Aug 14 18:44:00 2006 +0200 ieee1394: sbp2: safer agent reset in error handlers The scsi_host_template's eh_abort_handler and eh_device_reset_handler are allowed to sleep. Use this to run sbp2_agent_reset in the more reliable mode which returns _after_ its write transaction was finished. Signed-off-by: Stefan Richter commit 09ee67abe997ee95cd3f6cc552fa9532bc722d83 Author: Stefan Richter Date: Mon Aug 14 18:43:00 2006 +0200 ieee1394: sbp2: handle "sbp2util_node_write_no_wait failed" Fix for http://bugzilla.kernel.org/show_bug.cgi?id=6948 Because sbp2 writes to the target's fetch agent's registers from within atomic context, it cannot sleep to guaranteedly get a free transaction label. This may repeatedly lead to "sbp2util_node_write_no_wait failed" and consequently to SCSI command abortion after timeout. A likely cause is that many queue_command softirqs may occur before khpsbpkt (the ieee1394 driver's thread which cleans up after finished transactions) is woken up to recycle tlabels. Sbp2 now schedules a workqueue job whenever sbp2_link_orb_command fails in sbp2util_node_write_no_wait. The job will reliably get a transaction label because it can sleep. We use the kernel-wide shared workqueue because it is unlikely that the job itself actually needs to sleep. In the improbable case that it has to sleep, it doesn't need to sleep long since the standard transaction timeout is 100ms. Signed-off-by: Stefan Richter commit 2a874182842c6a70f245b7f1ad859f9152517951 Author: Alexey Dobriyan Date: Fri Aug 11 16:46:14 2006 -0700 CONFIG_PM=n slim: drivers/ieee1394/ohci1394.c Remove some code which is unneeded if CONFIG_PM=n. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Stefan Richter commit 611aa19fd60fe57059d9972fa6ae29f7472a13cf Author: Stefan Richter Date: Wed Aug 2 18:44:00 2006 +0200 ieee1394: safer definition of empty macros A deactivated macro, defined as "#define foo(bar)", will result in silent corruption if somebody forgets a semicolon after a call to foo. Replace it by "#define foo(bar) do {} while (0)" which will reveal any respective syntax errors. Signed-off-by: Stefan Richter commit 4b60912e52bc6ccdf587f2b92f3435ee2678d730 Author: David Moore Date: Wed Aug 2 01:00:00 2006 +0200 video1394: add poll file operation support This patch adds support for the poll file operation to the video1394 driver. Signed-off-by: David Moore Signed-off-by: Stefan Richter commit a1b3206b362335f7986d1fab294c16148a8c50ab Author: Adrian Bunk Date: Sat Jul 29 19:48:28 2006 +0200 the scheduled removal of drivers/ieee1394/sbp2.c:force_inquiry_hack This patch contains the scheduled removal of the force_inquiry_hack module parameter. Signed-off-by: Adrian Bunk Signed-off-by: Stefan Richter commit 8df4083c5291b3647e0381d3c69ab2196f5dd3b7 Author: Andi Kleen Date: Thu Jul 27 21:54:00 2006 +0200 Initialize ieee1394 early when built in This makes debugging with firescope easier. Signed-off-by: Andi Kleen (original patch) Update: - no need for #ifdef MODULE - add comment in ieee1394_core, more verbose comment in ohci1394 Signed-off-by: Stefan Richter (update) commit e8398bb737ceadff8825aa98cb9f4a5e96857546 Author: Stefan Richter Date: Sun Jul 23 22:19:00 2006 +0200 ieee1394: sbp2: convert sbp2util_down_timeout to waitqueue The waitqueue API is used to replace a custom wait mechanism. Only one global waitqueue (instead of per-device waitqueues or completions) is added because there is usually just one waiter. Signed-off-by: Stefan Richter commit 6065772d54a3b994b9b5d3df6413ec6a1c8c2ec1 Author: Stefan Richter Date: Sun Jul 23 22:18:00 2006 +0200 ieee1394: sbp2: more checks of status block - Add checks for the (very unlikely) cases that the target writes too little or too much status data or writes unsolicited status. - Indicate that these and similar conditions are unlikely(). - Check the 'resp' and 'sbp_status' fields for possible failure status. - Slightly optimize access macros for the status block bitfields. - Unify a few related log messages. TODO: Check if 'src'==1, then withhold the respective ORB from reuse until status for any subsequent ORB was received. This is an old bug whose fix requires more complex command queue handling. Signed-off-by: Stefan Richter commit 3e98eab46d1a482532c653bdb0c006413654d171 Author: Stefan Richter Date: Sun Jul 23 22:16:00 2006 +0200 ieee1394: sbp2: safer initialization of status fifo Sbp2's copy of the status fifo was cleared when management ORBs or new command ORBs were prepared. The latter had potential for a race condition if the block layer's soft IRQ and the 1394 LLD's interrupt handler ran on different CPUs. It would also yield wrong status if a command was completed with non-zero completion status before other commands that had zero completion status, and no new command was enqueued in the meantime. Now, the status buffer is cleared right before it is written. Thus it ends up in the following simpler and safer access pattern: - sbp2_alloc_device: allocates and implicitly clears once, - sbp2_handle_status_write: clears, writes, and reads, - sbp2_query_logins, sbp2_login_device, sbp2_reconnect_device: read. The latter three do not race with sbp2_handle_status_write because of how the protocol works. As a tiny optimization, the first two quadlets of the status never need to be cleared. Signed-off-by: Stefan Richter commit d4018d7fa63d25f3e1ecf6949fca6b81a182231a Author: Stefan Richter Date: Sun Jul 23 22:57:00 2006 +0200 ieee1394: sbp2: optimize DMA direction of command ORBs Only the driver writes ORBs, the device just reads them. Therefore PCI_DMA_BIDIRECTIONAL can be replaced by PCI_DMA_TODEVICE which may be cheaper on some architectures. Signed-off-by: Stefan Richter commit 28212767e58402ea362edcb80b753d49bfd44d98 Author: Stefan Richter Date: Sun Jul 23 22:10:00 2006 +0200 ieee1394: sbp2: discard return value of sbp2_link_orb_command Since sbp2 is at the moment unable to do anything with the return value of sbp2_link_orb_command, just discard it. Signed-off-by: Stefan Richter commit cc078189125db84a85a3bbb82df788b84fc68aa1 Author: Stefan Richter Date: Sun Jul 23 22:12:00 2006 +0200 ieee1394: sbp2: safer last_orb and next_ORB handling The sbp2 initiator has two ways to tell a target's fetch agent about new command ORBs: - Write the ORB's address to the ORB_POINTER register. This must not be done while the fetch agent is active. - Put the ORB's address into the previously submitted ORB's next_ORB field and write to the DOORBELL register. This may be done while the fetch agent is active or suspended. It must not be done while the fetch agent is in reset state. Sbp2 has a last_orb pointer which indicates in what way a new command should be announced. That pointer is concurrently accessed at various occasions. Furthermore, initiator and target are accessing the next_ORB field of ORBs concurrently and asynchronously. This patch does: - Protect all initiator accesses to last_orb by sbp2_command_orb_lock. - Add pci_dma_sync_single_for_device before a previously submitted ORB's next_ORB field is overwritten. - Insert a memory barrier between when next_ORB_lo and next_ORB_hi are overwritten. Next_ORB_hi must not be updated before next_ORB_lo. - Remove the rather unspecific and now superfluous qualifier "volatile" from the next_ORB fields. - Add comments on how last_orb is connected with what is known about the target's fetch agent's state. Signed-off-by: Stefan Richter commit 9154df538fa044ac2b729ae5c6c47cae09e6977f Author: Stefan Richter Date: Sun Jul 23 22:01:00 2006 +0200 ieee1394: remove #include These includes in ieee1394_core and eth1394 are obsolete. Signed-off-by: Stefan Richter commit 9951903e616662e9a5dad5fbd296690e2ebbbc65 Author: Stefan Richter Date: Sun Jul 2 14:17:00 2006 +0200 ieee1394: shrink tlabel pools, remove tpool semaphores This patch reduces the size of struct hpsb_host and also removes semaphores from ieee1394_transactions.c. On i386, struct hpsb_host shrinks from 10656 bytes to 6688 bytes. This is accomplished by - using a single wait_queue for hpsb_get_tlabel instead of many instances of semaphores, - using a single lock to serialize access to all tlabel pools (the protected code regions are small, i.e. lock contention very low), - omitting the sysfs attribute tlabels_allocations. Drawback: In the rare case that a process needs to sleep because all transaction labels for the node are temporarily exhausted, it is also woken up if a tlabel for a different node became free, checks for an available tlabel, and is put to sleep again. The check is not costly and the situation occurs extremely rarely. (Tlabels are typically only exhausted if there was no context switch to the khpsbpkt thread which recycles tlables.) Therefore the benefit of reduced tpool size outweighs this drawback. The sysfs attributes tlabels_free and tlabels_mask are not compiled anymore unless CONFIG_IEEE1394_VERBOSEDEBUG is set. The by far biggest member of struct hpsb_host, the struct csr_control csr (5272 bytes on i386), is now placed at the end of struct hpsb_host. Note, hpsb_get_tlabel calls the macro wait_event_interruptible with a condition argument which has a side effect (allocation of a tlabel and manipulation of the packet). This side effect happens only if the condition is true. The patch relies on wait_event_interruptible not evaluating the condition again after it became true. Signed-off-by: Stefan Richter commit db53f28b3a6d9338cca1b7e917dc063ac99e1871 Author: Russell King Date: Wed Aug 30 15:14:56 2006 +0100 [MMC] Add multi block-write capability Add a capability flag for drivers to set when they can perform multi- block transfers to cards _and_ correctly report the number of bytes transferred should an error occur. The last point is very important - if a driver reports more bytes than were actually accepted by the card and an error occurs, there is the possibility for data loss. Pierre Ossman provided the patch for wbsd and sdhci. Signed-off-by: Pierre Ossman Signed-off-by: Russell King commit 132919ba80ad207755fe271277bfefff865a54fe Author: Russell King Date: Sun Aug 27 13:56:52 2006 +0100 [MMC] Remove data->blksz_bits member data->blksz_bits is unused now - remove it. Signed-off-by: Russell King commit 3bc87f243f64c953717bea058f4b458a57fc1a29 Author: Russell King Date: Sun Aug 27 13:51:28 2006 +0100 [MMC] Convert mmci to use data->blksz rather than data->blksz_bits Signed-off-by: Russell King commit 4263cf0fac28122c8381b6f4f9441a43cd93c81f Author: Dmitry Torokhov Date: Thu Sep 14 01:32:39 2006 -0400 Input: make input_register_handler() return error codes Signed-off-by: Dmitry Torokhov commit 68c2a1607cd6dd12427c9566b39756e92708713c Author: Dmitry Torokhov Date: Thu Sep 14 01:32:28 2006 -0400 Input: remove cruft that was needed for transition to sysfs Signed-off-by: Dmitry Torokhov commit 655816e49867082d13ece0da31d76e12cc0de4a5 Author: Dmitry Torokhov Date: Thu Sep 14 01:32:14 2006 -0400 Input: fix input module refcounting Now that input_free_device is basically an alias for input_put_device we need to acquire a reference to input module right when we allocate device because input_dev_release releases reference to input module unconditionally. Signed-off-by: Dmitry Torokhov commit 66e66118837ed95a299328437c2d9fb4b5137352 Author: Dmitry Torokhov Date: Thu Sep 14 01:31:59 2006 -0400 Input: constify input core Signed-off-by: Dmitry Torokhov commit 5206c0d5ec514733dd098cf658d71327d199c7a0 Author: Dmitry Torokhov Date: Thu Sep 14 01:31:40 2006 -0400 Input: libps2 - rearrange exports The new way is to mark function as exported right after its definition. Signed-off-by: Dmitry Torokhov commit 9807879bfdc0c2b5106b4b378f5475c6a333d853 Author: Dmitry Torokhov Date: Thu Sep 14 01:31:27 2006 -0400 Input: atkbd - support Microsoft Natural Elite Pro keyboards Microsoft Natural Elite Pro keyboard produces unisual response to the GET ID command - single byte 0xaa (normally keyboards produce 2-byte response). Fail GET ID command so atkbd gets a change to do alternate probe. Signed-off-by: Dmitry Torokhov commit a91eaa16df5cd6c552e3a4a6e40e60ffbd9be951 Author: Dmitry Torokhov Date: Thu Sep 14 01:31:06 2006 -0400 Input: i8042 - disable MUX mode on Toshiba Equium A110 When keyboard controller is in active multiplexing mode ALPS touchpad may get detected twice. Since the box does not have external PS/2 ports simply disabling MUX mode is safe solution. Signed-off-by: Dmitry Torokhov commit 7dcd86e14319f4ceab883787ab2e00a5f860d14d Author: Kim Phillips Date: Wed Sep 13 17:41:55 2006 -0500 [POWERPC] Fix MPC8349EMDS dts PCI interrupt-map values for IDSEL 0x18 Fix MPC8349EMDS dts PCI interrupt-map values for IDSEL 0x18 per Tanya's catch. Signed-off-by: Kim Phillips Signed-off-by: Tanya Jiang Signed-off-by: Paul Mackerras commit f04da0bc36566ad17cf21e4ac8dbae377ca1dc75 Author: Olof Johansson Date: Wed Sep 13 13:32:39 2006 -0500 [POWERPC] Fix non-smp build This fixes a compile error that only surfaces on CONFIG_SMP=n builds; seems to get pulled in through another header file for SMP builds. This problem was introduced by the hvcall stats patch. Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras commit c233289c29369dba7177ca873e9b8ed457af2a78 Author: Jeff Garzik Date: Wed Sep 13 14:33:12 2006 -0400 drivers/net/phy/fixed: #if 0 some incomplete code Signed-off-by: Jeff Garzik commit 7282d491ecaee9883233a0e27283c4c79486279a Author: Jeff Garzik Date: Wed Sep 13 14:30:00 2006 -0400 drivers/net: const-ify ethtool_ops declarations Signed-off-by: Jeff Garzik commit 76fd85937097a0c2ec8ab23bf21dc10992d1c398 Author: Stephen Hemminger Date: Fri Sep 8 11:16:13 2006 -0700 [PATCH] ethtool: allow const ethtool_ops The ethtool_ops structure is immutable, it expected to be setup by the driver and is never changed. This patch allows drivers to declare there ethtool_ops structure read-only. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit f65b138ca94326bbffe06ddc28e65606a249e58e Author: Stephen Hemminger Date: Wed Sep 6 12:45:02 2006 -0700 [PATCH] sky2: big endian Fix support for big endian platforms like PPC. Still not sure about VLAN acceleration (does it need swapping)? Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit b89165f2b75ba0a79eb5ed60924835cf3c54c51a Author: Stephen Hemminger Date: Wed Sep 6 12:44:53 2006 -0700 [PATCH] sky2: fiber support Fix the support for fiber connected gigabit boards. Allow half duplex gigabit to be configured. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 2eaba1a280b6380f5b1238c53ce62e4381fc5f97 Author: Stephen Hemminger Date: Wed Sep 6 12:44:47 2006 -0700 [PATCH] sky2: tx pause bug fix Fix problems with transmit pause frames. The driver was telling the GMAC to flush (not process) pause frames. Manually disabling pause wasn't working because of problems in the setup. This maybe the cause of the lockup under load. http://bugzilla.kernel.org/show_bug.cgi?id=6839 Patch against netdev-2.6 git tree Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 6aa20a2235535605db6d6d2bd850298b2fe7f31e Author: Jeff Garzik Date: Wed Sep 13 13:24:59 2006 -0400 drivers/net: Trim trailing whitespace Signed-off-by: Jeff Garzik commit 7a291083225af6e22ffaa46b3d91cfc1a1ccaab4 Author: Jan-Bernd Themann Date: Wed Sep 13 17:44:31 2006 +0200 [PATCH] ehea: IBM eHEA Ethernet Device Driver Hi Jeff, I fixed the __iomem issue and tested the driver with sparse. Looks good so far. Thanks for your effort. Jan-Bernd Themann Signed-off-by: Jan-Bernd Themann drivers/net/Kconfig | 9 drivers/net/Makefile | 1 drivers/net/ehea/Makefile | 6 drivers/net/ehea/ehea.h | 447 ++++++ drivers/net/ehea/ehea_ethtool.c | 294 ++++ drivers/net/ehea/ehea_hcall.h | 51 drivers/net/ehea/ehea_hw.h | 287 ++++ drivers/net/ehea/ehea_main.c | 2654 ++++++++++++++++++++++++++++++++++++++++ drivers/net/ehea/ehea_phyp.c | 705 ++++++++++ drivers/net/ehea/ehea_phyp.h | 455 ++++++ drivers/net/ehea/ehea_qmr.c | 582 ++++++++ drivers/net/ehea/ehea_qmr.h | 358 +++++ 12 files changed, 5849 insertions(+) Signed-off-by: Jeff Garzik commit 7de745e56244156233e5cdd62b462e52e638d408 Author: Don Fry Date: Wed Sep 13 10:16:53 2006 -0700 [PATCH] pcnet32: NAPI implementation Implement NAPI changes to pcnet32 driver. Compile default is off. Listed as experimental. Len and Don both worked on a NAPI implementation and have both tested these changes. An e1000 blasting short packets to the pcnet32 will lockup Don's system until the receive storm stops. Without NAPI Len's system watchdog would expire causing the system to reboot. With NAPI the system will stay operational. Tested ia32 and ppc64. Tested '970A, '971, '972, '973, '975, '976, and '978. The Kconfig changes came from Len. Don is to blame for all the others. Signed-off-by: Len Sorensen Signed-off-by: Don Fry Signed-off-by: Jeff Garzik commit 3904c324148930bad5d9b97fdf66c63e7682b546 Author: Don Fry Date: Wed Sep 13 10:16:38 2006 -0700 [PATCH] pcnet32: break receive routine into two pieces. Breaking the receive frame processing into two routines for greater clarity. Tested ia32 and ppc64. Signed-off-by: Don Fry Signed-off-by: Jeff Garzik commit 9691edd26cfae0484367a6b8e3d46f3a5179e663 Author: Don Fry Date: Wed Sep 13 10:16:21 2006 -0700 [PATCH] pcnet32: move/create receive and transmit routines Move the receive routine and create the transmit routine. Tested ia32 and ppc64. Signed-off-by: Don Fry Signed-off-by: Jeff Garzik commit b368a3fbe41c44e4c7eb628002bbd8891defa7e0 Author: Don Fry Date: Wed Sep 13 10:16:07 2006 -0700 [PATCH] pcnet32: magic number cleanup Change some magic numbers to clearer names. A few whitespace changes. Tested ia32 and ppc64. Signed-off-by: Don Fry Signed-off-by: Jeff Garzik commit 5c99346a3358a9c3c3fcf38669c05ac5f06832c9 Author: Don Fry Date: Wed Sep 13 10:15:43 2006 -0700 [PATCH] pcnet32: remove unnecessary save/restore register accesses. Delete unnecessary save/restore of rap in interrupt handler and statistics. tested ia32 and ppc64. Signed-off-by: Don Fry Signed-off-by: Jeff Garzik commit 3dd836a56de0d4f049438412959b905e1db4666e Author: David Howells Date: Tue Sep 12 16:04:25 2006 +0100 [POWERPC] Export copy_4K_page() Export copy_4K_page() for use by modules via copy_page() (such as CacheFiles). Signed-Off-By: David Howells Signed-off-by: Paul Mackerras commit 26c8af5f01dfb91f709cc2ba07fb650949aae13e Author: Olaf Hering Date: Fri Sep 8 16:29:21 2006 +0200 [POWERPC] print backtrace when entering xmon xmon does not print a backtrace per default. This is bad on systems with USB keyboard, the most needed info about the crash is lost. print a backtrace during the very first xmon entry. Booting with xmon=nobt disables the autobacktrace functionality. Signed-off-by: Olaf Hering Signed-off-by: Paul Mackerras commit 87fd7724d4022913ae8dbee3ed55cd04f2c316a6 Author: Olof Johansson Date: Thu Sep 7 15:18:08 2006 -0500 [POWERPC] Quiet hvc_console console output on failed opens No other tty driver will print on the console when the open of it fails. On systems that happen to be configured for both ttyS0 and hvc0 console, this will keep flooding the console output. This is most likely to happen with systems booted between with and without hypervisor from the same filesystem. Let's just remove it. When it's really needed (i.e. when the open fails and someone is trying to debug it), noone will see the output anyway. And init will report the opens failing in due time through the syslog. Signed-off-by: Olof Johansson Acked-by: Ryan S. Arnold Signed-off-by: Paul Mackerras commit 06e6d290ac7a9fb6fcec3a2207988163709f06aa Author: Josh Boyer Date: Thu Sep 7 08:25:40 2006 -0500 [POWERPC] PPC: Fix Kconfig whitespace warnings Fix the following whitespace warnings when compiling with ARCH=ppc arch/ppc/Kconfig:1207:warning: leading whitespace ignored arch/ppc/Kconfig:1226:warning: leading whitespace ignored arch/ppc/Kconfig:1231:warning: leading whitespace ignored Also fix a typo ("Supprt"). Signed-off-by: Josh Boyer Signed-off-by: Paul Mackerras commit 57852a853b0d6761f270be0961d5d8387e98c8bb Author: Mike Kravetz Date: Wed Sep 6 16:23:12 2006 -0700 [POWERPC] powerpc: Instrument Hypervisor Calls Add instrumentation for hypervisor calls on pseries. Call statistics include number of calls, wall time and cpu cycles (if available) and are made available via debugfs. Instrumentation code is behind the HCALL_STATS config option and has no impact if not enabled. Signed-off-by: Mike Kravetz Signed-off-by: Paul Mackerras commit ab06ff3af34a6288b314862abfebd86ad918c5d9 Author: Olof Johansson Date: Wed Sep 6 14:44:54 2006 -0500 [POWERPC] powerpc: PA Semi PWRficient MAINTAINER entry Maintainer entry for PWRficient Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras commit 1e76875e51266a5c43f601ecf08a92be5769228c Author: Olof Johansson Date: Wed Sep 6 14:42:08 2006 -0500 [POWERPC] powerpc: PA Semi PWRficient platform support Base patch for PA6T and PA6T-1682M. This introduces the arch/powerpc/platform/pasemi directory, together with basic implementations for various setup. Much of this was based on other platform code, i.e. Maple, etc. Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras commit b3ebd1d862d6c23caa58e40d341eefc426f835e1 Author: Olof Johansson Date: Wed Sep 6 14:35:57 2006 -0500 [POWERPC] powerpc: PA6T cputable entry, PVR value Introduce PWRficient PA6T cputable entries and feature bits. Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras commit 0024300000769eadcb4a4fcdff531d45ee7735d4 Author: Olof Johansson Date: Wed Sep 6 14:35:19 2006 -0500 [POWERPC] powerpc: Divorce CPU_FTR_CTRL from CPU_FTR_PPCAS_ARCH_V2_BASE The performance monitor implementation (including CTRL register behaviour) is just included in PPC v2 as an example, it's not truly part of the base. It's actually a somewhat misleading feature, but I'll leave that be for now: The presence of the register is not what the feature bit is used for, but instead it's used to determine if it contains the runlatch bit for idle reporting of the performance monitor. For alternative implementations, the register might still exist but the bit might have different meaning (or no meaning at all). For now, split it off and don't include it in CPU_FTR_PPCAS_ARCH_V2_BASE. Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras commit 5a2fe38d2844ba2f2dd8f4946d795e09d8f7e095 Author: Olof Johansson Date: Wed Sep 6 14:34:41 2006 -0500 [POWERPC] powerpc: Reduce default cacheline size to 64 bytes Reduce default cacheline size on 64-bit powerpc from 128 bytes to 64. This is the architected minimum. In most cases we'll still end up using cache line information from the device tree, but defaults are used during early boot and doing a few dcbst/icbi's too many there won't do any harm. Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras commit b7e89214aadf82fa5eaff28f50f2078fa6ae773c Author: Josh Boyer Date: Thu Sep 7 13:27:58 2006 -0500 [POWERPC] PPC 4xx: Enable XMON on PPC 4xx boards The following patch allows XMON to run on the 4xx platform. Tested on Walnut, Ebony, and Nova (440GX based) eval boards. 440EP, 440SP, and 440SPE boards should work as well. Patch is against 2.6.18-rc6. Signed-off-by: Josh Boyer Signed-off-by: Paul Mackerras commit 477bcae4c289a60f2303fbd4a3a875dcca647cf8 Author: Corey Minyard Date: Wed Sep 6 09:02:53 2006 -0500 [POWERPC] Make function of pm_power_off consistent with x86 Allow the pm_power_off function variable in PPC to work as an override. This makes the function consistent with the other architectures and it allows generic poweroff operations (like those provided in IPMI systems) to work properly on PPC. Signed-off-by: Corey Minyard Cc: Joseph Barnett Signed-off-by: Paul Mackerras commit c3412dcb75ff4d64b44bedc72761d5707d19edf7 Author: Will Schmidt Date: Wed Aug 30 13:11:38 2006 -0500 [POWERPC] Emulate power5 popcntb instruction In an attempt to make it easier for a power5 optimized app to run on a power4 or a 970 or random earlier machine, this provides emulation of the popcntb instruction. Signed-off-by: Will Schmidt Signed-off-by: Paul Mackerras commit f50d4cfc98d70f919afb2924b1b53c36b2f4e62f Author: Michael Ellerman Date: Thu Aug 24 16:54:08 2006 +1000 [POWERPC] Split out vpa unregister logic from pseries_kexec_cpu_down_xics() As part of the new irq code pseries_kexec_cpu_down() was split into a xics and mpic version. The vpa unregister logic is now only done in the xics routine, and although that's ok in practice (we don't have SPLPAR machines with mpic), I'd rather have the two concepts stay separate. So move the vpa unregister into pseries_kexec_cpu_down(), which gets called by both the xics and mpic routines. This also gives us an obvious place to put any new kexec-down logic needed in future. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras commit b0fea350ce515c6ae01e0f259d9b1ffdec824e22 Author: Jeff Garzik Date: Wed Sep 13 00:25:23 2006 -0400 [libata] ata_piix: build fix Spotted by Andrew Morton. Signed-off-by: Jeff Garzik commit d3148ce9a65813a8020473739c200cb63036f84c Author: Auke-Jan H Kok Date: Tue Sep 12 10:46:15 2006 -0700 [PATCH] e1000: revert 'e1000: Remove 0x1000 as supported device' The commit 'e1000: Remove 0x1000 as supported device' (Jeff Kirsher, 673a052fde79ab5e9dce569b0336358812ddba2d) Removes PIC device ID 8086:1000 from the list of supported devices. A fix was submitted for the original issue (commit 6a9516989f94df10d9a27ba543c6b53b3e69c84a). This commit reverts commit 673a052fde79ab5e9dce569b0336358812ddba2d and re-enables 82542rev3 chips completely. Signed-off-by: Auke Kok Signed-off-by: Jeff Garzik commit 65396410af63db90d6428c678ff84aa652c3c1ec Author: Henrik Kretzschmar Date: Tue Sep 12 23:49:33 2006 +0200 [SCSI] wd33c93: Scsi_Cmnd convertion Changes obsolete typedef'd Scsi_Cmnd to struct scsi_cmnd. Signed-off-by: Henrik Kretzschmar Signed-off-by: James Bottomley commit 48907e39890590792c58272604cfb34ad1d80054 Author: Francois Romieu Date: Sun Sep 10 23:33:44 2006 +0200 8139cp: ring_info removal for the transmit path As long as the descriptor fits on a single cacheline, the change should be almost free. Now ring_info is not used at all. Remove it. Signed-off-by: Francois Romieu commit 76ff3c6e3b389a5a7692811dd456e0ff58340cac Author: Alan Cox Date: Tue Sep 12 17:14:03 2006 +0100 [PATCH] pata_amd: Check enable bits on Nvidia A couple of people reported long delays on probe with the newer kernels and Nvidia PATA. This turned out to be because the Nvidia path forgot to check the enable bits so probed empty ports. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit af323a2fb508b0fa1c1fa91cbc6ec86fb0879c07 Author: Alan Cox Date: Tue Sep 12 17:15:12 2006 +0100 [PATCH] Update SiS PATA New chipset identifiers Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit d5b20697ca37d80cc4ec2ba3c5ddf1339dc1d49a Author: Andy Gospodarek Date: Mon Sep 11 17:39:18 2006 -0400 [PATCH] Remove more unnecessary driver printk's As I promised last week, here is the first pass at removing all unnecessary printk's that exist in network device drivers currently in promiscuous mode. The duplicate messages are not needed so they have been removed. Some of these drivers are quite old and might not need an update, but I did them all anyway. I am currently auditing the remaining conditional printk's and will send out a patch for those soon. Signed-off-by: Andy Gospodarek Signed-off-by: Jeff Garzik commit a506b44bb5000b2652490a906c3e58beb2a8f6bb Author: Daniel Walker Date: Sat Sep 9 09:31:03 2006 -0700 [SCSI] fix compile error on module_refcount LD .tmp_vmlinux1 drivers/built-in.o(.text+0x8e1f9): In function `scsi_device_put': drivers/scsi/scsi.c:887: undefined reference to `module_refcount' make: *** [.tmp_vmlinux1] Error 1 There are only two users of module_refcount() outside of kernel/module.c and the other one uses ifdef's similar to this. Signed-Off-By: Daniel Walker Signed-off-by: James Bottomley commit 884d3a2bad7293e56fe99d9322a1090bfdfd7c4e Author: Christian Steineck Date: Fri Sep 8 23:51:34 2006 +0200 [PATCH] hostap_cs: added support for Proxim Harmony PCI W-Lan card hostap_cs driver - added support for Proxim Harmony PCI W-Lan Card (uses pd6729 based pcmcia2pci bridge) Signed-off-by: Christian Steineck Signed-off-by: John W. Linville commit dca762d63a6fd62599f0d5d18525fa347fa1772a Author: Larry Finger Date: Thu Sep 7 11:17:05 2006 -0500 [PATCH] bcm43xx: remove dead code in bcm43xx_sysfs.c Coverity CID 1160 & 1161 Remove some dead code from bcm43xx_sysfs.c in 2.6.18-rc6 Signed-off-by: Darren Jenkins Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit 87d263271b1bbf344c596ac308417ff692ddc851 Author: Larry Finger Date: Thu Sep 7 10:12:11 2006 -0500 [PATCH] bcm43xx: ucode debug status via sysfs This patch prints out the ucode debug status to sysfs. So, users can watch the microcode status of their hardware. Signed-off-by: Martin Langer Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit 1ef4583ee3e1efab83d05b6ccdad378c9caaa95f Author: Larry Finger Date: Mon Sep 4 17:13:57 2006 -0500 [PATCH] bcm43xx: Add firmware version printout This patch prints microcode revision, patchlevel, date and time to KERN_INFO. Also, version 4.xx microcodes (rev>0x128) will be rejected by the driver, because they still do not work. Signed-off-by: Martin Langer Acked-by: Michael Buesch Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit 6807b5076373b8a6b6dac3b3b54645c85df91ad6 Author: Larry Finger Date: Sun Sep 3 23:38:56 2006 -0500 [PATCH] bcm43xx: remove dead statistics code This patch removes code that was make obsolete when the wireless statistics in bcm43xx-softmac were changed, but was overlooked at that time. The value of bcm->stats.link_quality computed here is never used. Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit bd6dd756522f3874b0efe576f9c25f5dee239646 Author: Jean Tourrilhes Date: Tue Aug 29 18:19:23 2006 -0700 [PATCH] Prism54 : add bitrates to scan result This patch adds bitrate information to the scan result in the Prism54 driver, like some/most other driver do. Signed-off-by: Jean Tourrilhes Signed-off-by: John W. Linville commit 4e1bbd846d00a245dcf78b6b331d8a9afed8e6d7 Author: Ulrich Kunitz Date: Tue Aug 29 23:51:43 2006 +0100 [PATCH] zd1211rw: Removed unneeded packed attributes Inspired by an e-mail by Stephen Hemminger I decided to remove all unneeded packed attributes from the code where the member variables are already aligned. This avoids horrible code being generated on some architectures. Signed-off-by: Ulrich Kunitz Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit fc3e39bef9ef5eb594ab2a35206b9b049c36320a Author: Daniel Drake Date: Tue Aug 29 23:49:53 2006 +0100 [PATCH] zd1211rw: Add ID for Asus WL-159g Tested by Vincent TOUCHARD zd1211 chip 0b05:170c v4802 high 00-11-d8 AL2230_RF pa0 g--- Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit fca2714f27376caa04c3127c802a553b295eaa32 Author: Daniel Drake Date: Tue Aug 29 23:49:32 2006 +0100 [PATCH] zd1211rw: Add ID for Siemens Gigaset USB Stick 54 Tested by Martin Dummer. zd1211 chip 0b3b:5630 v4330 high 00-01-e3 RF2959_RF pa0 --- Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 6aeb3dddb7c6697c083582a0757078e163758971 Author: Larry Finger Date: Mon Sep 11 16:46:26 2006 -0400 [PATCH] bcm43xx: Correct out of sequence initialization step This patch fixes an out of sequence step in the bcm43xx_init_board routine for bcm43xx-softmac. Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit 7d4b0394bbf5e306ff9d5753163a07187131bfd8 Author: Larry Finger Date: Mon Aug 21 09:43:44 2006 -0500 [PATCH] bcm43xx-softmac: Init, shutdown and restart fixes This fixes various bugs in the init and shutdown code that would lead to lockups and crashes. Signed-Off-By: Larry Finger Signed-off-by: John W. Linville commit b39fe41f481d20c201012e4483e76c203802dda7 Author: Francois Romieu Date: Mon Sep 11 20:10:58 2006 +0200 r8169: quirk for the 8110sb on arm platform Inverting the write ordering of the TxDescAddr{High/Low} registers suffices to trigger a sabbat of PCI errors which make the device completely dysfunctional. The issue has not been reported on a different platform. Switching from MMIO accesses to I/O ones as done in Realtek's own driver fixes (papers over ?) the bug as well but I am not thrilled to see everyone pay the I/O price for an obscure bug. This is the minimal change to handle the issue. Signed-off-by: Francois Romieu Reported-by: Lennert Buytenhek commit 0486a8c83b0f83c52c4d93accd841e08ccdf04dc Author: Stephen Hemminger Date: Wed Sep 6 11:06:10 2006 -0700 [PATCH] skge: check for PCI hotplug during IRQ Check if IRQ came from hardware fault (hotplug). Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 2a2fc64481ed48ef0952d03979b053d1e6ba89dc Author: Andy Gospodarek Date: Fri Sep 8 08:41:48 2006 -0400 [PATCH] cleanup unnecessary forcedeth printk This removes unnecessary messages that show up every time I put my ethernet card in promiscuous mode. I'm already getting notification from the networking layer, I don't need notification from the driver as well. There are probably other drivers that do this as well -- I'll look around and see what I can find. Signed-off-by: Andy Gospodarek Signed-off-by: Jeff Garzik commit 9f486ae1d9ea700a952b77a8881de05ebc1610c3 Author: Valerie Henson Date: Fri Sep 8 11:15:41 2006 -0700 [PATCH] Handle pci_enable_device() errors in resume Signed-off-by: Valerie Henson Cc: Jeff Garzik Signed-off-by: Jeff Garzik commit 42eab56776b7c9686ee39f8f677a3e3b09caa170 Author: Grant Grundler Date: Fri Sep 8 11:15:40 2006 -0700 [PATCH] Use tulip.h in winbond-840.c Include "tulip.h" in winbond-840.c and clean up lots of redundant definitions. Signed-off-by: Grant Grundler Signed-off-by: Kyle McMartin Signed-off-by: Valerie Henson Signed-off-by: Jeff Garzik commit 7f2b12482c86d69ed1804d239a52ea846ef294f2 Author: Grant Grundler Date: Fri Sep 8 11:15:39 2006 -0700 [PATCH] Clean up tulip.h Update/cleanup some definitions in tulip.h and tulip_core.c. Signed-off-by: Grant Grundler Signed-off-by: Kyle McMartin Signed-off-by: Valerie Henson Signed-off-by: Jeff Garzik commit 0bb3cf726b37c13abce9f9134a68b94aa10e8803 Author: Francois Romieu Date: Fri Sep 8 11:15:38 2006 -0700 [PATCH] Defer tulip_select_media() to process context Move tulip_select_media() processing to a workqueue, instead of delaying in interrupt context, edited by Kyle McMartin to use kevent thread, instead of creating its own workqueue. Signed-off-by: Kyle McMartin Signed-off-by: Valerie Henson Signed-off-by: Jeff Garzik commit 40c0d87948ab635e814f45664259d4cc193651a1 Author: Grant Grundler Date: Fri Sep 8 11:15:37 2006 -0700 [PATCH] Flush MMIO writes in reset sequence The obvious safe registers to read is one from PCI config space. Signed-off-by: Grant Grundler Signed-off-by: Kyle McMartin Signed-off-by: Valerie Henson Signed-off-by: Jeff Garzik commit b892de0bd79d534ff4dcbae7aa2ad5b63e23e9fd Author: Thibaut Varene Date: Fri Sep 8 11:15:36 2006 -0700 [PATCH] Make DS21143 printout match lspci output Signed-off-by: Thibaut Varene Signed-off-by: Kyle McMartin Signed-off-by: Valerie Henson Signed-off-by: Jeff Garzik commit c69f412219855c9525c96052a65b60814531977c Author: Grant Grundler Date: Fri Sep 8 11:15:35 2006 -0700 [PATCH] Print physical address in tulip_init_one As the cookie returned by pci_iomap() is fairly useless... [Compile warning on pci_resource_start() format fixed up by Valerie Henson.] Signed-off-by: Grant Grundler Signed-off-by: Kyle McMartin Signed-off-by: Valerie Henson Signed-off-by: Jeff Garzik commit 6b92801b43441f1f0280c332b966b75c74222060 Author: Valerie Henson Date: Fri Sep 8 11:15:34 2006 -0700 [PATCH] Change tulip maintainer Signed-off-by: Valerie Henson Signed-off-by: Jeff Garzik MAINTAINERS | 4 ++-- drivers/net/tulip/21142.c | 2 +- drivers/net/tulip/eeprom.c | 2 +- drivers/net/tulip/interrupt.c | 2 +- drivers/net/tulip/media.c | 2 +- drivers/net/tulip/pnic.c | 2 +- drivers/net/tulip/pnic2.c | 2 +- drivers/net/tulip/timer.c | 2 +- drivers/net/tulip/tulip_core.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) commit de9ce703c6b807b1dfef5942df4f2fadd0fdb67a Author: Dmitry Torokhov Date: Sun Sep 10 21:57:21 2006 -0400 Input: i8042 - get rid of polling timer Remove polling timer that was used to detect keybord/mice hotplug and register both IRQs right away instead of waiting for a driver to attach to a port. Signed-off-by: Dmitry Torokhov commit 6d2750c167d47a97936cf4415165205f945c08f8 Author: Dmitry Torokhov Date: Sun Sep 10 21:56:06 2006 -0400 Input: send key up events at disconnect Emit key up events for all pressed keys/buttons when disconnecting an input device. Cures "stuck" enter key effect when unloading keyboard module. Signed-off-by: Dmitry Torokhov commit e38de678f6b19be3e46a678ec4deeaa7fa0fc140 Author: Helge Deller Date: Sun Sep 10 21:54:39 2006 -0400 Input: constify psmouse driver Signed-off-by: Helge Deller Signed-off-by: Dmitry Torokhov commit edf03fb0575cbee2595a63374b17dc0921f2094a Author: Dave Jones Date: Sun Sep 10 21:12:20 2006 -0400 [AGPGART] Rework AGPv3 modesetting fallback. Sometimes the logic to handle AGPx8->AGPx4 fallback failed, as can be seen in https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=197346 The failures occured if the bridge was in AGPx8 mode, but the user hadn't specified a mode in their X config. We weren't setting the mode to the highest mode capable by the video card+bridge (as we do in the AGPv2 case), which was leading to all kinds of mayhem including us believing that after falling back from AGPx8, that we couldn't do x4 mode (which is disastrous in AGPv3, as those are the only two modes possible). Signed-off-by: Dave Jones commit 08da3f413f6aa3eb48cfc5331c68e57393167fe5 Author: Dave Jones Date: Sun Sep 10 21:09:26 2006 -0400 [AGPGART] Add suspend callback for i965 Signed-off-by: Dave Jones commit 2b7cbe20174695bca1afe2a8f755e1eb299f4768 Author: James Bottomley Date: Thu Sep 7 15:14:46 2006 -0500 [SCSI] fix up SCSI netlink build CONFIG_SCSI_NETLINK can become a bool since the item its selecting (CONFIG_NET) cannot be a module. Signed-off-by: James Bottomley commit a01e70e570a72b8a8c9a58062e4f5bdcd3986222 Author: James Bottomley Date: Wed Sep 6 19:28:07 2006 -0500 [SCSI] aci94xx: implement link rate setting This patch implements the ability to set the minimum and maximum linkrates for both libsas (for expanders) and aic94xx (for the host phys). It also tidies up the setting of the hardware min and max to make sure they're updated when the expander emits a change broadcast. Signed-off-by: James Bottomley commit d24e1eeb3a16e4944288c2f3bf082e1513f4b425 Author: James Bottomley Date: Wed Sep 6 19:25:22 2006 -0500 [SCSI] scsi_transport_sas: make minimum and maximum linkrate settable quantities According to SPEC, the minimum_linkrate and maximum_linkrate should be settable by the user. This patch introduces a callback that allows the sas class to pass these settings on to the driver. Signed-off-by: James Bottomley commit 88edf74610bd894b93438f389688bc8b4a2d3414 Author: James Bottomley Date: Wed Sep 6 17:36:13 2006 -0500 [SCSI] SAS: consolidate linkspeed definitions At the moment we have two separate linkspeed enumerations covering roughly the same values. This patch consolidates on a single one enum sas_linkspeed in scsi_transport_sas.h and uses it everywhere in the aic94xx driver. Eventually I'll get around to removing the duplicated fields in asd_sas_phy and sas_phy ... Signed-off-by: James Bottomley commit b4620233d6a3510564c561a5a2a365a1d8a34b68 Author: Henrik Kretzschmar Date: Wed Sep 6 10:49:48 2006 +0200 [SCSI] scsi-driver ultrastore replace Scsi_Cmnd with struct scsi_cmnd Signed-off-by: Henrik Kretzschmar Signed-off-by: James Bottomley commit f479ab87936563a286b8aa0e39003c40fa31c6da Author: James Bottomley Date: Wed Sep 6 09:00:29 2006 -0500 [SCSI] fix up non-modular SCSI The recent change to the way scsi_device_get()/put() work broke the non modular build (we do a module_refcount on a NULL). Fix this by checking for non-null before checking module_refcount(). Signed-off-by: James Bottomley commit 884d25cc4fda20908fd4ef93dbb41d817984b68b Author: James Bottomley Date: Tue Sep 5 16:26:41 2006 -0500 [SCSI] Fix refcount breakage with 'echo "1" > scan' when target already present Spotted by: Dan Aloni The problem is there's inconsistent locking semantic usage of scsi_alloc_target(). Two callers assume the target comes back with reference unincremented and the third assumes its incremented. Fix by always making the reference incremented on return. Also fix path in target alloc that could consistently increment the parent lock. Finally document scsi_alloc_target() so its callers know what the expectations are. Signed-off-by: James Bottomley commit cff93eb3d3244cc117a5204fe1d62102b506afb9 Author: Adrian Bunk Date: Mon Sep 4 13:41:14 2006 +0200 [PATCH] make drivers/net/e1000/e1000_hw.c:e1000_phy_igp_get_info() static This patch makes the needlessly global e1000_phy_igp_get_info() static. Signed-off-by: Adrian Bunk Signed-off-by: Jeff Garzik commit c14635eb4e591c61e419c065df1fdacf9ff90c00 Author: Dave Jones Date: Wed Sep 6 11:59:35 2006 -0400 [AGPGART] Fix number of aperture sizes in 830 gart structs. Spotted by Eric Anholt. Signed-off-by: Dave Jones commit 65c25aadfa4e917060e99fe459f33a6a07db53cc Author: Eric Anholt Date: Wed Sep 6 11:57:18 2006 -0400 [AGPGART] Intel 965 Express support. From: Alan Hourihane From: Eric Anholt Signed-off-by: Dave Jones commit f6aa1693671fa9ea661fd30f003820d129fe0628 Author: Stephen Hemminger Date: Fri Sep 1 15:53:50 2006 -0700 [PATCH] skge: version 1.8 Because of the NAPI and other SMP fixes, let's call this a version. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 513f533e3f161c5a59555677d35e8ae28037bd89 Author: Stephen Hemminger Date: Fri Sep 1 15:53:49 2006 -0700 [PATCH] skge: use NAPI for transmit complete The skge driver has much better performance if transmit done is handled in NAPI softirq. Change from doing transmit locking in driver (LLTX) and use device lock. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 29365c900963d4986b74a0dadea46872bf283d76 Author: Stephen Hemminger Date: Fri Sep 1 15:53:48 2006 -0700 [PATCH] skge: irq lock race The driver needs to access the IRQ status inside of lock to avoid races with other places changing IRQ mask etc. This may be related to some of the SMP bugs reported against skge in kernel bugzilla. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit c54f9765daafe8493dba837b3d70e97432cd876a Author: Stephen Hemminger Date: Fri Sep 1 15:53:47 2006 -0700 [PATCH] skge: use netdev_alloc_skb Change to use new netdev_alloc_skb interface for 2.6.18. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 2f4a66ad49097f0b0207a141aa2115ed352fbf58 Author: Stephen Hemminger Date: Fri Sep 1 14:52:04 2006 -0700 [PATCH] sky2: more pci device id's Some more Marvell device id's, these are from the latest SysKonnect vendor driver version of sk98lin (8.36). Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit ce7f93680aa1d37171c654536ae0ce9745d86a24 Author: Brice Goglin Date: Thu Aug 31 01:32:59 2006 -0400 [PATCH] myri10ge: improve firmware selection Improve the firmware selection by adding 2 cases where we should use the optimized firmware: * when the actual PCIe link width is lower than 8x. * when the board is plugged to one of the new Intel PCIe chipsets that are known to provide aligned PCIe completions. The patch actually raises two concerns: * We might want to add a generic PCI function to get the PCIe link width since some other drivers (at least ipath) do the same. But we probably do not want to add a new function for every PCIe capability. I will probably look at it and discuss it on linux-pci in the future. * As requested during the submission, the PCI ids of chipsets that are known to provided aligned completion are defined in the myri10ge code. If we keep adding new ones, it might become better to move them to pciids.h. But, this sort of quirk to detect these chipsets are very specific to our NIC, I don't think it is worth moving it to the PCI core until somebody else really needs it. Signed-off-by: Brice Goglin Signed-off-by: Jeff Garzik commit f2ad2d9b65963322186a8af2bd2965c734a7badb Author: Ayaz Abdulla Date: Thu Aug 24 17:35:41 2006 -0400 [PATCH] forcedeth: decouple vlan and rx checksum dependency This patch decouples the dependency between the rx checksum feature and vlan feature. This is done by ignoring the checksum information if the user has disabled rx checksum when vlan is enabled. Signed-Off-By: Ayaz Abdulla Signed-off-by: Jeff Garzik commit edf7e5ec99c2e24cea3951f7961958fc7edbfdd1 Author: Ayaz Abdulla Date: Thu Aug 24 15:43:42 2006 -0400 [PATCH] forcedeth: errata for marvell phys This patch addresses an errata found on certain marvell phys concerning the reset of the BMCR phy register during phy reset. Signed-Off-By: Ayaz Abdulla Signed-off-by: Jeff Garzik commit 406176ee7ef81cec3f346ecd41286a67148e3b0c Author: Jeff Garzik Date: Wed Sep 6 10:48:19 2006 -0400 [libata] Add pata_jmicron driver to Kconfig, Makefile Someone on LKML noticed it was missing (sorry, missed the name). Signed-off-by: Jeff Garzik commit 8adcc0c674004c0f9467031a93dc639c2b01411f Author: Venkatesh Pallipadi Date: Fri Sep 1 14:02:24 2006 -0700 [CPUFREQ] Workaround for BIOS bug in software coordination of frequency Some buggy BIOSes do a "software any" kind of coordination without telling about it to OS. So, when OS sets frequency on one CPU on these platforms, it will also impact all the other logical CPUs that are in the same power domain. Attached patch is a workaround for those buggy BIOSes. Patch should be a noop on the normal non-buggy platforms. Applies over previously sent acpi-cpufreq and software coordination bug fix patch Signed-off-by: Denis Sadykov Signed-off-by: Venkatesh Pallipadi Signed-off-by: Alexey Starikovskiy Signed-off-by: Dave Jones commit db44aaf3a2f599163c53ce96658aca688b3466f0 Author: Rafa³ Bilski Date: Wed Aug 16 01:07:33 2006 +0200 [CPUFREQ] Longhaul - Add voltage scaling to driver Rename option "dont_scale_voltage" to "scale_voltage" because don't will be default. Use "pos" for calculating voltage. In this way driver don't need to know mV value or low level value. Simply min U is one pos and max U is second pos. All pos between these two are used. Assume that min U is for min f and max U for max f. For frequency between min and max calculate pos based on difference between current frequency and min f. Values in mobile VRM table changed to values from C3-M datasheet. Signed-off-by: Rafa³ Bilski Signed-off-by: Dave Jones commit 8eb7925f93af75e66a240d148efdec212f95bcb7 Author: Alexey Dobriyan Date: Sun Aug 20 18:48:13 2006 +0400 [AGPGART] agp.h: constify struct agp_bridge_data::version drivers/char/agp/backend.c: In function `agp_backend_initialize': drivers/char/agp/backend.c:141: warning: assignment discards qualifiers from pointer target type Signed-off-by: Alexey Dobriyan Signed-off-by: Dave Jones commit 3906f4edeef976c081c4e7bd92164d2f59c325ae Author: Dave Jones Date: Tue Sep 5 17:15:47 2006 -0400 [CPUFREQ] Fix sparse warning in ondemand drivers/cpufreq/cpufreq_ondemand.c:323:2: warning: Using plain integer as NULL pointer Signed-off-by: Dave Jones commit 26dacd0c9b2dc1dc987c376aeee4e80691a7dd0b Author: James Smart Date: Fri Aug 18 17:47:24 2006 -0400 [SCSI] lpfc 8.1.10 : Change version number to 8.1.10 Change version number to 8.1.10 Signed-off-by: James Smart Signed-off-by: James Bottomley commit c3f28afa61343e3e010e3014aa0d6eba271c1558 Author: James Smart Date: Fri Aug 18 17:47:18 2006 -0400 [SCSI] lpfc 8.1.10 : Add support for new lpfc soft_wwpn attribute Add support for a new lpfc soft_wwpn sysfs attribute Signed-off-by: James Smart Signed-off-by: James Bottomley commit c01f32087960edd60a302ad62ad6b8b525e4aeec Author: James Smart Date: Fri Aug 18 17:47:08 2006 -0400 [SCSI] lpfc 8.1.10 : Add support for dev_loss_tmo_callbk and fast_io_fail_tmo_callbk Add support for new dev_loss_tmo callback Goodness is that it removes code for a parallel nodev timer that existed in the driver Add support for the new fast_io_fail callback Signed-off-by: James Smart Signed-off-by: James Bottomley commit 0f29b966d60e9a4f5ecff9f3832257b38aea4f13 Author: James Smart Date: Fri Aug 18 17:33:29 2006 -0400 [SCSI] FC transport: Add dev_loss_tmo callbacks, and new fast_io_fail_tmo w/ callback This patch adds the following functionality to the FC transport: - dev_loss_tmo LLDD callback : Called to essentially confirm the deletion of an rport. Thus, it is called whenever the dev_loss_tmo fires, or when the rport is deleted due to other circumstances (module unload, etc). It is expected that the callback will initiate the termination of any outstanding i/o on the rport. - fast_io_fail_tmo and LLD callback: There are some cases where it may take a long while to truly determine device loss, but the system is in a multipathing configuration that if the i/o was failed quickly (faster than dev_loss_tmo), it could be redirected to a different path and completed sooner. Many thanks to Mike Reed who cleaned up the initial RFC in support of this post. The original RFC is at: http://marc.theaimsgroup.com/?l=linux-scsi&m=115505981027246&w=2 Signed-off-by: James Smart Signed-off-by: James Bottomley commit ae36764a230ff6a278ed93735acf5fcda08f2786 Author: James Smart Date: Fri Aug 18 17:46:53 2006 -0400 [SCSI] lpfc 8.1.10 : Add support to return adapter symbolic name Add support to return adapter symbolic name (now that attribute is dynamic) Signed-off-by: James Smart Signed-off-by: James Bottomley commit d2873e4c1ef293ee6d66456fb84448e258a487fa Author: James Smart Date: Fri Aug 18 17:46:43 2006 -0400 [SCSI] lpfc 8.1.10 : Add support to post events via new FC event interfaces Add support to post events via new FC event interfaces Signed-off-by: James Smart Signed-off-by: James Bottomley commit f14e2e29cdd07f80de6dec168dc2bb39de37eec3 Author: James Smart Date: Tue Aug 22 09:55:23 2006 -0400 [SCSI] SCSI & FC transport: extend event vendor id's to 64bits During discussions with Mike Christie, I became convinced that we needed a larger vendor id. This patch extends the id from 32 to 64 bits. This applies on top of the prior patches that add SCSI transport events via netlink. Signed-off-by: James Smart Signed-off-by: James Bottomley commit 84314fd4740ad73550c76dee4a9578979d84af48 Author: James Smart Date: Fri Aug 18 17:30:09 2006 -0400 [SCSI] SCSI and FC Transport: add netlink support for posting of transport events This patch formally adds support for the posting of FC events via netlink. It is a followup to the original RFC at: http://marc.theaimsgroup.com/?l=linux-scsi&m=114530667923464&w=2 and the initial posting at: http://marc.theaimsgroup.com/?l=linux-scsi&m=115507374832500&w=2 The patch has been updated to optimize the send path, per the discussions in the initial posting. Per discussions at the Storage Summit and at OLS, we are to use netlink for async events from transports. Also per discussions, to avoid a netlink protocol per transport, I've create a single NETLINK_SCSITRANSPORT protocol, which can then be used by all transports. This patch: - Creates new files scsi_netlink.c and scsi_netlink.h, which contains the single and shared definitions for the SCSI Transport. It is tied into the base SCSI subsystem intialization. Contains a single interface routine, scsi_send_transport_event(), for a transport to send an event (via multicast to a protocol specific group). - Creates a new scsi_netlink_fc.h file, which contains the FC netlink event messages - Adds 3 new routines to the fc transport: fc_get_event_number() - to get a FC event # fc_host_post_event() - to send a simple FC event (32 bits of data) fc_host_post_vendor_event() - to send a Vendor unique event, with arbitrary amounts of data. Note: the separation of event number allows for a LLD to send a standard event, followed by vendor-specific data for the event. Note: This patch assumes 2 prior fc transport patches have been installed: http://marc.theaimsgroup.com/?l=linux-scsi&m=115555807316329&w=2 http://marc.theaimsgroup.com/?l=linux-scsi&m=115581614930261&w=2 Sorry - next time I'll do something like making these individual patches of the same posting when I know they'll be posted closely together. Signed-off-by: James Smart Tidy up configuration not to make SCSI always select NET Signed-off-by: James Bottomley commit deb81d80ba27da8dfabc29ccb5977db8f4942a0a Author: James Bottomley Date: Fri Sep 1 09:28:48 2006 -0400 [SCSI] add failure return to scsi_init_shared_tag_map() And use it in the stex driver. Signed-off-by: James Bottomley commit cf355883f506051a8ce3ac4539752829320b6c8c Author: Ed Lin Date: Fri Sep 1 14:31:51 2006 +0800 [SCSI] stex: add shared tags from block Use block shared tags entirely within the driver. In the case of shutdown, assume that there are no other outstanding commands, so tag 0 is fine. Signed-off-by: Ed Lin Signed-off-by: James Bottomley commit 5a25ba1677ab8d63890016a8c1bca68a3e0fbc7d Author: Jeff Garzik Date: Fri Sep 1 03:12:19 2006 -0400 [SCSI] Add Promise SuperTrak driver Add Promise SuperTrak 'stex' driver, supporting SuperTrak EX8350/8300/16350/16300 controllers. The controller's firmware accepts SCSI commands, handing them to the underlying RAID or JBOD disks. The driver consisted of the following cleanups and fixes, beyond its initial submission: Ed Lin: stex: cleanup and minor fixes stex: add new device ids stex: update internal copy code path stex: add hard reset function stex: adjust command timeout in slave_config routine stex: use more efficient method for unload/shutdown flush Jeff Garzik: [SCSI] Add Promise SuperTrak 'shasta' driver. Rename drivers/scsi/shasta.c to stex.c ("SuperTrak EX"). [SCSI] stex: update with community comments from 'Promise SuperTrak' thread [SCSI] stex: Fix warning, trim trailing whitespace. [SCSI] stex: remove last remnants of "shasta" project code name [SCSI] stex: removed 6-byte command emulation [SCSI] stex: minor cleanups [SCSI] stex: minor fixes: irq flag, error return value [SCSI] stex: use dma_alloc_coherent() Signed-off-by: Jeff Garzik Signed-off-by: James Bottomley commit 69bdd88ca2670c321fef774e77059516f836c6f2 Author: Hannes Reinecke Date: Fri Sep 1 15:50:23 2006 +0200 [SCSI] Wrong size information for devices with disabled read access When accessing a device with disabled read access the capacity is set randomly to 1GB. This makes it impossible to userspace tools to detect invalid device capacities. Signed-off-by: Mike Anderson Acked-by: Chris Mason Signed-off-by: Hannes Reinecke Signed-off-by: James Bottomley commit 01dfc7fc56f4b7ec0e5344ab44fcf673ebfbf7fa Author: Mike Christie Date: Thu Aug 31 18:09:35 2006 -0400 [SCSI] iscsi class: update version Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit e648f63c6520d6e572573149c16a64d2c5ad7ec5 Author: Mike Christie Date: Thu Aug 31 18:09:34 2006 -0400 [SCSI] libiscsi: don't call into lld to cleanup task In the normal IO path we should not be calling back into the LLD since the LLD will have cleaned up the task before or after calling complete pdu. For the fail_command path we still need to do this to force the cleanup. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit f47f2cf5d4acf929a3aaa6957c3fc4622c358703 Author: Mike Christie Date: Thu Aug 31 18:09:33 2006 -0400 [SCSI] libiscsi: check that command ptr is set before accessing it If the scsi eh sends a TUR and the session is down we could return SCSI_ML_HOST_BUSY. scsi eh will ignore this and send ask us to abort the command and we blindly accesst the command ptr. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit ca5186842a6d85e982e3d572ecd407453d0c5116 Author: Mike Christie Date: Thu Aug 31 18:09:32 2006 -0400 [SCSI] iscsi_tcp: fix partial digest recv When a digest is spread across two network buffers, we currently ignore this and try to check the digest with the partial buffer. Or course this fails. This patch has use iscsi_tcp_copy to copy the whole digest before testing it. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit db98ccde0881b8247acb52dece6d94ed770a7aa5 Author: Mike Christie Date: Thu Aug 31 18:09:31 2006 -0400 [SCSI] libiscsi: only check burst lengths when sending unsol data The first burst length is only relevant if immedate data = Yes or if Initial R2T is No Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit d5390f5f788f01788e9dfd41ad516a2908901610 Author: Mike Christie Date: Thu Aug 31 18:09:30 2006 -0400 [SCSI] iscsi_tcp: update header size during relogin When we relogin to a target, we have not yet negotiated digests so we must reset the hdr_size var. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 753e7d3866748799e4a8769cd27ea7202654211b Author: Mike Christie Date: Thu Aug 31 18:09:29 2006 -0400 [SCSI] iscsi_tcp: fix header resend This patch built over the last ones fixes a bug in the partial header resend code, where we add on another 4 bytes to the send length on the resend. We want just the header plus digest. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit dd8c0d958621e3137f3e3302f7b8952041a4a1d7 Author: Mike Christie Date: Thu Aug 31 18:09:28 2006 -0400 [SCSI] scsi_tcp: rm data rx and tx tfms We currently allocated seperate tfms for data and header digests. There is no reason for this since we can never calculate a rx header and digest at the same time. Same for sends. So this patch removes the data tfms and has the send and recv sides use the rx_tfm or tx_tfm. I also made the connection creation code preallocate the tfms because I thought I hit a bug where I changed the digests settings during a relogin but could not allocate the tfm and then we just failed. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 62f383003c22cd34920d0412465eddcb1223da0d Author: Mike Christie Date: Thu Aug 31 18:09:27 2006 -0400 [SCSI] iscsi_tcp: fix padding, data digests, and IO at weird offsets iscsi_tcp calculates padding by using the expected transfer length. This has the problem where if we have immediate data = no and initial R2T = yes, and the transfer length ended up needing padding then we send: 1. header 2. padding which should have gone after data 3. data Besides this bug, we also assume the target will always ask for nice transfer lengths and the first burst length will always be a nice value. As far as I can tell form the RFC this is not a requirement. It would be silly to do this, but if someone did it we will end doing bad things. Finally the last bug in that bit of code is in our handling of the recalculation of data digests when we do not send a whole iscsi_buf in one try. The bug here is that we call crypto_digest_final on a iscsi_sendpage error, then when we send the rest of the iscsi_buf, we doiscsi_data_digest_init and this causes the previous data digest to be lost. And to make matters worse, some of these bugs are replicated over and over and over again for immediate data, solicited data and unsolicited data. So the attached patch made over the iscsi git tree (see kernel.org/git for details) which I updated today to include the patches I said I merged, consolidates the sending of data, padding and digests and calculation of data digests and fixes the above bugs. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 98a9416af08385f8497e9c1595113a81aefa5d49 Author: Mike Christie Date: Thu Aug 31 18:09:26 2006 -0400 [SCSI] attempt to complete r2t with data len greater than max burst A couple targets like string bean and MDS, send r2ts with a data len greater than the max burst we agreed to. We were being strict in our enforcing of the iscsi rfc in that code path, but there is no driver limitation that prevents us from fullfilling the request. To allow those targets to work we will ignore the max_burst length and send as much data as the target asks for assuming it has consciously decided to override its max burst length. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit 60ecebf5a10e42f5e2d6e07eb9e24bdee8500b81 Author: Mike Christie Date: Thu Aug 31 18:09:25 2006 -0400 [SCSI] add refcouting around ctask usage in main IO patch It is possible that a ctask could be completing and getting cleaned up at the same time, we are finishing up the last data transfer. This could then result in the data transfer code using stale or invalid values. This patch adds a refcount to the ctask. When the count goes to zero then we know the transmit thread and recv thread or softirq are not touching it and we can safely release it. The eh should not need to grab a reference because it only cleans up a task if it has both the xmit mutex and recv lock (or recv side suspended). Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit ffd0436ed2e5a741c8d30062b489b989acf0a526 Author: Mike Christie Date: Thu Aug 31 18:09:24 2006 -0400 [SCSI] libiscsi, iscsi_tcp, iscsi_iser: check that burst lengths are valid. iSCSI RFC states that the first burst length must be smaller than the max burst length. We currently assume targets will be good, but that may not be the case, so this patch adds a check. This patch also moves the unsol data out offset to the lib so the LLDs do not have to track it. Signed-off-by: Mike Christie Signed-off-by: James Bottomley commit e5b3cd42960a10c1bc3701d4f00767463c88ec9d Author: Alan Stern Date: Mon Aug 21 15:53:25 2006 -0400 [SCSI] SCSI: sanitize INQUIRY strings Sanitize the Vendor, Product, and Revision strings contained in an INQUIRY result by setting all non-graphic or non-ASCII characters to ' '. Since the standard disallows such characters, this will affect only non-compliant devices. To help maintain backward compatibility, NUL characters are treated specially. They are taken as string terminators; they and all the following characters are set to ' '. If some valid characters get erased as a result... well, we weren't seeing them before so we haven't lost anything. The primary purpose of this change is to allow blacklist entries to match devices with illegal Vendor or Product strings. In addition, the patch updates a couple of function prototypes, giving inq_result its correct type (unsigned char *). Signed-off-by: Alan Stern Signed-off-by: James Bottomley commit 85b6c720b0931101c8bcc3a5abdc2b8514b0fb4b Author: James Bottomley Date: Thu Aug 31 18:15:22 2006 -0400 [SCSI] sd: fix cache flushing on module removal (and individual device removal) The fix isn't actually in sd: it's in scsi_device_get(). I modified it to allow devices to be returned in SDEV_CANCEL, but not SDEV_DEL. This means that the device_remove_driver, which occurs in device_del() in scsi_remove_device() after the device has gone into SDEV_CANCEL is now effective at flushing the cache. Signed-off-by: James Bottomley commit 9ee093f653bae98cb56b0669819d4bccb8c05fa4 Author: Auke Kok Date: Thu Aug 31 14:27:53 2006 -0700 ixgb: Increment version to 1.0.112-k2 Signed-off-by: Auke Kok commit 69c7a940335371cf31a6589bf2b2ad1d197ef6ec Author: Auke Kok Date: Thu Aug 31 14:27:52 2006 -0700 ixgb: remove skb->dev assignment Same change as e1000: remove skb->dev assignment, it's now done by netdev_alloc_skb. Signed-off-by: Auke Kok commit 01748fbb413d6f3b36c330544969d1d7254ee509 Author: Linas Vepstas Date: Thu Aug 31 14:27:52 2006 -0700 ixgb: Add PCI Error recovery callbacks Adds PCI Error recovery callbacks to the Intel 10-gigabit ethernet ixgb device driver. Lightly tested, works. "Zhang, Yanmin" wrote: Both pci_disable_device and ixgb_down would access the device. It doesn't follow Documentation/pci-error-recovery.txt that error_detected shouldn't do any access to the device. Signed-off-by: Linas Vepstas Signed-off-by: Andrew Morton Signed-off-by: Auke Kok commit adc5413965e6ca2cd18f0ec89933f762b5605574 Author: Jesse Brandeburg Date: Thu Aug 31 14:27:51 2006 -0700 ixgb: Add buffer_info and test like e1000 has. Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok commit 7a0eec3bca6ca024325defbc454252da6c537d40 Author: Jesse Brandeburg Date: Thu Aug 31 14:27:51 2006 -0700 ixgb: Cache-align all TX components of the adapter struct. Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok commit ab8ced2fb00f3a1e1b63f8c3c61ad4262308ddc0 Author: Auke Kok Date: Thu Aug 31 14:27:51 2006 -0700 ixgb: recalculate after how many descriptors to wake the queue Recalculate when to wake the queue using DESC_NEEDED instead of a static hardcoded number. Signed-off-by: Auke Kok commit a91bb6a8b411bdd8053601d7c2254d54670a4df6 Author: Jesse Brandeburg Date: Thu Aug 31 14:27:50 2006 -0700 ixgb: Set a constant blink rate for ixgb adapter identify (1sec on, 1sec off) Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok commit f990b426afb2f6ed77ba9ec272bdfe3d5d3a3d39 Author: Auke Kok Date: Thu Aug 31 14:27:50 2006 -0700 ixgb: convert dev->priv to netdev_priv(dev). Signed-off-by: Auke Kok commit 5791704fbe6e1a23de29332e18840f8c90faf601 Author: Auke Kok Date: Thu Aug 31 14:27:50 2006 -0700 ixgb: Convert dev_alloc_skb to netdev_alloc_skb. Signed-off-by: Auke Kok commit a535aa1922083c85ce6fb7d1341db0d17df433d4 Author: Auke Kok Date: Thu Aug 31 14:27:49 2006 -0700 e100: increment version to 3.5.16-k2 Increment the version of e100 to 3.5.16-k2, increment dates. Signed-off-by: Auke Kok commit 859b039463d7584afb4e25e950bf6dd58460add8 Author: Auke Kok Date: Thu Aug 31 14:27:49 2006 -0700 e100: remove skb->dev assignment Signed-off-by: Auke Kok commit b1d26f24e864204dfaa82b1252477e981ba9ef24 Author: Linas Vepstas Date: Thu Aug 31 14:27:48 2006 -0700 e100: fix error recovery A recent patch in -mm3 titled "gregkh-pci-pci-don-t-enable-device-if-already-enabled.patch" causes pci_enable_device() to be a no-op if the kernel thinks that the device is already enabled. This change breaks the PCI error recovery mechanism in the e100 device driver, since, after PCI slot reset, the card is no longer enabled. This is a trivial fix for this problem. Tested. Signed-off-by: Linas Vepstas Signed-off-by: Andrew Morton Signed-off-by: Auke Kok commit 4187592b6d2230d4f9f7177c369dde2aef1a4337 Author: Auke Kok Date: Thu Aug 31 14:27:48 2006 -0700 e100: Convert e100 to use netdev_alloc_skb(). Signed-off-by: Auke Kok commit 7cc33234f23f1abb5d2f6639dda1700b1fde4b64 Author: Auke Kok Date: Thu Aug 31 14:27:47 2006 -0700 e1000: Increment driver version to 7.2.7-k2 Signed-off-by: Auke Kok commit ca6f72241966602d254900b9d624cac00df745bf Author: Christoph Hellwig Date: Thu Aug 31 14:27:47 2006 -0700 e1000: clean up skb allocation code Signed-off-by: Christoph Hellwig Acked-by: Jesse Brandeburg Signed-off-by: Auke Kok commit 5881cde8a38cab3b228a63516ab64f8d79acc4f5 Author: Jesse Brandeburg Date: Thu Aug 31 14:27:47 2006 -0700 e1000: Add PCI ID 0x10a4 for our new 4-port PCI-Express device Device 0x10a4 is a double 82571 on a single PCI-Express card and has 4 gigabit capable ports. Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok commit 120cd57644f85b280b538ee403423641167913a9 Author: Jesse Brandeburg Date: Thu Aug 31 14:27:46 2006 -0700 e1000: unify WoL capability detection code WoL is constantly giving problems and needed a rewrite. Consolidates all WoL capabilities into a single function, and disables WoL for all other ports on the device except for port A. Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok commit cccb20d3a9b7c6d4b6e1b52ee02814e6094aaa12 Author: Francois Romieu Date: Wed Aug 16 13:07:18 2006 +0200 8139cp: use PCI_DEVICE() to shorten the PCI device table Signed-off-by: Francois Romieu commit 7668a4945ba0e17a61e535a6c67aa64a319a03b4 Author: François Romieu Date: Tue Aug 15 20:10:57 2006 +0200 8139cp: pci_get_drvdata(pdev) can not be NULL in suspend handler 1) pci_set_drvdata() is used in cp_{init/remove}_one to initialize/reset driver_data to the relevant value (resp. net_device * and NULL). 2) each of the 3 relevant functions is issued under (device *)->sem: 2.1) pci_unregister_driver -> driver_unregister -> bus_remove_driver -> driver_detach (takes (device *)->sem) -> __device_release_driver(dev) -> dev->bus-remove(dev) (== pci_device_remove) -> drv->remove(pdev) (== cp_remove_one) [...] pci_dev->driver = NULL; 2.2) pci_register_driver -> __pci_register_driver -> driver_register -> bus_add_driver -> driver_attach -> __driver_attach (takes (device *)->sem) -> driver_probe_device(drv, dev) -> dev->bus->probe(dev) (== pci_device_probe) -> _pci_device_probe(drv, pci_dev) -> pci_call_probe(drv, pci_dev, id) -> drv->probe(dev, id) (== cp_init_one) [...] pci_dev->driver = drv; 2.3) suspend_device (takes (device *)->sem) -> dev->bus->suspend(dev) (== pci_device_suspend) checking for drv = pci_dev->driver != NULL [...] -> drv->suspend(pci_dev, state) (== cp_suspend) dev->sem and the state of pci_dev->driver provide the expected result. St Mary's day was a bit rainy here. Signed-off-by: Francois Romieu commit e68970e7543815133224f79a858e7c9e0c42f4de Author: Francois Romieu Date: Tue Aug 15 16:22:27 2006 +0200 8139cp: removal of useless BUG_ON() check netdev_priv() will provide a nice oops a few lines before the BUG_ON() check. Signed-off-by: Francois Romieu commit d03d376dd29cae53bf70a21a0c26b306abe37326 Author: Francois Romieu Date: Sun Jan 29 01:31:36 2006 +0100 8139cp: sync the device private data with its r8169 counterpart struct cp_private is reorganized to be more easily compared between the r8169 and the 8139cp drivers. The alignment should not be impacted. Signed-off-by: Francois Romieu commit 0ba894d420b845667e2981c2147af974a755fba2 Author: Francois Romieu Date: Mon Aug 14 19:55:07 2006 +0200 8139cp: ring_info removal for the receive path The ring_info.len field is not used at all. cp_private.rx_skb is turned into an array of sk_buff *. Signed-off-by: Francois Romieu commit c48e9399e895834f26dff9149de1930ba18a0d6c Author: Francois Romieu Date: Sun Jan 29 01:30:48 2006 +0100 8139cp: remove gratuitous indirection dev is an argument of the current function. Signed-off-by: Francois Romieu commit 3598b57be449a2ee9178e5c511bdb1a8aaccba20 Author: Francois Romieu Date: Sun Jan 29 01:31:13 2006 +0100 8139cp: trim ring_info Fat removal: the mapping address is available from the Rx/Tx descriptors. Signed-off-by: Francois Romieu commit d2eed8cff9a1a5d7e12ec9ddf71432c466b104d0 Author: Francois Romieu Date: Thu Aug 31 22:01:07 2006 +0200 r8169: the 0x8136 needs a 8 bytes alignment Reported by Darren Salt. Signed-off-by: Francois Romieu commit 5f787a1aca3705bdc6adbda36f8d6446380e85a6 Author: Francois Romieu Date: Thu Aug 17 13:02:36 2006 +0200 r8169: add basic MII ioctl support Signed-off-by: Francois Romieu commit 64e4bfb40c9d07a48c1c7e5b8556e92e7cd7406a Author: Francois Romieu Date: Thu Aug 17 12:43:06 2006 +0200 r8169: use standard #defines from mii.h instead of declaring private ones Some unused stuff goes away btw. Signed-off-by: Francois Romieu commit 5b0384f4fd079c24b976ee333e6d1f0c95cf14de Author: Francois Romieu Date: Wed Aug 16 16:00:01 2006 +0200 r8169: trim trailing whitespaces and convert whitespaces to tabs Signed-off-by: Francois Romieu commit b518fa8eac2d0ac497c0fdb27e4cec68d0249bb7 Author: Francois Romieu Date: Wed Aug 16 15:23:13 2006 +0200 r8169: udelay() removal No need to chew CPU cycles as there is no heavy timing requirement and the delays are always requested from a sleepable context. Signed-off-by: Francois Romieu commit 188f4af04618b32b8ec7c630a3f18201c81ce70c Author: Francois Romieu Date: Wed Aug 16 14:51:52 2006 +0200 r8169: use NETDEV_TX_{BUSY/OK} Signed-off-by: Francois Romieu commit 86e33a296c2c9ed6eece0bfff4ac776f42040504 Author: James Bottomley Date: Wed Aug 30 09:45:51 2006 -0400 [SCSI] add shared tag map helpers This patch adds support for sharing tag maps at the host level (i.e. either every queue [LUN] has its own tag map or there's a single one for the entire host). This formulation is primarily intended to help single issue queue hardware, like the aic7xxx Signed-off-by: James Bottomley commit 492dfb489658dfe4a755fa29dd0e34e9c8bd8fb8 Author: James Bottomley Date: Wed Aug 30 15:48:45 2006 -0400 [SCSI] block: add support for shared tag maps The current block queue implementation already contains most of the machinery for shared tag maps. The only remaining pieces are a way to allocate and destroy a tag map independently of the queues (so that the maps can be managed on the life cycle of the overseeing entity) Acked-by: Jens Axboe Signed-off-by: James Bottomley commit 85cd7251b9112e3dabeac9fd3b175601ca607241 Author: Jeff Garzik Date: Thu Aug 31 00:03:49 2006 -0400 [libata #pata-drivers] Trim trailing whitespace. commit 9bec2e38527a9f2497b3d976715c672d08d6160d Author: Jeff Garzik Date: Thu Aug 31 00:02:15 2006 -0400 [libata] Trim trailing whitespace. commit f19eaa7f53736449a6eac89c3863eca2c64d5913 Author: Darrick J. Wong Date: Wed Aug 30 14:18:33 2006 -0700 [SCSI] aic94xx: Increase can_queue for better performance This patch sets can_queue in the aic94xx driver's scsi_host to better performing values than what's there currently. It seems that asd_ha->seq.can_queue reflects the number of requests that can be queued per controller; so long as there's one scsi_host per controller, it seems logical that the scsi_host ought to have the same can_queue value. To the best of my (still limited) knowledge, this method provides the correct value. The effect of leaving this value set to 1 is terrible performance in the case of either (a) certain Maxtor SAS drives flying solo or (b) flooding several disks with I/O simultaneously (md-raid). There may be more scenarios where we see similar problems that I haven't uncovered. Signed-off-by: Darrick J. Wong Signed-off-by: James Bottomley commit bc229b3663dcd7d8f266cb13b0839efdee6d95b5 Author: James Bottomley Date: Mon Aug 28 17:08:21 2006 -0500 [SCSI] aic94xx: add MODULE_FIRMWARE tag Add a tag which shows what the firmware file we're requesting is. Signed-off-by: James Bottomley commit 187afbed1814ea0851bf30bacbf807217dd7864b Author: Jon Masters Date: Mon Aug 28 17:08:21 2006 -0500 [SCSI] MODULE_FIRMWARE for binary firmware(s) Right now, various kernel modules are being migrated over to use request_firmware in order to pull in binary firmware blobs from userland when the module is loaded. This makes sense. However, there is right now little mechanism in place to automatically determine which binary firmware blobs must be included with a kernel in order to satisfy the prerequisites of these drivers. This affects vendors, but also regular users to a certain extent too. The attached patch introduces MODULE_FIRMWARE as a mechanism for advertising that a particular firmware file is to be loaded - it will then show up via modinfo and could be used e.g. when packaging a kernel. Signed-off-by: Jon Masters Comments added in line with all the other MODULE_ tag Signed-off-by: James Bottomley Signed-off-by: Greg Kroah-Hartman commit 669a5db411d85a14f86cd92bc16bf7ab5b8aa235 Author: Jeff Garzik Date: Tue Aug 29 18:12:40 2006 -0400 [libata] Add a bunch of PATA drivers. The vast majority of drivers and changes are from Alan Cox. Albert Lee contributed and maintains pata_pdc2027x. Adrian Bunk, Andrew Morton, and Tejun Heo contributed various minor fixes and updates. Signed-off-by: Jeff Garzik commit 6fc47e31c0e802d205d67e644f654532e5d365d5 Author: Stephen Hemminger Date: Mon Aug 28 16:19:39 2006 -0700 [PATCH] skge: version 1.7 Increase version. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit ccdaa2a9daf4777aa50866a28921153ad837a2be Author: Stephen Hemminger Date: Mon Aug 28 16:19:38 2006 -0700 [PATCH] skge: use ethX for irq assigments The user level irq balance daemon uses "eth" as a way to distinquish ethernet devices. Also, by using device name it is possible to distinquish different boards. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 83c758fabd3589842ebcb3af6b9150ff55bc39aa Author: Stephen Hemminger Date: Mon Aug 28 16:19:37 2006 -0700 [PATCH] skge: use dev_alloc_skb To avoid problems with buggy protocols that assume extra header space, use dev_alloc_skb() when allocating receive buffers. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 78bc218663e3bd6cbbaf6a363d2f88f17541adfb Author: Stephen Hemminger Date: Mon Aug 28 16:19:36 2006 -0700 [PATCH] skge: pci bus post fixes At the end of a critical section, we need to force the PCI write to complete by doing a read. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit d38efdd65aaabd82374f386d0cc54de2ffc90af3 Author: Stephen Hemminger Date: Mon Aug 28 16:19:35 2006 -0700 [PATCH] skge: cleanup suspend/resume code The code for suspend/resume needs several fixes. The hardware lock should be setup in probe only, not in resume. Interrupts should be disabled during suspend, etc. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit e981d47b9f0c322bacc8398c6c25fcd355a19415 Author: shemminger@osdl.org Date: Mon Aug 28 10:00:53 2006 -0700 [PATCH] sky2: version 1.7 Change version number for this bundle. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 98232f85ffd0efc34c462da5ee81516f7432cec2 Author: shemminger@osdl.org Date: Mon Aug 28 10:00:52 2006 -0700 [PATCH] sky2: pci post bug Make sure that PCI write occurs before the delay. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit d3bcfbeb27a546d02af202353381ddd91ea39b87 Author: shemminger@osdl.org Date: Mon Aug 28 10:00:51 2006 -0700 [PATCH] sky2: power down PHY when not up To save power, don't enable power to the PHY until device is brought up. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 1d179332f8918a5f4e031dc068a469283b01c4c1 Author: shemminger@osdl.org Date: Mon Aug 28 10:00:50 2006 -0700 [PATCH] sky2: optimize checksum offload information Since many packets have the same checksum starting offset and insertion location; the driver can save the last information and only tell hardware when it changes. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit e07560cd4f762935968a1120168eb7d22260d85f Author: shemminger@osdl.org Date: Mon Aug 28 10:00:49 2006 -0700 [PATCH] sky2: TSO mss optimization The MSS in the transmit engine only has to change if TSO mtu changes. This means less commands to the chip when mixing TSO and regular data. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit bb507fe11ffda19eee158ce0be42d222135b7aca Author: shemminger@osdl.org Date: Mon Aug 28 10:00:48 2006 -0700 [PATCH] sky2: MSI test timing The test for MSI IRQ could have timing issues. The PCI write needs to be pushed out before waiting, and the wait queue should be initialized before the IRQ. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 97bda706b475655088201d7bb96cb8dd6d0d1aa3 Author: shemminger@osdl.org Date: Mon Aug 28 10:00:47 2006 -0700 [PATCH] sky2: dont use force status bit Don't use force status bit. It was never implemented on all chips, or has no impact. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 497d7c8681dec5084b2e79193c2aaeddc789477f Author: shemminger@osdl.org Date: Mon Aug 28 10:00:46 2006 -0700 [PATCH] sky2: use netdev_alloc_skb Use netdev_alloc_skb for buffer allocation to allow for headroom. This prevents bugs in code paths that assume extra space at the front and makes sky2 behave like other drivers. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit fba5008cda606488cf42b60de60b4414cc2276ad Author: shemminger@osdl.org Date: Mon Aug 28 10:00:45 2006 -0700 [PATCH] sky2: remove cloned/pskb_expand_head check The code to handle cloned skb overwriting is unnecessary in the sky2 driver and is buggy. The bug is that pskb_expand_head can change the skb but the driver has already mapped in the header. Since the sky2 hardware doesn't need to overwrite memory, the buggy code can just be removed; it was mistakenly copied from the tg3 driver. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit c576af479162c0a11d4e2691ebc97354958d9285 Author: Larry Finger Date: Wed Aug 23 23:02:40 2006 -0500 [PATCH] bcm43xx: Set floor of wireless signal and noise at -110 dBm This patch sets the floor of wireless level (signal) and noise at -110 dBm, which makes them be comatible with RCPI, as discussed by Simon Barber. With this change, bcm43xx-softmac and bcm43xx-d80211 behave the same. Signed-Off-By: Larry Finger Signed-off-by: John W. Linville commit 653d5b55c0125dca97a420b9a5e77fad7adbf3f0 Author: Larry Finger Date: Wed Aug 23 10:04:01 2006 -0500 [PATCH] bcm43xx - set correct value in mac_suspended for ifdown/ifup sequence When bcm43xx-softmac is given an ifdown/ifup sequence, the value for bcm->mac_suspended ends up wrong, which leads to a large number of assert(bcm->mac_suspended>=0) messages. This one-line patch fixes this problem. Signed-off-by: Michael Buesch Signed-Off-By: Larry Finger Signed-off-by: John W. Linville commit efa7e0691f476bfe39d83bf367dfd9c4fa05b43f Author: Zhu Yi Date: Tue Aug 22 17:11:56 2006 +0800 [PATCH] ipw2200: Fix compile error when CONFIG_IPW2200_DEBUG is not selected Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit 8b5f9171f66ce5049d306cd65010ef6cb290f18d Author: Zhu Yi Date: Mon Aug 21 11:39:13 2006 +0800 [PATCH] ipw2200: Update version stamp to 1.1.4 Update version ipw2200 stamp to 1.1.4 Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit 094c4d2df6c17a37d9e1b88601990ab660c00c3e Author: Zhu Yi Date: Mon Aug 21 11:39:03 2006 +0800 [PATCH] ipw2200: enable wireless extension passive scan This patch enables the ipw2200 driver to support passive scanning as offered by the wireless extensions. For this, I enhanced the ipw_wx_set_scan function in such a way that it differentiates between a passive and an active scan request. Additionally, I added a new function called ipw_request_passive_scan that is similiar to the ipw_request_scan function to perform passive scans. Last but not least, I added a field (in fact it is a work_struct struct) called request_passive_scan to the ipw_priv struct. Signed-off-by: Thomas King Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit efbd809829001c94e48b96337ea05a16d5ecee85 Author: Zhu Yi Date: Mon Aug 21 11:38:52 2006 +0800 [PATCH] ipw2100: Fix deadlock detected by lockdep Fix by removing dependency between priv->action_sem and rtnl semaphore. Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit c8c22c942e46ca0e06fc7c72845314da1ad41702 Author: Zhu Yi Date: Mon Aug 21 11:38:39 2006 +0800 [PATCH] ipw2200: Add pci .shutdown handler If we don't disable the card in the pci .shutdown method, there might be pending interrupts still in the interrupt line after a reboot on some platform. This patch fixes the problem by disable the hardware in the pci .shutdown method. Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit b9bec768c321e51a8da00d56230bc795464992b2 Author: Zhu Yi Date: Mon Aug 21 11:38:28 2006 +0800 [PATCH] ipw2200: Fix kernel Oops if cmdlog debug is enabled When command error log debug is enabled, we write every host command and parameters into a buffer. But we didn't alloc the parameter buffer for this case. The patch adds struct cmdlog_host_cmd so that the buffer is allocated from the stack. Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit d5f7ac203924a51d0e678338a11be42135fa7996 Author: Zhu Yi Date: Mon Aug 21 11:38:17 2006 +0800 [PATCH] ipw2200: mark "iwconfig retry 255" as invalid The ipw2200 firmware/ucode only support values from 0 to 254. So mark 255 as invalid. Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit 88a93df4cbc1342108356bda4f163d5cb78b6381 Author: Zhu Yi Date: Mon Aug 21 11:38:08 2006 +0800 [PATCH] ipw2200: remove the MAC timestamp present field from radiotap head IEEE80211_RADIOTAP_TSFT is defined as the Value in microseconds of the MAC's 64-bit 802.11 Time Synchronization Function timer when the first bit of the MPDU arrived at the MAC. Since ipw2200 hardware doesn't provide this value, we disable this feature from the radiotap header present flag. Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit 851ca2687e224b3ad82222d9788532a0eaa05a41 Author: Zhu Yi Date: Mon Aug 21 11:37:58 2006 +0800 [PATCH] ipw2200: Fix ipw2200 QOS parameters endian issue Signed-off-by: Jackie Wu Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit 39be0aaf20c832c50e5f0a975d13013a13650865 Author: Zhu Yi Date: Mon Aug 21 11:37:36 2006 +0800 [PATCH] ipw2200: remove unused struct ipw_rx_buffer Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit a9f0d42321a7ac40d244a7c6d74a3d1c7a4aa4f3 Author: Zhu Yi Date: Mon Aug 21 11:37:26 2006 +0800 [PATCH] ipw2200: Reassociate even if set the same essid. This patch traps the case when the essid is being set to its current value. If the essid is being set again and we are already associated, chances are some other parameters have also been altered. I think it is safer to do the re-association for this case. Signed-off-by: Bill Moss Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit ab644b0b51bf3170b398c087b7a34be6d3c7b7ba Author: Zhu Yi Date: Mon Aug 21 11:37:13 2006 +0800 [PATCH] ipw2200: ipw_wx_set_essid fix This patch cleanups the ipw_wx_set_essid code and forces a reassociation when setting the essid to "any". I have tested this patch with iwconfig. It makes ipw2200 compliant with all the cases mentioned in the iwconfig man page. The commands iwconfig iface essid any iwconfig iface essid -- any iwconfig iface essid off iwconfig iface essid on all seemed to work correctly. None of this worked before the patch. Note, this patch treats iwconfig iface essid iwconfig iface essid "" The same. It produces an error message: essid: Unknown host. Since an essid of "" is not mentioned in the iwconfig man page. Signed-off-by: Bill Moss Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit c580f67fd7fa9deee1f4cf6b86c694b880534a82 Author: Zhu Yi Date: Mon Aug 21 11:37:01 2006 +0800 [PATCH] ipw2200: SIOCGIWFREQ ioctl returns frequency rather than channel The SIOCGIWFREQ ioctl fills the request structure's freq field by setting the exponent to 0 and the mantissa to the current channel number. The iwconfig tool works around this behaviour by looking up the frequency from the channel table if a frequency below 1kHz is returned, other tools (e.g. kwlaninfo) don't. According to the comment in the iwconfig source the driver is supposed to return the frequency, not the channel number. Signed-off-by: Ingo van Lil Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit 01d478338ff3eff3bade043495f0fc9e57568876 Author: Zhu Yi Date: Mon Aug 21 11:36:53 2006 +0800 [PATCH] ipw2200: always enable frequently used debugging code Moving part of the debugging code from IPW_DEBUG to IPW_LL_DEBUG (low level debugging) and make IPW_DEBUG be always enabled. IPW_LL_DEBUG still needs to be enabled by selecting CONFIG_IPW2200_DEBUG. But it is highly deprecated for normal users since it adds higher debug verbosity in driver hot paths. Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit f09fc44d8c25f22c4d985bb93857338ed02feac6 Author: Zhu Yi Date: Mon Aug 21 11:34:19 2006 +0800 [PATCH] ieee80211: Workaround malformed 802.11 frames from AP Stop processing further but return success when we receive a malformed packet from the AP. We need this patch to workaround some AP bugs. For example, the beacon frames from the Orinoco AP1000 contains an IE (value = 128) with length equals to 8 but the actual frame length is only 7. Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit 5a656949719bf8598ad1e93a56eb11e70a4c3208 Author: Zhu Yi Date: Mon Aug 21 11:33:56 2006 +0800 [PATCH] ieee80211: Fix TKIP and WEP decryption error on SMP machines The IEEE80211 TKIP and WEP Tx and Rx paths use the same crypto_tfm to encrypt and decrypt data. During the encrypt and decrypt process, both of them will set a new key to crypto_tfm. If they happen on the same time, it will corrupt the crypto_tfm. Thus users will receive an ICV error or Michael MIC error. This only likely to happen on SMP box with heavy traffic both on Tx and Rx. The patch use two sets of crypto_tfms to avoid this problem. Signed-off-by: Hong Liu Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit b4328d87ec5711543b818fea2e1cf64f09d326f1 Author: Zhu Yi Date: Mon Aug 21 11:33:09 2006 +0800 [PATCH] ieee80211: TKIP and CCMP replay check rework Signed-off-by: Hong Liu Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit 051562f7e980b53f7bc6529f2e55b68e20f5d0e6 Author: Zhu Yi Date: Mon Aug 21 11:32:47 2006 +0800 [PATCH] ieee80211: remove ieee80211_tx() is_queue_full warning Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit 65b6a2775102cd81e57158ef4b1cb89641f76cfd Author: Zhu Yi Date: Mon Aug 21 11:32:31 2006 +0800 [PATCH] ieee80211: Fix header->qos_ctl endian issue Signed-off-by: Jackie Wu Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit b6971c2191d910714ec36b0ef50886f12c744a06 Author: Larry Finger Date: Sat Aug 19 10:56:28 2006 -0500 [PATCH] bcm43xx: return correct hard_start_xmit error code hard_start_xmit should return a NETIF_TX_FOO error code. Signed-off-by: Michael Buesch Signed-Off-By: Larry Finger Signed-off-by: John W. Linville commit 80b60fa8488e98ceaecb8f976abe79df50988037 Author: Larry Finger Date: Wed Aug 16 11:05:16 2006 -0500 [PATCH] bcm43xx: optimization of DMA bitfields Convert the bitfields in the bcm43xx DMA code to properly aligned u8 booleans. These flags are accessed in the DMA hotpath, so it's a good idea to waste a few bytes of memory for the sake of speed by not requiring masking (and probably shifting) of the bitfields. Signed-off-by: Michael Buesch Signed-Off-By: Larry Finger Signed-off-by: John W. Linville commit 9c974fb1a44dc8d09c16caa4dd174b0403ba585c Author: Pavel Roskin Date: Tue Aug 15 20:45:03 2006 -0400 [PATCH] orinoco: include linux/if_arp.h directly Don't rely on linux/if_arp.h being included by other headers Signed-off-by: Pavel Roskin Signed-off-by: John W. Linville commit 821fe6831c02259ea0e8c2dec56173bd6037f900 Author: Pavel Roskin Date: Tue Aug 15 20:45:00 2006 -0400 [PATCH] orinoco: Don't use "extern inline" on locking functions SPARC architecture has been fixed, so it's no longer needed. Signed-off-by: Pavel Roskin Signed-off-by: John W. Linville commit fb67a0f7b76647ab5ad1e2512275f672584bb4c3 Author: Michael Buesch Date: Wed Aug 16 00:39:36 2006 +0200 [PATCH] MAINTAINERS: Add Larry Finger for bcm43xx (softmac) Add Larry Finger to bcm43xx MAINTAINERS Remove Michael Buesch and add Larry Finger in the bcm43xx-softmac MAINTAINERS record. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 7a9b8cdacfd42d44f8a615e7db8743655d7647e7 Author: Michael Buesch Date: Wed Aug 16 00:29:07 2006 +0200 [PATCH] bcm43xx: re-add bcm43xx_rng_init() call Calls to bcm43xx_rng_init() and bcm43xx_rng_exit() got lost due to merge trouble. Re-add them. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 9218e02bd4dba86e458d9c57d66c18517fb642ff Author: Michael Buesch Date: Wed Aug 16 00:25:16 2006 +0200 [PATCH] bcm43xx: >1G and 64bit DMA support This is a rewrite of the bcm43xx DMA engine. It adds support for >1G of memory (for chips that support the extension bits) and 64-bit DMA (for chips that support it). Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 3b4c7d640376dbccfe80fc4f7b8772ecc7de28c5 Author: Sukadev Bhattiprolu Date: Mon Aug 14 23:12:03 2006 -0700 [PATCH] kthread: airo.c The airo driver is currently caching a pid for later use, but with the implementation of containers, pids themselves do not uniquely identify a task. The driver is also using kernel_thread() which is deprecated in drivers. This patch essentially replaces the kernel_thread() with kthread_create(). It also stores the task_struct of the airo_thread rather than its pid. Since this introduces a second task_struct in struct airo_info, the patch renames airo_info.task to airo_info.list_bss_task. As an extension of these changes, the patch further: - replaces kill_proc() with kthread_stop() - replaces signal_pending() with kthread_should_stop() - removes thread completion synchronisation which is handled by kthread_stop(). [akpm@osdl.org: fix races] Signed-off-by: Sukadev Bhattiprolu Cc: Javier Achirica Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: John W. Linville commit 2908d778ab3e244900c310974e1fc1c69066e450 Author: James Bottomley Date: Tue Aug 29 09:22:51 2006 -0500 [SCSI] aic94xx: new driver This is the end point of the separate aic94xx driver based on the original driver and transport class from Luben Tuikov The log of the separate development is: Alexis Bruemmer: o aic94xx: fix hotplug/unplug for expanderless systems o aic94xx: disable split completion timer/setting by default o aic94xx: wide port off expander support o aic94xx: remove various inline functions o aic94xx: use bitops o aic94xx: remove queue comment o aic94xx: remove sas_common.c o aic94xx: sas remove depot's o aic94xx: use available list_for_each_entry_safe_reverse() o aic94xx: sas header file merge James Bottomley: o aic94xx: fix TF_TMF_NO_CTX processing o aic94xx: convert to request_firmware interface o aic94xx: fix hotplug/unplug o aic94xx: add link error counts to the expander phys o aic94xx: add transport class phy reset capability o aic94xx: remove local_attached flag o Remove README o Fixup Makefile variable for libsas rename o Rename sas->libsas o aic94xx: correct return code for sas_discover_event o aic94xx: use parent backlink port o aic94xx: remove channel abstraction o aic94xx: fix routing algorithms o aic94xx: add backlink port o aic94xx: fix cascaded expander properties o aic94xx: fix sleep under lock o aic94xx: fix panic on module removal in complex topology o aic94xx: make use of the new sas_port o rename sas_port to asd_sas_port o Fix for eh_strategy_handler move o aic94xx: move entirely over to correct transport class formulation o remove last vestages of sas_rphy_alloc() o update for eh_timed_out move o Preliminary expander support for aic94xx o sas: remove event thread o minor warning cleanups o remove last vestiges of id mapping arrays o Further updates o Convert aic94xx over entirely to the transport class end device and o update aic94xx/sas to use the new sas transport class end device o [PATCH] aic94xx: attaching to the sas transport class o Add missing completion removal from prior patch o [PATCH] aic94xx: attaching to the sas transport class o Build fixes from akpm Jeff Garzik: o [scsi aic94xx] Remove ->owner from PCI info table Luben Tuikov: o initial aic94xx driver Mike Anderson: o aic94xx: fix panic on module insertion o aic94xx: stub out SATA_DEV case o aic94xx: compile warning cleanups o aic94xx: sas_alloc_task o aic94xx: ref count update o aic94xx nexus loss time value o [PATCH] aic94xx: driver assertion in non-x86 BIOS env Randy Dunlap: o libsas: externs not needed Robert Tarte: o aic94xx: sequence patch - fixes SATA support Signed-off-by: James Bottomley commit 1db2740d78c74eb11c4d0906047d9c13229a89a4 Author: Auke Kok Date: Mon Aug 28 14:56:32 2006 -0700 e1000: Use module param array code Use module param array code to distinguish between defaults and user specified values. Signed-off-by: Auke Kok commit e7b4411704246e28be0eea8c83af174e1766ed86 Author: Auke Kok Date: Mon Aug 28 14:56:30 2006 -0700 e1000: remove unused part_num reading code Remove the code that reads part_num from the EEPROM. This part number is never displayed or queryable by the user. Signed-off-by: Auke Kok commit 3d1dd8cb23c30447602563fc8302af0f15fdf3a9 Author: Auke Kok Date: Mon Aug 28 14:56:27 2006 -0700 e1000: error out if we cannot enable PCI device on resume Do not ignore errors returned by pci_enable_device, instead error out. Signed-off-by: Auke Kok commit 3fbbc72ef172cd4272a43234d4c7a7bba44c97f5 Author: Vasily Averin Date: Mon Aug 28 14:56:24 2006 -0700 e1000: ring buffers resources cleanup Memory leak was found in 2.6.18-rc4 and e1000 7.2.7 from sourceforge: We should free resources allocated for previous rings if following allocation fails. Signed-off-by: Vasily Averin Signed-off-by: Andrew Morton Signed-off-by: Auke Kok commit 6dd62ab063ec12bf1343d244d89e09d5c3b79f51 Author: Vasily Averin Date: Mon Aug 28 14:56:22 2006 -0700 e1000: e1000_probe resources cleanup Fix resources cleanup in e1000_probe() Signed-off-by: Vasily Averin Signed-off-by: Andrew Morton Signed-off-by: Auke Kok commit 401a552b8b318d594fc44d36e3da13ad475a41f7 Author: Vasily Averin Date: Mon Aug 28 14:56:19 2006 -0700 e1000: IRQ resources cleanup irq leak was found in 2.6.18-rc4 and e1000 7.2.7 from sourceforge: if e1000_up fails in e1000_open() we do not free allocated irq Signed-off-by: Vasily Averin Signed-off-by: Andrew Morton Signed-off-by: Auke Kok commit 8fc897b00a7d81ffaa24e18881c2d6b10698ab0b Author: Auke Kok Date: Mon Aug 28 14:56:16 2006 -0700 e1000: Whitespace cleanup, cosmetic changes Signed-off-by: Auke Kok commit f4ad7b5807385ad1fed0347d966e51a797cd1013 Author: James Bottomley Date: Fri Aug 25 13:48:18 2006 -0500 [SCSI] scsi_transport_sas: remove local_attached flag This flag denotes local attachment of the phy. There are two problems with it: 1) It's actually redundant ... you can get the same information simply by seeing whether a host is the phys parent 2) we condition a lot of phy parameters on it on the false assumption that we can only control local phys. I'm wiring up phy resets in the aic94xx now, and it will be able to reset non-local phys as well. I fixed 2) by moving the local check into the reset and stats function of the mptsas, since that seems to be the only HBA that can't (currently) control non-local phys. Signed-off-by: James Bottomley commit 2818c5dec5e28d65d52afbb7695bbbafe6377ee5 Author: Paul Mackerras Date: Fri Aug 25 15:08:21 2006 +1000 [POWERPC] Only offer CONFIG_BRIQ_PANEL if CONFIG_PPC_CHRP is enabled since only the briQ has a briQ front panel, and the briQ is a CHRP and is only supported if CONFIG_PPC_CHRP is set. Signed-off-by: Paul Mackerras commit 271c511db9d37d6797745adb1f151a8bd2838c6f Author: Johannes Berg Date: Tue Aug 22 16:57:05 2006 +0200 [POWERPC] make checkstack work with ARCH=powerpc This patch adds 'powerpc' architecture support to checkstack.pl. Signed-off-by: Johannes Berg Signed-off-by: Paul Mackerras commit 39ed2fe62c39ac46cda00b1759806a297f38743b Author: Olaf Hering Date: Mon Aug 21 18:11:32 2006 +0200 [POWERPC] reboot when panic_timout is set Only call into RTAS when booted with panic=0 because the RTAS call does not return. The system has to be rebooted via the HMC or via the management console right now. This is cumbersome and not what the default panic=180 is supposed to do. Signed-off-by: Olaf Hering Signed-off-by: Paul Mackerras commit e2bf2e26c0915d54208315fc8c9864f1d987217a Author: Stephen Rothwell Date: Thu Aug 17 16:28:28 2006 +1000 [POWERPC] iseries: remove some gcc 4.1 warnings gcc 4.1 produces some warnings that say it is ignoring the packed attribute on some structure elements, so, since all the elements of these structs are packed, pack the structs instead. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras commit 6f3d5d3cc4b1447578ae8484166bbc34a64150c5 Author: Michael Ellerman Date: Wed Aug 16 22:04:14 2006 +1000 [POWERPC] Add a helper for calculating RTAS "config_addr" parameters Several RTAS calls take a "config_addr" parameter, which is a particular way of specifying a PCI busno, devfn and register number into a 32-bit word. Currently these are open-coded, and I'll be adding another soon, replace them with a helper that encapsulates the logic. Be more strict about masking the busno too, just in case. Booted on P5 LPAR. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras commit a0a428e30077fd64c39aadf5221cf2c7a14dc281 Author: Stephen Rothwell Date: Wed Aug 16 15:24:28 2006 +1000 [POWERPC] iseries: remove const warning Just one bit of fallout from the constification of the get_property return value. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras commit 9a2ded55c40ad17b8b12f87c592a40b2e8593c4d Author: Michael Neuling Date: Wed Aug 16 23:12:14 2006 -0500 [POWERPC] powerpc: Make RTAS console init generic The rtas console doesn't have to be Cell specific. If we get both RTAS tokens, we should just enabled the console then and there. Signed-off-by: Michael Neuling Signed-off-by: Paul Mackerras commit 869d7f381e8c32de85ddfa9621125fb10a885f87 Author: Jon Loeliger Date: Tue Aug 15 16:19:02 2006 -0500 [POWERPC] Allow MPC8641 HPCN to build with CONFIG_PCI disabled too. Signed-off-by: Jon Loeliger Signed-off-by: Paul Mackerras commit f39b7a55a84e34e3074b168e30dc73b66e85261d Author: Olof Johansson Date: Fri Aug 11 00:07:08 2006 -0500 [POWERPC] Cleanup CPU inits Cleanup CPU inits a bit more, Geoff Levand already did some earlier. * Move CPU state save to cpu_setup, since cpu_setup is only ever done on cpu 0 on 64-bit and save is never done more than once. * Rename __restore_cpu_setup to __restore_cpu_ppc970 and add function pointers to the cputable to use instead. Powermac always has 970 so no need to check there. * Rename __970_cpu_preinit to __cpu_preinit_ppc970 and check PVR before calling it instead of in it, it's too early to use cputable. * Rename pSeries_secondary_smp_init to generic_secondary_smp_init since everyone but powermac and iSeries use it. Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras commit 2e97425197ecf85641a89e5a4868f8e147cc443f Author: Olof Johansson Date: Fri Aug 11 00:03:01 2006 -0500 [POWERPC] Rename cpu_setup_power4.S to cpu_setup_ppc970.S Rename cpu_setup_power4.S to cpu_setup_ppc970.S, since that's really what it is. No functional or other changes. Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras commit 9e6ee340194e8bd8f463b55c6d028272c0e64155 Author: Geoff Levand Date: Wed Aug 9 15:28:13 2006 -0700 [POWERPC] cell: interrupt.c whitespace clean up Whitespace clean up for cell/interrupt.c. Signed-off-by: Geoff Levand Signed-off-by: Paul Mackerras commit 11a27ad782fc7ae4b7d6ac8fefad4ceb415300d6 Author: Michael Neuling Date: Wed Aug 9 17:00:30 2006 +1000 [POWERPC] SLB shadow buffer cleanup Cleanup some of the #define magic as suggested by Milton. Signed-off-by: Michael Neuling Signed-off-by: Paul Mackerras commit e889173c2c67dc288e9b050ab066cfae151b047e Author: Jeff Garzik Date: Thu Aug 24 03:55:09 2006 -0400 Rename libata-bmdma.c to libata-sff.c. Signed-off-by: Jeff Garzik commit cca3974e48607c3775dc73b544a5700b2e37c21a Author: Jeff Garzik Date: Thu Aug 24 03:19:22 2006 -0400 libata: Grand renaming. The biggest change is that ata_host_set is renamed to ata_host. * ata_host_set => ata_host * ata_probe_ent->host_flags => ata_probe_ent->port_flags * ata_probe_ent->host_set_flags => ata_probe_ent->_host_flags * ata_host_stats => ata_port_stats * ata_port->host => ata_port->scsi_host * ata_port->host_set => ata_port->host * ata_port_info->host_flags => ata_port_info->flags * ata_(.*)host_set(.*)\(\) => ata_\1host\2() The leading underscore in ata_probe_ent->_host_flags is to avoid reusing ->host_flags for different purpose. Currently, the only user of the field is libata-bmdma.c and probe_ent itself is scheduled to be removed. ata_port->host is reused for different purpose but this field is used inside libata core proper and of different type. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 81ce3c4b4d3771866ce74b1c3856b45c3e2549fc Author: Jeff Garzik Date: Thu Aug 24 02:41:25 2006 -0400 Clean up drivers/ata/Kconfig a bit. commit 281d426c7e64286f433645e27862e7744b1e9310 Author: Alexey Dobriyan Date: Mon Aug 14 22:49:30 2006 -0700 [PATCH] CONFIG_PM=n slim: drivers/scsi/sata_sil* Remove some code which is unneeded if CONFIG_PM=n. Signed-off-by: Alexey Dobriyan Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit 08be09b7c38a71b1677285c10a08725833ff9b95 Author: Jay Cliburn Date: Mon Aug 7 22:08:30 2006 -0500 [PATCH] sata_via: Add SATA support for vt8237a This patch adds support for the VIA Technologies VT8237A SATA controller, used, for example, on the ASUS M2V socket AM2 motherboard. Signed-off-by: Jay Cliburn Signed-off-by: Jeff Garzik commit 85a7ea1b0a3263f3ad423b789a841d03c9acbb65 Author: Brice Goglin Date: Mon Aug 21 17:36:56 2006 -0400 [PATCH] myri10ge: use multicast support in the firmware Some recent myri10ge firmwares support multicast filtering as well as an extended mcp_irq_data structure (64 instead of 40 bytes). The new command MXGEFW_CMD_SET_STATS_DMA_V2 is used to check whether the firmware support those. mgp->fw_multicast_support is defined accordingly. When fw_multicast_support is set, some new multicast filtering commands is passed to the board in myri10ge_set_multicast_list(). Signed-off-by: Brice Goglin Signed-off-by: Jeff Garzik commit c58ac5caeb32ef17c2e4fc208f7dc93f6de32b7d Author: Brice Goglin Date: Mon Aug 21 17:36:49 2006 -0400 [PATCH] myri10ge: use netif_msg_link Add msg_enable and use netif_msg_link to enable/disable reporting of link status changes since some Ethernet switches seem to generate a lot of status changes under some circumstances and some people want to avoid useless flooding in the logs. Also add a counter for link status changes to statistics. Signed-off-by: Brice Goglin Signed-off-by: Jeff Garzik commit 58707cceeef22bd5e85a7f41491e9c3ff57772f9 Author: Henrik Kretzschmar Date: Mon Aug 21 18:39:26 2006 -0700 [PATCH] libata: change path to libata in libata.tmpl Since libata moved from /drivers/scsi to /drivers/ata this template is broken. Signed-off-by: Henrik Kretzschmar Acked-by: Randy Dunlap Acked-by: Alan Cox Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit 4dc3595f5c569021b1bd0109502acfca82036902 Author: Parag Warudkar Date: Tue Aug 22 10:12:58 2006 +1000 intelfbhw.c: intelfbhw_get_p1p2 defined but not used intelfbhw_get_p1p2 is used only if REGDUMP is defined - compile it in only if REGDUMP is defined - one less compiler warning. Signed-off-by: Dave Airlie commit d5afabcea215a828eb00df992b429486aae14c2f Author: Dave Airlie Date: Tue Aug 22 10:10:56 2006 +1000 intelfb: fix mtrr_reg signedness This is my fix for gcc 4.1 sign issue reported by Eric Sesterhenn . Signed-off-by: Dave Airlie commit d463d34e7b336ae3645ac331adccb578ae5a4285 Author: Christian Merkle Date: Tue Aug 22 10:07:01 2006 +1000 intelfb: update doc and Kconfig (supported devices) According to drivers/video/intelfb/intelfb.h, the intelfb driver supportes the following devices: 830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM. So the description in drivers/video/Kconfig and the documentation in Documentation/fb/intelfb.txt is outdated. airlied: cleaned up some other obvious mistakes in intelfb.txt. Signed-off-by: Christian Merkle Signed-off-by: Dave Airlie commit d2afb3ae04e36dbc6e9eb2d8bd54406ff7b6b3bd Author: Daniel Walker Date: Mon Aug 14 23:09:23 2006 -0700 [SCSI] BusLogic gcc 4.1 warning fixes - Reworked all the very long lines in that block (this drivers full of them though) - Returns an error in three places that it didn't before. - Properly clean up after a scsi_add_host() failure. Signed-off-by: Daniel Walker Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit c67eebd67400c4c2ae1389317f1de0cbb3b7a1ca Author: Komuro Date: Wed Aug 16 13:54:11 2006 +0900 [PATCH] network: axnet_cs.c: add new id (0x021b, 0x0202) Signed-off-by: komurojun-mbn@nifty.com Signed-off-by: Jeff Garzik commit 7796705244d1f04053acf24bee7eb2983f9cfeaf Author: Tejun Heo Date: Sat Aug 19 03:54:39 2006 +0900 [PATCH] libata: s/CONFIG_SCSI_SATA/CONFIG_[S]ATA/g in pci/quirks.c drivers/pci/quirks.c was not updated when libata config constants were renamed braking several libata quirks. Fix it. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 299176206b266f204be859adf9e66efd06628ab2 Author: Jeff Garzik Date: Sat Aug 19 17:48:59 2006 -0400 drivers/net: Remove deprecated use of pci_module_init() From: Michal Piotrowski Signed-off-by: Michal Piotrowski Signed-off-by: Jeff Garzik commit 5243a37b7991c85e3ea3afb6e3e13eea7ec2927d Author: Henrik Kretzschmar Date: Tue Aug 15 11:41:11 2006 +0200 [PATCH] remove an unused function from the header Removes an unused function from the via-velocity-driver. It doesn't make the binary smaller, but the source cleaner. Signed-off-by: Henrik Kretzschmar Signed-off-by: Jeff Garzik commit fd6746daade513bf7f887625c107878b6aacccfd Author: Brice Goglin Date: Mon Aug 14 17:53:15 2006 -0400 [PATCH] myri10ge: convert to netdev_alloc_skb Convert the myri10ge driver to use netdev_alloc_skb instead of dev_alloc_skb, which requires to propagate the net_device across several functions. Signed-off-by: Brice Goglin Signed-off-by: Jeff Garzik commit e700f9f4a208bf6c5d2b4dd67816555930524476 Author: Brice Goglin Date: Mon Aug 14 17:52:54 2006 -0400 [PATCH] myri10ge: define some previously hardwired firmware constants Define some previously hardwired firmware constants. Signed-off-by: Brice Goglin Signed-off-by: Jeff Garzik commit 4041b9cd87d97a7c73a5bf5a9305dffee2599386 Author: Michal Piotrowski Date: Thu Aug 17 13:28:22 2006 +0000 [SCSI] megaraid_sas: pci_module_init to pci_register_driver conversion Signed-off-by: Michal Piotrowski Acked-by: "Patro, Sumant" Signed-off-by: James Bottomley commit b8d08210126a7b769b857720a59721a453a57a1e Author: James Smart Date: Thu Aug 17 08:00:43 2006 -0400 [SCSI] fc transport: add fc_host system_hostname attribute and u64_to_wwn() This patch updates the fc transport for the following: - Addition of a new attribute "system_hostname" which can be used to set the fully qualified hostname that the fc_host is attached to. The fc_host can then register this string as the FDMI-based host name attribute. Note: for NPIV, a fc_host could be associated with a system which is not the local system. - Add the inline function u64_to_wwn(), which is the inverse of the existing wwn_to_u64() function. - Slight reorg, just to keep dynamic attributes with each other, etc Signed-off-by: James Smart Signed-off-by: James Bottomley commit f3d7271c5ac9029d19fc0252a85bc045334382cc Author: Henrik Kretzschmar Date: Tue Aug 15 11:17:21 2006 +0200 [SCSI] convert to PCI_DEVICE() macro Convert the pci_device_id-table of the megaraid_sas-driver to the PCI_DEVICE-macro, to safe some lines. Signed-off-by: Henrik Kretzschmar Acked-by: "Patro, Sumant" Signed-off-by: James Bottomley commit 2b6ee9b5295460017fc1bc3d60545512df280908 Author: Randy Dunlap Date: Mon Aug 14 23:09:23 2006 -0700 [SCSI] aic7*: cleanup MODULE_PARM_DESC strings Modify beginning string to be more readable. Remove one trailing newline. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 016131b8fffa1085b4ad165ab228116fdc278ebe Author: James Smart Date: Mon Aug 14 08:20:25 2006 -0400 [SCSI] fc transport: convert fc_host symbolic_name attribute to a dynamic attribute Signed-off-by: James Bottomley commit a2f5d4d94f0ab9560b9a99d73d5b86b377c7f201 Author: Dave Jones Date: Thu Aug 10 21:41:13 2006 -0400 [SCSI] remove unnecessary includes of linux/config.h from drivers/scsi/ kbuild includes this automatically these days. Signed-off-by: Dave Jones Signed-off-by: James Bottomley commit 84961f28e9d13a4b193d0c8545f3c060c1890ff3 Author: dave wysochanski Date: Wed Aug 9 14:56:32 2006 -0400 [SCSI] Don't add scsi_device for devices that return PQ=1, PDT=0x1f Some targets may return slight variations of PQ and PDT to indicate no LUN mapped. USB UFI setting PDT=0x1f but having reserved bits for PQ is one example, and NetApp targets returning PQ=1 and PDT=0x1f is another. Both instances seem like reasonable responses according to SPC-3 and UFI specs. The current scsi_probe_and_add_lun() code adds a scsi_device for targets that return PQ=1 and PDT=0x1f. This causes LUNs of type "UNKNOWN" to show up in /proc/scsi/scsi when no LUNs are mapped. In addition, subsequent rescans fail to recognize LUNs that may be added on the target, unless preceded by a write to the delete attribute of the "UNKNOWN" LUN. This patch addresses this problem by skipping over the scsi_add_lun() when PQ=1,PDT=0x1f is encountered, and just returns SCSI_SCAN_TARGET_PRESENT. Signed-off-by: Dave Wysochanski Signed-off-by: Christoph Hellwig Signed-off-by: James Bottomley commit 8c867b257d159ca04602d7087fa29f846785f9ea Author: Mark Haverkamp Date: Thu Aug 3 08:03:30 2006 -0700 [SCSI] aacraid: Reset adapter in recovery timeout Received from Mark Salyzyn If the adapter is in blinkled (Firmware Assert) when error recovery timeout actions have been triggered, perform an adapter warm reset and restart the initialization. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley commit 90ee346651524eb275405d410f5d3bb6765a2d93 Author: Mark Haverkamp Date: Thu Aug 3 08:03:07 2006 -0700 [SCSI] aacraid: Check for unlikely errors Received from Mark Salyzyn The enclosed patch cleans up some code fragments, adds some paranoia (unproven causes of potential driver failures). Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley commit 8c23cd7457151fc8ace79ec700a8aeaa9fc5b3d9 Author: Mark Haverkamp Date: Tue Aug 8 08:52:14 2006 -0700 [SCSI] aacraid: Restart adapter on firmware assert (Update 2) Received from Mark Salyzyn If the adapter should be in a blinkled (Firmware Assert) state when the driver loads, we will perform a warm restart of the Adapter Firmware to see if we can rescue the adapter. Possible causes of a blinkled can occur on some early release motherboard BIOSes, transitory PCI bus problems on embedded systems or non-x86 based architectures, transitory startup failures of early release drives or transitory hardware failures; some of which can bite the adapter later at runtime. Future enhancements will include recovery during runtime. Fixed extra whitespace space issue. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley commit c8f7b073e0e81499474a84ee2a90f77f7805c7f8 Author: Mark Haverkamp Date: Thu Aug 3 08:02:24 2006 -0700 [SCSI] aacraid: interruptible ioctl Received from Mark Salyzyn This patch allows the FSACTL_SEND_LARGE_FIB, FSACTL_SENDFIB and FSACTL_SEND_RAW_SRB ioctl calls into the aacraid driver to be interruptible. Only necessary if the adapter and/or the management software has gone into some sort of misbehavior and the system is being rebooted, thus permitting the user management software applications to be killed relatively cleanly. The FIB queue resource is held out of the free queue until the adapter finally, if ever, completes the command. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley commit 04846f25920d4b05d6040c531cc601049260db52 Author: Andreas Herrmann Date: Wed Aug 9 17:31:16 2006 +0200 [SCSI] limit recursion when flushing shost->starved_list Attached is a patch that should limit a possible recursion that can lead to a stack overflow like follows: Kernel stack overflow. CPU: 3 Not tainted Process zfcperp0.0.d819 (pid: 13897, task: 000000003e0d8cc8, ksp: 000000003499dbb8) Krnl PSW : 0404000180000000 000000000030f8b2 (get_device+0x12/0x48) Krnl GPRS: 00000000135a1980 000000000030f758 000000003ed6c1e8 0000000000000005 0000000000000000 000000000044a780 000000003dbf7000 0000000034e15800 000000003621c048 070000003499c108 000000003499c1a0 000000003ed6c000 0000000040895000 00000000408ab630 000000003499c0a0 000000003499c0a0 Krnl Code: a7 fb ff e8 a7 19 00 00 b9 02 00 22 e3 e0 f0 98 00 24 a7 84 Call Trace: ([<000000004089edc2>] scsi_request_fn+0x13e/0x650 [scsi_mod]) [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4 [<000000004089ff8c>] scsi_queue_insert+0x22c/0x2a4 [scsi_mod] [<000000004089779a>] scsi_dispatch_cmd+0x8a/0x3d0 [scsi_mod] [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod] ... [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod] [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4 [<000000004089ff8c>] scsi_queue_insert+0x22c/0x2a4 [scsi_mod] [<000000004089779a>] scsi_dispatch_cmd+0x8a/0x3d0 [scsi_mod] [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod] [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4 [<000000004089fa9e>] scsi_run_host_queues+0x196/0x230 [scsi_mod] [<00000000409eba28>] zfcp_erp_thread+0x2638/0x3080 [zfcp] [<0000000000107462>] kernel_thread_starter+0x6/0xc [<000000000010745c>] kernel_thread_starter+0x0/0xc <0>Kernel panic - not syncing: Corrupt kernel stack, can't continue. This stack overflow occurred during tests on s390 using zfcp. Recursion depth for this panic was 19. Usually recursion between blk_run_queue and a request_fn is avoided using QUEUE_FLAG_REENTER. But this does not help if the scsi stack tries to flush the starved_list of a scsi_host. Limit recursion depth when flushing the starved_list of a scsi_host. Signed-off-by: Andreas Herrmann Signed-off-by: James Bottomley commit 891b11f619dcfe045015394fa89041f02dac9428 Author: Auke Kok Date: Wed Aug 16 13:47:31 2006 -0700 ixgb: Increment version to 1.0.109-k4 Signed-off-by: Auke Kok commit 3ae84d9269592a1284892c93597a604a894f1102 Author: Jesse Brandeburg Date: Wed Aug 16 13:47:25 2006 -0700 ixgb: fix cache miss due to miscalculation Reduce writeback threshold by 1. We were instructing the hardware to wait until the 17th descriptor which went over the cache line limit. Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok commit 0fe198a5e10229b269624a18bbd390001a8d3476 Author: Manasi Deval Date: Wed Aug 16 13:47:20 2006 -0700 ixgb: Add CX4 PHY type detection and subdevice ID. Signed-off-by: Manasi Deval Signed-off-by: Auke Kok commit dc335d9735220b3a9ece5ec2d95864b1e8ff06a0 Author: Auke Kok Date: Wed Aug 16 13:39:09 2006 -0700 e1000: Increment driver version to 7.1.9-k6 Signed-off-by: Auke Kok commit 600c977c0801210602d7502f9c978c2b8c31a209 Author: Jeff Kirsher Date: Wed Aug 16 13:39:04 2006 -0700 e1000: Disable aggressive clocking on esb2 with SERDES port Disable aggressive clocking on esb2 with SERDES port as it causes hardware problems. Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit 7820d4281a0d746a92992a9117aec007628ae3fe Author: Jeff Kirsher Date: Wed Aug 16 13:39:00 2006 -0700 e1000: Force full DMA clocking for 10/100 speed Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit c9c1b834c7b6e00badfd9a775682644f192f0357 Author: Jeff Kirsher Date: Wed Aug 16 13:38:54 2006 -0700 e1000: Allow NVM to setup LPLU for IGP2 and IGP3 Allow NVM to setup LPLU for IGP2 and IGP3. Only IGP needs LPLU D3 disabled during init here. Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit 1a821ca59593d307e564800c2f25ed1f9e1e2a6f Author: Jesse Brandeburg Date: Wed Aug 16 13:38:46 2006 -0700 e1000: explicit locking for two ethtool path functions Explicitly lock two more ethtool entry points completely instead of the hardware reset only to prevent a race condition. Signed-off-by: Jesse Brandeburg Signed-off-by: Auke Kok commit d658266ed6144f9dbc785c7d5bb6e8e5e2e7f3cf Author: Jesse Brandeburg Date: Wed Aug 16 13:31:33 2006 -0700 e1000: Explicitly power up the PHY during loopback testing. Signed-off-by: Jesse Brandeburg commit 673a052fde79ab5e9dce569b0336358812ddba2d Author: Jeff Kirsher Date: Wed Aug 16 11:28:49 2006 -0700 e1000: Remove 0x1000 as supported device Remove pci ID 8086:1000 from the list fo supported devices. This device has not functioned with the driver for very long (since v. 5.2.4!) and we lack the resources to come with a substantial fix. There are only few cards of this type out there. Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit e15fdd0391dfeb0d439ecac759fb88aca7930f2f Author: Auke Kok Date: Wed Aug 16 11:28:45 2006 -0700 e1000: Same cosmetic fix as earlier sent out for IPV4. Signed-off-by: Auke Kok commit 4e1dc97d5e0dd5b1cf78e67ea8f12ca9697c9eee Author: Auke Kok Date: Wed Aug 16 11:28:35 2006 -0700 e100: increment version to 3.5.10-k4 Increment the version of e100 to 3.5.10-k4, increment dates. Signed-off-by: Auke Kok commit 60ffa478759f39a2eb3be1ed179bc3764804b2c8 Author: Jeff Kirsher Date: Wed Aug 16 11:28:14 2006 -0700 e100: Fix MDIO/MDIO-X MDIO/MDIO-X was broken due to a wrong errata. Removing the workaround code fixes for affected NICs. Signed-off-by: Jeff Kirsher Signed-off-by: Auke Kok commit 113b898e38cb20e80847c24154ce62273b948c6a Author: Michael Wu Date: Sun Aug 13 23:27:17 2006 -0700 [PATCH] ray_cs: Remove dependency on ieee80211 This patch removes the dependency on ieee80211.h from the ray_cs driver. ray_cs only needs iw_handler.h. Signed-off-by: Michael Wu Signed-off-by: John W. Linville commit c48cf125146852424bfe8e02033c6065dd0a4021 Author: Ulrich Kunitz Date: Sat Aug 12 18:00:17 2006 +0100 [PATCH] zd1211rw: cleanups Add static to 2 internal functions. Thanks goes to Adrian Bunk, who found that. Also made some modifications to the clear functions: After a discussion on the mailing list, I implemented this code to have on the one hand sufficient test in debug mode, but on the other hand reduce the overhead for structure clearing to a minimum. A new macro ZD_MEMCLEAR is introduced, which produces code if DEBUG is set. Locks are not set anymore for structure clearing, but in debug mode, there is a verification, that the locks have not been set. Finally, removed a misleading comment regarding locking in the disconnect path. Signed-off-by: Ulrich Kunitz Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 943599ee2c3a018fd09c25d7a9e8703792dd618e Author: Ulrich Kunitz Date: Sat Aug 12 18:00:05 2006 +0100 [PATCH] zd1211rw: USB id 1582:6003 for Longshine 8131G3 added The Longshine device is a ZD1211B and has a AL2230 RF. I tested it successfully with no encryption and WEP. Signed-off-by: Ulrich Kunitz Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit a1030e92c1507eb4a3c15d0a7d62987f671b609c Author: Daniel Drake Date: Sun Aug 13 12:15:29 2006 +0100 [PATCH] zd1211rw: Convert installer CDROM device into WLAN device Some devices identify themselves as a virtual USB CDROM drive. The virtual CD includes the windows driver. We aren't interested in this, so we eject the virtual CDROM and then the real wireless device appears. Patch fixed over the earlier version to not leak cmd, thanks to Michael Buesch for spotting that. Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 4ceb7e9936dae67d6c553a4954fa410a99b3ea16 Author: Daniel Drake Date: Sat Aug 12 18:00:03 2006 +0100 [PATCH] zd1211rw: Add ID for ZyXEL G220F zd1211 chip 0586:3402 v4916 high 00-13-49 AL2230_RF pa0 ---- This device pops up after the virtual driver CD has been ejected. Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit d066c2190de86d75e17dc35beba48b920cb125ee Author: Daniel Drake Date: Sat Aug 12 17:59:59 2006 +0100 [PATCH] zd1211rw: Firmware version vs bootcode version mismatch handling This is needed for my G220F, otherwise it fails to initialize after the existing firmware upload routine. The vendor driver actually does more than what I have done here: it downloads the firmware + boot code, modifies it, and uploads it again (really messy). I have not copied that part over, as my device can get on its feet without it. Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 12f393089775ca33c53541eb67112fc04d799131 Author: Daniel Drake Date: Sat Aug 12 17:59:51 2006 +0100 [PATCH] zd1211rw: Add ID for Allnet ALLSPOT Hotspot finder Tested by Wonka on IRC. zd1211 chip 157e:3204 v4810 high 00-11-e0 AL7230B_RF pa0 g--- Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 1b865491fcbf9b865fb5cf48c94cbae2995c6589 Author: Daniel Drake Date: Sat Aug 12 17:59:50 2006 +0100 [PATCH] zd1211rw: Add ID for Senao NUB-8301 Tested by lyakh on IRC zd1211 chip 1740:2000 v4721 high 00-02-6f AL7230B_RF pa0 g--- Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit ec62bd91bbb58254dfddca3d290f5fe4aa1cb769 Author: Daniel Drake Date: Sat Aug 12 17:59:46 2006 +0100 [PATCH] zd1211rw: Support AL7230B RF This patch adds support for another Airoha RF which is present in some ZD1211 adapters. This RF supports 802.11a as well as 802.11b/g, but 802.11a connectivity is not yet supported by this driver. Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 20fe2176e5edbeb5957f113df1282a917ef87b5d Author: Daniel Drake Date: Sat Aug 12 17:59:42 2006 +0100 [PATCH] zd1211rw: AL2230 ZD1211B vendor sync This patch synchronizes our code to some recent vendor driver modifications. A new PHY layout is supported, some values are tweaked, and the AL2230 is now programmed over a new interface which is many times faster. Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 98227a90a727029613f23c5e53554f1f4d7a1c89 Author: Daniel Drake Date: Sat Aug 12 17:59:22 2006 +0100 [PATCH] zd1211rw: Match vendor driver IFS values The vendor driver resets the IFS value every time the channel changes, to this one. Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit fe7215caa033814cee1e6808e44132b7cefb1a9e Author: Daniel Drake Date: Sat Aug 12 17:59:12 2006 +0100 [PATCH] zd1211rw: ZD1211B ASIC/FWT, not jointly decoder The vendor driver chooses this value based on an ifndef ASIC, and ASIC is never defined. Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 421b20b9c44b3fcdc07d6af875dad5ae86fad014 Author: Jeff Garzik Date: Mon Aug 14 14:27:36 2006 -0400 libata: Make sure drivers/ata is a separate Kconfig menu Noticed by Rafael J. Wysocki Signed-off-by: Jeff Garzik commit 24dd01bfbce685395dc0ade71308326b3861187a Author: Jeff Garzik Date: Mon Aug 14 14:22:54 2006 -0400 [libata] ata_piix: add missing kfree() Noticed by Andrew Morton. Signed-off-by: Jeff Garzik commit 370ba07eb8324569636bacb47abba79587640d05 Author: Jeff Garzik Date: Mon Aug 14 14:12:57 2006 -0400 libata: Separate libata.ko build from individual driver builds Since some SAS drivers need libata, we can no longer use the rule that auto-builds libata.ko as needed. We must instead depend on Kconfig to determine when to build the library kernel module. Noticed by Brian King @ IBM. Signed-off-by: Jeff Garzik commit 8ad92ba7152f40cc31f6f15500c01e4eb39cfed1 Author: Jeff Garzik Date: Mon Aug 14 14:10:07 2006 -0400 libata: Remove SCSI_ prefix from Kconfig symbols Signed-off-by: Jeff Garzik commit b352e57dc3bb5033996adaa67c2f69b795eddd39 Author: Alan Cox Date: Thu Aug 10 18:52:12 2006 +0100 [PATCH] libata: Add CompactFlash support The CFA world has some additional rules and drive modes we need to support for newer expansion cards and on embedded boxes Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik commit bcd68373877e74d8ca5039c10dc5d699ba5dc7d0 Author: Dave Jones Date: Thu Aug 10 21:37:13 2006 -0400 [PATCH] remove unnecessary config.h includes from drivers/net/ config.h is automatically included by kbuild these days. Signed-off-by: Dave Jones Signed-off-by: Jeff Garzik commit 80a8003f9236992fce45e6b2d0f33098b55a3859 Author: Daniele Venzano Date: Sat Aug 12 11:17:03 2006 +0200 [PATCH] Add new PHY to sis900 supported list Please include the attached patch that adds support for a new PHY to the sis900 driver. See also Bugzilla 6919. Signed-off-by: Daniele Venzano -- Signed-off-by: Jeff Garzik commit b5ecf60fe6b18de0bc59d336d444835d4ef835ed Author: Adrian Bunk Date: Sun Aug 13 23:00:08 2006 +0200 [CPUFREQ] make drivers/cpufreq/cpufreq_ondemand.c:powersave_bias_target() static This patch makes the needlessly global powersave_bias_target() static. Signed-off-by: Adrian Bunk Signed-off-by: Dave Jones commit 6595413fc9453a211f4b5d5cc42f0bbf3daa615b Author: Rafa³ Bilski Date: Sun Aug 13 09:16:20 2006 +0200 [CPUFREQ] Longhaul - Add ignore_latency option Some laptops with VIA C3 processor, CLE266 chipset and AMI BIOS have incorrect latency values in FADT table. These laptops seems to be C3 capable, but latency values are to big: 101 for C2 and 1017 for C3. This option will allow user to skip C3 latency test but not C3 address test. AMI BIOS is setting C3 address to correct value in DSDT table. Signed-off-by: Rafa³ Bilski Signed-off-by: Dave Jones commit b53e674a707cf77e76339852abdc063696679261 Author: Dave Jones Date: Fri Aug 11 18:13:41 2006 -0400 [AGPGART] const'ify VIA AGP PCI table. Signed-off-by: Dave Jones commit 85be7d60595b4803731cec158b0023bc050fdd14 Author: Alexey Dobriyan Date: Sat Aug 12 02:02:02 2006 +0400 [AGPGART] CONFIG_PM=n slim: drivers/char/agp/intel-agp.c Signed-off-by: Alexey Dobriyan Signed-off-by: Dave Jones commit 71565619af84a15d0abef6f0d6704e6472cd87c1 Author: Alexey Dobriyan Date: Sat Aug 12 01:59:50 2006 +0400 [AGPGART] CONFIG_PM=n slim: drivers/char/agp/efficeon-agp.c Signed-off-by: Alexey Dobriyan Signed-off-by: Dave Jones commit e7745d4e0299a3460128917ceb6b6a807fa7f9e8 Author: Dave Jones Date: Fri Aug 11 18:02:27 2006 -0400 [AGPGART] Const'ify the agpgart driver version. Signed-off-by: Dave Jones commit 179da8e6e8903a8cdb19bb12672d50dc33f0fde6 Author: Rafa³ Bilski Date: Tue Aug 8 19:12:20 2006 +0200 [CPUFREQ] Longhaul - Disable arbiter ACPI C3 works for "Powersaver" processors, so use it only for them. Older CPU will change frequency on "halt" only. But we can protect transition in two ways: - by ACPI PM2 register, there is "bus master arbiter disable" bit. This isn't tested because VIA mainboards don't have PM2 register, - by PLE133 PCI/AGP arbiter disable register. There are two bits in this register. First is "PCI arbiter disable", second "AGP arbiter disable". This is working on VIA Epia 800 mainboards. Test on bm_control is more proper because this is true when PM2 register exist. Signed-off-by: Rafa³ Bilski Signed-off-by: Dave Jones commit 05ca0350e8caa91a5ec9961c585c98005b6934ea Author: Alexey Starikovskiy Date: Mon Jul 31 22:28:12 2006 +0400 [CPUFREQ][2/2] ondemand: updated add powersave_bias tunable ondemand selects the minimum frequency that can retire a workload with negligible idle time -- ideally resulting in the highest performance/power efficiency with negligible performance impact. But on some systems and some workloads, this algorithm is more performance biased than necessary, and de-tuning it a bit to allow some performance impact can save measurable power. This patch adds a "powersave_bias" tunable to ondemand to allow it to reduce its target frequency by a specified percent. By default, the powersave_bias is 0 and has no effect. powersave_bias is in units of 0.1%, so it has an effective range of 1 through 1000, resulting in 0.1% to 100% impact. In practice, users will not be able to detect a difference between 0.1% increments, but 1.0% increments turned out to be too large. Also, the max value of 1000 (100%) would simply peg the system in its deepest power saving P-state, unless the processor really has a hardware P-state at 0Hz:-) For example, If ondemand requests 2.0GHz based on utilization, and powersave_bias=100, this code will knock 10% off the target and seek a target of 1.8GHz instead of 2.0GHz until the next sampling. If 1.8 is an exact match with an hardware frequency we use it, otherwise we average our time between the frequency next higher than 1.8 and next lower than 1.8. Note that a user or administrative program can change powersave_bias at run-time depending on how they expect the system to be used. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Alexey Starikovskiy Signed-off-by: Dave Jones commit 1ce28d6b19112a7c76af8e971e2de3109d19a943 Author: Alexey Starikovskiy Date: Mon Jul 31 22:25:20 2006 +0400 [CPUFREQ][1/2] ondemand: updated tune for hardware coordination Try to make dbs_check_cpu() call on all CPUs at the same jiffy. This will help when multiple cores share P-states via Hardware Coordination. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Alexey Starikovskiy Signed-off-by: Dave Jones commit cd878479792cc1e4bc9d62ed0ef2c4454743848c Author: Dave Jones Date: Fri Aug 11 17:59:28 2006 -0400 [CPUFREQ] Fix typo. Signed-off-by: Dave Jones commit c6fd280766a050b13360d7c2d59a3d6bd3a27d9a Author: Jeff Garzik Date: Thu Aug 10 07:31:37 2006 -0400 Move libata to drivers/ata. commit 8b881b0410de0f72a43e814393abf3a4cb29ebb4 Author: Jeff Garzik Date: Sun Jun 11 09:59:27 2006 -0400 [ATA] Increase lba48 max-sectors from 200 to 256. Also, moved ATA_MAX_SECTORS and ATA_MAX_SECTORS_LBA48 from linux/libata.h to linux/ata.h, now that they truly reflect the standard (well... mostly; note TODO comment). This changes the performance profile (and potential bug profile) for a bunch of drivers, so be wary. commit b7887196e38da54ff893897b80875d632d1a1114 Author: Pavel Roskin Date: Thu Aug 10 18:13:18 2006 +0900 [PATCH] libata: replace pci_module_init() with pci_register_driver() Replace pci_module_init() with pci_register_driver(). Signed-off-by: Pavel Roskin Signed-off-by: Tejun Heo commit 4852ba24f647199be797545226c6d325db231937 Author: Tejun Heo Date: Thu Aug 10 16:59:18 2006 +0900 [PATCH] libata: kill unused hard_port_no and legacy_mode Kill unused probe_ent/ap->hard_port_no and probe_ent->legacy_mode. Signed-off-by: Tejun Heo commit 2a88d1ac8dca898a7fb602ddd581bf4d2977509d Author: Tejun Heo Date: Thu Aug 10 16:59:16 2006 +0900 [PATCH] libata: replace ap->hard_port_no with ap->port_no Replace ap->hard_port_no with ap->port_no. Signed-off-by: Tejun Heo commit c4b01f1de254820175fe2d02b4cf7c0fab335846 Author: Tejun Heo Date: Thu Aug 10 16:59:14 2006 +0900 [PATCH] libata: use dummy port for stolen legacy ports Use dummy port for stolen legacy ports. This makes ap->port_no always equal ap->hard_port_no. Signed-off-by: Tejun Heo commit dd5b06c490de72440ec39f814de99a714a45a1a9 Author: Tejun Heo Date: Thu Aug 10 16:59:12 2006 +0900 [PATCH] libata: implement dummy port Implement dummy port which can be requested by setting appropriate bit in probe_ent->dummy_port_mask. The dummy port is used as placeholder for stolen legacy port. This allows libata to guarantee that index_of(ap) == ap->port_no == actual_device_port_no, and thus to remove error-prone ap->hard_port_no. As it's used only when one port of a legacy controller is reserved by some other entity (e.g. IDE), the focus is on keeping the added *code* complexity at minimum, so dummy port allocates all libata core resources and acts as a normal port. It just has all dummy port_ops. This patch only implements dummy port. The following patch will make libata use it for stolen legacy ports. Signed-off-by: Tejun Heo commit 2ec7df0457b710d9201f211dbccdbecf0ad38b7e Author: Alan Cox Date: Thu Aug 10 16:59:10 2006 +0900 [PATCH] libata: rework legacy handling to remove much of the cruft Kill host_set->next Fix simplex support Allow per platform setting of IDE legacy bases Some of this can be tidied further later on, in particular all the legacy port gunge belongs as a PCI quirk/PCI header decode to understand the special legacy IDE rules in the PCI spec. Longer term Jeff also wants to move the request_irq/free_irq out of core which will make this even cleaner. tj: folded in three followup patches - ata_piix-fix, broken-arch-fix and fix-new-legacy-handling, and separated per-dev xfermask into separate patch preceding this one. Folded in fixes are... * ata_piix-fix: fix build failure due to host_set->next removal * broken-arch-fix: add missing include/asm-*/libata-portmap.h * fix-new-legacy-handling: * In ata_pci_init_legacy_port(), probe_num was incorrectly incremented during initialization of the secondary port and probe_ent->n_ports was incorrectly fixed to 1. * Both legacy ports ended up having the same hard_port_no. * When printing port information, both legacy ports printed the first irq. Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Tejun Heo commit 37deecb5139ee431233781a9a093d9fcaab54c5b Author: Tejun Heo Date: Thu Aug 10 16:59:07 2006 +0900 [PATCH] libata: implement per-dev xfermask Implement per-dev xfermask. libata used to determine xfermask per-port - the fastest mode of the slowest device on the port. This patch enables per-dev xfermask. Original patch is from Alan Cox . The following changes are made by me. * simplex warning message is added * remove disabled device handling code which is never invoked (originally for choosing port-wide lowest PIO mode) Cc: Alan Cox Signed-off-by: Tejun Heo commit 6d0500df5b37c94b779ac2c3f522ff917e039f99 Author: Jeff Garzik Date: Thu Aug 10 16:59:05 2006 +0900 [PATCH] [libata] Kill 'count' var in ata_device_add() Eliminate redundant loop variable 'count' Signed-off-by: Jeff Garzik Signed-off-by: Tejun Heo commit 996139f1ce50c56c5e66f86b6aba17ff5ea00b86 Author: Jeff Garzik Date: Thu Aug 10 16:59:03 2006 +0900 [PATCH] [libata] some function renaming s/ata_host_add/ata_port_add/ s/ata_host_init/ata_port_init/ libata naming got stuck in the middle of a Great Renaming: ata_host -> ata_port ata_host_set -> ata_host To eliminate confusion, let's just give up for now, and simply ensure that things are internally consistent. Signed-off-by: Jeff Garzik Signed-off-by: Tejun Heo commit 4608c1608501cf2b0dc4478c9b6c3902db58408a Author: Tejun Heo Date: Thu Aug 10 16:59:01 2006 +0900 [PATCH] libata: update ata_host_init() and rename it to ata_port_init_shost() Update ata_host_init() such that it only initializes SCSI host related stuff and doesn't call into ata_port_init(), and rename it to ata_port_init_shost(). Signed-off-by: Tejun Heo commit f4b5cc874158a139c091b3decd468929e10645e6 Author: Tejun Heo Date: Mon Aug 7 11:39:04 2006 +0900 [PATCH] ahci: remove IRQ mask clearing from init_controller() Initial IRQ mask clearing is done by libata-core by freezing all ports prior to requesting IRQ. Remove redundant IRQ clearing from init_controller(). Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 80289167fd3ebaeb7b2641e69cbec44b61165fe7 Author: Brian King Date: Mon Aug 7 14:27:31 2006 -0500 [PATCH] libata: Add support for SATA attachment to SAS adapters The following patch enhances libata to allow SAS device drivers to utilize libata to talk to SATA devices. It introduces some new APIs which allow libata to be used without allocating a virtual scsi host. New APIs: ata_sas_port_alloc - Allocate an ata_port ata_sas_port_init - Initialize an ata_port (probe device, etc) ata_sas_port_destroy - Free an ata_port allocated by ata_sas_port_alloc ata_sas_slave_configure - configure scsi device ata_sas_queuecmd - queue a scsi command, similar to ata_scsi_queuecomand These new APIs can be used either directly by a SAS LLDD or could be used by the SAS transport class. Possible usage for a SAS LLDD would be: scsi_scan_host target_alloc ata_sas_port_alloc slave_alloc ata_sas_port_init slave_configure ata_sas_slave_configure Commands received by the LLDD for SATA devices would call ata_sas_queuecmd. Device teardown would occur with: slave_destroy port_disable target_destroy ata_sas_port_destroy Signed-off-by: Brian King Signed-off-by: Jeff Garzik commit f6d950e2a5209bd7e3fb1a238f43f24f3697f5b0 Author: Brian King Date: Mon Aug 7 14:27:24 2006 -0500 [PATCH] libata: Move ata_probe_ent_alloc to libata_core Move ata_probe_ent_alloc to libata-core. It will also be used by future SAS/SATA integration patches. Signed-off-by: Brian King Signed-off-by: Jeff Garzik commit 155a8a9c8f4084016d9e27bf03ba1f19201438f4 Author: Brian King Date: Mon Aug 7 14:27:17 2006 -0500 [PATCH] libata: Add ata_port_init Separate out the ata_port initialization from ata_host_init so that it can be used in future SAS patches. Signed-off-by: Brian King Signed-off-by: Jeff Garzik commit b03732f006bd1ecee32587ec8235c41af5ad905f Author: Brian King Date: Mon Aug 7 14:27:10 2006 -0500 [PATCH] libata: Add ata_host_set_init Add ata_host_set_init in preparation for SAS attached SATA. Signed-off-by: Brian King Signed-off-by: Jeff Garzik commit e714d99cacac976deac3239c89f2c9e3125649b6 Author: Philippe De Muyter Date: Thu Aug 3 18:42:15 2006 +0200 [PATCH] sundance: small cleanup This patch uses the sundance_reset function everywhere a reset is done, and adds a link to the archives of the original mailing list. Signed-off-by: Philippe De Muyter Signed-off-by: Jeff Garzik commit e27cdba53b8ad5c12c9281b3737e07f2a536c3a2 Author: Stephen Hemminger Date: Mon Jul 31 20:37:19 2006 -0700 [PATCH] forcdeth: revised NAPI support Revised version of the forcedeth NAPI support. This version is based against netdev-2.6#upstream (after the MAC patches from Ayaz today). Can't use nv_disable_hw_interrupts because NAPI only wants to mask off receive irq's and leave the others alone. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 5070d3408405ae1941f259acac7a9882045c3be4 Author: Ayaz Abdulla Date: Mon Jul 31 12:05:01 2006 -0400 [PATCH] forcedeth: mac address corrected This patch will correct the mac address and set a flag to indicate that it is already corrected in case nv_probe is called again. For example, when you use kexec to restart the kernel. Signed-Off-By: Ayaz Abdulla Signed-off-by: Jeff Garzik commit f1489653e9c891f343d2034aad0ef6984d3ef5cb Author: Ayaz Abdulla Date: Mon Jul 31 12:04:45 2006 -0400 [PATCH] forcedeth: move mac address setup/teardown This patch moves the mac address setup/teardown to the nv_probe/nv_remove functions. This fixes WOL wakeup since on nv_close we would reverse the mac address. Also, bonding driver will reset address after nv_close is called. Signed-Off-By: Ayaz Abdulla Signed-off-by: Jeff Garzik commit fcf194d19b7857c2467bebdb271bd079a0c0da81 Author: Komuro Date: Sun Jul 23 10:20:55 2006 +0900 [PATCH] network: pcnet_cs.c: remove unnecessary 'mdio_reset' 'mdio_reset' has bad side effects that moves the phy_id. DL10022-based cards work properly without 'mdio_reset'. Signed-off-by: komurojun-mbn@nifty.com Signed-off-by: Jeff Garzik commit e2df452b8adca9d3e3195ff7d91be375342964d7 Author: Cjacker Huang Date: Tue Aug 8 23:38:22 2006 -0400 Input: i8042 - add Amoi to the MUX blacklist ALPS touchpad on Amoi laptops (Amoi is a vendor in China) is not detected when keyboard controller is in MUX mode, add to blacklist. Signed-off-by: Andrew Morton Signed-off-by: Dmitry Torokhov commit e3882bb56e31dbb3950e51c1ba914ef2f445650c Author: Helge Deller Date: Tue Aug 8 23:37:18 2006 -0400 Input: logips2pp - add sugnature 56 (Cordless MouseMan Wheel), cleanup Signed-off-by: Helge Deller Signed-off-by: Dmitry Torokhov commit 5cf13911b1e72707b6f0eb39b2d819ec6e343d76 Author: Michael Neuling Date: Mon Aug 7 17:34:50 2006 +1000 [POWERPC] Update lppaca offset comments Update offset comments. No functional change. Signed-off-by: Michael Neuling Signed-off-by: Paul Mackerras commit 2f6093c84730b4bad65bcd0f2f904a5769b1dfc5 Author: Michael Neuling Date: Mon Aug 7 16:19:19 2006 +1000 [POWERPC] Implement SLB shadow buffer This adds a shadow buffer for the SLBs and regsiters it with PHYP. Only the bolted SLB entries (top 3) are shadowed. The SLB shadow buffer tells the hypervisor what the kernel needs to have in the SLB for the kernel to be able to function. The hypervisor can use this information to speed up partition context switches. Signed-off-by: Michael Neuling Signed-off-by: Paul Mackerras commit 452b5e21216011f2f068e80443568f5f3f3f4d63 Author: Matt Porter Date: Fri Aug 4 11:44:01 2006 -0500 [POWERPC] Fix powerpc 44x_mmu build The PIN_SIZE definition name changed, update 44x_mmu.c accordingly. Signed-off-by: Matt Porter Signed-off-by: Paul Mackerras commit f4dddce57c105c447c566be52c3d210dec570a27 Author: Matt Porter Date: Fri Aug 4 11:41:51 2006 -0500 [POWERPC] Remove flush_dcache_all export Removes the flush_dcache_all export for non coherent platforms. We removed the last in-kernel user of this years ago in arch/ppc so it no longer serves a purpose. Plus, it breaks the build at the moment. Signed-off-by: Matt Porter Signed-off-by: Paul Mackerras commit 3d7714867a8d240fae3ab0bde656a369de2b08ab Author: Jon Loeliger Date: Thu Aug 3 16:27:57 2006 -0500 [POWERPC] Add MPC8641 HPCN Device Tree Source file. As per list discussion, let's add device tree source files under powerpc/boot/dts. If nothing else, it is a starting point. Signed-off-by: Jon Loeliger Signed-off-by: Paul Mackerras commit 40681b95a4ef798bc38c92e0d9b8c06bbdd34409 Author: Michael Ellerman Date: Wed Aug 2 11:13:50 2006 +1000 [POWERPC] Make doc comments extractable We don't have much in the way of doc comments, but some of those we do have don't work because they start with "/***" or "/*", not "/**" which is what kernel-doc requires. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras commit 3ab2b385c8a5cdf060c6a41582118a0cb27d0910 Author: Amos Waterland Date: Tue Aug 1 15:44:11 2006 -0400 [POWERPC] Turn on tigon3 support in maple_defconfig I think that most people who use maple_defconfig are doing so for a JS21, so it might make sense to turn Tigon3 support on by default. Built and booted on a JS21. Signed-off-by: Amos Waterland Signed-off-by: Paul Mackerras commit 45934c47237108903ec019f08e124e592ba0b6c2 Author: Jake Moilanen Date: Thu Jul 27 13:17:25 2006 -0500 [POWERPC] Export msi symbols Forgot to export symbols for MSI. Signed-off-by: Jake Moilanen Acked-by: Segher Boessenkool Signed-off-by: Paul Mackerras commit 919fede6edab94cccb3ca8c1c0b32fa62c9369a5 Author: Jon Loeliger Date: Mon Jul 31 15:35:41 2006 -0500 [POWERPC] Rewrite the PPC 86xx IRQ handling to use Flat Device Tree IRQ setup now comes from the Flat Device Tree and use the new generic IRQ code. Fixed the fsl_soc.c IRQ OF interrupt node parsing. Removed some unused MPC86xx macro definition. Signed-off-by: Zhang Wei Signed-off-by: Jon Loeliger Signed-off-by: Paul Mackerras commit afd05423e02bc7391a7489b686ba1e166b6e8349 Author: Michael Neuling Date: Fri Jul 28 13:58:37 2006 +1000 [POWERPC] Enable PURR sysfs entry correctly We have CPU_FTR_PURR now, so let's use it. Signed-off-by: Michael Neuling Signed-off-by: Paul Mackerras commit 19ac0db3e22de3b00cc4aadc7efbad0420c7aa08 Author: James Bottomley Date: Sun Aug 6 18:15:22 2006 -0500 [SCSI] fix up short inquiry printing A recent drivers base commit: 3e95637a48820ff8bedb33e6439def96ccff1de5 Caused the bus to be added to dev_printk, so now our SCSI inquiry short messages print like this: scsiscsi 2:0:0:0: Direct access IBM-ESXS ST973401SS B519 PQ: 0 ANSI: 5 Just remove the "scsi" from the sdev_printk to compensate. Signed-off-by: James Bottomley commit 4ff36718ede26ee2da73f2dae94d71e2b06845fc Author: Matthew Wilcox Date: Tue Jul 4 12:15:20 2006 -0600 [SCSI] Improve inquiry printing - Replace scsi_device_types array API with scsi_device_type function API. Gets rid of a lot of common code, as well as being easier to use. - Add the new device types in SPC4 r05a, and rename some of the older ones. - Reformat the printing of inquiry data; now fits on one line and includes PQ. I think I've addressed all the feedback from the previous versions. My current test box prints: scsi 2:0:1:0: Direct access HP 18.2G ATLAS10K3_18_SCA HP05 PQ: 0 ANSI: 2 Signed-off-by: Matthew Wilcox Signed-off-by: James Bottomley commit 008cd5bbfb4763322837cd1f7c621f02ebe22fef Author: Brian King Date: Wed Aug 2 14:58:04 2006 -0500 [SCSI] ipr: Bump driver version to 2.1.4 Bump the ipr driver version to 2.1.4. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 117d2ce1cea25fc94302ff418ccef644cd3e59af Author: Brian King Date: Wed Aug 2 14:57:58 2006 -0500 [SCSI] ipr: Auto sense handling fix Fix up a logic error in the checking for valid sense data. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 5b7304fbfb74bfca6f7d5a88b28197e3f7f2743b Author: Brian King Date: Wed Aug 2 14:57:51 2006 -0500 [SCSI] ipr: Properly handle IOA recovered errors The ipr driver currently translates adapter recovered errors to DID_ERROR. This patch fixes this to translate these errors to success instead. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 896bbd21408ddbfb9a57819404dbb04f4f0afb35 Author: Brian King Date: Wed Aug 2 14:57:44 2006 -0500 [SCSI] ipr: Handle new SAS error codes Add definitions for some SAS error codes that can be logged by ipr SAS adapters. Signed-off-by: Brian King Signed-off-by: James Bottomley commit b5145d25f0d8eae21ad7969822f2d4ce7f22e72a Author: Brian King Date: Wed Aug 2 14:57:36 2006 -0500 [SCSI] ipr: Add some hardware defined types for SATA Add some hardware defined types for SATA. This is required by future patches to add SATA support to ipr. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 5d947f2b7607c4674d104accbd3768744aaa4154 Author: Michael Reed Date: Mon Jul 31 12:19:30 2006 -0500 [SCSI] mptfc: add additional fc transport attributes Add host_supported_speeds, host_maxframe_size, host_speed, host_fabric_name, host_port_type, host_port_state, and host_symbolic_name transport attributes to fusion fibre channel. Signed-off-by: Michael Reed Acked-by: Moore, Eric Signed-off-by: James Bottomley commit dd7e2f2266acf66ec882baa6fbd79f853b5fe966 Author: Michael Reed Date: Fri Aug 4 12:09:24 2006 -0500 [SCSI] scsi_queue_work() documented return value is incorrect If you examine the queue_work() routine you'll see that it returns 1 on success, 0 if the work is already queued. This patch corrects the source code documentation for the scsi_queue_work function. Signed-off-by: Michael Reed Signed-off-by: James Bottomley commit 9e5c50fa8686ede7c37b939a0b950df50346eb3d Author: Christoph Hellwig Date: Fri Aug 4 17:18:30 2006 +0200 [SCSI] remove SCSI_STATE_ #defines These aren't used anymore since the field in scsi_cmnd where it was stored has been removed. Signed-off-by: Christoph Hellwig Signed-off-by: James Bottomley commit 11ea3173d5f2de71d037ef58ac43395795fed2bc Author: Rick Koch Date: Sat Aug 5 00:32:30 2006 -0400 Input: add driver for Touchwin serial touchscreens Signed-off-by: Rick Koch Signed-off-by: Dmitry Torokhov commit 4003dff41e65ad338a60dde90019bffcb5531fb6 Author: Rick Koch Date: Sat Aug 5 00:32:24 2006 -0400 Input: add driver for Touchright serial touchscreens Signed-off-by: Rick Koch Signed-off-by: Dmitry Torokhov commit ee4799997950e81437ef9055a4b104099e3272c4 Author: Rick Koch Date: Sat Aug 5 00:32:18 2006 -0400 Input: add driver for Penmount serial touchscreens Signed-off-by: Rick Koch Signed-off-by: Dmitry Torokhov commit fae3006e4b42eafbed4af714e93cf6c2b92ff793 Author: Shaun Jackman Date: Sat Aug 5 00:29:49 2006 -0400 Input: elo - add support for non-pressure-sensitive touchscreens - Use the touch status bit rather than the pressure bits to distinguish a BTN_TOUCH event. Non-pressure-sensitive touchscreens always report full pressure - Report ABS_PRESSURE information only if the touchscreen supports it Signed-off-by: Shaun Jackman Signed-off-by: Dmitry Torokhov commit 1ce316efb55a1497d07d518853e60a4356abceb6 Author: Shaun Jackman Date: Sat Aug 5 00:27:59 2006 -0400 Input: elo - fix checksum calculation Fix 10-byte protocol checksum calculation and do not discard packet early unless it is missing lead in byte. Signed-off-by: Shaun Jackman Signed-off-by: Dmitry Torokhov commit 6b50d8b862284929314e9ff09e5b1cce2c43d32b Author: Dmitry Torokhov Date: Sat Aug 5 00:27:00 2006 -0400 Input: elo - handle input_register_device() failures Signed-off-by: Dmitry Torokhov commit f287caee8094097e3901d9982b6780873b36944f Author: Adrian Bunk Date: Fri Aug 4 23:00:02 2006 -0400 Input: hid - #if 0 the no longer used hid_find_field_by_usage() Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Dmitry Torokhov commit fddafd3d21953d5ea740f7b2f27149f7dd493194 Author: Brian King Date: Thu Aug 3 13:54:59 2006 -0500 [SCSI] DAC960: PCI id table fixup The PCI ID table in the DAC960 driver conflicts with some devices that use the ipr driver. All ipr adapters that use this chip have an IBM subvendor ID and all DAC960 adapters that use this chip have a Mylex subvendor id. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 2672ea86be26353108a72a28910df4dc61cdb5e2 Author: Dave Jones Date: Wed Aug 2 17:11:49 2006 -0400 [SCSI] advansys pci tweaks. Remove a lot of duplicate #defines from the advansys driver, and make them look like PCI IDs as defined elsewhere in the kernel. Also add a module table so that it automatically gets picked up by tools relying on modinfo output (like say, distro installers). Signed-off-by: Dave Jones Signed-off-by: James Bottomley commit fe2a24dfc577a05349a39c6c8a6312818d28bb59 Author: Stephen Hemminger Date: Tue Aug 1 11:55:23 2006 -0700 [PATCH] sky2: status interrupt handling improvement More changes to prevent losing status and causing hangs. The hardware is smarter than I gave it credit for. Clearing the status IRQ causes the status state machine to toggle an IRQ if needed and post any more transmits. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 57fa442c1e842e6ec18ec7cd8cca9e29b5189278 Author: Stephen Hemminger Date: Sat Jul 29 17:21:55 2006 -0700 [PATCH] sky2: more pci device ids Recent vendor driver and customer reports show more devices. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit d67a70aca200f67be42428e74eb3353f20ad1130 Author: James Bottomley Date: Fri Jul 28 17:36:46 2006 -0500 [SCSI] arcmsr: fix up sysfs values The sysfs files in arcmsr are non-standard in that they aren't simple filename value pairs, the values actually contain preceeding text which would have to be parsed. The idea of sysfs files is that the file name is the description and the contents is a simple value. Fix up arcmsr to conform to this standard. Acked-By: Erich Chen Signed-off-by: James Bottomley commit 43d6b68dc38867e489995e21649bb82f6ee7b5d3 Author: Andrew Morton Date: Sat Jul 29 11:14:08 2006 -0700 [SCSI] areca sysfs fix Remove sysfs_remove_bin_file() return-value checking from the areca driver. There's nothing a driver can do if sysfs file removal fails, so we'll soon be changing sysfs_remove_bin_file() to internally print a diagnostic and to return void. Cc: Erich Chen Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit b9377ffc3a03cde558d76349a262a1adbb6d3112 Author: Anton Blanchard Date: Wed Jul 19 08:01:28 2006 +1000 [POWERPC] clean up pseries hcall interfaces Our pseries hcall interfaces are out of control: plpar_hcall_norets plpar_hcall plpar_hcall_8arg_2ret plpar_hcall_4out plpar_hcall_7arg_7ret plpar_hcall_9arg_9ret Create 3 interfaces to cover all cases: plpar_hcall_norets: 7 arguments no returns plpar_hcall: 6 arguments 4 returns plpar_hcall9: 9 arguments 9 returns There are only 2 cases in the kernel that need plpar_hcall9, hopefully we can keep it that way. Pass in a buffer to stash return parameters so we avoid the &dummy1, &dummy2 madness. Signed-off-by: Anton Blanchard -- Signed-off-by: Paul Mackerras commit 48c86da1a211ef13bbfb1c8f2e35dda44a66b8a1 Author: John W. Linville Date: Mon Jul 31 14:54:57 2006 -0400 [PATCH] bcm43xx: reduce mac_suspend delay loop count Drop the mac_suspend loop count to reduce the maximum delay to 10ms. Signed-off-by: John W. Linville commit 894b62748bec22a98e636ed40221b27d1b9094b7 Author: Larry Finger Date: Mon Jul 31 14:20:44 2006 -0400 [PATCH] bcm43xx: add missing mac_suspended initialization Fix-up missing mac_suspended initialization which resulted from Linville's sloppy patch mangling. Signed-off-by: John W. Linville commit cb18bd40030c879cd93fef02fd579f74dbab473d Author: Mike Kravetz Date: Thu Jul 20 23:39:51 2006 -0700 [POWERPC] Instrument Hypervisor Calls: merge headers Move all the Hypervisor call definitions to to a single header file. Signed-off-by: Mike Kravetz Signed-off-by: Paul Mackerras commit 5d33eebee83784f5f03bc3861fa92ee5cd831922 Author: Jeremy Kerr Date: Thu Jul 13 16:32:52 2006 +1000 [POWERPC] Simplify dma_ops bug conditions Use BUG_ON rather than BUG to simplify the dma_ops handing, and remove the now-unnecessary return cases. Booted on pseries. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 931b261f442e779b0656d9b04c7ffe4939ef8c0a Author: Jeremy Kerr Date: Wed Jul 12 15:42:06 2006 +1000 [POWERPC] Make get_property() return a const void * Previous changes have treated the return values of get_property as const, so now we can make the actual change to get_property(). There shouldn't be a need to cast the return values anymore. We will now get compiler warnings when property values are assigned to a non-const variable. If properties need to be updated, there's still the of_find_property function. Built for cell_defconfig, chrp32_defconfig, g5_defconfig, iseries_defconfig, maple_defconfig, pmac32_defconfig, ppc64_defconfig and pseries_defconfig. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 88c805940bb9a1478f06ed6dd5d6f660bdc38eaa Author: Jeremy Kerr Date: Wed Jul 12 15:41:52 2006 +1000 [POWERPC] tsi108: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. tsi108 driver changes. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit af5f92d881d783b47d1f993ddffa2bce8b2993fe Author: Jeremy Kerr Date: Wed Jul 12 15:41:41 2006 +1000 [POWERPC] sata_svw: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. sata_svw changes Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 5c339e96a391476ebb7cc63d913445c8cee092ff Author: Jeremy Kerr Date: Wed Jul 12 15:41:30 2006 +1000 [POWERPC] tmp_atmel: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. tpm_atmel changes Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit abddd185a0195988b8a5e802d55aff91783489de Author: Jeremy Kerr Date: Wed Jul 12 15:41:18 2006 +1000 [POWERPC] sound: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc-specific sound driver changes. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 1a2509c946bfd4d4a4c5a6e816082d3a7de45db8 Author: Jeremy Kerr Date: Wed Jul 12 15:41:03 2006 +1000 [POWERPC] netdevices: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc-specific network device driver changes. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 294ef16a2ee34d0d94aa63616f7552d3bc66c982 Author: Jeremy Kerr Date: Wed Jul 12 15:40:51 2006 +1000 [POWERPC] scsi: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc-specific scsi driver changes. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit b04e3dd4ab4c7763a4ca8f751caaf69ce8dabbba Author: Jeremy Kerr Date: Wed Jul 12 15:40:40 2006 +1000 [POWERPC] video & agp: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc-specific video & agp driver changes. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 018a3d1db7cdb6127656c1622ee1d2302e16436d Author: Jeremy Kerr Date: Wed Jul 12 15:40:29 2006 +1000 [POWERPC] powermac: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powermac platform & macintosh driver changes. Built for pmac32_defconfig, g5_defconfig Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit eeb2b723ef5100fafa381d92eb70d83e98516a44 Author: Jeremy Kerr Date: Wed Jul 12 15:40:17 2006 +1000 [POWERPC] maple: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. maple platform changes. Built for maple_defconfig Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit ae6b4101e53dcf8a41f3432dacca9d3eb34e9cc3 Author: Jeremy Kerr Date: Wed Jul 12 15:40:05 2006 +1000 [POWERPC] chrp: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. chrp platform changes. Built for chrp32_defconfig Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit c61c27d58af61e5b78257019b173732c29ce0c64 Author: Jeremy Kerr Date: Wed Jul 12 15:39:54 2006 +1000 [POWERPC] cell: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. cell platform changes. Built for cell_defconfig Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 8efca49329a50710d656a8bb78d6f0f0e2f48a26 Author: Jeremy Kerr Date: Wed Jul 12 15:39:42 2006 +1000 [POWERPC] mpc: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. mpc* platform changes. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit c4c7cba90cf9f180a2c45f7e54143f786360f3dd Author: Jeremy Kerr Date: Wed Jul 12 15:39:42 2006 +1000 [POWERPC] iseries: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. iseries platform changes. Built for iseries_defconfig Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 954a46e2d5aec6f59976ddeb1d232b486e59b54a Author: Jeremy Kerr Date: Wed Jul 12 15:39:43 2006 +1000 [POWERPC] pseries: Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. pseries platform changes. Built for pseries_defconfig Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit a7f67bdf2c9f24509b8e81e0f35573b611987c80 Author: Jeremy Kerr Date: Wed Jul 12 15:35:54 2006 +1000 [POWERPC] Constify & voidify get_property() Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc core changes. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 4288b92b9644fdb4c6168273873fe08f32090d7a Author: Andrew Morton Date: Sat Jul 8 22:38:56 2006 -0700 [POWERPC] briq_panel Kconfig fix drivers/char/briq_panel.c:28:22: error: asm/prom.h: No such file or directory Cc: Jeremy Kerr Acked-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Paul Mackerras commit 95916edd02e3a7752315422f386c55723d4a3637 Author: Jeff Garzik Date: Sat Jul 29 04:10:14 2006 -0400 [libata] ahci: add SiS PCI IDs Signed-off-by: David Wang Signed-off-by: Jeff Garzik commit 3c5100c1c40cc5e27b4da4a736994c76d93392a0 Author: Tejun Heo Date: Wed Jul 26 16:58:33 2006 +0900 [PATCH] libata: cosmetic changes to PM functions Unify pm_message_t argument to the new-style @mesg. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit c1332875cbe0c148c7f200d4f9b36b64e34d9872 Author: Tejun Heo Date: Wed Jul 26 15:59:26 2006 +0900 [PATCH] ahci: implement Power Management support Implement power management support. Original implementation is from Zhao, Forrest Signed-off-by: Tejun Heo Signed-off-by: Zhao, Forrest Signed-off-by: Jeff Garzik commit d91542c11f3981768367815cf087ad36e792ea4a Author: Tejun Heo Date: Wed Jul 26 15:59:26 2006 +0900 [PATCH] ahci: separate out ahci_reset_controller() and ahci_init_controller() Separate out ahci_reset_controller() and ahci_init_controller() from ata_host_init(). These will be used by PM callbacks. This patch doesn't introduce any behavior change. Signed-off-by: Tejun Heo Signed-off-by: Zhao, Forrest Signed-off-by: Jeff Garzik commit 0be0aa98985dfec42502c0d0af2a1baff9bdb19f Author: Tejun Heo Date: Wed Jul 26 15:59:26 2006 +0900 [PATCH] libata: improve driver initialization and deinitialization Implement ahci_[de]init_port() and use it during initialization and de-initialization. ahci_[de]init_port() are supersets of what used to be done during driver [de-]initialization. This patch makes the following behavior changes. * Per-port IRQ mask is cleared on driver load as done in other drivers. The mask will be configured properly during probe. * During init_one(), HOST_IRQ_STAT is cleared after masking port IRQs such that there is no race window. * CMD_SPIN_UP is cleared during init_one() instead of being set. It is set in port_start(). This is more consistent with overall structure of initialization. Note that CMD_SPIN_UP simply controls PHY activation. * Slumber and staggered spin-up are handled properly. * All init/deinit operations are done in step-by-step manner as described in the spec instead of issued as single merged command. Original implementation is from Zhao, Forrest Signed-off-by: Tejun Heo Signed-off-by: Zhao, Forrest Signed-off-by: Jeff Garzik commit 9f5920567bfabbd1be26112a31c44652b6587394 Author: Tejun Heo Date: Wed Jul 26 15:59:26 2006 +0900 [PATCH] ahci: simplify ahci_start_engine() Simplify ahci_start_engine() by killing prerequisite condition checks. Rationales are.. * No user checks error return from ahci_start_engine() * Code flow guarantees the prerequisite conditions unless the controller is malfunctioning. In such cases, the driver had chances to learn about the problem _before_ calling this function. * Closely related to the above two, driver calls into this function even when prerequisites fail hoping for the best. Basically, ahci_start_engine() should only do the operation itself. It isn't the right place to check for prerequisites. Signed-off-by: Tejun Heo Signed-off-by: Zhao, Forrest Signed-off-by: Jeff Garzik commit d8fcd116d203dfe2f6c272d0cd67724b172f1bc2 Author: Tejun Heo Date: Wed Jul 26 15:59:25 2006 +0900 [PATCH] ahci: cosmetic changes to ahci_start/stop_engine() * fascist-format comments according to comment style used in libata core layer. * if() -> if () Signed-off-by: Tejun Heo Signed-off-by: Zhao, Forrest Signed-off-by: Jeff Garzik commit 254950cd56fee220c9d548f3e57211b95976ba64 Author: Tejun Heo Date: Wed Jul 26 15:59:25 2006 +0900 [PATCH] ahci: relocate several internal functions * move ahci_port_start/stop() below EH functions. This makes ahci more consistent with other drivers and makes prototypes for ahci_start/stop_engine() unnecessary. * swap positions between ahci_start_engine() and ahci_stop_engine() for readability. Signed-off-by: Tejun Heo Signed-off-by: Zhao, Forrest Signed-off-by: Jeff Garzik commit e1c3e5014040869abd6ef2cdf987e7c74cb40ada Author: Henrik Kretzschmar Date: Mon Jul 24 14:42:01 2006 +0200 [PATCH] initialisation cleanup for ULI526x-net-driver removes the unneeded local variable rc replace pci_module_init() with pci_register_driver() two coding style issues on switch Signed-off-by: Henrik Kretzschmar Signed-off-by: Jeff Garzik commit a8bed49ecfb47a40cc401f5ec7c9a8a38098e728 Author: Stephen Hemminger Date: Thu Jul 27 18:50:09 2006 -0700 [PATCH] forcedeth: le32 annotation Use __le32 to indicate byte order of hardware ring elements Signed-off-by: Stephen Hemminger drivers/net/forcedeth.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) Signed-off-by: Jeff Garzik commit f82a9352f6b955d1dd9adc1124d6796be2c147df Author: Stephen Hemminger Date: Thu Jul 27 18:50:08 2006 -0700 [PATCH] forcedeth: coding style cleanups Fix the coding style of the nForce Ethernet driver. - typedef's should not be used - variable names should not be capitialized - structure tags should be lower case - add whitespace near keywords - don't add paren's to switch cases - remove paren's from return - don't use __constant_ntohs unless necessary. Signed-off-by: Stephen Hemminger drivers/net/forcedeth.c | 246 ++++++++++++++++++++++++------------------------ 1 file changed, 123 insertions(+), 123 deletions(-) Signed-off-by: Jeff Garzik commit 5a4faa873782d748960b02fdec95e3d4d2e3ae38 Author: Ron Mercer Date: Tue Jul 25 00:40:21 2006 -0700 [PATCH] qla3xxx NIC driver This is a complementary network driver for our ISP4XXX parts. There is a concurrent effort underway to get the iSCSI driver (qla4xxx) integrated upstream as well. I have been through several iterations with the linux-netdev list and have had much response from Stephen Hemminger. - Built and tested using kernel 2.6.17-rc4. - The chip supports two ethernet and two iSCSI functions. - The functions ql_sem_lock, ql_sem_spinlock, ql_sem_unlock, and ql_wait_for_drvr_lock are used to protect resources that are shared across the network and iSCSI functions. This protection is mostly during chip initialization and resets, but also include link management. - The PHY/MII are not exported through ethtool due to the fact that the iSCSI function will control the common link at least 50% of the time. This driver has been through several iterations on the netdev list and we feel this driver is ready for inclusion in the upstream kernel. It has been built and tested on x86 and PPC64 platforms. Cc: Jeff Garzik Cc: Stephen Hemminger Signed-off-by: Ron Mercer Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik commit 1c57e86d75cf162bdadb3a5fe0cd3f65aa1a9ca3 Author: Erich Chen Date: Wed Jul 12 08:59:32 2006 -0700 [SCSI] arcmsr: initial driver, version 1.20.00.13 arcmsr is a driver for the Areca Raid controller, a host based RAID subsystem that speaks SCSI at the firmware level. This patch is quite a clean up over the initial submission with contributions from: Randy Dunlap Christoph Hellwig Matthew Wilcox Adrian Bunk Signed-off-by: Erich Chen Signed-off-by: Andrew Morton Signed-off-by: James Bottomley commit 0c269e6d3c615403a6e0acbe6e88f1c0da9c2396 Author: James Bottomley Date: Wed Jul 12 09:51:04 2006 -0400 [SCSI] mptsas: add parent port backlink This takes advantage of the sas class backlink function to show which port on an expander is used to communicate with the parent. Signed-off-by: James Bottomley commit f4c8aa1107969c26b1984eb2996a58f816dea71f Author: brking@charter.net Date: Wed Jul 5 17:00:01 2006 -0500 [SCSI] megaraid: Add support for change_queue_depth Adds support for change_queue_depth so that device queue depth can be changed at runtime through sysfs. Signed-off-by: Acked-by: Seokmann Ju Signed-off-by: James Bottomley commit f1207ba1a756610a9880fe4b70d7f0e9f0627073 Author: John W. Linville Date: Thu Jul 27 18:10:00 2006 -0400 [PATCH] bcm43xx: fix-up build breakage from merging patches out of order Signed-off-by: John W. Linville commit 27be44ff8ee29e945adad226cc360c9278239d17 Author: Larry Finger Date: Fri Jul 14 15:42:17 2006 -0500 [PATCH] bcm43xx: improved statistics This minor patch for wireless-2.6 (softmac) adjusts the parameters of the wireless statistics to improve the display of programs such as the "Wireless Network Information" applet of KDE. Thanks to Dan Williams and Jean Tourrilhes for valuable help in setting up the return of info in dBm. Signed-Off-By: Larry Finger Signed-off-by: John W. Linville commit 58e5528ee464d38040b9489e10033c9387a10d56 Author: Michael Buesch Date: Sat Jul 8 22:02:18 2006 +0200 [PATCH] bcm43xx: init routine rewrite Rewrite of the bcm43xx initialization routines. This fixes several issues: * up-down-up-down-up... stale data issue (May fix some DHCP issues) * Fix the init vs IRQ handler race (and remove the workaround) * Fix init for cards with multiple cores (APHY) As softmac has no internal PHY handling (unlike dscape), this adds the file "phymode" to sysfs. The active PHY can be selected by writing either a, b or g to this file. Current PHY can be determined by reading from it. * Fix the controller restart code. Controller restart can now also be triggered through echo 1 > /debug/bcm43xx/ethX/restart Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 3234faa8abe0c3d6da12cc4a38ce790134c92564 Author: Michael Buesch Date: Wed Jun 28 20:35:17 2006 +0200 [PATCH] bcm43xx: fix mac_suspend refcount This fixes mac_suspend reference counting for ifconfig up ifconfig down ifconfig up Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit b8e7cdb391c50cfc243a387b6690f5a251537e50 Author: Michael Buesch Date: Tue Jun 27 17:56:44 2006 +0200 [PATCH] bcm43xx: lower mac_suspend udelay Microoptimization: This reduces the udelay in bcm43xx_mac_suspend. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 062caf43d803771b660defe6b147711d8b730364 Author: Michael Buesch Date: Mon Jun 12 17:02:22 2006 +0200 [PATCH] bcm43xx: suspend MAC while executing long pwork Suspend MAC (and make MAC-suspend refcounting) when doing long periodic work. On long periodic work, we disable IRQs on the device, so we don't want the MAC to stay operating and probably miss packets due do non-delivery of interrupts. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 8f0f850e240df5bea027caeb1723142c50e37e57 Author: Daniel Drake Date: Tue Jul 18 22:00:25 2006 +0100 [PATCH] softmac: Add MAINTAINERS entry Signed-off-by: Daniel Drake Acked-by: Johannes Berg Signed-off-by: John W. Linville commit f2060f039e8a8bc83b10e6d0f8fb440425560569 Author: Daniel Drake Date: Tue Jul 18 21:38:05 2006 +0100 [PATCH] ieee80211: Make ieee80211_rx_any usable ieee80211_rx_any is new to 2.6.18-rc1, even though it appears this function was never completed: http://lists.sipsolutions.net/pipermail/softmac-dev/2006-February/000103.html This patch changes ieee80211_rx_any to always claim the skb, which avoids further driver complexity and the possibility of leaking management frames. It also exports the function so that people can actually use it. Signed-off-by: Daniel Drake Acked-by: Johannes Berg Signed-off-by: John W. Linville commit d7712ac254a4ae2e9c927e29e37b8c7ac334e6ad Author: Daniel Drake Date: Tue Jul 18 21:34:56 2006 +0100 [PATCH] softmac: export highest_supported_rate function zd1211 needs this functionality, no point duplicating it. Signed-off-by: Daniel Drake Acked-by: Johannes Berg Signed-off-by: John W. Linville commit 5acd0c4153be25269d7cb9a4b09fd6db571c5cc1 Author: Daniel Drake Date: Tue Jul 18 21:33:27 2006 +0100 [PATCH] softmac: ERP handling and driver-level notifications This patch implements ERP handling in softmac so that the drivers can support protection and preambles properly. I added a new struct, ieee80211softmac_bss_info, which is used for BSS-dependent variables like these. A new hook has been added (bssinfo_change), which allows the drivers to be notified when anything in bssinfo changes. I modified the txrates_change API to match the bssinfo_change API. The existing one is a little messy and the usefulness of providing the old rates is questionable (and can be implemented at driver level if really necessary). No drivers are using this API (yet), so this should be safe. Signed-off-by: Daniel Drake Acked-by: Johannes Berg Signed-off-by: John W. Linville commit d8e2be90d301a0381e9b2528fe2835cf2992bca3 Author: Daniel Drake Date: Tue Jul 18 21:30:34 2006 +0100 [PATCH] ieee80211: small ERP handling additions This adds a flag to the ieee80211_network structure which indicates whether the stored erp_value is valid (a check against 0 is not enough, since an ERP of 0 is valid and very meaningful). I also added the ERP IE bit-definitions to ieee80211.h. This is needed by some upcoming softmac patches. Signed-off-by: Daniel Drake Acked-by: Johannes Berg Signed-off-by: John W. Linville commit eab411f1e850af5acbd6ef278f4e669250f71915 Author: Dan Williams Date: Mon Jul 17 21:21:47 2006 -0400 [PATCH] prism54: update to WE-19 for WPA support Add WE-19 capabilities to prism54 fullmac driver so that it supports the necessary Wireless Extensions WPA calls. Convert reporting of WPA/RSN Generic Information Elements to IWEVGENIE rather than pre-WE-19 IWEVCUSTOM as well. Signed-off-by: Dan Williams Signed-off-by: John W. Linville commit 7c0c3afb6e67004648ca589445e073dba4040509 Author: Daniel Drake Date: Sun Jul 16 13:55:17 2006 +0100 [PATCH] Add zd1211rw MAINTAINERS entry Hopefully this will help people like Adrian Bunk send patches where the maintainers will see them :) Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 089f99d8ac398905f6dc75dd2ce5796ced5dd943 Author: Daniel Drake Date: Thu Jul 13 17:56:16 2006 +0100 [PATCH] zd1211rw: Implement SIOCGIWNICKN wireless.h discourages using SIOCGIWNAME to publish the driver name which the interface belongs to. Use SIOCGIWNICKN instead. Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 67fd6b45231362a2f1ed6c74281a901105ae7d3e Author: Pavel Machek Date: Tue Jul 11 15:34:05 2006 +0200 [PATCH] cleanup // comments from ipw2200 ipw2200 uses // comments, and uses them for removing unneeded code. Clean it up a bit. Signed-off-by: Pavel Machek Signed-off-by: John W. Linville commit 13dca9b87edebd5aa1d9ea5811bcf0fa1e975b52 Author: Robert Schulze Date: Mon Jul 10 18:37:44 2006 +0200 [PATCH] airo: collapse debugging-messages in issuecommand to one line Signed-off-by: John W. Linville commit 804af2cf6e7af31d2e664b54e657dddd9b531dbd Author: Hugh Dickins Date: Wed Jul 26 21:39:49 2006 +0100 [AGPGART] remove private page protection map AGP keeps its own copy of the protection_map, upcoming DRM changes will also require access to this map from modules. Signed-off-by: Hugh Dickins Signed-off-by: Dave Airlie Signed-off-by: Dave Jones commit bcf0bf90cd9e9242b66e0563b6a8c8db2e4c262c Author: Francois Romieu Date: Wed Jul 26 23:14:13 2006 +0200 r8169: sync with vendor's driver - add several PCI ID for the PCI-E adapters ; - new identification strings ; - the RTL_GIGA_MAC_VER_ defines have been renamed to closely match the out-of-tree driver. It makes the comparison less hairy ; - various magic ; - the PCI region for the device with PCI ID 0x8136 is guessed. Explanation: the in-kernel Linux driver is written to allow MM register accesses and avoid the IO tax. The relevant BAR register was found at base address 1 for the plain-old PCI 8169. User reported lspci show that it is found at base address 2 for the new Gigabit PCI-E 816{8/9}. Typically: 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.: Unknown device 8168 (rev 01) Subsystem: Unknown device 1631:e015 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- commit 4ff96fa67379c31ced69f193c7ffba17051f38e8 Author: Francois Romieu Date: Wed Jul 26 22:05:06 2006 +0200 r8169: remove rtl8169_init_board Rationale: - its signature is not exactly pretty; - it has no knowledge of pci_device_id; - kiss 23 lines good bye. Signed-off-by: Francois Romieu commit 623a1593c84afb86b2f496a56fb4ec37f82b5c78 Author: Francois Romieu Date: Sun May 14 12:42:14 2006 +0200 r8169: hardware flow control The datasheet suggests that the device handles the hardware flow control almost automagically. User report a different story, so let's try to twiddle the mii registers. Signed-off-by: Francois Romieu commit 9dccf61112e6755f4e6f154c1794bab3c509bc71 Author: Francois Romieu Date: Sun May 14 12:31:17 2006 +0200 r8169: RX fifo overflow recovery Signed-off-by: Francois Romieu commit a2b98a697fa4e7564f78905b83db122824916cf9 Author: Francois Romieu Date: Sun May 14 12:18:44 2006 +0200 r8169: mac address change support Fix for http://bugzilla.kernel.org/show_bug.cgi?id=6032. Cc: Tim Mattox Signed-off-by: Francois Romieu commit 5457f2194ad198a0aba4190ec99a6a81846fdca5 Author: zhao, forrest Date: Thu Jul 13 13:38:32 2006 +0800 [PATCH] The redefinition of ahci_start_engine() and ahci_stop_engine() - Make ahci_start_engine() and ahci_stop_engine() more consistent with AHCI spec 1.1 - Change their input parameter from ap to port_mmio - Update the existing users of ahci_start_engine() and ahci_stop_engine() Signed-off-by: Forrest Zhao Signed-off-by: Hannes Reinecke Signed-off-by: Jens Axboe Signed-off-by: Jeff Garzik commit 22ad852b8297e5063fc50f54a77e13f6d9b16a6f Author: Arjan van de Ven Date: Wed Jul 5 20:36:40 2006 +0200 [PATCH] resend of 8390 patch for lockdep The 8390 drivers use disable_irq() as a locking primitive, which means these uses need lockdep specific annotation that they are used as such. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Jeff Garzik commit 3fac0613937dff488141c8ade3320fd815c38ed7 Author: Ralf Baechle Date: Thu Jul 13 12:14:55 2006 +0100 [PATCH] Remove useless #ifdef MODULE stuff and printout Get rid of the MODULE stuff. Could have rewritten to use modern interfaces but the copyright message of this BSD licensed code isn't interesting enough to be watched on every bootup, in every syslog. Signed-off-by: Ralf Baechle Signed-off-by: Jeff Garzik commit 79690602adc5b52ce224df6ac67bde0074b2aede Author: Ralf Baechle Date: Thu Jul 13 12:12:53 2006 +0100 [PATCH] Remove useless casts Signed-off-by: Ralf Baechle Signed-off-by: Jeff Garzik commit 15880352659a363209c5ad9cfc796a9c8a7f5196 Author: Ralf Baechle Date: Thu Jul 13 12:10:48 2006 +0100 [PATCH] Convert to kzalloc Signed-off-by: Ralf Baechle Signed-off-by: Jeff Garzik commit b6e37e55c250f5233401b2566b1a4b512a98bc7b Author: Ralf Baechle Date: Fri Jul 14 12:15:40 2006 +0100 [PATCH] Cleanup SLHC configuration Convert selection of serial line header compression to use CONFIG_SLHC rather than makefile ifeq uglyness. This makes it easier to select the SLHC module from other code. Signed-off-by: Ralf Baechle Signed-off-by: Jeff Garzik commit 5f5d83fdbfb50ffb6f5fbf5fd69bc791d9d5cd20 Author: Stephen Hemminger Date: Mon Jul 17 15:38:32 2006 -0400 [PATCH] sky2: add another PCI ID Yet another PCI ID for 88E8056 Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik commit 8b8277a17477de38d8df6783e8221aed55bab300 Author: Anssi Hannula Date: Wed Jul 19 01:44:22 2006 -0400 Input: update the force feedback documentation Signed-off-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit bb3caf7f438a67452f5cf4773ca1bf82260bbbad Author: Anssi Hannula Date: Wed Jul 19 01:44:17 2006 -0400 Input: add force feedback driver for PSX-style Zeroplus devices Signed-off-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit 1f734cb461e1f029d751deb15c8d9f8137fb2ca7 Author: Anssi Hannula Date: Wed Jul 19 01:44:08 2006 -0400 Input: drop remnants of the old force-feedback interface Signed-off-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit ff462551235d8d7d843a005950bc90924fcedede Author: Anssi Hannula Date: Wed Jul 19 01:41:09 2006 -0400 Input: uinput - switch to the new FF interface The userspace interface of the force feedback part is changed and documentation in uinput.h is updated accordingly. MODULE_VERSION is also incremented to reflect the revision. Signed-off-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit dc76c912145febae8b62746d6f93e5edae342c9d Author: Anssi Hannula Date: Wed Jul 19 01:40:55 2006 -0400 Input: use new FF interface in the HID force feedback drivers Signed-off-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit 224ee88fe39564358ec99b46bf3ee6e6999ae17d Author: Anssi Hannula Date: Wed Jul 19 01:40:47 2006 -0400 Input: add force feedback driver for PID devices This replaces the older PID driver which was never completed. Signed-off-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit f6a01c85965c9e6fa8fb893c1fa5db16130d0ccb Author: Anssi Hannula Date: Wed Jul 19 01:40:39 2006 -0400 Input: iforce - switch to the new FF interface Signed-off-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit 7d928a2b14eede1f333db7b7b684c57f7fa7f456 Author: Anssi Hannula Date: Wed Jul 19 01:40:30 2006 -0400 Input: unified force feedback support for memoryless devices Consolidate core implementing memoryless devices in one module; added support for gain and envelopes and periodic => rumble conversion. Signed-off-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit 509ca1a9383601fdc5612d3d3ba5b981f6eb6c8b Author: Anssi Hannula Date: Wed Jul 19 01:40:22 2006 -0400 Input: implement new force feedback interface Implement a new force feedback interface, in which all non-driver-specific operations are separated to a common module. This includes handling effect type validations, locking, etc. The effects are now file descriptor specific instead of the previous strange half-process half-fd specific behaviour. The effect memory of devices is not emptied if the root user opens and closes the device while another user is using effects. This is a minor change and most likely no force feedback aware programs are affected by this negatively. Otherwise the userspace interface is left unaltered. Signed-off-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit 806d41b756fecc1b13584e2b806b76d8934b1679 Author: Anssi Hannula Date: Wed Jul 19 01:40:14 2006 -0400 Input: move fixp-arith.h to drivers/input Move fixp-arith.h from drivers/usb/input to drivers/input, as the part of force feedback support that requires trigonometric functions is being moved there. Signed-off-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit 57e6b724c08697d8332a63b60d3a60ee5e74e219 Author: Dmitry Torokhov Date: Wed Jul 19 01:39:56 2006 -0400 Input: rename input.ko into input-core.ko This will allow building input core module from several files which is needed for the reworked force feedback support. Signed-off-by: Dmitry Torokhov commit dd3bec63f80e663cdb655b8bdc9c1a0ea938f1c5 Author: Tejun Heo Date: Wed Mar 1 15:13:50 2006 +0900 [PATCH] sata_sil: remove unaffected drives from m15w blacklist m15w blacklist overgrew by attributing unrelated problems to m15w including R_ERR on DMA activate FIS errata. This patch shrinks sata_sil m15w blacklist such that it's as reported by Silicon Image. Signed-off-by: Tejun Heo Cc: Carlos Pardo Signed-off-by: Jeff Garzik commit ca652c9396fa052815518e2b2ce2ebee6d9fb861 Author: Michael Ellerman Date: Fri Jul 14 14:25:33 2006 +1000 [POWERPC] iseries: Move iommu_table_cb into platforms/iseries Although we pass the address of an iommu_table_cb to HvCallXm_getTceTableParms, we don't actually need the structure definition anywhere except in the iseries iommu code, so move the struct in there. Signed-off-by: Michael Ellerman Signed-off-by: Stephen Rothwell commit 54f5cd8afa1c9c9f8b152a946b0a7e0ecdef1631 Author: Stephen Rothwell Date: Thu Jul 13 18:56:56 2006 +1000 [POWERPC] iseries: Remove unnecessary include of iseries/hv_lp_event.h Also remove unnecessary reference to struct HvLpEvent. Signed-off-by: Stephen Rothwell commit 380ed24b1b81a188c5b716286143157a27935aab Author: Stephen Rothwell Date: Thu Jul 13 18:56:00 2006 +1000 [POWERPC] iseries: Small viotape cleanup allowed by devfs removal Signed-off-by: Stephen Rothwell commit 4e9e95a3554e98e7383a3591283ffcd850c9ef48 Author: Stephen Rothwell Date: Thu Jul 13 18:53:32 2006 +1000 [POWERPC] Make the hvc_console output buffer size settable So the iSeries console will be faster since it can send up to 200 bytes at a time to the Hypervisor. This only affects the tty part of the console, the console writes are still in 16 byte lots. Signed-off-by: Stephen Rothwell commit 8bff05b052db7a4cfaaf0eee7f8145600548e9c9 Author: Stephen Rothwell Date: Thu Jul 13 18:51:22 2006 +1000 [POWERPC] iseries: A new iSeries console This driver uses the hvc_console.c infrastructure that is used by the pSeries virtual and RTAS consoles. This will allow us to make viocons.c obsolete and is another step along the way to a combined kernel (as viocons could not coexist with CONFIG_VT). Signed-off-by: Stephen Rothwell commit 2d69ff32ebf3dff9e9b48bbbbafe2b9b6f188d48 Author: Michael Ellerman Date: Thu Jul 13 17:54:44 2006 +1000 [POWERPC] Fix a compiler warning in mm/tlb_64.c The compiler doesn't understand that BUG() never returns, so complains that psize isn't set. Just set it to the normal value, which seems to produce nice code and keeps gcc happy. Signed-off-by: Michael Ellerman Signed-off-by: Stephen Rothwell commit 463c61928c453c2998d39b683c86385ee877c289 Author: Michael Ellerman Date: Thu Jul 13 17:54:44 2006 +1000 [POWERPC] iseries: Fix a compiler warning in platforms/iseries/vpdinfo.c PhbId might be used unitialised, so set it to 0xff (nothing) always. Signed-off-by: Michael Ellerman Signed-off-by: Stephen Rothwell commit f357b4cc5826ae55a5f3893424502cb15c6b6eba Author: Michael Ellerman Date: Thu Jul 13 17:54:39 2006 +1000 [POWERPC] iseries: Fix a compiler warning in platforms/iseries/vpdinfo.c iSeries_Get_Location_Code() has error paths, but currently returns void, so give it a return code and only print the output if it returns successfully. Gcc isn't smart enough to be quiet though, so set frame to 0 to shut it up. Signed-off-by: Michael Ellerman Signed-off-by: Stephen Rothwell commit 06a36db1d712242a00cb30aaebdd088b4be28082 Author: Michael Ellerman Date: Thu Jul 13 17:52:17 2006 +1000 [POWERPC] iseries: Move ItLpNaca into platforms/iseries Move ItLpNaca into platforms/iseries now that it's not used elsewhere. Signed-off-by: Michael Ellerman Signed-off-by: Stephen Rothwell commit a2ced11b6af59854cc2a2791dccd8b6c0da2f733 Author: Michael Ellerman Date: Thu Jul 13 17:52:12 2006 +1000 [POWERPC] iseries: Make HvLpConfig_get(Primary)LpIndex functions HvLpConfig_get(Primary)LpIndex are currently static inlines that return fields from the itLpNaca, if we make them real functions we can make the itLpNaca private to iSeries. Signed-off-by: Michael Ellerman Signed-off-by: Stephen Rothwell commit c59acae85409fdf5d7574e90009c8410daf38938 Author: Michael Ellerman Date: Thu Jul 13 17:52:09 2006 +1000 [POWERPC] iseries: Make ItExtVpdPanel private to iSeries No one outside platforms/iseries needs ItExtVpdPanel anymore, so move it in there. It used to be needed by lparcfg, and so was exported, but isn't needed anymore, so unexport it. Signed-off-by: Michael Ellerman Signed-off-by: Stephen Rothwell commit a892e5d7fa7fb893b5873f7150a83f6f1ee141b5 Author: Michael Ellerman Date: Thu Jul 13 17:52:06 2006 +1000 [POWERPC] iseries: Cleanup e2a() and strne2a() e2a() was formally used by lparcfg, and so had to be exported, but isn't anymore, so don't. e2a() and strne2a() can both be static, and __init. And e2a can be made much more concise if we use x ... y case labels, while we're there add support for lower case letters. Signed-off-by: Michael Ellerman Signed-off-by: Stephen Rothwell commit dac411e7aa92d23dadbcb8721845ab88577294c7 Author: Michael Ellerman Date: Thu Jul 13 17:52:04 2006 +1000 [POWERPC] iseries: Move e2a()/strne2a() into their only caller The ASCII -> EBCDIC functions, e2a() and strne2a() are now only used in dt.c, so move them in there. Signed-off-by: Michael Ellerman Signed-off-by: Stephen Rothwell commit a749690ecf7ab55aa46df1698bcee3ec110612df Author: Michael Ellerman Date: Thu Jul 13 17:52:01 2006 +1000 [POWERPC] iseries: Use device tree /system-id in /proc/iSeries/config We export a bunch of info in /proc/iSeries/config. Currently we pull it directly out of some iSeries specific structs, but we could use the device tree instead, this saves decoding it twice and is a little neater. Signed-off-by: Michael Ellerman Signed-off-by: Stephen Rothwell commit dd2f5538a157bda68bfa8efb39feaaccdda9e74e Author: Daniel Drake Date: Wed Jul 5 15:57:31 2006 +0100 [PATCH] zd1211rw: Add Sagem device ID's Based on a patch by Matthieu CASTET. zd1211 chip 079b:004a v4330 high 00-60-b3 AL2230_RF pa0 g-- zd1211b chip 079b:0062 v4810 high 00-60-b3 AL2230_RF pa0 g-- Signed-off-by: Daniel Drake Signed-off-by: John W. Linville commit 4221f980a4931364be7ffd81c4f16784990f6f8b Author: Larry Finger Date: Thu Jun 29 22:48:59 2006 -0500 [PATCH] bcm43xx: improved statistics This patch improves the statistics returned from bcm43xx_get_wireless_stats. The signal level comes from smoothing the "rssi" value returned by the firmware after it is converted into a dBm value by the driver. The quality value is a hack derived from the smoothed level and an assumed RX_POWER_MAX of -10 dBM. The noise value is still the one calculated from the clean-room formula. On my system, this is roughly -65 dBm, which seems too high. The revised version uses the ieee80211 spinlock to protect traversing of the network list. Signed-Off-By: Larry Finger Signed-off-by: John W. Linville commit 2087da5dc12c497123d5fb8949ceed9021b673ec Author: Michael Buesch Date: Wed Jun 28 20:17:57 2006 +0200 [PATCH] bcm43xx: voluntary preemtion in the calibration loops This patch adds voluntary preemption points into the PHY calibration loops to allow non-CONFIG_PREEMPT machines to not suffer from huge delays. CONFIG_PREEMPT machines are already fine, because all this code is run in non-atomic process context. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit efa6a370216f1816456b49aac03295071720f7eb Author: Michael Buesch Date: Tue Jun 27 21:38:40 2006 +0200 [PATCH] bcm43xx: opencoded locking As many people don't seem to like the locking "obfuscation" in the bcm43xx driver, this patch removes it. Signed-off-by: Michael Buesch Signed-off-by: John W. Linville commit 3da27289a8ecc688fc62c0961dfe89d392370480 Author: Jeremy Kerr Date: Tue Jul 4 16:47:18 2006 +1000 [POWERPC] Remove linux,pci-domain properties The linux,pci-domain property is no longer used by DLPAR/PCI Hotplug utilites, or LSVPD. This change removes it. Built for ppc64_defconfig. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit b5a1a9abe1a54ba40a9612001920f98bbdd0c56f Author: Jeremy Kerr Date: Tue Jul 4 16:46:44 2006 +1000 [POWERPC] Use const qualifiers for prom parsing utilites The of_bus callbacks map and get_flags can be constified, as they don't alter the range or addr arguments. of_dump_addr and of_read_addr can also be constified. Built for 32- and 64-bit powerpc Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 980ffd3258dbcdb011e929de5d658ec81febba8d Author: Jeremy Kerr Date: Tue Jul 4 16:44:46 2006 +1000 [POWERPC] Remove linux,device properties The linux,device property isn't used anywhere within the kernel, and since it's a kernel pointer, it's a little useless for userspace. This change removes the code to create this property in of_device_register. Built for pmac32. Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras commit 7ed14c2177694ce086180eb9ca9ca4c6cd72c7ef Author: Benjamin Herrenschmidt Date: Thu Jul 6 15:09:19 2006 +1000 [POWERPC] Add cpufreq support for Xserve G5 The Xserve G5 are capable of frequency switching like other desktop G5s. This enables it. It also fix a Kconfig issue which prevented from building the G5 cpufreq support if CONFIG_PMAC_SMU was not set (the first version of that driver only worked with SMU based macs, but this isn't the case anymore). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 861fa7737db889ae1701ba58c083d4a7bd8705d3 Author: Benjamin Herrenschmidt Date: Thu Jul 6 18:03:06 2006 +1000 [POWERPC] Xserve G5 thermal control fixes The thermal control for the Xserve G5s had a few issues. For one, the way to program the RPM fans speeds into the FCU is different between it and the desktop models, which I didn't figure out until recently, and it was missing a control loop for the slots fan, running it too fast. Both of those problems were causing the machine to be much more noisy than necessary. This patch also changes the fixed value of the slots fan for desktop G5s to 40% instead of 50%. It seems to still have a pretty good airflow that way and is much less noisy. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit e7c1f69d4fa4da47dc995b5de64b6cb76ae32081 Author: Michael Ellerman Date: Tue Jul 4 17:13:23 2006 +1000 [POWERPC] Fix mem= handling when the memory limit is > RMO size There's a bug in my cleaned up mem= handling, if the memory limit is larger than the RMO size we'll erroneously enlarge the RMO size. Fix is to only change the RMO size if the memory limit is less than the current RMO value. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras commit 73ea6959b11821ba5ade77fb1d3d4aed52be3b67 Author: Benjamin Herrenschmidt Date: Tue Jul 4 17:07:18 2006 +1000 [POWERPC] More offb/bootx fixes There were still some issues with offb when BootX doesn't provide a proper display node, this fixes them. This also re-instates the palette hacks that were disabled a couple of kernel versions ago when I converted to the new OF parsing, and shuffles some functions around to avoid prototypes. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit a45b83957deabbdac9a3d908c6ca4c25f05ce1ad Author: Benjamin Herrenschmidt Date: Tue Jul 4 15:06:20 2006 +1000 [POWERPC] Add support for briq front panel This adds the driver for the Briq front panel. This is a cleaned up version of a driver that has been floating around for some time now, initially written by Karsten Jeppesen and cleaned up by jk and myself. Signed-off-by: Jeremy Kerr Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 26c5032eaa64090b2a01973b0c6ea9e7f6a80fa7 Author: Benjamin Herrenschmidt Date: Tue Jul 4 14:16:28 2006 +1000 [POWERPC] Add briq support to CHRP The support for Briq machines has been floating around as patches for ages. This cleans it up and adds it once for all. Some of this is based on initial code provided by Karsten Jeppesen and mostly rewritten from scratch by me. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit f704b8d1f080ee71b7a9a88bcf585e7dd4272f4b Author: Benjamin Herrenschmidt Date: Tue Jul 4 14:14:07 2006 +1000 [POWERPC] Fix legacy_serial.c error handling on 32 bits The code in legacy_serial.c wouldn't properly compare OF translation results against OF_BAD_ADDR as it's using a phys_addr_t which is 32 bits on some 32-bit powerpc platforms. This fixes it by always using a u64 which is what is returned by the OF parsing routines. It also makes translation failure harmless for ISA serial ports. If they can't translate, we can't use the UART early, but we can still let the 8250 driver use it later on by using IO port accessors. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit e70e943847bdae13175bf3a8bca6328e369de90a Author: Benjamin Herrenschmidt Date: Tue Jul 4 14:11:23 2006 +1000 [POWERPC] Fix default clock for udbg_16550 This patch makes it possible to provide 0 as the clock value for udbg_16550, making it default to the standard 1.8432Mhz clock Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 1e031d65b0cb5f882b20ebc356ea0345ff18dbf0 Author: Benjamin Herrenschmidt Date: Tue Jul 4 14:09:36 2006 +1000 [POWERPC] Fix non-MPIC CHRPs with CONFIG_SMP set Pseudo-CHRP machines like Pegasos without an MPIC would crash at boot if CONFIG_SMP was set because the "smp_ops" pointer was set to MPIC related ops unconditionally. This patch makes it NULL on machines that don't support SMP and provides proper default behaviour in the callers when smp_ops is NULL. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 470407a88e549135dce5fba7d86fb9910f500e56 Author: Benjamin Herrenschmidt Date: Tue Jul 4 14:07:42 2006 +1000 [POWERPC] Fix 32 bits warning in prom_init.c A warning is hurting my eyes when building 32 bits kernels Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit e8c0acf9a4fe3b2b6847541bf5cc3c86c18272ec Author: Benjamin Herrenschmidt Date: Tue Jul 4 14:06:29 2006 +1000 [POWERPC] Workaround Pegasos incorrect ISA "ranges" The Pegasos firmware doesn't create a valid "ranges" property for the ISA bridge, thus causing translation of ISA addresses and IO ports to fail. This fixes it, thus re-enabling proper early serial console to work on Pegasos. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit 3a09aa4730f021ad917a66a0c6d2ff6d616a7e4f Author: Johannes Berg Date: Mon Jul 3 14:28:14 2006 +0200 [POWERPC] fix up front-LED Kconfig Rather long patch, apparently no one has updated the pmac32_defconfig in a while. Signed-off-by: Paul Mackerras commit fda7ffd25fc5bbe1b4209dfafb854c7ad7308c93 Author: Niels Kristian Bech Jensen Date: Sun Jul 2 13:02:27 2006 +0200 [POWERPC] Add -fno-stack-protector to BOOTCFLAGS in arch/powerpc/boot/Makefile. I got some undefined references to __stack_chk_fail in arch/powerpc/boot/stdio.o and arch/powerpc/boot/prom.o when I was trying to build a kernel on Ubuntu Edgy Eft - which includes Stack Smashing Protection. This patch adds -fno-stack-protector to BOOTCFLAGS in arch/powerpc/boot/Makefile (why does BOOTCFLAGS depend on HOSTCFLAGS and not CFLAGS?). Regards, Niels Kristian Bech Jensen Signed-off-by: Paul Mackerras commit 3c6c65f5ed5a6d307bd607aecd06d658c0934d88 Author: Stefan Richter Date: Mon Jul 3 12:02:37 2006 -0400 [PATCH] ieee1394: fix kerneldoc of hpsb_alloc_host There was stuff between the comment and the function. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit cab8d154e2ed43fe1495aa0e18103e747552891b Author: Stefan Richter Date: Mon Jul 3 12:02:36 2006 -0400 [PATCH] ieee1394: nodemgr: convert nodemgr_serialize semaphore to mutex Another trivial sem2mutex conversion. Side note: nodemgr_serialize's purpose, when introduced in linux1394's revision 529 in July 2002, was to protect several data structures which are now largely handled by or together with Linux' driver core and are now protected by the LDM's own mechanisms. It may very well be possible to remove this mutex now. But fully parallelized node scanning is on our long-term TODO list anyway; the mutex will certainly go away then. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit d2f119fe319528da8c76a1107459d6f478cbf28c Author: Stefan Richter Date: Mon Jul 3 12:02:35 2006 -0400 [PATCH] ieee1394: nodemgr: switch to kthread api, replace reset semaphore Convert nodemgr's host thread from kernel_thread to kthread and its sleep/restart mechanism from a counting semaphore to a schedule()/ wake_up_process() scheme. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 3a632fe2321f6440ea8184b99549c74b912f5cef Author: Stefan Richter Date: Mon Jul 3 12:02:35 2006 -0400 [PATCH] ieee1394: nodemgr: make module parameter ignore_drivers writable Nodemgr's ignore_drivers variable is exposed as a module load parameter (therefore also as a sysfs attribute below /sys/module) and additionally as an attribute below /sys/bus/ieee1394. Since the latter is writable, make the former writable too. Note, the bus's attribute ignore_drivers is only relevant to newly added units, not to present or suspended or resuming units. Those have their own attribute ignore_driver. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 40fd89cc54a8a67c81b5aa40b22c4f40b39e47b9 Author: Stefan Richter Date: Mon Jul 3 12:02:34 2006 -0400 [PATCH] ieee1394: nodemgr: do not spawn kernel_thread for sysfs rescan nodemgr.c::fw_set_rescan() is used to re-run the driver core over nodemgr's representation of unit directories in order to initiate protocol driver probes. It is initiated via write access to one of nodemgr's sysfs attributes. The purpose is to attach drivers to units after switching a unit's ignore_driver attribute from 1 to 0. It is not really necessary to fork a kernel_thread for this job. The call to kernel_thread() can be eliminated to avoid the deprecated API and to simplify the code a bit. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 1ee0dc51fb68d2d25888250c554492c4926c5ec1 Author: Stefan Richter Date: Mon Jul 3 12:02:33 2006 -0400 [PATCH] ieee1394: nodemgr: remove unnecessary includes Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 45289bf6ac70b106f5000d10b040e4485dd3e9d5 Author: Stefan Richter Date: Mon Jul 3 12:02:33 2006 -0400 [PATCH] ieee1394: raw1394: remove redundant counting semaphore An already existing wait queue replaces raw1394's complete_sem which was maintained in parallel to the wait queue. The role of the semaphore's counter is taken over by a direct check of what was really counted: The presence of items in the list of completed requests. Notes: - raw1394_release() sleeps uninterruptibly until all requests were completed. This is the same behaviour as before the patch. - The macros wait_event and wait_event_interruptible are called with a condition argument which has a side effect, i.e. manipulation of the requests list. This side effect happens only if the condition is true. The patch relies on the fact that wait_event[_interruptible] does not evaluate the condition again after it became true. - The diffstat looks unfavorable with respect to added lines of code. However 19 of them are comments, and some are due to separation of existing code blocks into two small helper functions. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 438bd525e5240a48233cd3290f7fe66ff0167e20 Author: Stefan Richter Date: Mon Jul 3 12:02:32 2006 -0400 [PATCH] ieee1394: dv1394: sem2mutex conversion Signed-off-by: Stefan Richter (not runtime-tested) Signed-off-by: Ben Collins commit d8831d5554c2f295a6746e9d3b4cbd8bb13a540f Author: Stefan Richter Date: Mon Jul 3 12:02:31 2006 -0400 [PATCH] ieee1394: clean up declarations of hpsb_*_config_rom hpsb_update_config_rom() is defined in csr.c, not hosts.c. hpsb_get_config_rom() does not exist. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit d83e7d8e7e9f41a9d0e68aaf24ec4e785dd071bb Author: Stefan Richter Date: Mon Jul 3 12:02:31 2006 -0400 [PATCH] ieee1394: remove unused macros HPSB_PANIC and HPSB_TRACE Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 66faadfac3b8488d27374acaa407e3bd7380131a Author: Stefan Richter Date: Mon Jul 3 12:02:30 2006 -0400 [PATCH] ieee1394: remove redundant code from ieee1394_hotplug.h Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit de4394f13cc843fae2a3ba2df752ee20e6e779a8 Author: Stefan Richter Date: Mon Jul 3 12:02:29 2006 -0400 [PATCH] ieee1394: update #include directives in midlayer header files Remove unnecessary includes, add missing includes. Use forward type declarations for some structs. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit e1d118f16dca0f54faba3e8dd5b6adbbf7ac68c8 Author: Stefan Richter Date: Mon Jul 3 12:02:28 2006 -0400 [PATCH] ieee1394: coding style and comment fixes in midlayer header files Adjust tabulators, line wraps, empty lines, and comment style. Update comments in ieee1394_transactions.h and highlevel.h. Fix typo in comment in csr.h. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 2b01b80b944b3abf623c8acc2b5537a85b5ebd3c Author: Stefan Richter Date: Mon Jul 3 12:02:28 2006 -0400 [PATCH] ieee1394: replace __inline__ by inline Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 433a87d528f685028b6f61fc3d7fae07ed915aa8 Author: Stefan Richter Date: Mon Jul 3 12:02:27 2006 -0400 [PATCH] ieee1394: skip dummy loop in build_speed_map The last loop in ieee1394 core's speed calculation is not required unless ieee1394.h::IEEE1394_SPEED_MAX is changed from its current value of 3. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit f0cbefe63c4347044fffebca24c03f3c6829f322 Author: Stefan Richter Date: Mon Jul 3 12:01:59 2006 -0400 [PATCH] ieee1394: fix calculation of csr->expire This variant of calculate_expire() is more correct and easier to read. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 31a379e1067834868b8f1ce3e409392c42dc0f2b Author: Stefan Richter Date: Mon Jul 3 12:01:58 2006 -0400 [PATCH] ieee1394: sbp2: enable auto spin-up for Maxtor disks At least Maxtor OneTouch III require a "start stop unit" command after auto spin-down before the next access can proceed. This patch activates the responsible code in scsi_mod for all Maxtor SBP-2 disks. https://bugzilla.novell.com/show_bug.cgi?id=183011 Maybe that should be done for all SBP-2 disks, but better be cautious. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 7627899b11ece118b46fbf652e944f9a239f6cd1 Author: Dennis Munsie Date: Tue Jun 20 14:55:55 2006 -0400 intelfb: add preliminary i2c support Adds code to unregister the I2C buses in the cleanup function. Signed-off-by: Dennis Munsie commit 1f6e8449e11fd79ee30456ce7ec973317b8dd6ae Author: Dennis Munsie Date: Tue Jun 20 14:55:55 2006 -0400 intelfb: add preliminary i2c support [07/07] intelfb: adds an option to enable I2C support in the intelfb driver. Also adds the intel_i2c.c file to the Makefile. Signed-off-by: Dennis Munsie commit 41c9480a1d22e8f28b8675a2d7ec7fd4c50bc900 Author: Dennis Munsie Date: Tue Jun 20 14:55:55 2006 -0400 intelfb: add preliminary i2c support [06/07] intelfb: adds intelfb_i2c.c which contains the infrastructure needed to enumerate the i2c busses on the intelfb. Signed-off-by: Dennis Munsie commit dd696ec852dc34c40e2a18cc426c8f462c0715a5 Author: Dennis Munsie Date: Tue Jun 20 14:55:55 2006 -0400 intelfb: add preliminary i2c support [05/07] intelfb: add output fields to dinfo. Signed-off-by: Dennis Munsie commit 399fb4316ab4fe4c46d1e4ed8b12d56c94b4c251 Author: Dennis Munsie Date: Tue Jun 20 14:55:55 2006 -0400 intelfb: add preliminary i2c support [04/07] intelfb: add intelfb_output_rec struct and the constants for it's fields. Signed-off-by: Dennis Munsie commit 183b1214402a205bf6eea2030686249c7d365fd1 Author: Dennis Munsie Date: Tue Jun 20 14:55:55 2006 -0400 intelfb: add preliminary i2c support [03/07] intelfb: add intelfb_i2c_chan struct. Signed-off-by: Dennis Munsie commit 82c10f07c2d7baf6f280f206f9067a4715777962 Author: Dennis Munsie Date: Tue Jun 20 14:55:55 2006 -0400 intelfb: add preliminary i2c support [02/07] intelfb: add GPIO registers. Signed-off-by: Dennis Munsie commit c37bb26654bb8981ea237076e333eb37d4aa2dc6 Author: Dennis Munsie Date: Tue Jun 20 14:55:55 2006 -0400 intelfb: add preliminary i2c support [01/07] i2c: add intelfb bit algorithm id Adds the intelfb bit algorithm id to i2c-id.h. Signed-off-by: Dennis Munsie commit f80d0d23f2010b7682e06449345e8199a2b2619c Author: Eric Hustvedt Date: Tue Jun 20 14:36:42 2006 -0400 intelfb: add vsync interrupt support [05/05] intelfb: Honor FB_ACTIVATE_VBL for display panning Extends the intelfb_vsync struct to store panning offset. The interrupt service routine uses the stored panning offset if a pan is requested for the vsync. intelfbhw_disable_irq also pans the display if there is a pending request. Signed-off-by: Eric Hustvedt commit 37bced38b3d09c3de7c871790eddde81a3ce57cb Author: Eric Hustvedt Date: Tue Jun 20 14:36:42 2006 -0400 intelfb: add vsync interrupt support [04/05] intelfb: implement FBIO_WAITFORVSYNC ioctl The (unofficial) FBIO_WAITFORVSYNC ioctl is implemented by sleeping on the appropriate waitqueue, as defined in my earlier patch. Currently, only display 0 (aka pipe A) is supported. Signed-off-by: Eric Hustvedt commit 7649757bd900bc900adcd95ab08903cdc28342fa Author: Eric Hustvedt Date: Tue Jun 20 14:36:41 2006 -0400 intelfb: add vsync interrupt support [03/05] intelfb: Implement basic interrupt handling Functions have been added to enable and disable interrupts using the MMIO registers. Currently only pipe A vsync interrupts are enabled. A generalized vsync accounting struct is defined, with the intent that it can encapsulate per-pipe vsync related info in the future. Currently a single instance is hard-coded. The interrupt service routine currently only looks for vsync interrupts on pipe A, and increments a counter and wakes up anyone waiting on it. This implementation is heavily influenced by similar implementations in the atyfb and matroxfb drivers. Signed-off-by: Eric Hustvedt commit 9a5f019b1a9ea6a75ba36d7c312ff069006ed479 Author: Eric Hustvedt Date: Tue Jun 20 14:36:41 2006 -0400 intelfb: add vsync interrupt support [02/05] intelfb: Add interrupt related register definitions Add constants for accessing HWSTAM, IER, IIR, and IMR registers. Add constants for interrupt types supported by the 8xx and 9xx chipsets. The registers are also stored in the hwstate struct and dumped in the debug routine. Signed-off-by: Eric Hustvedt commit 3ce6fb4358bce6aced489f798138795163ad3f7c Author: Eric Hustvedt Date: Tue Jun 20 14:36:41 2006 -0400 intelfb: add vsync interrupt support [01/05] intelfb: Add 16-bit register access macros This patch adds macros to read and write two-byte MMIO registers. The interrupt-related registers are all word-sized, rather than long-sized. Signed-off-by: Eric Hustvedt commit d7530a1e767b562c7e071f559d542c132d85fff7 Author: Stefan Richter Date: Mon Jul 3 00:58:01 2006 +0200 [PATCH] ieee1394: fix cosmetic problem in speed probe If ieee1394.h::IEEE1394_SPEED_MAX is bigger than the actual speed of an 1394b host adapter and the speed to another 1394b node was probed, a bigger speed than actually used was kept in host->speed[n]. The only resulting problem so far was sbp2 displaying bogus values in the syslog, e.g. S3200 for actual S800 connections if IEEE1394_SPEED_MAX was S3200. But other high-level drivers which access this field could get into more trouble. (Eth1394 is the only other in-tree driver which does so. It seems it is not affected.) Nodemgr now clips this value according to the host adapter's link speed. A pointer expression in nodemgr_check_speed is also changed for clarity. Signed-off-by: Stefan Richter Signed-off-by: Ben Collins commit 2ab561a116e16cdee3ae0e13d51910634c15aee9 Author: David Mosberger-Tang Date: Wed Jun 21 11:19:22 2006 -0700 [IA64] esi-support Add support for making ESI calls [1]. ESI stands for "Extensible SAL specification" and is basically a way for invoking firmware subroutines which are identified by a GUID. I don't know whether ESI is used by vendors other than HP (if you do, please let me know) but as firmware "backdoors" go, this seems one of the cleaner methods, so it seems reasonable to support it, even though I'm not aware of any publicly documented ESI calls. I'd have liked to make the ESI module completely stand-alone, but unfortunately that is not easily (or not at all) possible because in order to make ESI calls in physical mode, a small stub similar to the EFI stub is needed in the kernel proper. I did try to create a stub that would work in user-level, but it quickly got ugly beyond recognition (e.g., the stub had to make assumptions about how the module-loader generated call-stubs work) and I didn't even get it to work (that's probably fixable, but I didn't bother because I concluded it was too ugly anyhow). While it's not terribly elegant to have kernel code which isn't actively used in the kernel proper, I think it might be worth making an exception here for two reasons: the code is trivially small (all that's really needed is esi_stub.S) and by including it in the normal kernel distro, it might encourage other OEMs to also use ESI, which I think would be far better than each inventing their own firmware "backdoor". The code was originally written by Alex. I just massaged and packaged it a bit (and perhaps messed up some things along the way...). Changes since first version of patch that was posted to mailing list: * Export ia64_esi_call and ia64_esi_call_phys() as GPL symbols. * Disallow building esi.c as a module for now. Building as a module would currently lead to an unresolved reference to "sal_lock" on SMP kernels because that symbol doesn't get exported. * Export esi_call_phys() only if ESI is enabled. * Remove internal stuff from esi.h and add a "proc_type" argument to ia64_esi_call() such that serialization-requirements can be expressed (ESI follows SAL here, where procedure calls may have to be serialized, are MP-safe, or MP-safe andr reentrant). [1] h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,919,00.html Signed-off-by: David Mosberger Signed-off-by: Alex Williamson Signed-off-by: Tony Luck commit 76d08bb3f09054edc45326ce5c698a3f6c45f5d0 Author: Tony Luck Date: Mon Jun 5 13:54:14 2006 -0700 [IA64] Add "model name" to /proc/cpuinfo Linux ia64 port tried to decode the processor family number to something human-readable, but Intel brandnames don't change synchronously with updates to the family number. Adopt a more i386-like approach and just print the family number in decimal. Add a new field "model name" that uses PAL_BRAND_INFO to find the official name for the cpu, or on older systems, falls back to using the well-known codenames (Merced, McKinley, Madison). Signed-off-by: Tony Luck CREDITS | 13 Documentation/00-INDEX | 2 Documentation/ABI/obsolete/devfs | 13 Documentation/ABI/removed/devfs | 12 Documentation/ABI/testing/sysfs-power | 88 Documentation/Changes | 7 Documentation/CodingStyle | 34 Documentation/DocBook/kernel-api.tmpl | 78 Documentation/DocBook/libata.tmpl | 12 Documentation/DocBook/usb.tmpl | 123 Documentation/HOWTO | 23 Documentation/IPMI.txt | 9 Documentation/SubmitChecklist | 5 Documentation/SubmittingDrivers | 21 Documentation/SubmittingPatches | 39 Documentation/accounting/getdelays.c | 7 Documentation/accounting/taskstats-struct.txt | 161 Documentation/cpusets.txt | 10 Documentation/crypto/api-intro.txt | 36 Documentation/devices.txt | 3 Documentation/dontdiff | 1 Documentation/fb/intelfb.txt | 11 Documentation/feature-removal-schedule.txt | 67 Documentation/filesystems/Locking | 5 Documentation/filesystems/proc.txt | 32 Documentation/filesystems/vfs.txt | 4 Documentation/hwmon/it87 | 61 Documentation/hwmon/k8temp | 52 Documentation/hwmon/vt1211 | 206 Documentation/hwmon/w83627ehf | 85 Documentation/hwmon/w83791d | 69 Documentation/i2c/busses/i2c-viapro | 7 Documentation/i2c/i2c-stub | 15 Documentation/input/ff.txt | 112 Documentation/kbuild/kconfig-language.txt | 12 Documentation/kbuild/makefiles.txt | 270 Documentation/kbuild/modules.txt | 161 Documentation/kernel-parameters.txt | 25 Documentation/kprobes.txt | 89 Documentation/lockdep-design.txt | 22 Documentation/netlabel/00-INDEX | 10 Documentation/netlabel/cipso_ipv4.txt | 48 .../netlabel/draft-ietf-cipso-ipsecurity-01.txt | 791 + Documentation/netlabel/introduction.txt | 46 Documentation/netlabel/lsm_interface.txt | 47 Documentation/networking/LICENSE.qla3xxx | 46 Documentation/networking/bonding.txt | 59 Documentation/networking/dccp.txt | 8 Documentation/networking/ip-sysctl.txt | 38 Documentation/networking/pktgen.txt | 16 Documentation/networking/secid.txt | 14 Documentation/nommu-mmap.txt | 46 Documentation/pcieaer-howto.txt | 253 Documentation/power/devices.txt | 733 + Documentation/power/interface.txt | 15 Documentation/rt-mutex-design.txt | 14 Documentation/scsi/ChangeLog.arcmsr | 56 Documentation/scsi/aacraid.txt | 53 Documentation/scsi/arcmsr_spec.txt | 574 + Documentation/scsi/libsas.txt | 484 + Documentation/seclvl.txt | 97 Documentation/sh/new-machine.txt | 128 Documentation/sh/register-banks.txt | 33 Documentation/sound/alsa/ALSA-Configuration.txt | 44 .../sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 5 Documentation/sparse.txt | 8 Documentation/sysctl/vm.txt | 27 Documentation/usb/error-codes.txt | 11 Documentation/usb/usb-serial.txt | 5 Documentation/video4linux/CARDLIST.cx88 | 8 Documentation/video4linux/CARDLIST.saa7134 | 7 Documentation/video4linux/bttv/Insmod-options | 6 Documentation/video4linux/cx2341x/README.hm12 | 116 Documentation/video4linux/cx2341x/README.vbi | 45 Documentation/x86_64/boot-options.txt | 12 Documentation/x86_64/kernel-stacks | 99 Kbuild | 2 MAINTAINERS | 155 Makefile | 161 arch/alpha/Kconfig | 2 arch/alpha/kernel/alpha_ksyms.c | 3 arch/alpha/kernel/entry.S | 10 arch/alpha/kernel/osf_sys.c | 26 arch/alpha/kernel/proto.h | 15 arch/alpha/kernel/srmcons.c | 2 arch/alpha/kernel/time.c | 17 arch/alpha/mm/Makefile | 2 arch/alpha/mm/fault.c | 2 arch/alpha/mm/init.c | 2 arch/alpha/mm/remap.c | 86 arch/arm/Kconfig | 50 arch/arm/Kconfig-nommu | 8 arch/arm/Makefile | 9 arch/arm/boot/compressed/Makefile | 4 arch/arm/boot/compressed/head.S | 22 arch/arm/boot/compressed/misc.c | 21 arch/arm/common/icst307.c | 4 arch/arm/common/icst525.c | 4 arch/arm/common/locomo.c | 61 arch/arm/common/sharpsl_pm.c | 4 arch/arm/configs/ep80219_defconfig | 952 - arch/arm/configs/ep93xx_defconfig | 1 arch/arm/configs/iop32x_defconfig | 1236 + arch/arm/configs/iop33x_defconfig | 1081 + arch/arm/configs/iq31244_defconfig | 922 - arch/arm/configs/iq80321_defconfig | 843 - arch/arm/configs/iq80331_defconfig | 916 - arch/arm/configs/iq80332_defconfig | 916 - arch/arm/configs/s3c2410_defconfig | 46 arch/arm/kernel/apm.c | 33 arch/arm/kernel/debug.S | 35 arch/arm/kernel/ecard.c | 2 arch/arm/kernel/entry-armv.S | 13 arch/arm/kernel/head-nommu.S | 12 arch/arm/kernel/module.c | 8 arch/arm/kernel/process.c | 22 arch/arm/kernel/setup.c | 2 arch/arm/kernel/smp.c | 2 arch/arm/kernel/sys_arm.c | 4 arch/arm/kernel/time.c | 18 arch/arm/kernel/traps.c | 2 arch/arm/mach-at91rm9200/at91rm9200.c | 250 arch/arm/mach-at91rm9200/board-1arm.c | 20 arch/arm/mach-at91rm9200/board-carmeva.c | 21 arch/arm/mach-at91rm9200/board-csb337.c | 20 arch/arm/mach-at91rm9200/board-csb637.c | 20 arch/arm/mach-at91rm9200/board-dk.c | 45 arch/arm/mach-at91rm9200/board-eb9200.c | 20 arch/arm/mach-at91rm9200/board-ek.c | 20 arch/arm/mach-at91rm9200/board-kafa.c | 20 arch/arm/mach-at91rm9200/board-kb9202.c | 45 arch/arm/mach-at91rm9200/clock.c | 324 arch/arm/mach-at91rm9200/clock.h | 30 arch/arm/mach-at91rm9200/devices.c | 72 arch/arm/mach-at91rm9200/generic.h | 20 arch/arm/mach-at91rm9200/gpio.c | 89 arch/arm/mach-at91rm9200/irq.c | 6 arch/arm/mach-at91rm9200/pm.c | 14 arch/arm/mach-ep93xx/Kconfig | 6 arch/arm/mach-ep93xx/Makefile | 1 arch/arm/mach-ep93xx/edb9312.c | 63 arch/arm/mach-footbridge/dc21285.c | 27 arch/arm/mach-iop32x/Kconfig | 35 arch/arm/mach-iop32x/Makefile | 13 arch/arm/mach-iop32x/Makefile.boot | 3 arch/arm/mach-iop32x/glantank.c | 195 arch/arm/mach-iop32x/iq31244.c | 293 arch/arm/mach-iop32x/iq80321.c | 193 arch/arm/mach-iop32x/irq.c | 76 arch/arm/mach-iop32x/n2100.c | 251 arch/arm/mach-iop33x/Kconfig | 21 arch/arm/mach-iop33x/Makefile | 11 arch/arm/mach-iop33x/Makefile.boot | 3 arch/arm/mach-iop33x/iq80331.c | 148 arch/arm/mach-iop33x/iq80332.c | 148 arch/arm/mach-iop33x/irq.c | 127 arch/arm/mach-iop33x/uart.c | 105 arch/arm/mach-iop3xx/Kconfig | 66 arch/arm/mach-iop3xx/Makefile | 23 arch/arm/mach-iop3xx/Makefile.boot | 9 arch/arm/mach-iop3xx/common.c | 72 arch/arm/mach-iop3xx/iop321-irq.c | 97 arch/arm/mach-iop3xx/iop321-pci.c | 220 arch/arm/mach-iop3xx/iop321-setup.c | 173 arch/arm/mach-iop3xx/iop321-time.c | 108 arch/arm/mach-iop3xx/iop331-irq.c | 129 arch/arm/mach-iop3xx/iop331-pci.c | 222 arch/arm/mach-iop3xx/iop331-setup.c | 221 arch/arm/mach-iop3xx/iop331-time.c | 106 arch/arm/mach-iop3xx/iq31244-mm.c | 45 arch/arm/mach-iop3xx/iq31244-pci.c | 129 arch/arm/mach-iop3xx/iq80321-mm.c | 45 arch/arm/mach-iop3xx/iq80321-pci.c | 123 arch/arm/mach-iop3xx/iq80331-mm.c | 35 arch/arm/mach-iop3xx/iq80331-pci.c | 119 arch/arm/mach-iop3xx/iq80332-mm.c | 35 arch/arm/mach-iop3xx/iq80332-pci.c | 125 arch/arm/mach-ixp4xx/common.c | 38 arch/arm/mach-ixp4xx/nslu2-setup.c | 2 arch/arm/mach-omap1/board-fsample.c | 8 arch/arm/mach-omap1/board-h2.c | 11 arch/arm/mach-omap1/board-h3.c | 11 arch/arm/mach-omap1/board-innovator.c | 8 arch/arm/mach-omap1/board-nokia770.c | 8 arch/arm/mach-omap1/board-osk.c | 8 arch/arm/mach-omap1/board-perseus2.c | 9 arch/arm/mach-omap1/clock.c | 107 arch/arm/mach-omap1/clock.h | 14 arch/arm/mach-omap1/mux.c | 11 arch/arm/mach-omap2/board-apollon.c | 7 arch/arm/mach-omap2/board-h4.c | 1 arch/arm/mach-omap2/clock.c | 146 arch/arm/mach-omap2/clock.h | 20 arch/arm/mach-omap2/gpmc.c | 180 arch/arm/mach-omap2/irq.c | 12 arch/arm/mach-omap2/mux.c | 14 arch/arm/mach-omap2/prcm.c | 10 arch/arm/mach-pnx4008/clock.c | 11 arch/arm/mach-pxa/corgi.c | 15 arch/arm/mach-s3c2410/Kconfig | 38 arch/arm/mach-s3c2410/Makefile | 16 arch/arm/mach-s3c2410/bast-irq.c | 4 arch/arm/mach-s3c2410/cpu.c | 9 arch/arm/mach-s3c2410/devs.h | 5 arch/arm/mach-s3c2410/dma.c | 241 arch/arm/mach-s3c2410/dma.h | 45 arch/arm/mach-s3c2410/gpio.c | 16 arch/arm/mach-s3c2410/irq.c | 165 arch/arm/mach-s3c2410/mach-amlm5900.c | 266 arch/arm/mach-s3c2410/mach-anubis.c | 6 arch/arm/mach-s3c2410/mach-smdk2440.c | 9 arch/arm/mach-s3c2410/mach-vstms.c | 168 arch/arm/mach-s3c2410/pm-simtec.c | 3 arch/arm/mach-s3c2410/pm.c | 72 arch/arm/mach-s3c2410/pm.h | 16 arch/arm/mach-s3c2410/s3c2410-dma.c | 158 arch/arm/mach-s3c2410/s3c2410-irq.c | 48 arch/arm/mach-s3c2410/s3c2410-pm.c | 120 arch/arm/mach-s3c2410/s3c2410-sleep.S | 68 arch/arm/mach-s3c2410/s3c2410.c | 11 arch/arm/mach-s3c2410/s3c2412-dma.c | 160 arch/arm/mach-s3c2410/s3c2412-irq.c | 3 arch/arm/mach-s3c2410/s3c2412-pm.c | 128 arch/arm/mach-s3c2410/s3c2412.c | 61 arch/arm/mach-s3c2410/s3c2440-dma.c | 164 arch/arm/mach-s3c2410/s3c2440-dsc.c | 5 arch/arm/mach-s3c2410/s3c2440-irq.c | 2 arch/arm/mach-s3c2410/s3c244x-irq.c | 9 arch/arm/mach-s3c2410/sleep.S | 54 arch/arm/mach-s3c2410/usb-simtec.c | 6 arch/arm/mach-sa1100/collie.c | 23 arch/arm/mach-versatile/pci.c | 1 arch/arm/mm/Kconfig | 154 arch/arm/mm/Makefile | 10 arch/arm/mm/abort-lv4t.S | 7 arch/arm/mm/abort-nommu.S | 19 arch/arm/mm/alignment.c | 2 arch/arm/mm/cache-v4.S | 10 arch/arm/mm/context.c | 45 arch/arm/mm/copypage-v4mc.c | 4 arch/arm/mm/copypage-v6.c | 4 arch/arm/mm/copypage-xscale.c | 4 arch/arm/mm/fault.c | 19 arch/arm/mm/fault.h | 5 arch/arm/mm/flush.c | 6 arch/arm/mm/init.c | 224 arch/arm/mm/ioremap.c | 2 arch/arm/mm/mm-armv.c | 663 - arch/arm/mm/mm.h | 22 arch/arm/mm/mmap.c | 22 arch/arm/mm/mmu.c | 768 + arch/arm/mm/nommu.c | 43 arch/arm/mm/pgd.c | 101 arch/arm/mm/proc-arm740.S | 174 arch/arm/mm/proc-arm7tdmi.S | 249 arch/arm/mm/proc-arm940.S | 369 arch/arm/mm/proc-arm946.S | 424 arch/arm/mm/proc-arm9tdmi.S | 134 arch/arm/mm/proc-xscale.S | 58 arch/arm/oprofile/op_model_xscale.c | 10 arch/arm/plat-iop/Makefile | 8 arch/arm/plat-iop/gpio.c | 48 arch/arm/plat-iop/i2c.c | 81 arch/arm/plat-iop/pci.c | 247 arch/arm/plat-iop/setup.c | 38 arch/arm/plat-iop/time.c | 98 arch/arm/plat-omap/clock.c | 26 arch/arm/plat-omap/devices.c | 20 arch/arm/plat-omap/dma.c | 95 arch/arm/plat-omap/dmtimer.c | 76 arch/arm/plat-omap/gpio.c | 45 arch/arm/plat-omap/mcbsp.c | 9 arch/arm/plat-omap/pm.c | 670 - arch/arm/plat-omap/sram.c | 5 arch/arm/plat-omap/timer32k.c | 38 arch/arm/plat-omap/usb.c | 2 arch/arm/tools/mach-types | 74 arch/arm/vfp/vfp.h | 15 arch/arm/vfp/vfpdouble.c | 95 arch/arm/vfp/vfpinstr.h | 8 arch/arm/vfp/vfpmodule.c | 40 arch/arm/vfp/vfpsingle.c | 95 arch/arm26/kernel/setup.c | 2 arch/arm26/kernel/sys_arm.c | 4 arch/arm26/kernel/time.c | 14 arch/arm26/mm/fault.c | 4 arch/avr32/Kconfig | 196 arch/avr32/Kconfig.debug | 19 arch/avr32/Makefile | 84 arch/avr32/boards/atstk1000/Makefile | 2 arch/avr32/boards/atstk1000/atstk1002.c | 37 arch/avr32/boards/atstk1000/flash.c | 95 arch/avr32/boards/atstk1000/setup.c | 59 arch/avr32/boards/atstk1000/spi.c | 27 arch/avr32/boot/images/Makefile | 62 arch/avr32/boot/u-boot/Makefile | 3 arch/avr32/boot/u-boot/empty.S | 1 arch/avr32/boot/u-boot/head.S | 60 arch/avr32/configs/atstk1002_defconfig | 754 + arch/avr32/kernel/Makefile | 18 arch/avr32/kernel/asm-offsets.c | 25 arch/avr32/kernel/avr32_ksyms.c | 55 arch/avr32/kernel/cpu.c | 327 arch/avr32/kernel/entry-avr32b.S | 678 + arch/avr32/kernel/head.S | 45 arch/avr32/kernel/init_task.c | 38 arch/avr32/kernel/irq.c | 71 arch/avr32/kernel/kprobes.c | 270 arch/avr32/kernel/module.c | 324 arch/avr32/kernel/process.c | 276 arch/avr32/kernel/ptrace.c | 371 arch/avr32/kernel/semaphore.c | 148 arch/avr32/kernel/setup.c | 335 arch/avr32/kernel/signal.c | 328 arch/avr32/kernel/switch_to.S | 35 arch/avr32/kernel/sys_avr32.c | 65 arch/avr32/kernel/syscall-stubs.S | 102 arch/avr32/kernel/syscall_table.S | 289 arch/avr32/kernel/time.c | 238 arch/avr32/kernel/traps.c | 425 arch/avr32/kernel/vmlinux.lds.c | 139 arch/avr32/lib/Makefile | 10 arch/avr32/lib/__avr32_asr64.S | 31 arch/avr32/lib/__avr32_lsl64.S | 31 arch/avr32/lib/__avr32_lsr64.S | 31 arch/avr32/lib/clear_user.S | 76 arch/avr32/lib/copy_user.S | 119 arch/avr32/lib/csum_partial.S | 47 arch/avr32/lib/csum_partial_copy_generic.S | 99 arch/avr32/lib/delay.c | 55 arch/avr32/lib/findbit.S | 154 arch/avr32/lib/io-readsl.S | 24 arch/avr32/lib/io-readsw.S | 43 arch/avr32/lib/io-writesl.S | 20 arch/avr32/lib/io-writesw.S | 38 arch/avr32/lib/libgcc.h | 33 arch/avr32/lib/longlong.h | 98 arch/avr32/lib/memcpy.S | 62 arch/avr32/lib/memset.S | 72 arch/avr32/lib/strncpy_from_user.S | 60 arch/avr32/lib/strnlen_user.S | 67 arch/avr32/mach-at32ap/Makefile | 2 arch/avr32/mach-at32ap/at32ap.c | 90 arch/avr32/mach-at32ap/at32ap7000.c | 876 + arch/avr32/mach-at32ap/clock.c | 148 arch/avr32/mach-at32ap/clock.h | 30 arch/avr32/mach-at32ap/extint.c | 171 arch/avr32/mach-at32ap/hsmc.c | 164 arch/avr32/mach-at32ap/hsmc.h | 127 arch/avr32/mach-at32ap/intc.c | 133 arch/avr32/mach-at32ap/intc.h | 327 arch/avr32/mach-at32ap/pio.c | 118 arch/avr32/mach-at32ap/pio.h | 178 arch/avr32/mach-at32ap/sm.c | 289 arch/avr32/mach-at32ap/sm.h | 240 arch/avr32/mm/Makefile | 6 arch/avr32/mm/cache.c | 150 arch/avr32/mm/clear_page.S | 25 arch/avr32/mm/copy_page.S | 28 arch/avr32/mm/dma-coherent.c | 139 arch/avr32/mm/fault.c | 315 arch/avr32/mm/init.c | 480 + arch/avr32/mm/ioremap.c | 89 arch/avr32/mm/tlb.c | 380 arch/cris/arch-v10/kernel/time.c | 2 arch/cris/arch-v32/kernel/smp.c | 1 arch/cris/arch-v32/kernel/time.c | 2 arch/cris/kernel/setup.c | 2 arch/cris/kernel/time.c | 7 arch/cris/mm/ioremap.c | 88 arch/frv/Kconfig | 12 arch/frv/Makefile | 5 arch/frv/boot/Makefile | 3 arch/frv/kernel/Makefile | 7 arch/frv/kernel/irq-mb93091.c | 157 arch/frv/kernel/irq-mb93093.c | 115 arch/frv/kernel/irq-mb93493.c | 160 arch/frv/kernel/irq-routing.c | 291 arch/frv/kernel/irq.c | 741 - arch/frv/kernel/kernel_execve.S | 33 arch/frv/kernel/setup.c | 1 arch/frv/kernel/time.c | 3 arch/frv/mb93090-mb00/pci-irq.c | 1 arch/frv/mm/init.c | 2 arch/h8300/kernel/sys_h8300.c | 24 arch/h8300/kernel/time.c | 2 arch/h8300/mm/init.c | 2 arch/i386/Kconfig | 37 arch/i386/Makefile | 8 arch/i386/boot/edd.S | 97 arch/i386/boot/setup.S | 4 arch/i386/boot/video.S | 2 arch/i386/crypto/Makefile | 3 arch/i386/crypto/aes.c | 3 arch/i386/crypto/twofish-i586-asm.S | 335 arch/i386/crypto/twofish.c | 97 arch/i386/defconfig | 1066 + arch/i386/kernel/Makefile | 3 arch/i386/kernel/acpi/Makefile | 2 arch/i386/kernel/acpi/boot.c | 181 arch/i386/kernel/acpi/earlyquirk.c | 6 arch/i386/kernel/apic.c | 31 arch/i386/kernel/apm.c | 62 arch/i386/kernel/cpu/amd.c | 7 arch/i386/kernel/cpu/centaur.c | 24 arch/i386/kernel/cpu/common.c | 8 arch/i386/kernel/cpu/cpu.h | 2 arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 42 arch/i386/kernel/cpu/cpufreq/longhaul.c | 214 arch/i386/kernel/cpu/cpufreq/longhaul.h | 48 arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | 42 arch/i386/kernel/cpu/cyrix.c | 42 arch/i386/kernel/cpu/intel.c | 3 arch/i386/kernel/cpu/mcheck/Makefile | 2 arch/i386/kernel/cpu/mcheck/p4.c | 26 arch/i386/kernel/cpu/mcheck/therm_throt.c | 180 arch/i386/kernel/cpu/mtrr/generic.c | 4 arch/i386/kernel/cpu/nexgen.c | 9 arch/i386/kernel/cpu/proc.c | 4 arch/i386/kernel/cpu/rise.c | 4 arch/i386/kernel/cpu/transmeta.c | 7 arch/i386/kernel/cpu/umc.c | 7 arch/i386/kernel/crash.c | 32 arch/i386/kernel/efi.c | 4 arch/i386/kernel/efi_stub.S | 1 arch/i386/kernel/entry.S | 110 arch/i386/kernel/head.S | 67 arch/i386/kernel/i8237.c | 5 arch/i386/kernel/i8259.c | 6 arch/i386/kernel/io_apic.c | 125 arch/i386/kernel/kprobes.c | 41 arch/i386/kernel/machine_kexec.c | 140 arch/i386/kernel/mca.c | 8 arch/i386/kernel/microcode.c | 774 + arch/i386/kernel/mpparse.c | 70 arch/i386/kernel/nmi.c | 944 + arch/i386/kernel/process.c | 25 arch/i386/kernel/ptrace.c | 10 arch/i386/kernel/reboot.c | 12 arch/i386/kernel/relocate_kernel.S | 162 arch/i386/kernel/semaphore.c | 134 arch/i386/kernel/setup.c | 418 arch/i386/kernel/smp.c | 93 arch/i386/kernel/smpboot.c | 31 arch/i386/kernel/srat.c | 109 arch/i386/kernel/stacktrace.c | 98 arch/i386/kernel/sys_i386.c | 42 arch/i386/kernel/syscall_table.S | 1 arch/i386/kernel/time.c | 76 arch/i386/kernel/time_hpet.c | 37 arch/i386/kernel/topology.c | 21 arch/i386/kernel/traps.c | 250 arch/i386/kernel/tsc.c | 2 arch/i386/kernel/vmlinux.lds.S | 12 arch/i386/lib/Makefile | 2 arch/i386/lib/delay.c | 1 arch/i386/lib/semaphore.S | 217 arch/i386/lib/usercopy.c | 2 arch/i386/mach-generic/bigsmp.c | 1 arch/i386/mach-generic/es7000.c | 1 arch/i386/mach-generic/probe.c | 60 arch/i386/mach-generic/summit.c | 1 arch/i386/mach-voyager/voyager_smp.c | 7 arch/i386/mach-voyager/voyager_thread.c | 1 arch/i386/mm/boot_ioremap.c | 7 arch/i386/mm/discontig.c | 105 arch/i386/mm/extable.c | 2 arch/i386/mm/fault.c | 29 arch/i386/mm/highmem.c | 20 arch/i386/mm/init.c | 83 arch/i386/mm/ioremap.c | 84 arch/i386/mm/pgtable.c | 30 arch/i386/oprofile/nmi_int.c | 88 arch/i386/oprofile/nmi_timer_int.c | 35 arch/i386/oprofile/op_model_athlon.c | 54 arch/i386/oprofile/op_model_p4.c | 152 arch/i386/oprofile/op_model_ppro.c | 71 arch/i386/oprofile/op_x86_model.h | 1 arch/i386/pci/Makefile | 2 arch/i386/pci/common.c | 4 arch/i386/pci/direct.c | 25 arch/i386/pci/early.c | 52 arch/i386/pci/init.c | 9 arch/i386/pci/mmconfig.c | 46 arch/i386/pci/pci.h | 7 arch/i386/power/swsusp.S | 2 arch/ia64/Kconfig | 22 arch/ia64/hp/sim/simeth.c | 4 arch/ia64/hp/sim/simserial.c | 2 arch/ia64/ia32/sys_ia32.c | 2 arch/ia64/kernel/Makefile | 5 arch/ia64/kernel/acpi.c | 13 arch/ia64/kernel/entry.S | 8 arch/ia64/kernel/esi.c | 205 arch/ia64/kernel/esi_stub.S | 96 arch/ia64/kernel/ia64_ksyms.c | 4 arch/ia64/kernel/kprobes.c | 157 arch/ia64/kernel/mca.c | 236 arch/ia64/kernel/mca_asm.S | 9 arch/ia64/kernel/mca_drv.c | 54 arch/ia64/kernel/mca_drv.h | 4 arch/ia64/kernel/numa.c | 35 arch/ia64/kernel/perfmon.c | 114 arch/ia64/kernel/process.c | 2 arch/ia64/kernel/salinfo.c | 4 arch/ia64/kernel/setup.c | 41 arch/ia64/kernel/smpboot.c | 24 arch/ia64/kernel/time.c | 4 arch/ia64/kernel/topology.c | 4 arch/ia64/kernel/uncached.c | 2 arch/ia64/kernel/vmlinux.lds.S | 8 arch/ia64/mm/contig.c | 84 arch/ia64/mm/discontig.c | 72 arch/ia64/mm/fault.c | 8 arch/ia64/mm/init.c | 12 arch/ia64/mm/numa.c | 18 arch/ia64/pci/pci.c | 3 arch/ia64/sn/kernel/bte.c | 3 arch/ia64/sn/kernel/sn2/sn_hwperf.c | 5 arch/ia64/sn/pci/pcibr/pcibr_ate.c | 2 arch/ia64/sn/pci/pcibr/pcibr_dma.c | 2 arch/m32r/kernel/sys_m32r.c | 22 arch/m32r/kernel/time.c | 13 arch/m32r/mm/fault.c | 2 arch/m32r/mm/init.c | 2 arch/m32r/mm/ioremap.c | 93 arch/m68k/kernel/sys_m68k.c | 16 arch/m68k/kernel/time.c | 18 arch/m68k/mm/fault.c | 4 arch/m68k/sun3/sun3ints.c | 2 arch/m68knommu/kernel/sys_m68k.c | 15 arch/m68knommu/kernel/time.c | 9 arch/m68knommu/mm/init.c | 2 arch/mips/Kconfig | 55 arch/mips/Makefile | 8 arch/mips/au1000/common/dbdma.c | 10 arch/mips/au1000/common/time.c | 6 arch/mips/au1000/db1x00/Makefile | 1 arch/mips/au1000/db1x00/mirage_ts.c | 260 arch/mips/basler/excite/excite_device.c | 16 arch/mips/basler/excite/excite_flashtest.c | 294 arch/mips/basler/excite/excite_fpga.h | 80 arch/mips/configs/atlas_defconfig | 6 arch/mips/configs/bigsur_defconfig | 4 arch/mips/configs/capcella_defconfig | 4 arch/mips/configs/cobalt_defconfig | 6 arch/mips/configs/db1000_defconfig | 4 arch/mips/configs/db1100_defconfig | 4 arch/mips/configs/db1200_defconfig | 4 arch/mips/configs/db1500_defconfig | 4 arch/mips/configs/db1550_defconfig | 4 arch/mips/configs/ddb5477_defconfig | 4 arch/mips/configs/decstation_defconfig | 4 arch/mips/configs/e55_defconfig | 13 arch/mips/configs/emma2rh_defconfig | 4 arch/mips/configs/ev64120_defconfig | 4 arch/mips/configs/ev96100_defconfig | 850 - arch/mips/configs/excite_defconfig | 4 arch/mips/configs/ip22_defconfig | 6 arch/mips/configs/ip27_defconfig | 6 arch/mips/configs/ip32_defconfig | 4 arch/mips/configs/it8172_defconfig | 4 arch/mips/configs/ivr_defconfig | 4 arch/mips/configs/jaguar-atx_defconfig | 6 arch/mips/configs/jmr3927_defconfig | 4 arch/mips/configs/lasat200_defconfig | 6 arch/mips/configs/malta_defconfig | 6 arch/mips/configs/mipssim_defconfig | 4 arch/mips/configs/mpc30x_defconfig | 15 arch/mips/configs/ocelot_3_defconfig | 4 arch/mips/configs/ocelot_c_defconfig | 6 arch/mips/configs/ocelot_defconfig | 6 arch/mips/configs/ocelot_g_defconfig | 6 arch/mips/configs/pb1100_defconfig | 4 arch/mips/configs/pb1500_defconfig | 4 arch/mips/configs/pb1550_defconfig | 4 arch/mips/configs/pnx8550-jbs_defconfig | 4 arch/mips/configs/pnx8550-v2pci_defconfig | 4 arch/mips/configs/qemu_defconfig | 6 arch/mips/configs/rbhma4500_defconfig | 4 arch/mips/configs/rm200_defconfig | 6 arch/mips/configs/sb1250-swarm_defconfig | 4 arch/mips/configs/sead_defconfig | 4 arch/mips/configs/tb0226_defconfig | 4 arch/mips/configs/tb0229_defconfig | 4 arch/mips/configs/tb0287_defconfig | 4 arch/mips/configs/workpad_defconfig | 13 arch/mips/configs/wrppmc_defconfig | 4 arch/mips/configs/yosemite_defconfig | 4 arch/mips/defconfig | 8 arch/mips/galileo-boards/ev96100/Makefile | 9 arch/mips/galileo-boards/ev96100/init.c | 173 arch/mips/galileo-boards/ev96100/irq.c | 77 arch/mips/galileo-boards/ev96100/puts.c | 138 arch/mips/galileo-boards/ev96100/reset.c | 70 arch/mips/galileo-boards/ev96100/setup.c | 159 arch/mips/galileo-boards/ev96100/time.c | 88 arch/mips/gt64120/common/time.c | 2 arch/mips/kernel/Makefile | 1 arch/mips/kernel/cpu-probe.c | 62 arch/mips/kernel/genex.S | 8 arch/mips/kernel/i8259.c | 4 arch/mips/kernel/irixsig.c | 63 arch/mips/kernel/linux32.c | 12 arch/mips/kernel/process.c | 282 arch/mips/kernel/scall32-o32.S | 15 arch/mips/kernel/scall64-64.S | 4 arch/mips/kernel/scall64-n32.S | 8 arch/mips/kernel/scall64-o32.S | 6 arch/mips/kernel/setup.c | 439 arch/mips/kernel/signal.c | 8 arch/mips/kernel/signal32.c | 7 arch/mips/kernel/smp-mt.c | 2 arch/mips/kernel/smtc-asm.S | 2 arch/mips/kernel/stacktrace.c | 85 arch/mips/kernel/syscall.c | 60 arch/mips/kernel/sysirix.c | 12 arch/mips/kernel/time.c | 14 arch/mips/kernel/traps.c | 116 arch/mips/kernel/vpe.c | 6 arch/mips/mips-boards/atlas/atlas_int.c | 105 arch/mips/mips-boards/atlas/atlas_setup.c | 2 arch/mips/mips-boards/generic/time.c | 64 arch/mips/mm/c-r3k.c | 21 arch/mips/mm/c-r4k.c | 101 arch/mips/mm/c-sb1.c | 105 arch/mips/mm/c-tx39.c | 29 arch/mips/mm/cache.c | 17 arch/mips/mm/fault.c | 4 arch/mips/mm/init.c | 4 arch/mips/mm/tlb-r4k.c | 21 arch/mips/mm/tlbex-fault.S | 4 arch/mips/momentum/ocelot_g/gt-irq.c | 2 arch/mips/pci/Makefile | 4 arch/mips/pci/fixup-atlas.c | 20 arch/mips/pci/fixup-ev96100.c | 48 arch/mips/pci/ops-au1000.c | 2 arch/mips/pci/ops-gt96100.c | 169 arch/mips/pci/pci-ev96100.c | 63 arch/mips/pci/pci-ip27.c | 2 arch/mips/sgi-ip22/ip22-reset.c | 3 arch/mips/sgi-ip27/ip27-memory.c | 3 arch/mips/sgi-ip27/ip27-timer.c | 4 arch/mips/sgi-ip32/ip32-reset.c | 2 arch/mips/sibyte/bcm1480/irq.c | 19 arch/mips/sibyte/sb1250/irq.c | 17 arch/parisc/hpux/sys_hpux.c | 37 arch/parisc/kernel/firmware.c | 7 arch/parisc/kernel/module.c | 32 arch/parisc/kernel/process.c | 9 arch/parisc/kernel/time.c | 7 arch/parisc/mm/init.c | 4 arch/powerpc/Kconfig | 23 arch/powerpc/Kconfig.debug | 16 arch/powerpc/boot/Makefile | 7 arch/powerpc/boot/dts/mpc8349emds.dts | 16 arch/powerpc/boot/flatdevtree.h | 46 arch/powerpc/boot/main.c | 250 arch/powerpc/boot/of.c | 283 arch/powerpc/boot/ops.h | 100 arch/powerpc/boot/prom.c | 165 arch/powerpc/boot/prom.h | 41 arch/powerpc/boot/stdio.c | 4 arch/powerpc/boot/stdio.h | 8 arch/powerpc/boot/types.h | 23 arch/powerpc/configs/maple_defconfig | 2 arch/powerpc/kernel/Makefile | 4 arch/powerpc/kernel/asm-offsets.c | 17 arch/powerpc/kernel/btext.c | 24 arch/powerpc/kernel/cpu_setup_power4.S | 227 arch/powerpc/kernel/cpu_setup_ppc970.S | 176 arch/powerpc/kernel/cputable.c | 21 arch/powerpc/kernel/crash_dump.c | 2 arch/powerpc/kernel/dma_64.c | 65 arch/powerpc/kernel/entry_64.S | 8 arch/powerpc/kernel/head_64.S | 54 arch/powerpc/kernel/ibmebus.c | 6 arch/powerpc/kernel/io.c | 131 arch/powerpc/kernel/irq.c | 5 arch/powerpc/kernel/kprobes.c | 33 arch/powerpc/kernel/legacy_serial.c | 35 arch/powerpc/kernel/lparcfg.c | 30 arch/powerpc/kernel/machine_kexec_64.c | 10 arch/powerpc/kernel/misc.S | 159 arch/powerpc/kernel/misc_32.S | 2 arch/powerpc/kernel/misc_64.S | 2 arch/powerpc/kernel/of_device.c | 24 arch/powerpc/kernel/paca.c | 15 arch/powerpc/kernel/pci_32.c | 39 arch/powerpc/kernel/pci_64.c | 67 arch/powerpc/kernel/pci_dn.c | 13 arch/powerpc/kernel/ppc_ksyms.c | 19 arch/powerpc/kernel/process.c | 2 arch/powerpc/kernel/prom.c | 44 arch/powerpc/kernel/prom_init.c | 10 arch/powerpc/kernel/prom_parse.c | 90 arch/powerpc/kernel/rtas-proc.c | 25 arch/powerpc/kernel/rtas.c | 47 arch/powerpc/kernel/rtas_pci.c | 28 arch/powerpc/kernel/setup-common.c | 32 arch/powerpc/kernel/setup_32.c | 4 arch/powerpc/kernel/setup_64.c | 30 arch/powerpc/kernel/swsusp_32.S | 4 arch/powerpc/kernel/sys_ppc32.c | 2 arch/powerpc/kernel/syscalls.c | 14 arch/powerpc/kernel/sysfs.c | 9 arch/powerpc/kernel/time.c | 17 arch/powerpc/kernel/traps.c | 25 arch/powerpc/kernel/vio.c | 16 arch/powerpc/lib/Makefile | 1 arch/powerpc/lib/e2a.c | 116 arch/powerpc/lib/locks.c | 27 arch/powerpc/mm/fault.c | 4 arch/powerpc/mm/mem.c | 51 arch/powerpc/mm/numa.c | 190 arch/powerpc/mm/slb.c | 37 arch/powerpc/mm/tlb_64.c | 1 arch/powerpc/platforms/83xx/mpc834x_itx.c | 4 arch/powerpc/platforms/83xx/mpc834x_sys.c | 4 arch/powerpc/platforms/83xx/pci.c | 4 arch/powerpc/platforms/85xx/mpc85xx_ads.c | 4 arch/powerpc/platforms/85xx/mpc85xx_cds.c | 4 arch/powerpc/platforms/85xx/pci.c | 4 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 4 arch/powerpc/platforms/86xx/pci.c | 4 arch/powerpc/platforms/Makefile | 1 arch/powerpc/platforms/cell/cbe_regs.c | 8 arch/powerpc/platforms/cell/interrupt.c | 25 arch/powerpc/platforms/cell/iommu.c | 22 arch/powerpc/platforms/cell/setup.c | 4 arch/powerpc/platforms/cell/smp.c | 4 arch/powerpc/platforms/cell/spider-pic.c | 10 arch/powerpc/platforms/cell/spu_base.c | 18 arch/powerpc/platforms/cell/spufs/inode.c | 3 arch/powerpc/platforms/chrp/nvram.c | 5 arch/powerpc/platforms/chrp/pci.c | 53 arch/powerpc/platforms/chrp/setup.c | 48 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 8 arch/powerpc/platforms/iseries/Kconfig | 8 arch/powerpc/platforms/iseries/dt.c | 45 arch/powerpc/platforms/iseries/hvlpconfig.c | 13 arch/powerpc/platforms/iseries/iommu.c | 19 arch/powerpc/platforms/iseries/it_exp_vpd_panel.h | 51 arch/powerpc/platforms/iseries/it_lp_naca.h | 80 arch/powerpc/platforms/iseries/lpardata.c | 6 arch/powerpc/platforms/iseries/lpevents.c | 2 arch/powerpc/platforms/iseries/main_store.h | 126 arch/powerpc/platforms/iseries/mf.c | 2 arch/powerpc/platforms/iseries/pci.c | 289 arch/powerpc/platforms/iseries/setup.c | 1 arch/powerpc/platforms/iseries/viopath.c | 28 arch/powerpc/platforms/iseries/vpdinfo.c | 22 arch/powerpc/platforms/maple/pci.c | 70 arch/powerpc/platforms/maple/setup.c | 27 arch/powerpc/platforms/pasemi/Makefile | 1 arch/powerpc/platforms/pasemi/pasemi.h | 8 arch/powerpc/platforms/pasemi/pci.c | 198 arch/powerpc/platforms/pasemi/setup.c | 188 arch/powerpc/platforms/pasemi/time.c | 29 arch/powerpc/platforms/powermac/backlight.c | 3 arch/powerpc/platforms/powermac/cpufreq_32.c | 23 arch/powerpc/platforms/powermac/cpufreq_64.c | 29 arch/powerpc/platforms/powermac/feature.c | 30 arch/powerpc/platforms/powermac/low_i2c.c | 24 arch/powerpc/platforms/powermac/nvram.c | 4 arch/powerpc/platforms/powermac/pci.c | 37 arch/powerpc/platforms/powermac/pfunc_base.c | 2 arch/powerpc/platforms/powermac/pfunc_core.c | 5 arch/powerpc/platforms/powermac/setup.c | 18 arch/powerpc/platforms/powermac/smp.c | 9 arch/powerpc/platforms/powermac/udbg_scc.c | 10 arch/powerpc/platforms/pseries/Makefile | 1 arch/powerpc/platforms/pseries/eeh.c | 96 arch/powerpc/platforms/pseries/eeh_cache.c | 17 arch/powerpc/platforms/pseries/eeh_driver.c | 112 arch/powerpc/platforms/pseries/eeh_event.c | 4 arch/powerpc/platforms/pseries/firmware.c | 2 arch/powerpc/platforms/pseries/hvCall.S | 273 arch/powerpc/platforms/pseries/hvCall_inst.c | 129 arch/powerpc/platforms/pseries/hvconsole.c | 5 arch/powerpc/platforms/pseries/iommu.c | 13 arch/powerpc/platforms/pseries/lpar.c | 46 arch/powerpc/platforms/pseries/nvram.c | 5 arch/powerpc/platforms/pseries/pci.c | 2 arch/powerpc/platforms/pseries/plpar_wrappers.h | 107 arch/powerpc/platforms/pseries/ras.c | 6 arch/powerpc/platforms/pseries/rtasd.c | 4 arch/powerpc/platforms/pseries/setup.c | 50 arch/powerpc/platforms/pseries/smp.c | 12 arch/powerpc/platforms/pseries/xics.c | 44 arch/powerpc/sysdev/fsl_soc.c | 28 arch/powerpc/sysdev/fsl_soc.h | 2 arch/powerpc/sysdev/i8259.c | 2 arch/powerpc/sysdev/ipic.c | 42 arch/powerpc/sysdev/mmio_nvram.c | 4 arch/powerpc/sysdev/mpic.c | 2 arch/powerpc/sysdev/tsi108_pci.c | 4 arch/powerpc/xmon/xmon.c | 10 arch/ppc/4xx_io/serial_sicc.c | 2 arch/ppc/Kconfig | 9 arch/ppc/kernel/misc.S | 106 arch/ppc/kernel/ppc_ksyms.c | 9 arch/ppc/kernel/setup.c | 21 arch/ppc/kernel/time.c | 13 arch/ppc/kernel/traps.c | 2 arch/ppc/mm/fault.c | 4 arch/ppc/mm/init.c | 23 arch/ppc/platforms/85xx/sbc8560.h | 1 arch/ppc/platforms/85xx/sbc85xx.h | 18 arch/ppc/syslib/m8260_pci_erratum9.c | 16 arch/ppc/xmon/start.c | 28 arch/ppc/xmon/xmon.c | 28 arch/s390/Kconfig | 29 arch/s390/Makefile | 1 arch/s390/appldata/appldata.h | 16 arch/s390/appldata/appldata_base.c | 85 arch/s390/appldata/appldata_mem.c | 3 arch/s390/appldata/appldata_os.c | 1 arch/s390/crypto/aes_s390.c | 285 arch/s390/crypto/crypt_s390.h | 207 arch/s390/crypto/des_s390.c | 559 - arch/s390/crypto/sha1_s390.c | 2 arch/s390/crypto/sha256_s390.c | 2 arch/s390/defconfig | 1 arch/s390/hypfs/hypfs.h | 2 arch/s390/hypfs/hypfs_diag.c | 42 arch/s390/hypfs/hypfs_diag.h | 2 arch/s390/hypfs/inode.c | 36 arch/s390/kernel/Makefile | 3 arch/s390/kernel/compat_linux.c | 7 arch/s390/kernel/compat_wrapper.S | 442 arch/s390/kernel/cpcmd.c | 83 arch/s390/kernel/debug.c | 2 arch/s390/kernel/entry.S | 481 - arch/s390/kernel/entry64.S | 459 arch/s390/kernel/head.S | 691 - arch/s390/kernel/head31.S | 59 arch/s390/kernel/head64.S | 472 - arch/s390/kernel/ipl.c | 933 + arch/s390/kernel/kprobes.c | 662 + arch/s390/kernel/process.c | 5 arch/s390/kernel/reipl.S | 108 arch/s390/kernel/reipl64.S | 127 arch/s390/kernel/reipl_diag.c | 39 arch/s390/kernel/relocate_kernel.S | 74 arch/s390/kernel/relocate_kernel64.S | 82 arch/s390/kernel/s390_ksyms.c | 6 arch/s390/kernel/semaphore.c | 22 arch/s390/kernel/setup.c | 274 arch/s390/kernel/signal.c | 40 arch/s390/kernel/smp.c | 83 arch/s390/kernel/stacktrace.c | 17 arch/s390/kernel/sys_s390.c | 20 arch/s390/kernel/time.c | 26 arch/s390/kernel/traps.c | 34 arch/s390/kernel/vmlinux.lds.S | 3 arch/s390/lib/Makefile | 5 arch/s390/lib/delay.c | 11 arch/s390/lib/div64.c | 151 arch/s390/lib/spinlock.c | 62 arch/s390/lib/uaccess.S | 211 arch/s390/lib/uaccess64.S | 207 arch/s390/lib/uaccess_mvcos.c | 166 arch/s390/lib/uaccess_std.c | 356 arch/s390/math-emu/math.c | 126 arch/s390/math-emu/sfp-util.h | 73 arch/s390/mm/cmm.c | 225 arch/s390/mm/extmem.c | 16 arch/s390/mm/fault.c | 77 arch/s390/mm/init.c | 77 arch/sh/Kconfig | 173 arch/sh/Kconfig.debug | 36 arch/sh/Makefile | 40 arch/sh/boards/adx/Makefile | 6 arch/sh/boards/adx/irq.c | 31 arch/sh/boards/adx/irq_maskreg.c | 106 arch/sh/boards/adx/setup.c | 56 arch/sh/boards/bigsur/irq.c | 47 arch/sh/boards/bigsur/setup.c | 47 arch/sh/boards/cat68701/Makefile | 6 arch/sh/boards/cat68701/irq.c | 28 arch/sh/boards/cat68701/setup.c | 85 arch/sh/boards/cqreek/Makefile | 6 arch/sh/boards/cqreek/irq.c | 128 arch/sh/boards/cqreek/setup.c | 100 arch/sh/boards/dmida/Makefile | 7 arch/sh/boards/dmida/mach.c | 59 arch/sh/boards/dreamcast/irq.c | 15 arch/sh/boards/dreamcast/rtc.c | 22 arch/sh/boards/dreamcast/setup.c | 40 arch/sh/boards/ec3104/setup.c | 49 arch/sh/boards/harp/Makefile | 8 arch/sh/boards/harp/irq.c | 147 arch/sh/boards/harp/led.c | 51 arch/sh/boards/harp/mach.c | 62 arch/sh/boards/harp/pcidma.c | 42 arch/sh/boards/harp/setup.c | 90 arch/sh/boards/hp6xx/Makefile | 5 arch/sh/boards/hp6xx/hp6xx_apm.c | 123 arch/sh/boards/hp6xx/pm.c | 88 arch/sh/boards/hp6xx/pm_wakeup.S | 58 arch/sh/boards/hp6xx/setup.c | 62 arch/sh/boards/landisk/Makefile | 5 arch/sh/boards/landisk/io.c | 250 arch/sh/boards/landisk/irq.c | 99 arch/sh/boards/landisk/landisk_pwb.c | 348 arch/sh/boards/landisk/rtc.c | 93 arch/sh/boards/landisk/setup.c | 177 arch/sh/boards/mpc1211/rtc.c | 4 arch/sh/boards/mpc1211/setup.c | 71 arch/sh/boards/overdrive/Makefile | 8 arch/sh/boards/overdrive/fpga.c | 133 arch/sh/boards/overdrive/galileo.c | 587 - arch/sh/boards/overdrive/io.c | 172 arch/sh/boards/overdrive/irq.c | 191 arch/sh/boards/overdrive/led.c | 58 arch/sh/boards/overdrive/mach.c | 62 arch/sh/boards/overdrive/pcidma.c | 46 arch/sh/boards/overdrive/setup.c | 36 arch/sh/boards/renesas/edosk7705/Makefile | 4 arch/sh/boards/renesas/edosk7705/setup.c | 29 arch/sh/boards/renesas/hs7751rvoip/Kconfig | 12 arch/sh/boards/renesas/hs7751rvoip/Makefile | 6 arch/sh/boards/renesas/hs7751rvoip/io.c | 252 arch/sh/boards/renesas/hs7751rvoip/irq.c | 6 arch/sh/boards/renesas/hs7751rvoip/led.c | 26 arch/sh/boards/renesas/hs7751rvoip/mach.c | 54 arch/sh/boards/renesas/hs7751rvoip/setup.c | 94 arch/sh/boards/renesas/r7780rp/Kconfig | 14 arch/sh/boards/renesas/r7780rp/Makefile | 6 arch/sh/boards/renesas/r7780rp/io.c | 301 arch/sh/boards/renesas/r7780rp/irq.c | 117 arch/sh/boards/renesas/r7780rp/led.c | 45 arch/sh/boards/renesas/r7780rp/setup.c | 163 arch/sh/boards/renesas/rts7751r2d/Kconfig | 12 arch/sh/boards/renesas/rts7751r2d/Makefile | 8 arch/sh/boards/renesas/rts7751r2d/io.c | 191 arch/sh/boards/renesas/rts7751r2d/irq.c | 6 arch/sh/boards/renesas/rts7751r2d/led.c | 11 arch/sh/boards/renesas/rts7751r2d/mach.c | 69 arch/sh/boards/renesas/rts7751r2d/setup.c | 139 arch/sh/boards/renesas/sh7710voipgw/Makefile | 1 arch/sh/boards/renesas/sh7710voipgw/setup.c | 109 arch/sh/boards/renesas/systemh/io.c | 163 arch/sh/boards/renesas/systemh/irq.c | 10 arch/sh/boards/renesas/systemh/setup.c | 30 arch/sh/boards/saturn/setup.c | 14 arch/sh/boards/se/7300/io.c | 8 arch/sh/boards/se/7300/irq.c | 2 arch/sh/boards/se/7300/led.c | 18 arch/sh/boards/se/7300/setup.c | 20 arch/sh/boards/se/73180/io.c | 6 arch/sh/boards/se/73180/irq.c | 9 arch/sh/boards/se/73180/led.c | 15 arch/sh/boards/se/73180/setup.c | 22 arch/sh/boards/se/7343/Makefile | 7 arch/sh/boards/se/7343/io.c | 275 arch/sh/boards/se/7343/irq.c | 193 arch/sh/boards/se/7343/led.c | 46 arch/sh/boards/se/7343/setup.c | 84 arch/sh/boards/se/770x/Makefile | 4 arch/sh/boards/se/770x/io.c | 61 arch/sh/boards/se/770x/irq.c | 2 arch/sh/boards/se/770x/led.c | 17 arch/sh/boards/se/770x/mach.c | 67 arch/sh/boards/se/770x/setup.c | 65 arch/sh/boards/se/7751/Makefile | 4 arch/sh/boards/se/7751/io.c | 171 arch/sh/boards/se/7751/irq.c | 2 arch/sh/boards/se/7751/led.c | 18 arch/sh/boards/se/7751/mach.c | 54 arch/sh/boards/se/7751/setup.c | 109 arch/sh/boards/sh03/rtc.c | 9 arch/sh/boards/sh03/setup.c | 49 arch/sh/boards/sh2000/Makefile | 6 arch/sh/boards/sh2000/setup.c | 70 arch/sh/boards/shmin/Makefile | 5 arch/sh/boards/shmin/setup.c | 41 arch/sh/boards/snapgear/io.c | 145 arch/sh/boards/snapgear/rtc.c | 34 arch/sh/boards/snapgear/setup.c | 115 arch/sh/boards/superh/microdev/irq.c | 39 arch/sh/boards/superh/microdev/setup.c | 113 arch/sh/boards/titan/Makefile | 5 arch/sh/boards/titan/io.c | 126 arch/sh/boards/titan/setup.c | 48 arch/sh/boards/unknown/setup.c | 13 arch/sh/boot/compressed/Makefile | 11 arch/sh/cchips/Kconfig | 6 arch/sh/cchips/hd6446x/hd64461/io.c | 20 arch/sh/cchips/hd6446x/hd64461/setup.c | 10 arch/sh/cchips/hd6446x/hd64465/setup.c | 6 arch/sh/cchips/voyagergx/irq.c | 23 arch/sh/cchips/voyagergx/setup.c | 2 arch/sh/configs/landisk_defconfig | 1373 + arch/sh/configs/r7780rp_defconfig | 1099 + arch/sh/configs/se73180_defconfig | 1 arch/sh/configs/se7343_defconfig | 997 + arch/sh/configs/sh7710voipgw_defconfig | 913 + arch/sh/configs/shmin_defconfig | 827 + arch/sh/configs/titan_defconfig | 1367 + arch/sh/drivers/dma/Kconfig | 3 arch/sh/drivers/dma/dma-g2.c | 54 arch/sh/drivers/dma/dma-pvr2.c | 5 arch/sh/drivers/dma/dma-sh.c | 19 arch/sh/drivers/pci/Makefile | 6 arch/sh/drivers/pci/fixups-dreamcast.c | 38 arch/sh/drivers/pci/fixups-r7780rp.c | 45 arch/sh/drivers/pci/fixups-rts7751r2d.c | 24 arch/sh/drivers/pci/fixups-sh03.c | 38 arch/sh/drivers/pci/ops-bigsur.c | 18 arch/sh/drivers/pci/ops-landisk.c | 68 arch/sh/drivers/pci/ops-r7780rp.c | 75 arch/sh/drivers/pci/ops-rts7751r2d.c | 13 arch/sh/drivers/pci/ops-sh4.c | 164 arch/sh/drivers/pci/ops-snapgear.c | 21 arch/sh/drivers/pci/ops-titan.c | 83 arch/sh/drivers/pci/pci-auto.c | 48 arch/sh/drivers/pci/pci-sh4.h | 180 arch/sh/drivers/pci/pci-sh7751.c | 326 arch/sh/drivers/pci/pci-sh7751.h | 174 arch/sh/drivers/pci/pci-sh7780.c | 139 arch/sh/drivers/pci/pci-sh7780.h | 94 arch/sh/drivers/pci/pci-st40.c | 19 arch/sh/drivers/pci/pci.c | 105 arch/sh/kernel/Makefile | 5 arch/sh/kernel/apm.c | 539 + arch/sh/kernel/cf-enabler.c | 12 arch/sh/kernel/cpu/Makefile | 1 arch/sh/kernel/cpu/clock.c | 19 arch/sh/kernel/cpu/init.c | 21 arch/sh/kernel/cpu/irq/Makefile | 5 arch/sh/kernel/cpu/irq/intc2.c | 6 arch/sh/kernel/cpu/irq/ipr.c | 14 arch/sh/kernel/cpu/irq/maskreg.c | 93 arch/sh/kernel/cpu/irq/pint.c | 8 arch/sh/kernel/cpu/rtc.c | 128 arch/sh/kernel/cpu/sh3/Makefile | 13 arch/sh/kernel/cpu/sh3/clock-sh7706.c | 84 arch/sh/kernel/cpu/sh3/ex.S | 54 arch/sh/kernel/cpu/sh3/probe.c | 6 arch/sh/kernel/cpu/sh3/setup-sh7300.c | 43 arch/sh/kernel/cpu/sh3/setup-sh7705.c | 48 arch/sh/kernel/cpu/sh3/setup-sh7708.c | 43 arch/sh/kernel/cpu/sh3/setup-sh7709.c | 53 arch/sh/kernel/cpu/sh3/setup-sh7710.c | 43 arch/sh/kernel/cpu/sh4/Makefile | 10 arch/sh/kernel/cpu/sh4/ex.S | 176 arch/sh/kernel/cpu/sh4/probe.c | 138 arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 43 arch/sh/kernel/cpu/sh4/setup-sh73180.c | 43 arch/sh/kernel/cpu/sh4/setup-sh7343.c | 43 arch/sh/kernel/cpu/sh4/setup-sh7750.c | 48 arch/sh/kernel/cpu/sh4/setup-sh7760.c | 53 arch/sh/kernel/cpu/sh4/setup-sh7770.c | 53 arch/sh/kernel/cpu/sh4/setup-sh7780.c | 79 arch/sh/kernel/cpu/sh4/sq.c | 543 - arch/sh/kernel/early_printk.c | 106 arch/sh/kernel/entry.S | 333 arch/sh/kernel/head.S | 43 arch/sh/kernel/io.c | 67 arch/sh/kernel/irq.c | 168 arch/sh/kernel/kgdb_stub.c | 33 arch/sh/kernel/machine_kexec.c | 6 arch/sh/kernel/pm.c | 88 arch/sh/kernel/process.c | 29 arch/sh/kernel/ptrace.c | 1 arch/sh/kernel/semaphore.c | 2 arch/sh/kernel/setup.c | 119 arch/sh/kernel/sh_ksyms.c | 32 arch/sh/kernel/signal.c | 158 arch/sh/kernel/smp.c | 1 arch/sh/kernel/sys_sh.c | 75 arch/sh/kernel/syscalls.S | 353 arch/sh/kernel/time.c | 80 arch/sh/kernel/timers/timer-tmu.c | 24 arch/sh/kernel/traps.c | 184 arch/sh/kernel/vmlinux.lds.S | 17 arch/sh/kernel/vsyscall/Makefile | 36 arch/sh/kernel/vsyscall/vsyscall-note.S | 25 arch/sh/kernel/vsyscall/vsyscall-sigreturn.S | 39 arch/sh/kernel/vsyscall/vsyscall-syscall.S | 10 arch/sh/kernel/vsyscall/vsyscall-trapa.S | 42 arch/sh/kernel/vsyscall/vsyscall.c | 150 arch/sh/kernel/vsyscall/vsyscall.lds.S | 74 arch/sh/lib/checksum.S | 3 arch/sh/lib/memcpy-sh4.S | 4 arch/sh/lib/memset.S | 1 arch/sh/math-emu/Makefile | 1 arch/sh/math-emu/math.c | 624 + arch/sh/math-emu/sfp-util.h | 72 arch/sh/mm/Kconfig | 78 arch/sh/mm/Makefile | 16 arch/sh/mm/cache-debugfs.c | 147 arch/sh/mm/cache-sh4.c | 685 + arch/sh/mm/cache-sh7705.c | 19 arch/sh/mm/clear_page.S | 99 arch/sh/mm/consistent.c | 2 arch/sh/mm/fault.c | 211 arch/sh/mm/hugetlbpage.c | 52 arch/sh/mm/init.c | 32 arch/sh/mm/ioremap.c | 17 arch/sh/mm/pg-nommu.c | 17 arch/sh/mm/pg-sh4.c | 24 arch/sh/mm/pmb.c | 400 arch/sh/mm/tlb-flush.c | 134 arch/sh/mm/tlb-sh4.c | 8 arch/sh/oprofile/Makefile | 4 arch/sh/tools/mach-types | 10 arch/sh64/kernel/process.c | 270 arch/sh64/kernel/sys_sh64.c | 21 arch/sh64/kernel/time.c | 14 arch/sh64/mm/fault.c | 6 arch/sh64/mm/init.c | 2 arch/sparc/kernel/ebus.c | 7 arch/sparc/kernel/ioport.c | 2 arch/sparc/kernel/pcic.c | 18 arch/sparc/kernel/sys_sparc.c | 27 arch/sparc/kernel/sys_sunos.c | 15 arch/sparc/kernel/time.c | 20 arch/sparc/lib/copy_user.S | 4 arch/sparc/mm/srmmu.c | 2 arch/sparc/mm/sun4c.c | 2 arch/sparc64/Kconfig | 2 arch/sparc64/defconfig | 61 arch/sparc64/kernel/power.c | 5 arch/sparc64/kernel/sys_sparc.c | 25 arch/sparc64/kernel/sys_sparc32.c | 2 arch/sparc64/kernel/sys_sunos32.c | 10 arch/sparc64/kernel/time.c | 8 arch/sparc64/mm/init.c | 3 arch/sparc64/solaris/misc.c | 29 arch/sparc64/solaris/socksys.c | 6 arch/um/Makefile-x86_64 | 7 arch/um/drivers/chan_kern.c | 18 arch/um/drivers/daemon.h | 2 arch/um/drivers/daemon_kern.c | 2 arch/um/drivers/daemon_user.c | 2 arch/um/drivers/fd.c | 4 arch/um/drivers/hostaudio_kern.c | 4 arch/um/drivers/line.c | 12 arch/um/drivers/mcast.h | 2 arch/um/drivers/mcast_kern.c | 2 arch/um/drivers/mcast_user.c | 2 arch/um/drivers/mconsole_kern.c | 23 arch/um/drivers/mconsole_user.c | 11 arch/um/drivers/mmapper_kern.c | 4 arch/um/drivers/net_kern.c | 137 arch/um/drivers/net_user.c | 1 arch/um/drivers/null.c | 5 arch/um/drivers/pcap_kern.c | 4 arch/um/drivers/pcap_user.c | 2 arch/um/drivers/port_user.c | 4 arch/um/drivers/pty.c | 6 arch/um/drivers/random.c | 6 arch/um/drivers/slip.h | 2 arch/um/drivers/slip_kern.c | 2 arch/um/drivers/slip_user.c | 2 arch/um/drivers/slirp.h | 2 arch/um/drivers/slirp_kern.c | 2 arch/um/drivers/slirp_user.c | 2 arch/um/drivers/ssl.c | 4 arch/um/drivers/stderr_console.c | 2 arch/um/drivers/stdio_console.c | 3 arch/um/drivers/tty.c | 4 arch/um/drivers/ubd_kern.c | 11 arch/um/drivers/xterm.c | 4 arch/um/include/chan_kern.h | 6 arch/um/include/chan_user.h | 6 arch/um/include/kern_util.h | 3 arch/um/include/line.h | 11 arch/um/include/longjmp.h | 5 arch/um/include/net_kern.h | 18 arch/um/include/net_user.h | 19 arch/um/include/os.h | 18 arch/um/include/registers.h | 3 arch/um/include/skas/skas.h | 3 arch/um/include/sysdep-i386/archsetjmp.h | 22 arch/um/include/sysdep-i386/signal.h | 27 arch/um/include/sysdep-x86_64/archsetjmp.h | 24 arch/um/include/sysdep-x86_64/ptrace.h | 43 arch/um/include/sysdep-x86_64/sc.h | 2 arch/um/include/sysdep-x86_64/signal.h | 29 arch/um/kernel/Makefile | 2 arch/um/kernel/exec.c | 4 arch/um/kernel/exitcode.c | 8 arch/um/kernel/gmon_syms.c | 13 arch/um/kernel/irq.c | 34 arch/um/kernel/ksyms.c | 3 arch/um/kernel/mem.c | 10 arch/um/kernel/process.c | 483 + arch/um/kernel/process_kern.c | 483 - arch/um/kernel/reboot.c | 13 arch/um/kernel/skas/Makefile | 3 arch/um/kernel/skas/exec.c | 30 arch/um/kernel/skas/exec_kern.c | 41 arch/um/kernel/skas/mmu.c | 8 arch/um/kernel/skas/process.c | 217 arch/um/kernel/skas/process_kern.c | 227 arch/um/kernel/syscall.c | 35 arch/um/kernel/time.c | 16 arch/um/kernel/tlb.c | 370 arch/um/kernel/trap.c | 30 arch/um/kernel/um_arch.c | 8 arch/um/os-Linux/Makefile | 8 arch/um/os-Linux/drivers/etap.h | 2 arch/um/os-Linux/drivers/ethertap_kern.c | 2 arch/um/os-Linux/drivers/ethertap_user.c | 2 arch/um/os-Linux/drivers/tuntap.h | 2 arch/um/os-Linux/drivers/tuntap_kern.c | 2 arch/um/os-Linux/drivers/tuntap_user.c | 2 arch/um/os-Linux/helper.c | 22 arch/um/os-Linux/irq.c | 2 arch/um/os-Linux/main.c | 34 arch/um/os-Linux/mem.c | 12 arch/um/os-Linux/process.c | 18 arch/um/os-Linux/sigio.c | 103 arch/um/os-Linux/signal.c | 38 arch/um/os-Linux/skas/process.c | 92 arch/um/os-Linux/start_up.c | 1 arch/um/os-Linux/sys-i386/Makefile | 2 arch/um/os-Linux/sys-i386/registers.c | 17 arch/um/os-Linux/sys-i386/signal.c | 15 arch/um/os-Linux/sys-i386/tls.c | 5 arch/um/os-Linux/sys-x86_64/Makefile | 2 arch/um/os-Linux/sys-x86_64/registers.c | 17 arch/um/os-Linux/sys-x86_64/signal.c | 16 arch/um/os-Linux/time.c | 22 arch/um/os-Linux/tls.c | 8 arch/um/os-Linux/trap.c | 1 arch/um/os-Linux/uaccess.c | 3 arch/um/os-Linux/util.c | 5 arch/um/sys-i386/Makefile | 4 arch/um/sys-i386/bugs.c | 9 arch/um/sys-i386/ldt.c | 3 arch/um/sys-i386/ptrace_user.c | 5 arch/um/sys-i386/setjmp.S | 58 arch/um/sys-i386/unmap.c | 11 arch/um/sys-x86_64/Makefile | 4 arch/um/sys-x86_64/setjmp.S | 54 arch/um/sys-x86_64/syscalls.c | 2 arch/um/sys-x86_64/sysrq.c | 2 arch/um/sys-x86_64/unmap.c | 11 arch/v850/kernel/memcons.c | 4 arch/v850/kernel/rte_cb_leds.c | 2 arch/v850/kernel/rte_mb_a_pci.c | 12 arch/v850/kernel/simcons.c | 2 arch/v850/kernel/syscalls.c | 20 arch/v850/kernel/time.c | 2 arch/x86_64/Kconfig | 59 arch/x86_64/Makefile | 10 arch/x86_64/boot/compressed/Makefile | 3 arch/x86_64/boot/setup.S | 4 arch/x86_64/crypto/Makefile | 3 arch/x86_64/crypto/aes.c | 5 arch/x86_64/crypto/twofish-x86_64-asm.S | 324 arch/x86_64/crypto/twofish.c | 97 arch/x86_64/defconfig | 113 arch/x86_64/ia32/ia32_aout.c | 8 arch/x86_64/ia32/ia32_signal.c | 53 arch/x86_64/ia32/ia32entry.S | 9 arch/x86_64/ia32/ptrace32.c | 10 arch/x86_64/ia32/sys_ia32.c | 78 arch/x86_64/kernel/Makefile | 9 arch/x86_64/kernel/aperture.c | 25 arch/x86_64/kernel/apic.c | 229 arch/x86_64/kernel/crash.c | 26 arch/x86_64/kernel/e820.c | 291 arch/x86_64/kernel/early-quirks.c | 122 arch/x86_64/kernel/early_printk.c | 20 arch/x86_64/kernel/entry.S | 67 arch/x86_64/kernel/genapic_cluster.c | 1 arch/x86_64/kernel/genapic_flat.c | 5 arch/x86_64/kernel/head.S | 15 arch/x86_64/kernel/head64.c | 44 arch/x86_64/kernel/i8259.c | 15 arch/x86_64/kernel/io_apic.c | 482 - arch/x86_64/kernel/ioport.c | 1 arch/x86_64/kernel/irq.c | 12 arch/x86_64/kernel/kprobes.c | 48 arch/x86_64/kernel/machine_kexec.c | 99 arch/x86_64/kernel/mce.c | 29 arch/x86_64/kernel/mce_intel.c | 30 arch/x86_64/kernel/mpparse.c | 275 arch/x86_64/kernel/nmi.c | 844 + arch/x86_64/kernel/pci-calgary.c | 142 arch/x86_64/kernel/pci-dma.c | 100 arch/x86_64/kernel/pci-gart.c | 3 arch/x86_64/kernel/pci-nommu.c | 1 arch/x86_64/kernel/pci-swiotlb.c | 3 arch/x86_64/kernel/process.c | 116 arch/x86_64/kernel/ptrace.c | 29 arch/x86_64/kernel/relocate_kernel.S | 171 arch/x86_64/kernel/setup.c | 260 arch/x86_64/kernel/setup64.c | 45 arch/x86_64/kernel/signal.c | 87 arch/x86_64/kernel/smp.c | 23 arch/x86_64/kernel/smpboot.c | 17 arch/x86_64/kernel/stacktrace.c | 220 arch/x86_64/kernel/suspend_asm.S | 2 arch/x86_64/kernel/sys_x86_64.c | 2 arch/x86_64/kernel/tce.c | 12 arch/x86_64/kernel/time.c | 151 arch/x86_64/kernel/trampoline.S | 2 arch/x86_64/kernel/traps.c | 204 arch/x86_64/kernel/vmlinux.lds.S | 40 arch/x86_64/kernel/vsmp.c | 3 arch/x86_64/kernel/vsyscall.c | 101 arch/x86_64/kernel/x8664_ksyms.c | 1 arch/x86_64/lib/Makefile | 2 arch/x86_64/lib/clear_page.S | 47 arch/x86_64/lib/copy_page.S | 53 arch/x86_64/lib/copy_user.S | 153 arch/x86_64/lib/csum-copy.S | 26 arch/x86_64/lib/getuser.S | 32 arch/x86_64/lib/iomap_copy.S | 10 arch/x86_64/lib/memcpy.S | 69 arch/x86_64/lib/memset.S | 79 arch/x86_64/lib/putuser.S | 32 arch/x86_64/lib/rwlock.S | 38 arch/x86_64/lib/thunk.S | 43 arch/x86_64/mm/fault.c | 34 arch/x86_64/mm/init.c | 167 arch/x86_64/mm/ioremap.c | 111 arch/x86_64/mm/k8topology.c | 6 arch/x86_64/mm/numa.c | 32 arch/x86_64/mm/pageattr.c | 24 arch/x86_64/mm/srat.c | 83 arch/x86_64/pci/Makefile | 3 arch/x86_64/pci/mmconfig.c | 44 arch/xtensa/kernel/syscalls.c | 22 arch/xtensa/kernel/time.c | 15 arch/xtensa/mm/fault.c | 2 arch/xtensa/platform-iss/console.c | 2 arch/xtensa/platform-iss/network.c | 2 block/Kconfig | 20 block/Kconfig.iosched | 3 block/Makefile | 2 block/as-iosched.c | 674 - block/blktrace.c | 34 block/cfq-iosched.c | 867 - block/deadline-iosched.c | 464 block/elevator.c | 315 block/genhd.c | 9 block/ll_rw_blk.c | 360 block/noop-iosched.c | 2 block/scsi_ioctl.c | 6 crypto/Kconfig | 154 crypto/Makefile | 16 crypto/aes.c | 5 crypto/algapi.c | 486 + crypto/anubis.c | 3 crypto/api.c | 428 crypto/arc4.c | 2 crypto/blkcipher.c | 405 crypto/blowfish.c | 3 crypto/cast5.c | 8 crypto/cast6.c | 5 crypto/cbc.c | 344 crypto/cipher.c | 117 crypto/crc32c.c | 30 crypto/crypto_null.c | 2 crypto/cryptomgr.c | 156 crypto/des.c | 6 crypto/digest.c | 155 crypto/ecb.c | 181 crypto/hash.c | 61 crypto/hmac.c | 290 crypto/internal.h | 106 crypto/khazad.c | 8 crypto/michael_mic.c | 5 crypto/proc.c | 13 crypto/scatterwalk.c | 89 crypto/scatterwalk.h | 52 crypto/serpent.c | 19 crypto/sha1.c | 3 crypto/sha256.c | 3 crypto/tcrypt.c | 901 + crypto/tcrypt.h | 202 crypto/tea.c | 16 crypto/twofish.c | 700 - crypto/twofish_common.c | 744 + drivers/Kconfig | 2 drivers/Makefile | 1 drivers/acorn/char/i2c.c | 1 drivers/acpi/acpi_memhotplug.c | 4 drivers/acpi/i2c_ec.c | 2 drivers/acpi/osl.c | 2 drivers/acpi/processor_idle.c | 38 drivers/ata/Kconfig | 487 + drivers/ata/Makefile | 62 drivers/ata/ahci.c | 1684 ++ drivers/ata/ata_generic.c | 252 drivers/ata/ata_piix.c | 1256 + drivers/ata/libata-core.c | 6176 +++++++ drivers/ata/libata-eh.c | 2249 ++ drivers/ata/libata-scsi.c | 3322 ++++ drivers/ata/libata-sff.c | 1121 + drivers/ata/libata.h | 122 drivers/ata/pata_ali.c | 679 + drivers/ata/pata_amd.c | 709 + drivers/ata/pata_artop.c | 512 + drivers/ata/pata_atiixp.c | 304 drivers/ata/pata_cmd64x.c | 505 + drivers/ata/pata_cs5520.c | 334 drivers/ata/pata_cs5530.c | 387 drivers/ata/pata_cs5535.c | 291 drivers/ata/pata_cypress.c | 227 drivers/ata/pata_efar.c | 338 drivers/ata/pata_hpt366.c | 478 + drivers/ata/pata_hpt37x.c | 1257 + drivers/ata/pata_hpt3x2n.c | 597 + drivers/ata/pata_hpt3x3.c | 226 drivers/ata/pata_isapnp.c | 156 drivers/ata/pata_it821x.c | 847 + drivers/ata/pata_jmicron.c | 265 drivers/ata/pata_legacy.c | 949 + drivers/ata/pata_mpiix.c | 310 drivers/ata/pata_netcell.c | 174 drivers/ata/pata_ns87410.c | 233 drivers/ata/pata_oldpiix.c | 336 drivers/ata/pata_opti.c | 290 drivers/ata/pata_optidma.c | 545 + drivers/ata/pata_pcmcia.c | 393 drivers/ata/pata_pdc2027x.c | 867 + drivers/ata/pata_pdc202xx_old.c | 423 drivers/ata/pata_qdi.c | 403 drivers/ata/pata_radisys.c | 333 drivers/ata/pata_rz1000.c | 205 drivers/ata/pata_sc1200.c | 287 drivers/ata/pata_serverworks.c | 591 + drivers/ata/pata_sil680.c | 381 drivers/ata/pata_sis.c | 1022 + drivers/ata/pata_sl82c105.c | 385 drivers/ata/pata_triflex.c | 282 drivers/ata/pata_via.c | 565 + drivers/ata/pdc_adma.c | 740 + drivers/ata/sata_mv.c | 2466 +++ drivers/ata/sata_nv.c | 595 + drivers/ata/sata_promise.c | 844 + drivers/ata/sata_promise.h | 157 drivers/ata/sata_qstor.c | 730 + drivers/ata/sata_sil.c | 728 + drivers/ata/sata_sil24.c | 1227 + drivers/ata/sata_sis.c | 347 drivers/ata/sata_svw.c | 508 + drivers/ata/sata_sx4.c | 1502 ++ drivers/ata/sata_uli.c | 300 drivers/ata/sata_via.c | 503 + drivers/ata/sata_vsc.c | 482 + drivers/atm/he.c | 18 drivers/base/Makefile | 2 drivers/base/base.h | 2 drivers/base/bus.c | 133 drivers/base/class.c | 42 drivers/base/core.c | 230 drivers/base/dd.c | 147 drivers/base/driver.c | 16 drivers/base/firmware_class.c | 14 drivers/base/hypervisor.c | 3 drivers/base/node.c | 13 drivers/base/platform.c | 30 drivers/base/power/resume.c | 37 drivers/base/power/suspend.c | 92 drivers/base/power/sysfs.c | 35 drivers/block/DAC960.c | 6 drivers/block/DAC960.h | 2 drivers/block/Kconfig | 4 drivers/block/cciss.c | 238 drivers/block/cciss.h | 3 drivers/block/cciss_cmd.h | 33 drivers/block/cciss_scsi.c | 16 drivers/block/cpqarray.c | 1 drivers/block/cryptoloop.c | 160 drivers/block/floppy.c | 4 drivers/block/loop.c | 247 drivers/block/nbd.c | 8 drivers/block/paride/pd.c | 8 drivers/block/pktcdvd.c | 10 drivers/block/swim3.c | 4 drivers/block/swim_iop.c | 4 drivers/block/ub.c | 38 drivers/block/xd.c | 2 drivers/bluetooth/bfusb.c | 316 drivers/bluetooth/hci_ldisc.c | 13 drivers/bluetooth/hci_usb.c | 3 drivers/bluetooth/hci_vhci.c | 99 drivers/cdrom/Kconfig | 2 drivers/cdrom/cdrom.c | 2 drivers/cdrom/cdu31a.c | 4 drivers/char/Kconfig | 41 drivers/char/Makefile | 4 drivers/char/agp/agp.h | 2 drivers/char/agp/amd64-agp.c | 8 drivers/char/agp/backend.c | 2 drivers/char/agp/efficeon-agp.c | 16 drivers/char/agp/frontend.c | 27 drivers/char/agp/generic.c | 42 drivers/char/agp/intel-agp.c | 173 drivers/char/agp/uninorth-agp.c | 4 drivers/char/agp/via-agp.c | 4 drivers/char/amiserial.c | 2 drivers/char/briq_panel.c | 271 drivers/char/cyclades.c | 2 drivers/char/drm/Kconfig | 9 drivers/char/drm/Makefile | 6 drivers/char/drm/drmP.h | 68 drivers/char/drm/drm_auth.c | 64 drivers/char/drm/drm_bufs.c | 74 drivers/char/drm/drm_drv.c | 12 drivers/char/drm/drm_fops.c | 10 drivers/char/drm/drm_hashtab.c | 190 drivers/char/drm/drm_hashtab.h | 67 drivers/char/drm/drm_ioc32.c | 2 drivers/char/drm/drm_ioctl.c | 34 drivers/char/drm/drm_irq.c | 12 drivers/char/drm/drm_mm.c | 201 drivers/char/drm/drm_pciids.h | 187 drivers/char/drm/drm_proc.c | 2 drivers/char/drm/drm_sman.c | 352 drivers/char/drm/drm_sman.h | 176 drivers/char/drm/drm_stub.c | 12 drivers/char/drm/drm_vm.c | 45 drivers/char/drm/i810_dma.c | 10 drivers/char/drm/i830_dma.c | 4 drivers/char/drm/i915_dma.c | 45 drivers/char/drm/i915_drm.h | 6 drivers/char/drm/i915_drv.h | 10 drivers/char/drm/i915_irq.c | 16 drivers/char/drm/radeon_cp.c | 72 drivers/char/drm/radeon_drv.c | 2 drivers/char/drm/radeon_drv.h | 36 drivers/char/drm/radeon_state.c | 48 drivers/char/drm/sis_drv.c | 39 drivers/char/drm/sis_drv.h | 34 drivers/char/drm/sis_ds.c | 299 drivers/char/drm/sis_ds.h | 146 drivers/char/drm/sis_mm.c | 504 - drivers/char/drm/via_dmablit.c | 68 drivers/char/drm/via_drm.h | 8 drivers/char/drm/via_drv.c | 3 drivers/char/drm/via_drv.h | 16 drivers/char/drm/via_ds.c | 273 drivers/char/drm/via_ds.h | 104 drivers/char/drm/via_map.c | 9 drivers/char/drm/via_mm.c | 375 drivers/char/ds1286.c | 15 drivers/char/epca.c | 2 drivers/char/esp.c | 2 drivers/char/generic_serial.c | 11 drivers/char/hpet.c | 4 drivers/char/hvc_console.c | 20 drivers/char/hvc_console.h | 2 drivers/char/hvc_iseries.c | 594 + drivers/char/hvc_rtas.c | 2 drivers/char/hvc_vio.c | 7 drivers/char/hvcs.c | 2 drivers/char/hvsi.c | 9 drivers/char/hw_random/intel-rng.c | 186 drivers/char/ip2/ip2main.c | 12 drivers/char/ipmi/ipmi_devintf.c | 34 drivers/char/ipmi/ipmi_msghandler.c | 75 drivers/char/ipmi/ipmi_si_intf.c | 6 drivers/char/isicom.c | 37 drivers/char/istallion.c | 24 drivers/char/keyboard.c | 25 drivers/char/lp.c | 4 drivers/char/mbcs.c | 7 drivers/char/mem.c | 47 drivers/char/moxa.c | 82 drivers/char/mspec.c | 421 drivers/char/mwave/mwavedd.c | 4 drivers/char/mxser.c | 68 drivers/char/nwbutton.c | 5 drivers/char/pc8736x_gpio.c | 10 drivers/char/pcmcia/synclink_cs.c | 2 drivers/char/pty.c | 2 drivers/char/random.c | 8 drivers/char/raw.c | 50 drivers/char/rio/rio_linux.c | 2 drivers/char/riscom8.c | 24 drivers/char/rocket.c | 2 drivers/char/rtc.c | 9 drivers/char/s3c2410-rtc.c | 591 - drivers/char/scx200_gpio.c | 4 drivers/char/selection.c | 2 drivers/char/ser_a2232.c | 2 drivers/char/serial167.c | 2 drivers/char/snsc_event.c | 2 drivers/char/specialix.c | 29 drivers/char/stallion.c | 2 drivers/char/sx.c | 2 drivers/char/synclink.c | 2 drivers/char/synclink_gt.c | 96 drivers/char/synclinkmp.c | 2 drivers/char/sysrq.c | 3 drivers/char/tpm/tpm_atmel.h | 4 drivers/char/tty_io.c | 107 drivers/char/tty_ioctl.c | 35 drivers/char/vc_screen.c | 5 drivers/char/viocons.c | 33 drivers/char/viotape.c | 6 drivers/char/vme_scc.c | 2 drivers/char/vt.c | 107 drivers/char/vt_ioctl.c | 34 drivers/char/watchdog/Kconfig | 26 drivers/char/watchdog/Makefile | 2 drivers/char/watchdog/acquirewdt.c | 2 drivers/char/watchdog/advantechwdt.c | 2 drivers/char/watchdog/alim1535_wdt.c | 12 drivers/char/watchdog/alim7101_wdt.c | 17 drivers/char/watchdog/at91_wdt.c | 2 drivers/char/watchdog/booke_wdt.c | 2 drivers/char/watchdog/cpu5wdt.c | 2 drivers/char/watchdog/ep93xx_wdt.c | 2 drivers/char/watchdog/eurotechwdt.c | 2 drivers/char/watchdog/i6300esb.c | 2 drivers/char/watchdog/i8xx_tco.c | 35 drivers/char/watchdog/ib700wdt.c | 2 drivers/char/watchdog/ibmasr.c | 2 drivers/char/watchdog/indydog.c | 2 drivers/char/watchdog/ixp2000_wdt.c | 2 drivers/char/watchdog/ixp4xx_wdt.c | 2 drivers/char/watchdog/machzwd.c | 5 drivers/char/watchdog/mixcomwd.c | 2 drivers/char/watchdog/mpc83xx_wdt.c | 2 drivers/char/watchdog/mpc8xx_wdt.c | 2 drivers/char/watchdog/mpcore_wdt.c | 4 drivers/char/watchdog/mv64x60_wdt.c | 2 drivers/char/watchdog/omap_wdt.c | 391 drivers/char/watchdog/omap_wdt.h | 64 drivers/char/watchdog/pcwd.c | 2 drivers/char/watchdog/pcwd_pci.c | 2 drivers/char/watchdog/pcwd_usb.c | 2 drivers/char/watchdog/pnx4008_wdt.c | 362 drivers/char/watchdog/s3c2410_wdt.c | 12 drivers/char/watchdog/sa1100_wdt.c | 2 drivers/char/watchdog/sbc60xxwdt.c | 2 drivers/char/watchdog/sbc_epx_c3.c | 2 drivers/char/watchdog/sc1200wdt.c | 2 drivers/char/watchdog/sc520_wdt.c | 2 drivers/char/watchdog/scx200_wdt.c | 2 drivers/char/watchdog/shwdt.c | 112 drivers/char/watchdog/softdog.c | 2 drivers/char/watchdog/w83627hf_wdt.c | 2 drivers/char/watchdog/w83877f_wdt.c | 2 drivers/char/watchdog/w83977f_wdt.c | 2 drivers/char/watchdog/wafer5823wdt.c | 2 drivers/char/watchdog/wdrtas.c | 2 drivers/char/watchdog/wdt.c | 2 drivers/char/watchdog/wdt285.c | 2 drivers/char/watchdog/wdt977.c | 2 drivers/char/watchdog/wdt_pci.c | 2 drivers/cpufreq/cpufreq.c | 4 drivers/cpufreq/cpufreq_ondemand.c | 173 drivers/cpufreq/cpufreq_stats.c | 2 drivers/crypto/Kconfig | 45 drivers/crypto/Makefile | 8 drivers/crypto/padlock-aes.c | 258 drivers/crypto/padlock-generic.c | 63 drivers/crypto/padlock-sha.c | 318 drivers/crypto/padlock.c | 58 drivers/crypto/padlock.h | 17 drivers/eisa/eisa-bus.c | 23 drivers/fc4/fc.c | 1 drivers/firmware/dmi_scan.c | 23 drivers/hwmon/Kconfig | 51 drivers/hwmon/Makefile | 2 drivers/hwmon/abituguru.c | 30 drivers/hwmon/adm1021.c | 31 drivers/hwmon/adm1025.c | 94 drivers/hwmon/adm1026.c | 286 drivers/hwmon/adm1031.c | 114 drivers/hwmon/adm9240.c | 105 drivers/hwmon/asb100.c | 122 drivers/hwmon/atxp1.c | 28 drivers/hwmon/ds1621.c | 28 drivers/hwmon/f71805f.c | 336 drivers/hwmon/fscher.c | 106 drivers/hwmon/fscpos.c | 75 drivers/hwmon/gl518sm.c | 74 drivers/hwmon/gl520sm.c | 128 drivers/hwmon/hdaps.c | 7 drivers/hwmon/it87.c | 470 drivers/hwmon/k8temp.c | 294 drivers/hwmon/lm63.c | 96 drivers/hwmon/lm75.c | 24 drivers/hwmon/lm77.c | 33 drivers/hwmon/lm78.c | 89 drivers/hwmon/lm80.c | 85 drivers/hwmon/lm83.c | 128 drivers/hwmon/lm85.c | 173 drivers/hwmon/lm87.c | 191 drivers/hwmon/lm90.c | 90 drivers/hwmon/lm92.c | 34 drivers/hwmon/max1619.c | 33 drivers/hwmon/pc87360.c | 231 drivers/hwmon/sis5595.c | 102 drivers/hwmon/smsc47b397.c | 40 drivers/hwmon/smsc47m1.c | 82 drivers/hwmon/smsc47m192.c | 150 drivers/hwmon/via686a.c | 84 drivers/hwmon/vt1211.c | 1355 + drivers/hwmon/vt8231.c | 187 drivers/hwmon/w83627ehf.c | 486 - drivers/hwmon/w83627hf.c | 233 drivers/hwmon/w83781d.c | 278 drivers/hwmon/w83791d.c | 7 drivers/hwmon/w83792d.c | 554 - drivers/hwmon/w83l785ts.c | 28 drivers/i2c/Kconfig | 2 drivers/i2c/algos/Kconfig | 6 drivers/i2c/algos/Makefile | 1 drivers/i2c/algos/i2c-algo-bit.c | 23 drivers/i2c/algos/i2c-algo-pca.c | 2 drivers/i2c/algos/i2c-algo-pcf.c | 2 drivers/i2c/algos/i2c-algo-sgi.c | 2 drivers/i2c/algos/i2c-algo-sibyte.c | 215 drivers/i2c/busses/Kconfig | 36 drivers/i2c/busses/Makefile | 1 drivers/i2c/busses/i2c-ali1535.c | 2 drivers/i2c/busses/i2c-ali1563.c | 2 drivers/i2c/busses/i2c-ali15x3.c | 2 drivers/i2c/busses/i2c-amd756.c | 2 drivers/i2c/busses/i2c-amd8111.c | 2 drivers/i2c/busses/i2c-au1550.c | 21 drivers/i2c/busses/i2c-elektor.c | 1 drivers/i2c/busses/i2c-hydra.c | 1 drivers/i2c/busses/i2c-i801.c | 2 drivers/i2c/busses/i2c-i810.c | 2 drivers/i2c/busses/i2c-ibm_iic.c | 2 drivers/i2c/busses/i2c-iop3xx.c | 18 drivers/i2c/busses/i2c-isa.c | 42 drivers/i2c/busses/i2c-ite.c | 2 drivers/i2c/busses/i2c-ixp2000.c | 1 drivers/i2c/busses/i2c-ixp4xx.c | 1 drivers/i2c/busses/i2c-mpc.c | 2 drivers/i2c/busses/i2c-mv64xxx.c | 2 drivers/i2c/busses/i2c-nforce2.c | 2 drivers/i2c/busses/i2c-ocores.c | 2 drivers/i2c/busses/i2c-omap.c | 676 + drivers/i2c/busses/i2c-parport-light.c | 1 drivers/i2c/busses/i2c-parport.c | 1 drivers/i2c/busses/i2c-piix4.c | 2 drivers/i2c/busses/i2c-powermac.c | 5 drivers/i2c/busses/i2c-prosavage.c | 1 drivers/i2c/busses/i2c-pxa.c | 2 drivers/i2c/busses/i2c-s3c2410.c | 2 drivers/i2c/busses/i2c-savage4.c | 1 drivers/i2c/busses/i2c-sibyte.c | 160 drivers/i2c/busses/i2c-sis5595.c | 2 drivers/i2c/busses/i2c-sis630.c | 2 drivers/i2c/busses/i2c-sis96x.c | 2 drivers/i2c/busses/i2c-stub.c | 21 drivers/i2c/busses/i2c-via.c | 1 drivers/i2c/busses/i2c-viapro.c | 10 drivers/i2c/busses/i2c-voodoo3.c | 2 drivers/i2c/busses/scx200_acb.c | 2 drivers/i2c/busses/scx200_i2c.c | 12 drivers/i2c/chips/eeprom.c | 8 drivers/i2c/chips/isp1301_omap.c | 2 drivers/i2c/chips/max6875.c | 25 drivers/i2c/chips/pca9539.c | 11 drivers/i2c/chips/pcf8574.c | 22 drivers/i2c/chips/pcf8591.c | 58 drivers/i2c/chips/tps65010.c | 2 drivers/i2c/i2c-core.c | 87 drivers/i2c/i2c-dev.c | 109 drivers/ide/Kconfig | 4 drivers/ide/ide-cd.c | 69 drivers/ide/ide-disk.c | 5 drivers/ide/ide-dma.c | 2 drivers/ide/ide-floppy.c | 17 drivers/ide/ide-io.c | 50 drivers/ide/ide-lib.c | 5 drivers/ide/ide-tape.c | 16 drivers/ide/ide-taskfile.c | 8 drivers/ide/ide.c | 14 drivers/ide/legacy/hd.c | 2 drivers/ide/mips/au1xxx-ide.c | 4 drivers/ide/pci/atiixp.c | 21 drivers/ide/pci/piix.c | 2 drivers/ide/pci/serverworks.c | 8 drivers/ide/pci/sis5513.c | 3 drivers/ide/ppc/pmac.c | 22 drivers/ieee1394/Kconfig | 11 drivers/ieee1394/csr.c | 31 drivers/ieee1394/csr.h | 109 drivers/ieee1394/dma.c | 7 drivers/ieee1394/dma.h | 90 drivers/ieee1394/dv1394-private.h | 6 drivers/ieee1394/dv1394.c | 47 drivers/ieee1394/eth1394.c | 12 drivers/ieee1394/highlevel.h | 201 drivers/ieee1394/hosts.c | 23 drivers/ieee1394/hosts.h | 51 drivers/ieee1394/ieee1394-ioctl.h | 9 drivers/ieee1394/ieee1394.h | 316 drivers/ieee1394/ieee1394_core.c | 9 drivers/ieee1394/ieee1394_core.h | 28 drivers/ieee1394/ieee1394_hotplug.h | 30 drivers/ieee1394/ieee1394_transactions.c | 114 drivers/ieee1394/ieee1394_transactions.h | 41 drivers/ieee1394/ieee1394_types.h | 68 drivers/ieee1394/iso.c | 5 drivers/ieee1394/iso.h | 87 drivers/ieee1394/nodemgr.c | 227 drivers/ieee1394/nodemgr.h | 27 drivers/ieee1394/ohci1394.c | 73 drivers/ieee1394/pcilynx.c | 1 drivers/ieee1394/raw1394-private.h | 3 drivers/ieee1394/raw1394.c | 138 drivers/ieee1394/sbp2.c | 481 - drivers/ieee1394/sbp2.h | 37 drivers/ieee1394/video1394.c | 52 drivers/infiniband/Kconfig | 4 drivers/infiniband/Makefile | 4 drivers/infiniband/core/Makefile | 4 drivers/infiniband/core/addr.c | 26 drivers/infiniband/core/cache.c | 5 drivers/infiniband/core/cm.c | 66 drivers/infiniband/core/cma.c | 442 drivers/infiniband/core/device.c | 6 drivers/infiniband/core/iwcm.c | 1019 + drivers/infiniband/core/iwcm.h | 62 drivers/infiniband/core/mad.c | 24 drivers/infiniband/core/mad_priv.h | 2 drivers/infiniband/core/mad_rmpp.c | 94 drivers/infiniband/core/sa_query.c | 67 drivers/infiniband/core/smi.c | 16 drivers/infiniband/core/sysfs.c | 13 drivers/infiniband/core/ucm.c | 9 drivers/infiniband/core/user_mad.c | 7 drivers/infiniband/core/uverbs_cmd.c | 64 drivers/infiniband/core/verbs.c | 21 drivers/infiniband/hw/amso1100/Kbuild | 8 drivers/infiniband/hw/amso1100/Kconfig | 15 drivers/infiniband/hw/amso1100/c2.c | 1255 + drivers/infiniband/hw/amso1100/c2.h | 551 + drivers/infiniband/hw/amso1100/c2_ae.c | 321 drivers/infiniband/hw/amso1100/c2_ae.h | 108 drivers/infiniband/hw/amso1100/c2_alloc.c | 144 drivers/infiniband/hw/amso1100/c2_cm.c | 451 drivers/infiniband/hw/amso1100/c2_cq.c | 433 drivers/infiniband/hw/amso1100/c2_intr.c | 209 drivers/infiniband/hw/amso1100/c2_mm.c | 375 drivers/infiniband/hw/amso1100/c2_mq.c | 174 drivers/infiniband/hw/amso1100/c2_mq.h | 106 drivers/infiniband/hw/amso1100/c2_pd.c | 89 drivers/infiniband/hw/amso1100/c2_provider.c | 874 + drivers/infiniband/hw/amso1100/c2_provider.h | 181 drivers/infiniband/hw/amso1100/c2_qp.c | 975 + drivers/infiniband/hw/amso1100/c2_rnic.c | 664 + drivers/infiniband/hw/amso1100/c2_status.h | 158 drivers/infiniband/hw/amso1100/c2_user.h | 82 drivers/infiniband/hw/amso1100/c2_vq.c | 260 drivers/infiniband/hw/amso1100/c2_vq.h | 63 drivers/infiniband/hw/amso1100/c2_wr.h | 1520 ++ drivers/infiniband/hw/ehca/Kconfig | 16 drivers/infiniband/hw/ehca/Makefile | 16 drivers/infiniband/hw/ehca/ehca_av.c | 271 drivers/infiniband/hw/ehca/ehca_classes.h | 346 drivers/infiniband/hw/ehca/ehca_classes_pSeries.h | 236 drivers/infiniband/hw/ehca/ehca_cq.c | 427 drivers/infiniband/hw/ehca/ehca_eq.c | 185 drivers/infiniband/hw/ehca/ehca_hca.c | 241 drivers/infiniband/hw/ehca/ehca_irq.c | 762 + drivers/infiniband/hw/ehca/ehca_irq.h | 77 drivers/infiniband/hw/ehca/ehca_iverbs.h | 182 drivers/infiniband/hw/ehca/ehca_main.c | 820 + drivers/infiniband/hw/ehca/ehca_mcast.c | 131 drivers/infiniband/hw/ehca/ehca_mrmw.c | 2261 ++ drivers/infiniband/hw/ehca/ehca_mrmw.h | 140 drivers/infiniband/hw/ehca/ehca_pd.c | 114 drivers/infiniband/hw/ehca/ehca_qes.h | 259 drivers/infiniband/hw/ehca/ehca_qp.c | 1507 ++ drivers/infiniband/hw/ehca/ehca_reqs.c | 653 + drivers/infiniband/hw/ehca/ehca_sqp.c | 111 drivers/infiniband/hw/ehca/ehca_tools.h | 172 drivers/infiniband/hw/ehca/ehca_uverbs.c | 392 drivers/infiniband/hw/ehca/hcp_if.c | 874 + drivers/infiniband/hw/ehca/hcp_if.h | 261 drivers/infiniband/hw/ehca/hcp_phyp.c | 80 drivers/infiniband/hw/ehca/hcp_phyp.h | 90 drivers/infiniband/hw/ehca/hipz_fns.h | 68 drivers/infiniband/hw/ehca/hipz_fns_core.h | 100 drivers/infiniband/hw/ehca/hipz_hw.h | 388 drivers/infiniband/hw/ehca/ipz_pt_fn.c | 149 drivers/infiniband/hw/ehca/ipz_pt_fn.h | 247 drivers/infiniband/hw/ipath/Kconfig | 21 drivers/infiniband/hw/ipath/Makefile | 29 drivers/infiniband/hw/ipath/ipath_common.h | 73 drivers/infiniband/hw/ipath/ipath_cq.c | 209 drivers/infiniband/hw/ipath/ipath_debug.h | 2 drivers/infiniband/hw/ipath/ipath_diag.c | 155 drivers/infiniband/hw/ipath/ipath_driver.c | 702 - drivers/infiniband/hw/ipath/ipath_eeprom.c | 17 drivers/infiniband/hw/ipath/ipath_file_ops.c | 1009 + drivers/infiniband/hw/ipath/ipath_fs.c | 30 drivers/infiniband/hw/ipath/ipath_ht400.c | 1603 -- drivers/infiniband/hw/ipath/ipath_iba6110.c | 1619 ++ drivers/infiniband/hw/ipath/ipath_iba6120.c | 1365 + drivers/infiniband/hw/ipath/ipath_init_chip.c | 77 drivers/infiniband/hw/ipath/ipath_intr.c | 304 drivers/infiniband/hw/ipath/ipath_kernel.h | 169 drivers/infiniband/hw/ipath/ipath_keys.c | 15 drivers/infiniband/hw/ipath/ipath_layer.c | 1179 - drivers/infiniband/hw/ipath/ipath_layer.h | 115 drivers/infiniband/hw/ipath/ipath_mad.c | 353 drivers/infiniband/hw/ipath/ipath_mmap.c | 122 drivers/infiniband/hw/ipath/ipath_mr.c | 15 drivers/infiniband/hw/ipath/ipath_pe800.c | 1254 - drivers/infiniband/hw/ipath/ipath_qp.c | 258 drivers/infiniband/hw/ipath/ipath_rc.c | 145 drivers/infiniband/hw/ipath/ipath_registers.h | 47 drivers/infiniband/hw/ipath/ipath_ruc.c | 168 drivers/infiniband/hw/ipath/ipath_srq.c | 263 drivers/infiniband/hw/ipath/ipath_stats.c | 27 drivers/infiniband/hw/ipath/ipath_sysfs.c | 62 drivers/infiniband/hw/ipath/ipath_uc.c | 11 drivers/infiniband/hw/ipath/ipath_ud.c | 182 drivers/infiniband/hw/ipath/ipath_user_pages.c | 56 drivers/infiniband/hw/ipath/ipath_verbs.c | 706 + drivers/infiniband/hw/ipath/ipath_verbs.h | 270 drivers/infiniband/hw/ipath/ipath_verbs_mcast.c | 7 drivers/infiniband/hw/ipath/ipath_wc_ppc64.c | 62 drivers/infiniband/hw/ipath/ipath_wc_x86_64.c | 13 drivers/infiniband/hw/ipath/verbs_debug.h | 108 drivers/infiniband/hw/mthca/mthca_av.c | 2 drivers/infiniband/hw/mthca/mthca_catas.c | 62 drivers/infiniband/hw/mthca/mthca_cmd.c | 2 drivers/infiniband/hw/mthca/mthca_cq.c | 10 drivers/infiniband/hw/mthca/mthca_dev.h | 12 drivers/infiniband/hw/mthca/mthca_mad.c | 2 drivers/infiniband/hw/mthca/mthca_main.c | 88 drivers/infiniband/hw/mthca/mthca_provider.c | 2 drivers/infiniband/hw/mthca/mthca_qp.c | 20 drivers/infiniband/hw/mthca/mthca_srq.c | 2 drivers/infiniband/hw/mthca/mthca_uar.c | 2 drivers/infiniband/ulp/ipoib/ipoib.h | 2 drivers/infiniband/ulp/ipoib/ipoib_fs.c | 4 drivers/infiniband/ulp/ipoib/ipoib_ib.c | 194 drivers/infiniband/ulp/ipoib/ipoib_main.c | 37 drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 34 drivers/infiniband/ulp/iser/Kconfig | 15 drivers/infiniband/ulp/iser/iscsi_iser.c | 21 drivers/infiniband/ulp/iser/iscsi_iser.h | 17 drivers/infiniband/ulp/iser/iser_initiator.c | 60 drivers/infiniband/ulp/iser/iser_memory.c | 122 drivers/infiniband/ulp/iser/iser_verbs.c | 18 drivers/infiniband/ulp/srp/ib_srp.c | 43 drivers/input/Kconfig | 14 drivers/input/Makefile | 6 drivers/input/evbug.c | 11 drivers/input/evdev.c | 42 drivers/input/ff-core.c | 367 drivers/input/ff-memless.c | 515 + drivers/input/fixp-arith.h | 87 drivers/input/input.c | 46 drivers/input/joydev.c | 12 drivers/input/joystick/iforce/iforce-ff.c | 118 drivers/input/joystick/iforce/iforce-main.c | 226 drivers/input/joystick/iforce/iforce-packets.c | 15 drivers/input/joystick/iforce/iforce.h | 26 drivers/input/keyboard/Kconfig | 20 drivers/input/keyboard/Makefile | 2 drivers/input/keyboard/atkbd.c | 4 drivers/input/keyboard/omap-keypad.c | 492 + drivers/input/keyboard/stowaway.c | 187 drivers/input/misc/uinput.c | 67 drivers/input/misc/wistron_btns.c | 18 drivers/input/mouse/alps.c | 8 drivers/input/mouse/alps.h | 2 drivers/input/mouse/lifebook.c | 8 drivers/input/mouse/logips2pp.c | 23 drivers/input/mouse/psmouse-base.c | 42 drivers/input/mouse/sermouse.c | 2 drivers/input/mouse/synaptics.c | 10 drivers/input/mousedev.c | 28 drivers/input/power.c | 7 drivers/input/serio/i8042-io.h | 15 drivers/input/serio/i8042-x86ia64io.h | 14 drivers/input/serio/i8042.c | 741 - drivers/input/serio/i8042.h | 9 drivers/input/serio/libps2.c | 36 drivers/input/touchscreen/Kconfig | 36 drivers/input/touchscreen/Makefile | 3 drivers/input/touchscreen/elo.c | 167 drivers/input/touchscreen/hp680_ts_input.c | 14 drivers/input/touchscreen/penmount.c | 185 drivers/input/touchscreen/touchright.c | 196 drivers/input/touchscreen/touchwin.c | 203 drivers/input/tsdev.c | 12 drivers/isdn/capi/capi.c | 2 drivers/isdn/capi/capifs.c | 2 drivers/isdn/gigaset/bas-gigaset.c | 2 drivers/isdn/gigaset/interface.c | 2 drivers/isdn/gigaset/proc.c | 3 drivers/isdn/hardware/eicon/dsp_defs.h | 3 drivers/isdn/hisax/hfc_usb.h | 6 drivers/isdn/hisax/hisax.h | 13 drivers/isdn/i4l/Kconfig | 1 drivers/isdn/i4l/isdn_net.c | 4 drivers/isdn/i4l/isdn_tty.c | 2 drivers/leds/led-triggers.c | 1 drivers/leds/leds-net48xx.c | 9 drivers/macintosh/adbhid.c | 2 drivers/macintosh/macio_asic.c | 10 drivers/macintosh/macio_sysfs.c | 8 drivers/macintosh/smu.c | 23 drivers/macintosh/therm_adt746x.c | 8 drivers/macintosh/therm_pm72.c | 14 drivers/macintosh/therm_windtunnel.c | 4 drivers/macintosh/via-cuda.c | 4 drivers/macintosh/via-pmu-backlight.c | 2 drivers/macintosh/via-pmu-led.c | 2 drivers/macintosh/via-pmu.c | 24 drivers/macintosh/via-pmu68k.c | 6 drivers/macintosh/windfarm_pm81.c | 4 drivers/macintosh/windfarm_pm91.c | 2 drivers/macintosh/windfarm_smu_controls.c | 15 drivers/macintosh/windfarm_smu_sat.c | 15 drivers/macintosh/windfarm_smu_sensors.c | 14 drivers/md/Kconfig | 3 drivers/md/dm-crypt.c | 146 drivers/md/dm-emc.c | 3 drivers/media/common/Kconfig | 1 drivers/media/common/ir-keymaps.c | 79 drivers/media/common/saa7146_fops.c | 1 drivers/media/dvb/b2c2/Kconfig | 14 drivers/media/dvb/b2c2/flexcop-fe-tuner.c | 24 drivers/media/dvb/bt8xx/Kconfig | 14 drivers/media/dvb/bt8xx/dst.c | 9 drivers/media/dvb/bt8xx/dst_ca.c | 11 drivers/media/dvb/bt8xx/dst_common.h | 3 drivers/media/dvb/bt8xx/dvb-bt8xx.c | 37 drivers/media/dvb/cinergyT2/cinergyT2.c | 2 drivers/media/dvb/dvb-core/Kconfig | 13 drivers/media/dvb/dvb-core/dvb_frontend.c | 42 drivers/media/dvb/dvb-core/dvb_frontend.h | 7 drivers/media/dvb/dvb-core/dvb_ringbuffer.c | 1 drivers/media/dvb/dvb-core/dvbdev.h | 22 drivers/media/dvb/dvb-usb/Kconfig | 17 drivers/media/dvb/dvb-usb/a800.c | 8 drivers/media/dvb/dvb-usb/cxusb.c | 11 drivers/media/dvb/dvb-usb/dibusb-common.c | 200 drivers/media/dvb/dvb-usb/dibusb-mb.c | 18 drivers/media/dvb/dvb-usb/dibusb-mc.c | 41 drivers/media/dvb/dvb-usb/dibusb.h | 3 drivers/media/dvb/dvb-usb/digitv.c | 86 drivers/media/dvb/dvb-usb/dtt200u.c | 50 drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | 20 drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 124 drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 5 drivers/media/dvb/dvb-usb/dvb-usb-urb.c | 1 drivers/media/dvb/dvb-usb/nova-t-usb2.c | 2 drivers/media/dvb/dvb-usb/umt-010.c | 2 drivers/media/dvb/frontends/Kconfig | 71 drivers/media/dvb/frontends/Makefile | 8 drivers/media/dvb/frontends/bcm3510.h | 9 drivers/media/dvb/frontends/cx22700.h | 9 drivers/media/dvb/frontends/cx22702.c | 4 drivers/media/dvb/frontends/cx22702.h | 9 drivers/media/dvb/frontends/cx24110.c | 17 drivers/media/dvb/frontends/cx24110.h | 19 drivers/media/dvb/frontends/cx24123.c | 98 drivers/media/dvb/frontends/cx24123.h | 12 drivers/media/dvb/frontends/dib3000-common.c | 83 drivers/media/dvb/frontends/dib3000-common.h | 135 drivers/media/dvb/frontends/dib3000.h | 11 drivers/media/dvb/frontends/dib3000mb.c | 76 drivers/media/dvb/frontends/dib3000mb_priv.h | 93 drivers/media/dvb/frontends/dib3000mc.c | 1432 +- drivers/media/dvb/frontends/dib3000mc.h | 58 drivers/media/dvb/frontends/dib3000mc_priv.h | 428 drivers/media/dvb/frontends/dibx000_common.c | 152 drivers/media/dvb/frontends/dibx000_common.h | 166 drivers/media/dvb/frontends/dvb-pll.c | 11 drivers/media/dvb/frontends/dvb-pll.h | 4 drivers/media/dvb/frontends/isl6421.c | 30 drivers/media/dvb/frontends/isl6421.h | 11 drivers/media/dvb/frontends/l64781.h | 10 drivers/media/dvb/frontends/lgdt330x.h | 9 drivers/media/dvb/frontends/lnbp21.c | 30 drivers/media/dvb/frontends/lnbp21.h | 12 drivers/media/dvb/frontends/mt2060.c | 367 drivers/media/dvb/frontends/mt2060.h | 35 drivers/media/dvb/frontends/mt2060_priv.h | 105 drivers/media/dvb/frontends/mt312.h | 10 drivers/media/dvb/frontends/mt352.c | 16 drivers/media/dvb/frontends/mt352.h | 16 drivers/media/dvb/frontends/nxt200x.h | 9 drivers/media/dvb/frontends/nxt6000.h | 9 drivers/media/dvb/frontends/or51132.h | 9 drivers/media/dvb/frontends/or51211.h | 9 drivers/media/dvb/frontends/s5h1420.h | 9 drivers/media/dvb/frontends/sp8870.h | 9 drivers/media/dvb/frontends/sp887x.h | 9 drivers/media/dvb/frontends/stv0297.h | 9 drivers/media/dvb/frontends/stv0299.c | 9 drivers/media/dvb/frontends/stv0299.h | 19 drivers/media/dvb/frontends/tda10021.c | 63 drivers/media/dvb/frontends/tda10021.h | 19 drivers/media/dvb/frontends/tda1004x.c | 10 drivers/media/dvb/frontends/tda1004x.h | 25 drivers/media/dvb/frontends/tda10086.c | 740 + drivers/media/dvb/frontends/tda10086.h | 41 drivers/media/dvb/frontends/tda8083.h | 9 drivers/media/dvb/frontends/tda826x.c | 173 drivers/media/dvb/frontends/tda826x.h | 40 drivers/media/dvb/frontends/tua6100.c | 205 drivers/media/dvb/frontends/tua6100.h | 47 drivers/media/dvb/frontends/ves1820.h | 9 drivers/media/dvb/frontends/ves1x93.h | 9 drivers/media/dvb/frontends/zl10353.c | 11 drivers/media/dvb/frontends/zl10353.h | 14 drivers/media/dvb/ttpci/Kconfig | 57 drivers/media/dvb/ttpci/av7110.c | 58 drivers/media/dvb/ttpci/av7110_av.c | 1 drivers/media/dvb/ttpci/av7110_ca.c | 1 drivers/media/dvb/ttpci/av7110_hw.c | 1 drivers/media/dvb/ttpci/av7110_v4l.c | 3 drivers/media/dvb/ttpci/budget-av.c | 184 drivers/media/dvb/ttpci/budget-ci.c | 32 drivers/media/dvb/ttpci/budget-patch.c | 17 drivers/media/dvb/ttpci/budget.c | 53 drivers/media/dvb/ttusb-budget/Kconfig | 14 drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 28 drivers/media/dvb/ttusb-dec/ttusb_dec.c | 8 drivers/media/radio/Kconfig | 30 drivers/media/radio/dsbr100.c | 198 drivers/media/radio/radio-aimslab.c | 151 drivers/media/radio/radio-aztech.c | 166 drivers/media/radio/radio-cadet.c | 250 drivers/media/radio/radio-gemtek-pci.c | 170 drivers/media/radio/radio-gemtek.c | 165 drivers/media/radio/radio-maestro.c | 197 drivers/media/radio/radio-maxiradio.c | 166 drivers/media/radio/radio-rtrack2.c | 163 drivers/media/radio/radio-sf16fmi.c | 158 drivers/media/radio/radio-sf16fmr2.c | 223 drivers/media/radio/radio-terratec.c | 154 drivers/media/radio/radio-trust.c | 188 drivers/media/radio/radio-typhoon.c | 171 drivers/media/radio/radio-zoltrix.c | 183 drivers/media/video/Kconfig | 476 - drivers/media/video/Makefile | 45 drivers/media/video/bt866.c | 2 drivers/media/video/bt8xx/Kconfig | 5 drivers/media/video/bt8xx/bttv-cards.c | 2 drivers/media/video/bt8xx/bttv-driver.c | 12 drivers/media/video/bt8xx/bttv-i2c.c | 17 drivers/media/video/compat_ioctl32.c | 59 drivers/media/video/cpia2/cpia2.h | 4 drivers/media/video/cx2341x.c | 25 drivers/media/video/cx25840/Kconfig | 2 drivers/media/video/cx25840/cx25840-vbi.c | 4 drivers/media/video/cx88/Kconfig | 109 drivers/media/video/cx88/Makefile | 7 drivers/media/video/cx88/cx88-blackbird.c | 2 drivers/media/video/cx88/cx88-cards.c | 161 drivers/media/video/cx88/cx88-core.c | 13 drivers/media/video/cx88/cx88-dvb.c | 330 drivers/media/video/cx88/cx88-i2c.c | 14 drivers/media/video/cx88/cx88-input.c | 19 drivers/media/video/cx88/cx88-tvaudio.c | 5 drivers/media/video/cx88/cx88-video.c | 7 drivers/media/video/cx88/cx88-vp3054-i2c.c | 1 drivers/media/video/cx88/cx88.h | 5 drivers/media/video/em28xx/Kconfig | 3 drivers/media/video/em28xx/em28xx-video.c | 2 drivers/media/video/ks0127.c | 3 drivers/media/video/ov511.c | 7 drivers/media/video/pvrusb2/Kconfig | 18 drivers/media/video/pvrusb2/Makefile | 6 drivers/media/video/pvrusb2/pvrusb2-ctrl.c | 21 drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c | 2 drivers/media/video/pvrusb2/pvrusb2-encoder.c | 4 drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | 31 drivers/media/video/pvrusb2/pvrusb2-hdw.c | 84 .../media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c | 4 drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | 2 drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | 6 drivers/media/video/pvrusb2/pvrusb2-main.c | 1 drivers/media/video/pvrusb2/pvrusb2-sysfs.c | 3 drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 36 drivers/media/video/pwc/pwc-if.c | 2 drivers/media/video/saa5246a.c | 1 drivers/media/video/saa5249.c | 1 drivers/media/video/saa7115.c | 1250 + drivers/media/video/saa711x_regs.h | 549 + drivers/media/video/saa7134/Kconfig | 50 drivers/media/video/saa7134/Makefile | 3 drivers/media/video/saa7134/saa7134-alsa.c | 8 drivers/media/video/saa7134/saa7134-cards.c | 127 drivers/media/video/saa7134/saa7134-core.c | 2 drivers/media/video/saa7134/saa7134-dvb.c | 197 drivers/media/video/saa7134/saa7134-input.c | 6 drivers/media/video/saa7134/saa7134-tvaudio.c | 1 drivers/media/video/saa7134/saa7134.h | 3 drivers/media/video/tda9887.c | 2 drivers/media/video/tuner-simple.c | 6 drivers/media/video/tuner-types.c | 1 drivers/media/video/tvaudio.c | 42 drivers/media/video/tveeprom.c | 2 drivers/media/video/tvp5150.c | 7 drivers/media/video/usbvideo/konicawc.c | 9 drivers/media/video/usbvideo/vicam.c | 4 drivers/media/video/v4l1-compat.c | 12 drivers/media/video/v4l2-common.c | 1 drivers/media/video/video-buf-dvb.c | 2 drivers/media/video/videodev.c | 32 drivers/media/video/vino.c | 1 drivers/media/video/vivi.c | 5 drivers/media/video/vpx3220.c | 2 drivers/media/video/w9968cf.c | 7 drivers/media/video/zoran_card.c | 7 drivers/media/video/zoran_driver.c | 7 drivers/media/video/zr36120.c | 6 drivers/message/fusion/mptfc.c | 100 drivers/message/fusion/mptsas.c | 19 drivers/message/i2o/Kconfig | 2 drivers/message/i2o/i2o_block.c | 7 drivers/message/i2o/pci.c | 7 drivers/mfd/ucb1x00-ts.c | 45 drivers/misc/Makefile | 3 drivers/misc/ibmasm/ibmasmfs.c | 17 drivers/misc/lkdtm.c | 342 drivers/mmc/Kconfig | 2 drivers/mmc/Makefile | 3 drivers/mmc/at91_mci.c | 5 drivers/mmc/au1xmmc.c | 2 drivers/mmc/imxmmc.c | 2 drivers/mmc/mmc.c | 1 drivers/mmc/mmc_block.c | 66 drivers/mmc/mmc_queue.c | 6 drivers/mmc/mmci.c | 13 drivers/mmc/omap.c | 7 drivers/mmc/sdhci.c | 7 drivers/mmc/sdhci.h | 5 drivers/mmc/wbsd.c | 7 drivers/mmc/wbsd.h | 5 drivers/mtd/Kconfig | 22 drivers/mtd/Makefile | 1 drivers/mtd/chips/cfi_cmdset_0002.c | 1 drivers/mtd/devices/Kconfig | 2 drivers/mtd/devices/pmc551.c | 1154 + drivers/mtd/maps/Kconfig | 8 drivers/mtd/maps/Makefile | 1 drivers/mtd/maps/amd76xrom.c | 5 drivers/mtd/maps/arctic-mtd.c | 14 drivers/mtd/maps/beech-mtd.c | 14 drivers/mtd/maps/cstm_mips_ixx.c | 18 drivers/mtd/maps/ebony.c | 4 drivers/mtd/maps/fortunet.c | 3 drivers/mtd/maps/ichxrom.c | 3 drivers/mtd/maps/iq80310.c | 118 drivers/mtd/maps/ixp4xx.c | 2 drivers/mtd/maps/l440gx.c | 12 drivers/mtd/maps/lasat.c | 2 drivers/mtd/maps/nettel.c | 34 drivers/mtd/maps/ocotea.c | 4 drivers/mtd/maps/pcmciamtd.c | 4 drivers/mtd/maps/physmap.c | 33 drivers/mtd/maps/redwood.c | 11 drivers/mtd/maps/sbc8240.c | 11 drivers/mtd/maps/scx200_docflash.c | 9 drivers/mtd/maps/walnut.c | 4 drivers/mtd/mtd_blkdevs.c | 4 drivers/mtd/mtdcore.c | 10 drivers/mtd/nand/au1550nd.c | 11 drivers/mtd/nand/edb7312.c | 3 drivers/mtd/nand/nand_base.c | 172 drivers/mtd/nand/nand_bbt.c | 2 drivers/mtd/nand/ndfc.c | 2 drivers/mtd/nand/ppchameleonevb.c | 7 drivers/mtd/nftlcore.c | 4 drivers/mtd/onenand/Kconfig | 6 drivers/mtd/onenand/onenand_base.c | 154 drivers/mtd/ssfdc.c | 474 + drivers/net/3c501.c | 61 drivers/net/3c501.h | 4 drivers/net/3c503.c | 16 drivers/net/3c503.h | 4 drivers/net/3c505.c | 24 drivers/net/3c505.h | 2 drivers/net/3c507.c | 14 drivers/net/3c509.c | 54 drivers/net/3c515.c | 64 drivers/net/3c523.c | 28 drivers/net/3c523.h | 14 drivers/net/3c527.c | 530 - drivers/net/3c527.h | 4 drivers/net/3c59x.c | 39 drivers/net/7990.c | 60 drivers/net/7990.h | 24 drivers/net/8139cp.c | 128 drivers/net/8139too.c | 11 drivers/net/82596.c | 12 drivers/net/8390.c | 246 drivers/net/8390.h | 2 drivers/net/Kconfig | 72 drivers/net/Makefile | 13 drivers/net/Space.c | 24 drivers/net/a2065.c | 40 drivers/net/a2065.h | 4 drivers/net/ac3200.c | 6 drivers/net/acenic.c | 58 drivers/net/acenic.h | 6 drivers/net/acenic_firmware.h |18808 ++++++++++---------- drivers/net/amd8111e.c | 489 - drivers/net/amd8111e.h | 102 drivers/net/apne.c | 10 drivers/net/appletalk/ipddp.c | 5 drivers/net/arcnet/com20020-pci.c | 3 drivers/net/ariadne.c | 2 drivers/net/arm/Kconfig | 7 drivers/net/arm/Makefile | 1 drivers/net/arm/at91_ether.c | 4 drivers/net/arm/ep93xx_eth.c | 944 + drivers/net/arm/etherh.c | 2 drivers/net/at1700.c | 30 drivers/net/atari_bionet.c | 14 drivers/net/atari_pamsnet.c | 2 drivers/net/atarilance.c | 22 drivers/net/atp.c | 2 drivers/net/au1000_eth.c | 71 drivers/net/au1000_eth.h | 12 drivers/net/b44.c | 4 drivers/net/bmac.c | 67 drivers/net/bmac.h | 2 drivers/net/bnx2.c | 200 drivers/net/bnx2.h | 82 drivers/net/bonding/bond_3ad.c | 70 drivers/net/bonding/bond_main.c | 232 drivers/net/bonding/bond_sysfs.c | 56 drivers/net/bonding/bonding.h | 34 drivers/net/bsd_comp.c | 68 drivers/net/cassini.c | 544 - drivers/net/cassini.h | 766 - drivers/net/chelsio/cxgb2.c | 4 drivers/net/chelsio/sge.c | 10 drivers/net/cris/eth_v10.c | 4 drivers/net/cs89x0.c | 82 drivers/net/cs89x0.h | 4 drivers/net/de600.c | 4 drivers/net/de620.c | 38 drivers/net/declance.c | 8 drivers/net/defxx.c | 270 drivers/net/defxx.h | 192 drivers/net/depca.c | 110 drivers/net/depca.h | 28 drivers/net/dgrs.c | 27 drivers/net/dgrs.h | 4 drivers/net/dgrs_asstruct.h | 2 drivers/net/dgrs_bcomm.h | 2 drivers/net/dgrs_ether.h | 4 drivers/net/dgrs_i82596.h | 2 drivers/net/dl2k.c | 166 drivers/net/dl2k.h | 6 drivers/net/dummy.c | 28 drivers/net/e100.c | 110 drivers/net/e1000/LICENSE | 339 drivers/net/e1000/Makefile | 35 drivers/net/e1000/e1000.h | 65 drivers/net/e1000/e1000_ethtool.c | 429 drivers/net/e1000/e1000_hw.c | 2201 +- drivers/net/e1000/e1000_hw.h | 116 drivers/net/e1000/e1000_main.c | 431 drivers/net/e1000/e1000_osdep.h | 54 drivers/net/e1000/e1000_param.c | 208 drivers/net/e2100.c | 4 drivers/net/eepro.c | 7 drivers/net/eepro100.c | 40 drivers/net/eexpress.c | 98 drivers/net/eexpress.h | 14 drivers/net/ehea/Makefile | 6 drivers/net/ehea/ehea.h | 447 drivers/net/ehea/ehea_ethtool.c | 294 drivers/net/ehea/ehea_hcall.h | 51 drivers/net/ehea/ehea_hw.h | 292 drivers/net/ehea/ehea_main.c | 2654 +++ drivers/net/ehea/ehea_phyp.c | 705 + drivers/net/ehea/ehea_phyp.h | 455 drivers/net/ehea/ehea_qmr.c | 582 + drivers/net/ehea/ehea_qmr.h | 358 drivers/net/epic100.c | 11 drivers/net/eql.c | 32 drivers/net/eth16i.c | 308 drivers/net/ewrk3.c | 68 drivers/net/ewrk3.h | 30 drivers/net/fealnx.c | 44 drivers/net/fec.c | 84 drivers/net/fec_8xx/fec_main.c | 30 drivers/net/forcedeth.c | 573 - drivers/net/fs_enet/fs_enet-main.c | 2 drivers/net/fs_enet/fs_enet.h | 3 drivers/net/gianfar.c | 13 drivers/net/gianfar.h | 2 drivers/net/gianfar_ethtool.c | 18 drivers/net/gianfar_mii.c | 4 drivers/net/gianfar_mii.h | 2 drivers/net/gianfar_sysfs.c | 2 drivers/net/gt64240eth.h | 402 drivers/net/gt96100eth.c | 1566 -- drivers/net/gt96100eth.h | 346 drivers/net/hamachi.c | 242 drivers/net/hp-plus.c | 4 drivers/net/hp.c | 2 drivers/net/hp100.c | 160 drivers/net/hp100.h | 44 drivers/net/hplance.c | 12 drivers/net/ibm_emac/ibm_emac_core.c | 4 drivers/net/ibmveth.c | 5 drivers/net/ibmveth.h | 27 drivers/net/ifb.c | 42 drivers/net/ioc3-eth.c | 10 drivers/net/irda/Kconfig | 1 drivers/net/irda/ali-ircc.c | 8 drivers/net/irda/irda-usb.c | 18 drivers/net/irda/irport.c | 4 drivers/net/irda/mcs7780.c | 1 drivers/net/irda/nsc-ircc.c | 2 drivers/net/irda/smsc-ircc2.c | 38 drivers/net/irda/stir4200.c | 15 drivers/net/irda/via-ircc.c | 12 drivers/net/irda/vlsi_ir.h | 2 drivers/net/irda/w83977af_ir.c | 5 drivers/net/isa-skeleton.c | 16 drivers/net/iseries_veth.c | 2 drivers/net/ixgb/Makefile | 38 drivers/net/ixgb/ixgb.h | 43 drivers/net/ixgb/ixgb_ee.c | 36 drivers/net/ixgb/ixgb_ee.h | 36 drivers/net/ixgb/ixgb_ethtool.c | 44 drivers/net/ixgb/ixgb_hw.c | 53 drivers/net/ixgb/ixgb_hw.h | 36 drivers/net/ixgb/ixgb_ids.h | 37 drivers/net/ixgb/ixgb_main.c | 192 drivers/net/ixgb/ixgb_osdep.h | 48 drivers/net/ixgb/ixgb_param.c | 36 drivers/net/jazzsonic.c | 12 drivers/net/lance.c | 38 drivers/net/lasi_82596.c | 48 drivers/net/lne390.c | 4 drivers/net/loopback.c | 35 drivers/net/lp486e.c | 28 drivers/net/mac8390.c | 48 drivers/net/mac89x0.c | 18 drivers/net/mace.c | 12 drivers/net/macmace.c | 88 drivers/net/macsonic.c | 38 drivers/net/meth.c | 14 drivers/net/mii.c | 18 drivers/net/mv643xx_eth.c | 10 drivers/net/myri10ge/myri10ge.c | 238 drivers/net/myri10ge/myri10ge_mcp.h | 47 drivers/net/myri_code.h | 9538 +++++----- drivers/net/myri_sbus.c | 28 drivers/net/natsemi.c | 41 drivers/net/ne-h8300.c | 2 drivers/net/ne.c | 4 drivers/net/ne2.c | 70 drivers/net/ne2k-pci.c | 12 drivers/net/ne3210.c | 17 drivers/net/netx-eth.c | 1 drivers/net/ni5010.c | 118 drivers/net/ni52.c | 2 drivers/net/ni52.h | 16 drivers/net/ni65.c | 20 drivers/net/ni65.h | 6 drivers/net/ns83820.c | 44 drivers/net/oaknet.c | 14 drivers/net/pci-skeleton.c | 9 drivers/net/pcmcia/3c574_cs.c | 4 drivers/net/pcmcia/3c589_cs.c | 4 drivers/net/pcmcia/axnet_cs.c | 7 drivers/net/pcmcia/fmvj18x_cs.c | 8 drivers/net/pcmcia/ibmtr_cs.c | 2 drivers/net/pcmcia/nmclan_cs.c | 4 drivers/net/pcmcia/pcnet_cs.c | 19 drivers/net/pcmcia/smc91c92_cs.c | 9 drivers/net/pcmcia/xirc2ps_cs.c | 4 drivers/net/pcnet32.c | 692 - drivers/net/phy/fixed.c | 10 drivers/net/phy/phy_device.c | 10 drivers/net/phy/smsc.c | 1 drivers/net/phy/vitesse.c | 1 drivers/net/plip.c | 42 drivers/net/ppp_async.c | 6 drivers/net/ppp_deflate.c | 4 drivers/net/ppp_generic.c | 16 drivers/net/ppp_mppe.c | 68 drivers/net/ppp_synctty.c | 2 drivers/net/pppoe.c | 17 drivers/net/qla3xxx.c | 3536 ++++ drivers/net/qla3xxx.h | 1194 + drivers/net/r8169.c | 662 - drivers/net/rionet.c | 2 drivers/net/rrunner.c | 52 drivers/net/rrunner.h | 8 drivers/net/s2io-regs.h | 4 drivers/net/s2io.c | 69 drivers/net/s2io.h | 10 drivers/net/saa9730.c | 2 drivers/net/saa9730.h | 16 drivers/net/sb1000.c | 24 drivers/net/sb1250-mac.c | 9 drivers/net/seeq8005.c | 98 drivers/net/seeq8005.h | 4 drivers/net/sgiseeq.h | 4 drivers/net/shaper.c | 104 drivers/net/sis190.c | 7 drivers/net/sis900.c | 227 drivers/net/sis900.h | 18 drivers/net/sk98lin/skethtool.c | 2 drivers/net/sk98lin/skge.c | 10 drivers/net/sk_mca.c | 18 drivers/net/sk_mca.h | 4 drivers/net/skfp/skfddi.c | 2 drivers/net/skge.c | 565 - drivers/net/skge.h | 38 drivers/net/sky2.c | 955 + drivers/net/sky2.h | 97 drivers/net/slhc.c | 34 drivers/net/slip.c | 32 drivers/net/slip.h | 4 drivers/net/smc-mca.c | 10 drivers/net/smc-ultra.c | 6 drivers/net/smc-ultra32.c | 6 drivers/net/smc911x.c | 4 drivers/net/smc9194.c | 4 drivers/net/smc9194.h | 72 drivers/net/smc91x.c | 8 drivers/net/smc91x.h | 19 drivers/net/sonic.c | 22 drivers/net/sonic.h | 4 drivers/net/spider_net.c | 28 drivers/net/spider_net.h | 13 drivers/net/spider_net_ethtool.c | 57 drivers/net/starfire.c | 14 drivers/net/stnic.c | 10 drivers/net/sun3_82586.c | 18 drivers/net/sun3_82586.h | 18 drivers/net/sun3lance.c | 74 drivers/net/sunbmac.c | 2 drivers/net/sundance.c | 69 drivers/net/sungem.c | 94 drivers/net/sungem.h | 12 drivers/net/sungem_phy.c | 50 drivers/net/sungem_phy.h | 2 drivers/net/sunhme.c | 20 drivers/net/sunlance.c | 70 drivers/net/sunqe.c | 6 drivers/net/tc35815.c | 10 drivers/net/tg3.c | 807 + drivers/net/tg3.h | 48 drivers/net/tlan.c | 344 drivers/net/tlan.h | 24 drivers/net/tokenring/3c359.c | 2 drivers/net/tokenring/lanstreamer.c | 61 drivers/net/tokenring/lanstreamer.h | 12 drivers/net/tulip/21142.c | 6 drivers/net/tulip/de2104x.c | 20 drivers/net/tulip/de4x5.c | 3 drivers/net/tulip/dmfe.c | 6 drivers/net/tulip/eeprom.c | 2 drivers/net/tulip/interrupt.c | 2 drivers/net/tulip/media.c | 2 drivers/net/tulip/pnic.c | 2 drivers/net/tulip/pnic2.c | 2 drivers/net/tulip/timer.c | 16 drivers/net/tulip/tulip.h | 36 drivers/net/tulip/tulip_core.c | 104 drivers/net/tulip/uli526x.c | 16 drivers/net/tulip/winbond-840.c | 94 drivers/net/tulip/xircom_cb.c | 2 drivers/net/tulip/xircom_tulip_cb.c | 6 drivers/net/tun.c | 91 drivers/net/typhoon-firmware.h | 7488 ++++---- drivers/net/typhoon.c | 26 drivers/net/typhoon.h | 4 drivers/net/ucc_geth.c | 19 drivers/net/via-rhine.c | 15 drivers/net/via-velocity.c | 230 drivers/net/via-velocity.h | 23 drivers/net/wan/Kconfig | 12 drivers/net/wan/Makefile | 19 drivers/net/wan/cycx_main.c | 1 drivers/net/wan/dlci.c | 1 drivers/net/wan/dscc4.c | 2 drivers/net/wan/farsync.c | 2 drivers/net/wan/hdlc.c | 368 drivers/net/wan/hdlc_cisco.c | 200 drivers/net/wan/hdlc_fr.c | 389 drivers/net/wan/hdlc_generic.c | 339 drivers/net/wan/hdlc_ppp.c | 77 drivers/net/wan/hdlc_raw.c | 50 drivers/net/wan/hdlc_raw_eth.c | 49 drivers/net/wan/hdlc_x25.c | 54 drivers/net/wan/lmc/lmc_main.c | 2 drivers/net/wan/pc300.h | 1 drivers/net/wan/pc300_drv.c | 32 drivers/net/wan/pci200syn.c | 2 drivers/net/wan/sdla.c | 1 drivers/net/wan/syncppp.c | 4 drivers/net/wan/wanxl.c | 2 drivers/net/wd.c | 12 drivers/net/wireless/Kconfig | 23 drivers/net/wireless/airo.c | 116 drivers/net/wireless/atmel.c | 18 drivers/net/wireless/atmel_pci.c | 2 drivers/net/wireless/bcm43xx/bcm43xx.h | 182 drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c | 82 drivers/net/wireless/bcm43xx/bcm43xx_debugfs.h | 1 drivers/net/wireless/bcm43xx/bcm43xx_dma.c | 583 - drivers/net/wireless/bcm43xx/bcm43xx_dma.h | 296 drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c | 2 drivers/net/wireless/bcm43xx/bcm43xx_ethtool.h | 2 drivers/net/wireless/bcm43xx/bcm43xx_leds.c | 10 drivers/net/wireless/bcm43xx/bcm43xx_main.c | 902 + drivers/net/wireless/bcm43xx/bcm43xx_main.h | 6 drivers/net/wireless/bcm43xx/bcm43xx_phy.c | 48 drivers/net/wireless/bcm43xx/bcm43xx_pio.c | 4 drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c | 178 drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 168 drivers/net/wireless/bcm43xx/bcm43xx_xmit.c | 10 drivers/net/wireless/hostap/hostap.h | 2 drivers/net/wireless/hostap/hostap_cs.c | 1 drivers/net/wireless/hostap/hostap_ioctl.c | 12 drivers/net/wireless/ipw2100.c | 45 drivers/net/wireless/ipw2200.c | 260 drivers/net/wireless/ipw2200.h | 51 drivers/net/wireless/orinoco.c | 15 drivers/net/wireless/orinoco.h | 8 drivers/net/wireless/orinoco_nortel.c | 2 drivers/net/wireless/orinoco_pci.c | 2 drivers/net/wireless/orinoco_plx.c | 2 drivers/net/wireless/orinoco_tmd.c | 2 drivers/net/wireless/prism54/isl_ioctl.c | 613 + drivers/net/wireless/prism54/isl_ioctl.h | 6 drivers/net/wireless/prism54/islpci_dev.c | 4 drivers/net/wireless/prism54/islpci_dev.h | 2 drivers/net/wireless/prism54/islpci_hotplug.c | 2 drivers/net/wireless/ray_cs.c | 8 drivers/net/wireless/strip.c | 4 drivers/net/wireless/wavelan_cs.c | 2 drivers/net/wireless/wl3501_cs.c | 8 drivers/net/wireless/zd1201.c | 6 drivers/net/wireless/zd1211rw/Makefile | 1 drivers/net/wireless/zd1211rw/zd_chip.c | 193 drivers/net/wireless/zd1211rw/zd_chip.h | 36 drivers/net/wireless/zd1211rw/zd_def.h | 6 drivers/net/wireless/zd1211rw/zd_ieee80211.h | 2 drivers/net/wireless/zd1211rw/zd_mac.c | 58 drivers/net/wireless/zd1211rw/zd_mac.h | 11 drivers/net/wireless/zd1211rw/zd_netdev.c | 17 drivers/net/wireless/zd1211rw/zd_rf.c | 7 drivers/net/wireless/zd1211rw/zd_rf.h | 1 drivers/net/wireless/zd1211rw/zd_rf_al2230.c | 155 drivers/net/wireless/zd1211rw/zd_rf_al7230b.c | 274 drivers/net/wireless/zd1211rw/zd_usb.c | 134 drivers/net/wireless/zd1211rw/zd_usb.h | 17 drivers/net/yellowfin.c | 56 drivers/net/znet.c | 72 drivers/oprofile/oprofilefs.c | 11 drivers/parisc/led.c | 2 drivers/parisc/power.c | 3 drivers/parport/parport_pc.c | 4 drivers/parport/parport_serial.c | 4 drivers/pci/Kconfig | 25 drivers/pci/bus.c | 22 drivers/pci/hotplug/acpiphp.h | 5 drivers/pci/hotplug/acpiphp_glue.c | 127 drivers/pci/hotplug/acpiphp_ibm.c | 4 drivers/pci/hotplug/cpqphp_sysfs.c | 2 drivers/pci/hotplug/fakephp.c | 18 drivers/pci/hotplug/pci_hotplug.h | 4 drivers/pci/hotplug/pci_hotplug_core.c | 157 drivers/pci/hotplug/pciehp_ctrl.c | 12 drivers/pci/hotplug/pcihp_skeleton.c | 9 drivers/pci/hotplug/rpaphp_core.c | 32 drivers/pci/hotplug/shpchp.h | 2 drivers/pci/hotplug/shpchp_core.c | 6 drivers/pci/hotplug/shpchp_sysfs.c | 4 drivers/pci/msi.c | 64 drivers/pci/pci-driver.c | 47 drivers/pci/pci-sysfs.c | 153 drivers/pci/pci.c | 59 drivers/pci/pci.h | 2 drivers/pci/pcie/Kconfig | 1 drivers/pci/pcie/Makefile | 3 drivers/pci/pcie/aer/Kconfig | 12 drivers/pci/pcie/aer/Makefile | 8 drivers/pci/pcie/aer/aerdrv.c | 346 drivers/pci/pcie/aer/aerdrv.h | 125 drivers/pci/pcie/aer/aerdrv_acpi.c | 68 drivers/pci/pcie/aer/aerdrv_core.c | 758 + drivers/pci/pcie/aer/aerdrv_errprint.c | 248 drivers/pci/pcie/portdrv.h | 2 drivers/pci/pcie/portdrv_bus.c | 1 drivers/pci/pcie/portdrv_core.c | 11 drivers/pci/pcie/portdrv_pci.c | 211 drivers/pci/probe.c | 16 drivers/pci/quirks.c | 127 drivers/pci/remove.c | 37 drivers/pci/setup-bus.c | 13 drivers/pcmcia/cardbus.c | 5 drivers/pcmcia/omap_cf.c | 25 drivers/pcmcia/socket_sysfs.c | 27 drivers/pnp/pnpbios/core.c | 8 drivers/rtc/Kconfig | 38 drivers/rtc/Makefile | 5 drivers/rtc/class.c | 6 drivers/rtc/rtc-at91.c | 24 drivers/rtc/rtc-dev.c | 7 drivers/rtc/rtc-ds1307.c | 2 drivers/rtc/rtc-ds1553.c | 10 drivers/rtc/rtc-ds1672.c | 2 drivers/rtc/rtc-ds1742.c | 12 drivers/rtc/rtc-ep93xx.c | 2 drivers/rtc/rtc-isl1208.c | 2 drivers/rtc/rtc-lib.c | 8 drivers/rtc/rtc-m48t86.c | 2 drivers/rtc/rtc-max6902.c | 2 drivers/rtc/rtc-pcf8563.c | 6 drivers/rtc/rtc-pcf8583.c | 2 drivers/rtc/rtc-pl031.c | 2 drivers/rtc/rtc-proc.c | 6 drivers/rtc/rtc-rs5c348.c | 11 drivers/rtc/rtc-rs5c372.c | 2 drivers/rtc/rtc-s3c.c | 2 drivers/rtc/rtc-sa1100.c | 2 drivers/rtc/rtc-sh.c | 467 drivers/rtc/rtc-sysfs.c | 2 drivers/rtc/rtc-test.c | 2 drivers/rtc/rtc-v3020.c | 5 drivers/rtc/rtc-vr41xx.c | 2 drivers/rtc/rtc-x1205.c | 2 drivers/s390/Kconfig | 30 drivers/s390/block/Kconfig | 2 drivers/s390/block/dasd.c | 8 drivers/s390/block/dasd_devmap.c | 82 drivers/s390/block/dasd_diag.c | 36 drivers/s390/block/dasd_eckd.c | 2 drivers/s390/block/dasd_eer.c | 2 drivers/s390/block/dasd_fba.c | 2 drivers/s390/block/dasd_int.h | 1 drivers/s390/block/xpram.c | 56 drivers/s390/char/Makefile | 1 drivers/s390/char/con3215.c | 2 drivers/s390/char/fs3270.c | 12 drivers/s390/char/monwriter.c | 292 drivers/s390/char/sclp.c | 31 drivers/s390/char/sclp_tty.c | 2 drivers/s390/char/sclp_vt220.c | 2 drivers/s390/char/tty3270.c | 3 drivers/s390/char/vmcp.c | 2 drivers/s390/char/vmcp.h | 2 drivers/s390/char/vmwatchdog.c | 52 drivers/s390/cio/chsc.c | 5 drivers/s390/cio/cio.c | 95 drivers/s390/cio/css.c | 203 drivers/s390/cio/device.c | 109 drivers/s390/cio/device_fsm.c | 40 drivers/s390/cio/device_id.c | 38 drivers/s390/cio/device_ops.c | 17 drivers/s390/cio/device_pgid.c | 81 drivers/s390/cio/ioasm.h | 220 drivers/s390/cio/qdio.c | 4 drivers/s390/cio/qdio.h | 208 drivers/s390/crypto/Makefile | 15 drivers/s390/crypto/ap_bus.c | 1221 + drivers/s390/crypto/ap_bus.h | 158 drivers/s390/crypto/z90common.h | 166 drivers/s390/crypto/z90crypt.h | 71 drivers/s390/crypto/z90hardware.c | 2531 --- drivers/s390/crypto/z90main.c | 3379 ---- drivers/s390/crypto/zcrypt_api.c | 1091 + drivers/s390/crypto/zcrypt_api.h | 141 drivers/s390/crypto/zcrypt_cca_key.h | 350 drivers/s390/crypto/zcrypt_cex2a.c | 435 drivers/s390/crypto/zcrypt_cex2a.h | 126 drivers/s390/crypto/zcrypt_error.h | 133 drivers/s390/crypto/zcrypt_mono.c | 100 drivers/s390/crypto/zcrypt_pcica.c | 418 drivers/s390/crypto/zcrypt_pcica.h | 117 drivers/s390/crypto/zcrypt_pcicc.c | 630 + drivers/s390/crypto/zcrypt_pcicc.h | 176 drivers/s390/crypto/zcrypt_pcixcc.c | 951 + drivers/s390/crypto/zcrypt_pcixcc.h | 79 drivers/s390/net/iucv.c | 39 drivers/s390/net/qeth_main.c | 2 drivers/s390/s390mach.c | 112 drivers/s390/scsi/zfcp_aux.c | 84 drivers/s390/scsi/zfcp_ccw.c | 13 drivers/s390/scsi/zfcp_dbf.c | 13 drivers/s390/scsi/zfcp_def.h | 32 drivers/s390/scsi/zfcp_erp.c | 231 drivers/s390/scsi/zfcp_ext.h | 18 drivers/s390/scsi/zfcp_fsf.c | 299 drivers/s390/scsi/zfcp_scsi.c | 114 drivers/s390/sysinfo.c | 455 drivers/sbus/char/aurora.c | 2 drivers/sbus/char/bbc_envctrl.c | 5 drivers/sbus/char/envctrl.c | 7 drivers/scsi/53c700.c | 2 drivers/scsi/BusLogic.c | 61 drivers/scsi/BusLogic.h | 5 drivers/scsi/Kconfig | 166 drivers/scsi/Makefile | 21 drivers/scsi/a2091.c | 6 drivers/scsi/a2091.h | 4 drivers/scsi/a3000.c | 8 drivers/scsi/a3000.h | 4 drivers/scsi/aacraid/aachba.c | 60 drivers/scsi/aacraid/aacraid.h | 20 drivers/scsi/aacraid/commctrl.c | 25 drivers/scsi/aacraid/comminit.c | 13 drivers/scsi/aacraid/commsup.c | 280 drivers/scsi/aacraid/dpcsup.c | 10 drivers/scsi/aacraid/linit.c | 35 drivers/scsi/aacraid/rkt.c | 446 drivers/scsi/aacraid/rx.c | 117 drivers/scsi/aacraid/sa.c | 21 drivers/scsi/advansys.c | 90 drivers/scsi/aha152x.c | 53 drivers/scsi/aha1740.c | 1 drivers/scsi/ahci.c | 1473 -- drivers/scsi/aic7xxx/aic7770_osm.c | 3 drivers/scsi/aic7xxx/aic79xx_osm.c | 8 drivers/scsi/aic7xxx/aic7xxx_osm.c | 25 drivers/scsi/aic7xxx_old.c | 15 drivers/scsi/aic94xx/Kconfig | 41 drivers/scsi/aic94xx/Makefile | 39 drivers/scsi/aic94xx/aic94xx.h | 114 drivers/scsi/aic94xx/aic94xx_dev.c | 353 drivers/scsi/aic94xx/aic94xx_dump.c | 959 + drivers/scsi/aic94xx/aic94xx_dump.h | 52 drivers/scsi/aic94xx/aic94xx_hwi.c | 1376 + drivers/scsi/aic94xx/aic94xx_hwi.h | 397 drivers/scsi/aic94xx/aic94xx_init.c | 866 + drivers/scsi/aic94xx/aic94xx_reg.c | 332 drivers/scsi/aic94xx/aic94xx_reg.h | 302 drivers/scsi/aic94xx/aic94xx_reg_def.h | 2398 +++ drivers/scsi/aic94xx/aic94xx_sas.h | 785 + drivers/scsi/aic94xx/aic94xx_scb.c | 758 + drivers/scsi/aic94xx/aic94xx_sds.c | 1089 + drivers/scsi/aic94xx/aic94xx_seq.c | 1404 + drivers/scsi/aic94xx/aic94xx_seq.h | 70 drivers/scsi/aic94xx/aic94xx_task.c | 642 + drivers/scsi/aic94xx/aic94xx_tmf.c | 636 + drivers/scsi/arcmsr/Makefile | 6 drivers/scsi/arcmsr/arcmsr.h | 472 + drivers/scsi/arcmsr/arcmsr_attr.c | 381 drivers/scsi/arcmsr/arcmsr_hba.c | 1496 ++ drivers/scsi/ata_piix.c | 1040 - drivers/scsi/dpt_i2o.c | 7 drivers/scsi/eata_generic.h | 1 drivers/scsi/eata_pio.c | 127 drivers/scsi/fcal.c | 3 drivers/scsi/g_NCR5380.c | 3 drivers/scsi/gdth.c | 4 drivers/scsi/gvp11.c | 8 drivers/scsi/gvp11.h | 4 drivers/scsi/hosts.c | 7 drivers/scsi/hptiop.c | 1 drivers/scsi/ibmvscsi/rpa_vscsi.c | 11 drivers/scsi/ide-scsi.c | 16 drivers/scsi/ipr.c | 34 drivers/scsi/ipr.h | 82 drivers/scsi/iscsi_tcp.c | 801 - drivers/scsi/iscsi_tcp.h | 44 drivers/scsi/libata-bmdma.c | 1149 - drivers/scsi/libata-core.c | 6020 ------ drivers/scsi/libata-eh.c | 2246 -- drivers/scsi/libata-scsi.c | 3173 --- drivers/scsi/libata.h | 117 drivers/scsi/libiscsi.c | 144 drivers/scsi/libsas/Kconfig | 39 drivers/scsi/libsas/Makefile | 36 drivers/scsi/libsas/sas_discover.c | 749 + drivers/scsi/libsas/sas_dump.c | 76 drivers/scsi/libsas/sas_dump.h | 42 drivers/scsi/libsas/sas_event.c | 75 drivers/scsi/libsas/sas_expander.c | 1855 ++ drivers/scsi/libsas/sas_init.c | 267 drivers/scsi/libsas/sas_internal.h | 146 drivers/scsi/libsas/sas_phy.c | 158 drivers/scsi/libsas/sas_port.c | 279 drivers/scsi/libsas/sas_scsi_host.c | 786 + drivers/scsi/lpfc/lpfc.h | 8 drivers/scsi/lpfc/lpfc_attr.c | 285 drivers/scsi/lpfc/lpfc_crtn.h | 3 drivers/scsi/lpfc/lpfc_ct.c | 33 drivers/scsi/lpfc/lpfc_disc.h | 6 drivers/scsi/lpfc/lpfc_els.c | 5 drivers/scsi/lpfc/lpfc_hbadisc.c | 186 drivers/scsi/lpfc/lpfc_init.c | 8 drivers/scsi/lpfc/lpfc_nportdisc.c | 2 drivers/scsi/lpfc/lpfc_scsi.c | 10 drivers/scsi/lpfc/lpfc_version.h | 2 drivers/scsi/mac53c94.c | 2 drivers/scsi/megaraid.c | 9 drivers/scsi/megaraid/megaraid_mbox.c | 16 drivers/scsi/megaraid/megaraid_sas.c | 36 drivers/scsi/mesh.c | 20 drivers/scsi/mvme147.c | 6 drivers/scsi/mvme147.h | 4 drivers/scsi/pdc_adma.c | 740 - drivers/scsi/pluto.c | 6 drivers/scsi/qla1280.c | 4 drivers/scsi/sata_mv.c | 2467 --- drivers/scsi/sata_nv.c | 595 - drivers/scsi/sata_promise.c | 844 - drivers/scsi/sata_promise.h | 157 drivers/scsi/sata_qstor.c | 730 - drivers/scsi/sata_sil.c | 727 - drivers/scsi/sata_sil24.c | 1222 - drivers/scsi/sata_sis.c | 347 drivers/scsi/sata_svw.c | 508 - drivers/scsi/sata_sx4.c | 1502 -- drivers/scsi/sata_uli.c | 300 drivers/scsi/sata_via.c | 502 - drivers/scsi/sata_vsc.c | 482 - drivers/scsi/scsi.c | 61 drivers/scsi/scsi.h | 2 drivers/scsi/scsi_debug.c | 230 drivers/scsi/scsi_lib.c | 47 drivers/scsi/scsi_netlink.c | 199 drivers/scsi/scsi_priv.h | 11 drivers/scsi/scsi_proc.c | 4 drivers/scsi/scsi_scan.c | 146 drivers/scsi/scsi_transport_fc.c | 370 drivers/scsi/scsi_transport_iscsi.c | 2 drivers/scsi/scsi_transport_sas.c | 83 drivers/scsi/scsi_transport_spi.c | 30 drivers/scsi/sd.c | 7 drivers/scsi/sgiwd93.c | 8 drivers/scsi/sim710.c | 1 drivers/scsi/stex.c | 1252 + drivers/scsi/sun3_NCR5380.c | 2 drivers/scsi/sun3_scsi.c | 2 drivers/scsi/sun3_scsi_vme.c | 2 drivers/scsi/ultrastor.c | 23 drivers/scsi/ultrastor.h | 12 drivers/serial/68328serial.c | 2 drivers/serial/68360serial.c | 2 drivers/serial/8250_acorn.c | 9 drivers/serial/8250_gsc.c | 1 drivers/serial/Kconfig | 11 drivers/serial/at91_serial.c | 2 drivers/serial/crisv10.c | 2 drivers/serial/ioc4_serial.c | 3 drivers/serial/ip22zilog.c | 16 drivers/serial/mcfserial.c | 2 drivers/serial/mpc52xx_uart.c | 11 drivers/serial/mpsc.c | 12 drivers/serial/mux.c | 2 drivers/serial/pmac_zilog.c | 9 drivers/serial/serial_core.c | 16 drivers/serial/sh-sci.c | 1146 - drivers/serial/sh-sci.h | 90 drivers/serial/sunsu.c | 3 drivers/serial/sunzilog.c | 2 drivers/tc/zs.c | 2 drivers/usb/Kconfig | 1 drivers/usb/Makefile | 12 drivers/usb/atm/ueagle-atm.c | 74 drivers/usb/class/cdc-acm.c | 2 drivers/usb/class/usblp.c | 15 drivers/usb/core/Makefile | 2 drivers/usb/core/buffer.c | 4 drivers/usb/core/config.c | 4 drivers/usb/core/devices.c | 6 drivers/usb/core/devio.c | 78 drivers/usb/core/driver.c | 1012 + drivers/usb/core/endpoint.c | 30 drivers/usb/core/file.c | 2 drivers/usb/core/generic.c | 208 drivers/usb/core/hcd-pci.c | 18 drivers/usb/core/hcd.c | 254 drivers/usb/core/hcd.h | 60 drivers/usb/core/hub.c | 555 - drivers/usb/core/hub.h | 3 drivers/usb/core/inode.c | 26 drivers/usb/core/message.c | 148 drivers/usb/core/notify.c | 3 drivers/usb/core/sysfs.c | 60 drivers/usb/core/urb.c | 15 drivers/usb/core/usb.c | 569 - drivers/usb/core/usb.h | 95 drivers/usb/gadget/Kconfig | 16 drivers/usb/gadget/Makefile | 2 drivers/usb/gadget/at91_udc.c | 8 drivers/usb/gadget/dummy_hcd.c | 41 drivers/usb/gadget/ether.c | 11 drivers/usb/gadget/file_storage.c | 37 drivers/usb/gadget/gmidi.c | 1337 + drivers/usb/gadget/inode.c | 149 drivers/usb/gadget/net2280.c | 156 drivers/usb/gadget/omap_udc.c | 6 drivers/usb/gadget/pxa2xx_udc.c | 70 drivers/usb/gadget/pxa2xx_udc.h | 24 drivers/usb/gadget/serial.c | 7 drivers/usb/gadget/zero.c | 2 drivers/usb/host/Kconfig | 29 drivers/usb/host/Makefile | 1 drivers/usb/host/ehci-au1xxx.c | 2 drivers/usb/host/ehci-dbg.c | 31 drivers/usb/host/ehci-fsl.c | 2 drivers/usb/host/ehci-hcd.c | 95 drivers/usb/host/ehci-hub.c | 14 drivers/usb/host/ehci-mem.c | 14 drivers/usb/host/ehci-pci.c | 10 drivers/usb/host/ehci-q.c | 26 drivers/usb/host/ehci-sched.c | 26 drivers/usb/host/ehci.h | 59 drivers/usb/host/isp116x-hcd.c | 4 drivers/usb/host/isp116x.h | 2 drivers/usb/host/ohci-at91.c | 7 drivers/usb/host/ohci-au1xxx.c | 7 drivers/usb/host/ohci-dbg.c | 18 drivers/usb/host/ohci-ep93xx.c | 3 drivers/usb/host/ohci-hcd.c | 64 drivers/usb/host/ohci-hub.c | 273 drivers/usb/host/ohci-lh7a404.c | 7 drivers/usb/host/ohci-mem.c | 1 drivers/usb/host/ohci-omap.c | 120 drivers/usb/host/ohci-pci.c | 16 drivers/usb/host/ohci-pnx4008.c | 476 + drivers/usb/host/ohci-ppc-soc.c | 3 drivers/usb/host/ohci-pxa27x.c | 3 drivers/usb/host/ohci-s3c2410.c | 5 drivers/usb/host/ohci-sa1111.c | 5 drivers/usb/host/ohci.h | 5 drivers/usb/host/sl811-hcd.c | 13 drivers/usb/host/u132-hcd.c | 3295 ++++ drivers/usb/host/uhci-debug.c | 6 drivers/usb/host/uhci-hcd.c | 12 drivers/usb/host/uhci-hub.c | 12 drivers/usb/image/mdc800.c | 4 drivers/usb/image/microtek.c | 18 drivers/usb/image/microtek.h | 4 drivers/usb/input/Kconfig | 48 drivers/usb/input/Makefile | 7 drivers/usb/input/acecad.c | 5 drivers/usb/input/appletouch.c | 5 drivers/usb/input/ati_remote.c | 8 drivers/usb/input/fixp-arith.h | 87 drivers/usb/input/hid-core.c | 35 drivers/usb/input/hid-ff.c | 49 drivers/usb/input/hid-input.c | 23 drivers/usb/input/hid-lgff.c | 523 - drivers/usb/input/hid-pidff.c | 1330 + drivers/usb/input/hid-tmff.c | 399 drivers/usb/input/hid-zpff.c | 110 drivers/usb/input/hid.h | 32 drivers/usb/input/hiddev.c | 2 drivers/usb/input/itmtouch.c | 2 drivers/usb/input/keyspan_remote.c | 3 drivers/usb/input/mtouchusb.c | 2 drivers/usb/input/pid.c | 295 drivers/usb/input/pid.h | 62 drivers/usb/input/powermate.c | 4 drivers/usb/input/touchkitusb.c | 2 drivers/usb/input/trancevibrator.c | 159 drivers/usb/input/usbmouse.c | 2 drivers/usb/input/usbtouchscreen.c | 285 drivers/usb/input/wacom.c | 1003 - drivers/usb/input/wacom.h | 132 drivers/usb/input/wacom_sys.c | 315 drivers/usb/input/wacom_wac.c | 646 + drivers/usb/input/wacom_wac.h | 48 drivers/usb/input/yealink.c | 2 drivers/usb/misc/Kconfig | 61 drivers/usb/misc/Makefile | 5 drivers/usb/misc/adutux.c | 900 + drivers/usb/misc/auerswald.c | 6 drivers/usb/misc/cypress_cy7c63.c | 19 drivers/usb/misc/cytherm.c | 35 drivers/usb/misc/ftdi-elan.c | 2809 +++ drivers/usb/misc/idmouse.c | 2 drivers/usb/misc/ldusb.c | 10 drivers/usb/misc/legousbtower.c | 2 drivers/usb/misc/phidget.c | 43 drivers/usb/misc/phidget.h | 12 drivers/usb/misc/phidgetkit.c | 372 drivers/usb/misc/phidgetmotorcontrol.c | 466 drivers/usb/misc/phidgetservo.c | 117 drivers/usb/misc/sisusbvga/sisusb.c | 2 drivers/usb/misc/usb_u132.h | 97 drivers/usb/misc/usblcd.c | 10 drivers/usb/misc/usbled.c | 20 drivers/usb/mon/mon_main.c | 7 drivers/usb/mon/mon_stat.c | 4 drivers/usb/mon/mon_text.c | 19 drivers/usb/mon/usb_mon.h | 5 drivers/usb/net/asix.c | 1005 + drivers/usb/net/kaweth.c | 1 drivers/usb/net/net1080.c | 15 drivers/usb/net/pegasus.c | 20 drivers/usb/net/rtl8150.c | 2 drivers/usb/net/usbnet.c | 44 drivers/usb/net/usbnet.h | 1 drivers/usb/serial/Kconfig | 25 drivers/usb/serial/Makefile | 2 drivers/usb/serial/aircable.c | 625 + drivers/usb/serial/airprime.c | 261 drivers/usb/serial/ark3116.c | 233 drivers/usb/serial/cyberjack.c | 6 drivers/usb/serial/cypress_m8.c | 129 drivers/usb/serial/ftdi_sio.c | 34 drivers/usb/serial/ftdi_sio.h | 10 drivers/usb/serial/garmin_gps.c | 219 drivers/usb/serial/generic.c | 6 drivers/usb/serial/ipaq.c | 39 drivers/usb/serial/ipw.c | 6 drivers/usb/serial/ir-usb.c | 6 drivers/usb/serial/keyspan_pda.c | 6 drivers/usb/serial/mos7840.c | 2962 +++ drivers/usb/serial/omninet.c | 6 drivers/usb/serial/pl2303.c | 828 - drivers/usb/serial/pl2303.h | 8 drivers/usb/serial/safe_serial.c | 6 drivers/usb/serial/usb-serial.c | 30 drivers/usb/storage/Kconfig | 17 drivers/usb/storage/Makefile | 1 drivers/usb/storage/initializers.c | 73 drivers/usb/storage/initializers.h | 1 drivers/usb/storage/karma.c | 155 drivers/usb/storage/karma.h | 7 drivers/usb/storage/libusual.c | 10 drivers/usb/storage/onetouch.c | 8 drivers/usb/storage/scsiglue.c | 15 drivers/usb/storage/transport.c | 5 drivers/usb/storage/unusual_devs.h | 32 drivers/usb/storage/usb.c | 11 drivers/usb/usb-skeleton.c | 101 drivers/video/Kconfig | 26 drivers/video/S3triofb.c | 12 drivers/video/aty/radeon_base.c | 8 drivers/video/aty/radeon_monitor.c | 12 drivers/video/aty/radeon_pm.c | 19 drivers/video/backlight/hp680_bl.c | 4 drivers/video/backlight/locomolcd.c | 30 drivers/video/console/Kconfig | 2 drivers/video/console/fbcon.c | 4 drivers/video/fbsysfs.c | 12 drivers/video/hitfb.c | 229 drivers/video/i810/i810-i2c.c | 1 drivers/video/i810/i810_main.c | 12 drivers/video/intelfb/Makefile | 4 drivers/video/intelfb/intelfb.h | 79 drivers/video/intelfb/intelfb_i2c.c | 200 drivers/video/intelfb/intelfbdrv.c | 64 drivers/video/intelfb/intelfbhw.c | 136 drivers/video/intelfb/intelfbhw.h | 25 drivers/video/matrox/i2c-matroxfb.c | 12 drivers/video/nvidia/nv_of.c | 12 drivers/video/nvidia/nvidia.c | 13 drivers/video/offb.c | 22 drivers/video/pvr2fb.c | 22 drivers/video/riva/fbdev.c | 9 drivers/video/savage/savagefb-i2c.c | 1 drivers/video/savage/savagefb_driver.c | 14 fs/9p/v9fs.c | 6 fs/9p/vfs_inode.c | 6 fs/Kconfig | 75 fs/Makefile | 15 fs/adfs/file.c | 6 fs/adfs/inode.c | 1 fs/adfs/super.c | 6 fs/affs/affs.h | 1 fs/affs/file.c | 6 fs/affs/super.c | 7 fs/afs/file.c | 2 fs/afs/inode.c | 1 fs/afs/proc.c | 2 fs/afs/vlocation.c | 3 fs/afs/volume.c | 3 fs/aio.c | 166 fs/autofs/autofs_i.h | 2 fs/autofs/inode.c | 7 fs/autofs/root.c | 4 fs/autofs/symlink.c | 2 fs/autofs4/autofs_i.h | 2 fs/autofs4/expire.c | 6 fs/autofs4/inode.c | 2 fs/autofs4/root.c | 54 fs/bad_inode.c | 2 fs/befs/linuxvfs.c | 5 fs/bfs/dir.c | 13 fs/bfs/file.c | 6 fs/bfs/inode.c | 10 fs/binfmt_aout.c | 14 fs/binfmt_elf.c | 96 fs/binfmt_elf_fdpic.c | 7 fs/binfmt_misc.c | 15 fs/bio.c | 4 fs/block_dev.c | 83 fs/buffer.c | 176 fs/char_dev.c | 108 fs/cifs/CHANGES | 7 fs/cifs/cifs_fs_sb.h | 2 fs/cifs/cifsfs.c | 45 fs/cifs/cifsfs.h | 2 fs/cifs/cifspdu.h | 2 fs/cifs/connect.c | 69 fs/cifs/dir.c | 23 fs/cifs/file.c | 4 fs/cifs/inode.c | 15 fs/cifs/ioctl.c | 7 fs/cifs/readdir.c | 5 fs/cifs/sess.c | 6 fs/cifs/xattr.c | 2 fs/coda/coda_linux.c | 2 fs/coda/dir.c | 8 fs/coda/inode.c | 3 fs/compat.c | 59 fs/compat_ioctl.c | 406 fs/configfs/dir.c | 36 fs/configfs/file.c | 3 fs/configfs/inode.c | 4 fs/configfs/mount.c | 2 fs/cramfs/inode.c | 15 fs/cramfs/uncompress.c | 3 fs/dcache.c | 168 fs/debugfs/file.c | 60 fs/debugfs/inode.c | 24 fs/devpts/inode.c | 6 fs/dnotify.c | 2 fs/dquot.c | 5 fs/efs/super.c | 6 fs/eventpoll.c | 1 fs/exec.c | 83 fs/ext2/acl.c | 4 fs/ext2/dir.c | 3 fs/ext2/ext2.h | 1 fs/ext2/file.c | 12 fs/ext2/ialloc.c | 1 fs/ext2/inode.c | 1 fs/ext2/ioctl.c | 32 fs/ext2/namei.c | 2 fs/ext2/super.c | 38 fs/ext2/xattr.c | 3 fs/ext3/acl.c | 6 fs/ext3/balloc.c | 350 fs/ext3/bitmap.c | 2 fs/ext3/dir.c | 22 fs/ext3/file.c | 12 fs/ext3/fsync.c | 6 fs/ext3/hash.c | 8 fs/ext3/ialloc.c | 55 fs/ext3/inode.c | 82 fs/ext3/ioctl.c | 55 fs/ext3/namei.c | 75 fs/ext3/resize.c | 42 fs/ext3/super.c | 110 fs/ext3/xattr.c | 16 fs/fat/cache.c | 3 fs/fat/dir.c | 56 fs/fat/file.c | 15 fs/fat/inode.c | 97 fs/fcntl.c | 79 fs/file.c | 84 fs/file_table.c | 3 fs/filesystems.c | 2 fs/freevxfs/vxfs.h | 2 fs/freevxfs/vxfs_inode.c | 5 fs/freevxfs/vxfs_super.c | 11 fs/fs-writeback.c | 9 fs/fuse/control.c | 8 fs/fuse/dev.c | 39 fs/fuse/dir.c | 6 fs/fuse/file.c | 6 fs/fuse/inode.c | 2 fs/generic_acl.c | 197 fs/hfs/bnode.c | 3 fs/hfs/btree.c | 3 fs/hfs/dir.c | 4 fs/hfs/inode.c | 8 fs/hfs/super.c | 6 fs/hfsplus/bnode.c | 3 fs/hfsplus/btree.c | 3 fs/hfsplus/dir.c | 8 fs/hfsplus/hfsplus_fs.h | 8 fs/hfsplus/inode.c | 8 fs/hfsplus/ioctl.c | 17 fs/hfsplus/super.c | 3 fs/hostfs/hostfs_kern.c | 7 fs/hpfs/buffer.c | 2 fs/hpfs/file.c | 6 fs/hpfs/hpfs_fn.h | 1 fs/hpfs/inode.c | 1 fs/hpfs/namei.c | 14 fs/hpfs/super.c | 7 fs/hppfs/hppfs_kern.c | 1 fs/hugetlbfs/inode.c | 7 fs/inode.c | 42 fs/internal.h | 55 fs/ioprio.c | 19 fs/isofs/inode.c | 58 fs/jbd/checkpoint.c | 33 fs/jbd/commit.c | 182 fs/jbd/journal.c | 95 fs/jbd/recovery.c | 58 fs/jbd/revoke.c | 70 fs/jbd/transaction.c | 134 fs/jffs/inode-v23.c | 53 fs/jffs/intrep.c | 11 fs/jffs/jffs_fm.c | 6 fs/jffs2/dir.c | 12 fs/jffs2/file.c | 6 fs/jffs2/fs.c | 8 fs/jffs2/jffs2_fs_i.h | 4 fs/jffs2/super.c | 3 fs/jfs/acl.c | 8 fs/jfs/endian24.h | 2 fs/jfs/file.c | 14 fs/jfs/inode.c | 10 fs/jfs/ioctl.c | 15 fs/jfs/jfs_acl.h | 8 fs/jfs/jfs_btree.h | 6 fs/jfs/jfs_debug.c | 6 fs/jfs/jfs_dinode.h | 8 fs/jfs/jfs_dmap.c | 192 fs/jfs/jfs_dmap.h | 28 fs/jfs/jfs_dtree.c | 18 fs/jfs/jfs_dtree.h | 10 fs/jfs/jfs_extent.c | 58 fs/jfs/jfs_extent.h | 12 fs/jfs/jfs_filsys.h | 24 fs/jfs/jfs_imap.c | 243 fs/jfs/jfs_imap.h | 18 fs/jfs/jfs_incore.h | 8 fs/jfs/jfs_inode.c | 16 fs/jfs/jfs_inode.h | 6 fs/jfs/jfs_lock.h | 10 fs/jfs/jfs_logmgr.c | 38 fs/jfs/jfs_logmgr.h | 76 fs/jfs/jfs_metapage.c | 14 fs/jfs/jfs_metapage.h | 12 fs/jfs/jfs_mount.c | 34 fs/jfs/jfs_superblock.h | 22 fs/jfs/jfs_txnmgr.c | 28 fs/jfs/jfs_txnmgr.h | 12 fs/jfs/jfs_types.h | 4 fs/jfs/jfs_umount.c | 24 fs/jfs/jfs_unicode.c | 12 fs/jfs/jfs_unicode.h | 10 fs/jfs/jfs_uniupr.c | 8 fs/jfs/jfs_xattr.h | 2 fs/jfs/jfs_xtree.c | 14 fs/jfs/jfs_xtree.h | 8 fs/jfs/namei.c | 89 fs/jfs/resize.c | 6 fs/jfs/super.c | 12 fs/jfs/symlink.c | 6 fs/jfs/xattr.c | 48 fs/libfs.c | 28 fs/lockd/clntlock.c | 4 fs/lockd/clntproc.c | 16 fs/lockd/host.c | 55 fs/lockd/mon.c | 43 fs/lockd/svc.c | 74 fs/lockd/svclock.c | 2 fs/lockd/svcsubs.c | 3 fs/lockd/xdr.c | 2 fs/locks.c | 14 fs/mbcache.c | 1 fs/minix/bitmap.c | 2 fs/minix/file.c | 6 fs/minix/inode.c | 13 fs/minix/namei.c | 2 fs/mpage.c | 2 fs/msdos/namei.c | 28 fs/namei.c | 265 fs/namespace.c | 47 fs/ncpfs/dir.c | 3 fs/ncpfs/file.c | 3 fs/ncpfs/inode.c | 7 fs/ncpfs/ioctl.c | 239 fs/ncpfs/symlink.c | 4 fs/nfs/Makefile | 6 fs/nfs/callback.c | 38 fs/nfs/callback.h | 7 fs/nfs/callback_proc.c | 13 fs/nfs/client.c | 1449 ++ fs/nfs/delegation.c | 42 fs/nfs/delegation.h | 10 fs/nfs/dir.c | 349 fs/nfs/direct.c | 29 fs/nfs/file.c | 38 fs/nfs/getroot.c | 311 fs/nfs/idmap.c | 45 fs/nfs/inode.c | 55 fs/nfs/internal.h | 105 fs/nfs/mount_clnt.c | 30 fs/nfs/namespace.c | 46 fs/nfs/nfs2xdr.c | 21 fs/nfs/nfs3proc.c | 44 fs/nfs/nfs3xdr.c | 7 fs/nfs/nfs4_fs.h | 78 fs/nfs/nfs4namespace.c | 118 fs/nfs/nfs4proc.c | 218 fs/nfs/nfs4renewd.c | 20 fs/nfs/nfs4state.c | 174 fs/nfs/nfs4xdr.c | 50 fs/nfs/nfsroot.c | 2 fs/nfs/pagelist.c | 3 fs/nfs/proc.c | 43 fs/nfs/read.c | 24 fs/nfs/super.c | 1421 +- fs/nfs/write.c | 15 fs/nfsd/export.c | 12 fs/nfsd/nfs4callback.c | 68 fs/nfsd/nfs4idmap.c | 3 fs/nfsd/nfs4proc.c | 2 fs/nfsd/nfs4recover.c | 21 fs/nfsd/nfs4state.c | 8 fs/nfsd/nfsctl.c | 152 fs/nfsd/nfssvc.c | 318 fs/nfsd/vfs.c | 8 fs/nls/nls_base.c | 2 fs/no-block.c | 22 fs/ntfs/aops.c | 30 fs/ntfs/aops.h | 2 fs/ntfs/attrib.c | 54 fs/ntfs/attrib.h | 8 fs/ntfs/bitmap.c | 8 fs/ntfs/bitmap.h | 4 fs/ntfs/collate.h | 8 fs/ntfs/compress.c | 4 fs/ntfs/dir.c | 5 fs/ntfs/file.c | 46 fs/ntfs/index.c | 4 fs/ntfs/index.h | 12 fs/ntfs/inode.c | 16 fs/ntfs/layout.h | 6 fs/ntfs/lcnalloc.c | 20 fs/ntfs/lcnalloc.h | 8 fs/ntfs/logfile.c | 108 fs/ntfs/logfile.h | 6 fs/ntfs/mft.c | 67 fs/ntfs/mft.h | 2 fs/ntfs/ntfs.h | 2 fs/ntfs/quota.c | 12 fs/ntfs/quota.h | 2 fs/ntfs/runlist.c | 54 fs/ntfs/super.c | 206 fs/ntfs/types.h | 5 fs/ntfs/unistr.c | 12 fs/ntfs/usnjrnl.c | 8 fs/ntfs/usnjrnl.h | 2 fs/ocfs2/Makefile | 1 fs/ocfs2/alloc.c | 28 fs/ocfs2/aops.c | 83 fs/ocfs2/buffer_head_io.c | 95 fs/ocfs2/buffer_head_io.h | 2 fs/ocfs2/cluster/heartbeat.c | 8 fs/ocfs2/cluster/tcp_internal.h | 8 fs/ocfs2/dcache.c | 359 fs/ocfs2/dcache.h | 27 fs/ocfs2/dir.c | 28 fs/ocfs2/dlm/dlmapi.h | 1 fs/ocfs2/dlm/dlmast.c | 16 fs/ocfs2/dlm/dlmcommon.h | 1 fs/ocfs2/dlm/dlmfs.c | 12 fs/ocfs2/dlm/dlmlock.c | 10 fs/ocfs2/dlm/dlmmaster.c | 4 fs/ocfs2/dlm/dlmrecovery.c | 3 fs/ocfs2/dlm/userdlm.c | 81 fs/ocfs2/dlm/userdlm.h | 1 fs/ocfs2/dlmglue.c | 1105 + fs/ocfs2/dlmglue.h | 22 fs/ocfs2/export.c | 8 fs/ocfs2/file.c | 31 fs/ocfs2/inode.c | 192 fs/ocfs2/inode.h | 11 fs/ocfs2/ioctl.c | 136 fs/ocfs2/ioctl.h | 16 fs/ocfs2/journal.c | 3 fs/ocfs2/namei.c | 199 fs/ocfs2/ocfs2_fs.h | 24 fs/ocfs2/ocfs2_lockid.h | 25 fs/ocfs2/super.c | 6 fs/ocfs2/sysfile.c | 6 fs/ocfs2/uptodate.c | 21 fs/ocfs2/uptodate.h | 2 fs/ocfs2/vote.c | 180 fs/ocfs2/vote.h | 5 fs/open.c | 213 fs/openpromfs/inode.c | 2 fs/partitions/Makefile | 2 fs/partitions/efi.c | 9 fs/partitions/ldm.c | 267 fs/partitions/msdos.c | 31 fs/pipe.c | 215 fs/posix_acl.c | 6 fs/proc/array.c | 88 fs/proc/base.c | 1762 +- fs/proc/internal.h | 1 fs/proc/kcore.c | 10 fs/proc/nommu.c | 20 fs/proc/proc_misc.c | 25 fs/proc/root.c | 12 fs/proc/task_mmu.c | 5 fs/proc/task_nommu.c | 74 fs/qnx4/file.c | 6 fs/qnx4/inode.c | 8 fs/qnx4/namei.c | 8 fs/quota.c | 44 fs/ramfs/file-mmu.c | 6 fs/ramfs/file-nommu.c | 6 fs/ramfs/inode.c | 5 fs/read_write.c | 253 fs/read_write.h | 14 fs/reiserfs/Makefile | 2 fs/reiserfs/bitmap.c | 216 fs/reiserfs/dir.c | 3 fs/reiserfs/file.c | 11 fs/reiserfs/inode.c | 18 fs/reiserfs/ioctl.c | 35 fs/reiserfs/journal.c | 54 fs/reiserfs/namei.c | 16 fs/reiserfs/resize.c | 71 fs/reiserfs/super.c | 186 fs/romfs/inode.c | 3 fs/select.c | 8 fs/smbfs/file.c | 24 fs/smbfs/inode.c | 5 fs/smbfs/proc.c | 1 fs/smbfs/request.c | 3 fs/splice.c | 2 fs/stat.c | 3 fs/super.c | 37 fs/sync.c | 113 fs/sysfs/bin.c | 13 fs/sysfs/dir.c | 6 fs/sysfs/inode.c | 12 fs/sysfs/mount.c | 2 fs/sysfs/symlink.c | 14 fs/sysfs/sysfs.h | 2 fs/sysv/file.c | 6 fs/sysv/ialloc.c | 2 fs/sysv/inode.c | 2 fs/sysv/namei.c | 2 fs/sysv/super.c | 6 fs/udf/file.c | 16 fs/udf/ialloc.c | 7 fs/udf/inode.c | 4 fs/udf/namei.c | 26 fs/udf/super.c | 7 fs/ufs/file.c | 6 fs/ufs/ialloc.c | 1 fs/ufs/inode.c | 1 fs/ufs/namei.c | 2 fs/ufs/super.c | 6 fs/utimes.c | 137 fs/vfat/namei.c | 17 fs/xfs/Kconfig | 1 fs/xfs/Makefile-linux-2.6 | 1 fs/xfs/linux-2.6/kmem.c | 29 fs/xfs/linux-2.6/kmem.h | 10 fs/xfs/linux-2.6/sema.h | 2 fs/xfs/linux-2.6/sv.h | 2 fs/xfs/linux-2.6/xfs_aops.c | 9 fs/xfs/linux-2.6/xfs_buf.c | 51 fs/xfs/linux-2.6/xfs_buf.h | 7 fs/xfs/linux-2.6/xfs_file.c | 142 fs/xfs/linux-2.6/xfs_globals.c | 2 fs/xfs/linux-2.6/xfs_ioctl.c | 19 fs/xfs/linux-2.6/xfs_iops.c | 29 fs/xfs/linux-2.6/xfs_linux.h | 14 fs/xfs/linux-2.6/xfs_lrw.c | 14 fs/xfs/linux-2.6/xfs_super.c | 3 fs/xfs/linux-2.6/xfs_vfs.h | 2 fs/xfs/linux-2.6/xfs_vnode.c | 1 fs/xfs/linux-2.6/xfs_vnode.h | 2 fs/xfs/quota/xfs_dquot_item.c | 26 fs/xfs/quota/xfs_qm.c | 14 fs/xfs/quota/xfs_qm.h | 6 fs/xfs/quota/xfs_quota_priv.h | 2 fs/xfs/support/ktrace.c | 2 fs/xfs/xfs_ag.h | 2 fs/xfs/xfs_alloc.c | 10 fs/xfs/xfs_alloc_btree.c | 132 fs/xfs/xfs_attr.c | 181 fs/xfs/xfs_attr.h | 8 fs/xfs/xfs_attr_leaf.c | 351 fs/xfs/xfs_attr_leaf.h | 41 fs/xfs/xfs_behavior.c | 20 fs/xfs/xfs_behavior.h | 2 fs/xfs/xfs_bmap.c | 90 fs/xfs/xfs_bmap_btree.c | 113 fs/xfs/xfs_bmap_btree.h | 11 fs/xfs/xfs_btree.c | 8 fs/xfs/xfs_btree.h | 5 fs/xfs/xfs_buf_item.c | 22 fs/xfs/xfs_da_btree.c | 33 fs/xfs/xfs_error.h | 9 fs/xfs/xfs_extfree_item.c | 69 fs/xfs/xfs_extfree_item.h | 50 fs/xfs/xfs_fs.h | 8 fs/xfs/xfs_ialloc.c | 11 fs/xfs/xfs_ialloc_btree.c | 62 fs/xfs/xfs_ialloc_btree.h | 19 fs/xfs/xfs_iget.c | 44 fs/xfs/xfs_inode.c | 30 fs/xfs/xfs_inode.h | 12 fs/xfs/xfs_inode_item.c | 16 fs/xfs/xfs_inode_item.h | 66 fs/xfs/xfs_iomap.c | 89 fs/xfs/xfs_itable.c | 184 fs/xfs/xfs_itable.h | 16 fs/xfs/xfs_log.c | 19 fs/xfs/xfs_log.h | 8 fs/xfs/xfs_log_priv.h | 10 fs/xfs/xfs_mount.h | 5 fs/xfs/xfs_quota.h | 2 fs/xfs/xfs_rtalloc.c | 38 fs/xfs/xfs_sb.h | 22 fs/xfs/xfs_trans.h | 2 fs/xfs/xfs_trans_ail.c | 4 fs/xfs/xfs_trans_priv.h | 12 fs/xfs/xfs_vfsops.c | 2 fs/xfs/xfs_vnodeops.c | 26 include/Kbuild | 11 include/asm-alpha/Kbuild | 10 include/asm-alpha/mmzone.h | 1 include/asm-alpha/pgtable.h | 9 include/asm-alpha/spinlock.h | 4 include/asm-alpha/unistd.h | 69 include/asm-arm/arch-at91rm9200/at91rm9200.h | 118 include/asm-arm/arch-at91rm9200/at91rm9200_sys.h | 3 include/asm-arm/arch-at91rm9200/at91rm9200_twi.h | 57 include/asm-arm/arch-at91rm9200/gpio.h | 18 include/asm-arm/arch-at91rm9200/hardware.h | 28 include/asm-arm/arch-at91rm9200/irqs.h | 2 include/asm-arm/arch-clps711x/time.h | 2 include/asm-arm/arch-ep93xx/ep93xx-regs.h | 1 include/asm-arm/arch-ep93xx/platform.h | 6 include/asm-arm/arch-iop32x/debug-macro.S | 20 include/asm-arm/arch-iop32x/dma.h | 9 include/asm-arm/arch-iop32x/entry-macro.S | 21 include/asm-arm/arch-iop32x/glantank.h | 13 include/asm-arm/arch-iop32x/hardware.h | 44 include/asm-arm/arch-iop32x/io.h | 22 include/asm-arm/arch-iop32x/iop32x.h | 28 include/asm-arm/arch-iop32x/iq31244.h | 17 include/asm-arm/arch-iop32x/iq80321.h | 17 include/asm-arm/arch-iop32x/irqs.h | 50 include/asm-arm/arch-iop32x/memory.h | 26 include/asm-arm/arch-iop32x/n2100.h | 19 include/asm-arm/arch-iop32x/system.h | 33 include/asm-arm/arch-iop32x/timex.h | 9 include/asm-arm/arch-iop32x/uncompress.h | 39 include/asm-arm/arch-iop32x/vmalloc.h | 5 include/asm-arm/arch-iop33x/debug-macro.S | 24 include/asm-arm/arch-iop33x/dma.h | 9 include/asm-arm/arch-iop33x/entry-macro.S | 22 include/asm-arm/arch-iop33x/hardware.h | 46 include/asm-arm/arch-iop33x/io.h | 21 include/asm-arm/arch-iop33x/iop33x.h | 33 include/asm-arm/arch-iop33x/iq80331.h | 16 include/asm-arm/arch-iop33x/iq80332.h | 16 include/asm-arm/arch-iop33x/irqs.h | 60 include/asm-arm/arch-iop33x/memory.h | 26 include/asm-arm/arch-iop33x/system.h | 22 include/asm-arm/arch-iop33x/timex.h | 9 include/asm-arm/arch-iop33x/uncompress.h | 37 include/asm-arm/arch-iop33x/vmalloc.h | 5 include/asm-arm/arch-iop3xx/debug-macro.S | 35 include/asm-arm/arch-iop3xx/dma.h | 9 include/asm-arm/arch-iop3xx/entry-macro.S | 57 include/asm-arm/arch-iop3xx/hardware.h | 57 include/asm-arm/arch-iop3xx/io.h | 21 include/asm-arm/arch-iop3xx/iop321-irqs.h | 100 include/asm-arm/arch-iop3xx/iop321.h | 345 include/asm-arm/arch-iop3xx/iop331-irqs.h | 132 include/asm-arm/arch-iop3xx/iop331.h | 363 include/asm-arm/arch-iop3xx/iq31244.h | 24 include/asm-arm/arch-iop3xx/iq80321.h | 24 include/asm-arm/arch-iop3xx/iq80331.h | 23 include/asm-arm/arch-iop3xx/iq80332.h | 23 include/asm-arm/arch-iop3xx/irqs.h | 21 include/asm-arm/arch-iop3xx/memory.h | 38 include/asm-arm/arch-iop3xx/system.h | 35 include/asm-arm/arch-iop3xx/timex.h | 20 include/asm-arm/arch-iop3xx/uncompress.h | 48 include/asm-arm/arch-iop3xx/vmalloc.h | 16 include/asm-arm/arch-ixp4xx/platform.h | 5 include/asm-arm/arch-l7200/io.h | 8 include/asm-arm/arch-l7200/time.h | 2 include/asm-arm/arch-omap/board-ams-delta.h | 11 include/asm-arm/arch-omap/clock.h | 1 include/asm-arm/arch-omap/dma.h | 16 include/asm-arm/arch-omap/dmtimer.h | 2 include/asm-arm/arch-omap/gpmc.h | 4 include/asm-arm/arch-omap/irqs.h | 2 include/asm-arm/arch-omap/keypad.h | 3 include/asm-arm/arch-omap/mux.h | 25 include/asm-arm/arch-pnx4008/clock.h | 1 include/asm-arm/arch-pxa/udc.h | 8 include/asm-arm/arch-s3c2410/dma.h | 66 include/asm-arm/arch-s3c2410/map.h | 5 include/asm-arm/arch-s3c2410/osiris-map.h | 18 include/asm-arm/arch-s3c2410/regs-ac97.h | 23 include/asm-arm/arch-s3c2410/regs-lcd.h | 30 include/asm-arm/atomic.h | 16 include/asm-arm/bitops.h | 24 include/asm-arm/cacheflush.h | 22 include/asm-arm/elf.h | 18 include/asm-arm/flat.h | 16 include/asm-arm/hardware/iop3xx.h | 301 include/asm-arm/hardware/locomo.h | 33 include/asm-arm/hardware/sharpsl_pm.h | 1 include/asm-arm/io.h | 4 include/asm-arm/irqflags.h | 132 include/asm-arm/mach/pci.h | 10 include/asm-arm/mach/time.h | 2 include/asm-arm/page.h | 7 include/asm-arm/pgtable.h | 15 include/asm-arm/proc-fns.h | 40 include/asm-arm/setup.h | 12 include/asm-arm/spinlock.h | 4 include/asm-arm/system.h | 137 include/asm-arm/timeofday.h | 4 include/asm-arm/tlbflush.h | 76 include/asm-arm/unaligned.h | 62 include/asm-arm/unistd.h | 27 include/asm-arm26/Kbuild | 1 include/asm-arm26/pgtable.h | 8 include/asm-arm26/unistd.h | 27 include/asm-avr32/Kbuild | 3 include/asm-avr32/a.out.h | 26 include/asm-avr32/addrspace.h | 43 include/asm-avr32/arch-at32ap/at91rm9200_pdc.h | 36 include/asm-avr32/arch-at32ap/at91rm9200_usart.h | 123 include/asm-avr32/arch-at32ap/board.h | 35 include/asm-avr32/arch-at32ap/init.h | 21 include/asm-avr32/arch-at32ap/portmux.h | 16 include/asm-avr32/arch-at32ap/sm.h | 27 include/asm-avr32/arch-at32ap/smc.h | 60 include/asm-avr32/asm.h | 102 include/asm-avr32/atomic.h | 201 include/asm-avr32/auxvec.h | 4 include/asm-avr32/bitops.h | 296 include/asm-avr32/bug.h | 47 include/asm-avr32/bugs.h | 15 include/asm-avr32/byteorder.h | 25 include/asm-avr32/cache.h | 29 include/asm-avr32/cachectl.h | 11 include/asm-avr32/cacheflush.h | 129 include/asm-avr32/checksum.h | 156 include/asm-avr32/cputime.h | 6 include/asm-avr32/current.h | 15 include/asm-avr32/delay.h | 26 include/asm-avr32/div64.h | 6 include/asm-avr32/dma-mapping.h | 320 include/asm-avr32/dma.h | 8 include/asm-avr32/elf.h | 110 include/asm-avr32/emergency-restart.h | 6 include/asm-avr32/errno.h | 6 include/asm-avr32/fcntl.h | 6 include/asm-avr32/futex.h | 6 include/asm-avr32/hardirq.h | 34 include/asm-avr32/hw_irq.h | 9 include/asm-avr32/intc.h | 128 include/asm-avr32/io.h | 253 include/asm-avr32/ioctl.h | 6 include/asm-avr32/ioctls.h | 83 include/asm-avr32/ipcbuf.h | 29 include/asm-avr32/irq.h | 10 include/asm-avr32/irqflags.h | 68 include/asm-avr32/kdebug.h | 38 include/asm-avr32/kmap_types.h | 30 include/asm-avr32/kprobes.h | 34 include/asm-avr32/linkage.h | 7 include/asm-avr32/local.h | 6 include/asm-avr32/mach/serial_at91.h | 33 include/asm-avr32/mman.h | 17 include/asm-avr32/mmu.h | 10 include/asm-avr32/mmu_context.h | 148 include/asm-avr32/module.h | 28 include/asm-avr32/msgbuf.h | 31 include/asm-avr32/mutex.h | 9 include/asm-avr32/namei.h | 7 include/asm-avr32/numnodes.h | 7 include/asm-avr32/ocd.h | 78 include/asm-avr32/page.h | 112 include/asm-avr32/param.h | 23 include/asm-avr32/pci.h | 8 include/asm-avr32/percpu.h | 6 include/asm-avr32/pgalloc.h | 96 include/asm-avr32/pgtable-2level.h | 47 include/asm-avr32/pgtable.h | 408 include/asm-avr32/poll.h | 27 include/asm-avr32/posix_types.h | 129 include/asm-avr32/processor.h | 147 include/asm-avr32/ptrace.h | 154 include/asm-avr32/resource.h | 6 include/asm-avr32/scatterlist.h | 21 include/asm-avr32/sections.h | 6 include/asm-avr32/semaphore.h | 109 include/asm-avr32/sembuf.h | 25 include/asm-avr32/setup.h | 141 include/asm-avr32/shmbuf.h | 42 include/asm-avr32/shmparam.h | 6 include/asm-avr32/sigcontext.h | 34 include/asm-avr32/siginfo.h | 6 include/asm-avr32/signal.h | 168 include/asm-avr32/socket.h | 53 include/asm-avr32/sockios.h | 12 include/asm-avr32/stat.h | 79 include/asm-avr32/statfs.h | 6 include/asm-avr32/string.h | 17 include/asm-avr32/sysreg.h | 332 include/asm-avr32/system.h | 155 include/asm-avr32/termbits.h | 173 include/asm-avr32/termios.h | 80 include/asm-avr32/thread_info.h | 106 include/asm-avr32/timex.h | 40 include/asm-avr32/tlb.h | 32 include/asm-avr32/tlbflush.h | 40 include/asm-avr32/topology.h | 6 include/asm-avr32/traps.h | 23 include/asm-avr32/types.h | 70 include/asm-avr32/uaccess.h | 335 include/asm-avr32/ucontext.h | 12 include/asm-avr32/unaligned.h | 25 include/asm-avr32/unistd.h | 313 include/asm-avr32/user.h | 65 include/asm-cris/Kbuild | 4 include/asm-cris/arch-v10/Kbuild | 2 include/asm-cris/arch-v32/Kbuild | 2 include/asm-cris/arch-v32/spinlock.h | 4 include/asm-cris/byteorder.h | 3 include/asm-cris/elf.h | 8 include/asm-cris/page.h | 8 include/asm-cris/pgtable.h | 4 include/asm-cris/posix_types.h | 9 include/asm-cris/unistd.h | 65 include/asm-frv/bitops.h | 96 include/asm-frv/cpu-irqs.h | 54 include/asm-frv/hardirq.h | 5 include/asm-frv/irq-routing.h | 70 include/asm-frv/irq.h | 26 include/asm-frv/mb93091-fpga-irqs.h | 6 include/asm-frv/mb93093-fpga-irqs.h | 6 include/asm-frv/mb93493-irqs.h | 6 include/asm-frv/mb93493-regs.h | 2 include/asm-frv/pgtable.h | 10 include/asm-frv/timex.h | 5 include/asm-frv/unistd.h | 28 include/asm-generic/4level-fixup.h | 4 include/asm-generic/Kbuild | 15 include/asm-generic/Kbuild.asm | 38 include/asm-generic/audit_change_attr.h | 4 include/asm-generic/audit_dir_write.h | 4 include/asm-generic/bug.h | 32 include/asm-generic/libata-portmap.h | 12 include/asm-generic/percpu.h | 4 include/asm-generic/pgtable-nopmd.h | 2 include/asm-generic/pgtable-nopud.h | 2 include/asm-generic/pgtable.h | 40 include/asm-generic/vmlinux.lds.h | 9 include/asm-h8300/keyboard.h | 8 include/asm-h8300/page.h | 7 include/asm-h8300/unistd.h | 57 include/asm-i386/Kbuild | 10 include/asm-i386/acpi.h | 14 include/asm-i386/alternative-asm.i | 14 include/asm-i386/apic.h | 16 include/asm-i386/bugs.h | 2 include/asm-i386/desc.h | 121 include/asm-i386/dma-mapping.h | 15 include/asm-i386/dwarf2.h | 11 include/asm-i386/e820.h | 2 include/asm-i386/elf.h | 2 include/asm-i386/fixmap.h | 7 include/asm-i386/frame.i | 24 include/asm-i386/genapic.h | 69 include/asm-i386/intel_arch_perfmon.h | 14 include/asm-i386/io_apic.h | 11 include/asm-i386/kexec.h | 27 include/asm-i386/mach-default/do_timer.h | 2 include/asm-i386/mach-es7000/mach_apic.h | 4 include/asm-i386/mach-summit/mach_apic.h | 13 include/asm-i386/mach-visws/do_timer.h | 2 include/asm-i386/mach-voyager/do_timer.h | 2 include/asm-i386/mmzone.h | 6 include/asm-i386/mutex.h | 16 include/asm-i386/nmi.h | 43 include/asm-i386/pgtable-2level.h | 4 include/asm-i386/pgtable-3level.h | 20 include/asm-i386/pgtable.h | 125 include/asm-i386/processor.h | 60 include/asm-i386/ptrace-abi.h | 39 include/asm-i386/ptrace.h | 47 include/asm-i386/rwlock.h | 48 include/asm-i386/rwsem.h | 62 include/asm-i386/segment.h | 17 include/asm-i386/semaphore.h | 53 include/asm-i386/smp.h | 24 include/asm-i386/spinlock.h | 138 include/asm-i386/stacktrace.h | 1 include/asm-i386/sync_bitops.h | 156 include/asm-i386/system.h | 36 include/asm-i386/therm_throt.h | 9 include/asm-i386/tlbflush.h | 4 include/asm-i386/tsc.h | 1 include/asm-i386/unistd.h | 47 include/asm-i386/unwind.h | 8 include/asm-ia64/Kbuild | 18 include/asm-ia64/esi.h | 30 include/asm-ia64/futex.h | 122 include/asm-ia64/kprobes.h | 9 include/asm-ia64/mca_asm.h | 2 include/asm-ia64/meminit.h | 1 include/asm-ia64/module.h | 3 include/asm-ia64/numa.h | 6 include/asm-ia64/pal.h | 16 include/asm-ia64/pgtable.h | 14 include/asm-ia64/processor.h | 13 include/asm-ia64/ptrace.h | 3 include/asm-ia64/smp.h | 3 include/asm-ia64/spinlock.h | 4 include/asm-ia64/unistd.h | 75 include/asm-m32r/page.h | 3 include/asm-m32r/pgtable-2level.h | 8 include/asm-m32r/pgtable.h | 4 include/asm-m32r/ptrace.h | 4 include/asm-m32r/signal.h | 1 include/asm-m32r/spinlock.h | 13 include/asm-m32r/system.h | 4 include/asm-m32r/timex.h | 3 include/asm-m32r/unistd.h | 46 include/asm-m32r/user.h | 1 include/asm-m68k/motorola_pgtable.h | 1 include/asm-m68k/unistd.h | 11 include/asm-m68knommu/page.h | 7 include/asm-m68knommu/unistd.h | 60 include/asm-mips/Kbuild | 2 include/asm-mips/bootinfo.h | 3 include/asm-mips/cacheflush.h | 12 include/asm-mips/fcntl.h | 2 include/asm-mips/galileo-boards/ev96100.h | 55 include/asm-mips/galileo-boards/ev96100int.h | 12 include/asm-mips/galileo-boards/gt96100.h | 427 include/asm-mips/hazards.h | 360 include/asm-mips/irq.h | 4 include/asm-mips/irqflags.h | 25 include/asm-mips/mach-atlas/mc146818rtc.h | 4 include/asm-mips/mach-au1x00/au1xxx_dbdma.h | 6 include/asm-mips/mach-ev64120/mach-gt64120.h | 1 include/asm-mips/mach-ev96100/mach-gt64120.h | 46 include/asm-mips/mach-excite/excite.h | 2 include/asm-mips/mach-excite/excite_fpga.h | 80 include/asm-mips/mach-qemu/cpu-feature-overrides.h | 2 include/asm-mips/mips-boards/atlasint.h | 124 include/asm-mips/mmu_context.h | 8 include/asm-mips/page.h | 11 include/asm-mips/pgtable-32.h | 4 include/asm-mips/pgtable-64.h | 16 include/asm-mips/pgtable.h | 2 include/asm-mips/ptrace.h | 3 include/asm-mips/serial.h | 21 include/asm-mips/sibyte/sb1250_defs.h | 6 include/asm-mips/sibyte/sb1250_scd.h | 2 include/asm-mips/signal.h | 11 include/asm-mips/spinlock.h | 51 include/asm-mips/stacktrace.h | 44 include/asm-mips/timex.h | 4 include/asm-mips/unistd.h | 63 include/asm-mips/user.h | 4 include/asm-parisc/pgtable.h | 9 include/asm-parisc/spinlock.h | 4 include/asm-parisc/unistd.h | 86 include/asm-powerpc/Kbuild | 45 include/asm-powerpc/bug.h | 12 include/asm-powerpc/cputable.h | 27 include/asm-powerpc/hvcall.h | 121 include/asm-powerpc/ibmebus.h | 2 include/asm-powerpc/ide.h | 12 include/asm-powerpc/io.h | 185 include/asm-powerpc/irq.h | 24 include/asm-powerpc/iseries/hv_call_xm.h | 17 include/asm-powerpc/iseries/hv_lp_config.h | 13 include/asm-powerpc/iseries/iseries_io.h | 60 include/asm-powerpc/iseries/it_exp_vpd_panel.h | 51 include/asm-powerpc/iseries/it_lp_naca.h | 80 include/asm-powerpc/iseries/it_lp_queue.h | 2 include/asm-powerpc/iseries/vio.h | 28 include/asm-powerpc/kprobes.h | 22 include/asm-powerpc/lppaca.h | 23 include/asm-powerpc/paca.h | 3 include/asm-powerpc/page.h | 6 include/asm-powerpc/pgtable-4k.h | 5 include/asm-powerpc/pgtable.h | 11 include/asm-powerpc/ppc-pci.h | 11 include/asm-powerpc/processor.h | 1 include/asm-powerpc/prom.h | 40 include/asm-powerpc/ptrace.h | 6 include/asm-powerpc/reg.h | 1 include/asm-powerpc/rtas.h | 16 include/asm-powerpc/smu.h | 2 include/asm-powerpc/spinlock.h | 4 include/asm-powerpc/spu.h | 2 include/asm-powerpc/system.h | 5 include/asm-powerpc/unistd.h | 7 include/asm-powerpc/vio.h | 4 include/asm-ppc/ibm4xx.h | 2 include/asm-ppc/io.h | 26 include/asm-ppc/mpc8260_pci9.h | 4 include/asm-ppc/pgtable.h | 8 include/asm-ppc/reg_booke.h | 16 include/asm-ppc/spinlock.h | 4 include/asm-s390/Kbuild | 12 include/asm-s390/appldata.h | 90 include/asm-s390/atomic.h | 120 include/asm-s390/bitops.h | 626 - include/asm-s390/byteorder.h | 50 include/asm-s390/checksum.h | 176 include/asm-s390/cio.h | 7 include/asm-s390/div64.h | 48 include/asm-s390/dma.h | 2 include/asm-s390/ebcdic.h | 20 include/asm-s390/futex.h | 87 include/asm-s390/io.h | 16 include/asm-s390/irq.h | 3 include/asm-s390/irqflags.h | 110 include/asm-s390/kdebug.h | 59 include/asm-s390/kprobes.h | 114 include/asm-s390/lowcore.h | 16 include/asm-s390/monwriter.h | 33 include/asm-s390/page.h | 111 include/asm-s390/percpu.h | 20 include/asm-s390/pgalloc.h | 67 include/asm-s390/pgtable.h | 218 include/asm-s390/processor.h | 149 include/asm-s390/ptrace.h | 3 include/asm-s390/rwsem.h | 238 include/asm-s390/semaphore.h | 16 include/asm-s390/setup.h | 67 include/asm-s390/sfp-machine.h | 64 include/asm-s390/sigp.h | 65 include/asm-s390/smp.h | 4 include/asm-s390/spinlock.h | 62 include/asm-s390/spinlock_types.h | 6 include/asm-s390/string.h | 56 include/asm-s390/system.h | 342 include/asm-s390/timex.h | 19 include/asm-s390/tlbflush.h | 32 include/asm-s390/uaccess.h | 181 include/asm-s390/unistd.h | 483 - include/asm-s390/z90crypt.h | 212 include/asm-s390/zcrypt.h | 285 include/asm-sh/addrspace.h | 8 include/asm-sh/adx/io.h | 86 include/asm-sh/apm.h | 46 include/asm-sh/atomic.h | 106 include/asm-sh/auxvec.h | 14 include/asm-sh/bitops.h | 16 include/asm-sh/bugs.h | 6 include/asm-sh/cache.h | 30 include/asm-sh/cacheflush.h | 3 include/asm-sh/cat68701/io.h | 22 include/asm-sh/checksum.h | 2 include/asm-sh/cpu-features.h | 24 include/asm-sh/cpu-sh2/shmparam.h | 16 include/asm-sh/cpu-sh3/cache.h | 4 include/asm-sh/cpu-sh3/cacheflush.h | 52 include/asm-sh/cpu-sh3/freq.h | 4 include/asm-sh/cpu-sh3/mmu_context.h | 8 include/asm-sh/cpu-sh3/shmparam.h | 16 include/asm-sh/cpu-sh3/timer.h | 8 include/asm-sh/cpu-sh3/ubc.h | 15 include/asm-sh/cpu-sh4/addrspace.h | 3 include/asm-sh/cpu-sh4/cache.h | 2 include/asm-sh/cpu-sh4/cacheflush.h | 36 include/asm-sh/cpu-sh4/dma-sh7780.h | 39 include/asm-sh/cpu-sh4/dma.h | 11 include/asm-sh/cpu-sh4/shmparam.h | 19 include/asm-sh/cpu-sh4/sq.h | 23 include/asm-sh/cqreek/cqreek.h | 27 include/asm-sh/dma-mapping.h | 42 include/asm-sh/dma.h | 1 include/asm-sh/dmida/io.h | 10 include/asm-sh/ec3104/keyboard.h | 2 include/asm-sh/elf.h | 30 include/asm-sh/fixmap.h | 2 include/asm-sh/flat.h | 2 include/asm-sh/harp/harp.h | 43 include/asm-sh/harp/io.h | 10 include/asm-sh/hd64461.h | 208 include/asm-sh/hd64461/hd64461.h | 202 include/asm-sh/hd64461/io.h | 43 include/asm-sh/hp6xx/hp6xx.h | 53 include/asm-sh/hp6xx/io.h | 2 include/asm-sh/hs7751rvoip/hs7751rvoip.h | 11 include/asm-sh/io.h | 16 include/asm-sh/irq-sh73180.h | 2 include/asm-sh/irq-sh7343.h | 317 include/asm-sh/irq-sh7780.h | 5 include/asm-sh/irq.h | 137 include/asm-sh/kexec.h | 9 include/asm-sh/kgdb.h | 15 include/asm-sh/landisk/gio.h | 45 include/asm-sh/landisk/ide.h | 14 include/asm-sh/landisk/iodata_landisk.h | 79 include/asm-sh/machvec.h | 7 include/asm-sh/mc146818rtc.h | 169 include/asm-sh/mmu.h | 77 include/asm-sh/mmu_context.h | 15 include/asm-sh/mpc1211/keyboard.h | 4 include/asm-sh/overdrive/fpga.h | 15 include/asm-sh/overdrive/gt64111.h | 109 include/asm-sh/overdrive/io.h | 39 include/asm-sh/overdrive/overdrive.h | 88 include/asm-sh/page.h | 36 include/asm-sh/pci.h | 44 include/asm-sh/pgalloc.h | 37 include/asm-sh/pgtable-2level.h | 5 include/asm-sh/pgtable.h | 158 include/asm-sh/pm.h | 17 include/asm-sh/processor.h | 52 include/asm-sh/ptrace.h | 2 include/asm-sh/r7780rp/ide.h | 8 include/asm-sh/r7780rp/r7780rp.h | 177 include/asm-sh/rtc.h | 25 include/asm-sh/rts7751r2d/rts7751r2d.h | 2 include/asm-sh/rts7751r2d/voyagergx_reg.h | 313 include/asm-sh/scatterlist.h | 9 include/asm-sh/sci.h | 34 include/asm-sh/se.h | 80 include/asm-sh/se/io.h | 35 include/asm-sh/se/se.h | 77 include/asm-sh/se/smc37c93x.h | 190 include/asm-sh/se7300.h | 64 include/asm-sh/se7300/io.h | 29 include/asm-sh/se7300/se7300.h | 61 include/asm-sh/se73180.h | 65 include/asm-sh/se73180/io.h | 32 include/asm-sh/se73180/se73180.h | 62 include/asm-sh/se7343.h | 82 include/asm-sh/se7751.h | 71 include/asm-sh/se7751/io.h | 42 include/asm-sh/se7751/se7751.h | 68 include/asm-sh/setup.h | 2 include/asm-sh/sfp-machine.h | 86 include/asm-sh/sh03/io.h | 10 include/asm-sh/sh2000/sh2000.h | 8 include/asm-sh/shmin/shmin.h | 9 include/asm-sh/shmparam.h | 20 include/asm-sh/smc37c93x.h | 190 include/asm-sh/smp.h | 5 include/asm-sh/snapgear.h | 79 include/asm-sh/snapgear/io.h | 92 include/asm-sh/spinlock.h | 4 include/asm-sh/system.h | 199 include/asm-sh/systemh/7751systemh.h | 68 include/asm-sh/systemh/io.h | 43 include/asm-sh/systemh7751.h | 71 include/asm-sh/thread_info.h | 43 include/asm-sh/timer.h | 2 include/asm-sh/titan.h | 43 include/asm-sh/uaccess.h | 79 include/asm-sh/unistd.h | 121 include/asm-sh/voyagergx.h | 313 include/asm-sh/watchdog.h | 3 include/asm-sh64/keyboard.h | 4 include/asm-sh64/page.h | 3 include/asm-sh64/pgtable.h | 6 include/asm-sh64/shmparam.h | 16 include/asm-sh64/signal.h | 1 include/asm-sh64/timex.h | 3 include/asm-sh64/unistd.h | 47 include/asm-sh64/user.h | 1 include/asm-sparc/Kbuild | 17 include/asm-sparc/page.h | 8 include/asm-sparc/pgtable.h | 4 include/asm-sparc/spinlock.h | 4 include/asm-sparc/unistd.h | 47 include/asm-sparc64/Kbuild | 24 include/asm-sparc64/page.h | 9 include/asm-sparc64/pgtable.h | 5 include/asm-sparc64/shmparam.h | 2 include/asm-sparc64/spinlock.h | 4 include/asm-sparc64/unistd.h | 42 include/asm-um/Kbuild | 1 include/asm-um/alternative-asm.i | 6 include/asm-um/frame.i | 6 include/asm-um/pgtable-2level.h | 2 include/asm-um/pgtable-3level.h | 5 include/asm-um/pgtable.h | 10 include/asm-um/processor-generic.h | 8 include/asm-um/ptrace-generic.h | 14 include/asm-um/ptrace-x86_64.h | 7 include/asm-um/unistd.h | 28 include/asm-v850/page.h | 7 include/asm-v850/param.h | 4 include/asm-v850/unistd.h | 56 include/asm-x86_64/Kbuild | 19 include/asm-x86_64/acpi.h | 2 include/asm-x86_64/alternative-asm.i | 14 include/asm-x86_64/apic.h | 9 include/asm-x86_64/bitops.h | 2 include/asm-x86_64/calgary.h | 7 include/asm-x86_64/dma-mapping.h | 7 include/asm-x86_64/dwarf2.h | 8 include/asm-x86_64/e820.h | 15 include/asm-x86_64/fixmap.h | 4 include/asm-x86_64/genapic.h | 1 include/asm-x86_64/i387.h | 9 include/asm-x86_64/intel_arch_perfmon.h | 14 include/asm-x86_64/io_apic.h | 6 include/asm-x86_64/irq.h | 2 include/asm-x86_64/kexec.h | 29 include/asm-x86_64/linkage.h | 2 include/asm-x86_64/mach_apic.h | 1 include/asm-x86_64/mce.h | 2 include/asm-x86_64/mmx.h | 14 include/asm-x86_64/mpspec.h | 11 include/asm-x86_64/msr.h | 11 include/asm-x86_64/mutex.h | 20 include/asm-x86_64/nmi.h | 45 include/asm-x86_64/pci-direct.h | 42 include/asm-x86_64/pda.h | 109 include/asm-x86_64/percpu.h | 22 include/asm-x86_64/pgtable.h | 24 include/asm-x86_64/proto.h | 17 include/asm-x86_64/ptrace-abi.h | 51 include/asm-x86_64/ptrace.h | 61 include/asm-x86_64/rwlock.h | 64 include/asm-x86_64/segment.h | 5 include/asm-x86_64/semaphore.h | 44 include/asm-x86_64/signal.h | 4 include/asm-x86_64/smp.h | 31 include/asm-x86_64/spinlock.h | 84 include/asm-x86_64/stacktrace.h | 18 include/asm-x86_64/system.h | 5 include/asm-x86_64/tce.h | 1 include/asm-x86_64/therm_throt.h | 1 include/asm-x86_64/thread_info.h | 9 include/asm-x86_64/tlbflush.h | 70 include/asm-x86_64/uaccess.h | 71 include/asm-x86_64/unistd.h | 103 include/asm-x86_64/unwind.h | 9 include/asm-x86_64/vsyscall.h | 12 include/asm-xtensa/pgtable.h | 4 include/asm-xtensa/timex.h | 3 include/asm-xtensa/unistd.h | 5 include/crypto/algapi.h | 156 include/crypto/twofish.h | 22 include/linux/Kbuild | 401 include/linux/acct.h | 4 include/linux/adfs_fs.h | 2 include/linux/aer.h | 24 include/linux/affs_fs.h | 7 include/linux/aio.h | 12 include/linux/aio_abi.h | 2 include/linux/ata.h | 26 include/linux/atalk.h | 40 include/linux/atmlec.h | 119 include/linux/audit.h | 5 include/linux/bio.h | 2 include/linux/blkdev.h | 340 include/linux/blktrace_api.h | 3 include/linux/bootmem.h | 102 include/linux/buffer_head.h | 19 include/linux/byteorder/Kbuild | 9 include/linux/cdev.h | 2 include/linux/coda_psdev.h | 4 include/linux/compat.h | 2 include/linux/compat_ioctl.h | 20 include/linux/compiler.h | 17 include/linux/console.h | 5 include/linux/console_struct.h | 2 include/linux/cpu.h | 8 include/linux/cpuset.h | 4 include/linux/cramfs_fs.h | 2 include/linux/crypto.h | 689 + include/linux/dcache.h | 1 include/linux/dccp.h | 16 include/linux/device.h | 99 include/linux/dma-mapping.h | 7 include/linux/dmi.h | 3 include/linux/dvb/Kbuild | 11 include/linux/edd.h | 1 include/linux/efs_fs_sb.h | 3 include/linux/eisa.h | 8 include/linux/elevator.h | 68 include/linux/elf-em.h | 1 include/linux/elfnote.h | 90 include/linux/err.h | 4 include/linux/errqueue.h | 2 include/linux/ext2_fs.h | 70 include/linux/ext3_fs.h | 36 include/linux/ext3_fs_i.h | 2 include/linux/ext3_jbd.h | 10 include/linux/fib_rules.h | 65 include/linux/file.h | 1 include/linux/filter.h | 13 include/linux/fs.h | 152 include/linux/genalloc.h | 1 include/linux/generic_acl.h | 36 include/linux/genetlink.h | 18 include/linux/genhd.h | 4 include/linux/getcpu.h | 18 include/linux/gfp.h | 41 include/linux/hdlc.h | 201 include/linux/hdlc/ioctl.h | 33 include/linux/highmem.h | 5 include/linux/hpfs_fs.h | 8 include/linux/hrtimer.h | 1 include/linux/i2c-algo-bit.h | 1 include/linux/i2c-algo-pcf.h | 1 include/linux/i2c-algo-sibyte.h | 33 include/linux/i2c-id.h | 1 include/linux/i2c.h | 14 include/linux/icmp.h | 12 include/linux/if.h | 3 include/linux/if_addr.h | 55 include/linux/if_arp.h | 6 include/linux/if_link.h | 136 include/linux/igmp.h | 38 include/linux/in.h | 16 include/linux/in6.h | 8 include/linux/inet.h | 2 include/linux/inet_diag.h | 10 include/linux/inetdevice.h | 24 include/linux/init.h | 1 include/linux/init_task.h | 12 include/linux/input.h | 272 include/linux/interrupt.h | 16 include/linux/io.h | 4 include/linux/ip.h | 15 include/linux/ipc.h | 54 include/linux/ipmi.h | 48 include/linux/ipv6.h | 47 include/linux/irq.h | 6 include/linux/iso_fs.h | 6 include/linux/jbd.h | 71 include/linux/jffs2.h | 4 include/linux/jiffies.h | 15 include/linux/kernel.h | 11 include/linux/kmod.h | 4 include/linux/kobject.h | 16 include/linux/kprobes.h | 8 include/linux/latency.h | 25 include/linux/leds.h | 3 include/linux/libata.h | 98 include/linux/libps2.h | 1 include/linux/linkage.h | 6 include/linux/list.h | 15 include/linux/lockd/bind.h | 2 include/linux/lockd/lockd.h | 2 include/linux/lockdep.h | 4 include/linux/loop.h | 5 include/linux/magic.h | 37 include/linux/memory.h | 4 include/linux/memory_hotplug.h | 2 include/linux/mempolicy.h | 4 include/linux/minix_fs.h | 6 include/linux/mm.h | 256 include/linux/mm_types.h | 67 include/linux/mmc/host.h | 2 include/linux/mmc/mmc.h | 1 include/linux/mmzone.h | 137 include/linux/mod_devicetable.h | 23 include/linux/module.h | 11 include/linux/mpage.h | 7 include/linux/mroute.h | 14 include/linux/msdos_fs.h | 7 include/linux/mtd/nand.h | 25 include/linux/mtd/onenand.h | 6 include/linux/mtd/onenand_regs.h | 4 include/linux/namei.h | 2 include/linux/namespace.h | 6 include/linux/ncp_fs.h | 6 include/linux/neighbour.h | 159 include/linux/net.h | 28 include/linux/netdevice.h | 16 include/linux/netfilter.h | 6 include/linux/netfilter/Kbuild | 49 include/linux/netfilter/nf_conntrack_common.h | 4 include/linux/netfilter/nf_conntrack_tcp.h | 1 include/linux/netfilter/nfnetlink.h | 4 include/linux/netfilter/nfnetlink_log.h | 6 include/linux/netfilter/nfnetlink_queue.h | 8 include/linux/netfilter/x_tables.h | 52 include/linux/netfilter/xt_DSCP.h | 20 include/linux/netfilter/xt_dscp.h | 23 include/linux/netfilter_arp/Kbuild | 5 include/linux/netfilter_arp/arp_tables.h | 9 include/linux/netfilter_bridge.h | 42 include/linux/netfilter_bridge/Kbuild | 21 include/linux/netfilter_ipv4/Kbuild | 82 include/linux/netfilter_ipv4/ip_conntrack.h | 2 include/linux/netfilter_ipv4/ip_conntrack_h323.h | 6 include/linux/netfilter_ipv4/ip_conntrack_helper.h | 2 include/linux/netfilter_ipv4/ip_conntrack_pptp.h | 45 .../linux/netfilter_ipv4/ip_conntrack_proto_gre.h | 22 include/linux/netfilter_ipv4/ip_conntrack_tuple.h | 16 include/linux/netfilter_ipv4/ip_nat.h | 6 include/linux/netfilter_ipv4/ip_nat_core.h | 8 include/linux/netfilter_ipv4/ip_nat_pptp.h | 4 include/linux/netfilter_ipv4/ip_queue.h | 2 include/linux/netfilter_ipv4/ip_tables.h | 3 include/linux/netfilter_ipv4/ipt_DSCP.h | 6 include/linux/netfilter_ipv4/ipt_dscp.h | 14 include/linux/netfilter_ipv4/ipt_iprange.h | 2 include/linux/netfilter_ipv4/listhelp.h | 123 include/linux/netfilter_ipv6.h | 1 include/linux/netfilter_ipv6/Kbuild | 27 include/linux/netfilter_ipv6/ip6_tables.h | 3 include/linux/netfilter_logging.h | 33 include/linux/netlink.h | 2 include/linux/nfs_fs.h | 34 include/linux/nfs_fs_sb.h | 89 include/linux/nfs_idmap.h | 14 include/linux/nfs_xdr.h | 29 include/linux/nfsd/Kbuild | 9 include/linux/nfsd/nfsd.h | 5 include/linux/nfsd/nfsfh.h | 21 include/linux/nfsd/syscall.h | 17 include/linux/nmi.h | 3 include/linux/nodemask.h | 2 include/linux/nsproxy.h | 52 include/linux/openprom_fs.h | 10 include/linux/page-flags.h | 46 include/linux/pagemap.h | 15 include/linux/pci.h | 46 include/linux/pci_ids.h | 27 include/linux/pci_regs.h | 2 include/linux/pcieport_if.h | 6 include/linux/percpu.h | 89 include/linux/pid.h | 55 include/linux/pkt_cls.h | 1 include/linux/platform_device.h | 2 include/linux/pm.h | 63 include/linux/posix-timers.h | 4 include/linux/proc_fs.h | 15 include/linux/pspace.h | 23 include/linux/ptrace.h | 4 include/linux/qnx4_fs.h | 2 include/linux/raid/Kbuild | 3 include/linux/raid/md.h | 3 include/linux/raid/md_k.h | 3 include/linux/ramfs.h | 1 include/linux/rbtree.h | 2 include/linux/reiserfs_acl.h | 17 include/linux/reiserfs_fs.h | 51 include/linux/reiserfs_fs_i.h | 5 include/linux/reiserfs_fs_sb.h | 2 include/linux/reiserfs_xattr.h | 8 include/linux/resume-trace.h | 24 include/linux/rmap.h | 14 include/linux/rtc.h | 4 include/linux/rtnetlink.h | 376 include/linux/scatterlist.h | 4 include/linux/sched.h | 97 include/linux/scx200_gpio.h | 1 include/linux/security.h | 240 include/linux/selinux.h | 29 include/linux/serio.h | 3 include/linux/shmem_fs.h | 24 include/linux/skbuff.h | 17 include/linux/slab.h | 33 include/linux/smb.h | 4 include/linux/smp.h | 3 include/linux/snmp.h | 35 include/linux/spinlock.h | 14 include/linux/spinlock_api_smp.h | 50 include/linux/stacktrace.h | 7 include/linux/stddef.h | 8 include/linux/string.h | 1 include/linux/sunrpc/Kbuild | 2 include/linux/sunrpc/auth.h | 16 include/linux/sunrpc/clnt.h | 57 include/linux/sunrpc/gss_krb5.h | 19 include/linux/sunrpc/gss_spkm3.h | 4 include/linux/sunrpc/msg_prot.h | 2 include/linux/sunrpc/rpc_pipe_fs.h | 2 include/linux/sunrpc/sched.h | 5 include/linux/sunrpc/svc.h | 114 include/linux/sunrpc/svcauth.h | 4 include/linux/sunrpc/svcsock.h | 15 include/linux/sunrpc/xdr.h | 38 include/linux/sunrpc/xprt.h | 64 include/linux/suspend.h | 32 include/linux/swap.h | 12 include/linux/synclink.h | 4 include/linux/syscalls.h | 4 include/linux/sysctl.h | 8 include/linux/sysfs.h | 28 include/linux/sysrq.h | 4 include/linux/taskstats.h | 64 include/linux/tc_act/Kbuild | 5 include/linux/tc_ematch/Kbuild | 5 include/linux/tcp.h | 23 include/linux/timex.h | 58 include/linux/trdevice.h | 2 include/linux/tsacct_kern.h | 34 include/linux/tty.h | 6 include/linux/tty_driver.h | 3 include/linux/types.h | 2 include/linux/uaccess.h | 22 include/linux/udp.h | 8 include/linux/uinput.h | 35 include/linux/unistd.h | 6 include/linux/unwind.h | 2 include/linux/usb.h | 156 include/linux/usb/audio.h | 53 include/linux/usb/midi.h | 112 include/linux/usb/otg.h | 131 include/linux/usb_otg.h | 131 include/linux/usb_usual.h | 3 include/linux/usbdevice_fs.h | 3 include/linux/utime.h | 2 include/linux/utsname.h | 55 include/linux/vermagic.h | 4 include/linux/videodev2.h | 5 include/linux/vmalloc.h | 3 include/linux/vmstat.h | 19 include/linux/vt_kern.h | 10 include/linux/wireless.h | 24 include/linux/writeback.h | 5 include/linux/xfrm.h | 52 include/media/ir-common.h | 2 include/media/tuner-types.h | 3 include/media/tuner.h | 1 include/media/v4l2-common.h | 16 include/media/v4l2-dev.h | 12 include/mtd/Kbuild | 7 include/mtd/mtd-abi.h | 7 include/net/act_api.h | 136 include/net/act_generic.h | 142 include/net/addrconf.h | 13 include/net/ah.h | 30 include/net/arp.h | 8 include/net/bluetooth/hci.h | 11 include/net/bluetooth/hci_core.h | 18 include/net/cipso_ipv4.h | 254 include/net/dn_fib.h | 18 include/net/dst.h | 3 include/net/esp.h | 36 include/net/fib_rules.h | 97 include/net/flow.h | 26 include/net/genetlink.h | 25 include/net/icmp.h | 2 include/net/ieee80211.h | 9 include/net/ieee80211softmac.h | 60 include/net/if_inet6.h | 1 include/net/inet_connection_sock.h | 9 include/net/inet_hashtables.h | 96 include/net/inet_sock.h | 40 include/net/inet_timewait_sock.h | 10 include/net/inetpeer.h | 4 include/net/ip.h | 10 include/net/ip6_fib.h | 113 include/net/ip6_route.h | 43 include/net/ip_fib.h | 124 include/net/ip_mp_alg.h | 4 include/net/ip_vs.h | 68 include/net/ipcomp.h | 5 include/net/ipv6.h | 11 include/net/irda/irlan_common.h | 10 include/net/irda/irlap_frame.h | 31 include/net/irda/irlmp.h | 2 include/net/mip6.h | 61 include/net/neighbour.h | 42 include/net/netlabel.h | 261 include/net/netlink.h | 154 include/net/nexthop.h | 33 include/net/pkt_act.h | 273 include/net/request_sock.h | 1 include/net/route.h | 27 include/net/sctp/constants.h | 17 include/net/sctp/sctp.h | 68 include/net/sctp/structs.h | 15 include/net/snmp.h | 6 include/net/sock.h | 49 include/net/tc_act/tc_defact.h | 13 include/net/tc_act/tc_gact.h | 18 include/net/tc_act/tc_ipt.h | 15 include/net/tc_act/tc_mirred.h | 17 include/net/tc_act/tc_pedit.h | 15 include/net/udp.h | 18 include/net/xfrm.h | 238 include/rdma/Kbuild | 2 include/rdma/ib_addr.h | 17 include/rdma/ib_sa.h | 45 include/rdma/ib_user_verbs.h | 2 include/rdma/ib_verbs.h | 31 include/rdma/iw_cm.h | 258 include/rdma/rdma_cm.h | 12 include/scsi/Kbuild | 4 include/scsi/libiscsi.h | 6 include/scsi/libsas.h | 627 + include/scsi/sas.h | 631 + include/scsi/scsi.h | 16 include/scsi/scsi_cmnd.h | 14 include/scsi/scsi_device.h | 4 include/scsi/scsi_host.h | 7 include/scsi/scsi_netlink.h | 87 include/scsi/scsi_netlink_fc.h | 71 include/scsi/scsi_tcq.h | 20 include/scsi/scsi_transport_fc.h | 80 include/scsi/scsi_transport_sas.h | 37 include/scsi/scsi_transport_spi.h | 3 include/sound/Kbuild | 12 include/sound/ac97_codec.h | 32 include/sound/ad1848.h | 22 include/sound/ak4xxx-adda.h | 37 include/sound/asound.h | 19 include/sound/control.h | 13 include/sound/core.h | 10 include/sound/emu10k1.h | 4 include/sound/info.h | 7 include/sound/pcm.h | 5 include/sound/timer.h | 1 include/sound/tlv.h | 60 include/sound/vx_core.h | 1 include/video/Kbuild | 2 init/Kconfig | 63 init/do_mounts.c | 18 init/do_mounts_initrd.c | 3 init/main.c | 40 init/version.c | 23 ipc/mqueue.c | 37 ipc/msg.c | 157 ipc/sem.c | 206 ipc/shm.c | 254 ipc/util.c | 132 ipc/util.h | 24 kernel/Makefile | 5 kernel/acct.c | 36 kernel/audit.c | 14 kernel/auditfilter.c | 2 kernel/auditsc.c | 11 kernel/capability.c | 2 kernel/compat.c | 33 kernel/cpu.c | 138 kernel/cpuset.c | 121 kernel/exit.c | 52 kernel/fork.c | 102 kernel/futex.c | 12 kernel/hrtimer.c | 20 kernel/irq/chip.c | 6 kernel/irq/handle.c | 2 kernel/kallsyms.c | 1 kernel/kexec.c | 8 kernel/kfifo.c | 28 kernel/kmod.c | 74 kernel/kprobes.c | 53 kernel/latency.c | 279 kernel/lockdep.c | 26 kernel/module.c | 69 kernel/nsproxy.c | 139 kernel/panic.c | 12 kernel/params.c | 15 kernel/pid.c | 123 kernel/posix-cpu-timers.c | 101 kernel/posix-timers.c | 21 kernel/power/Kconfig | 22 kernel/power/Makefile | 2 kernel/power/disk.c | 11 kernel/power/main.c | 40 kernel/power/power.h | 59 kernel/power/smp.c | 62 kernel/power/snapshot.c | 1165 + kernel/power/swap.c | 270 kernel/power/swsusp.c | 14 kernel/power/user.c | 17 kernel/printk.c | 3 kernel/profile.c | 16 kernel/ptrace.c | 55 kernel/rcutorture.c | 8 kernel/relay.c | 38 kernel/resource.c | 32 kernel/rtmutex.c | 51 kernel/sched.c | 133 kernel/signal.c | 76 kernel/softirq.c | 4 kernel/softlockup.c | 3 kernel/spinlock.c | 20 kernel/stop_machine.c | 3 kernel/sys.c | 134 kernel/sys_ni.c | 5 kernel/sysctl.c | 506 - kernel/taskstats.c | 10 kernel/time.c | 173 kernel/time/Makefile | 2 kernel/time/ntp.c | 350 kernel/timer.c | 283 kernel/tsacct.c | 124 kernel/unwind.c | 39 kernel/utsname.c | 95 lib/Kconfig.debug | 36 lib/Makefile | 4 lib/audit.c | 2 lib/cpumask.c | 16 lib/errno.c | 7 lib/genalloc.c | 63 lib/hweight.c | 10 lib/ioremap.c | 92 lib/klist.c | 26 lib/kobject.c | 9 lib/list_debug.c | 76 lib/rbtree.c | 6 lib/rwsem.c | 2 lib/spinlock_debug.c | 15 lib/ts_fsm.c | 10 mm/Kconfig | 7 mm/Makefile | 6 mm/allocpercpu.c | 129 mm/bootmem.c | 202 mm/bounce.c | 302 mm/filemap.c | 211 mm/fremap.c | 6 mm/highmem.c | 294 mm/hugetlb.c | 10 mm/internal.h | 4 mm/memory.c | 215 mm/memory_hotplug.c | 71 mm/mempolicy.c | 26 mm/migrate.c | 6 mm/mmap.c | 19 mm/mprotect.c | 53 mm/mremap.c | 2 mm/msync.c | 196 mm/nommu.c | 250 mm/oom_kill.c | 126 mm/page-writeback.c | 198 mm/page_alloc.c | 976 + mm/page_io.c | 48 mm/rmap.c | 65 mm/shmem.c | 122 mm/shmem_acl.c | 197 mm/slab.c | 458 mm/slob.c | 52 mm/swap.c | 49 mm/swapfile.c | 7 mm/truncate.c | 85 mm/util.c | 18 mm/vmalloc.c | 38 mm/vmscan.c | 140 mm/vmstat.c | 52 net/802/tr.c | 12 net/Kconfig | 7 net/Makefile | 1 net/appletalk/ddp.c | 79 net/atm/atm_sysfs.c | 1 net/atm/lec.c | 3161 ++- net/atm/lec.h | 172 net/atm/lec_arpc.h | 146 net/atm/mpc.c | 24 net/atm/mpc.h | 8 net/atm/mpoa_caches.c | 12 net/bluetooth/af_bluetooth.c | 2 net/bluetooth/bnep/core.c | 26 net/bluetooth/hci_conn.c | 39 net/bluetooth/hci_core.c | 3 net/bluetooth/hci_event.c | 26 net/bluetooth/hci_sysfs.c | 135 net/bluetooth/hidp/core.c | 23 net/bluetooth/rfcomm/core.c | 2 net/bluetooth/rfcomm/tty.c | 23 net/bridge/br_forward.c | 5 net/bridge/br_netfilter.c | 50 net/bridge/br_netlink.c | 31 net/bridge/netfilter/ebt_arpreply.c | 2 net/bridge/netfilter/ebtables.c | 97 net/core/Makefile | 1 net/core/datagram.c | 4 net/core/dev.c | 32 net/core/dev_mcast.c | 3 net/core/ethtool.c | 46 net/core/fib_rules.c | 421 net/core/filter.c | 8 net/core/flow.c | 13 net/core/neighbour.c | 598 - net/core/net-sysfs.c | 5 net/core/netpoll.c | 2 net/core/pktgen.c | 325 net/core/rtnetlink.c | 572 - net/core/skbuff.c | 23 net/core/sock.c | 34 net/core/utils.c | 215 net/core/wireless.c | 71 net/dccp/Kconfig | 16 net/dccp/Makefile | 2 net/dccp/ackvec.c | 20 net/dccp/ackvec.h | 4 net/dccp/ccids/Kconfig | 8 net/dccp/ccids/ccid2.c | 206 net/dccp/ccids/ccid2.h | 9 net/dccp/ccids/ccid3.c | 14 net/dccp/dccp.h | 2 net/dccp/feat.h | 5 net/dccp/ipv4.c | 19 net/dccp/ipv6.c | 15 net/dccp/output.c | 90 net/dccp/probe.c | 198 net/dccp/proto.c | 27 net/dccp/sysctl.c | 8 net/decnet/Kconfig | 1 net/decnet/af_decnet.c | 1 net/decnet/dn_dev.c | 29 net/decnet/dn_fib.c | 76 net/decnet/dn_nsp_in.c | 2 net/decnet/dn_route.c | 19 net/decnet/dn_rules.c | 511 - net/decnet/dn_table.c | 163 net/ethernet/eth.c | 198 net/ieee80211/ieee80211_crypt_ccmp.c | 55 net/ieee80211/ieee80211_crypt_tkip.c | 127 net/ieee80211/ieee80211_crypt_wep.c | 43 net/ieee80211/ieee80211_rx.c | 56 net/ieee80211/ieee80211_tx.c | 9 net/ieee80211/softmac/ieee80211softmac_assoc.c | 21 net/ieee80211/softmac/ieee80211softmac_io.c | 14 net/ieee80211/softmac/ieee80211softmac_module.c | 90 net/ieee80211/softmac/ieee80211softmac_priv.h | 8 net/ieee80211/softmac/ieee80211softmac_wx.c | 8 net/ipv4/Kconfig | 55 net/ipv4/Makefile | 1 net/ipv4/af_inet.c | 19 net/ipv4/ah4.c | 40 net/ipv4/arp.c | 40 net/ipv4/cipso_ipv4.c | 1474 ++ net/ipv4/datagram.c | 2 net/ipv4/devinet.c | 268 net/ipv4/esp4.c | 100 net/ipv4/fib_frontend.c | 491 - net/ipv4/fib_hash.c | 148 net/ipv4/fib_lookup.h | 17 net/ipv4/fib_rules.c | 620 - net/ipv4/fib_semantics.c | 537 - net/ipv4/fib_trie.c | 122 net/ipv4/icmp.c | 26 net/ipv4/igmp.c | 74 net/ipv4/inet_connection_sock.c | 15 net/ipv4/inet_diag.c | 12 net/ipv4/inet_hashtables.c | 41 net/ipv4/inetpeer.c | 9 net/ipv4/ip_fragment.c | 27 net/ipv4/ip_gre.c | 27 net/ipv4/ip_options.c | 46 net/ipv4/ip_output.c | 31 net/ipv4/ip_sockglue.c | 4 net/ipv4/ipcomp.c | 35 net/ipv4/ipconfig.c | 17 net/ipv4/ipip.c | 22 net/ipv4/ipmr.c | 16 net/ipv4/ipvs/ip_vs_conn.c | 24 net/ipv4/ipvs/ip_vs_core.c | 14 net/ipv4/ipvs/ip_vs_ctl.c | 26 net/ipv4/ipvs/ip_vs_dh.c | 4 net/ipv4/ipvs/ip_vs_ftp.c | 27 net/ipv4/ipvs/ip_vs_lblc.c | 8 net/ipv4/ipvs/ip_vs_lblcr.c | 8 net/ipv4/ipvs/ip_vs_proto.c | 2 net/ipv4/ipvs/ip_vs_proto_tcp.c | 18 net/ipv4/ipvs/ip_vs_proto_udp.c | 22 net/ipv4/ipvs/ip_vs_sh.c | 4 net/ipv4/ipvs/ip_vs_sync.c | 20 net/ipv4/ipvs/ip_vs_xmit.c | 2 net/ipv4/multipath_wrandom.c | 14 net/ipv4/netfilter.c | 6 net/ipv4/netfilter/Kconfig | 22 net/ipv4/netfilter/Makefile | 2 net/ipv4/netfilter/arp_tables.c | 20 net/ipv4/netfilter/arpt_mangle.c | 4 net/ipv4/netfilter/arptable_filter.c | 2 net/ipv4/netfilter/ip_conntrack_amanda.c | 6 net/ipv4/netfilter/ip_conntrack_core.c | 227 net/ipv4/netfilter/ip_conntrack_ftp.c | 6 net/ipv4/netfilter/ip_conntrack_helper_h323.c | 84 net/ipv4/netfilter/ip_conntrack_helper_pptp.c | 520 - net/ipv4/netfilter/ip_conntrack_irc.c | 5 net/ipv4/netfilter/ip_conntrack_netbios_ns.c | 13 net/ipv4/netfilter/ip_conntrack_netlink.c | 158 net/ipv4/netfilter/ip_conntrack_proto_generic.c | 2 net/ipv4/netfilter/ip_conntrack_proto_gre.c | 52 net/ipv4/netfilter/ip_conntrack_proto_icmp.c | 6 net/ipv4/netfilter/ip_conntrack_proto_sctp.c | 16 net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 37 net/ipv4/netfilter/ip_conntrack_proto_udp.c | 7 net/ipv4/netfilter/ip_conntrack_sip.c | 17 net/ipv4/netfilter/ip_conntrack_standalone.c | 5 net/ipv4/netfilter/ip_conntrack_tftp.c | 8 net/ipv4/netfilter/ip_nat_core.c | 70 net/ipv4/netfilter/ip_nat_ftp.c | 10 net/ipv4/netfilter/ip_nat_helper.c | 98 net/ipv4/netfilter/ip_nat_helper_h323.c | 16 net/ipv4/netfilter/ip_nat_helper_pptp.c | 190 net/ipv4/netfilter/ip_nat_proto_gre.c | 27 net/ipv4/netfilter/ip_nat_proto_icmp.c | 8 net/ipv4/netfilter/ip_nat_proto_tcp.c | 15 net/ipv4/netfilter/ip_nat_proto_udp.c | 23 net/ipv4/netfilter/ip_nat_rule.c | 20 net/ipv4/netfilter/ip_nat_sip.c | 8 net/ipv4/netfilter/ip_nat_snmp_basic.c | 2 net/ipv4/netfilter/ip_nat_standalone.c | 15 net/ipv4/netfilter/ip_queue.c | 16 net/ipv4/netfilter/ip_tables.c | 182 net/ipv4/netfilter/ipt_CLUSTERIP.c | 21 net/ipv4/netfilter/ipt_DSCP.c | 96 net/ipv4/netfilter/ipt_ECN.c | 48 net/ipv4/netfilter/ipt_LOG.c | 4 net/ipv4/netfilter/ipt_MASQUERADE.c | 6 net/ipv4/netfilter/ipt_NETMAP.c | 6 net/ipv4/netfilter/ipt_REDIRECT.c | 6 net/ipv4/netfilter/ipt_REJECT.c | 10 net/ipv4/netfilter/ipt_SAME.c | 10 net/ipv4/netfilter/ipt_TCPMSS.c | 140 net/ipv4/netfilter/ipt_TOS.c | 26 net/ipv4/netfilter/ipt_TTL.c | 12 net/ipv4/netfilter/ipt_ULOG.c | 3 net/ipv4/netfilter/ipt_addrtype.c | 2 net/ipv4/netfilter/ipt_ah.c | 1 net/ipv4/netfilter/ipt_dscp.c | 54 net/ipv4/netfilter/ipt_ecn.c | 3 net/ipv4/netfilter/ipt_hashlimit.c | 49 net/ipv4/netfilter/ipt_owner.c | 1 net/ipv4/netfilter/ipt_recent.c | 28 net/ipv4/netfilter/iptable_filter.c | 4 net/ipv4/netfilter/iptable_mangle.c | 6 net/ipv4/netfilter/iptable_raw.c | 2 net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 2 net/ipv4/proc.c | 2 net/ipv4/raw.c | 8 net/ipv4/route.c | 249 net/ipv4/syncookies.c | 5 net/ipv4/sysctl_net_ipv4.c | 41 net/ipv4/tcp.c | 21 net/ipv4/tcp_bic.c | 2 net/ipv4/tcp_cong.c | 2 net/ipv4/tcp_cubic.c | 2 net/ipv4/tcp_highspeed.c | 2 net/ipv4/tcp_htcp.c | 2 net/ipv4/tcp_hybla.c | 2 net/ipv4/tcp_input.c | 72 net/ipv4/tcp_ipv4.c | 33 net/ipv4/tcp_lp.c | 7 net/ipv4/tcp_minisocks.c | 4 net/ipv4/tcp_output.c | 42 net/ipv4/tcp_probe.c | 6 net/ipv4/tcp_timer.c | 16 net/ipv4/tcp_vegas.c | 2 net/ipv4/tcp_veno.c | 3 net/ipv4/tcp_westwood.c | 2 net/ipv4/udp.c | 152 net/ipv4/xfrm4_input.c | 6 net/ipv4/xfrm4_mode_transport.c | 4 net/ipv4/xfrm4_mode_tunnel.c | 3 net/ipv4/xfrm4_output.c | 10 net/ipv4/xfrm4_policy.c | 32 net/ipv4/xfrm4_state.c | 88 net/ipv4/xfrm4_tunnel.c | 2 net/ipv6/Kconfig | 45 net/ipv6/Makefile | 4 net/ipv6/addrconf.c | 667 - net/ipv6/af_inet6.c | 23 net/ipv6/ah6.c | 124 net/ipv6/anycast.c | 8 net/ipv6/datagram.c | 20 net/ipv6/esp6.c | 106 net/ipv6/exthdrs.c | 233 net/ipv6/fib6_rules.c | 305 net/ipv6/icmp.c | 31 net/ipv6/inet6_connection_sock.c | 3 net/ipv6/inet6_hashtables.c | 8 net/ipv6/ip6_fib.c | 463 net/ipv6/ip6_input.c | 2 net/ipv6/ip6_output.c | 106 net/ipv6/ipcomp6.c | 36 net/ipv6/ipv6_sockglue.c | 13 net/ipv6/ipv6_syms.c | 3 net/ipv6/mcast.c | 2 net/ipv6/mip6.c | 519 + net/ipv6/ndisc.c | 53 net/ipv6/netfilter.c | 2 net/ipv6/netfilter/Makefile | 2 net/ipv6/netfilter/ip6_queue.c | 16 net/ipv6/netfilter/ip6_tables.c | 24 net/ipv6/netfilter/ip6t_HL.c | 9 net/ipv6/netfilter/ip6t_LOG.c | 4 net/ipv6/netfilter/ip6t_REJECT.c | 9 net/ipv6/netfilter/ip6t_ah.c | 1 net/ipv6/netfilter/ip6t_dst.c | 220 net/ipv6/netfilter/ip6t_frag.c | 1 net/ipv6/netfilter/ip6t_hbh.c | 49 net/ipv6/netfilter/ip6t_ipv6header.c | 1 net/ipv6/netfilter/ip6t_owner.c | 1 net/ipv6/netfilter/ip6t_rt.c | 1 net/ipv6/netfilter/ip6table_filter.c | 4 net/ipv6/netfilter/ip6table_mangle.c | 12 net/ipv6/netfilter/ip6table_raw.c | 2 net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 2 net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 2 net/ipv6/netfilter/nf_conntrack_reasm.c | 12 net/ipv6/raw.c | 49 net/ipv6/reassembly.c | 14 net/ipv6/route.c | 1059 + net/ipv6/tcp_ipv6.c | 25 net/ipv6/udp.c | 104 net/ipv6/xfrm6_input.c | 114 net/ipv6/xfrm6_mode_ro.c | 93 net/ipv6/xfrm6_mode_transport.c | 5 net/ipv6/xfrm6_mode_tunnel.c | 3 net/ipv6/xfrm6_output.c | 18 net/ipv6/xfrm6_policy.c | 87 net/ipv6/xfrm6_state.c | 193 net/ipv6/xfrm6_tunnel.c | 4 net/irda/af_irda.c | 12 net/irda/ircomm/ircomm_lmp.c | 4 net/irda/ircomm/ircomm_tty.c | 2 net/irda/iriap.c | 9 net/irda/iriap_event.c | 2 net/irda/irlan/irlan_common.c | 46 net/irda/irlan/irlan_provider.c | 12 net/irda/irlap_frame.c | 59 net/irda/irlmp.c | 2 net/irda/irttp.c | 14 net/key/af_key.c | 69 net/netfilter/Kconfig | 23 net/netfilter/Makefile | 2 net/netfilter/core.c | 24 net/netfilter/nf_conntrack_core.c | 211 net/netfilter/nf_conntrack_ftp.c | 98 net/netfilter/nf_conntrack_netlink.c | 80 net/netfilter/nf_conntrack_proto_generic.c | 2 net/netfilter/nf_conntrack_proto_sctp.c | 14 net/netfilter/nf_conntrack_proto_tcp.c | 31 net/netfilter/nf_conntrack_proto_udp.c | 7 net/netfilter/nf_conntrack_standalone.c | 3 net/netfilter/nf_internals.h | 2 net/netfilter/nf_queue.c | 80 net/netfilter/nfnetlink_queue.c | 10 net/netfilter/x_tables.c | 269 net/netfilter/xt_CLASSIFY.c | 63 net/netfilter/xt_CONNMARK.c | 148 net/netfilter/xt_CONNSECMARK.c | 61 net/netfilter/xt_DSCP.c | 118 net/netfilter/xt_MARK.c | 120 net/netfilter/xt_NFQUEUE.c | 71 net/netfilter/xt_NOTRACK.c | 50 net/netfilter/xt_SECMARK.c | 59 net/netfilter/xt_comment.c | 45 net/netfilter/xt_connbytes.c | 48 net/netfilter/xt_connmark.c | 88 net/netfilter/xt_conntrack.c | 185 net/netfilter/xt_dccp.c | 52 net/netfilter/xt_dscp.c | 103 net/netfilter/xt_esp.c | 52 net/netfilter/xt_helper.c | 55 net/netfilter/xt_length.c | 43 net/netfilter/xt_limit.c | 111 net/netfilter/xt_mac.c | 52 net/netfilter/xt_mark.c | 80 net/netfilter/xt_multiport.c | 115 net/netfilter/xt_physdev.c | 50 net/netfilter/xt_pkttype.c | 44 net/netfilter/xt_policy.c | 52 net/netfilter/xt_quota.c | 53 net/netfilter/xt_sctp.c | 52 net/netfilter/xt_state.c | 56 net/netfilter/xt_statistic.c | 55 net/netfilter/xt_string.c | 54 net/netfilter/xt_tcpmss.c | 97 net/netfilter/xt_tcpudp.c | 109 net/netlabel/Kconfig | 17 net/netlabel/Makefile | 16 net/netlabel/netlabel_cipso_v4.c | 773 + net/netlabel/netlabel_cipso_v4.h | 166 net/netlabel/netlabel_domainhash.c | 448 net/netlabel/netlabel_domainhash.h | 71 net/netlabel/netlabel_kapi.c | 254 net/netlabel/netlabel_mgmt.c | 648 + net/netlabel/netlabel_mgmt.h | 171 net/netlabel/netlabel_unlabeled.c | 280 net/netlabel/netlabel_unlabeled.h | 89 net/netlabel/netlabel_user.c | 117 net/netlabel/netlabel_user.h | 96 net/netlink/af_netlink.c | 80 net/netlink/attr.c | 124 net/netlink/genetlink.c | 54 net/packet/af_packet.c | 45 net/rxrpc/transport.c | 3 net/sched/act_api.c | 253 net/sched/act_gact.c | 142 net/sched/act_ipt.c | 179 net/sched/act_mirred.c | 159 net/sched/act_pedit.c | 166 net/sched/act_police.c | 508 - net/sched/act_simple.c | 183 net/sched/cls_api.c | 4 net/sched/cls_basic.c | 2 net/sched/cls_fw.c | 25 net/sched/sch_api.c | 16 net/sched/sch_generic.c | 66 net/sched/sch_htb.c | 1363 + net/sched/sch_netem.c | 4 net/sctp/endpointola.c | 2 net/sctp/input.c | 18 net/sctp/inqueue.c | 4 net/sctp/ipv6.c | 7 net/sctp/output.c | 10 net/sctp/outqueue.c | 9 net/sctp/proc.c | 17 net/sctp/protocol.c | 11 net/sctp/sm_make_chunk.c | 47 net/sctp/sm_statefuns.c | 174 net/sctp/socket.c | 43 net/sctp/sysctl.c | 140 net/sctp/transport.c | 2 net/socket.c | 1087 + net/sunrpc/auth.c | 12 net/sunrpc/auth_gss/auth_gss.c | 40 net/sunrpc/auth_gss/gss_krb5_crypto.c | 95 net/sunrpc/auth_gss/gss_krb5_mech.c | 24 net/sunrpc/auth_gss/gss_krb5_seal.c | 2 net/sunrpc/auth_gss/gss_krb5_seqnum.c | 4 net/sunrpc/auth_gss/gss_krb5_wrap.c | 8 net/sunrpc/auth_gss/gss_spkm3_mech.c | 29 net/sunrpc/auth_gss/svcauth_gss.c | 82 net/sunrpc/auth_null.c | 8 net/sunrpc/auth_unix.c | 10 net/sunrpc/clnt.c | 221 net/sunrpc/pmap_clnt.c | 266 net/sunrpc/rpc_pipe.c | 56 net/sunrpc/sched.c | 107 net/sunrpc/socklib.c | 2 net/sunrpc/sunrpc_syms.c | 5 net/sunrpc/svc.c | 509 + net/sunrpc/svcauth.c | 4 net/sunrpc/svcauth_unix.c | 43 net/sunrpc/svcsock.c | 427 net/sunrpc/timer.c | 2 net/sunrpc/xdr.c | 54 net/sunrpc/xprt.c | 90 net/sunrpc/xprtsock.c | 124 net/unix/af_unix.c | 7 net/xfrm/Kconfig | 16 net/xfrm/Makefile | 3 net/xfrm/xfrm_algo.c | 94 net/xfrm/xfrm_hash.c | 41 net/xfrm/xfrm_hash.h | 128 net/xfrm/xfrm_input.c | 12 net/xfrm/xfrm_policy.c | 901 + net/xfrm/xfrm_state.c | 665 + net/xfrm/xfrm_user.c | 350 scripts/Kbuild.include | 100 scripts/Makefile | 7 scripts/Makefile.build | 5 scripts/Makefile.headersinst | 126 scripts/Makefile.host | 20 scripts/Makefile.modpost | 13 scripts/basic/docproc.c | 1 scripts/checkstack.pl | 2 scripts/gcc-x86_64-has-stack-protector.sh | 6 scripts/hdrcheck.sh | 2 scripts/kconfig/Makefile | 1 scripts/kconfig/confdata.c | 8 scripts/mod/file2alias.c | 24 scripts/mod/modpost.c | 42 scripts/package/mkspec | 4 scripts/unifdef.c | 1005 + security/Kconfig | 12 security/Makefile | 1 security/commoncap.c | 2 security/dummy.c | 64 security/inode.c | 13 security/seclvl.c | 669 - security/selinux/Kconfig | 37 security/selinux/exports.c | 13 security/selinux/hooks.c | 351 security/selinux/include/av_perm_to_string.h | 1 security/selinux/include/av_permissions.h | 1 security/selinux/include/objsec.h | 13 security/selinux/include/security.h | 9 security/selinux/include/selinux_netlabel.h | 119 security/selinux/include/xfrm.h | 43 security/selinux/selinuxfs.c | 5 security/selinux/ss/ebitmap.c | 140 security/selinux/ss/ebitmap.h | 6 security/selinux/ss/mls.c | 197 security/selinux/ss/mls.h | 41 security/selinux/ss/policydb.c | 27 security/selinux/ss/policydb.h | 7 security/selinux/ss/services.c | 629 + security/selinux/xfrm.c | 216 sound/Makefile | 3 sound/aoa/Kconfig | 2 sound/aoa/codecs/Kconfig | 4 sound/aoa/codecs/snd-aoa-codec-tas.c | 96 sound/aoa/core/snd-aoa-gpio-feature.c | 2 sound/core/control.c | 160 sound/core/control_compat.c | 4 sound/core/device.c | 20 sound/core/hwdep.c | 12 sound/core/info.c | 108 sound/core/info_oss.c | 16 sound/core/init.c | 116 sound/core/oss/mixer_oss.c | 22 sound/core/oss/pcm_oss.c | 24 sound/core/pcm.c | 131 sound/core/pcm_compat.c | 2 sound/core/pcm_memory.c | 2 sound/core/pcm_native.c | 112 sound/core/rawmidi.c | 38 sound/core/rtctimer.c | 2 sound/core/seq/oss/seq_oss.c | 3 sound/core/seq/seq_device.c | 13 sound/core/seq/seq_info.c | 6 sound/core/sound.c | 59 sound/core/sound_oss.c | 3 sound/core/timer.c | 62 sound/drivers/Kconfig | 13 sound/drivers/Makefile | 2 sound/drivers/dummy.c | 20 sound/drivers/mpu401/mpu401.c | 2 sound/drivers/mts64.c | 1091 + sound/drivers/opl4/opl4_proc.c | 9 sound/drivers/vx/vx_mixer.c | 17 sound/i2c/other/ak4xxx-adda.c | 501 - sound/isa/ad1816a/ad1816a_lib.c | 55 sound/isa/ad1848/ad1848_lib.c | 49 sound/isa/es18xx.c | 219 sound/isa/gus/gus_mem_proc.c | 6 sound/isa/opl3sa2.c | 26 sound/mips/au1x00.c | 2 sound/oss/COPYING | 339 sound/oss/au1550_ac97.c | 6 sound/oss/cs46xx.c | 15 sound/oss/cs46xxpm-24.h | 48 sound/oss/dmasound/dmasound_awacs.c | 11 sound/oss/sh_dac_audio.c | 60 sound/oss/swarm_cs4297a.c | 2 sound/oss/trident.c | 66 sound/oss/via82cxxx_audio.c | 6 sound/pci/Kconfig | 14 sound/pci/ac97/ac97_codec.c | 334 sound/pci/ac97/ac97_patch.c | 98 sound/pci/ac97/ac97_patch.h | 1 sound/pci/ac97/ac97_pcm.c | 18 sound/pci/ac97/ac97_proc.c | 18 sound/pci/ac97/ak4531_codec.c | 49 sound/pci/ca0106/ca0106_mixer.c | 10 sound/pci/cs4281.c | 5 sound/pci/cs46xx/dsp_spos.c | 52 sound/pci/cs46xx/dsp_spos_scb_lib.c | 2 sound/pci/cs5535audio/Makefile | 2 sound/pci/echoaudio/layla24_dsp.c | 4 sound/pci/emu10k1/emu10k1.c | 2 sound/pci/emu10k1/emu10k1_main.c | 1 sound/pci/emu10k1/emu10k1x.c | 7 sound/pci/emu10k1/emufx.c | 12 sound/pci/emu10k1/p16v.c | 5 sound/pci/es1938.c | 104 sound/pci/es1968.c | 40 sound/pci/fm801.c | 63 sound/pci/hda/hda_codec.c | 76 sound/pci/hda/hda_codec.h | 2 sound/pci/hda/hda_generic.c | 199 sound/pci/hda/hda_intel.c | 132 sound/pci/hda/hda_local.h | 8 sound/pci/hda/hda_proc.c | 12 sound/pci/hda/patch_analog.c | 21 sound/pci/hda/patch_realtek.c | 330 sound/pci/hda/patch_si3054.c | 1 sound/pci/hda/patch_sigmatel.c | 904 + sound/pci/ice1712/aureon.c | 104 sound/pci/ice1712/ice1712.c | 14 sound/pci/ice1712/phase.c | 39 sound/pci/ice1712/pontis.c | 9 sound/pci/ice1712/prodigy192.c | 14 sound/pci/ice1712/revo.c | 68 sound/pci/ice1712/revo.h | 2 sound/pci/intel8x0.c | 14 sound/pci/intel8x0m.c | 5 sound/pci/mixart/mixart.c | 12 sound/pci/mixart/mixart_mixer.c | 14 sound/pci/pcxhr/pcxhr_mixer.c | 16 sound/pci/riptide/riptide.c | 10 sound/pci/rme9652/hdsp.c | 48 sound/pci/trident/trident_main.c | 10 sound/pci/via82xx.c | 23 sound/pci/vx222/vx222.c | 7 sound/pci/vx222/vx222_ops.c | 9 sound/pci/ymfpci/ymfpci_main.c | 7 sound/pcmcia/pdaudiocf/pdaudiocf.c | 2 sound/pcmcia/vx/vxp_mixer.c | 6 sound/pcmcia/vx/vxpocket.c | 9 sound/ppc/beep.c | 32 sound/ppc/keywest.c | 3 sound/ppc/tumbler.c | 20 sound/sound_core.c | 4 sound/sound_firmware.c | 6 sound/sparc/amd7930.c | 20 sound/sparc/dbri.c | 821 - sound/synth/emux/emux_proc.c | 6 sound/usb/usbaudio.c | 65 sound/usb/usbmidi.c | 9 sound/usb/usbmixer.c | 27 sound/usb/usbmixer_maps.c | 24 sound/usb/usbquirks.h | 5 usr/Makefile | 2 5313 files changed, 357350 insertions(+), 177027 deletions(-) diff --git a/CREDITS b/CREDITS index 0fe904e..66e8246 100644 --- a/CREDITS +++ b/CREDITS @@ -1620,7 +1620,8 @@ D: fbdev hacking N: Jesper Juhl E: jesper.juhl@gmail.com -D: Various fixes, cleanups and minor features. +D: Various fixes, cleanups and minor features all over the tree. +D: Wrote initial version of the hdaps driver (since passed on to others). S: Lemnosvej 1, 3.tv S: 2300 Copenhagen S. S: Denmark @@ -2384,6 +2385,13 @@ N: Thomas Molina E: tmolina@cablespeed.com D: bug fixes, documentation, minor hackery +N: Paul Moore +E: paul.moore@hp.com +D: NetLabel author +S: Hewlett-Packard +S: 110 Spit Brook Road +S: Nashua, NH 03062 + N: James Morris E: jmorris@namei.org W: http://namei.org/ @@ -2470,7 +2478,8 @@ S: Derbyshire DE4 3RL S: United Kingdom N: Ian S. Nelson -E: ian.nelson@echostar.com +E: nelsonis@earthlink.net +P: 1024D/00D3D983 3EFD 7B86 B888 D7E2 29B6 9E97 576F 1B97 00D3 D983 D: Minor mmap and ide hacks S: 1370 Atlantis Ave. S: Lafayette CO, 80026 diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index 5f7f7d7..02457ec 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX @@ -184,6 +184,8 @@ mtrr.txt - how to use PPro Memory Type Range Registers to increase performance. nbd.txt - info on a TCP implementation of a network block device. +netlabel/ + - directory with information on the NetLabel subsystem. networking/ - directory with info on various aspects of networking with Linux. nfsroot.txt diff --git a/Documentation/ABI/obsolete/devfs b/Documentation/ABI/obsolete/devfs deleted file mode 100644 index b8b8739..0000000 --- a/Documentation/ABI/obsolete/devfs +++ /dev/null @@ -1,13 +0,0 @@ -What: devfs -Date: July 2005 -Contact: Greg Kroah-Hartman -Description: - devfs has been unmaintained for a number of years, has unfixable - races, contains a naming policy within the kernel that is - against the LSB, and can be replaced by using udev. - The files fs/devfs/*, include/linux/devfs_fs*.h will be removed, - along with the the assorted devfs function calls throughout the - kernel tree. - -Users: - diff --git a/Documentation/ABI/removed/devfs b/Documentation/ABI/removed/devfs new file mode 100644 index 0000000..8195c4e --- /dev/null +++ b/Documentation/ABI/removed/devfs @@ -0,0 +1,12 @@ +What: devfs +Date: July 2005 (scheduled), finally removed in kernel v2.6.18 +Contact: Greg Kroah-Hartman +Description: + devfs has been unmaintained for a number of years, has unfixable + races, contains a naming policy within the kernel that is + against the LSB, and can be replaced by using udev. + The files fs/devfs/*, include/linux/devfs_fs*.h were removed, + along with the the assorted devfs function calls throughout the + kernel tree. + +Users: diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power new file mode 100644 index 0000000..d882f80 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-power @@ -0,0 +1,88 @@ +What: /sys/power/ +Date: August 2006 +Contact: Rafael J. Wysocki +Description: + The /sys/power directory will contain files that will + provide a unified interface to the power management + subsystem. + +What: /sys/power/state +Date: August 2006 +Contact: Rafael J. Wysocki +Description: + The /sys/power/state file controls the system power state. + Reading from this file returns what states are supported, + which is hard-coded to 'standby' (Power-On Suspend), 'mem' + (Suspend-to-RAM), and 'disk' (Suspend-to-Disk). + + Writing to this file one of these strings causes the system to + transition into that state. Please see the file + Documentation/power/states.txt for a description of each of + these states. + +What: /sys/power/disk +Date: August 2006 +Contact: Rafael J. Wysocki +Description: + The /sys/power/disk file controls the operating mode of the + suspend-to-disk mechanism. Reading from this file returns + the name of the method by which the system will be put to + sleep on the next suspend. There are four methods supported: + 'firmware' - means that the memory image will be saved to disk + by some firmware, in which case we also assume that the + firmware will handle the system suspend. + 'platform' - the memory image will be saved by the kernel and + the system will be put to sleep by the platform driver (e.g. + ACPI or other PM registers). + 'shutdown' - the memory image will be saved by the kernel and + the system will be powered off. + 'reboot' - the memory image will be saved by the kernel and + the system will be rebooted. + + The suspend-to-disk method may be chosen by writing to this + file one of the accepted strings: + + 'firmware' + 'platform' + 'shutdown' + 'reboot' + + It will only change to 'firmware' or 'platform' if the system + supports that. + +What: /sys/power/image_size +Date: August 2006 +Contact: Rafael J. Wysocki +Description: + The /sys/power/image_size file controls the size of the image + created by the suspend-to-disk mechanism. It can be written a + string representing a non-negative integer that will be used + as an upper limit of the image size, in bytes. The kernel's + suspend-to-disk code will do its best to ensure the image size + will not exceed this number. However, if it turns out to be + impossible, the kernel will try to suspend anyway using the + smallest image possible. In particular, if "0" is written to + this file, the suspend image will be as small as possible. + + Reading from this file will display the current image size + limit, which is set to 500 MB by default. + +What: /sys/power/pm_trace +Date: August 2006 +Contact: Rafael J. Wysocki +Description: + The /sys/power/pm_trace file controls the code which saves the + last PM event point in the RTC across reboots, so that you can + debug a machine that just hangs during suspend (or more + commonly, during resume). Namely, the RTC is only used to save + the last PM event point if this file contains '1'. Initially + it contains '0' which may be changed to '1' by writing a + string representing a nonzero integer into it. + + To use this debugging feature you should attempt to suspend + the machine, then reboot it and run + + dmesg -s 1000000 | grep 'hash matches' + + CAUTION: Using it will cause your machine's real-time (CMOS) + clock to be set to a random invalid time after a resume. diff --git a/Documentation/Changes b/Documentation/Changes index 4882720..abee7f5 100644 --- a/Documentation/Changes +++ b/Documentation/Changes @@ -37,15 +37,14 @@ o e2fsprogs 1.29 o jfsutils 1.1.3 # fsck.jfs -V o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs o xfsprogs 2.6.0 # xfs_db -V -o pcmciautils 004 -o pcmcia-cs 3.1.21 # cardmgr -V +o pcmciautils 004 # pccardctl -V o quota-tools 3.09 # quota -V o PPP 2.4.0 # pppd --version o isdn4k-utils 3.1pre1 # isdnctrl 2>&1|grep version o nfs-utils 1.0.5 # showmount --version o procps 3.2.0 # ps --version o oprofile 0.9 # oprofiled --version -o udev 071 # udevinfo -V +o udev 081 # udevinfo -V Kernel compilation ================== @@ -268,7 +267,7 @@ active clients. To enable this new functionality, you need to: - mount -t nfsd nfsd /proc/fs/nfs + mount -t nfsd nfsd /proc/fs/nfsd before running exportfs or mountd. It is recommended that all NFS services be protected from the internet-at-large by a firewall where diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index 6d2412e..29c1896 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle @@ -532,6 +532,40 @@ appears outweighs the potential value of something it would have done anyway. + Chapter 16: Function return values and names + +Functions can return values of many different kinds, and one of the +most common is a value indicating whether the function succeeded or +failed. Such a value can be represented as an error-code integer +(-Exxx = failure, 0 = success) or a "succeeded" boolean (0 = failure, +non-zero = success). + +Mixing up these two sorts of representations is a fertile source of +difficult-to-find bugs. If the C language included a strong distinction +between integers and booleans then the compiler would find these mistakes +for us... but it doesn't. To help prevent such bugs, always follow this +convention: + + If the name of a function is an action or an imperative command, + the function should return an error-code integer. If the name + is a predicate, the function should return a "succeeded" boolean. + +For example, "add work" is a command, and the add_work() function returns 0 +for success or -EBUSY for failure. In the same way, "PCI device present" is +a predicate, and the pci_dev_present() function returns 1 if it succeeds in +finding a matching device or 0 if it doesn't. + +All EXPORTed functions must respect this convention, and so should all +public functions. Private (static) functions need not, but it is +recommended that they do. + +Functions whose return value is the actual result of a computation, rather +than an indication of whether the computation succeeded, are not subject to +this rule. Generally they indicate failure by returning some out-of-range +result. Typical examples would be functions that return pointers; they use +NULL or the ERR_PTR mechanism to report failure. + + Appendix I: References diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index f8fe882..6d4b1ef 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl @@ -181,27 +181,6 @@ X!Ilib/string.c - - The proc filesystem - - sysctl interface -!Ekernel/sysctl.c - - - proc filesystem interface -!Ifs/proc/base.c - - - - - The debugfs filesystem - - debugfs interface -!Efs/debugfs/inode.c -!Efs/debugfs/file.c - - - The Linux VFS The Filesystem types @@ -234,6 +213,50 @@ X!Ilib/string.c + + The proc filesystem + + sysctl interface +!Ekernel/sysctl.c + + + proc filesystem interface +!Ifs/proc/base.c + + + + + The Filesystem for Exporting Kernel Objects +!Efs/sysfs/file.c +!Efs/sysfs/symlink.c +!Efs/sysfs/bin.c + + + + The debugfs filesystem + + debugfs interface +!Efs/debugfs/inode.c +!Efs/debugfs/file.c + + + + + relay interface support + + + Relay interface support + is designed to provide an efficient mechanism for tools and + facilities to relay large amounts of data from kernel space to + user space. + + + relay interface +!Ekernel/relay.c +!Ikernel/relay.c + + + Linux Networking Networking Base Types @@ -349,13 +372,6 @@ X!Earch/i386/kernel/mca.c - - The Filesystem for Exporting Kernel Objects -!Efs/sysfs/file.c -!Efs/sysfs/symlink.c -!Efs/sysfs/bin.c - - Security Framework !Esecurity/security.c @@ -386,6 +402,7 @@ X!Iinclude/linux/device.h --> !Edrivers/base/driver.c !Edrivers/base/core.c +!Edrivers/base/class.c !Edrivers/base/firmware_class.c !Edrivers/base/transport_class.c !Edrivers/base/dmapool.c @@ -437,6 +454,11 @@ X!Edrivers/pnp/system.c !Eblock/ll_rw_blk.c + + Char devices +!Efs/char_dev.c + + Miscellaneous Devices !Edrivers/char/misc.c diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index e97c323..065e8dc 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl @@ -868,18 +868,18 @@ and other resources, etc. libata Library -!Edrivers/scsi/libata-core.c +!Edrivers/ata/libata-core.c libata Core Internals -!Idrivers/scsi/libata-core.c +!Idrivers/ata/libata-core.c libata SCSI translation/emulation -!Edrivers/scsi/libata-scsi.c -!Idrivers/scsi/libata-scsi.c +!Edrivers/ata/libata-scsi.c +!Idrivers/ata/libata-scsi.c @@ -1600,12 +1600,12 @@ and other resources, etc. ata_piix Internals -!Idrivers/scsi/ata_piix.c +!Idrivers/ata/ata_piix.c sata_sil Internals -!Idrivers/scsi/sata_sil.c +!Idrivers/ata/sata_sil.c diff --git a/Documentation/DocBook/usb.tmpl b/Documentation/DocBook/usb.tmpl index 320af25..3608472 100644 --- a/Documentation/DocBook/usb.tmpl +++ b/Documentation/DocBook/usb.tmpl @@ -43,59 +43,52 @@ A Universal Serial Bus (USB) is used to connect a host, such as a PC or workstation, to a number of peripheral - devices. USB uses a tree structure, with the host at the + devices. USB uses a tree structure, with the host as the root (the system's master), hubs as interior nodes, and - peripheral devices as leaves (and slaves). + peripherals as leaves (and slaves). Modern PCs support several such trees of USB devices, usually one USB 2.0 tree (480 Mbit/sec each) with a few USB 1.1 trees (12 Mbit/sec each) that are used when you connect a USB 1.1 device directly to the machine's "root hub". - That master/slave asymmetry was designed in part for - ease of use. It is not physically possible to assemble - (legal) USB cables incorrectly: all upstream "to-the-host" - connectors are the rectangular type, matching the sockets on - root hubs, and the downstream type are the squarish type - (or they are built in to the peripheral). - Software doesn't need to deal with distributed autoconfiguration - since the pre-designated master node manages all that. - At the electrical level, bus protocol overhead is reduced by - eliminating arbitration and moving scheduling into host software. + That master/slave asymmetry was designed-in for a number of + reasons, one being ease of use. It is not physically possible to + assemble (legal) USB cables incorrectly: all upstream "to the host" + connectors are the rectangular type (matching the sockets on + root hubs), and all downstream connectors are the squarish type + (or they are built into the peripheral). + Also, the host software doesn't need to deal with distributed + auto-configuration since the pre-designated master node manages all that. + And finally, at the electrical level, bus protocol overhead is reduced by + eliminating arbitration and moving scheduling into the host software. - USB 1.0 was announced in January 1996, and was revised + USB 1.0 was announced in January 1996 and was revised as USB 1.1 (with improvements in hub specification and support for interrupt-out transfers) in September 1998. - USB 2.0 was released in April 2000, including high speed - transfers and transaction translating hubs (used for USB 1.1 + USB 2.0 was released in April 2000, adding high-speed + transfers and transaction-translating hubs (used for USB 1.1 and 1.0 backward compatibility). - USB support was added to Linux early in the 2.2 kernel series - shortly before the 2.3 development forked off. Updates - from 2.3 were regularly folded back into 2.2 releases, bringing - new features such as /sbin/hotplug support, - more drivers, and more robustness. - The 2.5 kernel series continued such improvements, and also - worked on USB 2.0 support, - higher performance, - better consistency between host controller drivers, - API simplification (to make bugs less likely), - and providing internal "kerneldoc" documentation. + Kernel developers added USB support to Linux early in the 2.2 kernel + series, shortly before 2.3 development forked. Updates from 2.3 were + regularly folded back into 2.2 releases, which improved reliability and + brought /sbin/hotplug support as well more drivers. + Such improvements were continued in the 2.5 kernel series, where they added + USB 2.0 support, improved performance, and made the host controller drivers + (HCDs) more consistent. They also simplified the API (to make bugs less + likely) and added internal "kerneldoc" documentation. Linux can run inside USB devices as well as on the hosts that control the devices. - Because the Linux 2.x USB support evolved to support mass market - platforms such as Apple Macintosh or PC-compatible systems, - it didn't address design concerns for those types of USB systems. - So it can't be used inside mass-market PDAs, or other peripherals. - USB device drivers running inside those Linux peripherals + But USB device drivers running inside those peripherals don't do the same things as the ones running inside hosts, - and so they've been given a different name: - they're called gadget drivers. - This document does not present gadget drivers. + so they've been given a different name: + gadget drivers. + This document does not cover gadget drivers. @@ -103,17 +96,14 @@ USB Host-Side API Model - Within the kernel, - host-side drivers for USB devices talk to the "usbcore" APIs. - There are two types of public "usbcore" APIs, targetted at two different - layers of USB driver. Those are - general purpose drivers, exposed through - driver frameworks such as block, character, or network devices; - and drivers that are part of the core, - which are involved in managing a USB bus. - Such core drivers include the hub driver, - which manages trees of USB devices, and several different kinds - of host controller driver (HCD), + Host-side drivers for USB devices talk to the "usbcore" APIs. + There are two. One is intended for + general-purpose drivers (exposed through + driver frameworks), and the other is for drivers that are + part of the core. + Such core drivers include the hub driver + (which manages trees of USB devices) and several different kinds + of host controller drivers, which control individual busses. @@ -122,21 +112,21 @@ - USB supports four kinds of data transfer - (control, bulk, interrupt, and isochronous). Two transfer - types use bandwidth as it's available (control and bulk), - while the other two types of transfer (interrupt and isochronous) + USB supports four kinds of data transfers + (control, bulk, interrupt, and isochronous). Two of them (control + and bulk) use bandwidth as it's available, + while the other two (interrupt and isochronous) are scheduled to provide guaranteed bandwidth. The device description model includes one or more "configurations" per device, only one of which is active at a time. - Devices that are capable of high speed operation must also support - full speed configurations, along with a way to ask about the - "other speed" configurations that might be used. + Devices that are capable of high-speed operation must also support + full-speed configurations, along with a way to ask about the + "other speed" configurations which might be used. - Configurations have one or more "interface", each + Configurations have one or more "interfaces", each of which may have "alternate settings". Interfaces may be standardized by USB "Class" specifications, or may be specific to a vendor or device. @@ -162,7 +152,7 @@ The Linux USB API supports synchronous calls for - control and bulk messaging. + control and bulk messages. It also supports asynchnous calls for all kinds of data transfer, using request structures called "URBs" (USB Request Blocks). @@ -463,14 +453,25 @@ file in your Linux kernel sources. - Otherwise the main use for this file from programs - is to poll() it to get notifications of usb devices - as they're plugged or unplugged. - To see what changed, you'd need to read the file and - compare "before" and "after" contents, scan the filesystem, - or see its hotplug event. + This file, in combination with the poll() system call, can + also be used to detect when devices are added or removed: +int fd; +struct pollfd pfd; + +fd = open("/proc/bus/usb/devices", O_RDONLY); +pfd = { fd, POLLIN, 0 }; +for (;;) { + /* The first time through, this call will return immediately. */ + poll(&pfd, 1, -1); + + /* To see what's changed, compare the file's previous and current + contents or scan the filesystem. (Scanning is more precise.) */ +} + Note that this behavior is intended to be used for informational + and debug purposes. It would be more appropriate to use programs + such as udev or HAL to initialize a device or start a user-mode + helper program, for instance. - diff --git a/Documentation/HOWTO b/Documentation/HOWTO index 915ae8c..d6f3dd1 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO @@ -358,7 +358,8 @@ Here is a list of some of the different quilt trees: - USB, PCI, Driver Core, and I2C, Greg Kroah-Hartman kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ - + - x86-64, partly i386, Andi Kleen + ftp.firstfloor.org:/pub/ak/x86_64/quilt/ Bug Reporting ------------- @@ -374,6 +375,26 @@ of information is needed by the kernel d problem. +Managing bug reports +-------------------- + +One of the best ways to put into practice your hacking skills is by fixing +bugs reported by other people. Not only you will help to make the kernel +more stable, you'll learn to fix real world problems and you will improve +your skills, and other developers will be aware of your presence. Fixing +bugs is one of the best ways to earn merit amongst the developers, because +not many people like wasting time fixing other people's bugs. + +To work in the already reported bug reports, go to http://bugzilla.kernel.org. +If you want to be advised of the future bug reports, you can subscribe to the +bugme-new mailing list (only new bug reports are mailed here) or to the +bugme-janitor mailing list (every change in the bugzilla is mailed here) + + http://lists.osdl.org/mailman/listinfo/bugme-new + http://lists.osdl.org/mailman/listinfo/bugme-janitors + + + Mailing lists ------------- diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt index 0256805..7756e09 100644 --- a/Documentation/IPMI.txt +++ b/Documentation/IPMI.txt @@ -326,9 +326,12 @@ for events, they will all receive all ev For receiving commands, you have to individually register commands you want to receive. Call ipmi_register_for_cmd() and supply the netfn -and command name for each command you want to receive. Only one user -may be registered for each netfn/cmd, but different users may register -for different commands. +and command name for each command you want to receive. You also +specify a bitmask of the channels you want to receive the command from +(or use IPMI_CHAN_ALL for all channels if you don't care). Only one +user may be registered for each netfn/cmd/channel, but different users +may register for different commands, or the same command if the +channel bitmasks do not overlap. From userland, equivalent IOCTLs are provided to do these functions. diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist index a10bfb6..7ac61f6 100644 --- a/Documentation/SubmitChecklist +++ b/Documentation/SubmitChecklist @@ -61,3 +61,8 @@ kernel patches. Documentation/kernel-parameters.txt. 18: All new module parameters are documented with MODULE_PARM_DESC() + +19: All new userspace interfaces are documented in Documentation/ABI/. + See Documentation/ABI/README for more information. + +20: Check that it all passes `make headers_check'. diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers index 6bd30fd..58bead0 100644 --- a/Documentation/SubmittingDrivers +++ b/Documentation/SubmittingDrivers @@ -59,11 +59,11 @@ Copyright: The copyright owner must agre are the same person/entity. If not, the name of the person/entity authorizing use of GPL should be listed in case it's necessary to verify the will of - the copright owner. + the copyright owner. Interfaces: If your driver uses existing interfaces and behaves like other drivers in the same class it will be much more likely - to be accepted than if it invents gratuitous new ones. + to be accepted than if it invents gratuitous new ones. If you need to implement a common API over Linux and NT drivers do it in userspace. @@ -88,7 +88,7 @@ Clarity: It helps if anyone can see how it will go in the bitbucket. Control: In general if there is active maintainance of a driver by - the author then patches will be redirected to them unless + the author then patches will be redirected to them unless they are totally obvious and without need of checking. If you want to be the contact and update point for the driver it is a good idea to state this in the comments, @@ -100,7 +100,7 @@ What Criteria Do Not Determine Acceptanc Vendor: Being the hardware vendor and maintaining the driver is often a good thing. If there is a stable working driver from other people already in the tree don't expect 'we are the - vendor' to get your driver chosen. Ideally work with the + vendor' to get your driver chosen. Ideally work with the existing driver author to build a single perfect driver. Author: It doesn't matter if a large Linux company wrote the driver, @@ -116,17 +116,13 @@ Linux kernel master tree: ftp.??.kernel.org:/pub/linux/kernel/... ?? == your country code, such as "us", "uk", "fr", etc. -Linux kernel mailing list: +Linux kernel mailing list: linux-kernel@vger.kernel.org [mail majordomo@vger.kernel.org to subscribe] Linux Device Drivers, Third Edition (covers 2.6.10): http://lwn.net/Kernel/LDD3/ (free version) -Kernel traffic: - Weekly summary of kernel list activity (much easier to read) - http://www.kerneltraffic.org/kernel-traffic/ - LWN.net: Weekly summary of kernel development activity - http://lwn.net/ 2.6 API changes: @@ -145,11 +141,8 @@ KernelNewbies: Linux USB project: http://www.linux-usb.org/ -How to NOT write kernel driver by arjanv@redhat.com - http://people.redhat.com/arjanv/olspaper.pdf +How to NOT write kernel driver by Arjan van de Ven: + http://www.fenrus.org/how-to-not-write-a-device-driver-paper.pdf Kernel Janitor: http://janitor.kernelnewbies.org/ - --- -Last updated on 17 Nov 2005. diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index d42ab4c..302d148 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -173,15 +173,15 @@ For small patches you may want to CC the trivial@kernel.org managed by Adrian Bunk; which collects "trivial" patches. Trivial patches must qualify for one of the following rules: Spelling fixes in documentation - Spelling fixes which could break grep(1). + Spelling fixes which could break grep(1) Warning fixes (cluttering with useless warnings is bad) Compilation fixes (only if they are actually correct) Runtime fixes (only if they actually fix things) - Removing use of deprecated functions/macros (eg. check_region). + Removing use of deprecated functions/macros (eg. check_region) Contact detail and documentation fixes Non-portable code replaced by portable code (even in arch-specific, since people copy, as long as it's trivial) - Any fix by the author/maintainer of the file. (ie. patch monkey + Any fix by the author/maintainer of the file (ie. patch monkey in re-transmission mode) URL: @@ -209,6 +209,19 @@ Exception: If your mailer is mangling p you to re-send them using MIME. +WARNING: Some mailers like Mozilla send your messages with +---- message header ---- +Content-Type: text/plain; charset=us-ascii; format=flowed +---- message header ---- +The problem is that "format=flowed" makes some of the mailers +on receiving side to replace TABs with spaces and do similar +changes. Thus the patches from you can look corrupted. + +To fix this just make your mozilla defaults/pref/mailnews.js file to look like: +pref("mailnews.send_plaintext_flowed", false); // RFC 2646======= +pref("mailnews.display.disable_format_flowed_support", true); + + 7) E-mail size. @@ -245,13 +258,13 @@ updated change. It is quite common for Linus to "drop" your patch without comment. That's the nature of the system. If he drops your patch, it could be due to -* Your patch did not apply cleanly to the latest kernel version +* Your patch did not apply cleanly to the latest kernel version. * Your patch was not sufficiently discussed on linux-kernel. -* A style issue (see section 2), -* An e-mail formatting issue (re-read this section) -* A technical problem with your change -* He gets tons of e-mail, and yours got lost in the shuffle -* You are being annoying (See Figure 1) +* A style issue (see section 2). +* An e-mail formatting issue (re-read this section). +* A technical problem with your change. +* He gets tons of e-mail, and yours got lost in the shuffle. +* You are being annoying. When in doubt, solicit comments on linux-kernel mailing list. @@ -476,10 +489,10 @@ SECTION 3 - REFERENCES Andrew Morton, "The perfect patch" (tpp). -Jeff Garzik, "Linux kernel patch submission format." +Jeff Garzik, "Linux kernel patch submission format". -Greg Kroah-Hartman "How to piss off a kernel subsystem maintainer". +Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer". @@ -488,9 +501,9 @@ Greg Kroah-Hartman "How to piss off a ke NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people! -Kernel Documentation/CodingStyle +Kernel Documentation/CodingStyle: -Linus Torvald's mail on the canonical patch format: +Linus Torvalds's mail on the canonical patch format: -- diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index 795ca39..b11792a 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c @@ -285,7 +285,7 @@ int main(int argc, char *argv[]) if (maskset) { rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, TASKSTATS_CMD_ATTR_REGISTER_CPUMASK, - &cpumask, sizeof(cpumask)); + &cpumask, strlen(cpumask) + 1); PRINTF("Sent register cpumask, retval %d\n", rc); if (rc < 0) { printf("error sending register cpumask\n"); @@ -315,7 +315,8 @@ int main(int argc, char *argv[]) } if (msg.n.nlmsg_type == NLMSG_ERROR || !NLMSG_OK((&msg.n), rep_len)) { - printf("fatal reply error, errno %d\n", errno); + struct nlmsgerr *err = NLMSG_DATA(&msg); + printf("fatal reply error, errno %d\n", err->error); goto done; } @@ -383,7 +384,7 @@ done: if (maskset) { rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK, - &cpumask, sizeof(cpumask)); + &cpumask, strlen(cpumask) + 1); printf("Sent deregister mask, retval %d\n", rc); if (rc < 0) err(rc, "error sending deregister cpumask\n"); diff --git a/Documentation/accounting/taskstats-struct.txt b/Documentation/accounting/taskstats-struct.txt new file mode 100644 index 0000000..661c797 --- /dev/null +++ b/Documentation/accounting/taskstats-struct.txt @@ -0,0 +1,161 @@ +The struct taskstats +-------------------- + +This document contains an explanation of the struct taskstats fields. + +There are three different groups of fields in the struct taskstats: + +1) Common and basic accounting fields + If CONFIG_TASKSTATS is set, the taskstats inteface is enabled and + the common fields and basic accounting fields are collected for + delivery at do_exit() of a task. +2) Delay accounting fields + These fields are placed between + /* Delay accounting fields start */ + and + /* Delay accounting fields end */ + Their values are collected if CONFIG_TASK_DELAY_ACCT is set. +3) Extended accounting fields + These fields are placed between + /* Extended accounting fields start */ + and + /* Extended accounting fields end */ + Their values are collected if CONFIG_TASK_XACCT is set. + +Future extension should add fields to the end of the taskstats struct, and +should not change the relative position of each field within the struct. + + +struct taskstats { + +1) Common and basic accounting fields: + /* The version number of this struct. This field is always set to + * TAKSTATS_VERSION, which is defined in . + * Each time the struct is changed, the value should be incremented. + */ + __u16 version; + + /* The exit code of a task. */ + __u32 ac_exitcode; /* Exit status */ + + /* The accounting flags of a task as defined in + * Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG. + */ + __u8 ac_flag; /* Record flags */ + + /* The value of task_nice() of a task. */ + __u8 ac_nice; /* task_nice */ + + /* The name of the command that started this task. */ + char ac_comm[TS_COMM_LEN]; /* Command name */ + + /* The scheduling discipline as set in task->policy field. */ + __u8 ac_sched; /* Scheduling discipline */ + + __u8 ac_pad[3]; + __u32 ac_uid; /* User ID */ + __u32 ac_gid; /* Group ID */ + __u32 ac_pid; /* Process ID */ + __u32 ac_ppid; /* Parent process ID */ + + /* The time when a task begins, in [secs] since 1970. */ + __u32 ac_btime; /* Begin time [sec since 1970] */ + + /* The elapsed time of a task, in [usec]. */ + __u64 ac_etime; /* Elapsed time [usec] */ + + /* The user CPU time of a task, in [usec]. */ + __u64 ac_utime; /* User CPU time [usec] */ + + /* The system CPU time of a task, in [usec]. */ + __u64 ac_stime; /* System CPU time [usec] */ + + /* The minor page fault count of a task, as set in task->min_flt. */ + __u64 ac_minflt; /* Minor Page Fault Count */ + + /* The major page fault count of a task, as set in task->maj_flt. */ + __u64 ac_majflt; /* Major Page Fault Count */ + + +2) Delay accounting fields: + /* Delay accounting fields start + * + * All values, until the comment "Delay accounting fields end" are + * available only if delay accounting is enabled, even though the last + * few fields are not delays + * + * xxx_count is the number of delay values recorded + * xxx_delay_total is the corresponding cumulative delay in nanoseconds + * + * xxx_delay_total wraps around to zero on overflow + * xxx_count incremented regardless of overflow + */ + + /* Delay waiting for cpu, while runnable + * count, delay_total NOT updated atomically + */ + __u64 cpu_count; + __u64 cpu_delay_total; + + /* Following four fields atomically updated using task->delays->lock */ + + /* Delay waiting for synchronous block I/O to complete + * does not account for delays in I/O submission + */ + __u64 blkio_count; + __u64 blkio_delay_total; + + /* Delay waiting for page fault I/O (swap in only) */ + __u64 swapin_count; + __u64 swapin_delay_total; + + /* cpu "wall-clock" running time + * On some architectures, value will adjust for cpu time stolen + * from the kernel in involuntary waits due to virtualization. + * Value is cumulative, in nanoseconds, without a corresponding count + * and wraps around to zero silently on overflow + */ + __u64 cpu_run_real_total; + + /* cpu "virtual" running time + * Uses time intervals seen by the kernel i.e. no adjustment + * for kernel's involuntary waits due to virtualization. + * Value is cumulative, in nanoseconds, without a corresponding count + * and wraps around to zero silently on overflow + */ + __u64 cpu_run_virtual_total; + /* Delay accounting fields end */ + /* version 1 ends here */ + + +3) Extended accounting fields + /* Extended accounting fields start */ + + /* Accumulated RSS usage in duration of a task, in MBytes-usecs. + * The current rss usage is added to this counter every time + * a tick is charged to a task's system time. So, at the end we + * will have memory usage multiplied by system time. Thus an + * average usage per system time unit can be calculated. + */ + __u64 coremem; /* accumulated RSS usage in MB-usec */ + + /* Accumulated virtual memory usage in duration of a task. + * Same as acct_rss_mem1 above except that we keep track of VM usage. + */ + __u64 virtmem; /* accumulated VM usage in MB-usec */ + + /* High watermark of RSS usage in duration of a task, in KBytes. */ + __u64 hiwater_rss; /* High-watermark of RSS usage */ + + /* High watermark of VM usage in duration of a task, in KBytes. */ + __u64 hiwater_vm; /* High-water virtual memory usage */ + + /* The following four fields are I/O statistics of a task. */ + __u64 read_char; /* bytes read */ + __u64 write_char; /* bytes written */ + __u64 read_syscalls; /* read syscalls */ + __u64 write_syscalls; /* write syscalls */ + + /* Extended accounting fields end */ + +} diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index 76b4429..842f0d1 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt @@ -217,11 +217,11 @@ exclusive cpuset. Also, the use of a Li to represent the cpuset hierarchy provides for a familiar permission and name space for cpusets, with a minimum of additional kernel code. -The cpus file in the root (top_cpuset) cpuset is read-only. -It automatically tracks the value of cpu_online_map, using a CPU -hotplug notifier. If and when memory nodes can be hotplugged, -we expect to make the mems file in the root cpuset read-only -as well, and have it track the value of node_online_map. +The cpus and mems files in the root (top_cpuset) cpuset are +read-only. The cpus file automatically tracks the value of +cpu_online_map using a CPU hotplug notifier, and the mems file +automatically tracks the value of node_online_map using the +cpuset_track_online_nodes() hook. 1.4 What are exclusive cpusets ? diff --git a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt index 74dffc6..5a03a28 100644 --- a/Documentation/crypto/api-intro.txt +++ b/Documentation/crypto/api-intro.txt @@ -19,15 +19,14 @@ At the lowest level are algorithms, whic API. 'Transforms' are user-instantiated objects, which maintain state, handle all -of the implementation logic (e.g. manipulating page vectors), provide an -abstraction to the underlying algorithms, and handle common logical -operations (e.g. cipher modes, HMAC for digests). However, at the user +of the implementation logic (e.g. manipulating page vectors) and provide an +abstraction to the underlying algorithms. However, at the user level they are very simple. Conceptually, the API layering looks like this: [transform api] (user interface) - [transform ops] (per-type logic glue e.g. cipher.c, digest.c) + [transform ops] (per-type logic glue e.g. cipher.c, compress.c) [algorithm api] (for registering algorithms) The idea is to make the user interface and algorithm registration API @@ -44,22 +43,27 @@ under development. Here's an example of how to use the API: #include + #include + #include struct scatterlist sg[2]; char result[128]; - struct crypto_tfm *tfm; + struct crypto_hash *tfm; + struct hash_desc desc; - tfm = crypto_alloc_tfm("md5", 0); - if (tfm == NULL) + tfm = crypto_alloc_hash("md5", 0, CRYPTO_ALG_ASYNC); + if (IS_ERR(tfm)) fail(); /* ... set up the scatterlists ... */ + + desc.tfm = tfm; + desc.flags = 0; - crypto_digest_init(tfm); - crypto_digest_update(tfm, &sg, 2); - crypto_digest_final(tfm, result); + if (crypto_hash_digest(&desc, &sg, 2, result)) + fail(); - crypto_free_tfm(tfm); + crypto_free_hash(tfm); Many real examples are available in the regression test module (tcrypt.c). @@ -126,7 +130,7 @@ might already be working on. BUGS Send bug reports to: -James Morris +Herbert Xu Cc: David S. Miller @@ -134,13 +138,14 @@ FURTHER INFORMATION For further patches and various updates, including the current TODO list, see: -http://samba.org/~jamesm/crypto/ +http://gondor.apana.org.au/~herbert/crypto/ AUTHORS James Morris David S. Miller +Herbert Xu CREDITS @@ -238,8 +243,11 @@ Anubis algorithm contributors: Tiger algorithm contributors: Aaron Grothe +VIA PadLock contributors: + Michal Ludvig + Generic scatterwalk code by Adam J. Richter Please send any credits updates or corrections to: -James Morris +Herbert Xu diff --git a/Documentation/devices.txt b/Documentation/devices.txt index 66c725f..addc67b 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt @@ -2543,6 +2543,9 @@ Your cooperation is appreciated. 64 = /dev/usb/rio500 Diamond Rio 500 65 = /dev/usb/usblcd USBLCD Interface (info@usblcd.de) 66 = /dev/usb/cpad0 Synaptics cPad (mouse/LCD) + 67 = /dev/usb/adutux0 1st Ontrak ADU device + ... + 76 = /dev/usb/adutux10 10th Ontrak ADU device 96 = /dev/usb/hiddev0 1st USB HID device ... 111 = /dev/usb/hiddev15 16th USB HID device diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 24adfe9..63c2d0c 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff @@ -135,6 +135,7 @@ tags times.h* tkparse trix_boot.h +utsrelease.h* version.h* vmlinux vmlinux-* diff --git a/Documentation/fb/intelfb.txt b/Documentation/fb/intelfb.txt index c12d39a..aa0d322 100644 --- a/Documentation/fb/intelfb.txt +++ b/Documentation/fb/intelfb.txt @@ -1,16 +1,19 @@ -Intel 830M/845G/852GM/855GM/865G/915G Framebuffer driver +Intel 830M/845G/852GM/855GM/865G/915G/945G Framebuffer driver ================================================================ A. Introduction - This is a framebuffer driver for various Intel 810/815 compatible + This is a framebuffer driver for various Intel 8xx/9xx compatible graphics devices. These would include: Intel 830M - Intel 810E845G + Intel 845G Intel 852GM Intel 855GM Intel 865G Intel 915G + Intel 915GM + Intel 945G + Intel 945GM B. List of available options @@ -78,7 +81,7 @@ C. Kernel booting Separate each option/option-pair by commas (,) and the option from its value with an equals sign (=) as in the following: -video=i810fb:option1,option2=value2 +video=intelfb:option1,option2=value2 Sample Usage ------------ diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 552507f..9364f47 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -6,6 +6,21 @@ be removed from this file. --------------------------- +What: /sys/devices/.../power/state + dev->power.power_state + dpm_runtime_{suspend,resume)() +When: July 2007 +Why: Broken design for runtime control over driver power states, confusing + driver-internal runtime power management with: mechanisms to support + system-wide sleep state transitions; event codes that distinguish + different phases of swsusp "sleep" transitions; and userspace policy + inputs. This framework was never widely used, and most attempts to + use it were broken. Drivers should instead be exposing domain-specific + interfaces either to kernel or to userspace. +Who: Pavel Machek + +--------------------------- + What: RAW driver (CONFIG_RAW_DRIVER) When: December 2005 Why: declared obsolete since kernel 2.6.3 @@ -31,17 +46,8 @@ Who: Jody McIntyre - ---------------------------- - What: Video4Linux API 1 ioctls and video_decoder.h from Video devices. -When: July 2006 +When: December 2006 Why: V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6 series. The old API have lots of drawbacks and don't provide enough means to work with all video and audio standards. The newer API is @@ -55,6 +61,18 @@ Who: Mauro Carvalho Chehab + +--------------------------- + What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) When: November 2005 Files: drivers/pcmcia/: pcmcia_ioctl.c @@ -202,14 +220,6 @@ Who: Nick Piggin --------------------------- -What: Support for the MIPS EV96100 evaluation board -When: September 2006 -Why: Does no longer build since at least November 15, 2003, apparently - no userbase left. -Who: Ralf Baechle - ---------------------------- - What: Support for the Momentum / PMC-Sierra Jaguar ATX evaluation board When: September 2006 Why: Does no longer build since quite some time, and was never popular, @@ -294,3 +304,24 @@ Why: The frame diverter is included in m It is not clear if anyone is still using it. Who: Stephen Hemminger +--------------------------- + + +What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment +When: Oktober 2008 +Why: The stacking of class devices makes these values misleading and + inconsistent. + Class devices should not carry any of these properties, and bus + devices have SUBSYTEM and DRIVER as a replacement. +Who: Kay Sievers + +--------------------------- + +What: i2c-isa +When: December 2006 +Why: i2c-isa is a non-sense and doesn't fit in the device driver + model. Drivers relying on it are better implemented as platform + drivers. +Who: Jean Delvare + +--------------------------- diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 247d7f6..eb1a6ca 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@ -356,10 +356,9 @@ The last two are called only from check_ prototypes: loff_t (*llseek) (struct file *, loff_t, int); ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); - ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t); ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); - ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t, - loff_t); + ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); + ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); int (*readdir) (struct file *, void *, filldir_t); unsigned int (*poll) (struct file *, struct poll_table_struct *); int (*ioctl) (struct inode *, struct file *, unsigned int, diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 99902ae..7240ee7 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -39,6 +39,8 @@ Table of Contents 2.9 Appletalk 2.10 IPX 2.11 /proc/sys/fs/mqueue - POSIX message queues filesystem + 2.12 /proc//oom_adj - Adjust the oom-killer score + 2.13 /proc//oom_score - Display current oom-killer score ------------------------------------------------------------------------------ Preface @@ -1124,11 +1126,15 @@ debugging information is displayed on co NMI switch that most IA32 servers have fires unknown NMI up, for example. If a system hangs up, try pressing the NMI switch. -[NOTE] - This function and oprofile share a NMI callback. Therefore this function - cannot be enabled when oprofile is activated. - And NMI watchdog will be disabled when the value in this file is set to - non-zero. +nmi_watchdog +------------ + +Enables/Disables the NMI watchdog on x86 systems. When the value is non-zero +the NMI watchdog is enabled and will continuously test all online cpus to +determine whether or not they are still functioning properly. + +Because the NMI watchdog shares registers with oprofile, by disabling the NMI +watchdog, oprofile may have more registers to utilize. 2.4 /proc/sys/vm - The virtual memory subsystem @@ -1958,6 +1964,22 @@ a queue must be less or equal then msg_m maximum message size value (it is every message queue's attribute set during its creation). +2.12 /proc//oom_adj - Adjust the oom-killer score +------------------------------------------------------ + +This file can be used to adjust the score used to select which processes +should be killed in an out-of-memory situation. Giving it a high score will +increase the likelihood of this process being killed by the oom-killer. Valid +values are in the range -16 to +15, plus the special value -17, which disables +oom-killing altogether for this process. + +2.13 /proc//oom_score - Display current oom-killer score +------------------------------------------------------------- + +------------------------------------------------------------------------------ +This file can be used to check the current score used by the oom-killer is for +any given . Use it together with /proc//oom_adj to tune which +process should be killed in an out-of-memory situation. ------------------------------------------------------------------------------ Summary diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 1cb7e8b..cd07c21 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -699,9 +699,9 @@ This describes how the VFS can manipulat struct file_operations { loff_t (*llseek) (struct file *, loff_t, int); ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); - ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t); ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); - ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t, loff_t); + ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); + ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); int (*readdir) (struct file *, void *, filldir_t); unsigned int (*poll) (struct file *, struct poll_table_struct *); int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87 index 9555be1..e783fd6 100644 --- a/Documentation/hwmon/it87 +++ b/Documentation/hwmon/it87 @@ -13,12 +13,25 @@ Supported chips: from Super I/O config space (8 I/O ports) Datasheet: Publicly available at the ITE website http://www.ite.com.tw/ + * IT8716F + Prefix: 'it8716' + Addresses scanned: from Super I/O config space (8 I/O ports) + Datasheet: Publicly available at the ITE website + http://www.ite.com.tw/product_info/file/pc/IT8716F_V0.3.ZIP + * IT8718F + Prefix: 'it8718' + Addresses scanned: from Super I/O config space (8 I/O ports) + Datasheet: Publicly available at the ITE website + http://www.ite.com.tw/product_info/file/pc/IT8718F_V0.2.zip + http://www.ite.com.tw/product_info/file/pc/IT8718F_V0%203_(for%20C%20version).zip * SiS950 [clone of IT8705F] Prefix: 'it87' Addresses scanned: from Super I/O config space (8 I/O ports) Datasheet: No longer be available -Author: Christophe Gauthron +Authors: + Christophe Gauthron + Jean Delvare Module Parameters @@ -43,26 +56,46 @@ Module Parameters Description ----------- -This driver implements support for the IT8705F, IT8712F and SiS950 chips. - -This driver also supports IT8712F, which adds SMBus access, and a VID -input, used to report the Vcore voltage of the Pentium processor. -The IT8712F additionally features VID inputs. +This driver implements support for the IT8705F, IT8712F, IT8716F, +IT8718F and SiS950 chips. These chips are 'Super I/O chips', supporting floppy disks, infrared ports, joysticks and other miscellaneous stuff. For hardware monitoring, they include an 'environment controller' with 3 temperature sensors, 3 fan rotation speed sensors, 8 voltage sensors, and associated alarms. +The IT8712F and IT8716F additionally feature VID inputs, used to report +the Vcore voltage of the processor. The early IT8712F have 5 VID pins, +the IT8716F and late IT8712F have 6. They are shared with other functions +though, so the functionality may not be available on a given system. +The driver dumbly assume it is there. + +The IT8718F also features VID inputs (up to 8 pins) but the value is +stored in the Super-I/O configuration space. Due to technical limitations, +this value can currently only be read once at initialization time, so +the driver won't notice and report changes in the VID value. The two +upper VID bits share their pins with voltage inputs (in5 and in6) so you +can't have both on a given board. + +The IT8716F, IT8718F and later IT8712F revisions have support for +2 additional fans. They are not yet supported by the driver. + +The IT8716F and IT8718F, and late IT8712F and IT8705F also have optional +16-bit tachometer counters for fans 1 to 3. This is better (no more fan +clock divider mess) but not compatible with the older chips and +revisions. For now, the driver only uses the 16-bit mode on the +IT8716F and IT8718F. + Temperatures are measured in degrees Celsius. An alarm is triggered once when the Overtemperature Shutdown limit is crossed. Fan rotation speeds are reported in RPM (rotations per minute). An alarm is -triggered if the rotation speed has dropped below a programmable limit. Fan -readings can be divided by a programmable divider (1, 2, 4 or 8) to give the -readings more range or accuracy. Not all RPM values can accurately be -represented, so some rounding is done. With a divider of 2, the lowest -representable value is around 2600 RPM. +triggered if the rotation speed has dropped below a programmable limit. When +16-bit tachometer counters aren't used, fan readings can be divided by +a programmable divider (1, 2, 4 or 8) to give the readings more range or +accuracy. With a divider of 2, the lowest representable value is around +2600 RPM. Not all RPM values can accurately be represented, so some rounding +is done. Voltage sensors (also known as IN sensors) report their values in volts. An alarm is triggered if the voltage has crossed a programmable minimum or @@ -71,9 +104,9 @@ zero'; this is important for negative vo inputs can measure voltages between 0 and 4.08 volts, with a resolution of 0.016 volt. The battery voltage in8 does not have limit registers. -The VID lines (IT8712F only) encode the core voltage value: the voltage -level your processor should work with. This is hardcoded by the mainboard -and/or processor itself. It is a value in volts. +The VID lines (IT8712F/IT8716F/IT8718F) encode the core voltage value: +the voltage level your processor should work with. This is hardcoded by +the mainboard and/or processor itself. It is a value in volts. If an alarm triggers, it will remain triggered until the hardware register is read at least once. This means that the cause for the alarm may already diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp new file mode 100644 index 0000000..bab445a --- /dev/null +++ b/Documentation/hwmon/k8temp @@ -0,0 +1,52 @@ +Kernel driver k8temp +==================== + +Supported chips: + * AMD K8 CPU + Prefix: 'k8temp' + Addresses scanned: PCI space + Datasheet: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf + +Author: Rudolf Marek +Contact: Rudolf Marek + +Description +----------- + +This driver permits reading temperature sensor(s) embedded inside AMD K8 CPUs. +Official documentation says that it works from revision F of K8 core, but +in fact it seems to be implemented for all revisions of K8 except the first +two revisions (SH-B0 and SH-B3). + +There can be up to four temperature sensors inside single CPU. The driver +will auto-detect the sensors and will display only temperatures from +implemented sensors. + +Mapping of /sys files is as follows: + +temp1_input - temperature of Core 0 and "place" 0 +temp2_input - temperature of Core 0 and "place" 1 +temp3_input - temperature of Core 1 and "place" 0 +temp4_input - temperature of Core 1 and "place" 1 + +Temperatures are measured in degrees Celsius and measurement resolution is +1 degree C. It is expected that future CPU will have better resolution. The +temperature is updated once a second. Valid temperatures are from -49 to +206 degrees C. + +Temperature known as TCaseMax was specified for processors up to revision E. +This temperature is defined as temperature between heat-spreader and CPU +case, so the internal CPU temperature supplied by this driver can be higher. +There is no easy way how to measure the temperature which will correlate +with TCaseMax temperature. + +For newer revisions of CPU (rev F, socket AM2) there is a mathematically +computed temperature called TControl, which must be lower than TControlMax. + +The relationship is following: + +temp1_input - TjOffset*2 < TControlMax, + +TjOffset is not yet exported by the driver, TControlMax is usually +70 degrees C. The rule of the thumb -> CPU temperature should not cross +60 degrees C too much. diff --git a/Documentation/hwmon/vt1211 b/Documentation/hwmon/vt1211 new file mode 100644 index 0000000..77fa633 --- /dev/null +++ b/Documentation/hwmon/vt1211 @@ -0,0 +1,206 @@ +Kernel driver vt1211 +==================== + +Supported chips: + * VIA VT1211 + Prefix: 'vt1211' + Addresses scanned: none, address read from Super-I/O config space + Datasheet: Provided by VIA upon request and under NDA + +Authors: Juerg Haefliger + +This driver is based on the driver for kernel 2.4 by Mark D. Studebaker and +its port to kernel 2.6 by Lars Ekman. + +Thanks to Joseph Chan and Fiona Gatt from VIA for providing documentation and +technical support. + + +Module Parameters +----------------- + +* uch_config: int Override the BIOS default universal channel (UCH) + configuration for channels 1-5. + Legal values are in the range of 0-31. Bit 0 maps to + UCH1, bit 1 maps to UCH2 and so on. Setting a bit to 1 + enables the thermal input of that particular UCH and + setting a bit to 0 enables the voltage input. + +* int_mode: int Override the BIOS default temperature interrupt mode. + The only possible value is 0 which forces interrupt + mode 0. In this mode, any pending interrupt is cleared + when the status register is read but is regenerated as + long as the temperature stays above the hysteresis + limit. + +Be aware that overriding BIOS defaults might cause some unwanted side effects! + + +Description +----------- + +The VIA VT1211 Super-I/O chip includes complete hardware monitoring +capabilities. It monitors 2 dedicated temperature sensor inputs (temp1 and +temp2), 1 dedicated voltage (in5) and 2 fans. Additionally, the chip +implements 5 universal input channels (UCH1-5) that can be individually +programmed to either monitor a voltage or a temperature. + +This chip also provides manual and automatic control of fan speeds (according +to the datasheet). The driver only supports automatic control since the manual +mode doesn't seem to work as advertised in the datasheet. In fact I couldn't +get manual mode to work at all! Be aware that automatic mode hasn't been +tested very well (due to the fact that my EPIA M10000 doesn't have the fans +connected to the PWM outputs of the VT1211 :-(). + +The following table shows the relationship between the vt1211 inputs and the +sysfs nodes. + +Sensor Voltage Mode Temp Mode Default Use (from the datasheet) +------ ------------ --------- -------------------------------- +Reading 1 temp1 Intel thermal diode +Reading 3 temp2 Internal thermal diode +UCH1/Reading2 in0 temp3 NTC type thermistor +UCH2 in1 temp4 +2.5V +UCH3 in2 temp5 VccP (processor core) +UCH4 in3 temp6 +5V +UCH5 in4 temp7 +12V ++3.3V in5 Internal VCC (+3.3V) + + +Voltage Monitoring +------------------ + +Voltages are sampled by an 8-bit ADC with a LSB of ~10mV. The supported input +range is thus from 0 to 2.60V. Voltage values outside of this range need +external scaling resistors. This external scaling needs to be compensated for +via compute lines in sensors.conf, like: + +compute inx @*(1+R1/R2), @/(1+R1/R2) + +The board level scaling resistors according to VIA's recommendation are as +follows. And this is of course totally dependent on the actual board +implementation :-) You will have to find documentation for your own +motherboard and edit sensors.conf accordingly. + + Expected +Voltage R1 R2 Divider Raw Value +----------------------------------------------- ++2.5V 2K 10K 1.2 2083 mV +VccP --- --- 1.0 1400 mV (1) ++5V 14K 10K 2.4 2083 mV ++12V 47K 10K 5.7 2105 mV ++3.3V (int) 2K 3.4K 1.588 3300 mV (2) ++3.3V (ext) 6.8K 10K 1.68 1964 mV + +(1) Depending on the CPU (1.4V is for a VIA C3 Nehemiah). +(2) R1 and R2 for 3.3V (int) are internal to the VT1211 chip and the driver + performs the scaling and returns the properly scaled voltage value. + +Each measured voltage has an associated low and high limit which triggers an +alarm when crossed. + + +Temperature Monitoring +---------------------- + +Temperatures are reported in millidegree Celsius. Each measured temperature +has a high limit which triggers an alarm if crossed. There is an associated +hysteresis value with each temperature below which the temperature has to drop +before the alarm is cleared (this is only true for interrupt mode 0). The +interrupt mode can be forced to 0 in case the BIOS doesn't do it +automatically. See the 'Module Parameters' section for details. + +All temperature channels except temp2 are external. Temp2 is the VT1211 +internal thermal diode and the driver does all the scaling for temp2 and +returns the temperature in millidegree Celsius. For the external channels +temp1 and temp3-temp7, scaling depends on the board implementation and needs +to be performed in userspace via sensors.conf. + +Temp1 is an Intel-type thermal diode which requires the following formula to +convert between sysfs readings and real temperatures: + +compute temp1 (@-Offset)/Gain, (@*Gain)+Offset + +According to the VIA VT1211 BIOS porting guide, the following gain and offset +values should be used: + +Diode Type Offset Gain +---------- ------ ---- +Intel CPU 88.638 0.9528 + 65.000 0.9686 *) +VIA C3 Ezra 83.869 0.9528 +VIA C3 Ezra-T 73.869 0.9528 + +*) This is the formula from the lm_sensors 2.10.0 sensors.conf file. I don't +know where it comes from or how it was derived, it's just listed here for +completeness. + +Temp3-temp7 support NTC thermistors. For these channels, the driver returns +the voltages as seen at the individual pins of UCH1-UCH5. The voltage at the +pin (Vpin) is formed by a voltage divider made of the thermistor (Rth) and a +scaling resistor (Rs): + +Vpin = 2200 * Rth / (Rs + Rth) (2200 is the ADC max limit of 2200 mV) + +The equation for the thermistor is as follows (google it if you want to know +more about it): + +Rth = Ro * exp(B * (1 / T - 1 / To)) (To is 298.15K (25C) and Ro is the + nominal resistance at 25C) + +Mingling the above two equations and assuming Rs = Ro and B = 3435 yields the +following formula for sensors.conf: + +compute tempx 1 / (1 / 298.15 - (` (2200 / @ - 1)) / 3435) - 273.15, + 2200 / (1 + (^ (3435 / 298.15 - 3435 / (273.15 + @)))) + + +Fan Speed Control +----------------- + +The VT1211 provides 2 programmable PWM outputs to control the speeds of 2 +fans. Writing a 2 to any of the two pwm[1-2]_enable sysfs nodes will put the +PWM controller in automatic mode. There is only a single controller that +controls both PWM outputs but each PWM output can be individually enabled and +disabled. + +Each PWM has 4 associated distinct output duty-cycles: full, high, low and +off. Full and off are internally hard-wired to 255 (100%) and 0 (0%), +respectively. High and low can be programmed via +pwm[1-2]_auto_point[2-3]_pwm. Each PWM output can be associated with a +different thermal input but - and here's the weird part - only one set of +thermal thresholds exist that controls both PWMs output duty-cycles. The +thermal thresholds are accessible via pwm[1-2]_auto_point[1-4]_temp. Note +that even though there are 2 sets of 4 auto points each, they map to the same +registers in the VT1211 and programming one set is sufficient (actually only +the first set pwm1_auto_point[1-4]_temp is writable, the second set is +read-only). + +PWM Auto Point PWM Output Duty-Cycle +------------------------------------------------ +pwm[1-2]_auto_point4_pwm full speed duty-cycle (hard-wired to 255) +pwm[1-2]_auto_point3_pwm high speed duty-cycle +pwm[1-2]_auto_point2_pwm low speed duty-cycle +pwm[1-2]_auto_point1_pwm off duty-cycle (hard-wired to 0) + +Temp Auto Point Thermal Threshold +--------------------------------------------- +pwm[1-2]_auto_point4_temp full speed temp +pwm[1-2]_auto_point3_temp high speed temp +pwm[1-2]_auto_point2_temp low speed temp +pwm[1-2]_auto_point1_temp off temp + +Long story short, the controller implements the following algorithm to set the +PWM output duty-cycle based on the input temperature: + +Thermal Threshold Output Duty-Cycle + (Rising Temp) (Falling Temp) +---------------------------------------------------------- + full speed duty-cycle full speed duty-cycle +full speed temp + high speed duty-cycle full speed duty-cycle +high speed temp + low speed duty-cycle high speed duty-cycle +low speed temp + off duty-cycle low speed duty-cycle +off temp diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf new file mode 100644 index 0000000..fae3b78 --- /dev/null +++ b/Documentation/hwmon/w83627ehf @@ -0,0 +1,85 @@ +Kernel driver w83627ehf +======================= + +Supported chips: + * Winbond W83627EHF/EHG (ISA access ONLY) + Prefix: 'w83627ehf' + Addresses scanned: ISA address retrieved from Super I/O registers + Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83627EHF_%20W83627EHGb.pdf + +Authors: + Jean Delvare + Yuan Mu (Winbond) + Rudolf Marek + +Description +----------- + +This driver implements support for the Winbond W83627EHF and W83627EHG +super I/O chips. We will refer to them collectively as Winbond chips. + +The chips implement three temperature sensors, five fan rotation +speed sensors, ten analog voltage sensors, alarms with beep warnings (control +unimplemented), and some automatic fan regulation strategies (plus manual +fan control mode). + +Temperatures are measured in degrees Celsius and measurement resolution is 1 +degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when +the temperature gets higher than high limit; it stays on until the temperature +falls below the Hysteresis value. + +Fan rotation speeds are reported in RPM (rotations per minute). An alarm is +triggered if the rotation speed has dropped below a programmable limit. Fan +readings can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64 or +128) to give the readings more range or accuracy. The driver sets the most +suitable fan divisor itself. Some fans might not be present because they +share pins with other functions. + +Voltage sensors (also known as IN sensors) report their values in millivolts. +An alarm is triggered if the voltage has crossed a programmable minimum +or maximum limit. + +The driver supports automatic fan control mode known as Thermal Cruise. +In this mode, the chip attempts to keep the measured temperature in a +predefined temperature range. If the temperature goes out of range, fan +is driven slower/faster to reach the predefined range again. + +The mode works for fan1-fan4. Mapping of temperatures to pwm outputs is as +follows: + +temp1 -> pwm1 +temp2 -> pwm2 +temp3 -> pwm3 +prog -> pwm4 (the programmable setting is not supported by the driver) + +/sys files +---------- + +pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range: + 0 (stop) to 255 (full) + +pwm[1-4]_enable - this file controls mode of fan/temperature control: + * 1 Manual Mode, write to pwm file any value 0-255 (full speed) + * 2 Thermal Cruise + +Thermal Cruise mode +------------------- + +If the temperature is in the range defined by: + +pwm[1-4]_target - set target temperature, unit millidegree Celcius + (range 0 - 127000) +pwm[1-4]_tolerance - tolerance, unit millidegree Celcius (range 0 - 15000) + +there are no changes to fan speed. Once the temperature leaves the interval, +fan speed increases (temp is higher) or decreases if lower than desired. +There are defined steps and times, but not exported by the driver yet. + +pwm[1-4]_min_output - minimum fan speed (range 1 - 255), when the temperature + is below defined range. +pwm[1-4]_stop_time - how many milliseconds [ms] must elapse to switch + corresponding fan off. (when the temperature was below + defined range). + +Note: last two functions are influenced by other control bits, not yet exported + by the driver, so a change might not have any effect. diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d index 83a3836..19b2ed7 100644 --- a/Documentation/hwmon/w83791d +++ b/Documentation/hwmon/w83791d @@ -5,7 +5,7 @@ Supported chips: * Winbond W83791D Prefix: 'w83791d' Addresses scanned: I2C 0x2c - 0x2f - Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791Da.pdf + Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791D_W83791Gb.pdf Author: Charles Spirakis @@ -20,6 +20,9 @@ Credits: Chunhao Huang , Rudolf Marek +Additional contributors: + Sven Anders + Module Parameters ----------------- @@ -46,7 +49,8 @@ Module Parameters Description ----------- -This driver implements support for the Winbond W83791D chip. +This driver implements support for the Winbond W83791D chip. The W83791G +chip appears to be the same as the W83791D but is lead free. Detection of the chip can sometimes be foiled because it can be in an internal state that allows no clean access (Bank with ID register is not @@ -71,34 +75,36 @@ Voltage sensors (also known as IN sensor An alarm is triggered if the voltage has crossed a programmable minimum or maximum limit. -Alarms are provided as output from a "realtime status register". The -following bits are defined: - -bit - alarm on: -0 - Vcore -1 - VINR0 -2 - +3.3VIN -3 - 5VDD -4 - temp1 -5 - temp2 -6 - fan1 -7 - fan2 -8 - +12VIN -9 - -12VIN -10 - -5VIN -11 - fan3 -12 - chassis -13 - temp3 -14 - VINR1 -15 - reserved -16 - tart1 -17 - tart2 -18 - tart3 -19 - VSB -20 - VBAT -21 - fan4 -22 - fan5 -23 - reserved +The bit ordering for the alarm "realtime status register" and the +"beep enable registers" are different. + +in0 (VCORE) : alarms: 0x000001 beep_enable: 0x000001 +in1 (VINR0) : alarms: 0x000002 beep_enable: 0x002000 <== mismatch +in2 (+3.3VIN): alarms: 0x000004 beep_enable: 0x000004 +in3 (5VDD) : alarms: 0x000008 beep_enable: 0x000008 +in4 (+12VIN) : alarms: 0x000100 beep_enable: 0x000100 +in5 (-12VIN) : alarms: 0x000200 beep_enable: 0x000200 +in6 (-5VIN) : alarms: 0x000400 beep_enable: 0x000400 +in7 (VSB) : alarms: 0x080000 beep_enable: 0x010000 <== mismatch +in8 (VBAT) : alarms: 0x100000 beep_enable: 0x020000 <== mismatch +in9 (VINR1) : alarms: 0x004000 beep_enable: 0x004000 +temp1 : alarms: 0x000010 beep_enable: 0x000010 +temp2 : alarms: 0x000020 beep_enable: 0x000020 +temp3 : alarms: 0x002000 beep_enable: 0x000002 <== mismatch +fan1 : alarms: 0x000040 beep_enable: 0x000040 +fan2 : alarms: 0x000080 beep_enable: 0x000080 +fan3 : alarms: 0x000800 beep_enable: 0x000800 +fan4 : alarms: 0x200000 beep_enable: 0x200000 +fan5 : alarms: 0x400000 beep_enable: 0x400000 +tart1 : alarms: 0x010000 beep_enable: 0x040000 <== mismatch +tart2 : alarms: 0x020000 beep_enable: 0x080000 <== mismatch +tart3 : alarms: 0x040000 beep_enable: 0x100000 <== mismatch +case_open : alarms: 0x001000 beep_enable: 0x001000 +user_enable : alarms: -------- beep_enable: 0x800000 + +*** NOTE: It is the responsibility of user-space code to handle the fact +that the beep enable and alarm bits are in different positions when using that +feature of the chip. When an alarm goes off, you can be warned by a beeping signal through your computer speaker. It is possible to enable all beeping globally, or only @@ -109,5 +115,6 @@ often will do no harm, but will return ' W83791D TODO: --------------- -Provide a patch for per-file alarms as discussed on the mailing list +Provide a patch for per-file alarms and beep enables as defined in the hwmon + documentation (Documentation/hwmon/sysfs-interface) Provide a patch for smart-fan control (still need appropriate motherboard/fans) diff --git a/Documentation/i2c/busses/i2c-viapro b/Documentation/i2c/busses/i2c-viapro index 1677566..2568034 100644 --- a/Documentation/i2c/busses/i2c-viapro +++ b/Documentation/i2c/busses/i2c-viapro @@ -7,9 +7,12 @@ Supported adapters: * VIA Technologies, Inc. VT82C686A/B Datasheet: Sometimes available at the VIA website - * VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237R + * VIA Technologies, Inc. VT8231, VT8233, VT8233A Datasheet: available on request from VIA + * VIA Technologies, Inc. VT8235, VT8237R, VT8237A, VT8251 + Datasheet: available on request and under NDA from VIA + Authors: Kyösti Mälkki , Mark D. Studebaker , @@ -39,6 +42,8 @@ Your lspci -n listing must show one of t device 1106:8235 (VT8231 function 4) device 1106:3177 (VT8235) device 1106:3227 (VT8237R) + device 1106:3337 (VT8237A) + device 1106:3287 (VT8251) If none of these show up, you should look in the BIOS for settings like enable ACPI / SMBus or even USB. diff --git a/Documentation/i2c/i2c-stub b/Documentation/i2c/i2c-stub index d6dcb13..9cc081e 100644 --- a/Documentation/i2c/i2c-stub +++ b/Documentation/i2c/i2c-stub @@ -6,9 +6,12 @@ This module is a very simple fake I2C/SM types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, and (r/w) word data. +You need to provide a chip address as a module parameter when loading +this driver, which will then only react to SMBus commands to this address. + No hardware is needed nor associated with this module. It will accept write -quick commands to all addresses; it will respond to the other commands (also -to all addresses) by reading from or writing to an array in memory. It will +quick commands to one address; it will respond to the other commands (also +to one address) by reading from or writing to an array in memory. It will also spam the kernel logs for every command it handles. A pointer register with auto-increment is implemented for all byte @@ -21,6 +24,11 @@ The typical use-case is like this: 3. load the target sensors chip driver module 4. observe its behavior in the kernel log +PARAMETERS: + +int chip_addr: + The SMBus address to emulate a chip at. + CAVEATS: There are independent arrays for byte/data and word/data commands. Depending @@ -33,6 +41,9 @@ If the hardware for your driver has bank chips) this module will not work well - although it could be extended to support that pretty easily. +Only one chip address is supported - although this module could be +extended to support more. + If you spam it hard enough, printk can be lossy. This module really wants something like relayfs. diff --git a/Documentation/input/ff.txt b/Documentation/input/ff.txt index c7e10ea..c53b1c1 100644 --- a/Documentation/input/ff.txt +++ b/Documentation/input/ff.txt @@ -1,67 +1,37 @@ Force feedback for Linux. By Johann Deneux on 2001/04/22. +Updated by Anssi Hannula on 2006/04/09. You may redistribute this file. Please remember to include shape.fig and interactive.fig as well. ---------------------------------------------------------------------------- -0. Introduction +1. Introduction ~~~~~~~~~~~~~~~ This document describes how to use force feedback devices under Linux. The goal is not to support these devices as if they were simple input-only devices (as it is already the case), but to really enable the rendering of force effects. -At the moment, only I-Force devices are supported, and not officially. That -means I had to find out how the protocol works on my own. Of course, the -information I managed to grasp is far from being complete, and I can not -guarranty that this driver will work for you. -This document only describes the force feedback part of the driver for I-Force -devices. Please read joystick.txt before reading further this document. +This document only describes the force feedback part of the Linux input +interface. Please read joystick.txt and input.txt before reading further this +document. 2. Instructions to the user ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Here are instructions on how to compile and use the driver. In fact, this -driver is the normal iforce, input and evdev drivers written by Vojtech -Pavlik, plus additions to support force feedback. +To enable force feedback, you have to: + +1. have your kernel configured with evdev and a driver that supports your + device. +2. make sure evdev module is loaded and /dev/input/event* device files are + created. Before you start, let me WARN you that some devices shake violently during the initialisation phase. This happens for example with my "AVB Top Shot Pegasus". To stop this annoying behaviour, move you joystick to its limits. Anyway, you -should keep a hand on your device, in order to avoid it to brake down if +should keep a hand on your device, in order to avoid it to break down if something goes wrong. -At the kernel's compilation: - - Enable IForce/Serial - - Enable Event interface - -Compile the modules, install them. - -You also need inputattach. - -You then need to insert the modules into the following order: -% modprobe joydev -% modprobe serport # Only for serial -% modprobe iforce -% modprobe evdev -% ./inputattach -ifor $2 & # Only for serial -If you are using USB, you don't need the inputattach step. - -Please check that you have all the /dev/input entries needed: -cd /dev -rm js* -mkdir input -mknod input/js0 c 13 0 -mknod input/js1 c 13 1 -mknod input/js2 c 13 2 -mknod input/js3 c 13 3 -ln -s input/js0 js0 -ln -s input/js1 js1 -ln -s input/js2 js2 -ln -s input/js3 js3 - -mknod input/event0 c 13 64 -mknod input/event1 c 13 65 -mknod input/event2 c 13 66 -mknod input/event3 c 13 67 +If you have a serial iforce device, you need to start inputattach. See +joystick.txt for details. 2.1 Does it work ? ~~~~~~~~~~~~~~~~~~ @@ -70,9 +40,9 @@ There is an utility called fftest that w 3. Instructions to the developper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - All interactions are done using the event API. That is, you can use ioctl() +All interactions are done using the event API. That is, you can use ioctl() and write() on /dev/input/eventXX. - This information is subject to change. +This information is subject to change. 3.1 Querying device capabilities ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -86,18 +56,29 @@ int ioctl(int file_descriptor, int reque Returns the features supported by the device. features is a bitfield with the following bits: -- FF_X has an X axis (usually joysticks) -- FF_Y has an Y axis (usually joysticks) -- FF_WHEEL has a wheel (usually sterring wheels) - FF_CONSTANT can render constant force effects -- FF_PERIODIC can render periodic effects (sine, triangle, square...) +- FF_PERIODIC can render periodic effects with the following waveforms: + - FF_SQUARE square waveform + - FF_TRIANGLE triangle waveform + - FF_SINE sine waveform + - FF_SAW_UP sawtooth up waveform + - FF_SAW_DOWN sawtooth down waveform + - FF_CUSTOM custom waveform - FF_RAMP can render ramp effects - FF_SPRING can simulate the presence of a spring -- FF_FRICTION can simulate friction +- FF_FRICTION can simulate friction - FF_DAMPER can simulate damper effects -- FF_RUMBLE rumble effects (normally the only effect supported by rumble - pads) +- FF_RUMBLE rumble effects - FF_INERTIA can simulate inertia +- FF_GAIN gain is adjustable +- FF_AUTOCENTER autocenter is adjustable + +Note: In most cases you should use FF_PERIODIC instead of FF_RUMBLE. All + devices that support FF_RUMBLE support FF_PERIODIC (square, triangle, + sine) and the other way around. + +Note: The exact syntax FF_CUSTOM is undefined for the time being as no driver + supports it yet. int ioctl(int fd, EVIOCGEFFECTS, int *n); @@ -108,7 +89,7 @@ Returns the number of effects the device ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include - + int ioctl(int file_descriptor, int request, struct ff_effect *effect); "request" must be EVIOCSFF. @@ -120,6 +101,9 @@ to the unique id assigned by the driver. some operations (removing an effect, controlling the playback). This if field must be set to -1 by the user in order to tell the driver to allocate a new effect. + +Effects are file descriptor specific. + See for a description of the ff_effect struct. You should also find help in a few sketches, contained in files shape.fig and interactive.fig. You need xfig to visualize these files. @@ -128,8 +112,8 @@ You need xfig to visualize these files. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ int ioctl(int fd, EVIOCRMFF, effect.id); -This makes room for new effects in the device's memory. Please note this won't -stop the effect if it was playing. +This makes room for new effects in the device's memory. Note that this also +stops the effect if it was playing. 3.4 Controlling the playback of effects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -149,22 +133,21 @@ #include play.type = EV_FF; play.code = effect.id; play.value = 3; - + write(fd, (const void*) &play, sizeof(play)); ... /* Stop an effect */ stop.type = EV_FF; stop.code = effect.id; stop.value = 0; - + write(fd, (const void*) &play, sizeof(stop)); 3.5 Setting the gain ~~~~~~~~~~~~~~~~~~~~ Not all devices have the same strength. Therefore, users should set a gain factor depending on how strong they want effects to be. This setting is -persistent across access to the driver, so you should not care about it if -you are writing games, as another utility probably already set this for you. +persistent across access to the driver. /* Set the gain of the device int gain; /* between 0 and 100 */ @@ -204,11 +187,14 @@ type of device, not all parameters can b the direction of an effect cannot be updated with iforce devices. In this case, the driver stops the effect, up-load it, and restart it. +Therefore it is recommended to dynamically change direction while the effect +is playing only when it is ok to restart the effect with a replay count of 1. 3.8 Information about the status of effects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Every time the status of an effect is changed, an event is sent. The values and meanings of the fields of the event are as follows: + struct input_event { /* When the status of the effect changed */ struct timeval time; @@ -225,3 +211,9 @@ struct input_event { FF_STATUS_STOPPED The effect stopped playing FF_STATUS_PLAYING The effect started to play + +NOTE: Status feedback is only supported by iforce driver. If you have + a really good reason to use this, please contact + linux-joystick@atrey.karlin.mff.cuni.cz or anssi.hannula@gmail.com + so that support for it can be added to the rest of the drivers. + diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index ca1967f..003fccc 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt @@ -67,19 +67,19 @@ applicable everywhere (see syntax). - default value: "default" ["if" ] A config option can have any number of default values. If multiple default values are visible, only the first defined one is active. - Default values are not limited to the menu entry, where they are - defined, this means the default can be defined somewhere else or be + Default values are not limited to the menu entry where they are + defined. This means the default can be defined somewhere else or be overridden by an earlier definition. The default value is only assigned to the config symbol if no other value was set by the user (via the input prompt above). If an input prompt is visible the default value is presented to the user and can be overridden by him. - Optionally dependencies only for this default value can be added with + Optionally, dependencies only for this default value can be added with "if". - dependencies: "depends on"/"requires" This defines a dependency for this menu entry. If multiple - dependencies are defined they are connected with '&&'. Dependencies + dependencies are defined, they are connected with '&&'. Dependencies are applied to all other options within this menu entry (which also accept an "if" expression), so these two examples are equivalent: @@ -153,7 +153,7 @@ Nonconstant symbols are the most common 'config' statement. Nonconstant symbols consist entirely of alphanumeric characters or underscores. Constant symbols are only part of expressions. Constant symbols are -always surrounded by single or double quotes. Within the quote any +always surrounded by single or double quotes. Within the quote, any other character is allowed and the quotes can be escaped using '\'. Menu structure @@ -237,7 +237,7 @@ choices: "endchoice" -This defines a choice group and accepts any of above attributes as +This defines a choice group and accepts any of the above attributes as options. A choice can only be of type bool or tristate, while a boolean choice only allows a single config entry to be selected, a tristate choice also allows any number of config entries to be set to 'm'. This diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 0706699..e2cbd59 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -22,7 +22,7 @@ This document describes the Linux kernel === 4 Host Program support --- 4.1 Simple Host Program --- 4.2 Composite Host Programs - --- 4.3 Defining shared libraries + --- 4.3 Defining shared libraries --- 4.4 Using C++ for host programs --- 4.5 Controlling compiler options for host programs --- 4.6 When host programs are actually built @@ -69,7 +69,7 @@ architecture-specific information to the Each subdirectory has a kbuild Makefile which carries out the commands passed down from above. The kbuild Makefile uses information from the -.config file to construct various file lists used by kbuild to build +.config file to construct various file lists used by kbuild to build any built-in or modular targets. scripts/Makefile.* contains all the definitions/rules etc. that @@ -86,7 +86,7 @@ any kernel Makefiles (or any other sourc *Normal developers* are people who work on features such as device drivers, file systems, and network protocols. These people need to -maintain the kbuild Makefiles for the subsystem that they are +maintain the kbuild Makefiles for the subsystem they are working on. In order to do this effectively, they need some overall knowledge about the kernel Makefiles, plus detailed knowledge about the public interface for kbuild. @@ -104,10 +104,10 @@ This document is aimed towards normal de === 3 The kbuild files Most Makefiles within the kernel are kbuild Makefiles that use the -kbuild infrastructure. This chapter introduce the syntax used in the +kbuild infrastructure. This chapter introduces the syntax used in the kbuild makefiles. The preferred name for the kbuild files are 'Makefile' but 'Kbuild' can -be used and if both a 'Makefile' and a 'Kbuild' file exists then the 'Kbuild' +be used and if both a 'Makefile' and a 'Kbuild' file exists, then the 'Kbuild' file will be used. Section 3.1 "Goal definitions" is a quick intro, further chapters provide @@ -124,7 +124,7 @@ more details, with real examples. Example: obj-y += foo.o - This tell kbuild that there is one object in that directory named + This tell kbuild that there is one object in that directory, named foo.o. foo.o will be built from foo.c or foo.S. If foo.o shall be built as a module, the variable obj-m is used. @@ -140,7 +140,7 @@ more details, with real examples. --- 3.2 Built-in object goals - obj-y The kbuild Makefile specifies object files for vmlinux - in the lists $(obj-y). These lists depend on the kernel + in the $(obj-y) lists. These lists depend on the kernel configuration. Kbuild compiles all the $(obj-y) files. It then calls @@ -154,8 +154,8 @@ more details, with real examples. Link order is significant, because certain functions (module_init() / __initcall) will be called during boot in the order they appear. So keep in mind that changing the link - order may e.g. change the order in which your SCSI - controllers are detected, and thus you disks are renumbered. + order may e.g. change the order in which your SCSI + controllers are detected, and thus your disks are renumbered. Example: #drivers/isdn/i4l/Makefile @@ -203,11 +203,11 @@ more details, with real examples. Example: #fs/ext2/Makefile obj-$(CONFIG_EXT2_FS) += ext2.o - ext2-y := balloc.o bitmap.o + ext2-y := balloc.o bitmap.o ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o - - In this example xattr.o is only part of the composite object - ext2.o, if $(CONFIG_EXT2_FS_XATTR) evaluates to 'y'. + + In this example, xattr.o is only part of the composite object + ext2.o if $(CONFIG_EXT2_FS_XATTR) evaluates to 'y'. Note: Of course, when you are building objects into the kernel, the syntax above will also work. So, if you have CONFIG_EXT2_FS=y, @@ -221,16 +221,16 @@ more details, with real examples. --- 3.5 Library file goals - lib-y - Objects listed with obj-* are used for modules or + Objects listed with obj-* are used for modules, or combined in a built-in.o for that specific directory. There is also the possibility to list objects that will be included in a library, lib.a. All objects listed with lib-y are combined in a single library for that directory. - Objects that are listed in obj-y and additional listed in + Objects that are listed in obj-y and additionaly listed in lib-y will not be included in the library, since they will anyway be accessible. - For consistency objects listed in lib-m will be included in lib.a. + For consistency, objects listed in lib-m will be included in lib.a. Note that the same kbuild makefile may list files to be built-in and to be part of a library. Therefore the same directory @@ -241,11 +241,11 @@ more details, with real examples. lib-y := checksum.o delay.o This will create a library lib.a based on checksum.o and delay.o. - For kbuild to actually recognize that there is a lib.a being build + For kbuild to actually recognize that there is a lib.a being built, the directory shall be listed in libs-y. See also "6.3 List directories to visit when descending". - - Usage of lib-y is normally restricted to lib/ and arch/*/lib. + + Use of lib-y is normally restricted to lib/ and arch/*/lib. --- 3.6 Descending down in directories @@ -255,7 +255,7 @@ more details, with real examples. invoke make recursively in subdirectories, provided you let it know of them. - To do so obj-y and obj-m are used. + To do so, obj-y and obj-m are used. ext2 lives in a separate directory, and the Makefile present in fs/ tells kbuild to descend down using the following assignment. @@ -353,8 +353,8 @@ more details, with real examples. Special rules are used when the kbuild infrastructure does not provide the required support. A typical example is header files generated during the build process. - Another example is the architecture specific Makefiles which - needs special rules to prepare boot images etc. + Another example are the architecture specific Makefiles which + need special rules to prepare boot images etc. Special rules are written as normal Make rules. Kbuild is not executing in the directory where the Makefile is @@ -387,28 +387,28 @@ more details, with real examples. --- 3.11 $(CC) support functions - The kernel may be build with several different versions of + The kernel may be built with several different versions of $(CC), each supporting a unique set of features and options. kbuild provide basic support to check for valid options for $(CC). $(CC) is useally the gcc compiler, but other alternatives are available. as-option - as-option is used to check if $(CC) when used to compile - assembler (*.S) files supports the given option. An optional - second option may be specified if first option are not supported. + as-option is used to check if $(CC) -- when used to compile + assembler (*.S) files -- supports the given option. An optional + second option may be specified if the first option is not supported. Example: #arch/sh/Makefile cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) - In the above example cflags-y will be assinged the the option + In the above example, cflags-y will be assigned the option -Wa$(comma)-isa=$(isa-y) if it is supported by $(CC). The second argument is optional, and if supplied will be used if first argument is not supported. ld-option - ld-option is used to check if $(CC) when used to link object files + ld-option is used to check if $(CC) when used to link object files supports the given option. An optional second option may be specified if first option are not supported. @@ -421,8 +421,13 @@ more details, with real examples. The second argument is optional, and if supplied will be used if first argument is not supported. + as-instr + as-instr checks if the assembler reports a specific instruction + and then outputs either option1 or option2 + C escapes are supported in the test instruction + cc-option - cc-option is used to check if $(CC) support a given option, and not + cc-option is used to check if $(CC) supports a given option, and not supported to use an optional second option. Example: @@ -430,12 +435,12 @@ more details, with real examples. cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586) In the above example cflags-y will be assigned the option - -march=pentium-mmx if supported by $(CC), otherwise -march-i586. - The second argument to cc-option is optional, and if omitted + -march=pentium-mmx if supported by $(CC), otherwise -march=i586. + The second argument to cc-option is optional, and if omitted, cflags-y will be assigned no value if first option is not supported. cc-option-yn - cc-option-yn is used to check if gcc supports a given option + cc-option-yn is used to check if gcc supports a given option and return 'y' if supported, otherwise 'n'. Example: @@ -443,32 +448,33 @@ more details, with real examples. biarch := $(call cc-option-yn, -m32) aflags-$(biarch) += -a32 cflags-$(biarch) += -m32 - - In the above example $(biarch) is set to y if $(CC) supports the -m32 - option. When $(biarch) equals to y the expanded variables $(aflags-y) - and $(cflags-y) will be assigned the values -a32 and -m32. + + In the above example, $(biarch) is set to y if $(CC) supports the -m32 + option. When $(biarch) equals 'y', the expanded variables $(aflags-y) + and $(cflags-y) will be assigned the values -a32 and -m32, + respectively. cc-option-align - gcc version >= 3.0 shifted type of options used to speify - alignment of functions, loops etc. $(cc-option-align) whrn used - as prefix to the align options will select the right prefix: + gcc versions >= 3.0 changed the type of options used to specify + alignment of functions, loops etc. $(cc-option-align), when used + as prefix to the align options, will select the right prefix: gcc < 3.00 cc-option-align = -malign gcc >= 3.00 cc-option-align = -falign - + Example: CFLAGS += $(cc-option-align)-functions=4 - In the above example the option -falign-functions=4 is used for - gcc >= 3.00. For gcc < 3.00 -malign-functions=4 is used. - + In the above example, the option -falign-functions=4 is used for + gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used. + cc-version - cc-version return a numerical version of the $(CC) compiler version. + cc-version returns a numerical version of the $(CC) compiler version. The format is where both are two digits. So for example gcc 3.41 would return 0341. cc-version is useful when a specific $(CC) version is faulty in one - area, for example the -mregparm=3 were broken in some gcc version + area, for example -mregparm=3 was broken in some gcc versions even though the option was accepted by gcc. Example: @@ -477,20 +483,20 @@ more details, with real examples. if [ $(call cc-version) -ge 0300 ] ; then \ echo "-mregparm=3"; fi ;) - In the above example -mregparm=3 is only used for gcc version greater + In the above example, -mregparm=3 is only used for gcc version greater than or equal to gcc 3.0. cc-ifversion - cc-ifversion test the version of $(CC) and equals last argument if + cc-ifversion tests the version of $(CC) and equals last argument if version expression is true. Example: #fs/reiserfs/Makefile EXTRA_CFLAGS := $(call cc-ifversion, -lt, 0402, -O1) - In this example EXTRA_CFLAGS will be assigned the value -O1 if the + In this example, EXTRA_CFLAGS will be assigned the value -O1 if the $(CC) version is less than 4.2. - cc-ifversion takes all the shell operators: + cc-ifversion takes all the shell operators: -eq, -ne, -lt, -le, -gt, and -ge The third parameter may be a text as in this example, but it may also be an expanded variable or a macro. @@ -506,7 +512,7 @@ The first step is to tell kbuild that a done utilising the variable hostprogs-y. The second step is to add an explicit dependency to the executable. -This can be done in two ways. Either add the dependency in a rule, +This can be done in two ways. Either add the dependency in a rule, or utilise the variable $(always). Both possibilities are described in the following. @@ -523,28 +529,28 @@ Both possibilities are described in the Kbuild assumes in the above example that bin2hex is made from a single c-source file named bin2hex.c located in the same directory as the Makefile. - + --- 4.2 Composite Host Programs Host programs can be made up based on composite objects. The syntax used to define composite objects for host programs is similar to the syntax used for kernel objects. - $(-objs) list all objects used to link the final + $(-objs) lists all objects used to link the final executable. Example: #scripts/lxdialog/Makefile - hostprogs-y := lxdialog + hostprogs-y := lxdialog lxdialog-objs := checklist.o lxdialog.o Objects with extension .o are compiled from the corresponding .c - files. In the above example checklist.c is compiled to checklist.o + files. In the above example, checklist.c is compiled to checklist.o and lxdialog.c is compiled to lxdialog.o. - Finally the two .o files are linked to the executable, lxdialog. + Finally, the two .o files are linked to the executable, lxdialog. Note: The syntax -y is not permitted for host-programs. ---- 4.3 Defining shared libraries - +--- 4.3 Defining shared libraries + Objects with extension .so are considered shared libraries, and will be compiled as position independent objects. Kbuild provides support for shared libraries, but the usage @@ -557,7 +563,7 @@ Both possibilities are described in the hostprogs-y := conf conf-objs := conf.o libkconfig.so libkconfig-objs := expr.o type.o - + Shared libraries always require a corresponding -objs line, and in the example above the shared library libkconfig is composed by the two objects expr.o and type.o. @@ -578,7 +584,7 @@ Both possibilities are described in the In the example above the executable is composed of the C++ file qconf.cc - identified by $(qconf-cxxobjs). - + If qconf is composed by a mixture of .c and .cc files, then an additional line can be used to identify this. @@ -587,34 +593,35 @@ Both possibilities are described in the hostprogs-y := qconf qconf-cxxobjs := qconf.o qconf-objs := check.o - + --- 4.5 Controlling compiler options for host programs When compiling host programs, it is possible to set specific flags. The programs will always be compiled utilising $(HOSTCC) passed the options specified in $(HOSTCFLAGS). To set flags that will take effect for all host programs created - in that Makefile use the variable HOST_EXTRACFLAGS. + in that Makefile, use the variable HOST_EXTRACFLAGS. Example: #scripts/lxdialog/Makefile HOST_EXTRACFLAGS += -I/usr/include/ncurses - + To set specific flags for a single file the following construction is used: Example: #arch/ppc64/boot/Makefile HOSTCFLAGS_piggyback.o := -DKERNELBASE=$(KERNELBASE) - + It is also possible to specify additional options to the linker. - + Example: #scripts/kconfig/Makefile HOSTLOADLIBES_qconf := -L$(QTDIR)/lib - When linking qconf it will be passed the extra option "-L$(QTDIR)/lib". - + When linking qconf, it will be passed the extra option + "-L$(QTDIR)/lib". + --- 4.6 When host programs are actually built Kbuild will only build host-programs when they are referenced @@ -629,7 +636,7 @@ Both possibilities are described in the $(obj)/devlist.h: $(src)/pci.ids $(obj)/gen-devlist ( cd $(obj); ./gen-devlist ) < $< - The target $(obj)/devlist.h will not be built before + The target $(obj)/devlist.h will not be built before $(obj)/gen-devlist is updated. Note that references to the host programs in special rules must be prefixed with $(obj). @@ -648,7 +655,7 @@ Both possibilities are described in the --- 4.7 Using hostprogs-$(CONFIG_FOO) - A typcal pattern in a Kbuild file lok like this: + A typical pattern in a Kbuild file looks like this: Example: #scripts/Makefile @@ -656,13 +663,13 @@ Both possibilities are described in the Kbuild knows about both 'y' for built-in and 'm' for module. So if a config symbol evaluate to 'm', kbuild will still build - the binary. In other words Kbuild handle hostprogs-m exactly - like hostprogs-y. But only hostprogs-y is recommend used - when no CONFIG symbol are involved. + the binary. In other words, Kbuild handles hostprogs-m exactly + like hostprogs-y. But only hostprogs-y is recommended to be used + when no CONFIG symbols are involved. === 5 Kbuild clean infrastructure -"make clean" deletes most generated files in the src tree where the kernel +"make clean" deletes most generated files in the obj tree where the kernel is compiled. This includes generated files such as host programs. Kbuild knows targets listed in $(hostprogs-y), $(hostprogs-m), $(always), $(extra-y) and $(targets). They are all deleted during "make clean". @@ -680,7 +687,8 @@ When executing "make clean", the two fil be deleted. Kbuild will assume files to be in same relative directory as the Makefile except if an absolute path is specified (path starting with '/'). -To delete a directory hirachy use: +To delete a directory hierarchy use: + Example: #scripts/package/Makefile clean-dirs := $(objtree)/debian/ @@ -723,29 +731,29 @@ be visited during "make clean". The top level Makefile sets up the environment and does the preparation, before starting to descend down in the individual directories. -The top level makefile contains the generic part, whereas the -arch/$(ARCH)/Makefile contains what is required to set-up kbuild -to the said architecture. -To do so arch/$(ARCH)/Makefile sets a number of variables, and defines +The top level makefile contains the generic part, whereas +arch/$(ARCH)/Makefile contains what is required to set up kbuild +for said architecture. +To do so, arch/$(ARCH)/Makefile sets up a number of variables and defines a few targets. -When kbuild executes the following steps are followed (roughly): -1) Configuration of the kernel => produced .config +When kbuild executes, the following steps are followed (roughly): +1) Configuration of the kernel => produce .config 2) Store kernel version in include/linux/version.h 3) Symlink include/asm to include/asm-$(ARCH) 4) Updating all other prerequisites to the target prepare: - Additional prerequisites are specified in arch/$(ARCH)/Makefile 5) Recursively descend down in all directories listed in init-* core* drivers-* net-* libs-* and build all targets. - - The value of the above variables are extended in arch/$(ARCH)/Makefile. -6) All object files are then linked and the resulting file vmlinux is - located at the root of the src tree. + - The values of the above variables are expanded in arch/$(ARCH)/Makefile. +6) All object files are then linked and the resulting file vmlinux is + located at the root of the obj tree. The very first objects linked are listed in head-y, assigned by arch/$(ARCH)/Makefile. -7) Finally the architecture specific part does any required post processing +7) Finally, the architecture specific part does any required post processing and builds the final bootimage. - This includes building boot records - - Preparing initrd images and the like + - Preparing initrd images and thelike --- 6.1 Set variables to tweak the build to the architecture @@ -760,7 +768,7 @@ When kbuild executes the following steps LDFLAGS := -m elf_s390 Note: EXTRA_LDFLAGS and LDFLAGS_$@ can be used to further customise the flags used. See chapter 7. - + LDFLAGS_MODULE Options for $(LD) when linking modules LDFLAGS_MODULE is used to set specific flags for $(LD) when @@ -770,7 +778,7 @@ When kbuild executes the following steps LDFLAGS_vmlinux Options for $(LD) when linking vmlinux LDFLAGS_vmlinux is used to specify additional flags to pass to - the linker when linking the final vmlinux. + the linker when linking the final vmlinux image. LDFLAGS_vmlinux uses the LDFLAGS_$@ support. Example: @@ -780,7 +788,7 @@ When kbuild executes the following steps OBJCOPYFLAGS objcopy flags When $(call if_changed,objcopy) is used to translate a .o file, - then the flags specified in OBJCOPYFLAGS will be used. + the flags specified in OBJCOPYFLAGS will be used. $(call if_changed,objcopy) is often used to generate raw binaries on vmlinux. @@ -792,7 +800,7 @@ When kbuild executes the following steps $(obj)/image: vmlinux FORCE $(call if_changed,objcopy) - In this example the binary $(obj)/image is a binary version of + In this example, the binary $(obj)/image is a binary version of vmlinux. The usage of $(call if_changed,xxx) will be described later. AFLAGS $(AS) assembler flags @@ -809,7 +817,7 @@ When kbuild executes the following steps Default value - see top level Makefile Append or modify as required per architecture. - Often the CFLAGS variable depends on the configuration. + Often, the CFLAGS variable depends on the configuration. Example: #arch/i386/Makefile @@ -830,7 +838,7 @@ When kbuild executes the following steps ... - The first examples utilises the trick that a config option expands + The first example utilises the trick that a config option expands to 'y' when selected. CFLAGS_KERNEL $(CC) options specific for built-in @@ -843,18 +851,18 @@ When kbuild executes the following steps $(CFLAGS_MODULE) contains extra C compiler flags used to compile code for loadable kernel modules. - + --- 6.2 Add prerequisites to archprepare: - The archprepare: rule is used to list prerequisites that needs to be + The archprepare: rule is used to list prerequisites that need to be built before starting to descend down in the subdirectories. - This is usual header files containing assembler constants. + This is usually used for header files containing assembler constants. Example: #arch/arm/Makefile archprepare: maketools - In this example the file target maketools will be processed + In this example, the file target maketools will be processed before descending down in the subdirectories. See also chapter XXX-TODO that describe how kbuild supports generating offset header files. @@ -867,18 +875,19 @@ When kbuild executes the following steps corresponding arch-specific section for modules; the module-building machinery is all architecture-independent. - + head-y, init-y, core-y, libs-y, drivers-y, net-y - $(head-y) list objects to be linked first in vmlinux. - $(libs-y) list directories where a lib.a archive can be located. - The rest list directories where a built-in.o object file can be located. + $(head-y) lists objects to be linked first in vmlinux. + $(libs-y) lists directories where a lib.a archive can be located. + The rest lists directories where a built-in.o object file can be + located. $(init-y) objects will be located after $(head-y). Then the rest follows in this order: $(core-y), $(libs-y), $(drivers-y) and $(net-y). - The top level Makefile define values for all generic directories, + The top level Makefile defines values for all generic directories, and arch/$(ARCH)/Makefile only adds architecture specific directories. Example: @@ -915,27 +924,27 @@ When kbuild executes the following steps "$(Q)$(MAKE) $(build)=" is the recommended way to invoke make in a subdirectory. - There are no rules for naming of the architecture specific targets, + There are no rules for naming architecture specific targets, but executing "make help" will list all relevant targets. - To support this $(archhelp) must be defined. + To support this, $(archhelp) must be defined. Example: #arch/i386/Makefile define archhelp echo '* bzImage - Image (arch/$(ARCH)/boot/bzImage)' - endef + endif When make is executed without arguments, the first goal encountered will be built. In the top level Makefile the first goal present is all:. - An architecture shall always per default build a bootable image. - In "make help" the default goal is highlighted with a '*'. + An architecture shall always, per default, build a bootable image. + In "make help", the default goal is highlighted with a '*'. Add a new prerequisite to all: to select a default goal different from vmlinux. Example: #arch/i386/Makefile - all: bzImage + all: bzImage When "make" is executed without arguments, bzImage will be built. @@ -955,10 +964,10 @@ When kbuild executes the following steps #arch/i386/kernel/Makefile extra-y := head.o init_task.o - In this example extra-y is used to list object files that + In this example, extra-y is used to list object files that shall be built, but shall not be linked as part of built-in.o. - + --- 6.6 Commands useful for building a boot image Kbuild provides a few macros that are useful when building a @@ -972,8 +981,8 @@ When kbuild executes the following steps target: source(s) FORCE $(call if_changed,ld/objcopy/gzip) - When the rule is evaluated it is checked to see if any files - needs an update, or the commandline has changed since last + When the rule is evaluated, it is checked to see if any files + needs an update, or the command line has changed since the last invocation. The latter will force a rebuild if any options to the executable have changed. Any target that utilises if_changed must be listed in $(targets), @@ -991,8 +1000,8 @@ When kbuild executes the following steps #WRONG!# $(call if_changed, ld/objcopy/gzip) ld - Link target. Often LDFLAGS_$@ is used to set specific options to ld. - + Link target. Often, LDFLAGS_$@ is used to set specific options to ld. + objcopy Copy binary. Uses OBJCOPYFLAGS usually specified in arch/$(ARCH)/Makefile. @@ -1010,10 +1019,10 @@ When kbuild executes the following steps $(obj)/setup $(obj)/bootsect: %: %.o FORCE $(call if_changed,ld) - In this example there are two possible targets, requiring different - options to the linker. the linker options are specified using the + In this example, there are two possible targets, requiring different + options to the linker. The linker options are specified using the LDFLAGS_$@ syntax - one for each potential target. - $(targets) are assinged all potential targets, herby kbuild knows + $(targets) are assinged all potential targets, by which kbuild knows the targets and will: 1) check for commandline changes 2) delete target during make clean @@ -1027,7 +1036,7 @@ When kbuild executes the following steps --- 6.7 Custom kbuild commands - When kbuild is executing with KBUILD_VERBOSE=0 then only a shorthand + When kbuild is executing with KBUILD_VERBOSE=0, then only a shorthand of a command is normally displayed. To enable this behaviour for custom commands kbuild requires two variables to be set: @@ -1045,34 +1054,34 @@ When kbuild executes the following steps $(call if_changed,image) @echo 'Kernel: $@ is ready' - When updating the $(obj)/bzImage target the line: + When updating the $(obj)/bzImage target, the line BUILD arch/i386/boot/bzImage will be displayed with "make KBUILD_VERBOSE=0". - + --- 6.8 Preprocessing linker scripts - When the vmlinux image is build the linker script: + When the vmlinux image is built, the linker script arch/$(ARCH)/kernel/vmlinux.lds is used. The script is a preprocessed variant of the file vmlinux.lds.S located in the same directory. - kbuild knows .lds file and includes a rule *lds.S -> *lds. - + kbuild knows .lds files and includes a rule *lds.S -> *lds. + Example: #arch/i386/kernel/Makefile always := vmlinux.lds - + #Makefile export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) - - The assigment to $(always) is used to tell kbuild to build the - target: vmlinux.lds. - The assignment to $(CPPFLAGS_vmlinux.lds) tell kbuild to use the + + The assignment to $(always) is used to tell kbuild to build the + target vmlinux.lds. + The assignment to $(CPPFLAGS_vmlinux.lds) tells kbuild to use the specified options when building the target vmlinux.lds. - - When building the *.lds target kbuild used the variakles: + + When building the *.lds target, kbuild uses the variables: CPPFLAGS : Set in top-level Makefile EXTRA_CPPFLAGS : May be set in the kbuild makefile CPPFLAGS_$(@F) : Target specific flags. @@ -1147,7 +1156,7 @@ The top Makefile exports the following v === 8 Makefile language -The kernel Makefiles are designed to run with GNU Make. The Makefiles +The kernel Makefiles are designed to be run with GNU Make. The Makefiles use only the documented features of GNU Make, but they do use many GNU extensions. @@ -1169,10 +1178,13 @@ is the right choice. Original version made by Michael Elizabeth Chastain, Updates by Kai Germaschewski Updates by Sam Ravnborg +Language QA by Jan Engelhardt === 10 TODO -- Describe how kbuild support shipped files with _shipped. +- Describe how kbuild supports shipped files with _shipped. - Generating offset header files. - Add more variables to section 7? + + diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt index 61fc079..2e7702e 100644 --- a/Documentation/kbuild/modules.txt +++ b/Documentation/kbuild/modules.txt @@ -1,7 +1,7 @@ In this document you will find information about: - how to build external modules -- how to make your module use kbuild infrastructure +- how to make your module use the kbuild infrastructure - how kbuild will install a kernel - how to install modules in a non-standard location @@ -24,7 +24,7 @@ In this document you will find informati --- 6.1 INSTALL_MOD_PATH --- 6.2 INSTALL_MOD_DIR === 7. Module versioning & Module.symvers - --- 7.1 Symbols fron the kernel (vmlinux + modules) + --- 7.1 Symbols from the kernel (vmlinux + modules) --- 7.2 Symbols and external modules --- 7.3 Symbols from another external module === 8. Tips & Tricks @@ -36,13 +36,13 @@ In this document you will find informati kbuild includes functionality for building modules both within the kernel source tree and outside the kernel source tree. -The latter is usually referred to as external modules and is used -both during development and for modules that are not planned to be -included in the kernel tree. +The latter is usually referred to as external or "out-of-tree" +modules and is used both during development and for modules that +are not planned to be included in the kernel tree. What is covered within this file is mainly information to authors -of modules. The author of an external modules should supply -a makefile that hides most of the complexity so one only has to type +of modules. The author of an external module should supply +a makefile that hides most of the complexity, so one only has to type 'make' to build the module. A complete example will be present in chapter 4, "Creating a kbuild file for an external module". @@ -63,14 +63,15 @@ when building an external module. For the running kernel use: make -C /lib/modules/`uname -r`/build M=`pwd` - For the above command to succeed the kernel must have been built with - modules enabled. + For the above command to succeed, the kernel must have been + built with modules enabled. To install the modules that were just built: make -C M=`pwd` modules_install - More complex examples later, the above should get you going. + More complex examples will be shown later, the above should + be enough to get you started. --- 2.2 Available targets @@ -89,13 +90,13 @@ when building an external module. Same functionality as if no target was specified. See description above. - make -C $KDIR M=$PWD modules_install + make -C $KDIR M=`pwd` modules_install Install the external module(s). Installation default is in /lib/modules//extra, but may be prefixed with INSTALL_MOD_PATH - see separate chapter. - make -C $KDIR M=$PWD clean + make -C $KDIR M=`pwd` clean Remove all generated files for the module - the kernel source directory is not modified. @@ -129,29 +130,28 @@ when building an external module. To make sure the kernel contains the information required to build external modules the target 'modules_prepare' must be used. - 'module_prepare' solely exists as a simple way to prepare - a kernel for building external modules. + 'module_prepare' exists solely as a simple way to prepare + a kernel source tree for building external modules. Note: modules_prepare will not build Module.symvers even if - CONFIG_MODULEVERSIONING is set. - Therefore a full kernel build needs to be executed to make - module versioning work. + CONFIG_MODULEVERSIONING is set. Therefore a full kernel build + needs to be executed to make module versioning work. --- 2.5 Building separate files for a module - It is possible to build single files which is part of a module. - This works equal for the kernel, a module and even for external - modules. + It is possible to build single files which are part of a module. + This works equally well for the kernel, a module and even for + external modules. Examples (module foo.ko, consist of bar.o, baz.o): make -C $KDIR M=`pwd` bar.lst make -C $KDIR M=`pwd` bar.o make -C $KDIR M=`pwd` foo.ko make -C $KDIR M=`pwd` / - + === 3. Example commands This example shows the actual commands to be executed when building an external module for the currently running kernel. -In the example below the distribution is supposed to use the +In the example below, the distribution is supposed to use the facility to locate output files for a kernel compile in a different directory than the kernel source - but the examples will also work when the source and the output files are mixed in the same directory. @@ -170,14 +170,14 @@ the following commands to build the modu O=/lib/modules/`uname-r`/build \ M=`pwd` -Then to install the module use the following command: +Then, to install the module use the following command: make -C /usr/src/`uname -r`/source \ O=/lib/modules/`uname-r`/build \ M=`pwd` \ modules_install -If one looks closely you will see that this is the same commands as +If you look closely you will see that this is the same command as listed before - with the directories spelled out. The above are rather long commands, and the following chapter @@ -230,7 +230,7 @@ following files: endif - In example 1 the check for KERNELRELEASE is used to separate + In example 1, the check for KERNELRELEASE is used to separate the two parts of the Makefile. kbuild will only see the two assignments whereas make will see everything except the two kbuild assignments. @@ -255,7 +255,7 @@ following files: echo "X" > 8123_bin_shipped - In example 2 we are down to two fairly simple files and for simple + In example 2, we are down to two fairly simple files and for simple files as used in this example the split is questionable. But some external modules use Makefiles of several hundred lines and here it really pays off to separate the kbuild part from the rest. @@ -282,9 +282,9 @@ following files: endif - The trick here is to include the Kbuild file from Makefile so - if an older version of kbuild picks up the Makefile the Kbuild - file will be included. + The trick here is to include the Kbuild file from Makefile, so + if an older version of kbuild picks up the Makefile, the Kbuild + file will be included. --- 4.2 Binary blobs included in a module @@ -301,18 +301,19 @@ following files: obj-m := 8123.o 8123-y := 8123_if.o 8123_pci.o 8123_bin.o - In example 4 there is no distinction between the ordinary .c/.h files + In example 4, there is no distinction between the ordinary .c/.h files and the binary file. But kbuild will pick up different rules to create the .o file. === 5. Include files -Include files are a necessity when a .c file uses something from another .c -files (not strictly in the sense of .c but if good programming practice is -used). Any module that consist of more than one .c file will have a .h file -for one of the .c files. -- If the .h file only describes a module internal interface then the .h file +Include files are a necessity when a .c file uses something from other .c +files (not strictly in the sense of C, but if good programming practice is +used). Any module that consists of more than one .c file will have a .h file +for one of the .c files. + +- If the .h file only describes a module internal interface, then the .h file shall be placed in the same directory as the .c files. - If the .h files describe an interface used by other parts of the kernel located in different directories, the .h files shall be located in @@ -323,11 +324,11 @@ under include/ such as include/scsi. Ano .h files which are located under include/asm-$(ARCH)/*. External modules have a tendency to locate include files in a separate include/ -directory and therefore needs to deal with this in their kbuild file. +directory and therefore need to deal with this in their kbuild file. --- 5.1 How to include files from the kernel include dir - When a module needs to include a file from include/linux/ then one + When a module needs to include a file from include/linux/, then one just uses: #include @@ -348,7 +349,7 @@ directory and therefore needs to deal wi The trick here is to use either EXTRA_CFLAGS (take effect for all .c files) or CFLAGS_$F.o (take effect only for a single file). - In our example if we move 8123_if.h to a subdirectory named include/ + In our example, if we move 8123_if.h to a subdirectory named include/ the resulting Kbuild file would look like: --> filename: Kbuild @@ -362,19 +363,19 @@ directory and therefore needs to deal wi --- 5.3 External modules using several directories - If an external module does not follow the usual kernel style but - decide to spread files over several directories then kbuild can - support this too. + If an external module does not follow the usual kernel style, but + decides to spread files over several directories, then kbuild can + handle this too. Consider the following example: - + | +- src/complex_main.c | +- hal/hardwareif.c | +- hal/include/hardwareif.h +- include/complex.h - - To build a single module named complex.ko we then need the following + + To build a single module named complex.ko, we then need the following kbuild file: Kbuild: @@ -387,12 +388,12 @@ directory and therefore needs to deal wi kbuild knows how to handle .o files located in another directory - - although this is NOT reccommended practice. The syntax is to specify + although this is NOT recommended practice. The syntax is to specify the directory relative to the directory where the Kbuild file is located. - To find the .h files we have to explicitly tell kbuild where to look - for the .h files. When kbuild executes current directory is always + To find the .h files, we have to explicitly tell kbuild where to look + for the .h files. When kbuild executes, the current directory is always the root of the kernel tree (argument to -C) and therefore we have to tell kbuild how to find the .h files using absolute paths. $(src) will specify the absolute path to the directory where the @@ -412,7 +413,7 @@ External modules are installed in the di --- 6.1 INSTALL_MOD_PATH - Above are the default directories, but as always some level of + Above are the default directories, but as always, some level of customization is possible. One can prefix the path using the variable INSTALL_MOD_PATH: @@ -420,17 +421,17 @@ External modules are installed in the di => Install dir: /frodo/lib/modules/$(KERNELRELEASE)/kernel INSTALL_MOD_PATH may be set as an ordinary shell variable or as in the - example above be specified on the command line when calling make. + example above, can be specified on the command line when calling make. INSTALL_MOD_PATH has effect both when installing modules included in the kernel as well as when installing external modules. --- 6.2 INSTALL_MOD_DIR - When installing external modules they are default installed in a + When installing external modules they are by default installed to a directory under /lib/modules/$(KERNELRELEASE)/extra, but one may wish to locate modules for a specific functionality in a separate - directory. For this purpose one can use INSTALL_MOD_DIR to specify an - alternative name than 'extra'. + directory. For this purpose, one can use INSTALL_MOD_DIR to specify an + alternative name to 'extra'. $ make INSTALL_MOD_DIR=gandalf -C KERNELDIR \ M=`pwd` modules_install @@ -444,16 +445,16 @@ Module versioning is enabled by the CONF Module versioning is used as a simple ABI consistency check. The Module versioning creates a CRC value of the full prototype for an exported symbol and when a module is loaded/used then the CRC values contained in the kernel are -compared with similar values in the module. If they are not equal then the +compared with similar values in the module. If they are not equal, then the kernel refuses to load the module. Module.symvers contains a list of all exported symbols from a kernel build. --- 7.1 Symbols fron the kernel (vmlinux + modules) - During a kernel build a file named Module.symvers will be generated. + During a kernel build, a file named Module.symvers will be generated. Module.symvers contains all exported symbols from the kernel and - compiled modules. For each symbols the corresponding CRC value + compiled modules. For each symbols, the corresponding CRC value is stored too. The syntax of the Module.symvers file is: @@ -461,27 +462,27 @@ Module.symvers contains a list of all ex Sample: 0x2d036834 scsi_remove_host drivers/scsi/scsi_mod - For a kernel build without CONFIG_MODVERSIONING enabled the crc + For a kernel build without CONFIG_MODVERSIONS enabled, the crc would read: 0x00000000 - Module.symvers serve two purposes. - 1) It list all exported symbols both from vmlinux and all modules - 2) It list CRC if CONFIG_MODVERSION is enabled + Module.symvers serves two purposes: + 1) It lists all exported symbols both from vmlinux and all modules + 2) It lists the CRC if CONFIG_MODVERSIONS is enabled --- 7.2 Symbols and external modules - When building an external module the build system needs access to + When building an external module, the build system needs access to the symbols from the kernel to check if all external symbols are defined. This is done in the MODPOST step and to obtain all - symbols modpost reads Module.symvers from the kernel. + symbols, modpost reads Module.symvers from the kernel. If a Module.symvers file is present in the directory where - the external module is being build this file will be read too. - During the MODPOST step a new Module.symvers file will be written - containing all exported symbols that was not defined in the kernel. - + the external module is being built, this file will be read too. + During the MODPOST step, a new Module.symvers file will be written + containing all exported symbols that were not defined in the kernel. + --- 7.3 Symbols from another external module - Sometimes one external module uses exported symbols from another + Sometimes, an external module uses exported symbols from another external module. Kbuild needs to have full knowledge on all symbols to avoid spitting out warnings about undefined symbols. Two solutions exist to let kbuild know all symbols of more than @@ -490,15 +491,15 @@ Module.symvers contains a list of all ex impractical in certain situations. Use a top-level Kbuild file - If you have two modules: 'foo', 'bar' and 'foo' needs symbols - from 'bar' then one can use a common top-level kbuild file so - both modules are compiled in same build. + If you have two modules: 'foo' and 'bar', and 'foo' needs + symbols from 'bar', then one can use a common top-level kbuild + file so both modules are compiled in same build. Consider following directory layout: ./foo/ <= contains the foo module ./bar/ <= contains the bar module The top-level Kbuild file would then look like: - + #./Kbuild: (this file may also be named Makefile) obj-y := foo/ bar/ @@ -509,23 +510,23 @@ Module.symvers contains a list of all ex knowledge on symbols from both modules. Use an extra Module.symvers file - When an external module is build a Module.symvers file is + When an external module is built, a Module.symvers file is generated containing all exported symbols which are not defined in the kernel. - To get access to symbols from module 'bar' one can copy the + To get access to symbols from module 'bar', one can copy the Module.symvers file from the compilation of the 'bar' module - to the directory where the 'foo' module is build. - During the module build kbuild will read the Module.symvers + to the directory where the 'foo' module is built. + During the module build, kbuild will read the Module.symvers file in the directory of the external module and when the - build is finished a new Module.symvers file is created + build is finished, a new Module.symvers file is created containing the sum of all symbols defined and not part of the kernel. - + === 8. Tips & Tricks --- 8.1 Testing for CONFIG_FOO_BAR - Modules often needs to check for certain CONFIG_ options to decide if + Modules often need to check for certain CONFIG_ options to decide if a specific feature shall be included in the module. When kbuild is used this is done by referencing the CONFIG_ variable directly. @@ -537,7 +538,7 @@ Module.symvers contains a list of all ex External modules have traditionally used grep to check for specific CONFIG_ settings directly in .config. This usage is broken. - As introduced before external modules shall use kbuild when building - and therefore can use the same methods as in-kernel modules when testing - for CONFIG_ definitions. + As introduced before, external modules shall use kbuild when building + and therefore can use the same methods as in-kernel modules when + testing for CONFIG_ definitions. diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 71d05f4..137e993 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -110,6 +110,13 @@ be entered as an environment variable, w it will appear as a kernel argument readable via /proc/cmdline by programs running once the system is up. +The number of kernel parameters is not limited, but the length of the +complete command line (parameters including spaces etc.) is limited to +a fixed number of characters. This limit depends on the architecture +and is between 256 and 4096 characters. It is defined in the file +./include/asm/setup.h as COMMAND_LINE_SIZE. + + 53c7xx= [HW,SCSI] Amiga SCSI controllers See header of drivers/scsi/53c7xx.c. See also Documentation/scsi/ncr53c7xx.txt. @@ -573,8 +580,6 @@ running once the system is up. gscd= [HW,CD] Format: - gt96100eth= [NET] MIPS GT96100 Advanced Communication Controller - gus= [HW,OSS] Format: ,,, @@ -1240,7 +1245,11 @@ running once the system is up. bootloader. This is currently used on IXP2000 systems where the bus has to be configured a certain way for adjunct CPUs. - + noearly [X86] Don't do any early type 1 scanning. + This might help on some broken boards which + machine check when some devices' config space + is read. But various workarounds are disabled + and some IOMMU drivers will not work. pcmv= [HW,PCMCIA] BadgePAD 4 pd. [PARIDE] @@ -1322,7 +1331,7 @@ running once the system is up. pt. [PARIDE] See Documentation/paride.txt. - quiet= [KNL] Disable log messages + quiet [KNL] Disable most log messages r128= [HW,DRM] @@ -1363,6 +1372,14 @@ running once the system is up. reserve= [KNL,BUGS] Force the kernel to ignore some iomem area + reservetop= [IA-32] + Format: nn[KMG] + Reserves a hole at the top of the kernel virtual + address space. + + reset_devices [KNL] Force drivers to reset the underlying device + during initialization. + resume= [SWSUSP] Specify the partition device for software suspend diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 2c3b1ea..ba26201 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt @@ -151,9 +151,9 @@ So that you can load and unload Kprobes- make sure "Loadable module support" (CONFIG_MODULES) and "Module unloading" (CONFIG_MODULE_UNLOAD) are set to "y". -You may also want to ensure that CONFIG_KALLSYMS and perhaps even -CONFIG_KALLSYMS_ALL are set to "y", since kallsyms_lookup_name() -is a handy, version-independent way to find a function's address. +Also make sure that CONFIG_KALLSYMS and perhaps even CONFIG_KALLSYMS_ALL +are set to "y", since kallsyms_lookup_name() is used by the in-kernel +kprobe address resolution code. If you need to insert a probe in the middle of a function, you may find it useful to "Compile the kernel with debug info" (CONFIG_DEBUG_INFO), @@ -179,6 +179,27 @@ occurs during execution of kp->pre_handl or during single-stepping of the probed instruction, Kprobes calls kp->fault_handler. Any or all handlers can be NULL. +NOTE: +1. With the introduction of the "symbol_name" field to struct kprobe, +the probepoint address resolution will now be taken care of by the kernel. +The following will now work: + + kp.symbol_name = "symbol_name"; + +(64-bit powerpc intricacies such as function descriptors are handled +transparently) + +2. Use the "offset" field of struct kprobe if the offset into the symbol +to install a probepoint is known. This field is used to calculate the +probepoint. + +3. Specify either the kprobe "symbol_name" OR the "addr". If both are +specified, kprobe registration will fail with -EINVAL. + +4. With CISC architectures (such as i386 and x86_64), the kprobes code +does not validate if the kprobe.addr is at an instruction boundary. +Use "offset" with caution. + register_kprobe() returns 0 on success, or a negative errno otherwise. User's pre-handler (kp->pre_handler): @@ -225,6 +246,12 @@ control to Kprobes.) If the probed func fastcall, or anything else that affects how args are passed, the handler's declaration must match. +NOTE: A macro JPROBE_ENTRY is provided to handle architecture-specific +aliasing of jp->entry. In the interest of portability, it is advised +to use: + + jp->entry = JPROBE_ENTRY(handler); + register_jprobe() returns 0 on success, or a negative errno otherwise. 4.3 register_kretprobe @@ -251,6 +278,11 @@ of interest: - ret_addr: the return address - rp: points to the corresponding kretprobe object - task: points to the corresponding task struct + +The regs_return_value(regs) macro provides a simple abstraction to +extract the return value from the appropriate register as defined by +the architecture's ABI. + The handler's return value is currently ignored. 4.4 unregister_*probe @@ -369,7 +401,6 @@ stack trace and selected i386 registers #include #include #include -#include #include /*For each probe you need to allocate a kprobe structure*/ @@ -403,18 +434,14 @@ int handler_fault(struct kprobe *p, stru return 0; } -int init_module(void) +static int __init kprobe_init(void) { int ret; kp.pre_handler = handler_pre; kp.post_handler = handler_post; kp.fault_handler = handler_fault; - kp.addr = (kprobe_opcode_t*) kallsyms_lookup_name("do_fork"); - /* register the kprobe now */ - if (!kp.addr) { - printk("Couldn't find %s to plant kprobe\n", "do_fork"); - return -1; - } + kp.symbol_name = "do_fork"; + if ((ret = register_kprobe(&kp) < 0)) { printk("register_kprobe failed, returned %d\n", ret); return -1; @@ -423,12 +450,14 @@ int init_module(void) return 0; } -void cleanup_module(void) +static void __exit kprobe_exit(void) { unregister_kprobe(&kp); printk("kprobe unregistered\n"); } +module_init(kprobe_init) +module_exit(kprobe_exit) MODULE_LICENSE("GPL"); ----- cut here ----- @@ -463,7 +492,6 @@ #include #include #include #include -#include /* * Jumper probe for do_fork. @@ -485,17 +513,13 @@ long jdo_fork(unsigned long clone_flags, } static struct jprobe my_jprobe = { - .entry = (kprobe_opcode_t *) jdo_fork + .entry = JPROBE_ENTRY(jdo_fork) }; -int init_module(void) +static int __init jprobe_init(void) { int ret; - my_jprobe.kp.addr = (kprobe_opcode_t *) kallsyms_lookup_name("do_fork"); - if (!my_jprobe.kp.addr) { - printk("Couldn't find %s to plant jprobe\n", "do_fork"); - return -1; - } + my_jprobe.kp.symbol_name = "do_fork"; if ((ret = register_jprobe(&my_jprobe)) <0) { printk("register_jprobe failed, returned %d\n", ret); @@ -506,12 +530,14 @@ int init_module(void) return 0; } -void cleanup_module(void) +static void __exit jprobe_exit(void) { unregister_jprobe(&my_jprobe); printk("jprobe unregistered\n"); } +module_init(jprobe_init) +module_exit(jprobe_exit) MODULE_LICENSE("GPL"); ----- cut here ----- @@ -530,16 +556,13 @@ report failed calls to sys_open(). #include #include #include -#include static const char *probed_func = "sys_open"; /* Return-probe handler: If the probed function fails, log the return value. */ static int ret_handler(struct kretprobe_instance *ri, struct pt_regs *regs) { - // Substitute the appropriate register name for your architecture -- - // e.g., regs->rax for x86_64, regs->gpr[3] for ppc64. - int retval = (int) regs->eax; + int retval = regs_return_value(regs); if (retval < 0) { printk("%s returns %d\n", probed_func, retval); } @@ -552,15 +575,11 @@ static struct kretprobe my_kretprobe = { .maxactive = 20 }; -int init_module(void) +static int __init kretprobe_init(void) { int ret; - my_kretprobe.kp.addr = - (kprobe_opcode_t *) kallsyms_lookup_name(probed_func); - if (!my_kretprobe.kp.addr) { - printk("Couldn't find %s to plant return probe\n", probed_func); - return -1; - } + my_kretprobe.kp.symbol_name = (char *)probed_func; + if ((ret = register_kretprobe(&my_kretprobe)) < 0) { printk("register_kretprobe failed, returned %d\n", ret); return -1; @@ -569,7 +588,7 @@ int init_module(void) return 0; } -void cleanup_module(void) +static void __exit kretprobe_exit(void) { unregister_kretprobe(&my_kretprobe); printk("kretprobe unregistered\n"); @@ -578,6 +597,8 @@ void cleanup_module(void) my_kretprobe.nmissed, probed_func); } +module_init(kretprobe_init) +module_exit(kretprobe_exit) MODULE_LICENSE("GPL"); ----- cut here ----- @@ -590,3 +611,5 @@ messages.) For additional information on Kprobes, refer to the following URLs: http://www-106.ibm.com/developerworks/library/l-kprobes.html?ca=dgr-lnxw42Kprobe http://www.redhat.com/magazine/005mar05/features/kprobes/ +http://www-users.cs.umn.edu/~boutcher/kprobes/ +http://www.linuxsymposium.org/2006/linuxsymposium_procv2.pdf (pages 101-115) diff --git a/Documentation/lockdep-design.txt b/Documentation/lockdep-design.txt index 00d9360..55a7e4f 100644 --- a/Documentation/lockdep-design.txt +++ b/Documentation/lockdep-design.txt @@ -36,6 +36,28 @@ The validator tracks lock-class usage hi - 'ever used' [ == !unused ] +When locking rules are violated, these 4 state bits are presented in the +locking error messages, inside curlies. A contrived example: + + modprobe/2287 is trying to acquire lock: + (&sio_locks[i].lock){--..}, at: [] mutex_lock+0x21/0x24 + + but task is already holding lock: + (&sio_locks[i].lock){--..}, at: [] mutex_lock+0x21/0x24 + + +The bit position indicates hardirq, softirq, hardirq-read, +softirq-read respectively, and the character displayed in each +indicates: + + '.' acquired while irqs enabled + '+' acquired in irq context + '-' acquired in process context with irqs disabled + '?' read-acquired both with irqs enabled and in irq context + +Unused mutexes cannot be part of the cause of an error. + + Single-lock state rules: ------------------------ diff --git a/Documentation/netlabel/00-INDEX b/Documentation/netlabel/00-INDEX new file mode 100644 index 0000000..837bf35 --- /dev/null +++ b/Documentation/netlabel/00-INDEX @@ -0,0 +1,10 @@ +00-INDEX + - this file. +cipso_ipv4.txt + - documentation on the IPv4 CIPSO protocol engine. +draft-ietf-cipso-ipsecurity-01.txt + - IETF draft of the CIPSO protocol, dated 16 July 1992. +introduction.txt + - NetLabel introduction, READ THIS FIRST. +lsm_interface.txt + - documentation on the NetLabel kernel security module API. diff --git a/Documentation/netlabel/cipso_ipv4.txt b/Documentation/netlabel/cipso_ipv4.txt new file mode 100644 index 0000000..93dacb1 --- /dev/null +++ b/Documentation/netlabel/cipso_ipv4.txt @@ -0,0 +1,48 @@ +NetLabel CIPSO/IPv4 Protocol Engine +============================================================================== +Paul Moore, paul.moore@hp.com + +May 17, 2006 + + * Overview + +The NetLabel CIPSO/IPv4 protocol engine is based on the IETF Commercial IP +Security Option (CIPSO) draft from July 16, 1992. A copy of this draft can be +found in this directory, consult '00-INDEX' for the filename. While the IETF +draft never made it to an RFC standard it has become a de-facto standard for +labeled networking and is used in many trusted operating systems. + + * Outbound Packet Processing + +The CIPSO/IPv4 protocol engine applies the CIPSO IP option to packets by +adding the CIPSO label to the socket. This causes all packets leaving the +system through the socket to have the CIPSO IP option applied. The socket's +CIPSO label can be changed at any point in time, however, it is recommended +that it is set upon the socket's creation. The LSM can set the socket's CIPSO +label by using the NetLabel security module API; if the NetLabel "domain" is +configured to use CIPSO for packet labeling then a CIPSO IP option will be +generated and attached to the socket. + + * Inbound Packet Processing + +The CIPSO/IPv4 protocol engine validates every CIPSO IP option it finds at the +IP layer without any special handling required by the LSM. However, in order +to decode and translate the CIPSO label on the packet the LSM must use the +NetLabel security module API to extract the security attributes of the packet. +This is typically done at the socket layer using the 'socket_sock_rcv_skb()' +LSM hook. + + * Label Translation + +The CIPSO/IPv4 protocol engine contains a mechanism to translate CIPSO security +attributes such as sensitivity level and category to values which are +appropriate for the host. These mappings are defined as part of a CIPSO +Domain Of Interpretation (DOI) definition and are configured through the +NetLabel user space communication layer. Each DOI definition can have a +different security attribute mapping table. + + * Label Translation Cache + +The NetLabel system provides a framework for caching security attribute +mappings from the network labels to the corresponding LSM identifiers. The +CIPSO/IPv4 protocol engine supports this caching mechanism. diff --git a/Documentation/netlabel/draft-ietf-cipso-ipsecurity-01.txt b/Documentation/netlabel/draft-ietf-cipso-ipsecurity-01.txt new file mode 100644 index 0000000..256c2c9 --- /dev/null +++ b/Documentation/netlabel/draft-ietf-cipso-ipsecurity-01.txt @@ -0,0 +1,791 @@ +IETF CIPSO Working Group +16 July, 1992 + + + + COMMERCIAL IP SECURITY OPTION (CIPSO 2.2) + + + +1. Status + +This Internet Draft provides the high level specification for a Commercial +IP Security Option (CIPSO). This draft reflects the version as approved by +the CIPSO IETF Working Group. Distribution of this memo is unlimited. + +This document is an Internet Draft. Internet Drafts are working documents +of the Internet Engineering Task Force (IETF), its Areas, and its Working +Groups. Note that other groups may also distribute working documents as +Internet Drafts. + +Internet Drafts are draft documents valid for a maximum of six months. +Internet Drafts may be updated, replaced, or obsoleted by other documents +at any time. It is not appropriate to use Internet Drafts as reference +material or to cite them other than as a "working draft" or "work in +progress." + +Please check the I-D abstract listing contained in each Internet Draft +directory to learn the current status of this or any other Internet Draft. + + + + +2. Background + +Currently the Internet Protocol includes two security options. One of +these options is the DoD Basic Security Option (BSO) (Type 130) which allows +IP datagrams to be labeled with security classifications. This option +provides sixteen security classifications and a variable number of handling +restrictions. To handle additional security information, such as security +categories or compartments, another security option (Type 133) exists and +is referred to as the DoD Extended Security Option (ESO). The values for +the fixed fields within these two options are administered by the Defense +Information Systems Agency (DISA). + +Computer vendors are now building commercial operating systems with +mandatory access controls and multi-level security. These systems are +no longer built specifically for a particular group in the defense or +intelligence communities. They are generally available commercial systems +for use in a variety of government and civil sector environments. + +The small number of ESO format codes can not support all the possible +applications of a commercial security option. The BSO and ESO were +designed to only support the United States DoD. CIPSO has been designed +to support multiple security policies. This Internet Draft provides the +format and procedures required to support a Mandatory Access Control +security policy. Support for additional security policies shall be +defined in future RFCs. + + + + +Internet Draft, Expires 15 Jan 93 [PAGE 1] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + + +3. CIPSO Format + +Option type: 134 (Class 0, Number 6, Copy on Fragmentation) +Option length: Variable + +This option permits security related information to be passed between +systems within a single Domain of Interpretation (DOI). A DOI is a +collection of systems which agree on the meaning of particular values +in the security option. An authority that has been assigned a DOI +identifier will define a mapping between appropriate CIPSO field values +and their human readable equivalent. This authority will distribute that +mapping to hosts within the authority's domain. These mappings may be +sensitive, therefore a DOI authority is not required to make these +mappings available to anyone other than the systems that are included in +the DOI. + +This option MUST be copied on fragmentation. This option appears at most +once in a datagram. All multi-octet fields in the option are defined to be +transmitted in network byte order. The format of this option is as follows: + ++----------+----------+------//------+-----------//---------+ +| 10000110 | LLLLLLLL | DDDDDDDDDDDD | TTTTTTTTTTTTTTTTTTTT | ++----------+----------+------//------+-----------//---------+ + + TYPE=134 OPTION DOMAIN OF TAGS + LENGTH INTERPRETATION + + + Figure 1. CIPSO Format + + +3.1 Type + +This field is 1 octet in length. Its value is 134. + + +3.2 Length + +This field is 1 octet in length. It is the total length of the option +including the type and length fields. With the current IP header length +restriction of 40 octets the value of this field MUST not exceed 40. + + +3.3 Domain of Interpretation Identifier + +This field is an unsigned 32 bit integer. The value 0 is reserved and MUST +not appear as the DOI identifier in any CIPSO option. Implementations +should assume that the DOI identifier field is not aligned on any particular +byte boundary. + +To conserve space in the protocol, security levels and categories are +represented by numbers rather than their ASCII equivalent. This requires +a mapping table within CIPSO hosts to map these numbers to their +corresponding ASCII representations. Non-related groups of systems may + + + +Internet Draft, Expires 15 Jan 93 [PAGE 2] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + +have their own unique mappings. For example, one group of systems may +use the number 5 to represent Unclassified while another group may use the +number 1 to represent that same security level. The DOI identifier is used +to identify which mapping was used for the values within the option. + + +3.4 Tag Types + +A common format for passing security related information is necessary +for interoperability. CIPSO uses sets of "tags" to contain the security +information relevant to the data in the IP packet. Each tag begins with +a tag type identifier followed by the length of the tag and ends with the +actual security information to be passed. All multi-octet fields in a tag +are defined to be transmitted in network byte order. Like the DOI +identifier field in the CIPSO header, implementations should assume that +all tags, as well as fields within a tag, are not aligned on any particular +octet boundary. The tag types defined in this document contain alignment +bytes to assist alignment of some information, however alignment can not +be guaranteed if CIPSO is not the first IP option. + +CIPSO tag types 0 through 127 are reserved for defining standard tag +formats. Their definitions will be published in RFCs. Tag types whose +identifiers are greater than 127 are defined by the DOI authority and may +only be meaningful in certain Domains of Interpretation. For these tag +types, implementations will require the DOI identifier as well as the tag +number to determine the security policy and the format associated with the +tag. Use of tag types above 127 are restricted to closed networks where +interoperability with other networks will not be an issue. Implementations +that support a tag type greater than 127 MUST support at least one DOI that +requires only tag types 1 to 127. + +Tag type 0 is reserved. Tag types 1, 2, and 5 are defined in this +Internet Draft. Types 3 and 4 are reserved for work in progress. +The standard format for all current and future CIPSO tags is shown below: + ++----------+----------+--------//--------+ +| TTTTTTTT | LLLLLLLL | IIIIIIIIIIIIIIII | ++----------+----------+--------//--------+ + TAG TAG TAG + TYPE LENGTH INFORMATION + + Figure 2: Standard Tag Format + +In the three tag types described in this document, the length and count +restrictions are based on the current IP limitation of 40 octets for all +IP options. If the IP header is later expanded, then the length and count +restrictions specified in this document may increase to use the full area +provided for IP options. + + +3.4.1 Tag Type Classes + +Tag classes consist of tag types that have common processing requirements +and support the same security policy. The three tags defined in this +Internet Draft belong to the Mandatory Access Control (MAC) Sensitivity + + + +Internet Draft, Expires 15 Jan 93 [PAGE 3] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + +class and support the MAC Sensitivity security policy. + + +3.4.2 Tag Type 1 + +This is referred to as the "bit-mapped" tag type. Tag type 1 is included +in the MAC Sensitivity tag type class. The format of this tag type is as +follows: + ++----------+----------+----------+----------+--------//---------+ +| 00000001 | LLLLLLLL | 00000000 | LLLLLLLL | CCCCCCCCCCCCCCCCC | ++----------+----------+----------+----------+--------//---------+ + + TAG TAG ALIGNMENT SENSITIVITY BIT MAP OF + TYPE LENGTH OCTET LEVEL CATEGORIES + + Figure 3. Tag Type 1 Format + + +3.4.2.1 Tag Type + +This field is 1 octet in length and has a value of 1. + + +3.4.2.2 Tag Length + +This field is 1 octet in length. It is the total length of the tag type +including the type and length fields. With the current IP header length +restriction of 40 bytes the value within this field is between 4 and 34. + + +3.4.2.3 Alignment Octet + +This field is 1 octet in length and always has the value of 0. Its purpose +is to align the category bitmap field on an even octet boundary. This will +speed many implementations including router implementations. + + +3.4.2.4 Sensitivity Level + +This field is 1 octet in length. Its value is from 0 to 255. The values +are ordered with 0 being the minimum value and 255 representing the maximum +value. + + +3.4.2.5 Bit Map of Categories + +The length of this field is variable and ranges from 0 to 30 octets. This +provides representation of categories 0 to 239. The ordering of the bits +is left to right or MSB to LSB. For example category 0 is represented by +the most significant bit of the first byte and category 15 is represented +by the least significant bit of the second byte. Figure 4 graphically +shows this ordering. Bit N is binary 1 if category N is part of the label +for the datagram, and bit N is binary 0 if category N is not part of the +label. Except for the optimized tag 1 format described in the next section, + + + +Internet Draft, Expires 15 Jan 93 [PAGE 4] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + +minimal encoding SHOULD be used resulting in no trailing zero octets in the +category bitmap. + + octet 0 octet 1 octet 2 octet 3 octet 4 octet 5 + XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX . . . +bit 01234567 89111111 11112222 22222233 33333333 44444444 +number 012345 67890123 45678901 23456789 01234567 + + Figure 4. Ordering of Bits in Tag 1 Bit Map + + +3.4.2.6 Optimized Tag 1 Format + +Routers work most efficiently when processing fixed length fields. To +support these routers there is an optimized form of tag type 1. The format +does not change. The only change is to the category bitmap which is set to +a constant length of 10 octets. Trailing octets required to fill out the 10 +octets are zero filled. Ten octets, allowing for 80 categories, was chosen +because it makes the total length of the CIPSO option 20 octets. If CIPSO +is the only option then the option will be full word aligned and additional +filler octets will not be required. + + +3.4.3 Tag Type 2 + +This is referred to as the "enumerated" tag type. It is used to describe +large but sparsely populated sets of categories. Tag type 2 is in the MAC +Sensitivity tag type class. The format of this tag type is as follows: + ++----------+----------+----------+----------+-------------//-------------+ +| 00000010 | LLLLLLLL | 00000000 | LLLLLLLL | CCCCCCCCCCCCCCCCCCCCCCCCCC | ++----------+----------+----------+----------+-------------//-------------+ + + TAG TAG ALIGNMENT SENSITIVITY ENUMERATED + TYPE LENGTH OCTET LEVEL CATEGORIES + + Figure 5. Tag Type 2 Format + + +3.4.3.1 Tag Type + +This field is one octet in length and has a value of 2. + + +3.4.3.2 Tag Length + +This field is 1 octet in length. It is the total length of the tag type +including the type and length fields. With the current IP header length +restriction of 40 bytes the value within this field is between 4 and 34. + + +3.4.3.3 Alignment Octet + +This field is 1 octet in length and always has the value of 0. Its purpose +is to align the category field on an even octet boundary. This will + + + +Internet Draft, Expires 15 Jan 93 [PAGE 5] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + +speed many implementations including router implementations. + + +3.4.3.4 Sensitivity Level + +This field is 1 octet in length. Its value is from 0 to 255. The values +are ordered with 0 being the minimum value and 255 representing the +maximum value. + + +3.4.3.5 Enumerated Categories + +In this tag, categories are represented by their actual value rather than +by their position within a bit field. The length of each category is 2 +octets. Up to 15 categories may be represented by this tag. Valid values +for categories are 0 to 65534. Category 65535 is not a valid category +value. The categories MUST be listed in ascending order within the tag. + + +3.4.4 Tag Type 5 + +This is referred to as the "range" tag type. It is used to represent +labels where all categories in a range, or set of ranges, are included +in the sensitivity label. Tag type 5 is in the MAC Sensitivity tag type +class. The format of this tag type is as follows: + ++----------+----------+----------+----------+------------//-------------+ +| 00000101 | LLLLLLLL | 00000000 | LLLLLLLL | Top/Bottom | Top/Bottom | ++----------+----------+----------+----------+------------//-------------+ + + TAG TAG ALIGNMENT SENSITIVITY CATEGORY RANGES + TYPE LENGTH OCTET LEVEL + + Figure 6. Tag Type 5 Format + + +3.4.4.1 Tag Type + +This field is one octet in length and has a value of 5. + + +3.4.4.2 Tag Length + +This field is 1 octet in length. It is the total length of the tag type +including the type and length fields. With the current IP header length +restriction of 40 bytes the value within this field is between 4 and 34. + + +3.4.4.3 Alignment Octet + +This field is 1 octet in length and always has the value of 0. Its purpose +is to align the category range field on an even octet boundary. This will +speed many implementations including router implementations. + + + + + +Internet Draft, Expires 15 Jan 93 [PAGE 6] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + +3.4.4.4 Sensitivity Level + +This field is 1 octet in length. Its value is from 0 to 255. The values +are ordered with 0 being the minimum value and 255 representing the maximum +value. + + +3.4.4.5 Category Ranges + +A category range is a 4 octet field comprised of the 2 octet index of the +highest numbered category followed by the 2 octet index of the lowest +numbered category. These range endpoints are inclusive within the range of +categories. All categories within a range are included in the sensitivity +label. This tag may contain a maximum of 7 category pairs. The bottom +category endpoint for the last pair in the tag MAY be omitted and SHOULD be +assumed to be 0. The ranges MUST be non-overlapping and be listed in +descending order. Valid values for categories are 0 to 65534. Category +65535 is not a valid category value. + + +3.4.5 Minimum Requirements + +A CIPSO implementation MUST be capable of generating at least tag type 1 in +the non-optimized form. In addition, a CIPSO implementation MUST be able +to receive any valid tag type 1 even those using the optimized tag type 1 +format. + + +4. Configuration Parameters + +The configuration parameters defined below are required for all CIPSO hosts, +gateways, and routers that support multiple sensitivity labels. A CIPSO +host is defined to be the origination or destination system for an IP +datagram. A CIPSO gateway provides IP routing services between two or more +IP networks and may be required to perform label translations between +networks. A CIPSO gateway may be an enhanced CIPSO host or it may just +provide gateway services with no end system CIPSO capabilities. A CIPSO +router is a dedicated IP router that routes IP datagrams between two or more +IP networks. + +An implementation of CIPSO on a host MUST have the capability to reject a +datagram for reasons that the information contained can not be adequately +protected by the receiving host or if acceptance may result in violation of +the host or network security policy. In addition, a CIPSO gateway or router +MUST be able to reject datagrams going to networks that can not provide +adequate protection or may violate the network's security policy. To +provide this capability the following minimal set of configuration +parameters are required for CIPSO implementations: + +HOST_LABEL_MAX - This parameter contains the maximum sensitivity label that +a CIPSO host is authorized to handle. All datagrams that have a label +greater than this maximum MUST be rejected by the CIPSO host. This +parameter does not apply to CIPSO gateways or routers. This parameter need +not be defined explicitly as it can be implicitly derived from the +PORT_LABEL_MAX parameters for the associated interfaces. + + + +Internet Draft, Expires 15 Jan 93 [PAGE 7] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + + +HOST_LABEL_MIN - This parameter contains the minimum sensitivity label that +a CIPSO host is authorized to handle. All datagrams that have a label less +than this minimum MUST be rejected by the CIPSO host. This parameter does +not apply to CIPSO gateways or routers. This parameter need not be defined +explicitly as it can be implicitly derived from the PORT_LABEL_MIN +parameters for the associated interfaces. + +PORT_LABEL_MAX - This parameter contains the maximum sensitivity label for +all datagrams that may exit a particular network interface port. All +outgoing datagrams that have a label greater than this maximum MUST be +rejected by the CIPSO system. The label within this parameter MUST be +less than or equal to the label within the HOST_LABEL_MAX parameter. This +parameter does not apply to CIPSO hosts that support only one network port. + +PORT_LABEL_MIN - This parameter contains the minimum sensitivity label for +all datagrams that may exit a particular network interface port. All +outgoing datagrams that have a label less than this minimum MUST be +rejected by the CIPSO system. The label within this parameter MUST be +greater than or equal to the label within the HOST_LABEL_MIN parameter. +This parameter does not apply to CIPSO hosts that support only one network +port. + +PORT_DOI - This parameter is used to assign a DOI identifier value to a +particular network interface port. All CIPSO labels within datagrams +going out this port MUST use the specified DOI identifier. All CIPSO +hosts and gateways MUST support either this parameter, the NET_DOI +parameter, or the HOST_DOI parameter. + +NET_DOI - This parameter is used to assign a DOI identifier value to a +particular IP network address. All CIPSO labels within datagrams destined +for the particular IP network MUST use the specified DOI identifier. All +CIPSO hosts and gateways MUST support either this parameter, the PORT_DOI +parameter, or the HOST_DOI parameter. + +HOST_DOI - This parameter is used to assign a DOI identifier value to a +particular IP host address. All CIPSO labels within datagrams destined for +the particular IP host will use the specified DOI identifier. All CIPSO +hosts and gateways MUST support either this parameter, the PORT_DOI +parameter, or the NET_DOI parameter. + +This list represents the minimal set of configuration parameters required +to be compliant. Implementors are encouraged to add to this list to +provide enhanced functionality and control. For example, many security +policies may require both incoming and outgoing datagrams be checked against +the port and host label ranges. + + +4.1 Port Range Parameters + +The labels represented by the PORT_LABEL_MAX and PORT_LABEL_MIN parameters +MAY be in CIPSO or local format. Some CIPSO systems, such as routers, may +want to have the range parameters expressed in CIPSO format so that incoming +labels do not have to be converted to a local format before being compared +against the range. If multiple DOIs are supported by one of these CIPSO + + + +Internet Draft, Expires 15 Jan 93 [PAGE 8] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + +systems then multiple port range parameters would be needed, one set for +each DOI supported on a particular port. + +The port range will usually represent the total set of labels that may +exist on the logical network accessed through the corresponding network +interface. It may, however, represent a subset of these labels that are +allowed to enter the CIPSO system. + + +4.2 Single Label CIPSO Hosts + +CIPSO implementations that support only one label are not required to +support the parameters described above. These limited implementations are +only required to support a NET_LABEL parameter. This parameter contains +the CIPSO label that may be inserted in datagrams that exit the host. In +addition, the host MUST reject any incoming datagram that has a label which +is not equivalent to the NET_LABEL parameter. + + +5. Handling Procedures + +This section describes the processing requirements for incoming and +outgoing IP datagrams. Just providing the correct CIPSO label format +is not enough. Assumptions will be made by one system on how a +receiving system will handle the CIPSO label. Wrong assumptions may +lead to non-interoperability or even a security incident. The +requirements described below represent the minimal set needed for +interoperability and that provide users some level of confidence. +Many other requirements could be added to increase user confidence, +however at the risk of restricting creativity and limiting vendor +participation. + + +5.1 Input Procedures + +All datagrams received through a network port MUST have a security label +associated with them, either contained in the datagram or assigned to the +receiving port. Without this label the host, gateway, or router will not +have the information it needs to make security decisions. This security +label will be obtained from the CIPSO if the option is present in the +datagram. See section 4.1.2 for handling procedures for unlabeled +datagrams. This label will be compared against the PORT (if appropriate) +and HOST configuration parameters defined in section 3. + +If any field within the CIPSO option, such as the DOI identifier, is not +recognized the IP datagram is discarded and an ICMP "parameter problem" +(type 12) is generated and returned. The ICMP code field is set to "bad +parameter" (code 0) and the pointer is set to the start of the CIPSO field +that is unrecognized. + +If the contents of the CIPSO are valid but the security label is +outside of the configured host or port label range, the datagram is +discarded and an ICMP "destination unreachable" (type 3) is generated +and returned. The code field of the ICMP is set to "communication with +destination network administratively prohibited" (code 9) or to + + + +Internet Draft, Expires 15 Jan 93 [PAGE 9] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + +"communication with destination host administratively prohibited" +(code 10). The value of the code field used is dependent upon whether +the originator of the ICMP message is acting as a CIPSO host or a CIPSO +gateway. The recipient of the ICMP message MUST be able to handle either +value. The same procedure is performed if a CIPSO can not be added to an +IP packet because it is too large to fit in the IP options area. + +If the error is triggered by receipt of an ICMP message, the message +is discarded and no response is permitted (consistent with general ICMP +processing rules). + + +5.1.1 Unrecognized tag types + +The default condition for any CIPSO implementation is that an +unrecognized tag type MUST be treated as a "parameter problem" and +handled as described in section 4.1. A CIPSO implementation MAY allow +the system administrator to identify tag types that may safely be +ignored. This capability is an allowable enhancement, not a +requirement. + + +5.1.2 Unlabeled Packets + +A network port may be configured to not require a CIPSO label for all +incoming datagrams. For this configuration a CIPSO label must be +assigned to that network port and associated with all unlabeled IP +datagrams. This capability might be used for single level networks or +networks that have CIPSO and non-CIPSO hosts and the non-CIPSO hosts +all operate at the same label. + +If a CIPSO option is required and none is found, the datagram is +discarded and an ICMP "parameter problem" (type 12) is generated and +returned to the originator of the datagram. The code field of the ICMP +is set to "option missing" (code 1) and the ICMP pointer is set to 134 +(the value of the option type for the missing CIPSO option). + + +5.2 Output Procedures + +A CIPSO option MUST appear only once in a datagram. Only one tag type +from the MAC Sensitivity class MAY be included in a CIPSO option. Given +the current set of defined tag types, this means that CIPSO labels at +first will contain only one tag. + +All datagrams leaving a CIPSO system MUST meet the following condition: + + PORT_LABEL_MIN <= CIPSO label <= PORT_LABEL_MAX + +If this condition is not satisfied the datagram MUST be discarded. +If the CIPSO system only supports one port, the HOST_LABEL_MIN and the +HOST_LABEL_MAX parameters MAY be substituted for the PORT parameters in +the above condition. + +The DOI identifier to be used for all outgoing datagrams is configured by + + + +Internet Draft, Expires 15 Jan 93 [PAGE 10] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + +the administrator. If port level DOI identifier assignment is used, then +the PORT_DOI configuration parameter MUST contain the DOI identifier to +use. If network level DOI assignment is used, then the NET_DOI parameter +MUST contain the DOI identifier to use. And if host level DOI assignment +is employed, then the HOST_DOI parameter MUST contain the DOI identifier +to use. A CIPSO implementation need only support one level of DOI +assignment. + + +5.3 DOI Processing Requirements + +A CIPSO implementation MUST support at least one DOI and SHOULD support +multiple DOIs. System and network administrators are cautioned to +ensure that at least one DOI is common within an IP network to allow for +broadcasting of IP datagrams. + +CIPSO gateways MUST be capable of translating a CIPSO option from one +DOI to another when forwarding datagrams between networks. For +efficiency purposes this capability is only a desired feature for CIPSO +routers. + + +5.4 Label of ICMP Messages + +The CIPSO label to be used on all outgoing ICMP messages MUST be equivalent +to the label of the datagram that caused the ICMP message. If the ICMP was +generated due to a problem associated with the original CIPSO label then the +following responses are allowed: + + a. Use the CIPSO label of the original IP datagram + b. Drop the original datagram with no return message generated + +In most cases these options will have the same effect. If you can not +interpret the label or if it is outside the label range of your host or +interface then an ICMP message with the same label will probably not be +able to exit the system. + + +6. Assignment of DOI Identifier Numbers = + +Requests for assignment of a DOI identifier number should be addressed to +the Internet Assigned Numbers Authority (IANA). + + +7. Acknowledgements + +Much of the material in this RFC is based on (and copied from) work +done by Gary Winiger of Sun Microsystems and published as Commercial +IP Security Option at the INTEROP 89, Commercial IPSO Workshop. + + +8. Author's Address + +To submit mail for distribution to members of the IETF CIPSO Working +Group, send mail to: cipso@wdl1.wdl.loral.com. + + + +Internet Draft, Expires 15 Jan 93 [PAGE 11] + + + +CIPSO INTERNET DRAFT 16 July, 1992 + + + + +To be added to or deleted from this distribution, send mail to: +cipso-request@wdl1.wdl.loral.com. + + +9. References + +RFC 1038, "Draft Revised IP Security Option", M. St. Johns, IETF, January +1988. + +RFC 1108, "U.S. Department of Defense Security Options +for the Internet Protocol", Stephen Kent, IAB, 1 March, 1991. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Internet Draft, Expires 15 Jan 93 [PAGE 12] + + + diff --git a/Documentation/netlabel/introduction.txt b/Documentation/netlabel/introduction.txt new file mode 100644 index 0000000..a4ffba1 --- /dev/null +++ b/Documentation/netlabel/introduction.txt @@ -0,0 +1,46 @@ +NetLabel Introduction +============================================================================== +Paul Moore, paul.moore@hp.com + +August 2, 2006 + + * Overview + +NetLabel is a mechanism which can be used by kernel security modules to attach +security attributes to outgoing network packets generated from user space +applications and read security attributes from incoming network packets. It +is composed of three main components, the protocol engines, the communication +layer, and the kernel security module API. + + * Protocol Engines + +The protocol engines are responsible for both applying and retrieving the +network packet's security attributes. If any translation between the network +security attributes and those on the host are required then the protocol +engine will handle those tasks as well. Other kernel subsystems should +refrain from calling the protocol engines directly, instead they should use +the NetLabel kernel security module API described below. + +Detailed information about each NetLabel protocol engine can be found in this +directory, consult '00-INDEX' for filenames. + + * Communication Layer + +The communication layer exists to allow NetLabel configuration and monitoring +from user space. The NetLabel communication layer uses a message based +protocol built on top of the Generic NETLINK transport mechanism. The exact +formatting of these NetLabel messages as well as the Generic NETLINK family +names can be found in the the 'net/netlabel/' directory as comments in the +header files as well as in 'include/net/netlabel.h'. + + * Security Module API + +The purpose of the NetLabel security module API is to provide a protocol +independent interface to the underlying NetLabel protocol engines. In addition +to protocol independence, the security module API is designed to be completely +LSM independent which should allow multiple LSMs to leverage the same code +base. + +Detailed information about the NetLabel security module API can be found in the +'include/net/netlabel.h' header file as well as the 'lsm_interface.txt' file +found in this directory. diff --git a/Documentation/netlabel/lsm_interface.txt b/Documentation/netlabel/lsm_interface.txt new file mode 100644 index 0000000..98dd9f7 --- /dev/null +++ b/Documentation/netlabel/lsm_interface.txt @@ -0,0 +1,47 @@ +NetLabel Linux Security Module Interface +============================================================================== +Paul Moore, paul.moore@hp.com + +May 17, 2006 + + * Overview + +NetLabel is a mechanism which can set and retrieve security attributes from +network packets. It is intended to be used by LSM developers who want to make +use of a common code base for several different packet labeling protocols. +The NetLabel security module API is defined in 'include/net/netlabel.h' but a +brief overview is given below. + + * NetLabel Security Attributes + +Since NetLabel supports multiple different packet labeling protocols and LSMs +it uses the concept of security attributes to refer to the packet's security +labels. The NetLabel security attributes are defined by the +'netlbl_lsm_secattr' structure in the NetLabel header file. Internally the +NetLabel subsystem converts the security attributes to and from the correct +low-level packet label depending on the NetLabel build time and run time +configuration. It is up to the LSM developer to translate the NetLabel +security attributes into whatever security identifiers are in use for their +particular LSM. + + * NetLabel LSM Protocol Operations + +These are the functions which allow the LSM developer to manipulate the labels +on outgoing packets as well as read the labels on incoming packets. Functions +exist to operate both on sockets as well as the sk_buffs directly. These high +level functions are translated into low level protocol operations based on how +the administrator has configured the NetLabel subsystem. + + * NetLabel Label Mapping Cache Operations + +Depending on the exact configuration, translation between the network packet +label and the internal LSM security identifier can be time consuming. The +NetLabel label mapping cache is a caching mechanism which can be used to +sidestep much of this overhead once a mapping has been established. Once the +LSM has received a packet, used NetLabel to decode it's security attributes, +and translated the security attributes into a LSM internal identifier the LSM +can use the NetLabel caching functions to associate the LSM internal +identifier with the network packet's label. This means that in the future +when a incoming packet matches a cached value not only are the internal +NetLabel translation mechanisms bypassed but the LSM translation mechanisms are +bypassed as well which should result in a significant reduction in overhead. diff --git a/Documentation/networking/LICENSE.qla3xxx b/Documentation/networking/LICENSE.qla3xxx new file mode 100644 index 0000000..2f2077e --- /dev/null +++ b/Documentation/networking/LICENSE.qla3xxx @@ -0,0 +1,46 @@ +Copyright (c) 2003-2006 QLogic Corporation +QLogic Linux Networking HBA Driver + +This program includes a device driver for Linux 2.6 that may be +distributed with QLogic hardware specific firmware binary file. +You may modify and redistribute the device driver code under the +GNU General Public License as published by the Free Software +Foundation (version 2 or a later version). + +You may redistribute the hardware specific firmware binary file +under the following terms: + + 1. Redistribution of source code (only if applicable), + must retain the above copyright notice, this list of + conditions and the following disclaimer. + + 2. Redistribution in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + + 3. The name of QLogic Corporation may not be used to + endorse or promote products derived from this software + without specific prior written permission + +REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE, +THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT +CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR +OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT, +TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN +ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN +COMBINATION WITH THIS PROGRAM. + diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index afac780..dc942ea 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt @@ -192,6 +192,17 @@ or, for backwards compatibility, the opt arp_interval Specifies the ARP link monitoring frequency in milliseconds. + + The ARP monitor works by periodically checking the slave + devices to determine whether they have sent or received + traffic recently (the precise criteria depends upon the + bonding mode, and the state of the slave). Regular traffic is + generated via ARP probes issued for the addresses specified by + the arp_ip_target option. + + This behavior can be modified by the arp_validate option, + below. + If ARP monitoring is used in an etherchannel compatible mode (modes 0 and 2), the switch should be configured in a mode that evenly distributes packets across all links. If the @@ -213,6 +224,54 @@ arp_ip_target maximum number of targets that can be specified is 16. The default value is no IP addresses. +arp_validate + + Specifies whether or not ARP probes and replies should be + validated in the active-backup mode. This causes the ARP + monitor to examine the incoming ARP requests and replies, and + only consider a slave to be up if it is receiving the + appropriate ARP traffic. + + Possible values are: + + none or 0 + + No validation is performed. This is the default. + + active or 1 + + Validation is performed only for the active slave. + + backup or 2 + + Validation is performed only for backup slaves. + + all or 3 + + Validation is performed for all slaves. + + For the active slave, the validation checks ARP replies to + confirm that they were generated by an arp_ip_target. Since + backup slaves do not typically receive these replies, the + validation performed for backup slaves is on the ARP request + sent out via the active slave. It is possible that some + switch or network configurations may result in situations + wherein the backup slaves do not receive the ARP requests; in + such a situation, validation of backup slaves must be + disabled. + + This option is useful in network configurations in which + multiple bonding hosts are concurrently issuing ARPs to one or + more targets beyond a common switch. Should the link between + the switch and target fail (but not the switch itself), the + probe traffic generated by the multiple bonding instances will + fool the standard ARP monitor into considering the links as + still up. Use of the arp_validate option can resolve this, as + the ARP monitor will only consider ARP requests and replies + associated with its own instance of bonding. + + This option was added in bonding version 3.1.0. + downdelay Specifies the time, in milliseconds, to wait before disabling diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index c45daab..74563b3 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt @@ -1,7 +1,6 @@ DCCP protocol ============ -Last updated: 10 November 2005 Contents ======== @@ -42,8 +41,11 @@ Socket options DCCP_SOCKOPT_PACKET_SIZE is used for CCID3 to set default packet size for calculations. -DCCP_SOCKOPT_SERVICE sets the service. This is compulsory as per the -specification. If you don't set it you will get EPROTO. +DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of +service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, +the socket will fall back to 0 (which means that no meaningful service code +is present). Connecting sockets set at most one service option; for +listening sockets, multiple service codes can be specified. Notes ===== diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 90ed781..935e298 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt @@ -375,6 +375,41 @@ tcp_slow_start_after_idle - BOOLEAN be timed out after an idle period. Default: 1 +CIPSOv4 Variables: + +cipso_cache_enable - BOOLEAN + If set, enable additions to and lookups from the CIPSO label mapping + cache. If unset, additions are ignored and lookups always result in a + miss. However, regardless of the setting the cache is still + invalidated when required when means you can safely toggle this on and + off and the cache will always be "safe". + Default: 1 + +cipso_cache_bucket_size - INTEGER + The CIPSO label cache consists of a fixed size hash table with each + hash bucket containing a number of cache entries. This variable limits + the number of entries in each hash bucket; the larger the value the + more CIPSO label mappings that can be cached. When the number of + entries in a given hash bucket reaches this limit adding new entries + causes the oldest entry in the bucket to be removed to make room. + Default: 10 + +cipso_rbm_optfmt - BOOLEAN + Enable the "Optimized Tag 1 Format" as defined in section 3.4.2.6 of + the CIPSO draft specification (see Documentation/netlabel for details). + This means that when set the CIPSO tag will be padded with empty + categories in order to make the packet data 32-bit aligned. + Default: 0 + +cipso_rbm_structvalid - BOOLEAN + If set, do a very strict check of the CIPSO option when + ip_options_compile() is called. If unset, relax the checks done during + ip_options_compile(). Either way is "safe" as errors are caught else + where in the CIPSO processing code but setting this to 0 (False) should + result in less work (i.e. it should be faster) but could cause problems + with other implementations that require strict checking. + Default: 0 + IP Variables: ip_local_port_range - 2 INTEGERS @@ -730,6 +765,9 @@ conf/all/forwarding - BOOLEAN This referred to as global forwarding. +proxy_ndp - BOOLEAN + Do proxy ndp. + conf/interface/*: Change special settings per interface. diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt index 44f2f76..18d385c 100644 --- a/Documentation/networking/pktgen.txt +++ b/Documentation/networking/pktgen.txt @@ -100,6 +100,7 @@ Examples: are: IPSRC_RND #IP Source is random (between min/max), IPDST_RND, UDPSRC_RND, UDPDST_RND, MACSRC_RND, MACDST_RND + MPLS_RND, VID_RND, SVID_RND pgset "udp_src_min 9" set UDP source port min, If < udp_src_max, then cycle through the port range. @@ -125,6 +126,21 @@ Examples: pgset "mpls 0" turn off mpls (or any invalid argument works too!) + pgset "vlan_id 77" set VLAN ID 0-4095 + pgset "vlan_p 3" set priority bit 0-7 (default 0) + pgset "vlan_cfi 0" set canonical format identifier 0-1 (default 0) + + pgset "svlan_id 22" set SVLAN ID 0-4095 + pgset "svlan_p 3" set priority bit 0-7 (default 0) + pgset "svlan_cfi 0" set canonical format identifier 0-1 (default 0) + + pgset "vlan_id 9999" > 4095 remove vlan and svlan tags + pgset "svlan 9999" > 4095 remove svlan tag + + + pgset "tos XX" set former IPv4 TOS field (e.g. "tos 28" for AF11 no ECN, default 00) + pgset "traffic_class XX" set former IPv6 TRAFFIC CLASS (e.g. "traffic_class B8" for EF no ECN, default 00) + pgset stop aborts injection. Also, ^C aborts generator. diff --git a/Documentation/networking/secid.txt b/Documentation/networking/secid.txt new file mode 100644 index 0000000..95ea067 --- /dev/null +++ b/Documentation/networking/secid.txt @@ -0,0 +1,14 @@ +flowi structure: + +The secid member in the flow structure is used in LSMs (e.g. SELinux) to indicate +the label of the flow. This label of the flow is currently used in selecting +matching labeled xfrm(s). + +If this is an outbound flow, the label is derived from the socket, if any, or +the incoming packet this flow is being generated as a response to (e.g. tcp +resets, timewait ack, etc.). It is also conceivable that the label could be +derived from other sources such as process context, device, etc., in special +cases, as may be appropriate. + +If this is an inbound flow, the label is derived from the IPSec security +associations, if any, used by the packet. diff --git a/Documentation/nommu-mmap.txt b/Documentation/nommu-mmap.txt index b88ebe4..7714f57 100644 --- a/Documentation/nommu-mmap.txt +++ b/Documentation/nommu-mmap.txt @@ -116,6 +116,9 @@ FURTHER NOTES ON NO-MMU MMAP (*) A list of all the mappings on the system is visible through /proc/maps in no-MMU mode. + (*) A list of all the mappings in use by a process is visible through + /proc//maps in no-MMU mode. + (*) Supplying MAP_FIXED or a requesting a particular mapping address will result in an error. @@ -125,6 +128,49 @@ FURTHER NOTES ON NO-MMU MMAP error will result if they don't. This is most likely to be encountered with character device files, pipes, fifos and sockets. + +========================== +INTERPROCESS SHARED MEMORY +========================== + +Both SYSV IPC SHM shared memory and POSIX shared memory is supported in NOMMU +mode. The former through the usual mechanism, the latter through files created +on ramfs or tmpfs mounts. + + +======= +FUTEXES +======= + +Futexes are supported in NOMMU mode if the arch supports them. An error will +be given if an address passed to the futex system call lies outside the +mappings made by a process or if the mapping in which the address lies does not +support futexes (such as an I/O chardev mapping). + + +============= +NO-MMU MREMAP +============= + +The mremap() function is partially supported. It may change the size of a +mapping, and may move it[*] if MREMAP_MAYMOVE is specified and if the new size +of the mapping exceeds the size of the slab object currently occupied by the +memory to which the mapping refers, or if a smaller slab object could be used. + +MREMAP_FIXED is not supported, though it is ignored if there's no change of +address and the object does not need to be moved. + +Shared mappings may not be moved. Shareable mappings may not be moved either, +even if they are not currently shared. + +The mremap() function must be given an exact match for base address and size of +a previously mapped object. It may not be used to create holes in existing +mappings, move parts of existing mappings or resize parts of mappings. It must +act on a complete mapping. + +[*] Not currently supported. + + ============================================ PROVIDING SHAREABLE CHARACTER DEVICE SUPPORT ============================================ diff --git a/Documentation/pcieaer-howto.txt b/Documentation/pcieaer-howto.txt new file mode 100644 index 0000000..16c2512 --- /dev/null +++ b/Documentation/pcieaer-howto.txt @@ -0,0 +1,253 @@ + The PCI Express Advanced Error Reporting Driver Guide HOWTO + T. Long Nguyen + Yanmin Zhang + 07/29/2006 + + +1. Overview + +1.1 About this guide + +This guide describes the basics of the PCI Express Advanced Error +Reporting (AER) driver and provides information on how to use it, as +well as how to enable the drivers of endpoint devices to conform with +PCI Express AER driver. + +1.2 Copyright © Intel Corporation 2006. + +1.3 What is the PCI Express AER Driver? + +PCI Express error signaling can occur on the PCI Express link itself +or on behalf of transactions initiated on the link. PCI Express +defines two error reporting paradigms: the baseline capability and +the Advanced Error Reporting capability. The baseline capability is +required of all PCI Express components providing a minimum defined +set of error reporting requirements. Advanced Error Reporting +capability is implemented with a PCI Express advanced error reporting +extended capability structure providing more robust error reporting. + +The PCI Express AER driver provides the infrastructure to support PCI +Express Advanced Error Reporting capability. The PCI Express AER +driver provides three basic functions: + +- Gathers the comprehensive error information if errors occurred. +- Reports error to the users. +- Performs error recovery actions. + +AER driver only attaches root ports which support PCI-Express AER +capability. + + +2. User Guide + +2.1 Include the PCI Express AER Root Driver into the Linux Kernel + +The PCI Express AER Root driver is a Root Port service driver attached +to the PCI Express Port Bus driver. If a user wants to use it, the driver +has to be compiled. Option CONFIG_PCIEAER supports this capability. It +depends on CONFIG_PCIEPORTBUS, so pls. set CONFIG_PCIEPORTBUS=y and +CONFIG_PCIEAER = y. + +2.2 Load PCI Express AER Root Driver +There is a case where a system has AER support in BIOS. Enabling the AER +Root driver and having AER support in BIOS may result unpredictable +behavior. To avoid this conflict, a successful load of the AER Root driver +requires ACPI _OSC support in the BIOS to allow the AER Root driver to +request for native control of AER. See the PCI FW 3.0 Specification for +details regarding OSC usage. Currently, lots of firmwares don't provide +_OSC support while they use PCI Express. To support such firmwares, +forceload, a parameter of type bool, could enable AER to continue to +be initiated although firmwares have no _OSC support. To enable the +walkaround, pls. add aerdriver.forceload=y to kernel boot parameter line +when booting kernel. Note that forceload=n by default. + +2.3 AER error output +When a PCI-E AER error is captured, an error message will be outputed to +console. If it's a correctable error, it is outputed as a warning. +Otherwise, it is printed as an error. So users could choose different +log level to filter out correctable error messages. + +Below shows an example. ++------ PCI-Express Device Error -----+ +Error Severity : Uncorrected (Fatal) +PCIE Bus Error type : Transaction Layer +Unsupported Request : First +Requester ID : 0500 +VendorID=8086h, DeviceID=0329h, Bus=05h, Device=00h, Function=00h +TLB Header: +04000001 00200a03 05010000 00050100 + +In the example, 'Requester ID' means the ID of the device who sends +the error message to root port. Pls. refer to pci express specs for +other fields. + + +3. Developer Guide + +To enable AER aware support requires a software driver to configure +the AER capability structure within its device and to provide callbacks. + +To support AER better, developers need understand how AER does work +firstly. + +PCI Express errors are classified into two types: correctable errors +and uncorrectable errors. This classification is based on the impacts +of those errors, which may result in degraded performance or function +failure. + +Correctable errors pose no impacts on the functionality of the +interface. The PCI Express protocol can recover without any software +intervention or any loss of data. These errors are detected and +corrected by hardware. Unlike correctable errors, uncorrectable +errors impact functionality of the interface. Uncorrectable errors +can cause a particular transaction or a particular PCI Express link +to be unreliable. Depending on those error conditions, uncorrectable +errors are further classified into non-fatal errors and fatal errors. +Non-fatal errors cause the particular transaction to be unreliable, +but the PCI Express link itself is fully functional. Fatal errors, on +the other hand, cause the link to be unreliable. + +When AER is enabled, a PCI Express device will automatically send an +error message to the PCIE root port above it when the device captures +an error. The Root Port, upon receiving an error reporting message, +internally processes and logs the error message in its PCI Express +capability structure. Error information being logged includes storing +the error reporting agent's requestor ID into the Error Source +Identification Registers and setting the error bits of the Root Error +Status Register accordingly. If AER error reporting is enabled in Root +Error Command Register, the Root Port generates an interrupt if an +error is detected. + +Note that the errors as described above are related to the PCI Express +hierarchy and links. These errors do not include any device specific +errors because device specific errors will still get sent directly to +the device driver. + +3.1 Configure the AER capability structure + +AER aware drivers of PCI Express component need change the device +control registers to enable AER. They also could change AER registers, +including mask and severity registers. Helper function +pci_enable_pcie_error_reporting could be used to enable AER. See +section 3.3. + +3.2. Provide callbacks + +3.2.1 callback reset_link to reset pci express link + +This callback is used to reset the pci express physical link when a +fatal error happens. The root port aer service driver provides a +default reset_link function, but different upstream ports might +have different specifications to reset pci express link, so all +upstream ports should provide their own reset_link functions. + +In struct pcie_port_service_driver, a new pointer, reset_link, is +added. + +pci_ers_result_t (*reset_link) (struct pci_dev *dev); + +Section 3.2.2.2 provides more detailed info on when to call +reset_link. + +3.2.2 PCI error-recovery callbacks + +The PCI Express AER Root driver uses error callbacks to coordinate +with downstream device drivers associated with a hierarchy in question +when performing error recovery actions. + +Data struct pci_driver has a pointer, err_handler, to point to +pci_error_handlers who consists of a couple of callback function +pointers. AER driver follows the rules defined in +pci-error-recovery.txt except pci express specific parts (e.g. +reset_link). Pls. refer to pci-error-recovery.txt for detailed +definitions of the callbacks. + +Below sections specify when to call the error callback functions. + +3.2.2.1 Correctable errors + +Correctable errors pose no impacts on the functionality of +the interface. The PCI Express protocol can recover without any +software intervention or any loss of data. These errors do not +require any recovery actions. The AER driver clears the device's +correctable error status register accordingly and logs these errors. + +3.2.2.2 Non-correctable (non-fatal and fatal) errors + +If an error message indicates a non-fatal error, performing link reset +at upstream is not required. The AER driver calls error_detected(dev, +pci_channel_io_normal) to all drivers associated within a hierarchy in +question. for example, +EndPoint<==>DownstreamPort B<==>UpstreamPort A<==>RootPort. +If Upstream port A captures an AER error, the hierarchy consists of +Downstream port B and EndPoint. + +A driver may return PCI_ERS_RESULT_CAN_RECOVER, +PCI_ERS_RESULT_DISCONNECT, or PCI_ERS_RESULT_NEED_RESET, depending on +whether it can recover or the AER driver calls mmio_enabled as next. + +If an error message indicates a fatal error, kernel will broadcast +error_detected(dev, pci_channel_io_frozen) to all drivers within +a hierarchy in question. Then, performing link reset at upstream is +necessary. As different kinds of devices might use different approaches +to reset link, AER port service driver is required to provide the +function to reset link. Firstly, kernel looks for if the upstream +component has an aer driver. If it has, kernel uses the reset_link +callback of the aer driver. If the upstream component has no aer driver +and the port is downstream port, we will use the aer driver of the +root port who reports the AER error. As for upstream ports, +they should provide their own aer service drivers with reset_link +function. If error_detected returns PCI_ERS_RESULT_CAN_RECOVER and +reset_link returns PCI_ERS_RESULT_RECOVERED, the error handling goes +to mmio_enabled. + +3.3 helper functions + +3.3.1 int pci_find_aer_capability(struct pci_dev *dev); +pci_find_aer_capability locates the PCI Express AER capability +in the device configuration space. If the device doesn't support +PCI-Express AER, the function returns 0. + +3.3.2 int pci_enable_pcie_error_reporting(struct pci_dev *dev); +pci_enable_pcie_error_reporting enables the device to send error +messages to root port when an error is detected. Note that devices +don't enable the error reporting by default, so device drivers need +call this function to enable it. + +3.3.3 int pci_disable_pcie_error_reporting(struct pci_dev *dev); +pci_disable_pcie_error_reporting disables the device to send error +messages to root port when an error is detected. + +3.3.4 int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); +pci_cleanup_aer_uncorrect_error_status cleanups the uncorrectable +error status register. + +3.4 Frequent Asked Questions + +Q: What happens if a PCI Express device driver does not provide an +error recovery handler (pci_driver->err_handler is equal to NULL)? + +A: The devices attached with the driver won't be recovered. If the +error is fatal, kernel will print out warning messages. Please refer +to section 3 for more information. + +Q: What happens if an upstream port service driver does not provide +callback reset_link? + +A: Fatal error recovery will fail if the errors are reported by the +upstream ports who are attached by the service driver. + +Q: How does this infrastructure deal with driver that is not PCI +Express aware? + +A: This infrastructure calls the error callback functions of the +driver when an error happens. But if the driver is not aware of +PCI Express, the device might not report its own errors to root +port. + +Q: What modifications will that driver need to make it compatible +with the PCI Express AER Root driver? + +A: It could call the helper functions to enable AER in devices and +cleanup uncorrectable status register. Pls. refer to section 3.3. + diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index fba1e05..d0e79d5 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt @@ -1,208 +1,553 @@ +Most of the code in Linux is device drivers, so most of the Linux power +management code is also driver-specific. Most drivers will do very little; +others, especially for platforms with small batteries (like cell phones), +will do a lot. + +This writeup gives an overview of how drivers interact with system-wide +power management goals, emphasizing the models and interfaces that are +shared by everything that hooks up to the driver model core. Read it as +background for the domain-specific work you'd do with any specific driver. + + +Two Models for Device Power Management +====================================== +Drivers will use one or both of these models to put devices into low-power +states: + + System Sleep model: + Drivers can enter low power states as part of entering system-wide + low-power states like "suspend-to-ram", or (mostly for systems with + disks) "hibernate" (suspend-to-disk). + + This is something that device, bus, and class drivers collaborate on + by implementing various role-specific suspend and resume methods to + cleanly power down hardware and software subsystems, then reactivate + them without loss of data. + + Some drivers can manage hardware wakeup events, which make the system + leave that low-power state. This feature may be disabled using the + relevant /sys/devices/.../power/wakeup file; enabling it may cost some + power usage, but let the whole system enter low power states more often. + + Runtime Power Management model: + Drivers may also enter low power states while the system is running, + independently of other power management activity. Upstream drivers + will normally not know (or care) if the device is in some low power + state when issuing requests; the driver will auto-resume anything + that's needed when it gets a request. + + This doesn't have, or need much infrastructure; it's just something you + should do when writing your drivers. For example, clk_disable() unused + clocks as part of minimizing power drain for currently-unused hardware. + Of course, sometimes clusters of drivers will collaborate with each + other, which could involve task-specific power management. + +There's not a lot to be said about those low power states except that they +are very system-specific, and often device-specific. Also, that if enough +drivers put themselves into low power states (at "runtime"), the effect may be +the same as entering some system-wide low-power state (system sleep) ... and +that synergies exist, so that several drivers using runtime pm might put the +system into a state where even deeper power saving options are available. + +Most suspended devices will have quiesced all I/O: no more DMA or irqs, no +more data read or written, and requests from upstream drivers are no longer +accepted. A given bus or platform may have different requirements though. + +Examples of hardware wakeup events include an alarm from a real time clock, +network wake-on-LAN packets, keyboard or mouse activity, and media insertion +or removal (for PCMCIA, MMC/SD, USB, and so on). + + +Interfaces for Entering System Sleep States +=========================================== +Most of the programming interfaces a device driver needs to know about +relate to that first model: entering a system-wide low power state, +rather than just minimizing power consumption by one device. + + +Bus Driver Methods +------------------ +The core methods to suspend and resume devices reside in struct bus_type. +These are mostly of interest to people writing infrastructure for busses +like PCI or USB, or because they define the primitives that device drivers +may need to apply in domain-specific ways to their devices: -Device Power Management - - -Device power management encompasses two areas - the ability to save -state and transition a device to a low-power state when the system is -entering a low-power state; and the ability to transition a device to -a low-power state while the system is running (and independently of -any other power management activity). - - -Methods +struct bus_type { + ... + int (*suspend)(struct device *dev, pm_message_t state); + int (*suspend_late)(struct device *dev, pm_message_t state); -The methods to suspend and resume devices reside in struct bus_type: + int (*resume_early)(struct device *dev); + int (*resume)(struct device *dev); +}; -struct bus_type { - ... - int (*suspend)(struct device * dev, pm_message_t state); - int (*resume)(struct device * dev); +Bus drivers implement those methods as appropriate for the hardware and +the drivers using it; PCI works differently from USB, and so on. Not many +people write bus drivers; most driver code is a "device driver" that +builds on top of bus-specific framework code. + +For more information on these driver calls, see the description later; +they are called in phases for every device, respecting the parent-child +sequencing in the driver model tree. Note that as this is being written, +only the suspend() and resume() are widely available; not many bus drivers +leverage all of those phases, or pass them down to lower driver levels. + + +/sys/devices/.../power/wakeup files +----------------------------------- +All devices in the driver model have two flags to control handling of +wakeup events, which are hardware signals that can force the device and/or +system out of a low power state. These are initialized by bus or device +driver code using device_init_wakeup(dev,can_wakeup). + +The "can_wakeup" flag just records whether the device (and its driver) can +physically support wakeup events. When that flag is clear, the sysfs +"wakeup" file is empty, and device_may_wakeup() returns false. + +For devices that can issue wakeup events, a separate flag controls whether +that device should try to use its wakeup mechanism. The initial value of +device_may_wakeup() will be true, so that the device's "wakeup" file holds +the value "enabled". Userspace can change that to "disabled" so that +device_may_wakeup() returns false; or change it back to "enabled" (so that +it returns true again). + + +EXAMPLE: PCI Device Driver Methods +----------------------------------- +PCI framework software calls these methods when the PCI device driver bound +to a device device has provided them: + +struct pci_driver { + ... + int (*suspend)(struct pci_device *pdev, pm_message_t state); + int (*suspend_late)(struct pci_device *pdev, pm_message_t state); + + int (*resume_early)(struct pci_device *pdev); + int (*resume)(struct pci_device *pdev); }; -Each bus driver is responsible implementing these methods, translating -the call into a bus-specific request and forwarding the call to the -bus-specific drivers. For example, PCI drivers implement suspend() and -resume() methods in struct pci_driver. The PCI core is simply -responsible for translating the pointers to PCI-specific ones and -calling the low-level driver. - -This is done to a) ease transition to the new power management methods -and leverage the existing PM code in various bus drivers; b) allow -buses to implement generic and default PM routines for devices, and c) -make the flow of execution obvious to the reader. - - -System Power Management - -When the system enters a low-power state, the device tree is walked in -a depth-first fashion to transition each device into a low-power -state. The ordering of the device tree is guaranteed by the order in -which devices get registered - children are never registered before -their ancestors, and devices are placed at the back of the list when -registered. By walking the list in reverse order, we are guaranteed to -suspend devices in the proper order. - -Devices are suspended once with interrupts enabled. Drivers are -expected to stop I/O transactions, save device state, and place the -device into a low-power state. Drivers may sleep, allocate memory, -etc. at will. - -Some devices are broken and will inevitably have problems powering -down or disabling themselves with interrupts enabled. For these -special cases, they may return -EAGAIN. This will put the device on a -list to be taken care of later. When interrupts are disabled, before -we enter the low-power state, their drivers are called again to put -their device to sleep. - -On resume, the devices that returned -EAGAIN will be called to power -themselves back on with interrupts disabled. Once interrupts have been -re-enabled, the rest of the drivers will be called to resume their -devices. On resume, a driver is responsible for powering back on each -device, restoring state, and re-enabling I/O transactions for that -device. +Drivers will implement those methods, and call PCI-specific procedures +like pci_set_power_state(), pci_enable_wake(), pci_save_state(), and +pci_restore_state() to manage PCI-specific mechanisms. (PCI config space +could be saved during driver probe, if it weren't for the fact that some +systems rely on userspace tweaking using setpci.) Devices are suspended +before their bridges enter low power states, and likewise bridges resume +before their devices. + + +Upper Layers of Driver Stacks +----------------------------- +Device drivers generally have at least two interfaces, and the methods +sketched above are the ones which apply to the lower level (nearer PCI, USB, +or other bus hardware). The network and block layers are examples of upper +level interfaces, as is a character device talking to userspace. + +Power management requests normally need to flow through those upper levels, +which often use domain-oriented requests like "blank that screen". In +some cases those upper levels will have power management intelligence that +relates to end-user activity, or other devices that work in cooperation. + +When those interfaces are structured using class interfaces, there is a +standard way to have the upper layer stop issuing requests to a given +class device (and restart later): + +struct class { + ... + int (*suspend)(struct device *dev, pm_message_t state); + int (*resume)(struct device *dev); +}; +Those calls are issued in specific phases of the process by which the +system enters a low power "suspend" state, or resumes from it. + + +Calling Drivers to Enter System Sleep States +============================================ +When the system enters a low power state, each device's driver is asked +to suspend the device by putting it into state compatible with the target +system state. That's usually some version of "off", but the details are +system-specific. Also, wakeup-enabled devices will usually stay partly +functional in order to wake the system. + +When the system leaves that low power state, the device's driver is asked +to resume it. The suspend and resume operations always go together, and +both are multi-phase operations. + +For simple drivers, suspend might quiesce the device using the class code +and then turn its hardware as "off" as possible with late_suspend. The +matching resume calls would then completely reinitialize the hardware +before reactivating its class I/O queues. + +More power-aware drivers drivers will use more than one device low power +state, either at runtime or during system sleep states, and might trigger +system wakeup events. + + +Call Sequence Guarantees +------------------------ +To ensure that bridges and similar links needed to talk to a device are +available when the device is suspended or resumed, the device tree is +walked in a bottom-up order to suspend devices. A top-down order is +used to resume those devices. + +The ordering of the device tree is defined by the order in which devices +get registered: a child can never be registered, probed or resumed before +its parent; and can't be removed or suspended after that parent. + +The policy is that the device tree should match hardware bus topology. +(Or at least the control bus, for devices which use multiple busses.) + + +Suspending Devices +------------------ +Suspending a given device is done in several phases. Suspending the +system always includes every phase, executing calls for every device +before the next phase begins. Not all busses or classes support all +these callbacks; and not all drivers use all the callbacks. + +The phases are seen by driver notifications issued in this order: + + 1 class.suspend(dev, message) is called after tasks are frozen, for + devices associated with a class that has such a method. This + method may sleep. + + Since I/O activity usually comes from such higher layers, this is + a good place to quiesce all drivers of a given type (and keep such + code out of those drivers). + + 2 bus.suspend(dev, message) is called next. This method may sleep, + and is often morphed into a device driver call with bus-specific + parameters and/or rules. + + This call should handle parts of device suspend logic that require + sleeping. It probably does work to quiesce the device which hasn't + been abstracted into class.suspend() or bus.suspend_late(). + + 3 bus.suspend_late(dev, message) is called with IRQs disabled, and + with only one CPU active. Until the bus.resume_early() phase + completes (see later), IRQs are not enabled again. This method + won't be exposed by all busses; for message based busses like USB, + I2C, or SPI, device interactions normally require IRQs. This bus + call may be morphed into a driver call with bus-specific parameters. + + This call might save low level hardware state that might otherwise + be lost in the upcoming low power state, and actually put the + device into a low power state ... so that in some cases the device + may stay partly usable until this late. This "late" call may also + help when coping with hardware that behaves badly. + +The pm_message_t parameter is currently used to refine those semantics +(described later). + +At the end of those phases, drivers should normally have stopped all I/O +transactions (DMA, IRQs), saved enough state that they can re-initialize +or restore previous state (as needed by the hardware), and placed the +device into a low-power state. On many platforms they will also use +clk_disable() to gate off one or more clock sources; sometimes they will +also switch off power supplies, or reduce voltages. Drivers which have +runtime PM support may already have performed some or all of the steps +needed to prepare for the upcoming system sleep state. + +When any driver sees that its device_can_wakeup(dev), it should make sure +to use the relevant hardware signals to trigger a system wakeup event. +For example, enable_irq_wake() might identify GPIO signals hooked up to +a switch or other external hardware, and pci_enable_wake() does something +similar for PCI's PME# signal. + +If a driver (or bus, or class) fails it suspend method, the system won't +enter the desired low power state; it will resume all the devices it's +suspended so far. + +Note that drivers may need to perform different actions based on the target +system lowpower/sleep state. At this writing, there are only platform +specific APIs through which drivers could determine those target states. + + +Device Low Power (suspend) States +--------------------------------- +Device low-power states aren't very standard. One device might only handle +"on" and "off, while another might support a dozen different versions of +"on" (how many engines are active?), plus a state that gets back to "on" +faster than from a full "off". + +Some busses define rules about what different suspend states mean. PCI +gives one example: after the suspend sequence completes, a non-legacy +PCI device may not perform DMA or issue IRQs, and any wakeup events it +issues would be issued through the PME# bus signal. Plus, there are +several PCI-standard device states, some of which are optional. + +In contrast, integrated system-on-chip processors often use irqs as the +wakeup event sources (so drivers would call enable_irq_wake) and might +be able to treat DMA completion as a wakeup event (sometimes DMA can stay +active too, it'd only be the CPU and some peripherals that sleep). + +Some details here may be platform-specific. Systems may have devices that +can be fully active in certain sleep states, such as an LCD display that's +refreshed using DMA while most of the system is sleeping lightly ... and +its frame buffer might even be updated by a DSP or other non-Linux CPU while +the Linux control processor stays idle. + +Moreover, the specific actions taken may depend on the target system state. +One target system state might allow a given device to be very operational; +another might require a hard shut down with re-initialization on resume. +And two different target systems might use the same device in different +ways; the aforementioned LCD might be active in one product's "standby", +but a different product using the same SOC might work differently. + + +Meaning of pm_message_t.event +----------------------------- +Parameters to suspend calls include the device affected and a message of +type pm_message_t, which has one field: the event. If driver does not +recognize the event code, suspend calls may abort the request and return +a negative errno. However, most drivers will be fine if they implement +PM_EVENT_SUSPEND semantics for all messages. + +The event codes are used to refine the goal of suspending the device, and +mostly matter when creating or resuming system memory image snapshots, as +used with suspend-to-disk: + + PM_EVENT_SUSPEND -- quiesce the driver and put hardware into a low-power + state. When used with system sleep states like "suspend-to-RAM" or + "standby", the upcoming resume() call will often be able to rely on + state kept in hardware, or issue system wakeup events. When used + instead with suspend-to-disk, few devices support this capability; + most are completely powered off. + + PM_EVENT_FREEZE -- quiesce the driver, but don't necessarily change into + any low power mode. A system snapshot is about to be taken, often + followed by a call to the driver's resume() method. Neither wakeup + events nor DMA are allowed. + + PM_EVENT_PRETHAW -- quiesce the driver, knowing that the upcoming resume() + will restore a suspend-to-disk snapshot from a different kernel image. + Drivers that are smart enough to look at their hardware state during + resume() processing need that state to be correct ... a PRETHAW could + be used to invalidate that state (by resetting the device), like a + shutdown() invocation would before a kexec() or system halt. Other + drivers might handle this the same way as PM_EVENT_FREEZE. Neither + wakeup events nor DMA are allowed. + +To enter "standby" (ACPI S1) or "Suspend to RAM" (STR, ACPI S3) states, or +the similarly named APM states, only PM_EVENT_SUSPEND is used; for "Suspend +to Disk" (STD, hibernate, ACPI S4), all of those event codes are used. + +There's also PM_EVENT_ON, a value which never appears as a suspend event +but is sometimes used to record the "not suspended" device state. + + +Resuming Devices +---------------- +Resuming is done in multiple phases, much like suspending, with all +devices processing each phase's calls before the next phase begins. + +The phases are seen by driver notifications issued in this order: + + 1 bus.resume_early(dev) is called with IRQs disabled, and with + only one CPU active. As with bus.suspend_late(), this method + won't be supported on busses that require IRQs in order to + interact with devices. + + This reverses the effects of bus.suspend_late(). + + 2 bus.resume(dev) is called next. This may be morphed into a device + driver call with bus-specific parameters; implementations may sleep. + + This reverses the effects of bus.suspend(). + + 3 class.resume(dev) is called for devices associated with a class + that has such a method. Implementations may sleep. + + This reverses the effects of class.suspend(), and would usually + reactivate the device's I/O queue. + +At the end of those phases, drivers should normally be as functional as +they were before suspending: I/O can be performed using DMA and IRQs, and +the relevant clocks are gated on. The device need not be "fully on"; it +might be in a runtime lowpower/suspend state that acts as if it were. + +However, the details here may again be platform-specific. For example, +some systems support multiple "run" states, and the mode in effect at +the end of resume() might not be the one which preceded suspension. +That means availability of certain clocks or power supplies changed, +which could easily affect how a driver works. + + +Drivers need to be able to handle hardware which has been reset since the +suspend methods were called, for example by complete reinitialization. +This may be the hardest part, and the one most protected by NDA'd documents +and chip errata. It's simplest if the hardware state hasn't changed since +the suspend() was called, but that can't always be guaranteed. + +Drivers must also be prepared to notice that the device has been removed +while the system was powered off, whenever that's physically possible. +PCMCIA, MMC, USB, Firewire, SCSI, and even IDE are common examples of busses +where common Linux platforms will see such removal. Details of how drivers +will notice and handle such removals are currently bus-specific, and often +involve a separate thread. + + +Note that the bus-specific runtime PM wakeup mechanism can exist, and might +be defined to share some of the same driver code as for system wakeup. For +example, a bus-specific device driver's resume() method might be used there, +so it wouldn't only be called from bus.resume() during system-wide wakeup. +See bus-specific information about how runtime wakeup events are handled. + + +System Devices +-------------- System devices follow a slightly different API, which can be found in include/linux/sysdev.h drivers/base/sys.c -System devices will only be suspended with interrupts disabled, and -after all other devices have been suspended. On resume, they will be -resumed before any other devices, and also with interrupts disabled. +System devices will only be suspended with interrupts disabled, and after +all other devices have been suspended. On resume, they will be resumed +before any other devices, and also with interrupts disabled. +That is, IRQs are disabled, the suspend_late() phase begins, then the +sysdev_driver.suspend() phase, and the system enters a sleep state. Then +the sysdev_driver.resume() phase begins, followed by the resume_early() +phase, after which IRQs are enabled. -Runtime Power Management +Code to actually enter and exit the system-wide low power state sometimes +involves hardware details that are only known to the boot firmware, and +may leave a CPU running software (from SRAM or flash memory) that monitors +the system and manages its wakeup sequence. -Many devices are able to dynamically power down while the system is -still running. This feature is useful for devices that are not being -used, and can offer significant power savings on a running system. - -In each device's directory, there is a 'power' directory, which -contains at least a 'state' file. Reading from this file displays what -power state the device is currently in. Writing to this file initiates -a transition to the specified power state, which must be a decimal in -the range 1-3, inclusive; or 0 for 'On'. - -The PM core will call the ->suspend() method in the bus_type object -that the device belongs to if the specified state is not 0, or -->resume() if it is. - -Nothing will happen if the specified state is the same state the -device is currently in. - -If the device is already in a low-power state, and the specified state -is another, but different, low-power state, the ->resume() method will -first be called to power the device back on, then ->suspend() will be -called again with the new state. - -The driver is responsible for saving the working state of the device -and putting it into the low-power state specified. If this was -successful, it returns 0, and the device's power_state field is -updated. - -The driver must take care to know whether or not it is able to -properly resume the device, including all step of reinitialization -necessary. (This is the hardest part, and the one most protected by -NDA'd documents). - -The driver must also take care not to suspend a device that is -currently in use. It is their responsibility to provide their own -exclusion mechanisms. - -The runtime power transition happens with interrupts enabled. If a -device cannot support being powered down with interrupts, it may -return -EAGAIN (as it would during a system power management -transition), but it will _not_ be called again, and the transaction -will fail. - -There is currently no way to know what states a device or driver -supports a priori. This will change in the future. - -pm_message_t meaning - -pm_message_t has two fields. event ("major"), and flags. If driver -does not know event code, it aborts the request, returning error. Some -drivers may need to deal with special cases based on the actual type -of suspend operation being done at the system level. This is why -there are flags. - -Event codes are: - -ON -- no need to do anything except special cases like broken -HW. - -# NOTIFICATION -- pretty much same as ON? - -FREEZE -- stop DMA and interrupts, and be prepared to reinit HW from -scratch. That probably means stop accepting upstream requests, the -actual policy of what to do with them being specific to a given -driver. It's acceptable for a network driver to just drop packets -while a block driver is expected to block the queue so no request is -lost. (Use IDE as an example on how to do that). FREEZE requires no -power state change, and it's expected for drivers to be able to -quickly transition back to operating state. - -SUSPEND -- like FREEZE, but also put hardware into low-power state. If -there's need to distinguish several levels of sleep, additional flag -is probably best way to do that. - -Transitions are only from a resumed state to a suspended state, never -between 2 suspended states. (ON -> FREEZE or ON -> SUSPEND can happen, -FREEZE -> SUSPEND or SUSPEND -> FREEZE can not). - -All events are: - -[NOTE NOTE NOTE: If you are driver author, you should not care; you -should only look at event, and ignore flags.] - -#Prepare for suspend -- userland is still running but we are going to -#enter suspend state. This gives drivers chance to load firmware from -#disk and store it in memory, or do other activities taht require -#operating userland, ability to kmalloc GFP_KERNEL, etc... All of these -#are forbiden once the suspend dance is started.. event = ON, flags = -#PREPARE_TO_SUSPEND - -Apm standby -- prepare for APM event. Quiesce devices to make life -easier for APM BIOS. event = FREEZE, flags = APM_STANDBY - -Apm suspend -- same as APM_STANDBY, but it we should probably avoid -spinning down disks. event = FREEZE, flags = APM_SUSPEND - -System halt, reboot -- quiesce devices to make life easier for BIOS. event -= FREEZE, flags = SYSTEM_HALT or SYSTEM_REBOOT - -System shutdown -- at least disks need to be spun down, or data may be -lost. Quiesce devices, just to make life easier for BIOS. event = -FREEZE, flags = SYSTEM_SHUTDOWN - -Kexec -- turn off DMAs and put hardware into some state where new -kernel can take over. event = FREEZE, flags = KEXEC - -Powerdown at end of swsusp -- very similar to SYSTEM_SHUTDOWN, except wake -may need to be enabled on some devices. This actually has at least 3 -subtypes, system can reboot, enter S4 and enter S5 at the end of -swsusp. event = FREEZE, flags = SWSUSP and one of SYSTEM_REBOOT, -SYSTEM_SHUTDOWN, SYSTEM_S4 - -Suspend to ram -- put devices into low power state. event = SUSPEND, -flags = SUSPEND_TO_RAM - -Freeze for swsusp snapshot -- stop DMA and interrupts. No need to put -devices into low power mode, but you must be able to reinitialize -device from scratch in resume method. This has two flavors, its done -once on suspending kernel, once on resuming kernel. event = FREEZE, -flags = DURING_SUSPEND or DURING_RESUME - -Device detach requested from /sys -- deinitialize device; proably same as -SYSTEM_SHUTDOWN, I do not understand this one too much. probably event -= FREEZE, flags = DEV_DETACH. - -#These are not really events sent: -# -#System fully on -- device is working normally; this is probably never -#passed to suspend() method... event = ON, flags = 0 -# -#Ready after resume -- userland is now running, again. Time to free any -#memory you ate during prepare to suspend... event = ON, flags = -#READY_AFTER_RESUME -# + +Runtime Power Management +======================== +Many devices are able to dynamically power down while the system is still +running. This feature is useful for devices that are not being used, and +can offer significant power savings on a running system. These devices +often support a range of runtime power states, which might use names such +as "off", "sleep", "idle", "active", and so on. Those states will in some +cases (like PCI) be partially constrained by a bus the device uses, and will +usually include hardware states that are also used in system sleep states. + +However, note that if a driver puts a device into a runtime low power state +and the system then goes into a system-wide sleep state, it normally ought +to resume into that runtime low power state rather than "full on". Such +distinctions would be part of the driver-internal state machine for that +hardware; the whole point of runtime power management is to be sure that +drivers are decoupled in that way from the state machine governing phases +of the system-wide power/sleep state transitions. + + +Power Saving Techniques +----------------------- +Normally runtime power management is handled by the drivers without specific +userspace or kernel intervention, by device-aware use of techniques like: + + Using information provided by other system layers + - stay deeply "off" except between open() and close() + - if transceiver/PHY indicates "nobody connected", stay "off" + - application protocols may include power commands or hints + + Using fewer CPU cycles + - using DMA instead of PIO + - removing timers, or making them lower frequency + - shortening "hot" code paths + - eliminating cache misses + - (sometimes) offloading work to device firmware + + Reducing other resource costs + - gating off unused clocks in software (or hardware) + - switching off unused power supplies + - eliminating (or delaying/merging) IRQs + - tuning DMA to use word and/or burst modes + + Using device-specific low power states + - using lower voltages + - avoiding needless DMA transfers + +Read your hardware documentation carefully to see the opportunities that +may be available. If you can, measure the actual power usage and check +it against the budget established for your project. + + +Examples: USB hosts, system timer, system CPU +---------------------------------------------- +USB host controllers make interesting, if complex, examples. In many cases +these have no work to do: no USB devices are connected, or all of them are +in the USB "suspend" state. Linux host controller drivers can then disable +periodic DMA transfers that would otherwise be a constant power drain on the +memory subsystem, and enter a suspend state. In power-aware controllers, +entering that suspend state may disable the clock used with USB signaling, +saving a certain amount of power. + +The controller will be woken from that state (with an IRQ) by changes to the +signal state on the data lines of a given port, for example by an existing +peripheral requesting "remote wakeup" or by plugging a new peripheral. The +same wakeup mechanism usually works from "standby" sleep states, and on some +systems also from "suspend to RAM" (or even "suspend to disk") states. +(Except that ACPI may be involved instead of normal IRQs, on some hardware.) + +System devices like timers and CPUs may have special roles in the platform +power management scheme. For example, system timers using a "dynamic tick" +approach don't just save CPU cycles (by eliminating needless timer IRQs), +but they may also open the door to using lower power CPU "idle" states that +cost more than a jiffie to enter and exit. On x86 systems these are states +like "C3"; note that periodic DMA transfers from a USB host controller will +also prevent entry to a C3 state, much like a periodic timer IRQ. + +That kind of runtime mechanism interaction is common. "System On Chip" (SOC) +processors often have low power idle modes that can't be entered unless +certain medium-speed clocks (often 12 or 48 MHz) are gated off. When the +drivers gate those clocks effectively, then the system idle task may be able +to use the lower power idle modes and thereby increase battery life. + +If the CPU can have a "cpufreq" driver, there also may be opportunities +to shift to lower voltage settings and reduce the power cost of executing +a given number of instructions. (Without voltage adjustment, it's rare +for cpufreq to save much power; the cost-per-instruction must go down.) + + +/sys/devices/.../power/state files +================================== +For now you can also test some of this functionality using sysfs. + + DEPRECATED: USE "power/state" ONLY FOR DRIVER TESTING, AND + AVOID USING dev->power.power_state IN DRIVERS. + + THESE WILL BE REMOVED. IF THE "power/state" FILE GETS REPLACED, + IT WILL BECOME SOMETHING COUPLED TO THE BUS OR DRIVER. + +In each device's directory, there is a 'power' directory, which contains +at least a 'state' file. The value of this field is effectively boolean, +PM_EVENT_ON or PM_EVENT_SUSPEND. + + * Reading from this file displays a value corresponding to + the power.power_state.event field. All nonzero values are + displayed as "2", corresponding to a low power state; zero + is displayed as "0", corresponding to normal operation. + + * Writing to this file initiates a transition using the + specified event code number; only '0', '2', and '3' are + accepted (without a newline); '2' and '3' are both + mapped to PM_EVENT_SUSPEND. + +On writes, the PM core relies on that recorded event code and the device/bus +capabilities to determine whether it uses a partial suspend() or resume() +sequence to change things so that the recorded event corresponds to the +numeric parameter. + + - If the bus requires the irqs-disabled suspend_late()/resume_early() + phases, writes fail because those operations are not supported here. + + - If the recorded value is the expected value, nothing is done. + + - If the recorded value is nonzero, the device is partially resumed, + using the bus.resume() and/or class.resume() methods. + + - If the target value is nonzero, the device is partially suspended, + using the class.suspend() and/or bus.suspend() methods and the + PM_EVENT_SUSPEND message. + +Drivers have no way to tell whether their suspend() and resume() calls +have come through the sysfs power/state file or as part of entering a +system sleep state, except that when accessed through sysfs the normal +parent/child sequencing rules are ignored. Drivers (such as bus, bridge, +or hub drivers) which expose child devices may need to enforce those rules +on their own. diff --git a/Documentation/power/interface.txt b/Documentation/power/interface.txt index 4117802..a66bec2 100644 --- a/Documentation/power/interface.txt +++ b/Documentation/power/interface.txt @@ -52,3 +52,18 @@ suspend image will be as small as possib Reading from this file will display the current image size limit, which is set to 500 MB by default. + +/sys/power/pm_trace controls the code which saves the last PM event point in +the RTC across reboots, so that you can debug a machine that just hangs +during suspend (or more commonly, during resume). Namely, the RTC is only +used to save the last PM event point if this file contains '1'. Initially it +contains '0' which may be changed to '1' by writing a string representing a +nonzero integer into it. + +To use this debugging feature you should attempt to suspend the machine, then +reboot it and run + + dmesg -s 1000000 | grep 'hash matches' + +CAUTION: Using it will cause your machine's real-time (CMOS) clock to be +set to a random invalid time after a resume. diff --git a/Documentation/rt-mutex-design.txt b/Documentation/rt-mutex-design.txt index c472ffa..4b736d2 100644 --- a/Documentation/rt-mutex-design.txt +++ b/Documentation/rt-mutex-design.txt @@ -333,11 +333,11 @@ cmpxchg is basically the following funct unsigned long _cmpxchg(unsigned long *A, unsigned long *B, unsigned long *C) { - unsigned long T = *A; - if (*A == *B) { - *A = *C; - } - return T; + unsigned long T = *A; + if (*A == *B) { + *A = *C; + } + return T; } #define cmpxchg(a,b,c) _cmpxchg(&a,&b,&c) @@ -582,7 +582,7 @@ contention). try_to_take_rt_mutex is used every time the task tries to grab a mutex in the slow path. The first thing that is done here is an atomic setting of the "Has Waiters" flag of the mutex's owner field. Yes, this could really -be false, because if the the mutex has no owner, there are no waiters and +be false, because if the mutex has no owner, there are no waiters and the current task also won't have any waiters. But we don't have the lock yet, so we assume we are going to be a waiter. The reason for this is to play nice for those architectures that do have CMPXCHG. By setting this flag @@ -735,7 +735,7 @@ do have CMPXCHG, that check is done in t in the slow path too. If a waiter of a mutex woke up because of a signal or timeout between the time the owner failed the fast path CMPXCHG check and the grabbing of the wait_lock, the mutex may not have any waiters, thus the -owner still needs to make this check. If there are no waiters than the mutex +owner still needs to make this check. If there are no waiters then the mutex owner field is set to NULL, the wait_lock is released and nothing more is needed. diff --git a/Documentation/scsi/ChangeLog.arcmsr b/Documentation/scsi/ChangeLog.arcmsr new file mode 100644 index 0000000..162c47f --- /dev/null +++ b/Documentation/scsi/ChangeLog.arcmsr @@ -0,0 +1,56 @@ +************************************************************************** +** History +** +** REV# DATE NAME DESCRIPTION +** 1.00.00.00 3/31/2004 Erich Chen First release +** 1.10.00.04 7/28/2004 Erich Chen modify for ioctl +** 1.10.00.06 8/28/2004 Erich Chen modify for 2.6.x +** 1.10.00.08 9/28/2004 Erich Chen modify for x86_64 +** 1.10.00.10 10/10/2004 Erich Chen bug fix for SMP & ioctl +** 1.20.00.00 11/29/2004 Erich Chen bug fix with arcmsr_bus_reset when PHY error +** 1.20.00.02 12/09/2004 Erich Chen bug fix with over 2T bytes RAID Volume +** 1.20.00.04 1/09/2005 Erich Chen fits for Debian linux kernel version 2.2.xx +** 1.20.00.05 2/20/2005 Erich Chen cleanly as look like a Linux driver at 2.6.x +** thanks for peoples kindness comment +** Kornel Wieliczek +** Christoph Hellwig +** Adrian Bunk +** Andrew Morton +** Christoph Hellwig +** James Bottomley +** Arjan van de Ven +** 1.20.00.06 3/12/2005 Erich Chen fix with arcmsr_pci_unmap_dma "unsigned long" cast, +** modify PCCB POOL allocated by "dma_alloc_coherent" +** (Kornel Wieliczek's comment) +** 1.20.00.07 3/23/2005 Erich Chen bug fix with arcmsr_scsi_host_template_init +** occur segmentation fault, +** if RAID adapter does not on PCI slot +** and modprobe/rmmod this driver twice. +** bug fix enormous stack usage (Adrian Bunk's comment) +** 1.20.00.08 6/23/2005 Erich Chen bug fix with abort command, +** in case of heavy loading when sata cable +** working on low quality connection +** 1.20.00.09 9/12/2005 Erich Chen bug fix with abort command handling, firmware version check +** and firmware update notify for hardware bug fix +** 1.20.00.10 9/23/2005 Erich Chen enhance sysfs function for change driver's max tag Q number. +** add DMA_64BIT_MASK for backward compatible with all 2.6.x +** add some useful message for abort command +** add ioctl code 'ARCMSR_IOCTL_FLUSH_ADAPTER_CACHE' +** customer can send this command for sync raid volume data +** 1.20.00.11 9/29/2005 Erich Chen by comment of Arjan van de Ven fix incorrect msleep redefine +** cast off sizeof(dma_addr_t) condition for 64bit pci_set_dma_mask +** 1.20.00.12 9/30/2005 Erich Chen bug fix with 64bit platform's ccbs using if over 4G system memory +** change 64bit pci_set_consistent_dma_mask into 32bit +** increcct adapter count if adapter initialize fail. +** miss edit at arcmsr_build_ccb.... +** psge += sizeof(struct _SG64ENTRY *) => +** psge += sizeof(struct _SG64ENTRY) +** 64 bits sg entry would be incorrectly calculated +** thanks Kornel Wieliczek give me kindly notify +** and detail description +** 1.20.00.13 11/15/2005 Erich Chen scheduling pending ccb with FIFO +** change the architecture of arcmsr command queue list +** for linux standard list +** enable usage of pci message signal interrupt +** follow Randy.Danlup kindness suggestion cleanup this code +************************************************************************** \ No newline at end of file diff --git a/Documentation/scsi/aacraid.txt b/Documentation/scsi/aacraid.txt index be55670..ee03678 100644 --- a/Documentation/scsi/aacraid.txt +++ b/Documentation/scsi/aacraid.txt @@ -11,38 +11,43 @@ the original). Supported Cards/Chipsets ------------------------- PCI ID (pci.ids) OEM Product - 9005:0285:9005:028a Adaptec 2020ZCR (Skyhawk) - 9005:0285:9005:028e Adaptec 2020SA (Skyhawk) - 9005:0285:9005:028b Adaptec 2025ZCR (Terminator) - 9005:0285:9005:028f Adaptec 2025SA (Terminator) - 9005:0285:9005:0286 Adaptec 2120S (Crusader) - 9005:0286:9005:028d Adaptec 2130S (Lancer) + 9005:0283:9005:0283 Adaptec Catapult (3210S with arc firmware) + 9005:0284:9005:0284 Adaptec Tomcat (3410S with arc firmware) 9005:0285:9005:0285 Adaptec 2200S (Vulcan) + 9005:0285:9005:0286 Adaptec 2120S (Crusader) 9005:0285:9005:0287 Adaptec 2200S (Vulcan-2m) + 9005:0285:9005:0288 Adaptec 3230S (Harrier) + 9005:0285:9005:0289 Adaptec 3240S (Tornado) + 9005:0285:9005:028a Adaptec 2020ZCR (Skyhawk) + 9005:0285:9005:028b Adaptec 2025ZCR (Terminator) 9005:0286:9005:028c Adaptec 2230S (Lancer) 9005:0286:9005:028c Adaptec 2230SLP (Lancer) - 9005:0285:9005:0296 Adaptec 2240S (SabreExpress) + 9005:0286:9005:028d Adaptec 2130S (Lancer) + 9005:0285:9005:028e Adaptec 2020SA (Skyhawk) + 9005:0285:9005:028f Adaptec 2025SA (Terminator) 9005:0285:9005:0290 Adaptec 2410SA (Jaguar) - 9005:0285:9005:0293 Adaptec 21610SA (Corsair-16) 9005:0285:103c:3227 Adaptec 2610SA (Bearcat HP release) + 9005:0285:9005:0293 Adaptec 21610SA (Corsair-16) + 9005:0285:9005:0296 Adaptec 2240S (SabreExpress) 9005:0285:9005:0292 Adaptec 2810SA (Corsair-8) 9005:0285:9005:0294 Adaptec Prowler - 9005:0286:9005:029d Adaptec 2420SA (Intruder HP release) - 9005:0286:9005:029c Adaptec 2620SA (Intruder) - 9005:0286:9005:029b Adaptec 2820SA (Intruder) - 9005:0286:9005:02a7 Adaptec 2830SA (Skyray) - 9005:0286:9005:02a8 Adaptec 2430SA (Skyray) - 9005:0285:9005:0288 Adaptec 3230S (Harrier) - 9005:0285:9005:0289 Adaptec 3240S (Tornado) - 9005:0285:9005:0298 Adaptec 4000SAS (BlackBird) 9005:0285:9005:0297 Adaptec 4005SAS (AvonPark) + 9005:0285:9005:0298 Adaptec 4000SAS (BlackBird) 9005:0285:9005:0299 Adaptec 4800SAS (Marauder-X) 9005:0285:9005:029a Adaptec 4805SAS (Marauder-E) + 9005:0286:9005:029b Adaptec 2820SA (Intruder) + 9005:0286:9005:029c Adaptec 2620SA (Intruder) + 9005:0286:9005:029d Adaptec 2420SA (Intruder HP release) 9005:0286:9005:02a2 Adaptec 3800SAS (Hurricane44) + 9005:0286:9005:02a7 Adaptec 3805SAS (Hurricane80) + 9005:0286:9005:02a8 Adaptec 3400SAS (Hurricane40) + 9005:0286:9005:02ac Adaptec 1800SAS (Typhoon44) + 9005:0286:9005:02b3 Adaptec 2400SAS (Hurricane40lm) + 9005:0285:9005:02b5 Adaptec ASR5800 (Voodoo44) + 9005:0285:9005:02b6 Adaptec ASR5805 (Voodoo80) + 9005:0285:9005:02b7 Adaptec ASR5808 (Voodoo08) 1011:0046:9005:0364 Adaptec 5400S (Mustang) 1011:0046:9005:0365 Adaptec 5400S (Mustang) - 9005:0283:9005:0283 Adaptec Catapult (3210S with arc firmware) - 9005:0284:9005:0284 Adaptec Tomcat (3410S with arc firmware) 9005:0287:9005:0800 Adaptec Themisto (Jupiter) 9005:0200:9005:0200 Adaptec Themisto (Jupiter) 9005:0286:9005:0800 Adaptec Callisto (Jupiter) @@ -64,18 +69,20 @@ Supported Cards/Chipsets 9005:0285:9005:0290 IBM ServeRAID 7t (Jaguar) 9005:0285:1014:02F2 IBM ServeRAID 8i (AvonPark) 9005:0285:1014:0312 IBM ServeRAID 8i (AvonParkLite) - 9005:0286:1014:9580 IBM ServeRAID 8k/8k-l8 (Aurora) 9005:0286:1014:9540 IBM ServeRAID 8k/8k-l4 (AuroraLite) - 9005:0286:9005:029f ICP ICP9014R0 (Lancer) + 9005:0286:1014:9580 IBM ServeRAID 8k/8k-l8 (Aurora) + 9005:0286:1014:034d IBM ServeRAID 8s (Hurricane) 9005:0286:9005:029e ICP ICP9024R0 (Lancer) + 9005:0286:9005:029f ICP ICP9014R0 (Lancer) 9005:0286:9005:02a0 ICP ICP9047MA (Lancer) 9005:0286:9005:02a1 ICP ICP9087MA (Lancer) + 9005:0286:9005:02a3 ICP ICP5445AU (Hurricane44) 9005:0286:9005:02a4 ICP ICP9085LI (Marauder-X) 9005:0286:9005:02a5 ICP ICP5085BR (Marauder-E) - 9005:0286:9005:02a3 ICP ICP5445AU (Hurricane44) 9005:0286:9005:02a6 ICP ICP9067MA (Intruder-6) - 9005:0286:9005:02a9 ICP ICP5087AU (Skyray) - 9005:0286:9005:02aa ICP ICP5047AU (Skyray) + 9005:0286:9005:02a9 ICP ICP5085AU (Hurricane80) + 9005:0286:9005:02aa ICP ICP5045AU (Hurricane40) + 9005:0286:9005:02b4 ICP ICP5045AL (Hurricane40lm) People ------------------------- diff --git a/Documentation/scsi/arcmsr_spec.txt b/Documentation/scsi/arcmsr_spec.txt new file mode 100644 index 0000000..5e00423 --- /dev/null +++ b/Documentation/scsi/arcmsr_spec.txt @@ -0,0 +1,574 @@ +******************************************************************************* +** ARECA FIRMWARE SPEC +******************************************************************************* +** Usage of IOP331 adapter +** (All In/Out is in IOP331's view) +** 1. Message 0 --> InitThread message and retrun code +** 2. Doorbell is used for RS-232 emulation +** inDoorBell : bit0 -- data in ready +** (DRIVER DATA WRITE OK) +** bit1 -- data out has been read +** (DRIVER DATA READ OK) +** outDooeBell: bit0 -- data out ready +** (IOP331 DATA WRITE OK) +** bit1 -- data in has been read +** (IOP331 DATA READ OK) +** 3. Index Memory Usage +** offset 0xf00 : for RS232 out (request buffer) +** offset 0xe00 : for RS232 in (scratch buffer) +** offset 0xa00 : for inbound message code message_rwbuffer +** (driver send to IOP331) +** offset 0xa00 : for outbound message code message_rwbuffer +** (IOP331 send to driver) +** 4. RS-232 emulation +** Currently 128 byte buffer is used +** 1st uint32_t : Data length (1--124) +** Byte 4--127 : Max 124 bytes of data +** 5. PostQ +** All SCSI Command must be sent through postQ: +** (inbound queue port) Request frame must be 32 bytes aligned +** #bit27--bit31 => flag for post ccb +** #bit0--bit26 => real address (bit27--bit31) of post arcmsr_cdb +** bit31 : +** 0 : 256 bytes frame +** 1 : 512 bytes frame +** bit30 : +** 0 : normal request +** 1 : BIOS request +** bit29 : reserved +** bit28 : reserved +** bit27 : reserved +** --------------------------------------------------------------------------- +** (outbount queue port) Request reply +** #bit27--bit31 +** => flag for reply +** #bit0--bit26 +** => real address (bit27--bit31) of reply arcmsr_cdb +** bit31 : must be 0 (for this type of reply) +** bit30 : reserved for BIOS handshake +** bit29 : reserved +** bit28 : +** 0 : no error, ignore AdapStatus/DevStatus/SenseData +** 1 : Error, error code in AdapStatus/DevStatus/SenseData +** bit27 : reserved +** 6. BIOS request +** All BIOS request is the same with request from PostQ +** Except : +** Request frame is sent from configuration space +** offset: 0x78 : Request Frame (bit30 == 1) +** offset: 0x18 : writeonly to generate +** IRQ to IOP331 +** Completion of request: +** (bit30 == 0, bit28==err flag) +** 7. Definition of SGL entry (structure) +** 8. Message1 Out - Diag Status Code (????) +** 9. Message0 message code : +** 0x00 : NOP +** 0x01 : Get Config +** ->offset 0xa00 :for outbound message code message_rwbuffer +** (IOP331 send to driver) +** Signature 0x87974060(4) +** Request len 0x00000200(4) +** numbers of queue 0x00000100(4) +** SDRAM Size 0x00000100(4)-->256 MB +** IDE Channels 0x00000008(4) +** vendor 40 bytes char +** model 8 bytes char +** FirmVer 16 bytes char +** Device Map 16 bytes char +** FirmwareVersion DWORD <== Added for checking of +** new firmware capability +** 0x02 : Set Config +** ->offset 0xa00 :for inbound message code message_rwbuffer +** (driver send to IOP331) +** Signature 0x87974063(4) +** UPPER32 of Request Frame (4)-->Driver Only +** 0x03 : Reset (Abort all queued Command) +** 0x04 : Stop Background Activity +** 0x05 : Flush Cache +** 0x06 : Start Background Activity +** (re-start if background is halted) +** 0x07 : Check If Host Command Pending +** (Novell May Need This Function) +** 0x08 : Set controller time +** ->offset 0xa00 : for inbound message code message_rwbuffer +** (driver to IOP331) +** byte 0 : 0xaa <-- signature +** byte 1 : 0x55 <-- signature +** byte 2 : year (04) +** byte 3 : month (1..12) +** byte 4 : date (1..31) +** byte 5 : hour (0..23) +** byte 6 : minute (0..59) +** byte 7 : second (0..59) +******************************************************************************* +******************************************************************************* +** RS-232 Interface for Areca Raid Controller +** The low level command interface is exclusive with VT100 terminal +** -------------------------------------------------------------------- +** 1. Sequence of command execution +** -------------------------------------------------------------------- +** (A) Header : 3 bytes sequence (0x5E, 0x01, 0x61) +** (B) Command block : variable length of data including length, +** command code, data and checksum byte +** (C) Return data : variable length of data +** -------------------------------------------------------------------- +** 2. Command block +** -------------------------------------------------------------------- +** (A) 1st byte : command block length (low byte) +** (B) 2nd byte : command block length (high byte) +** note ..command block length shouldn't > 2040 bytes, +** length excludes these two bytes +** (C) 3rd byte : command code +** (D) 4th and following bytes : variable length data bytes +** depends on command code +** (E) last byte : checksum byte (sum of 1st byte until last data byte) +** -------------------------------------------------------------------- +** 3. Command code and associated data +** -------------------------------------------------------------------- +** The following are command code defined in raid controller Command +** code 0x10--0x1? are used for system level management, +** no password checking is needed and should be implemented in separate +** well controlled utility and not for end user access. +** Command code 0x20--0x?? always check the password, +** password must be entered to enable these command. +** enum +** { +** GUI_SET_SERIAL=0x10, +** GUI_SET_VENDOR, +** GUI_SET_MODEL, +** GUI_IDENTIFY, +** GUI_CHECK_PASSWORD, +** GUI_LOGOUT, +** GUI_HTTP, +** GUI_SET_ETHERNET_ADDR, +** GUI_SET_LOGO, +** GUI_POLL_EVENT, +** GUI_GET_EVENT, +** GUI_GET_HW_MONITOR, +** // GUI_QUICK_CREATE=0x20, (function removed) +** GUI_GET_INFO_R=0x20, +** GUI_GET_INFO_V, +** GUI_GET_INFO_P, +** GUI_GET_INFO_S, +** GUI_CLEAR_EVENT, +** GUI_MUTE_BEEPER=0x30, +** GUI_BEEPER_SETTING, +** GUI_SET_PASSWORD, +** GUI_HOST_INTERFACE_MODE, +** GUI_REBUILD_PRIORITY, +** GUI_MAX_ATA_MODE, +** GUI_RESET_CONTROLLER, +** GUI_COM_PORT_SETTING, +** GUI_NO_OPERATION, +** GUI_DHCP_IP, +** GUI_CREATE_PASS_THROUGH=0x40, +** GUI_MODIFY_PASS_THROUGH, +** GUI_DELETE_PASS_THROUGH, +** GUI_IDENTIFY_DEVICE, +** GUI_CREATE_RAIDSET=0x50, +** GUI_DELETE_RAIDSET, +** GUI_EXPAND_RAIDSET, +** GUI_ACTIVATE_RAIDSET, +** GUI_CREATE_HOT_SPARE, +** GUI_DELETE_HOT_SPARE, +** GUI_CREATE_VOLUME=0x60, +** GUI_MODIFY_VOLUME, +** GUI_DELETE_VOLUME, +** GUI_START_CHECK_VOLUME, +** GUI_STOP_CHECK_VOLUME +** }; +** Command description : +** GUI_SET_SERIAL : Set the controller serial# +** byte 0,1 : length +** byte 2 : command code 0x10 +** byte 3 : password length (should be 0x0f) +** byte 4-0x13 : should be "ArEcATecHnoLogY" +** byte 0x14--0x23 : Serial number string (must be 16 bytes) +** GUI_SET_VENDOR : Set vendor string for the controller +** byte 0,1 : length +** byte 2 : command code 0x11 +** byte 3 : password length (should be 0x08) +** byte 4-0x13 : should be "ArEcAvAr" +** byte 0x14--0x3B : vendor string (must be 40 bytes) +** GUI_SET_MODEL : Set the model name of the controller +** byte 0,1 : length +** byte 2 : command code 0x12 +** byte 3 : password length (should be 0x08) +** byte 4-0x13 : should be "ArEcAvAr" +** byte 0x14--0x1B : model string (must be 8 bytes) +** GUI_IDENTIFY : Identify device +** byte 0,1 : length +** byte 2 : command code 0x13 +** return "Areca RAID Subsystem " +** GUI_CHECK_PASSWORD : Verify password +** byte 0,1 : length +** byte 2 : command code 0x14 +** byte 3 : password length +** byte 4-0x?? : user password to be checked +** GUI_LOGOUT : Logout GUI (force password checking on next command) +** byte 0,1 : length +** byte 2 : command code 0x15 +** GUI_HTTP : HTTP interface (reserved for Http proxy service)(0x16) +** +** GUI_SET_ETHERNET_ADDR : Set the ethernet MAC address +** byte 0,1 : length +** byte 2 : command code 0x17 +** byte 3 : password length (should be 0x08) +** byte 4-0x13 : should be "ArEcAvAr" +** byte 0x14--0x19 : Ethernet MAC address (must be 6 bytes) +** GUI_SET_LOGO : Set logo in HTTP +** byte 0,1 : length +** byte 2 : command code 0x18 +** byte 3 : Page# (0/1/2/3) (0xff --> clear OEM logo) +** byte 4/5/6/7 : 0x55/0xaa/0xa5/0x5a +** byte 8 : TITLE.JPG data (each page must be 2000 bytes) +** note page0 1st 2 byte must be +** actual length of the JPG file +** GUI_POLL_EVENT : Poll If Event Log Changed +** byte 0,1 : length +** byte 2 : command code 0x19 +** GUI_GET_EVENT : Read Event +** byte 0,1 : length +** byte 2 : command code 0x1a +** byte 3 : Event Page (0:1st page/1/2/3:last page) +** GUI_GET_HW_MONITOR : Get HW monitor data +** byte 0,1 : length +** byte 2 : command code 0x1b +** byte 3 : # of FANs(example 2) +** byte 4 : # of Voltage sensor(example 3) +** byte 5 : # of temperature sensor(example 2) +** byte 6 : # of power +** byte 7/8 : Fan#0 (RPM) +** byte 9/10 : Fan#1 +** byte 11/12 : Voltage#0 original value in *1000 +** byte 13/14 : Voltage#0 value +** byte 15/16 : Voltage#1 org +** byte 17/18 : Voltage#1 +** byte 19/20 : Voltage#2 org +** byte 21/22 : Voltage#2 +** byte 23 : Temp#0 +** byte 24 : Temp#1 +** byte 25 : Power indicator (bit0 : power#0, +** bit1 : power#1) +** byte 26 : UPS indicator +** GUI_QUICK_CREATE : Quick create raid/volume set +** byte 0,1 : length +** byte 2 : command code 0x20 +** byte 3/4/5/6 : raw capacity +** byte 7 : raid level +** byte 8 : stripe size +** byte 9 : spare +** byte 10/11/12/13: device mask (the devices to create raid/volume) +** This function is removed, application like +** to implement quick create function +** need to use GUI_CREATE_RAIDSET and GUI_CREATE_VOLUMESET function. +** GUI_GET_INFO_R : Get Raid Set Information +** byte 0,1 : length +** byte 2 : command code 0x20 +** byte 3 : raidset# +** typedef struct sGUI_RAIDSET +** { +** BYTE grsRaidSetName[16]; +** DWORD grsCapacity; +** DWORD grsCapacityX; +** DWORD grsFailMask; +** BYTE grsDevArray[32]; +** BYTE grsMemberDevices; +** BYTE grsNewMemberDevices; +** BYTE grsRaidState; +** BYTE grsVolumes; +** BYTE grsVolumeList[16]; +** BYTE grsRes1; +** BYTE grsRes2; +** BYTE grsRes3; +** BYTE grsFreeSegments; +** DWORD grsRawStripes[8]; +** DWORD grsRes4; +** DWORD grsRes5; // Total to 128 bytes +** DWORD grsRes6; // Total to 128 bytes +** } sGUI_RAIDSET, *pGUI_RAIDSET; +** GUI_GET_INFO_V : Get Volume Set Information +** byte 0,1 : length +** byte 2 : command code 0x21 +** byte 3 : volumeset# +** typedef struct sGUI_VOLUMESET +** { +** BYTE gvsVolumeName[16]; // 16 +** DWORD gvsCapacity; +** DWORD gvsCapacityX; +** DWORD gvsFailMask; +** DWORD gvsStripeSize; +** DWORD gvsNewFailMask; +** DWORD gvsNewStripeSize; +** DWORD gvsVolumeStatus; +** DWORD gvsProgress; // 32 +** sSCSI_ATTR gvsScsi; +** BYTE gvsMemberDisks; +** BYTE gvsRaidLevel; // 8 +** BYTE gvsNewMemberDisks; +** BYTE gvsNewRaidLevel; +** BYTE gvsRaidSetNumber; +** BYTE gvsRes0; // 4 +** BYTE gvsRes1[4]; // 64 bytes +** } sGUI_VOLUMESET, *pGUI_VOLUMESET; +** GUI_GET_INFO_P : Get Physical Drive Information +** byte 0,1 : length +** byte 2 : command code 0x22 +** byte 3 : drive # (from 0 to max-channels - 1) +** typedef struct sGUI_PHY_DRV +** { +** BYTE gpdModelName[40]; +** BYTE gpdSerialNumber[20]; +** BYTE gpdFirmRev[8]; +** DWORD gpdCapacity; +** DWORD gpdCapacityX; // Reserved for expansion +** BYTE gpdDeviceState; +** BYTE gpdPioMode; +** BYTE gpdCurrentUdmaMode; +** BYTE gpdUdmaMode; +** BYTE gpdDriveSelect; +** BYTE gpdRaidNumber; // 0xff if not belongs to a raid set +** sSCSI_ATTR gpdScsi; +** BYTE gpdReserved[40]; // Total to 128 bytes +** } sGUI_PHY_DRV, *pGUI_PHY_DRV; +** GUI_GET_INFO_S : Get System Information +** byte 0,1 : length +** byte 2 : command code 0x23 +** typedef struct sCOM_ATTR +** { +** BYTE comBaudRate; +** BYTE comDataBits; +** BYTE comStopBits; +** BYTE comParity; +** BYTE comFlowControl; +** } sCOM_ATTR, *pCOM_ATTR; +** typedef struct sSYSTEM_INFO +** { +** BYTE gsiVendorName[40]; +** BYTE gsiSerialNumber[16]; +** BYTE gsiFirmVersion[16]; +** BYTE gsiBootVersion[16]; +** BYTE gsiMbVersion[16]; +** BYTE gsiModelName[8]; +** BYTE gsiLocalIp[4]; +** BYTE gsiCurrentIp[4]; +** DWORD gsiTimeTick; +** DWORD gsiCpuSpeed; +** DWORD gsiICache; +** DWORD gsiDCache; +** DWORD gsiScache; +** DWORD gsiMemorySize; +** DWORD gsiMemorySpeed; +** DWORD gsiEvents; +** BYTE gsiMacAddress[6]; +** BYTE gsiDhcp; +** BYTE gsiBeeper; +** BYTE gsiChannelUsage; +** BYTE gsiMaxAtaMode; +** BYTE gsiSdramEcc; // 1:if ECC enabled +** BYTE gsiRebuildPriority; +** sCOM_ATTR gsiComA; // 5 bytes +** sCOM_ATTR gsiComB; // 5 bytes +** BYTE gsiIdeChannels; +** BYTE gsiScsiHostChannels; +** BYTE gsiIdeHostChannels; +** BYTE gsiMaxVolumeSet; +** BYTE gsiMaxRaidSet; +** BYTE gsiEtherPort; // 1:if ether net port supported +** BYTE gsiRaid6Engine; // 1:Raid6 engine supported +** BYTE gsiRes[75]; +** } sSYSTEM_INFO, *pSYSTEM_INFO; +** GUI_CLEAR_EVENT : Clear System Event +** byte 0,1 : length +** byte 2 : command code 0x24 +** GUI_MUTE_BEEPER : Mute current beeper +** byte 0,1 : length +** byte 2 : command code 0x30 +** GUI_BEEPER_SETTING : Disable beeper +** byte 0,1 : length +** byte 2 : command code 0x31 +** byte 3 : 0->disable, 1->enable +** GUI_SET_PASSWORD : Change password +** byte 0,1 : length +** byte 2 : command code 0x32 +** byte 3 : pass word length ( must <= 15 ) +** byte 4 : password (must be alpha-numerical) +** GUI_HOST_INTERFACE_MODE : Set host interface mode +** byte 0,1 : length +** byte 2 : command code 0x33 +** byte 3 : 0->Independent, 1->cluster +** GUI_REBUILD_PRIORITY : Set rebuild priority +** byte 0,1 : length +** byte 2 : command code 0x34 +** byte 3 : 0/1/2/3 (low->high) +** GUI_MAX_ATA_MODE : Set maximum ATA mode to be used +** byte 0,1 : length +** byte 2 : command code 0x35 +** byte 3 : 0/1/2/3 (133/100/66/33) +** GUI_RESET_CONTROLLER : Reset Controller +** byte 0,1 : length +** byte 2 : command code 0x36 +** *Response with VT100 screen (discard it) +** GUI_COM_PORT_SETTING : COM port setting +** byte 0,1 : length +** byte 2 : command code 0x37 +** byte 3 : 0->COMA (term port), +** 1->COMB (debug port) +** byte 4 : 0/1/2/3/4/5/6/7 +** (1200/2400/4800/9600/19200/38400/57600/115200) +** byte 5 : data bit +** (0:7 bit, 1:8 bit : must be 8 bit) +** byte 6 : stop bit (0:1, 1:2 stop bits) +** byte 7 : parity (0:none, 1:off, 2:even) +** byte 8 : flow control +** (0:none, 1:xon/xoff, 2:hardware => must use none) +** GUI_NO_OPERATION : No operation +** byte 0,1 : length +** byte 2 : command code 0x38 +** GUI_DHCP_IP : Set DHCP option and local IP address +** byte 0,1 : length +** byte 2 : command code 0x39 +** byte 3 : 0:dhcp disabled, 1:dhcp enabled +** byte 4/5/6/7 : IP address +** GUI_CREATE_PASS_THROUGH : Create pass through disk +** byte 0,1 : length +** byte 2 : command code 0x40 +** byte 3 : device # +** byte 4 : scsi channel (0/1) +** byte 5 : scsi id (0-->15) +** byte 6 : scsi lun (0-->7) +** byte 7 : tagged queue (1 : enabled) +** byte 8 : cache mode (1 : enabled) +** byte 9 : max speed (0/1/2/3/4, +** async/20/40/80/160 for scsi) +** (0/1/2/3/4, 33/66/100/133/150 for ide ) +** GUI_MODIFY_PASS_THROUGH : Modify pass through disk +** byte 0,1 : length +** byte 2 : command code 0x41 +** byte 3 : device # +** byte 4 : scsi channel (0/1) +** byte 5 : scsi id (0-->15) +** byte 6 : scsi lun (0-->7) +** byte 7 : tagged queue (1 : enabled) +** byte 8 : cache mode (1 : enabled) +** byte 9 : max speed (0/1/2/3/4, +** async/20/40/80/160 for scsi) +** (0/1/2/3/4, 33/66/100/133/150 for ide ) +** GUI_DELETE_PASS_THROUGH : Delete pass through disk +** byte 0,1 : length +** byte 2 : command code 0x42 +** byte 3 : device# to be deleted +** GUI_IDENTIFY_DEVICE : Identify Device +** byte 0,1 : length +** byte 2 : command code 0x43 +** byte 3 : Flash Method +** (0:flash selected, 1:flash not selected) +** byte 4/5/6/7 : IDE device mask to be flashed +** note .... no response data available +** GUI_CREATE_RAIDSET : Create Raid Set +** byte 0,1 : length +** byte 2 : command code 0x50 +** byte 3/4/5/6 : device mask +** byte 7-22 : raidset name (if byte 7 == 0:use default) +** GUI_DELETE_RAIDSET : Delete Raid Set +** byte 0,1 : length +** byte 2 : command code 0x51 +** byte 3 : raidset# +** GUI_EXPAND_RAIDSET : Expand Raid Set +** byte 0,1 : length +** byte 2 : command code 0x52 +** byte 3 : raidset# +** byte 4/5/6/7 : device mask for expansion +** byte 8/9/10 : (8:0 no change, 1 change, 0xff:terminate, +** 9:new raid level, +** 10:new stripe size +** 0/1/2/3/4/5->4/8/16/32/64/128K ) +** byte 11/12/13 : repeat for each volume in the raidset +** GUI_ACTIVATE_RAIDSET : Activate incomplete raid set +** byte 0,1 : length +** byte 2 : command code 0x53 +** byte 3 : raidset# +** GUI_CREATE_HOT_SPARE : Create hot spare disk +** byte 0,1 : length +** byte 2 : command code 0x54 +** byte 3/4/5/6 : device mask for hot spare creation +** GUI_DELETE_HOT_SPARE : Delete hot spare disk +** byte 0,1 : length +** byte 2 : command code 0x55 +** byte 3/4/5/6 : device mask for hot spare deletion +** GUI_CREATE_VOLUME : Create volume set +** byte 0,1 : length +** byte 2 : command code 0x60 +** byte 3 : raidset# +** byte 4-19 : volume set name +** (if byte4 == 0, use default) +** byte 20-27 : volume capacity (blocks) +** byte 28 : raid level +** byte 29 : stripe size +** (0/1/2/3/4/5->4/8/16/32/64/128K) +** byte 30 : channel +** byte 31 : ID +** byte 32 : LUN +** byte 33 : 1 enable tag +** byte 34 : 1 enable cache +** byte 35 : speed +** (0/1/2/3/4->async/20/40/80/160 for scsi) +** (0/1/2/3/4->33/66/100/133/150 for IDE ) +** byte 36 : 1 to select quick init +** +** GUI_MODIFY_VOLUME : Modify volume Set +** byte 0,1 : length +** byte 2 : command code 0x61 +** byte 3 : volumeset# +** byte 4-19 : new volume set name +** (if byte4 == 0, not change) +** byte 20-27 : new volume capacity (reserved) +** byte 28 : new raid level +** byte 29 : new stripe size +** (0/1/2/3/4/5->4/8/16/32/64/128K) +** byte 30 : new channel +** byte 31 : new ID +** byte 32 : new LUN +** byte 33 : 1 enable tag +** byte 34 : 1 enable cache +** byte 35 : speed +** (0/1/2/3/4->async/20/40/80/160 for scsi) +** (0/1/2/3/4->33/66/100/133/150 for IDE ) +** GUI_DELETE_VOLUME : Delete volume set +** byte 0,1 : length +** byte 2 : command code 0x62 +** byte 3 : volumeset# +** GUI_START_CHECK_VOLUME : Start volume consistency check +** byte 0,1 : length +** byte 2 : command code 0x63 +** byte 3 : volumeset# +** GUI_STOP_CHECK_VOLUME : Stop volume consistency check +** byte 0,1 : length +** byte 2 : command code 0x64 +** --------------------------------------------------------------------- +** 4. Returned data +** --------------------------------------------------------------------- +** (A) Header : 3 bytes sequence (0x5E, 0x01, 0x61) +** (B) Length : 2 bytes +** (low byte 1st, excludes length and checksum byte) +** (C) status or data : +** <1> If length == 1 ==> 1 byte status code +** #define GUI_OK 0x41 +** #define GUI_RAIDSET_NOT_NORMAL 0x42 +** #define GUI_VOLUMESET_NOT_NORMAL 0x43 +** #define GUI_NO_RAIDSET 0x44 +** #define GUI_NO_VOLUMESET 0x45 +** #define GUI_NO_PHYSICAL_DRIVE 0x46 +** #define GUI_PARAMETER_ERROR 0x47 +** #define GUI_UNSUPPORTED_COMMAND 0x48 +** #define GUI_DISK_CONFIG_CHANGED 0x49 +** #define GUI_INVALID_PASSWORD 0x4a +** #define GUI_NO_DISK_SPACE 0x4b +** #define GUI_CHECKSUM_ERROR 0x4c +** #define GUI_PASSWORD_REQUIRED 0x4d +** <2> If length > 1 ==> +** data block returned from controller +** and the contents depends on the command code +** (E) Checksum : checksum of length and status or data byte +************************************************************************** diff --git a/Documentation/scsi/libsas.txt b/Documentation/scsi/libsas.txt new file mode 100644 index 0000000..9e2078b --- /dev/null +++ b/Documentation/scsi/libsas.txt @@ -0,0 +1,484 @@ +SAS Layer +--------- + +The SAS Layer is a management infrastructure which manages +SAS LLDDs. It sits between SCSI Core and SAS LLDDs. The +layout is as follows: while SCSI Core is concerned with +SAM/SPC issues, and a SAS LLDD+sequencer is concerned with +phy/OOB/link management, the SAS layer is concerned with: + + * SAS Phy/Port/HA event management (LLDD generates, + SAS Layer processes), + * SAS Port management (creation/destruction), + * SAS Domain discovery and revalidation, + * SAS Domain device management, + * SCSI Host registration/unregistration, + * Device registration with SCSI Core (SAS) or libata + (SATA), and + * Expander management and exporting expander control + to user space. + +A SAS LLDD is a PCI device driver. It is concerned with +phy/OOB management, and vendor specific tasks and generates +events to the SAS layer. + +The SAS Layer does most SAS tasks as outlined in the SAS 1.1 +spec. + +The sas_ha_struct describes the SAS LLDD to the SAS layer. +Most of it is used by the SAS Layer but a few fields need to +be initialized by the LLDDs. + +After initializing your hardware, from the probe() function +you call sas_register_ha(). It will register your LLDD with +the SCSI subsystem, creating a SCSI host and it will +register your SAS driver with the sysfs SAS tree it creates. +It will then return. Then you enable your phys to actually +start OOB (at which point your driver will start calling the +notify_* event callbacks). + +Structure descriptions: + +struct sas_phy -------------------- +Normally this is statically embedded to your driver's +phy structure: + struct my_phy { + blah; + struct sas_phy sas_phy; + bleh; + }; +And then all the phys are an array of my_phy in your HA +struct (shown below). + +Then as you go along and initialize your phys you also +initialize the sas_phy struct, along with your own +phy structure. + +In general, the phys are managed by the LLDD and the ports +are managed by the SAS layer. So the phys are initialized +and updated by the LLDD and the ports are initialized and +updated by the SAS layer. + +There is a scheme where the LLDD can RW certain fields, +and the SAS layer can only read such ones, and vice versa. +The idea is to avoid unnecessary locking. + +enabled -- must be set (0/1) +id -- must be set [0,MAX_PHYS) +class, proto, type, role, oob_mode, linkrate -- must be set +oob_mode -- you set this when OOB has finished and then notify +the SAS Layer. + +sas_addr -- this normally points to an array holding the sas +address of the phy, possibly somewhere in your my_phy +struct. + +attached_sas_addr -- set this when you (LLDD) receive an +IDENTIFY frame or a FIS frame, _before_ notifying the SAS +layer. The idea is that sometimes the LLDD may want to fake +or provide a different SAS address on that phy/port and this +allows it to do this. At best you should copy the sas +address from the IDENTIFY frame or maybe generate a SAS +address for SATA directly attached devices. The Discover +process may later change this. + +frame_rcvd -- this is where you copy the IDENTIFY/FIS frame +when you get it; you lock, copy, set frame_rcvd_size and +unlock the lock, and then call the event. It is a pointer +since there's no way to know your hw frame size _exactly_, +so you define the actual array in your phy struct and let +this pointer point to it. You copy the frame from your +DMAable memory to that area holding the lock. + +sas_prim -- this is where primitives go when they're +received. See sas.h. Grab the lock, set the primitive, +release the lock, notify. + +port -- this points to the sas_port if the phy belongs +to a port -- the LLDD only reads this. It points to the +sas_port this phy is part of. Set by the SAS Layer. + +ha -- may be set; the SAS layer sets it anyway. + +lldd_phy -- you should set this to point to your phy so you +can find your way around faster when the SAS layer calls one +of your callbacks and passes you a phy. If the sas_phy is +embedded you can also use container_of -- whatever you +prefer. + + +struct sas_port -------------------- +The LLDD doesn't set any fields of this struct -- it only +reads them. They should be self explanatory. + +phy_mask is 32 bit, this should be enough for now, as I +haven't heard of a HA having more than 8 phys. + +lldd_port -- I haven't found use for that -- maybe other +LLDD who wish to have internal port representation can make +use of this. + + +struct sas_ha_struct -------------------- +It normally is statically declared in your own LLDD +structure describing your adapter: +struct my_sas_ha { + blah; + struct sas_ha_struct sas_ha; + struct my_phy phys[MAX_PHYS]; + struct sas_port sas_ports[MAX_PHYS]; /* (1) */ + bleh; +}; + +(1) If your LLDD doesn't have its own port representation. + +What needs to be initialized (sample function given below). + +pcidev +sas_addr -- since the SAS layer doesn't want to mess with + memory allocation, etc, this points to statically + allocated array somewhere (say in your host adapter + structure) and holds the SAS address of the host + adapter as given by you or the manufacturer, etc. +sas_port +sas_phy -- an array of pointers to structures. (see + note above on sas_addr). + These must be set. See more notes below. +num_phys -- the number of phys present in the sas_phy array, + and the number of ports present in the sas_port + array. There can be a maximum num_phys ports (one per + port) so we drop the num_ports, and only use + num_phys. + +The event interface: + + /* LLDD calls these to notify the class of an event. */ + void (*notify_ha_event)(struct sas_ha_struct *, enum ha_event); + void (*notify_port_event)(struct sas_phy *, enum port_event); + void (*notify_phy_event)(struct sas_phy *, enum phy_event); + +When sas_register_ha() returns, those are set and can be +called by the LLDD to notify the SAS layer of such events +the SAS layer. + +The port notification: + + /* The class calls these to notify the LLDD of an event. */ + void (*lldd_port_formed)(struct sas_phy *); + void (*lldd_port_deformed)(struct sas_phy *); + +If the LLDD wants notification when a port has been formed +or deformed it sets those to a function satisfying the type. + +A SAS LLDD should also implement at least one of the Task +Management Functions (TMFs) described in SAM: + + /* Task Management Functions. Must be called from process context. */ + int (*lldd_abort_task)(struct sas_task *); + int (*lldd_abort_task_set)(struct domain_device *, u8 *lun); + int (*lldd_clear_aca)(struct domain_device *, u8 *lun); + int (*lldd_clear_task_set)(struct domain_device *, u8 *lun); + int (*lldd_I_T_nexus_reset)(struct domain_device *); + int (*lldd_lu_reset)(struct domain_device *, u8 *lun); + int (*lldd_query_task)(struct sas_task *); + +For more information please read SAM from T10.org. + +Port and Adapter management: + + /* Port and Adapter management */ + int (*lldd_clear_nexus_port)(struct sas_port *); + int (*lldd_clear_nexus_ha)(struct sas_ha_struct *); + +A SAS LLDD should implement at least one of those. + +Phy management: + + /* Phy management */ + int (*lldd_control_phy)(struct sas_phy *, enum phy_func); + +lldd_ha -- set this to point to your HA struct. You can also +use container_of if you embedded it as shown above. + +A sample initialization and registration function +can look like this (called last thing from probe()) +*but* before you enable the phys to do OOB: + +static int register_sas_ha(struct my_sas_ha *my_ha) +{ + int i; + static struct sas_phy *sas_phys[MAX_PHYS]; + static struct sas_port *sas_ports[MAX_PHYS]; + + my_ha->sas_ha.sas_addr = &my_ha->sas_addr[0]; + + for (i = 0; i < MAX_PHYS; i++) { + sas_phys[i] = &my_ha->phys[i].sas_phy; + sas_ports[i] = &my_ha->sas_ports[i]; + } + + my_ha->sas_ha.sas_phy = sas_phys; + my_ha->sas_ha.sas_port = sas_ports; + my_ha->sas_ha.num_phys = MAX_PHYS; + + my_ha->sas_ha.lldd_port_formed = my_port_formed; + + my_ha->sas_ha.lldd_dev_found = my_dev_found; + my_ha->sas_ha.lldd_dev_gone = my_dev_gone; + + my_ha->sas_ha.lldd_max_execute_num = lldd_max_execute_num; (1) + + my_ha->sas_ha.lldd_queue_size = ha_can_queue; + my_ha->sas_ha.lldd_execute_task = my_execute_task; + + my_ha->sas_ha.lldd_abort_task = my_abort_task; + my_ha->sas_ha.lldd_abort_task_set = my_abort_task_set; + my_ha->sas_ha.lldd_clear_aca = my_clear_aca; + my_ha->sas_ha.lldd_clear_task_set = my_clear_task_set; + my_ha->sas_ha.lldd_I_T_nexus_reset= NULL; (2) + my_ha->sas_ha.lldd_lu_reset = my_lu_reset; + my_ha->sas_ha.lldd_query_task = my_query_task; + + my_ha->sas_ha.lldd_clear_nexus_port = my_clear_nexus_port; + my_ha->sas_ha.lldd_clear_nexus_ha = my_clear_nexus_ha; + + my_ha->sas_ha.lldd_control_phy = my_control_phy; + + return sas_register_ha(&my_ha->sas_ha); +} + +(1) This is normally a LLDD parameter, something of the +lines of a task collector. What it tells the SAS Layer is +whether the SAS layer should run in Direct Mode (default: +value 0 or 1) or Task Collector Mode (value greater than 1). + +In Direct Mode, the SAS Layer calls Execute Task as soon as +it has a command to send to the SDS, _and_ this is a single +command, i.e. not linked. + +Some hardware (e.g. aic94xx) has the capability to DMA more +than one task at a time (interrupt) from host memory. Task +Collector Mode is an optional feature for HAs which support +this in their hardware. (Again, it is completely optional +even if your hardware supports it.) + +In Task Collector Mode, the SAS Layer would do _natural_ +coalescing of tasks and at the appropriate moment it would +call your driver to DMA more than one task in a single HA +interrupt. DMBS may want to use this by insmod/modprobe +setting the lldd_max_execute_num to something greater than +1. + +(2) SAS 1.1 does not define I_T Nexus Reset TMF. + +Events +------ + +Events are _the only way_ a SAS LLDD notifies the SAS layer +of anything. There is no other method or way a LLDD to tell +the SAS layer of anything happening internally or in the SAS +domain. + +Phy events: + PHYE_LOSS_OF_SIGNAL, (C) + PHYE_OOB_DONE, + PHYE_OOB_ERROR, (C) + PHYE_SPINUP_HOLD. + +Port events, passed on a _phy_: + PORTE_BYTES_DMAED, (M) + PORTE_BROADCAST_RCVD, (E) + PORTE_LINK_RESET_ERR, (C) + PORTE_TIMER_EVENT, (C) + PORTE_HARD_RESET. + +Host Adapter event: + HAE_RESET + +A SAS LLDD should be able to generate + - at least one event from group C (choice), + - events marked M (mandatory) are mandatory (only one), + - events marked E (expander) if it wants the SAS layer + to handle domain revalidation (only one such). + - Unmarked events are optional. + +Meaning: + +HAE_RESET -- when your HA got internal error and was reset. + +PORTE_BYTES_DMAED -- on receiving an IDENTIFY/FIS frame +PORTE_BROADCAST_RCVD -- on receiving a primitive +PORTE_LINK_RESET_ERR -- timer expired, loss of signal, loss +of DWS, etc. (*) +PORTE_TIMER_EVENT -- DWS reset timeout timer expired (*) +PORTE_HARD_RESET -- Hard Reset primitive received. + +PHYE_LOSS_OF_SIGNAL -- the device is gone (*) +PHYE_OOB_DONE -- OOB went fine and oob_mode is valid +PHYE_OOB_ERROR -- Error while doing OOB, the device probably +got disconnected. (*) +PHYE_SPINUP_HOLD -- SATA is present, COMWAKE not sent. + +(*) should set/clear the appropriate fields in the phy, + or alternatively call the inlined sas_phy_disconnected() + which is just a helper, from their tasklet. + +The Execute Command SCSI RPC: + + int (*lldd_execute_task)(struct sas_task *, int num, + unsigned long gfp_flags); + +Used to queue a task to the SAS LLDD. @task is the tasks to +be executed. @num should be the number of tasks being +queued at this function call (they are linked listed via +task::list), @gfp_mask should be the gfp_mask defining the +context of the caller. + +This function should implement the Execute Command SCSI RPC, +or if you're sending a SCSI Task as linked commands, you +should also use this function. + +That is, when lldd_execute_task() is called, the command(s) +go out on the transport *immediately*. There is *no* +queuing of any sort and at any level in a SAS LLDD. + +The use of task::list is two-fold, one for linked commands, +the other discussed below. + +It is possible to queue up more than one task at a time, by +initializing the list element of struct sas_task, and +passing the number of tasks enlisted in this manner in num. + +Returns: -SAS_QUEUE_FULL, -ENOMEM, nothing was queued; + 0, the task(s) were queued. + +If you want to pass num > 1, then either +A) you're the only caller of this function and keep track + of what you've queued to the LLDD, or +B) you know what you're doing and have a strategy of + retrying. + +As opposed to queuing one task at a time (function call), +batch queuing of tasks, by having num > 1, greatly +simplifies LLDD code, sequencer code, and _hardware design_, +and has some performance advantages in certain situations +(DBMS). + +The LLDD advertises if it can take more than one command at +a time at lldd_execute_task(), by setting the +lldd_max_execute_num parameter (controlled by "collector" +module parameter in aic94xx SAS LLDD). + +You should leave this to the default 1, unless you know what +you're doing. + +This is a function of the LLDD, to which the SAS layer can +cater to. + +int lldd_queue_size + The host adapter's queue size. This is the maximum +number of commands the lldd can have pending to domain +devices on behalf of all upper layers submitting through +lldd_execute_task(). + +You really want to set this to something (much) larger than +1. + +This _really_ has absolutely nothing to do with queuing. +There is no queuing in SAS LLDDs. + +struct sas_task { + dev -- the device this task is destined to + list -- must be initialized (INIT_LIST_HEAD) + task_proto -- _one_ of enum sas_proto + scatter -- pointer to scatter gather list array + num_scatter -- number of elements in scatter + total_xfer_len -- total number of bytes expected to be transfered + data_dir -- PCI_DMA_... + task_done -- callback when the task has finished execution +}; + +When an external entity, entity other than the LLDD or the +SAS Layer, wants to work with a struct domain_device, it +_must_ call kobject_get() when getting a handle on the +device and kobject_put() when it is done with the device. + +This does two things: + A) implements proper kfree() for the device; + B) increments/decrements the kref for all players: + domain_device + all domain_device's ... (if past an expander) + port + host adapter + pci device + and up the ladder, etc. + +DISCOVERY +--------- + +The sysfs tree has the following purposes: + a) It shows you the physical layout of the SAS domain at + the current time, i.e. how the domain looks in the + physical world right now. + b) Shows some device parameters _at_discovery_time_. + +This is a link to the tree(1) program, very useful in +viewing the SAS domain: +ftp://mama.indstate.edu/linux/tree/ +I expect user space applications to actually create a +graphical interface of this. + +That is, the sysfs domain tree doesn't show or keep state if +you e.g., change the meaning of the READY LED MEANING +setting, but it does show you the current connection status +of the domain device. + +Keeping internal device state changes is responsibility of +upper layers (Command set drivers) and user space. + +When a device or devices are unplugged from the domain, this +is reflected in the sysfs tree immediately, and the device(s) +removed from the system. + +The structure domain_device describes any device in the SAS +domain. It is completely managed by the SAS layer. A task +points to a domain device, this is how the SAS LLDD knows +where to send the task(s) to. A SAS LLDD only reads the +contents of the domain_device structure, but it never creates +or destroys one. + +Expander management from User Space +----------------------------------- + +In each expander directory in sysfs, there is a file called +"smp_portal". It is a binary sysfs attribute file, which +implements an SMP portal (Note: this is *NOT* an SMP port), +to which user space applications can send SMP requests and +receive SMP responses. + +Functionality is deceptively simple: + +1. Build the SMP frame you want to send. The format and layout + is described in the SAS spec. Leave the CRC field equal 0. +open(2) +2. Open the expander's SMP portal sysfs file in RW mode. +write(2) +3. Write the frame you built in 1. +read(2) +4. Read the amount of data you expect to receive for the frame you built. + If you receive different amount of data you expected to receive, + then there was some kind of error. +close(2) +All this process is shown in detail in the function do_smp_func() +and its callers, in the file "expander_conf.c". + +The kernel functionality is implemented in the file +"sas_expander.c". + +The program "expander_conf.c" implements this. It takes one +argument, the sysfs file name of the SMP portal to the +expander, and gives expander information, including routing +tables. + +The SMP portal gives you complete control of the expander, +so please be careful. diff --git a/Documentation/seclvl.txt b/Documentation/seclvl.txt deleted file mode 100644 index 97274d1..0000000 --- a/Documentation/seclvl.txt +++ /dev/null @@ -1,97 +0,0 @@ -BSD Secure Levels Linux Security Module -Michael A. Halcrow - - -Introduction - -Under the BSD Secure Levels security model, sets of policies are -associated with levels. Levels range from -1 to 2, with -1 being the -weakest and 2 being the strongest. These security policies are -enforced at the kernel level, so not even the superuser is able to -disable or circumvent them. This hardens the machine against attackers -who gain root access to the system. - - -Levels and Policies - -Level -1 (Permanently Insecure): - - Cannot increase the secure level - -Level 0 (Insecure): - - Cannot ptrace the init process - -Level 1 (Default): - - /dev/mem and /dev/kmem are read-only - - IMMUTABLE and APPEND extended attributes, if set, may not be unset - - Cannot load or unload kernel modules - - Cannot write directly to a mounted block device - - Cannot perform raw I/O operations - - Cannot perform network administrative tasks - - Cannot setuid any file - -Level 2 (Secure): - - Cannot decrement the system time - - Cannot write to any block device, whether mounted or not - - Cannot unmount any mounted filesystems - - -Compilation - -To compile the BSD Secure Levels LSM, seclvl.ko, enable the -SECURITY_SECLVL configuration option. This is found under Security -options -> BSD Secure Levels in the kernel configuration menu. - - -Basic Usage - -Once the machine is in a running state, with all the necessary modules -loaded and all the filesystems mounted, you can load the seclvl.ko -module: - -# insmod seclvl.ko - -The module defaults to secure level 1, except when compiled directly -into the kernel, in which case it defaults to secure level 0. To raise -the secure level to 2, the administrator writes ``2'' to the -seclvl/seclvl file under the sysfs mount point (assumed to be /sys in -these examples): - -# echo -n "2" > /sys/seclvl/seclvl - -Alternatively, you can initialize the module at secure level 2 with -the initlvl module parameter: - -# insmod seclvl.ko initlvl=2 - -At this point, it is impossible to remove the module or reduce the -secure level. If the administrator wishes to have the option of doing -so, he must provide a module parameter, sha1_passwd, that specifies -the SHA1 hash of the password that can be used to reduce the secure -level to 0. - -To generate this SHA1 hash, the administrator can use OpenSSL: - -# echo -n "boogabooga" | openssl sha1 -abeda4e0f33defa51741217592bf595efb8d289c - -In order to use password-instigated secure level reduction, the SHA1 -crypto module must be loaded or compiled into the kernel: - -# insmod sha1.ko - -The administrator can then insmod the seclvl module, including the -SHA1 hash of the password: - -# insmod seclvl.ko - sha1_passwd=abeda4e0f33defa51741217592bf595efb8d289c - -To reduce the secure level, write the password to seclvl/passwd under -your sysfs mount point: - -# echo -n "boogabooga" > /sys/seclvl/passwd - -The September 2004 edition of Sys Admin Magazine has an article about -the BSD Secure Levels LSM. I encourage you to refer to that article -for a more in-depth treatment of this security module: - -http://www.samag.com/documents/s=9304/sam0409a/0409a.htm diff --git a/Documentation/sh/new-machine.txt b/Documentation/sh/new-machine.txt index eb2dd2e..73988e0 100644 --- a/Documentation/sh/new-machine.txt +++ b/Documentation/sh/new-machine.txt @@ -41,11 +41,6 @@ Board-specific code: | .. more boards here ... -It should also be noted that each board is required to have some certain -headers. At the time of this writing, io.h is the only thing that needs -to be provided for each board, and can generally just reference generic -functions (with the exception of isa_port2addr). - Next, for companion chips: . `-- arch @@ -104,12 +99,13 @@ and then populate that with sub-director Both the Solution Engine and the hp6xx boards are an example of this. After you have setup your new arch/sh/boards/ directory, remember that you -also must add a directory in include/asm-sh for headers localized to this -board. In order to interoperate seamlessly with the build system, it's best -to have this directory the same as the arch/sh/boards/ directory name, -though if your board is again part of a family, the build system has ways -of dealing with this, and you can feel free to name the directory after -the family member itself. +should also add a directory in include/asm-sh for headers localized to this +board (if there are going to be more than one). In order to interoperate +seamlessly with the build system, it's best to have this directory the same +as the arch/sh/boards/ directory name, though if your board is again part of +a family, the build system has ways of dealing with this (via incdir-y +overloading), and you can feel free to name the directory after the family +member itself. There are a few things that each board is required to have, both in the arch/sh/boards and the include/asm-sh/ heirarchy. In order to better @@ -122,6 +118,7 @@ might look something like: * arch/sh/boards/vapor/setup.c - Setup code for imaginary board */ #include +#include /* for board_time_init() */ const char *get_system_type(void) { @@ -152,79 +149,57 @@ int __init platform_setup(void) } Our new imaginary board will also have to tie into the machvec in order for it -to be of any use. Currently the machvec is slowly on its way out, but is still -required for the time being. As such, let us take a look at what needs to be -done for the machvec assignment. +to be of any use. machvec functions fall into a number of categories: - I/O functions to IO memory (inb etc) and PCI/main memory (readb etc). - - I/O remapping functions (ioremap etc) - - some initialisation functions - - a 'heartbeat' function - - some miscellaneous flags - -The tree can be built in two ways: - - as a fully generic build. All drivers are linked in, and all functions - go through the machvec - - as a machine specific build. In this case only the required drivers - will be linked in, and some macros may be redefined to not go through - the machvec where performance is important (in particular IO functions). - -There are three ways in which IO can be performed: - - none at all. This is really only useful for the 'unknown' machine type, - which us designed to run on a machine about which we know nothing, and - so all all IO instructions do nothing. - - fully custom. In this case all IO functions go to a machine specific - set of functions which can do what they like - - a generic set of functions. These will cope with most situations, - and rely on a single function, mv_port2addr, which is called through the - machine vector, and converts an IO address into a memory address, which - can be read from/written to directly. - -Thus adding a new machine involves the following steps (I will assume I am -adding a machine called vapor): - - - add a new file include/asm-sh/vapor/io.h which contains prototypes for + - I/O mapping functions (ioport_map, ioport_unmap, etc). + - a 'heartbeat' function. + - PCI and IRQ initialization routines. + - Consistent allocators (for boards that need special allocators, + particularly for allocating out of some board-specific SRAM for DMA + handles). + +There are machvec functions added and removed over time, so always be sure to +consult include/asm-sh/machvec.h for the current state of the machvec. + +The kernel will automatically wrap in generic routines for undefined function +pointers in the machvec at boot time, as machvec functions are referenced +unconditionally throughout most of the tree. Some boards have incredibly +sparse machvecs (such as the dreamcast and sh03), whereas others must define +virtually everything (rts7751r2d). + +Adding a new machine is relatively trivial (using vapor as an example): + +If the board-specific definitions are quite minimalistic, as is the case for +the vast majority of boards, simply having a single board-specific header is +sufficient. + + - add a new file include/asm-sh/vapor.h which contains prototypes for any machine specific IO functions prefixed with the machine name, for example vapor_inb. These will be needed when filling out the machine vector. - This is the minimum that is required, however there are ample - opportunities to optimise this. In particular, by making the prototypes - inline function definitions, it is possible to inline the function when - building machine specific versions. Note that the machine vector - functions will still be needed, so that a module built for a generic - setup can be loaded. - - - add a new file arch/sh/boards/vapor/mach.c. This contains the definition - of the machine vector. When building the machine specific version, this - will be the real machine vector (via an alias), while in the generic - version is used to initialise the machine vector, and then freed, by - making it initdata. This should be defined as: - - struct sh_machine_vector mv_vapor __initmv = { - .mv_name = "vapor", - } - ALIAS_MV(vapor) - - - finally add a file arch/sh/boards/vapor/io.c, which contains - definitions of the machine specific io functions. - -A note about initialisation functions. Three initialisation functions are -provided in the machine vector: - - mv_arch_init - called very early on from setup_arch - - mv_init_irq - called from init_IRQ, after the generic SH interrupt - initialisation - - mv_init_pci - currently not used - -Any other remaining functions which need to be called at start up can be -added to the list using the __initcalls macro (or module_init if the code -can be built as a module). Many generic drivers probe to see if the device -they are targeting is present, however this may not always be appropriate, -so a flag can be added to the machine vector which will be set on those -machines which have the hardware in question, reducing the probe to a -single conditional. + Note that these prototypes are generated automatically by setting + __IO_PREFIX to something sensible. A typical example would be: + + #define __IO_PREFIX vapor + #include + + somewhere in the board-specific header. Any boards being ported that still + have a legacy io.h should remove it entirely and switch to the new model. + + - Add machine vector definitions to the board's setup.c. At a bare minimum, + this must be defined as something like: + + struct sh_machine_vector mv_vapor __initmv = { + .mv_name = "vapor", + }; + ALIAS_MV(vapor) + + - finally add a file arch/sh/boards/vapor/io.c, which contains definitions of + the machine specific io functions (if there are enough to warrant it). 3. Hooking into the Build System ================================ @@ -303,4 +278,3 @@ which will in turn copy the defconfig fo oldconfig (prompting you for any new options since the time of creation), and start you on your way to having a functional kernel for your new board. - diff --git a/Documentation/sh/register-banks.txt b/Documentation/sh/register-banks.txt new file mode 100644 index 0000000..a6719f2 --- /dev/null +++ b/Documentation/sh/register-banks.txt @@ -0,0 +1,33 @@ + Notes on register bank usage in the kernel + ========================================== + +Introduction +------------ + +The SH-3 and SH-4 CPU families traditionally include a single partial register +bank (selected by SR.RB, only r0 ... r7 are banked), whereas other families +may have more full-featured banking or simply no such capabilities at all. + +SR.RB banking +------------- + +In the case of this type of banking, banked registers are mapped directly to +r0 ... r7 if SR.RB is set to the bank we are interested in, otherwise ldc/stc +can still be used to reference the banked registers (as r0_bank ... r7_bank) +when in the context of another bank. The developer must keep the SR.RB value +in mind when writing code that utilizes these banked registers, for obvious +reasons. Userspace is also not able to poke at the bank1 values, so these can +be used rather effectively as scratch registers by the kernel. + +Presently the kernel uses several of these registers. + + - r0_bank, r1_bank (referenced as k0 and k1, used for scratch + registers when doing exception handling). + - r2_bank (used to track the EXPEVT/INTEVT code) + - Used by do_IRQ() and friends for doing irq mapping based off + of the interrupt exception vector jump table offset + - r6_bank (global interrupt mask) + - The SR.IMASK interrupt handler makes use of this to set the + interrupt priority level (used by local_irq_enable()) + - r7_bank (current) + diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index f61af23..e6b57dd 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -758,6 +758,7 @@ Prior to version 0.9.0rc4 options had a position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) single_cmd - Use single immediate commands to communicate with codecs (for debugging only) + disable_msi - Disable Message Signaled Interrupt (MSI) This module supports one card and autoprobe. @@ -778,11 +779,16 @@ Prior to version 0.9.0rc4 options had a 6stack-digout 6-jack with a SPDIF out w810 3-jack z71v 3-jack (HP shared SPDIF) - asus 3-jack + asus 3-jack (ASUS Mobo) + asus-w1v ASUS W1V + asus-dig ASUS with SPDIF out + asus-dig2 ASUS with SPDIF out (using GPIO2) uniwill 3-jack F1734 2-jack lg LG laptop (m1 express dual) - lg-lw LG LW20 laptop + lg-lw LG LW20/LW25 laptop + tcl TCL S700 + clevo Clevo laptops (m520G, m665n) test for testing/debugging purpose, almost all controls can be adjusted. Appearing only when compiled with $CONFIG_SND_DEBUG=y @@ -790,6 +796,7 @@ Prior to version 0.9.0rc4 options had a ALC260 hp HP machines + hp-3013 HP machines (3013-variant) fujitsu Fujitsu S7020 acer Acer TravelMate basic fixed pin assignment (old default model) @@ -797,24 +804,32 @@ Prior to version 0.9.0rc4 options had a ALC262 fujitsu Fujitsu Laptop + hp-bpc HP xw4400/6400/8400/9400 laptops + benq Benq ED8 basic fixed pin assignment w/o SPDIF auto auto-config reading BIOS (default) ALC882/885 3stack-dig 3-jack with SPDIF I/O 6stck-dig 6-jack digital with SPDIF I/O + arima Arima W820Di1 auto auto-config reading BIOS (default) ALC883/888 3stack-dig 3-jack with SPDIF I/O 6stack-dig 6-jack digital with SPDIF I/O - 6stack-dig-demo 6-stack digital for Intel demo board + 3stack-6ch 3-jack 6-channel + 3stack-6ch-dig 3-jack 6-channel with SPDIF I/O + 6stack-dig-demo 6-jack digital for Intel demo board + acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc) auto auto-config reading BIOS (default) ALC861/660 3stack 3-jack 3stack-dig 3-jack with SPDIF I/O 6stack-dig 6-jack with SPDIF I/O + 3stack-660 3-jack (for ALC660) + uniwill-m31 Uniwill M31 laptop auto auto-config reading BIOS (default) CMI9880 @@ -843,10 +858,21 @@ Prior to version 0.9.0rc4 options had a 3stack-dig ditto with SPDIF laptop 3-jack with hp-jack automute laptop-dig ditto with SPDIF - auto auto-confgi reading BIOS (default) + auto auto-config reading BIOS (default) + + STAC9200/9205/9220/9221/9254 + ref Reference board + 3stack D945 3stack + 5stack D945 5stack + SPDIF - STAC7661(?) + STAC9227/9228/9229/927x + ref Reference board + 3stack D965 3stack + 5stack D965 5stack + SPDIF + + STAC9872 vaio Setup for VAIO FE550G/SZ110 + vaio-ar Setup for VAIO AR If the default configuration doesn't work and one of the above matches with your device, report it together with the PCI @@ -1213,6 +1239,14 @@ Prior to version 0.9.0rc4 options had a Module supports only 1 card. This module has no enable option. + Module snd-mts64 + ---------------- + + Module for Ego Systems (ESI) Miditerminal 4140 + + This module supports multiple devices. + Requires parport (CONFIG_PARPORT). + Module snd-nm256 ---------------- diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index b8dc51c..4807ef7 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl @@ -1054,9 +1054,8 @@ For a device which allows hotplugging, you can use - snd_card_free_in_thread. This one will - postpone the destruction and wait in a kernel-thread until all - devices are closed. + snd_card_free_when_closed. This one will + postpone the destruction until all devices are closed. diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt index 5a311c3..f9c99c9 100644 --- a/Documentation/sparse.txt +++ b/Documentation/sparse.txt @@ -69,10 +69,10 @@ recompiled, or use "make C=2" to run spa be recompiled or not. The latter is a fast way to check the whole tree if you have already built it. -The optional make variable CF can be used to pass arguments to sparse. The -build system passes -Wbitwise to sparse automatically. To perform endianness -checks, you may define __CHECK_ENDIAN__: +The optional make variable CHECKFLAGS can be used to pass arguments to sparse. +The build system passes -Wbitwise to sparse automatically. To perform +endianness checks, you may define __CHECK_ENDIAN__: - make C=2 CF="-D__CHECK_ENDIAN__" + make C=2 CHECKFLAGS="-D__CHECK_ENDIAN__" These checks are disabled by default as they generate a host of warnings. diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 7cee902..20d0d79 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt @@ -29,6 +29,7 @@ Currently, these files are in /proc/sys/ - drop-caches - zone_reclaim_mode - min_unmapped_ratio +- min_slab_ratio - panic_on_oom ============================================================== @@ -138,7 +139,6 @@ This is value ORed together of 1 = Zone reclaim on 2 = Zone reclaim writes dirty pages out 4 = Zone reclaim swaps pages -8 = Also do a global slab reclaim pass zone_reclaim_mode is set during bootup to 1 if it is determined that pages from remote zones will cause a measurable performance reduction. The @@ -162,18 +162,13 @@ Allowing regular swap effectively restri node unless explicitly overridden by memory policies or cpuset configurations. -It may be advisable to allow slab reclaim if the system makes heavy -use of files and builds up large slab caches. However, the slab -shrink operation is global, may take a long time and free slabs -in all nodes of the system. - ============================================================= min_unmapped_ratio: This is available only on NUMA kernels. -A percentage of the file backed pages in each zone. Zone reclaim will only +A percentage of the total pages in each zone. Zone reclaim will only occur if more than this percentage of pages are file backed and unmapped. This is to insure that a minimal amount of local pages is still available for file I/O even if the node is overallocated. @@ -182,6 +177,24 @@ The default is 1 percent. ============================================================= +min_slab_ratio: + +This is available only on NUMA kernels. + +A percentage of the total pages in each zone. On Zone reclaim +(fallback from the local zone occurs) slabs will be reclaimed if more +than this percentage of pages in a zone are reclaimable slab pages. +This insures that the slab growth stays under control even in NUMA +systems that rarely perform global reclaim. + +The default is 5 percent. + +Note that slab reclaim is triggered in a per zone / node fashion. +The process of reclaiming slab memory is currently not node specific +and may not be fast. + +============================================================= + panic_on_oom This enables or disables panic on out-of-memory feature. If this is set to 1, diff --git a/Documentation/usb/error-codes.txt b/Documentation/usb/error-codes.txt index 867f4c3..39c68f8 100644 --- a/Documentation/usb/error-codes.txt +++ b/Documentation/usb/error-codes.txt @@ -98,13 +98,13 @@ one or more packets could finish before error, a failure to respond (often caused by device disconnect), or some other fault. --ETIMEDOUT (**) No response packet received within the prescribed +-ETIME (**) No response packet received within the prescribed bus turn-around time. This error may instead be reported as -EPROTO or -EILSEQ. - Note that the synchronous USB message functions - also use this code to indicate timeout expired - before the transfer completed. +-ETIMEDOUT Synchronous USB message functions use this code + to indicate timeout expired before the transfer + completed, and no other error was reported by HC. -EPIPE (**) Endpoint stalled. For non-control endpoints, reset this status with usb_clear_halt(). @@ -163,6 +163,3 @@ usb_get_*/usb_set_*(): usb_control_msg(): usb_bulk_msg(): -ETIMEDOUT Timeout expired before the transfer completed. - In the future this code may change to -ETIME, - whose definition is a closer match to this sort - of error. diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt index 02b0f7b..a2dee6e 100644 --- a/Documentation/usb/usb-serial.txt +++ b/Documentation/usb/usb-serial.txt @@ -433,6 +433,11 @@ Options supported: See http://www.uuhaus.de/linux/palmconnect.html for up-to-date information on this driver. +AIRcable USB Dongle Bluetooth driver + If there is the cdc_acm driver loaded in the system, you will find that the + cdc_acm claims the device before AIRcable can. This is simply corrected + by unloading both modules and then loading the aircable module before + cdc_acm module Generic Serial driver diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 00d9a1f..669a09a 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 @@ -7,10 +7,10 @@ 6 -> AverTV Studio 303 (M126) [1461:000b] 7 -> MSI TV-@nywhere Master [1462:8606] 8 -> Leadtek Winfast DV2000 [107d:6620] - 9 -> Leadtek PVR 2000 [107d:663b,107d:663C] + 9 -> Leadtek PVR 2000 [107d:663b,107d:663c,107d:6632] 10 -> IODATA GV-VCP3/PCI [10fc:d003] 11 -> Prolink PlayTV PVR - 12 -> ASUS PVR-416 [1043:4823] + 12 -> ASUS PVR-416 [1043:4823,1461:c111] 13 -> MSI TV-@nywhere 14 -> KWorld/VStream XPert DVB-T [17de:08a6] 15 -> DViCO FusionHDTV DVB-T1 [18ac:db00] @@ -51,3 +51,7 @@ 50 -> NPG Tech Real TV FM Top 10 [14f1:0842] 51 -> WinFast DTV2000 H [107d:665e] 52 -> Geniatech DVB-S [14f1:0084] + 53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T [0070:1404] + 54 -> Norwood Micro TV Tuner + 55 -> Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM [c180:c980] + 56 -> Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder [0070:9600,0070:9601,0070:9602] diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 9068b66..94cf695 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 @@ -58,7 +58,7 @@ 57 -> Avermedia AVerTV GO 007 FM [1461:f31f] 58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0351,1421:0370,1421:1370] 59 -> Kworld/Tevion V-Stream Xpert TV PVR7134 - 60 -> LifeView/Typhoon FlyDVB-T Duo Cardbus [5168:0502,4e42:0502] + 60 -> LifeView/Typhoon/Genius FlyDVB-T Duo Cardbus [5168:0502,4e42:0502,1489:0502] 61 -> Philips TOUGH DVB-T reference design [1131:2004] 62 -> Compro VideoMate TV Gold+II 63 -> Kworld Xpert TV PVR7134 @@ -83,7 +83,7 @@ 82 -> MSI TV@Anywhere plus [1462:6231] 83 -> Terratec Cinergy 250 PCI TV [153b:1160] 84 -> LifeView FlyDVB Trio [5168:0319] - 85 -> AverTV DVB-T 777 [1461:2c05] + 85 -> AverTV DVB-T 777 [1461:2c05,1461:2c05] 86 -> LifeView FlyDVB-T / Genius VideoWonder DVB-T [5168:0301,1489:0301] 87 -> ADS Instant TV Duo Cardbus PTV331 [0331:1421] 88 -> Tevion/KWorld DVB-T 220RF [17de:7201] @@ -94,3 +94,6 @@ 93 -> Medion 7134 Bridge #2 [16be:0005] 94 -> LifeView FlyDVB-T Hybrid Cardbus [5168:3306,5168:3502] 95 -> LifeView FlyVIDEO3000 (NTSC) [5169:0138] + 96 -> Medion Md8800 Quadro [16be:0007,16be:0008] + 97 -> LifeView FlyDVB-S /Acorp TV134DS [5168:0300,4e42:0300] + 98 -> Proteus Pro 2309 [0919:2003] diff --git a/Documentation/video4linux/bttv/Insmod-options b/Documentation/video4linux/bttv/Insmod-options index fc94ff2..bb7c2ca 100644 --- a/Documentation/video4linux/bttv/Insmod-options +++ b/Documentation/video4linux/bttv/Insmod-options @@ -54,6 +54,12 @@ bttv.o dropouts. chroma_agc=0/1 AGC of chroma signal, off by default. adc_crush=0/1 Luminance ADC crush, on by default. + i2c_udelay= Allow reduce I2C speed. Default is 5 usecs + (meaning 66,67 Kbps). The default is the + maximum supported speed by kernel bitbang + algoritm. You may use lower numbers, if I2C + messages are lost (16 is known to work on + all supported cards). bttv_gpio=0/1 gpiomask= diff --git a/Documentation/video4linux/cx2341x/README.hm12 b/Documentation/video4linux/cx2341x/README.hm12 new file mode 100644 index 0000000..0e213ed --- /dev/null +++ b/Documentation/video4linux/cx2341x/README.hm12 @@ -0,0 +1,116 @@ +The cx23416 can produce (and the cx23415 can also read) raw YUV output. The +format of a YUV frame is specific to this chip and is called HM12. 'HM' stands +for 'Hauppauge Macroblock', which is a misnomer as 'Conexant Macroblock' would +be more accurate. + +The format is YUV 4:2:0 which uses 1 Y byte per pixel and 1 U and V byte per +four pixels. + +The data is encoded as two macroblock planes, the first containing the Y +values, the second containing UV macroblocks. + +The Y plane is divided into blocks of 16x16 pixels from left to right +and from top to bottom. Each block is transmitted in turn, line-by-line. + +So the first 16 bytes are the first line of the top-left block, the +second 16 bytes are the second line of the top-left block, etc. After +transmitting this block the first line of the block on the right to the +first block is transmitted, etc. + +The UV plane is divided into blocks of 16x8 UV values going from left +to right, top to bottom. Each block is transmitted in turn, line-by-line. + +So the first 16 bytes are the first line of the top-left block and +contain 8 UV value pairs (16 bytes in total). The second 16 bytes are the +second line of 8 UV pairs of the top-left block, etc. After transmitting +this block the first line of the block on the right to the first block is +transmitted, etc. + +The code below is given as an example on how to convert HM12 to separate +Y, U and V planes. This code assumes frames of 720x576 (PAL) pixels. + +The width of a frame is always 720 pixels, regardless of the actual specified +width. + +-------------------------------------------------------------------------- + +#include +#include +#include + +static unsigned char frame[576*720*3/2]; +static unsigned char framey[576*720]; +static unsigned char frameu[576*720 / 4]; +static unsigned char framev[576*720 / 4]; + +static void de_macro_y(unsigned char* dst, unsigned char *src, int dstride, int w, int h) +{ + unsigned int y, x, i; + + // descramble Y plane + // dstride = 720 = w + // The Y plane is divided into blocks of 16x16 pixels + // Each block in transmitted in turn, line-by-line. + for (y = 0; y < h; y += 16) { + for (x = 0; x < w; x += 16) { + for (i = 0; i < 16; i++) { + memcpy(dst + x + (y + i) * dstride, src, 16); + src += 16; + } + } + } +} + +static void de_macro_uv(unsigned char *dstu, unsigned char *dstv, unsigned char *src, int dstride, int w, int h) +{ + unsigned int y, x, i; + + // descramble U/V plane + // dstride = 720 / 2 = w + // The U/V values are interlaced (UVUV...). + // Again, the UV plane is divided into blocks of 16x16 UV values. + // Each block in transmitted in turn, line-by-line. + for (y = 0; y < h; y += 16) { + for (x = 0; x < w; x += 8) { + for (i = 0; i < 16; i++) { + int idx = x + (y + i) * dstride; + + dstu[idx+0] = src[0]; dstv[idx+0] = src[1]; + dstu[idx+1] = src[2]; dstv[idx+1] = src[3]; + dstu[idx+2] = src[4]; dstv[idx+2] = src[5]; + dstu[idx+3] = src[6]; dstv[idx+3] = src[7]; + dstu[idx+4] = src[8]; dstv[idx+4] = src[9]; + dstu[idx+5] = src[10]; dstv[idx+5] = src[11]; + dstu[idx+6] = src[12]; dstv[idx+6] = src[13]; + dstu[idx+7] = src[14]; dstv[idx+7] = src[15]; + src += 16; + } + } + } +} + +/*************************************************************************/ +int main(int argc, char **argv) +{ + FILE *fin; + int i; + + if (argc == 1) fin = stdin; + else fin = fopen(argv[1], "r"); + + if (fin == NULL) { + fprintf(stderr, "cannot open input\n"); + exit(-1); + } + while (fread(frame, sizeof(frame), 1, fin) == 1) { + de_macro_y(framey, frame, 720, 720, 576); + de_macro_uv(frameu, framev, frame + 720 * 576, 720 / 2, 720 / 2, 576 / 2); + fwrite(framey, sizeof(framey), 1, stdout); + fwrite(framev, sizeof(framev), 1, stdout); + fwrite(frameu, sizeof(frameu), 1, stdout); + } + fclose(fin); + return 0; +} + +-------------------------------------------------------------------------- diff --git a/Documentation/video4linux/cx2341x/README.vbi b/Documentation/video4linux/cx2341x/README.vbi new file mode 100644 index 0000000..5807cf1 --- /dev/null +++ b/Documentation/video4linux/cx2341x/README.vbi @@ -0,0 +1,45 @@ + +Format of embedded V4L2_MPEG_STREAM_VBI_FMT_IVTV VBI data +========================================================= + +This document describes the V4L2_MPEG_STREAM_VBI_FMT_IVTV format of the VBI data +embedded in an MPEG-2 program stream. This format is in part dictated by some +hardware limitations of the ivtv driver (the driver for the Conexant cx23415/6 +chips), in particular a maximum size for the VBI data. Anything longer is cut +off when the MPEG stream is played back through the cx23415. + +The advantage of this format is it is very compact and that all VBI data for +all lines can be stored while still fitting within the maximum allowed size. + +The stream ID of the VBI data is 0xBD. The maximum size of the embedded data is +4 + 43 * 36, which is 4 bytes for a header and 2 * 18 VBI lines with a 1 byte +header and a 42 bytes payload each. Anything beyond this limit is cut off by +the cx23415/6 firmware. Besides the data for the VBI lines we also need 36 bits +for a bitmask determining which lines are captured and 4 bytes for a magic cookie, +signifying that this data package contains V4L2_MPEG_STREAM_VBI_FMT_IVTV VBI data. +If all lines are used, then there is no longer room for the bitmask. To solve this +two different magic numbers were introduced: + +'itv0': After this magic number two unsigned longs follow. Bits 0-17 of the first +unsigned long denote which lines of the first field are captured. Bits 18-31 of +the first unsigned long and bits 0-3 of the second unsigned long are used for the +second field. + +'ITV0': This magic number assumes all VBI lines are captured, i.e. it implicitly +implies that the bitmasks are 0xffffffff and 0xf. + +After these magic cookies (and the 8 byte bitmask in case of cookie 'itv0') the +captured VBI lines start: + +For each line the least significant 4 bits of the first byte contain the data type. +Possible values are shown in the table below. The payload is in the following 42 +bytes. + +Here is the list of possible data types: + +#define IVTV_SLICED_TYPE_TELETEXT 0x1 // Teletext (uses lines 6-22 for PAL) +#define IVTV_SLICED_TYPE_CC 0x4 // Closed Captions (line 21 NTSC) +#define IVTV_SLICED_TYPE_WSS 0x5 // Wide Screen Signal (line 23 PAL) +#define IVTV_SLICED_TYPE_VPS 0x7 // Video Programming System (PAL) (line 16) + +Hans Verkuil diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt index 6da24e7..74b77f9 100644 --- a/Documentation/x86_64/boot-options.txt +++ b/Documentation/x86_64/boot-options.txt @@ -199,6 +199,11 @@ IOMMU allowed overwrite iommu off workarounds for specific chipsets. soft Use software bounce buffering (default for Intel machines) noaperture Don't touch the aperture for AGP. + allowdac Allow DMA >4GB + When off all DMA over >4GB is forced through an IOMMU or bounce + buffering. + nodac Forbid DMA >4GB + panic Always panic when IOMMU overflows swiotlb=pages[,force] @@ -245,6 +250,13 @@ Debugging newfallback: use new unwinder but fall back to old if it gets stuck (default) + call_trace=[old|both|newfallback|new] + old: use old inexact backtracer + new: use new exact dwarf2 unwinder + both: print entries from both + newfallback: use new unwinder but fall back to old if it gets + stuck (default) + Misc noreplacement Don't replace instructions with more appropriate ones diff --git a/Documentation/x86_64/kernel-stacks b/Documentation/x86_64/kernel-stacks new file mode 100644 index 0000000..bddfddd --- /dev/null +++ b/Documentation/x86_64/kernel-stacks @@ -0,0 +1,99 @@ +Most of the text from Keith Owens, hacked by AK + +x86_64 page size (PAGE_SIZE) is 4K. + +Like all other architectures, x86_64 has a kernel stack for every +active thread. These thread stacks are THREAD_SIZE (2*PAGE_SIZE) big. +These stacks contain useful data as long as a thread is alive or a +zombie. While the thread is in user space the kernel stack is empty +except for the thread_info structure at the bottom. + +In addition to the per thread stacks, there are specialized stacks +associated with each cpu. These stacks are only used while the kernel +is in control on that cpu, when a cpu returns to user space the +specialized stacks contain no useful data. The main cpu stacks is + +* Interrupt stack. IRQSTACKSIZE + + Used for external hardware interrupts. If this is the first external + hardware interrupt (i.e. not a nested hardware interrupt) then the + kernel switches from the current task to the interrupt stack. Like + the split thread and interrupt stacks on i386 (with CONFIG_4KSTACKS), + this gives more room for kernel interrupt processing without having + to increase the size of every per thread stack. + + The interrupt stack is also used when processing a softirq. + +Switching to the kernel interrupt stack is done by software based on a +per CPU interrupt nest counter. This is needed because x86-64 "IST" +hardware stacks cannot nest without races. + +x86_64 also has a feature which is not available on i386, the ability +to automatically switch to a new stack for designated events such as +double fault or NMI, which makes it easier to handle these unusual +events on x86_64. This feature is called the Interrupt Stack Table +(IST). There can be up to 7 IST entries per cpu. The IST code is an +index into the Task State Segment (TSS), the IST entries in the TSS +point to dedicated stacks, each stack can be a different size. + +An IST is selected by an non-zero value in the IST field of an +interrupt-gate descriptor. When an interrupt occurs and the hardware +loads such a descriptor, the hardware automatically sets the new stack +pointer based on the IST value, then invokes the interrupt handler. If +software wants to allow nested IST interrupts then the handler must +adjust the IST values on entry to and exit from the interrupt handler. +(this is occasionally done, e.g. for debug exceptions) + +Events with different IST codes (i.e. with different stacks) can be +nested. For example, a debug interrupt can safely be interrupted by an +NMI. arch/x86_64/kernel/entry.S::paranoidentry adjusts the stack +pointers on entry to and exit from all IST events, in theory allowing +IST events with the same code to be nested. However in most cases, the +stack size allocated to an IST assumes no nesting for the same code. +If that assumption is ever broken then the stacks will become corrupt. + +The currently assigned IST stacks are :- + +* STACKFAULT_STACK. EXCEPTION_STKSZ (PAGE_SIZE). + + Used for interrupt 12 - Stack Fault Exception (#SS). + + This allows to recover from invalid stack segments. Rarely + happens. + +* DOUBLEFAULT_STACK. EXCEPTION_STKSZ (PAGE_SIZE). + + Used for interrupt 8 - Double Fault Exception (#DF). + + Invoked when handling a exception causes another exception. Happens + when the kernel is very confused (e.g. kernel stack pointer corrupt) + Using a separate stack allows to recover from it well enough in many + cases to still output an oops. + +* NMI_STACK. EXCEPTION_STKSZ (PAGE_SIZE). + + Used for non-maskable interrupts (NMI). + + NMI can be delivered at any time, including when the kernel is in the + middle of switching stacks. Using IST for NMI events avoids making + assumptions about the previous state of the kernel stack. + +* DEBUG_STACK. DEBUG_STKSZ + + Used for hardware debug interrupts (interrupt 1) and for software + debug interrupts (INT3). + + When debugging a kernel, debug interrupts (both hardware and + software) can occur at any time. Using IST for these interrupts + avoids making assumptions about the previous state of the kernel + stack. + +* MCE_STACK. EXCEPTION_STKSZ (PAGE_SIZE). + + Used for interrupt 18 - Machine Check Exception (#MC). + + MCE can be delivered at any time, including when the kernel is in the + middle of switching stacks. Using IST for MCE events avoids making + assumptions about the previous state of the kernel stack. + +For more details see the Intel IA32 or AMD AMD64 architecture manuals. diff --git a/Kbuild b/Kbuild index 2d4f95e..0451f69 100644 --- a/Kbuild +++ b/Kbuild @@ -28,7 +28,7 @@ define cmd_offsets echo "/*"; \ echo " * DO NOT MODIFY."; \ echo " *"; \ - echo " * This file was generated by $(srctree)/Kbuild"; \ + echo " * This file was generated by Kbuild"; \ echo " *"; \ echo " */"; \ echo ""; \ diff --git a/MAINTAINERS b/MAINTAINERS index a34c53c..f0cd5a3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -298,6 +298,14 @@ L: info-linux@geode.amd.com W: http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html S: Supported +AMSO1100 RNIC DRIVER +P: Tom Tucker +M: tom@opengridcomputing.com +P: Steve Wise +M: swise@opengridcomputing.com +L: openib-general@openib.org +S: Maintained + AOA (Apple Onboard Audio) ALSA DRIVER P: Johannes Berg M: johannes@sipsolutions.net @@ -435,6 +443,23 @@ W: http://people.redhat.com/sgrubb/audit T: git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git S: Maintained +AVR32 ARCHITECTURE +P: Atmel AVR32 Support Team +M: avr32@atmel.com +P: Haavard Skinnemoen +M: hskinnemoen@atmel.com +W: http://www.atmel.com/products/AVR32/ +W: http://avr32linux.org/ +W: http://avrfreaks.net/ +S: Supported + +AVR32/AT32AP MACHINE SUPPORT +P: Atmel AVR32 Support Team +M: avr32@atmel.com +P: Haavard Skinnemoen +M: hskinnemoen@atmel.com +S: Supported + AX.25 NETWORK LAYER P: Ralf Baechle M: ralf@linux-mips.org @@ -449,9 +474,9 @@ L: linux-hams@vger.kernel.org W: http://www.baycom.org/~tom/ham/ham.html S: Maintained -BCM43XX WIRELESS DRIVER -P: Michael Buesch -M: mb@bu3sch.de +BCM43XX WIRELESS DRIVER (SOFTMAC BASED VERSION) +P: Larry Finger +M: Larry.Finger@lwfinger.net P: Stefano Brivio M: st3@riseup.net W: http://bcm43xx.berlios.de/ @@ -476,7 +501,7 @@ S: Maintained BLOCK LAYER P: Jens Axboe -M: axboe@suse.de +M: axboe@kernel.dk L: linux-kernel@vger.kernel.org T: git kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git S: Maintained @@ -826,7 +851,7 @@ P: Doug Warzecha M: Douglas_Warzecha@dell.com S: Maintained -DEVICE-MAPPER +DEVICE-MAPPER (LVM) P: Alasdair Kergon L: dm-devel@redhat.com W: http://sources.redhat.com/dm @@ -991,6 +1016,14 @@ EFS FILESYSTEM W: http://aeschi.ch.eu.org/efs/ S: Orphan +EHCA (IBM GX bus InfiniBand adapter) DRIVER: +P: Hoang-Nam Nguyen +M: hnguyen@de.ibm.com +P: Christoph Raisch +M: raisch@de.ibm.com +L: openib-general@openib.org +S: Supported + EMU10K1 SOUND DRIVER P: James Courtier-Dutton M: James@superbug.demon.co.uk @@ -1347,7 +1380,7 @@ S: Maintained IDE/ATAPI CDROM DRIVER P: Jens Axboe -M: axboe@suse.de +M: axboe@kernel.dk L: linux-kernel@vger.kernel.org W: http://www.kernel.dk S: Maintained @@ -1365,36 +1398,29 @@ M: Gadi Oxman L: linux-kernel@vger.kernel.org S: Maintained -IEEE 1394 ETHERNET (eth1394) -L: linux1394-devel@lists.sourceforge.net -W: http://www.linux1394.org/ -S: Orphan - IEEE 1394 SUBSYSTEM P: Ben Collins M: bcollins@debian.org -P: Jody McIntyre -M: scjody@modernduck.com +P: Stefan Richter +M: stefanr@s5r6.in-berlin.de L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ -T: git kernel.org:/pub/scm/linux/kernel/git/scjody/ieee1394.git +T: git kernel.org:/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git S: Maintained -IEEE 1394 OHCI DRIVER -P: Ben Collins -M: bcollins@debian.org -P: Jody McIntyre -M: scjody@modernduck.com +IEEE 1394 IPV4 DRIVER (eth1394) +P: Stefan Richter +M: stefanr@s5r6.in-berlin.de L: linux1394-devel@lists.sourceforge.net -W: http://www.linux1394.org/ -S: Maintained +S: Odd Fixes IEEE 1394 PCILYNX DRIVER P: Jody McIntyre M: scjody@modernduck.com +P: Stefan Richter +M: stefanr@s5r6.in-berlin.de L: linux1394-devel@lists.sourceforge.net -W: http://www.linux1394.org/ -S: Maintained +S: Odd Fixes IEEE 1394 RAW I/O DRIVER P: Ben Collins @@ -1402,16 +1428,6 @@ M: bcollins@debian.org P: Dan Dennedy M: dan@dennedy.org L: linux1394-devel@lists.sourceforge.net -W: http://www.linux1394.org/ -S: Maintained - -IEEE 1394 SBP2 -P: Ben Collins -M: bcollins@debian.org -P: Stefan Richter -M: stefanr@s5r6.in-berlin.de -L: linux1394-devel@lists.sourceforge.net -W: http://www.linux1394.org/ S: Maintained IMS TWINTURBO FRAMEBUFFER DRIVER @@ -1783,6 +1799,13 @@ W: http://www.penguinppc.org/ L: linuxppc-embedded@ozlabs.org S: Maintained +LINUX FOR POWERPC PA SEMI PWRFICIENT +P: Olof Johansson +M: olof@lixom.net +W: http://www.pasemi.com/ +L: linuxppc-dev@ozlabs.org +S: Supported + LLC (802.2) P: Arnaldo Carvalho de Melo M: acme@conectiva.com.br @@ -2008,6 +2031,13 @@ L: netfilter@lists.netfilter.org L: netfilter-devel@lists.netfilter.org S: Supported +NETLABEL +P: Paul Moore +M: paul.moore@hp.com +W: http://netlabel.sf.net +L: netdev@vger.kernel.org +S: Supported + NETROM NETWORK LAYER P: Ralf Baechle M: ralf@linux-mips.org @@ -2015,7 +2045,7 @@ L: linux-hams@vger.kernel.org W: http://www.linux-ax25.org/ S: Maintained -NETWORK BLOCK DEVICE +NETWORK BLOCK DEVICE (NBD) P: Paul Clements M: Paul.Clements@steeleye.com S: Maintained @@ -2366,6 +2396,12 @@ M: linux-driver@qlogic.com L: linux-scsi@vger.kernel.org S: Supported +QLOGIC QLA3XXX NETWORK DRIVER +P: Ron Mercer +M: linux-driver@qlogic.com +L: netdev@vger.kernel.org +S: Supported + QNX4 FILESYSTEM P: Anders Larsen M: al@alarsen.net @@ -2445,6 +2481,8 @@ S: Maintained S390 P: Martin Schwidefsky M: schwidefsky@de.ibm.com +P: Heiko Carstens +M: heiko.carstens@de.ibm.com M: linux390@de.ibm.com L: linux-390@vm.marist.edu W: http://www.ibm.com/developerworks/linux/linux390/ @@ -2459,8 +2497,8 @@ W: http://www.ibm.com/developerworks/lin S: Supported S390 ZFCP DRIVER -P: Andreas Herrmann -M: aherrman@de.ibm.com +P: Swen Schillig +M: swen@vnet.ibm.com M: linux390@de.ibm.com L: linux-390@vm.marist.edu W: http://www.ibm.com/developerworks/linux/linux390/ @@ -2493,7 +2531,7 @@ S: Maintained SCSI CDROM DRIVER P: Jens Axboe -M: axboe@suse.de +M: axboe@kernel.dk L: linux-scsi@vger.kernel.org W: http://www.kernel.dk S: Maintained @@ -2616,6 +2654,17 @@ P: Nicolas Pitre M: nico@cam.org S: Maintained +SOFTMAC LAYER (IEEE 802.11) +P: Johannes Berg +M: johannes@sipsolutions.net +P: Joe Jezak +M: josejx@gentoo.org +P: Daniel Drake +M: dsd@gentoo.org +W: http://softmac.sipsolutions.net/ +L: netdev@vger.kernel.org +S: Maintained + SOFTWARE RAID (Multiple Disks) SUPPORT P: Ingo Molnar M: mingo@redhat.com @@ -2744,6 +2793,12 @@ M: R.E.Wolff@BitWizard.nl L: linux-kernel@vger.kernel.org ? S: Supported +SPIDERNET NETWORK DRIVER for CELL +P: Jim Lewis +M: jim@jklewis.com +L: netdev@vger.kernel.org +S: Supported + SRM (Alpha) environment access P: Jan-Benedict Glaw M: jbglaw@lug-owl.de @@ -2768,12 +2823,9 @@ S: Maintained SUPERH (sh) P: Paul Mundt M: lethal@linux-sh.org -P: Kazumoto Kojima -M: kkojima@rr.iij4u.or.jp -L: linuxsh-dev@lists.sourceforge.net +L: linuxsh-dev@lists.sourceforge.net (subscribers-only) W: http://www.linux-sh.org W: http://www.m17n.org/linux-sh/ -W: http://www.rr.iij4u.or.jp/~kkojima/linux-sh4.html S: Maintained SUPERH64 (sh64) @@ -2897,8 +2949,8 @@ W: http://www.auk.cx/tms380tr/ S: Maintained TULIP NETWORK DRIVER -P: Jeff Garzik -M: jgarzik@pobox.com +P: Valerie Henson +M: val_henson@linux.intel.com L: tulip-users@lists.sourceforge.net W: http://sourceforge.net/projects/tulip/ S: Maintained @@ -2924,7 +2976,7 @@ S: Maintained UNIFORM CDROM DRIVER P: Jens Axboe -M: axboe@suse.de +M: axboe@kernel.dk L: linux-kernel@vger.kernel.org W: http://www.kernel.dk S: Maintained @@ -3243,6 +3295,12 @@ W: http://linuxtv.org T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git S: Maintained +VT1211 HARDWARE MONITOR DRIVER +P: Juerg Haefliger +M: juergh@gmail.com +L: lm-sensors@lm-sensors.org +S: Maintained + VT8231 HARDWARE MONITOR DRIVER P: Roger Lucas M: roger@planbit.co.uk @@ -3349,6 +3407,15 @@ W: http://www.qsl.net/dl1bke/ L: linux-hams@vger.kernel.org S: Maintained +ZD1211RW WIRELESS DRIVER +P: Daniel Drake +M: dsd@gentoo.org +P: Ulrich Kunitz +M: kune@deine-taler.de +W: http://zd1211.ath.cx/wiki/DriverRewrite +L: zd1211-devs@lists.sourceforge.net (subscribers-only) +S: Maintained + ZF MACHZ WATCHDOG P: Fernando Fuganti M: fuganti@netbank.com.br diff --git a/Makefile b/Makefile index edfc2fd..4c6c5e3 100644 --- a/Makefile +++ b/Makefile @@ -41,9 +41,15 @@ ifndef KBUILD_VERBOSE KBUILD_VERBOSE = 0 endif -# Call checker as part of compilation of C files -# Use 'make C=1' to enable checking (sparse, by default) -# Override with 'make C=1 CHECK=checker_executable CHECKFLAGS=....' +# Call a source code checker (by default, "sparse") as part of the +# C compilation. +# +# Use 'make C=1' to enable checking of only re-compiled files. +# Use 'make C=2' to enable checking of *all* source files, regardless +# of whether they are re-compiled or not. +# +# See the file "Documentation/sparse.txt" for more details, including +# where to get the "sparse" utility. ifdef C ifeq ("$(origin C)", "command line") @@ -639,12 +645,12 @@ define rule_vmlinux__ $(call cmd,vmlinux__) $(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd - $(Q)$(if $($(quiet)cmd_sysmap), \ - echo ' $($(quiet)cmd_sysmap) System.map' &&) \ - $(cmd_sysmap) $@ System.map; \ - if [ $$? -ne 0 ]; then \ - rm -f $@; \ - /bin/false; \ + $(Q)$(if $($(quiet)cmd_sysmap), \ + echo ' $($(quiet)cmd_sysmap) System.map' &&) \ + $(cmd_sysmap) $@ System.map; \ + if [ $$? -ne 0 ]; then \ + rm -f $@; \ + /bin/false; \ fi; $(verify_kallsyms) endef @@ -677,12 +683,12 @@ endif kallsyms.o := .tmp_kallsyms$(last_kallsyms).o define verify_kallsyms - $(Q)$(if $($(quiet)cmd_sysmap), \ - echo ' $($(quiet)cmd_sysmap) .tmp_System.map' &&) \ + $(Q)$(if $($(quiet)cmd_sysmap), \ + echo ' $($(quiet)cmd_sysmap) .tmp_System.map' &&) \ $(cmd_sysmap) .tmp_vmlinux$(last_kallsyms) .tmp_System.map - $(Q)cmp -s System.map .tmp_System.map || \ - (echo Inconsistent kallsyms data; \ - echo Try setting CONFIG_KALLSYMS_EXTRA_PASS; \ + $(Q)cmp -s System.map .tmp_System.map || \ + (echo Inconsistent kallsyms data; \ + echo Try setting CONFIG_KALLSYMS_EXTRA_PASS; \ rm .tmp_kallsyms* ; /bin/false ) endef @@ -736,6 +742,7 @@ endif # ifdef CONFIG_KALLSYMS # vmlinux image - including updated kernel symbols vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE $(call if_changed_rule,vmlinux__) + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@ $(Q)rm -f .old_version # The actual objects are generated when descending, @@ -753,12 +760,34 @@ PHONY += $(vmlinux-dirs) $(Q)$(MAKE) $(build)=$@ # Build the kernel release string -# The KERNELRELEASE is stored in a file named include/config/kernel.release -# to be used when executing for example make install or make modules_install # -# Take the contents of any files called localversion* and the config -# variable CONFIG_LOCALVERSION and append them to KERNELRELEASE. -# LOCALVERSION from the command line override all of this +# The KERNELRELEASE value built here is stored in the file +# include/config/kernel.release, and is used when executing several +# make targets, such as "make install" or "make modules_install." +# +# The eventual kernel release string consists of the following fields, +# shown in a hierarchical format to show how smaller parts are concatenated +# to form the larger and final value, with values coming from places like +# the Makefile, kernel config options, make command line options and/or +# SCM tag information. +# +# $(KERNELVERSION) +# $(VERSION) eg, 2 +# $(PATCHLEVEL) eg, 6 +# $(SUBLEVEL) eg, 18 +# $(EXTRAVERSION) eg, -rc6 +# $(localver-full) +# $(localver) +# localversion* (all localversion* files) +# $(CONFIG_LOCALVERSION) (from kernel config setting) +# $(localver-auto) (only if CONFIG_LOCALVERSION_AUTO is set) +# ./scripts/setlocalversion (SCM tag, if one exists) +# $(LOCALVERSION) (from make command line if provided) +# +# Note how the final $(localver-auto) string is included *only* if the +# kernel config option CONFIG_LOCALVERSION_AUTO is selected. Also, at the +# moment, only git is supported but other SCMs can edit the script +# scripts/setlocalversion and add the appropriate checks as needed. nullstring := space := $(nullstring) # end of line @@ -892,15 +921,26 @@ # Kernel headers INSTALL_HDR_PATH=$(objtree)/usr export INSTALL_HDR_PATH +HDRARCHES=$(filter-out generic,$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild))) + +PHONY += headers_install_all +headers_install_all: include/linux/version.h scripts_basic FORCE + $(Q)$(MAKE) $(build)=scripts scripts/unifdef + $(Q)for arch in $(HDRARCHES); do \ + $(MAKE) ARCH=$$arch -f $(srctree)/scripts/Makefile.headersinst obj=include BIASMDIR=-bi-$$arch ;\ + done + PHONY += headers_install -headers_install: include/linux/version.h - $(Q)unifdef -Ux /dev/null - $(Q)rm -rf $(INSTALL_HDR_PATH)/include - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include +headers_install: include/linux/version.h scripts_basic FORCE + @if [ ! -r include/asm-$(ARCH)/Kbuild ]; then \ + echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \ + exit 1 ; fi + $(Q)$(MAKE) $(build)=scripts scripts/unifdef + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include PHONY += headers_check headers_check: headers_install - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include HDRCHECK=1 + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include HDRCHECK=1 # --------------------------------------------------------------------------- # Modules @@ -916,7 +956,7 @@ # Build modules PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) @echo ' Building modules, stage 2.'; - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost # Target to prepare building external modules @@ -942,7 +982,7 @@ _modinst_: rm -f $(MODLIB)/build ; \ ln -s $(objtree) $(MODLIB)/build ; \ fi - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst # If System.map exists, run depmod. This deliberately does not have a # dependency on System.map since that would run the dependency tree on @@ -1057,8 +1097,10 @@ boards := $(notdir $(boards)) help: @echo 'Cleaning targets:' - @echo ' clean - remove most generated files but keep the config' + @echo ' clean - remove most generated files but keep the config and' + @echo ' enough build support to build external modules' @echo ' mrproper - remove all generated files + config + various backup files' + @echo ' distclean - mrproper + remove editor backup and patch files' @echo '' @echo 'Configuration targets:' @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help @@ -1076,13 +1118,17 @@ help: @echo ' cscope - Generate cscope index' @echo ' kernelrelease - Output the release version string' @echo ' kernelversion - Output the version stored in Makefile' - @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH' + @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ + echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ + fi @echo ' (default: $(INSTALL_HDR_PATH))' @echo '' @echo 'Static analysers' @echo ' checkstack - Generate a list of stack hogs' @echo ' namespacecheck - Name space analysis on compiled kernel' - @echo ' headers_check - Sanity check on exported headers' + @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ + echo ' headers_check - Sanity check on exported headers'; \ + fi @echo '' @echo 'Kernel packaging:' @$(MAKE) $(build)=$(package-dir) help @@ -1100,6 +1146,7 @@ help: echo '') @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' + @echo ' make V=2 [targets] 2 => give reason for rebuild of target' @echo ' make O=dir [targets] Locate all output files in "dir", including .config' @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' @echo ' make C=2 [targets] Force check of all c source with $$CHECK' @@ -1154,7 +1201,7 @@ PHONY += $(module-dirs) modules modules: $(module-dirs) @echo ' Building modules, stage 2.'; - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost PHONY += modules_install modules_install: _emodinst_ _emodinst_post @@ -1163,7 +1210,7 @@ install-dir := $(if $(INSTALL_MOD_DIR),$ PHONY += _emodinst_ _emodinst_: $(Q)mkdir -p $(MODLIB)/$(install-dir) - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst # Run depmod only is we have System.map and depmod is executable quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) @@ -1264,6 +1311,31 @@ define all-defconfigs $(call find-sources,'defconfig') endef +define xtags + if $1 --version 2>&1 | grep -iq exuberant; then \ + $(all-sources) | xargs $1 -a \ + -I __initdata,__exitdata,__acquires,__releases \ + -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ + --extra=+f --c-kinds=+px; \ + $(all-kconfigs) | xargs $1 -a \ + --langdef=kconfig \ + --language-force=kconfig \ + --regex-kconfig='/^[[:blank:]]*config[[:blank:]]+([[:alnum:]_]+)/\1/'; \ + $(all-defconfigs) | xargs $1 -a \ + --langdef=dotconfig \ + --language-force=dotconfig \ + --regex-dotconfig='/^#?[[:blank:]]*(CONFIG_[[:alnum:]_]+)/\1/'; \ + elif $1 --version 2>&1 | grep -iq emacs; then \ + $(all-sources) | xargs $1 -a; \ + $(all-kconfigs) | xargs $1 -a \ + --regex='/^[ \t]*config[ \t]+\([a-zA-Z0-9_]+\)/\1/'; \ + $(all-defconfigs) | xargs $1 -a \ + --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ + else \ + $(all-sources) | xargs $1 -a; \ + fi +endef + quiet_cmd_cscope-file = FILELST cscope.files cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files @@ -1277,31 +1349,16 @@ cscope: FORCE quiet_cmd_TAGS = MAKE $@ define cmd_TAGS rm -f $@; \ - ETAGSF=`etags --version | grep -i exuberant >/dev/null && \ - echo "-I __initdata,__exitdata,__acquires,__releases \ - -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ - --extra=+f --c-kinds=+px"`; \ - $(all-sources) | xargs etags $$ETAGSF -a; \ - if test "x$$ETAGSF" = x; then \ - $(all-kconfigs) | xargs etags -a \ - --regex='/^config[ \t]+\([a-zA-Z0-9_]+\)/\1/'; \ - $(all-defconfigs) | xargs etags -a \ - --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ - fi + $(call xtags,etags) endef TAGS: FORCE $(call cmd,TAGS) - quiet_cmd_tags = MAKE $@ define cmd_tags rm -f $@; \ - CTAGSF=`ctags --version | grep -i exuberant >/dev/null && \ - echo "-I __initdata,__exitdata,__acquires,__releases \ - -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ - --extra=+f --c-kinds=+px"`; \ - $(all-sources) | xargs ctags $$CTAGSF -a + $(call xtags,ctags) endef tags: FORCE @@ -1328,9 +1385,13 @@ endif #ifeq ($(config-targets),1) endif #ifeq ($(mixed-targets),1) PHONY += checkstack kernelrelease kernelversion + +# Use $(SUBARCH) here instead of $(ARCH) so that this works for UML. +# In the UML case, $(SUBARCH) is the name of the underlying +# architecture, while for all other arches, it is the same as $(ARCH). checkstack: $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ - $(PERL) $(src)/scripts/checkstack.pl $(ARCH) + $(PERL) $(src)/scripts/checkstack.pl $(SUBARCH) kernelrelease: $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \ @@ -1379,7 +1440,7 @@ # Modules %.ko: prepare scripts FORCE $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) $(@:.ko=.o) - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost # FIXME Should go into a make.lib or something # =========================================================================== diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 213c785..2b36afd 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -381,7 +381,7 @@ config ALPHA_EV56 config ALPHA_EV56 prompt "EV56 CPU (speed >= 333MHz)?" - depends on ALPHA_NORITAKE && ALPHA_PRIMO + depends on ALPHA_NORITAKE || ALPHA_PRIMO config ALPHA_EV56 prompt "EV56 CPU (speed >= 400MHz)?" diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index f042cc4..dbe327d 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c @@ -36,7 +36,6 @@ #include #include #include -#define __KERNEL_SYSCALLS__ #include extern struct hwrpb_struct *hwrpb; @@ -116,7 +115,7 @@ EXPORT_SYMBOL(sys_dup); EXPORT_SYMBOL(sys_exit); EXPORT_SYMBOL(sys_write); EXPORT_SYMBOL(sys_lseek); -EXPORT_SYMBOL(execve); +EXPORT_SYMBOL(kernel_execve); EXPORT_SYMBOL(sys_setsid); EXPORT_SYMBOL(sys_wait4); diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index 01ecd09..c95e95e 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -655,12 +655,12 @@ kernel_thread: .end kernel_thread /* - * execve(path, argv, envp) + * kernel_execve(path, argv, envp) */ .align 4 - .globl execve - .ent execve -execve: + .globl kernel_execve + .ent kernel_execve +kernel_execve: /* We can be called from a module. */ ldgp $gp, 0($27) lda $sp, -(32+SIZEOF_PT_REGS+8)($sp) @@ -704,7 +704,7 @@ execve: 1: lda $sp, 32+SIZEOF_PT_REGS+8($sp) ret -.end execve +.end kernel_execve /* diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 73c7622..8a31fc1 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -402,15 +402,15 @@ osf_utsname(char __user *name) down_read(&uts_sem); error = -EFAULT; - if (copy_to_user(name + 0, system_utsname.sysname, 32)) + if (copy_to_user(name + 0, utsname()->sysname, 32)) goto out; - if (copy_to_user(name + 32, system_utsname.nodename, 32)) + if (copy_to_user(name + 32, utsname()->nodename, 32)) goto out; - if (copy_to_user(name + 64, system_utsname.release, 32)) + if (copy_to_user(name + 64, utsname()->release, 32)) goto out; - if (copy_to_user(name + 96, system_utsname.version, 32)) + if (copy_to_user(name + 96, utsname()->version, 32)) goto out; - if (copy_to_user(name + 128, system_utsname.machine, 32)) + if (copy_to_user(name + 128, utsname()->machine, 32)) goto out; error = 0; @@ -449,8 +449,8 @@ osf_getdomainname(char __user *name, int down_read(&uts_sem); for (i = 0; i < len; ++i) { - __put_user(system_utsname.domainname[i], name + i); - if (system_utsname.domainname[i] == '\0') + __put_user(utsname()->domainname[i], name + i); + if (utsname()->domainname[i] == '\0') break; } up_read(&uts_sem); @@ -607,12 +607,12 @@ osf_sigstack(struct sigstack __user *uss asmlinkage long osf_sysinfo(int command, char __user *buf, long count) { - static char * sysinfo_table[] = { - system_utsname.sysname, - system_utsname.nodename, - system_utsname.release, - system_utsname.version, - system_utsname.machine, + char *sysinfo_table[] = { + utsname()->sysname, + utsname()->nodename, + utsname()->release, + utsname()->version, + utsname()->machine, "alpha", /* instruction set architecture */ "dummy", /* hardware serial number */ "dummy", /* hardware manufacturer */ diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h index 2a6e3da..21f7128 100644 --- a/arch/alpha/kernel/proto.h +++ b/arch/alpha/kernel/proto.h @@ -1,5 +1,7 @@ #include +#include +#include /* Prototypes of functions used across modules here in this directory. */ @@ -181,9 +183,16 @@ extern void titan_dispatch_irqs(u64, str extern void switch_to_system_map(void); extern void srm_paging_stop(void); -/* ../mm/remap.c */ -extern int __alpha_remap_area_pages(unsigned long, unsigned long, - unsigned long, unsigned long); +static inline int +__alpha_remap_area_pages(unsigned long address, unsigned long phys_addr, + unsigned long size, unsigned long flags) +{ + pgprot_t prot; + + prot = __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE + | _PAGE_KWE | flags); + return ioremap_page_range(address, address + size, phys_addr, prot); +} /* irq.c */ diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c index 9d7dff2..7569232 100644 --- a/arch/alpha/kernel/srmcons.c +++ b/arch/alpha/kernel/srmcons.c @@ -229,7 +229,7 @@ srmcons_close(struct tty_struct *tty, st static struct tty_driver *srmcons_driver; -static struct tty_operations srmcons_ops = { +static const struct tty_operations srmcons_ops = { .open = srmcons_open, .close = srmcons_close, .write = srmcons_write, diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index b191cc7..581ddcc 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c @@ -54,8 +54,6 @@ #include #include "proto.h" #include "irq_impl.h" -extern unsigned long wall_jiffies; /* kernel/timer.c */ - static int set_rtc_mmss(unsigned long); DEFINE_SPINLOCK(rtc_lock); @@ -132,7 +130,7 @@ #endif nticks = delta >> FIX_SHIFT; while (nticks > 0) { - do_timer(regs); + do_timer(1); #ifndef CONFIG_SMP update_process_times(user_mode(regs)); #endif @@ -413,7 +411,7 @@ void do_gettimeofday(struct timeval *tv) { unsigned long flags; - unsigned long sec, usec, lost, seq; + unsigned long sec, usec, seq; unsigned long delta_cycles, delta_usec, partial_tick; do { @@ -423,14 +421,13 @@ do_gettimeofday(struct timeval *tv) sec = xtime.tv_sec; usec = (xtime.tv_nsec / 1000); partial_tick = state.partial_tick; - lost = jiffies - wall_jiffies; } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); #ifdef CONFIG_SMP /* Until and unless we figure out how to get cpu cycle counters in sync and keep them there, we can't use the rpcc tricks. */ - delta_usec = lost * (1000000 / HZ); + delta_usec = 0; #else /* * usec = cycles * ticks_per_cycle * 2**48 * 1e6 / (2**48 * ticks) @@ -446,8 +443,7 @@ #else */ delta_usec = (delta_cycles * state.scaled_ticks_per_cycle - + partial_tick - + (lost << FIX_SHIFT)) * 15625; + + partial_tick) * 15625; delta_usec = ((delta_usec / ((1UL << (FIX_SHIFT-6-1)) * HZ)) + 1) / 2; #endif @@ -480,12 +476,11 @@ do_settimeofday(struct timespec *tv) time. Without this, a full-tick error is possible. */ #ifdef CONFIG_SMP - delta_nsec = (jiffies - wall_jiffies) * (NSEC_PER_SEC / HZ); + delta_nsec = 0; #else delta_nsec = rpcc() - state.last_time; delta_nsec = (delta_nsec * state.scaled_ticks_per_cycle - + state.partial_tick - + ((jiffies - wall_jiffies) << FIX_SHIFT)) * 15625; + + state.partial_tick) * 15625; delta_nsec = ((delta_nsec / ((1UL << (FIX_SHIFT-6-1)) * HZ)) + 1) / 2; delta_nsec *= 1000; #endif diff --git a/arch/alpha/mm/Makefile b/arch/alpha/mm/Makefile index 6edd9a0..09399c5 100644 --- a/arch/alpha/mm/Makefile +++ b/arch/alpha/mm/Makefile @@ -4,6 +4,6 @@ # EXTRA_CFLAGS := -Werror -obj-y := init.o fault.o extable.o remap.o +obj-y := init.o fault.o extable.o obj-$(CONFIG_DISCONTIGMEM) += numa.o diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c index 622dabd..8871529 100644 --- a/arch/alpha/mm/fault.c +++ b/arch/alpha/mm/fault.c @@ -193,7 +193,7 @@ #endif /* We ran out of memory, or some other thing happened to us that made us unable to handle the page fault gracefully. */ out_of_memory: - if (current->pid == 1) { + if (is_init(current)) { yield(); down_read(&mm->mmap_sem); goto survive; diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index 917dad1..550f490 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c @@ -270,7 +270,7 @@ #ifndef CONFIG_DISCONTIGMEM void paging_init(void) { - unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0}; + unsigned long zones_size[MAX_NR_ZONES] = {0, }; unsigned long dma_pfn, high_pfn; dma_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; diff --git a/arch/alpha/mm/remap.c b/arch/alpha/mm/remap.c deleted file mode 100644 index a78356c..0000000 --- a/arch/alpha/mm/remap.c +++ /dev/null @@ -1,86 +0,0 @@ -#include -#include -#include - -static inline void -remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, - unsigned long phys_addr, unsigned long flags) -{ - unsigned long end; - unsigned long pfn; - - address &= ~PMD_MASK; - end = address + size; - if (end > PMD_SIZE) - end = PMD_SIZE; - if (address >= end) - BUG(); - pfn = phys_addr >> PAGE_SHIFT; - do { - if (!pte_none(*pte)) { - printk("remap_area_pte: page already exists\n"); - BUG(); - } - set_pte(pte, pfn_pte(pfn, - __pgprot(_PAGE_VALID | _PAGE_ASM | - _PAGE_KRE | _PAGE_KWE | flags))); - address += PAGE_SIZE; - pfn++; - pte++; - } while (address && (address < end)); -} - -static inline int -remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, - unsigned long phys_addr, unsigned long flags) -{ - unsigned long end; - - address &= ~PGDIR_MASK; - end = address + size; - if (end > PGDIR_SIZE) - end = PGDIR_SIZE; - phys_addr -= address; - if (address >= end) - BUG(); - do { - pte_t * pte = pte_alloc_kernel(pmd, address); - if (!pte) - return -ENOMEM; - remap_area_pte(pte, address, end - address, - address + phys_addr, flags); - address = (address + PMD_SIZE) & PMD_MASK; - pmd++; - } while (address && (address < end)); - return 0; -} - -int -__alpha_remap_area_pages(unsigned long address, unsigned long phys_addr, - unsigned long size, unsigned long flags) -{ - pgd_t * dir; - int error = 0; - unsigned long end = address + size; - - phys_addr -= address; - dir = pgd_offset(&init_mm, address); - flush_cache_all(); - if (address >= end) - BUG(); - do { - pmd_t *pmd; - pmd = pmd_alloc(&init_mm, dir, address); - error = -ENOMEM; - if (!pmd) - break; - if (remap_area_pmd(pmd, address, end - address, - phys_addr + address, flags)) - break; - error = 0; - address = (address + PGDIR_SIZE) & PGDIR_MASK; - dir++; - } while (address && (address < end)); - return error; -} - diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f81a623..f9362ee 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -17,6 +17,10 @@ config ARM Europe. There is an ARM Linux project with a web page at . +config GENERIC_TIME + bool + default n + config MMU bool default y @@ -51,6 +55,10 @@ config GENERIC_HARDIRQS bool default y +config TRACE_IRQFLAGS_SUPPORT + bool + default y + config HARDIRQS_SW_RESEND bool default y @@ -91,7 +99,7 @@ config ARCH_MTD_XIP config VECTORS_BASE hex - default 0xffff0000 if MMU + default 0xffff0000 if MMU || CPU_HIGH_VECTOR default DRAM_BASE if REMAP_VECTORS_TO_RAM default 0x00000000 help @@ -198,16 +206,27 @@ config ARCH_IMX help Support for Motorola's i.MX family of processors (MX1, MXL). -config ARCH_IOP3XX - bool "IOP3xx-based" +config ARCH_IOP32X + bool "IOP32x-based" + depends on MMU + select PLAT_IOP + select PCI + help + Support for Intel's 80219 and IOP32X (XScale) family of + processors. + +config ARCH_IOP33X + bool "IOP33x-based" depends on MMU + select PLAT_IOP select PCI help - Support for Intel's IOP3XX (XScale) family of processors. + Support for Intel's IOP33X (XScale) family of processors. config ARCH_IXP4XX bool "IXP4xx-based" depends on MMU + select GENERIC_TIME help Support for Intel's IXP4XX (XScale) family of processors. @@ -308,7 +327,9 @@ source "arch/arm/mach-footbridge/Kconfig source "arch/arm/mach-integrator/Kconfig" -source "arch/arm/mach-iop3xx/Kconfig" +source "arch/arm/mach-iop32x/Kconfig" + +source "arch/arm/mach-iop33x/Kconfig" source "arch/arm/mach-ixp4xx/Kconfig" @@ -348,6 +369,9 @@ # Definitions to make life easier config ARCH_ACORN bool +config PLAT_IOP + bool + source arch/arm/mm/Kconfig # bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER @@ -602,6 +626,7 @@ config LEDS_CPU config ALIGNMENT_TRAP bool + depends on CPU_CP15_MMU default y if !ARCH_EBSA110 help ARM processors can not fetch/store information which is not @@ -633,11 +658,12 @@ config ZBOOT_ROM_BSS hex "Compressed ROM boot loader BSS address" default "0" help - The base address of 64KiB of read/write memory in the target - for the ROM-able zImage, which must be available while the - decompressor is running. Platforms which normally make use of - ROM-able zImage formats normally set this to a suitable - value in their defconfig file. + The base address of an area of read/write memory in the target + for the ROM-able zImage which must be available while the + decompressor is running. It must be large enough to hold the + entire decompressed kernel plus an additional 128 KiB. + Platforms which normally make use of ROM-able zImage formats + normally set this to a suitable value in their defconfig file. If ZBOOT_ROM is not enabled, this has no effect. @@ -832,7 +858,7 @@ source "drivers/base/Kconfig" source "drivers/connector/Kconfig" -if ALIGNMENT_TRAP +if ALIGNMENT_TRAP || !CPU_CP15_MMU source "drivers/mtd/Kconfig" endif @@ -844,7 +870,7 @@ source "drivers/block/Kconfig" source "drivers/acorn/block/Kconfig" -if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \ +if PCMCIA || ARCH_CLPS7500 || ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX \ || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \ || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE \ || ARCH_IXP23XX diff --git a/arch/arm/Kconfig-nommu b/arch/arm/Kconfig-nommu index e1574be..f087376 100644 --- a/arch/arm/Kconfig-nommu +++ b/arch/arm/Kconfig-nommu @@ -25,6 +25,14 @@ config FLASH_SIZE hex 'FLASH Size' if SET_MEM_PARAM default 0x00400000 +config PROCESSOR_ID + hex + default 0x00007700 + depends on !CPU_CP15 + help + If processor has no CP15 register, this processor ID is + used instead of the auto-probing which utilizes the register. + config REMAP_VECTORS_TO_RAM bool 'Install vectors to the begining of RAM' if DRAM_BASE depends on DRAM_BASE diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 92873cd..2a0b2c8 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -55,7 +55,12 @@ arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM # This selects how we optimise for the processor. tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610 tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710 +tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi +tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi +tune-$(CONFIG_CPU_ARM9TDMI) :=-mtune=arm9tdmi +tune-$(CONFIG_CPU_ARM940T) :=-mtune=arm9tdmi +tune-$(CONFIG_CPU_ARM946T) :=$(call cc-option,-mtune=arm9e,-mtune=arm9tdmi) tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi tune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmi tune-$(CONFIG_CPU_ARM925T) :=-mtune=arm9tdmi @@ -101,7 +106,8 @@ endif machine-$(CONFIG_ARCH_INTEGRATOR) := integrator textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000 machine-$(CONFIG_ARCH_CLPS711X) := clps711x - machine-$(CONFIG_ARCH_IOP3XX) := iop3xx + machine-$(CONFIG_ARCH_IOP32X) := iop32x + machine-$(CONFIG_ARCH_IOP33X) := iop33x machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx machine-$(CONFIG_ARCH_IXP2000) := ixp2000 machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx @@ -157,6 +163,7 @@ core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_ core-$(CONFIG_VFP) += arch/arm/vfp/ # If we have a common platform directory, then include it in the build. +core-$(CONFIG_PLAT_IOP) += arch/arm/plat-iop/ core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/ drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 2adc152..adddc71 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -51,7 +51,11 @@ OBJS += head-at91rm9200.o endif ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) +ifeq ($(CONFIG_CPU_CP15),y) OBJS += big-endian.o +else +# The endian should be set by h/w design. +endif endif # diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 14a9ff9..e5ab51b 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -20,11 +20,21 @@ #include #ifdef DEBUG #if defined(CONFIG_DEBUG_ICEDCC) + +#ifdef CONFIG_CPU_V6 + .macro loadsp, rb + .endm + .macro writeb, ch, rb + mcr p14, 0, \ch, c0, c5, 0 + .endm +#else .macro loadsp, rb .endm .macro writeb, ch, rb mcr p14, 0, \ch, c0, c1, 0 .endm +#endif + #else #include @@ -42,12 +52,6 @@ #else add \rb, \rb, #0x00010000 @ Ser1 #endif .endm -#elif defined(CONFIG_ARCH_IOP331) - .macro loadsp, rb - mov \rb, #0xff000000 - orr \rb, \rb, #0x00ff0000 - orr \rb, \rb, #0x0000f700 @ location of the UART - .endm #elif defined(CONFIG_ARCH_S3C2410) .macro loadsp, rb mov \rb, #0x50000000 @@ -78,9 +82,11 @@ #ifdef DEBUG kphex r6, 8 /* processor id */ kputc #':' kphex r7, 8 /* architecture id */ +#ifdef CONFIG_CPU_CP15 kputc #':' mrc p15, 0, r0, c1, c0 kphex r0, 8 /* control reg */ +#endif kputc #'\n' kphex r5, 8 /* decompressed kernel start */ kputc #'-' @@ -503,7 +509,11 @@ call_kernel: bl cache_clean_flush */ call_cache_fn: adr r12, proc_types +#ifdef CONFIG_CPU_CP15 mrc p15, 0, r6, c0, c0 @ get processor ID +#else + ldr r6, =CONFIG_PROCESSOR_ID +#endif 1: ldr r1, [r12, #0] @ get value ldr r2, [r12, #4] @ get mask eor r1, r1, r6 @ (real ^ match) diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index ace3fb5..283891c 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -30,6 +30,25 @@ #include #include #ifdef CONFIG_DEBUG_ICEDCC + +#ifdef CONFIG_CPU_V6 + +static void icedcc_putc(int ch) +{ + int status, i = 0x4000000; + + do { + if (--i < 0) + return; + + asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status)); + } while (status & (1 << 29)); + + asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); +} + +#else + static void icedcc_putc(int ch) { int status, i = 0x4000000; @@ -44,6 +63,8 @@ static void icedcc_putc(int ch) asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch)); } +#endif + #define putc(ch) icedcc_putc(ch) #define flush() do { } while (0) #endif diff --git a/arch/arm/common/icst307.c b/arch/arm/common/icst307.c index bafe8b1..6d094c1 100644 --- a/arch/arm/common/icst307.c +++ b/arch/arm/common/icst307.c @@ -57,7 +57,7 @@ icst307_khz_to_vco(const struct icst307_ break; } while (i < ARRAY_SIZE(idx2s)); - if (i > ARRAY_SIZE(idx2s)) + if (i >= ARRAY_SIZE(idx2s)) return vco; vco.s = idx2s[i]; @@ -119,7 +119,7 @@ icst307_ps_to_vco(const struct icst307_p break; } while (i < ARRAY_SIZE(idx2s)); - if (i > ARRAY_SIZE(idx2s)) + if (i >= ARRAY_SIZE(idx2s)) return vco; vco.s = idx2s[i]; diff --git a/arch/arm/common/icst525.c b/arch/arm/common/icst525.c index 943ef88..3d377c5 100644 --- a/arch/arm/common/icst525.c +++ b/arch/arm/common/icst525.c @@ -55,7 +55,7 @@ icst525_khz_to_vco(const struct icst525_ break; } while (i < ARRAY_SIZE(idx2s)); - if (i > ARRAY_SIZE(idx2s)) + if (i >= ARRAY_SIZE(idx2s)) return vco; vco.s = idx2s[i]; @@ -118,7 +118,7 @@ icst525_ps_to_vco(const struct icst525_p break; } while (i < ARRAY_SIZE(idx2s)); - if (i > ARRAY_SIZE(idx2s)) + if (i >= ARRAY_SIZE(idx2s)) return vco; vco.s = idx2s[i]; diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 4e0dcae..181ef1e 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c @@ -121,6 +121,13 @@ static struct locomo_dev_info locomo_dev .offset = 0, .length = 0, }, + { + .devid = LOCOMO_DEVID_SPI, + .irq = {}, + .name = "locomo-spi", + .offset = LOCOMO_SPI, + .length = 0x30, + }, }; @@ -374,7 +381,7 @@ static void locomo_spi_handler(unsigned struct irqdesc *d; void __iomem *mapbase = get_irq_chipdata(irq); - req = locomo_readl(mapbase + LOCOMO_SPIIR) & 0x000F; + req = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIR) & 0x000F; if (req) { irq = LOCOMO_IRQ_SPI_START; d = irq_desc + irq; @@ -391,35 +398,35 @@ static void locomo_spi_ack_irq(unsigned { void __iomem *mapbase = get_irq_chipdata(irq); unsigned int r; - r = locomo_readl(mapbase + LOCOMO_SPIWE); + r = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIWE); r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); - locomo_writel(r, mapbase + LOCOMO_SPIWE); + locomo_writel(r, mapbase + LOCOMO_SPI + LOCOMO_SPIWE); - r = locomo_readl(mapbase + LOCOMO_SPIIS); + r = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIS); r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START)); - locomo_writel(r, mapbase + LOCOMO_SPIIS); + locomo_writel(r, mapbase + LOCOMO_SPI + LOCOMO_SPIIS); - r = locomo_readl(mapbase + LOCOMO_SPIWE); + r = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIWE); r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START)); - locomo_writel(r, mapbase + LOCOMO_SPIWE); + locomo_writel(r, mapbase + LOCOMO_SPI + LOCOMO_SPIWE); } static void locomo_spi_mask_irq(unsigned int irq) { void __iomem *mapbase = get_irq_chipdata(irq); unsigned int r; - r = locomo_readl(mapbase + LOCOMO_SPIIE); + r = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIE); r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START)); - locomo_writel(r, mapbase + LOCOMO_SPIIE); + locomo_writel(r, mapbase + LOCOMO_SPI + LOCOMO_SPIIE); } static void locomo_spi_unmask_irq(unsigned int irq) { void __iomem *mapbase = get_irq_chipdata(irq); unsigned int r; - r = locomo_readl(mapbase + LOCOMO_SPIIE); + r = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIE); r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); - locomo_writel(r, mapbase + LOCOMO_SPIIE); + locomo_writel(r, mapbase + LOCOMO_SPI + LOCOMO_SPIIE); } static struct irq_chip locomo_spi_chip = { @@ -814,12 +821,15 @@ static inline struct locomo *locomo_chip return (struct locomo *)dev_get_drvdata(ldev->dev.parent); } -void locomo_gpio_set_dir(struct locomo_dev *ldev, unsigned int bits, unsigned int dir) +void locomo_gpio_set_dir(struct device *dev, unsigned int bits, unsigned int dir) { - struct locomo *lchip = locomo_chip_driver(ldev); + struct locomo *lchip = dev_get_drvdata(dev); unsigned long flags; unsigned int r; + if (!lchip) + return; + spin_lock_irqsave(&lchip->lock, flags); r = locomo_readl(lchip->base + LOCOMO_GPD); @@ -836,12 +846,15 @@ void locomo_gpio_set_dir(struct locomo_d spin_unlock_irqrestore(&lchip->lock, flags); } -unsigned int locomo_gpio_read_level(struct locomo_dev *ldev, unsigned int bits) +int locomo_gpio_read_level(struct device *dev, unsigned int bits) { - struct locomo *lchip = locomo_chip_driver(ldev); + struct locomo *lchip = dev_get_drvdata(dev); unsigned long flags; unsigned int ret; + if (!lchip) + return -ENODEV; + spin_lock_irqsave(&lchip->lock, flags); ret = locomo_readl(lchip->base + LOCOMO_GPL); spin_unlock_irqrestore(&lchip->lock, flags); @@ -850,12 +863,15 @@ unsigned int locomo_gpio_read_level(stru return ret; } -unsigned int locomo_gpio_read_output(struct locomo_dev *ldev, unsigned int bits) +int locomo_gpio_read_output(struct device *dev, unsigned int bits) { - struct locomo *lchip = locomo_chip_driver(ldev); + struct locomo *lchip = dev_get_drvdata(dev); unsigned long flags; unsigned int ret; + if (!lchip) + return -ENODEV; + spin_lock_irqsave(&lchip->lock, flags); ret = locomo_readl(lchip->base + LOCOMO_GPO); spin_unlock_irqrestore(&lchip->lock, flags); @@ -864,12 +880,15 @@ unsigned int locomo_gpio_read_output(str return ret; } -void locomo_gpio_write(struct locomo_dev *ldev, unsigned int bits, unsigned int set) +void locomo_gpio_write(struct device *dev, unsigned int bits, unsigned int set) { - struct locomo *lchip = locomo_chip_driver(ldev); + struct locomo *lchip = dev_get_drvdata(dev); unsigned long flags; unsigned int r; + if (!lchip) + return; + spin_lock_irqsave(&lchip->lock, flags); r = locomo_readl(lchip->base + LOCOMO_GPO); @@ -1058,9 +1077,9 @@ void locomo_frontlight_set(struct locomo struct locomo *lchip = locomo_chip_driver(dev); if (vr) - locomo_gpio_write(dev, LOCOMO_GPIO_FL_VR, 1); + locomo_gpio_write(dev->dev.parent, LOCOMO_GPIO_FL_VR, 1); else - locomo_gpio_write(dev, LOCOMO_GPIO_FL_VR, 0); + locomo_gpio_write(dev->dev.parent, LOCOMO_GPIO_FL_VR, 0); spin_lock_irqsave(&lchip->lock, flags); locomo_writel(bpwf, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c index 59b5dde..f412ded 100644 --- a/arch/arm/common/sharpsl_pm.c +++ b/arch/arm/common/sharpsl_pm.c @@ -40,6 +40,7 @@ #define SHARPSL_CHARGE_ON_TIME_INTERVAL #define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */ #define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */ #define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ + #define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */ #define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */ #define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */ @@ -575,6 +576,9 @@ static int corgi_pxa_pm_enter(suspend_st while (corgi_enter_suspend(alarm_time,alarm_status,state)) {} + if (sharpsl_pm.machinfo->earlyresume) + sharpsl_pm.machinfo->earlyresume(); + dev_dbg(sharpsl_pm.dev, "SharpSL resuming...\n"); return 0; diff --git a/arch/arm/configs/ep80219_defconfig b/arch/arm/configs/ep80219_defconfig deleted file mode 100644 index 3c73b70..0000000 --- a/arch/arm/configs/ep80219_defconfig +++ /dev/null @@ -1,952 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.12-rc1-bk2 -# Sun Mar 27 22:34:12 2005 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_HOTPLUG is not set -CONFIG_KOBJECT_UEVENT=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -CONFIG_ARCH_IOP3XX=y -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set - -# -# IOP3xx Implementation Options -# - -# -# IOP3xx Platform Types -# -# CONFIG_ARCH_IQ80321 is not set -CONFIG_ARCH_IQ31244=y -# CONFIG_ARCH_IQ80331 is not set -# CONFIG_MACH_IQ80332 is not set -CONFIG_ARCH_EP80219=y -CONFIG_ARCH_IOP321=y -# CONFIG_ARCH_IOP331 is not set - -# -# IOP3xx Chipset Features -# - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_MINICACHE=y - -# -# Processor Features -# -# CONFIG_ARM_THUMB is not set -CONFIG_XSCALE_PMU=y - -# -# Bus support -# -CONFIG_PCI=y -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=y -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_XIP is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0xf0000000 -CONFIG_MTD_PHYSMAP_LEN=0x00800000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_EDB7312 is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_BLK_DEV_INITRD is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CDROM_PKTCDVD is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -# CONFIG_SCSI_QLA2300 is not set -# CONFIG_SCSI_QLA2322 is not set -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -# CONFIG_MD_LINEAR is not set -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -# CONFIG_MD_RAID10 is not set -CONFIG_MD_RAID5=y -# CONFIG_MD_RAID6 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_MD_FAULTY is not set -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_CRYPT is not set -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -# CONFIG_NETLINK_DEV is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -# CONFIG_IP_PNP_DHCP is not set -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_IP_TCPDIAG=y -# CONFIG_IP_TCPDIAG_IPV6 is not set -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_SMC91X is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=y -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -CONFIG_E1000=y -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -CONFIG_I2C_IOP3XX=y -# CONFIG_I2C_ISA is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set - -# -# Other I2C Chip support -# -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set - -# -# XFS support -# -CONFIG_XFS_FS=y -CONFIG_XFS_EXPORT=y -# CONFIG_XFS_RT is not set -# CONFIG_XFS_QUOTA is not set -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -# CONFIG_JFFS2_FS_NOR_ECC is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V4 is not set -# CONFIG_NFSD_TCP is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y diff --git a/arch/arm/configs/ep93xx_defconfig b/arch/arm/configs/ep93xx_defconfig index 2948b45..3b4802a 100644 --- a/arch/arm/configs/ep93xx_defconfig +++ b/arch/arm/configs/ep93xx_defconfig @@ -126,6 +126,7 @@ # # EP93xx Platforms # CONFIG_MACH_EDB9302=y +CONFIG_MACH_EDB9312=y CONFIG_MACH_EDB9315=y CONFIG_MACH_EDB9315A=y CONFIG_MACH_GESBC9312=y diff --git a/arch/arm/configs/iop32x_defconfig b/arch/arm/configs/iop32x_defconfig new file mode 100644 index 0000000..0d67f66 --- /dev/null +++ b/arch/arm/configs/iop32x_defconfig @@ -0,0 +1,1236 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.18-rc7 +# Tue Sep 19 00:30:18 2006 +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_TASKSTATS is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_RT_MUTEXES=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +# CONFIG_BLK_DEV_IO_TRACE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IMX is not set +CONFIG_ARCH_IOP32X=y +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set + +# +# IOP32x Implementation Options +# + +# +# IOP32x Platform Types +# +CONFIG_MACH_GLANTANK=y +CONFIG_ARCH_IQ80321=y +CONFIG_ARCH_IQ31244=y +CONFIG_MACH_N2100=y +CONFIG_PLAT_IOP=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y + +# +# Processor Features +# +# CONFIG_ARM_THUMB is not set +CONFIG_XSCALE_PMU=y + +# +# Bus support +# +CONFIG_PCI=y +# CONFIG_PCI_DEBUG is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +# CONFIG_NO_IDLE_HZ is not set +CONFIG_HZ=100 +# CONFIG_AEABI is not set +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set + +# +# Power management options +# +# CONFIG_PM is not set +# CONFIG_APM is not set + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_BIC=y +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_IEEE80211 is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +# CONFIG_CONNECTOR is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 +CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y +CONFIG_MTD_REDBOOT_PARTS_READONLY=y +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=0x0 +CONFIG_MTD_PHYSMAP_LEN=0x0 +CONFIG_MTD_PHYSMAP_BANKWIDTH=1 +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_HPTIOP is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_LPFC is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=y +# CONFIG_MD_LINEAR is not set +CONFIG_MD_RAID0=y +CONFIG_MD_RAID1=y +# CONFIG_MD_RAID10 is not set +# CONFIG_MD_RAID456 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_MD_FAULTY is not set +CONFIG_BLK_DEV_DM=y +# CONFIG_DM_CRYPT is not set +# CONFIG_DM_SNAPSHOT is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# PHY device support +# +# CONFIG_PHYLIB is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_SMC91X is not set +# CONFIG_DM9000 is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +CONFIG_E100=y +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +CONFIG_E1000=y +CONFIG_E1000_NAPI=y +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +CONFIG_R8169=y +# CONFIG_R8169_NAPI is not set +# CONFIG_SIS190 is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_CHELSIO_T1 is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set +# CONFIG_MYRI10GE is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_PCI=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_HW_RANDOM=y +# CONFIG_NVRAM is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +# CONFIG_I2C_I801 is not set +# CONFIG_I2C_I810 is not set +# CONFIG_I2C_PIIX4 is not set +CONFIG_I2C_IOP3XX=y +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PROSAVAGE is not set +# CONFIG_I2C_SAVAGE4 is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set +# CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# + +# +# Hardware Monitoring support +# +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_ABITUGURU is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_VT8231 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Misc devices +# + +# +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FIRMWARE_EDID=y +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_SPLIT_ISO=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_UHCI_HCD=y +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +CONFIG_USB_MON=y + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# Real Time Clock +# +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_XFS_FS=y +# CONFIG_XFS_QUOTA is not set +CONFIG_XFS_SECURITY=y +CONFIG_XFS_POSIX_ACL=y +# CONFIG_XFS_RT is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +# CONFIG_NFSD_V4 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +# CONFIG_NLS is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_KERNEL=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_VM is not set +CONFIG_FRAME_POINTER=y +# CONFIG_UNWIND_INFO is not set +# CONFIG_FORCED_INLINING is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_ERRORS is not set +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_PLIST=y diff --git a/arch/arm/configs/iop33x_defconfig b/arch/arm/configs/iop33x_defconfig new file mode 100644 index 0000000..2a8fc15 --- /dev/null +++ b/arch/arm/configs/iop33x_defconfig @@ -0,0 +1,1081 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.18-rc7 +# Tue Sep 19 00:30:42 2006 +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_TASKSTATS is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_RT_MUTEXES=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +# CONFIG_BLK_DEV_IO_TRACE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_IOP32X is not set +CONFIG_ARCH_IOP33X=y +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set + +# +# IOP33x Implementation Options +# + +# +# IOP33x Platform Types +# +CONFIG_ARCH_IQ80331=y +CONFIG_MACH_IQ80332=y +CONFIG_PLAT_IOP=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y + +# +# Processor Features +# +# CONFIG_ARM_THUMB is not set +CONFIG_XSCALE_PMU=y + +# +# Bus support +# +CONFIG_PCI=y +# CONFIG_PCI_DEBUG is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +# CONFIG_NO_IDLE_HZ is not set +CONFIG_HZ=100 +# CONFIG_AEABI is not set +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp" +# CONFIG_XIP_KERNEL is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_ARTHUR is not set + +# +# Power management options +# +# CONFIG_PM is not set +# CONFIG_APM is not set + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_BIC=y +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_IEEE80211 is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +# CONFIG_CONNECTOR is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +CONFIG_MTD_REDBOOT_PARTS=y +CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 +CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y +CONFIG_MTD_REDBOOT_PARTS_READONLY=y +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_GEOMETRY is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_OTP is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=0x0 +CONFIG_MTD_PHYSMAP_LEN=0x0 +CONFIG_MTD_PHYSMAP_BANKWIDTH=1 +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_HPTIOP is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_LPFC is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=y +CONFIG_MD_LINEAR=y +CONFIG_MD_RAID0=y +CONFIG_MD_RAID1=y +# CONFIG_MD_RAID10 is not set +# CONFIG_MD_RAID456 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_MD_FAULTY is not set +CONFIG_BLK_DEV_DM=y +# CONFIG_DM_CRYPT is not set +# CONFIG_DM_SNAPSHOT is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# PHY device support +# + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +CONFIG_E1000=y +CONFIG_E1000_NAPI=y +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SIS190 is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_CHELSIO_T1 is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set +# CONFIG_MYRI10GE is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_PCI=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_HW_RANDOM=y +# CONFIG_NVRAM is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +# CONFIG_I2C_I801 is not set +# CONFIG_I2C_I810 is not set +# CONFIG_I2C_PIIX4 is not set +CONFIG_I2C_IOP3XX=y +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PROSAVAGE is not set +# CONFIG_I2C_SAVAGE4 is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set +# CONFIG_I2C_VOODOO3 is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# + +# +# Hardware Monitoring support +# +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_ABITUGURU is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SIS5595 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_VT8231 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Misc devices +# + +# +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FIRMWARE_EDID=y +# CONFIG_FB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +# CONFIG_USB is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# Real Time Clock +# +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_XFS_FS=y +# CONFIG_XFS_QUOTA is not set +CONFIG_XFS_SECURITY=y +CONFIG_XFS_POSIX_ACL=y +# CONFIG_XFS_RT is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +# CONFIG_NFSD_V4 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +# CONFIG_NLS is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_KERNEL=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_VM is not set +CONFIG_FRAME_POINTER=y +# CONFIG_UNWIND_INFO is not set +# CONFIG_FORCED_INLINING is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_ERRORS is not set +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +# CONFIG_CRC32 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_PLIST=y diff --git a/arch/arm/configs/iq31244_defconfig b/arch/arm/configs/iq31244_defconfig deleted file mode 100644 index 3246716..0000000 --- a/arch/arm/configs/iq31244_defconfig +++ /dev/null @@ -1,922 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.12-rc1-bk2 -# Sun Mar 27 02:10:38 2005 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_HOTPLUG is not set -CONFIG_KOBJECT_UEVENT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -CONFIG_ARCH_IOP3XX=y -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set - -# -# IOP3xx Implementation Options -# - -# -# IOP3xx Platform Types -# -# CONFIG_ARCH_IQ80321 is not set -CONFIG_ARCH_IQ31244=y -# CONFIG_ARCH_IQ80331 is not set -# CONFIG_MACH_IQ80332 is not set -# CONFIG_ARCH_EP80219 is not set -CONFIG_ARCH_IOP321=y -# CONFIG_ARCH_IOP331 is not set - -# -# IOP3xx Chipset Features -# - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_MINICACHE=y - -# -# Processor Features -# -# CONFIG_ARM_THUMB is not set -CONFIG_XSCALE_PMU=y - -# -# Bus support -# -CONFIG_PCI=y -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=y -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_XIP is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0xf0000000 -CONFIG_MTD_PHYSMAP_LEN=0x00800000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_EDB7312 is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_BLK_DEV_INITRD is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CDROM_PKTCDVD is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -# CONFIG_SCSI_QLA2300 is not set -# CONFIG_SCSI_QLA2322 is not set -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -# CONFIG_MD_LINEAR is not set -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -# CONFIG_MD_RAID10 is not set -CONFIG_MD_RAID5=y -# CONFIG_MD_RAID6 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_MD_FAULTY is not set -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_CRYPT is not set -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -# CONFIG_NETLINK_DEV is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -# CONFIG_IP_PNP_DHCP is not set -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_IP_TCPDIAG=y -# CONFIG_IP_TCPDIAG_IPV6 is not set -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -CONFIG_E1000=y -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -CONFIG_I2C_IOP3XX=y -# CONFIG_I2C_ISA is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set - -# -# Other I2C Chip support -# -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set - -# -# XFS support -# -CONFIG_XFS_FS=y -CONFIG_XFS_EXPORT=y -# CONFIG_XFS_RT is not set -# CONFIG_XFS_QUOTA is not set -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -# CONFIG_JFFS2_FS_NOR_ECC is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V4 is not set -# CONFIG_NFSD_TCP is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y diff --git a/arch/arm/configs/iq80321_defconfig b/arch/arm/configs/iq80321_defconfig deleted file mode 100644 index b000da7..0000000 --- a/arch/arm/configs/iq80321_defconfig +++ /dev/null @@ -1,843 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.12-rc1-bk2 -# Sun Mar 27 13:24:10 2005 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_HOTPLUG is not set -CONFIG_KOBJECT_UEVENT=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -CONFIG_ARCH_IOP3XX=y -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set - -# -# IOP3xx Implementation Options -# - -# -# IOP3xx Platform Types -# -CONFIG_ARCH_IQ80321=y -# CONFIG_ARCH_IQ31244 is not set -# CONFIG_ARCH_IQ80331 is not set -# CONFIG_MACH_IQ80332 is not set -# CONFIG_ARCH_EP80219 is not set -CONFIG_ARCH_IOP321=y -# CONFIG_ARCH_IOP331 is not set - -# -# IOP3xx Chipset Features -# - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_MINICACHE=y - -# -# Processor Features -# -# CONFIG_ARM_THUMB is not set -CONFIG_XSCALE_PMU=y - -# -# Bus support -# -CONFIG_PCI=y -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=y -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_XIP is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0xf0000000 -CONFIG_MTD_PHYSMAP_LEN=0x00800000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=1 -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_EDB7312 is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_BLK_DEV_INITRD is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CDROM_PKTCDVD is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -# CONFIG_NETLINK_DEV is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -# CONFIG_IP_PNP_DHCP is not set -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_IP_TCPDIAG=y -# CONFIG_IP_TCPDIAG_IPV6 is not set -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -CONFIG_E1000=y -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -CONFIG_I2C_IOP3XX=y -# CONFIG_I2C_ISA is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set - -# -# Other I2C Chip support -# -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set - -# -# XFS support -# -CONFIG_XFS_FS=y -CONFIG_XFS_EXPORT=y -# CONFIG_XFS_RT is not set -# CONFIG_XFS_QUOTA is not set -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -# CONFIG_JFFS2_FS_NOR_ECC is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V4 is not set -# CONFIG_NFSD_TCP is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y diff --git a/arch/arm/configs/iq80331_defconfig b/arch/arm/configs/iq80331_defconfig deleted file mode 100644 index 46c79e1..0000000 --- a/arch/arm/configs/iq80331_defconfig +++ /dev/null @@ -1,916 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.12-rc1-bk2 -# Sun Mar 27 15:13:37 2005 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_HOTPLUG is not set -CONFIG_KOBJECT_UEVENT=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -CONFIG_ARCH_IOP3XX=y -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set - -# -# IOP3xx Implementation Options -# - -# -# IOP3xx Platform Types -# -# CONFIG_ARCH_IQ80321 is not set -# CONFIG_ARCH_IQ31244 is not set -CONFIG_ARCH_IQ80331=y -# CONFIG_MACH_IQ80332 is not set -# CONFIG_ARCH_EP80219 is not set -CONFIG_ARCH_IOP331=y - -# -# IOP3xx Chipset Features -# -CONFIG_IOP331_STEPD=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_MINICACHE=y - -# -# Processor Features -# -# CONFIG_ARM_THUMB is not set -CONFIG_XSCALE_PMU=y - -# -# Bus support -# -CONFIG_PCI=y -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=y -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_XIP is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0xc0000000 -CONFIG_MTD_PHYSMAP_LEN=0x00800000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=1 -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_EDB7312 is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_BLK_DEV_INITRD is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CDROM_PKTCDVD is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -# CONFIG_SCSI_QLA2300 is not set -# CONFIG_SCSI_QLA2322 is not set -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=y -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -# CONFIG_MD_RAID10 is not set -CONFIG_MD_RAID5=y -# CONFIG_MD_RAID6 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_MD_FAULTY is not set -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_CRYPT is not set -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -# CONFIG_NETLINK_DEV is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -# CONFIG_IP_PNP_DHCP is not set -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_IP_TCPDIAG=y -# CONFIG_IP_TCPDIAG_IPV6 is not set -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -CONFIG_E1000=y -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -CONFIG_I2C_IOP3XX=y -# CONFIG_I2C_ISA is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set - -# -# Other I2C Chip support -# -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set - -# -# XFS support -# -CONFIG_XFS_FS=y -CONFIG_XFS_EXPORT=y -# CONFIG_XFS_RT is not set -# CONFIG_XFS_QUOTA is not set -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V4 is not set -# CONFIG_NFSD_TCP is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC32 is not set -# CONFIG_LIBCRC32C is not set diff --git a/arch/arm/configs/iq80332_defconfig b/arch/arm/configs/iq80332_defconfig deleted file mode 100644 index 11959b7..0000000 --- a/arch/arm/configs/iq80332_defconfig +++ /dev/null @@ -1,916 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.12-rc1-bk2 -# Sun Mar 27 17:33:39 2005 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_HOTPLUG is not set -CONFIG_KOBJECT_UEVENT=y -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -CONFIG_ARCH_IOP3XX=y -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set - -# -# IOP3xx Implementation Options -# - -# -# IOP3xx Platform Types -# -# CONFIG_ARCH_IQ80321 is not set -# CONFIG_ARCH_IQ31244 is not set -# CONFIG_ARCH_IQ80331 is not set -CONFIG_MACH_IQ80332=y -# CONFIG_ARCH_EP80219 is not set -CONFIG_ARCH_IOP331=y - -# -# IOP3xx Chipset Features -# -# CONFIG_IOP331_STEPD is not set - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_MINICACHE=y - -# -# Processor Features -# -# CONFIG_ARM_THUMB is not set -CONFIG_XSCALE_PMU=y - -# -# Bus support -# -CONFIG_PCI=y -# CONFIG_PCI_LEGACY_PROC is not set -CONFIG_PCI_NAMES=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=y -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_XIP is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0xc0000000 -CONFIG_MTD_PHYSMAP_LEN=0x00800000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=1 -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_EDB7312 is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_BLK_DEV_INITRD is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CDROM_PKTCDVD is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -# CONFIG_SCSI_QLA2300 is not set -# CONFIG_SCSI_QLA2322 is not set -# CONFIG_SCSI_QLA6312 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=y -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -# CONFIG_MD_RAID10 is not set -CONFIG_MD_RAID5=y -# CONFIG_MD_RAID6 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_MD_FAULTY is not set -CONFIG_BLK_DEV_DM=y -# CONFIG_DM_CRYPT is not set -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set -# CONFIG_DM_MULTIPATH is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -# CONFIG_NETLINK_DEV is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -# CONFIG_IP_PNP_DHCP is not set -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_IP_TCPDIAG=y -# CONFIG_IP_TCPDIAG_IPV6 is not set -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -CONFIG_E1000=y -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -CONFIG_I2C_IOP3XX=y -# CONFIG_I2C_ISA is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Hardware Sensors Chip support -# -# CONFIG_I2C_SENSOR is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set - -# -# Other I2C Chip support -# -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set - -# -# XFS support -# -CONFIG_XFS_FS=y -CONFIG_XFS_EXPORT=y -# CONFIG_XFS_RT is not set -# CONFIG_XFS_QUOTA is not set -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V4 is not set -# CONFIG_NFSD_TCP is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC32 is not set -# CONFIG_LIBCRC32C is not set diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig index f20814e..a832226 100644 --- a/arch/arm/configs/s3c2410_defconfig +++ b/arch/arm/configs/s3c2410_defconfig @@ -1,14 +1,19 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.17-git9 -# Sun Jun 25 23:56:32 2006 +# Linux kernel version: 2.6.18 +# Wed Sep 20 20:27:31 2006 # CONFIG_ARM=y CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -26,14 +31,15 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y +# CONFIG_TASKSTATS is not set # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set # CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set @@ -46,6 +52,8 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -84,7 +92,7 @@ # CONFIG_ARCH_AAEC2000 is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_REALVIEW is not set # CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91RM9200 is not set +# CONFIG_ARCH_AT91 is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -94,7 +102,8 @@ # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_NETX is not set # CONFIG_ARCH_H720X is not set # CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set # CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_IXP23XX is not set @@ -122,13 +131,18 @@ CONFIG_ARCH_SMDK2410=y CONFIG_ARCH_S3C2440=y CONFIG_SMDK2440_CPU2440=y CONFIG_SMDK2440_CPU2442=y +CONFIG_MACH_S3C2413=y CONFIG_MACH_SMDK2413=y CONFIG_MACH_VR1000=y CONFIG_MACH_RX3715=y CONFIG_MACH_OTOM=y CONFIG_MACH_NEXCODER_2440=y +CONFIG_MACH_VSTMS=y CONFIG_S3C2410_CLOCK=y +CONFIG_S3C2410_PM=y +CONFIG_CPU_S3C2410_DMA=y CONFIG_CPU_S3C2410=y +CONFIG_S3C2412_PM=y CONFIG_CPU_S3C2412=y CONFIG_CPU_S3C244X=y CONFIG_CPU_S3C2440=y @@ -156,7 +170,7 @@ # CONFIG_CPU_32=y CONFIG_CPU_ARM920T=y CONFIG_CPU_ARM926T=y -CONFIG_CPU_32v4=y +CONFIG_CPU_32v4T=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV4T=y CONFIG_CPU_ABRT_EV5TJ=y @@ -200,6 +214,7 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set CONFIG_ALIGNMENT_TRAP=y # @@ -304,7 +319,6 @@ # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set @@ -460,6 +474,7 @@ # CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set CONFIG_ATA_OVER_ETH=m @@ -640,6 +655,7 @@ # CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set @@ -716,6 +732,7 @@ # # USB-based Watchdog Cards # # CONFIG_USBPCWATCHDOG is not set +CONFIG_HW_RANDOM=y # CONFIG_NVRAM is not set CONFIG_S3C2410_RTC=y # CONFIG_DTLK is not set @@ -857,12 +874,12 @@ # CONFIG_USB_DABUSB is not set # # Graphics support # +CONFIG_FIRMWARE_EDID=y CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -CONFIG_FB_FIRMWARE_EDID=y # CONFIG_FB_BACKLIGHT is not set CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_TILEBLITTING is not set @@ -995,7 +1012,7 @@ # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set @@ -1095,6 +1112,7 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y # CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -1202,14 +1220,19 @@ # Kernel hacking # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set # CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_RWSEMS is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y @@ -1251,3 +1274,4 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y +CONFIG_PLIST=y diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c index 33c5568..ecf4f94 100644 --- a/arch/arm/kernel/apm.c +++ b/arch/arm/kernel/apm.c @@ -25,6 +25,7 @@ #include #include #include #include +#include #include /* apm_power_info */ #include @@ -80,7 +81,7 @@ #define SUSPEND_DONE 4 /* suspend compl */ static int suspends_pending; static int apm_disabled; -static int arm_apm_active; +static struct task_struct *kapmd_tsk; static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); @@ -97,7 +98,6 @@ static LIST_HEAD(apm_user_list); * to be suspending the system. */ static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait); -static DECLARE_COMPLETION(kapmd_exit); static DEFINE_SPINLOCK(kapmd_queue_lock); static struct apm_queue kapmd_queue; @@ -468,16 +468,13 @@ #endif static int kapmd(void *arg) { - daemonize("kapmd"); - current->flags |= PF_NOFREEZE; - do { apm_event_t event; wait_event_interruptible(kapmd_wait, - !queue_empty(&kapmd_queue) || !arm_apm_active); + !queue_empty(&kapmd_queue) || kthread_should_stop()); - if (!arm_apm_active) + if (kthread_should_stop()) break; spin_lock_irq(&kapmd_queue_lock); @@ -508,7 +505,7 @@ static int kapmd(void *arg) } } while (1); - complete_and_exit(&kapmd_exit, 0); + return 0; } static int __init apm_init(void) @@ -520,13 +517,14 @@ static int __init apm_init(void) return -ENODEV; } - arm_apm_active = 1; - - ret = kernel_thread(kapmd, NULL, CLONE_KERNEL); - if (ret < 0) { - arm_apm_active = 0; + kapmd_tsk = kthread_create(kapmd, NULL, "kapmd"); + if (IS_ERR(kapmd_tsk)) { + ret = PTR_ERR(kapmd_tsk); + kapmd_tsk = NULL; return ret; } + kapmd_tsk->flags |= PF_NOFREEZE; + wake_up_process(kapmd_tsk); #ifdef CONFIG_PROC_FS create_proc_info_entry("apm", 0, NULL, apm_get_info); @@ -535,10 +533,7 @@ #endif ret = misc_register(&apm_device); if (ret != 0) { remove_proc_entry("apm", NULL); - - arm_apm_active = 0; - wake_up(&kapmd_wait); - wait_for_completion(&kapmd_exit); + kthread_stop(kapmd_tsk); } return ret; @@ -549,9 +544,7 @@ static void __exit apm_exit(void) misc_deregister(&apm_device); remove_proc_entry("apm", NULL); - arm_apm_active = 0; - wake_up(&kapmd_wait); - wait_for_completion(&kapmd_exit); + kthread_stop(kapmd_tsk); } module_init(apm_init); diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index a5747e5..5617566 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S @@ -21,6 +21,36 @@ #include #if defined(CONFIG_DEBUG_ICEDCC) @@ debug using ARM EmbeddedICE DCC channel + +#if defined(CONFIG_CPU_V6) + + .macro addruart, rx + .endm + + .macro senduart, rd, rx + mcr p14, 0, \rd, c0, c5, 0 + .endm + + .macro busyuart, rd, rx +1001: + mrc p14, 0, \rx, c0, c1, 0 + tst \rx, #0x20000000 + beq 1001b + .endm + + .macro waituart, rd, rx + mov \rd, #0x2000000 +1001: + subs \rd, \rd, #1 + bmi 1002f + mrc p14, 0, \rx, c0, c1, 0 + tst \rx, #0x20000000 + bne 1001b +1002: + .endm + +#else + .macro addruart, rx .endm @@ -46,9 +76,12 @@ #if defined(CONFIG_DEBUG_ICEDCC) bne 1001b 1002: .endm + +#endif /* CONFIG_CPU_V6 */ + #else #include -#endif +#endif /* CONFIG_DEBUG_ICEDCC */ /* * Useful debugging routines diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index eca248d..3e14b13 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c @@ -295,7 +295,7 @@ ecard_task(void * unused) */ static void ecard_call(struct ecard_request *req) { - DECLARE_COMPLETION(completion); + DECLARE_COMPLETION_ONSTACK(completion); req->complete = &completion; diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index de4e331..bd623b7 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -191,6 +191,9 @@ #endif __irq_svc: svc_entry +#ifdef CONFIG_TRACE_IRQFLAGS + bl trace_hardirqs_off +#endif #ifdef CONFIG_PREEMPT get_thread_info tsk ldr r8, [tsk, #TI_PREEMPT] @ get preempt count @@ -211,6 +214,10 @@ preempt_return: #endif ldr r0, [sp, #S_PSR] @ irqs are already disabled msr spsr_cxsf, r0 +#ifdef CONFIG_TRACE_IRQFLAGS + tst r0, #PSR_I_BIT + bleq trace_hardirqs_on +#endif ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr .ltorg @@ -398,6 +405,9 @@ #endif __irq_usr: usr_entry +#ifdef CONFIG_TRACE_IRQFLAGS + bl trace_hardirqs_off +#endif get_thread_info tsk #ifdef CONFIG_PREEMPT ldr r8, [tsk, #TI_PREEMPT] @ get preempt count @@ -412,6 +422,9 @@ #ifdef CONFIG_PREEMPT teq r0, r7 strne r0, [r0, -r0] #endif +#ifdef CONFIG_TRACE_IRQFLAGS + bl trace_hardirqs_on +#endif mov why, #0 b ret_to_user diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index ac9eb3d..f359a18 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S @@ -9,7 +9,6 @@ * published by the Free Software Foundation. * * Common kernel startup code (non-paged MM) - * for 32-bit CPUs which has a process ID register(CP15). * */ #include @@ -40,7 +39,11 @@ #include ENTRY(stext) msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode @ and irqs disabled +#ifndef CONFIG_CPU_CP15 + ldr r9, =CONFIG_PROCESSOR_ID +#else mrc p15, 0, r9, c0, c0 @ get processor id +#endif bl __lookup_processor_type @ r5=procinfo r9=cpuid movs r10, r5 @ invalid processor (r5=0)? beq __error_p @ yes, error 'p' @@ -58,6 +61,7 @@ ENTRY(stext) */ .type __after_proc_init, %function __after_proc_init: +#ifdef CONFIG_CPU_CP15 mrc p15, 0, r0, c1, c0, 0 @ read control reg #ifdef CONFIG_ALIGNMENT_TRAP orr r0, r0, #CR_A @@ -73,7 +77,13 @@ #endif #ifdef CONFIG_CPU_ICACHE_DISABLE bic r0, r0, #CR_I #endif +#ifdef CONFIG_CPU_HIGH_VECTOR + orr r0, r0, #CR_V +#else + bic r0, r0, #CR_V +#endif mcr p15, 0, r0, c1, c0, 0 @ write control reg +#endif /* CONFIG_CPU_CP15 */ mov pc, r13 @ clear the BSS and jump @ to start_kernel diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 298363d..1b06158 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c @@ -2,6 +2,7 @@ * linux/arch/arm/kernel/module.c * * Copyright (C) 2002 Russell King. + * Modified for nommu by Hyok S. Choi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -32,6 +33,7 @@ #undef MODULE_START #define MODULE_START (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) #endif +#ifdef CONFIG_MMU void *module_alloc(unsigned long size) { struct vm_struct *area; @@ -46,6 +48,12 @@ void *module_alloc(unsigned long size) return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL); } +#else /* CONFIG_MMU */ +void *module_alloc(unsigned long size) +{ + return size == 0 ? NULL : vmalloc(size); +} +#endif /* !CONFIG_MMU */ void module_free(struct module *module, void *region) { diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 3079535..bf35c17 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -221,16 +221,26 @@ void __show_regs(struct pt_regs *regs) processor_modes[processor_mode(regs)], thumb_mode(regs) ? " (T)" : "", get_fs() == get_ds() ? "kernel" : "user"); +#if CONFIG_CPU_CP15 { - unsigned int ctrl, transbase, dac; + unsigned int ctrl; __asm__ ( " mrc p15, 0, %0, c1, c0\n" - " mrc p15, 0, %1, c2, c0\n" - " mrc p15, 0, %2, c3, c0\n" - : "=r" (ctrl), "=r" (transbase), "=r" (dac)); - printk("Control: %04X Table: %08X DAC: %08X\n", - ctrl, transbase, dac); + : "=r" (ctrl)); + printk("Control: %04X\n", ctrl); } +#ifdef CONFIG_CPU_CP15_MMU + { + unsigned int transbase, dac; + __asm__ ( + " mrc p15, 0, %0, c2, c0\n" + " mrc p15, 0, %1, c3, c0\n" + : "=r" (transbase), "=r" (dac)); + printk("Table: %08X DAC: %08X\n", + transbase, dac); + } +#endif +#endif } void show_regs(struct pt_regs * regs) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 0a722e7..6bbd93d 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -348,7 +348,7 @@ #endif cpu_name, processor_id, (int)processor_id & 15, proc_arch[cpu_architecture()], cr_alignment); - sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); + sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS); sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); elf_hwcap = list->elf_hwcap; #ifndef CONFIG_ARM_THUMB diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 68e9634..421329f 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -36,7 +36,9 @@ #include * The online bitmask indicates that the CPU is up and running. */ cpumask_t cpu_possible_map; +EXPORT_SYMBOL(cpu_possible_map); cpumask_t cpu_online_map; +EXPORT_SYMBOL(cpu_online_map); /* * as from 2.5, kernels no longer have an init_tasks structure diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index 8170af4..00c18d3 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c @@ -279,7 +279,7 @@ out: return error; } -long execve(const char *filename, char **argv, char **envp) +int kernel_execve(const char *filename, char *const argv[], char *const envp[]) { struct pt_regs regs; int ret; @@ -317,7 +317,7 @@ long execve(const char *filename, char * out: return ret; } -EXPORT_SYMBOL(execve); +EXPORT_SYMBOL(kernel_execve); /* * Since loff_t is a 64 bit type we avoid a lot of ABI hastle diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 09a67d7..b030320 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -37,8 +37,6 @@ #include */ struct sys_timer *system_timer; -extern unsigned long wall_jiffies; - /* this needs a better home */ DEFINE_SPINLOCK(rtc_lock); @@ -69,10 +67,12 @@ #endif */ int (*set_rtc)(void); +#ifndef CONFIG_GENERIC_TIME static unsigned long dummy_gettimeoffset(void) { return 0; } +#endif /* * Scheduler clock - returns current time in nanosec units. @@ -230,20 +230,16 @@ #else #define do_leds() #endif +#ifndef CONFIG_GENERIC_TIME void do_gettimeofday(struct timeval *tv) { unsigned long flags; unsigned long seq; - unsigned long usec, sec, lost; + unsigned long usec, sec; do { seq = read_seqbegin_irqsave(&xtime_lock, flags); usec = system_timer->offset(); - - lost = jiffies - wall_jiffies; - if (lost) - usec += lost * USECS_PER_JIFFY; - sec = xtime.tv_sec; usec += xtime.tv_nsec / 1000; } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); @@ -276,7 +272,6 @@ int do_settimeofday(struct timespec *tv) * done, and then undo it! */ nsec -= system_timer->offset() * NSEC_PER_USEC; - nsec -= (jiffies - wall_jiffies) * TICK_NSEC; wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); @@ -291,6 +286,7 @@ int do_settimeofday(struct timespec *tv) } EXPORT_SYMBOL(do_settimeofday); +#endif /* !CONFIG_GENERIC_TIME */ /** * save_time_delta - Save the offset between system time and RTC time @@ -333,7 +329,7 @@ void timer_tick(struct pt_regs *regs) profile_tick(CPU_PROFILING, regs); do_leds(); do_set_rtc(); - do_timer(regs); + do_timer(1); #ifndef CONFIG_SMP update_process_times(user_mode(regs)); #endif @@ -500,8 +496,10 @@ device_initcall(timer_init_sysfs); void __init time_init(void) { +#ifndef CONFIG_GENERIC_TIME if (system_timer->offset == NULL) system_timer->offset = dummy_gettimeoffset; +#endif system_timer->init(); #ifdef CONFIG_NO_IDLE_HZ diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index aeeed80..bede380 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -191,7 +191,7 @@ void show_stack(struct task_struct *tsk, if (tsk != current) fp = thread_saved_fp(tsk); else - asm("mov%? %0, fp" : "=r" (fp)); + asm("mov %0, fp" : "=r" (fp) : : "cc"); c_backtrace(fp, 0x10); barrier(); diff --git a/arch/arm/mach-at91rm9200/at91rm9200.c b/arch/arm/mach-at91rm9200/at91rm9200.c index 0985b1c..dcf6136 100644 --- a/arch/arm/mach-at91rm9200/at91rm9200.c +++ b/arch/arm/mach-at91rm9200/at91rm9200.c @@ -17,6 +17,7 @@ #include #include #include "generic.h" +#include "clock.h" static struct map_desc at91rm9200_io_desc[] __initdata = { { @@ -26,87 +27,224 @@ static struct map_desc at91rm9200_io_des .type = MT_DEVICE, }, { .virtual = AT91_VA_BASE_SPI, - .pfn = __phys_to_pfn(AT91_BASE_SPI), - .length = SZ_16K, - .type = MT_DEVICE, - }, { - .virtual = AT91_VA_BASE_SSC2, - .pfn = __phys_to_pfn(AT91_BASE_SSC2), - .length = SZ_16K, - .type = MT_DEVICE, - }, { - .virtual = AT91_VA_BASE_SSC1, - .pfn = __phys_to_pfn(AT91_BASE_SSC1), - .length = SZ_16K, - .type = MT_DEVICE, - }, { - .virtual = AT91_VA_BASE_SSC0, - .pfn = __phys_to_pfn(AT91_BASE_SSC0), - .length = SZ_16K, - .type = MT_DEVICE, - }, { - .virtual = AT91_VA_BASE_US3, - .pfn = __phys_to_pfn(AT91_BASE_US3), - .length = SZ_16K, - .type = MT_DEVICE, - }, { - .virtual = AT91_VA_BASE_US2, - .pfn = __phys_to_pfn(AT91_BASE_US2), - .length = SZ_16K, - .type = MT_DEVICE, - }, { - .virtual = AT91_VA_BASE_US1, - .pfn = __phys_to_pfn(AT91_BASE_US1), - .length = SZ_16K, - .type = MT_DEVICE, - }, { - .virtual = AT91_VA_BASE_US0, - .pfn = __phys_to_pfn(AT91_BASE_US0), + .pfn = __phys_to_pfn(AT91RM9200_BASE_SPI), .length = SZ_16K, .type = MT_DEVICE, }, { .virtual = AT91_VA_BASE_EMAC, - .pfn = __phys_to_pfn(AT91_BASE_EMAC), + .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC), .length = SZ_16K, .type = MT_DEVICE, }, { .virtual = AT91_VA_BASE_TWI, - .pfn = __phys_to_pfn(AT91_BASE_TWI), + .pfn = __phys_to_pfn(AT91RM9200_BASE_TWI), .length = SZ_16K, .type = MT_DEVICE, }, { .virtual = AT91_VA_BASE_MCI, - .pfn = __phys_to_pfn(AT91_BASE_MCI), + .pfn = __phys_to_pfn(AT91RM9200_BASE_MCI), .length = SZ_16K, .type = MT_DEVICE, }, { .virtual = AT91_VA_BASE_UDP, - .pfn = __phys_to_pfn(AT91_BASE_UDP), - .length = SZ_16K, - .type = MT_DEVICE, - }, { - .virtual = AT91_VA_BASE_TCB1, - .pfn = __phys_to_pfn(AT91_BASE_TCB1), - .length = SZ_16K, - .type = MT_DEVICE, - }, { - .virtual = AT91_VA_BASE_TCB0, - .pfn = __phys_to_pfn(AT91_BASE_TCB0), + .pfn = __phys_to_pfn(AT91RM9200_BASE_UDP), .length = SZ_16K, .type = MT_DEVICE, }, { .virtual = AT91_SRAM_VIRT_BASE, - .pfn = __phys_to_pfn(AT91_SRAM_BASE), - .length = AT91_SRAM_SIZE, + .pfn = __phys_to_pfn(AT91RM9200_SRAM_BASE), + .length = AT91RM9200_SRAM_SIZE, .type = MT_DEVICE, }, }; -void __init at91rm9200_map_io(void) +/* -------------------------------------------------------------------- + * Clocks + * -------------------------------------------------------------------- */ + +/* + * The peripheral clocks. + */ +static struct clk udc_clk = { + .name = "udc_clk", + .pmc_mask = 1 << AT91RM9200_ID_UDP, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk ohci_clk = { + .name = "ohci_clk", + .pmc_mask = 1 << AT91RM9200_ID_UHP, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk ether_clk = { + .name = "ether_clk", + .pmc_mask = 1 << AT91RM9200_ID_EMAC, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk mmc_clk = { + .name = "mci_clk", + .pmc_mask = 1 << AT91RM9200_ID_MCI, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk twi_clk = { + .name = "twi_clk", + .pmc_mask = 1 << AT91RM9200_ID_TWI, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk usart0_clk = { + .name = "usart0_clk", + .pmc_mask = 1 << AT91RM9200_ID_US0, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk usart1_clk = { + .name = "usart1_clk", + .pmc_mask = 1 << AT91RM9200_ID_US1, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk usart2_clk = { + .name = "usart2_clk", + .pmc_mask = 1 << AT91RM9200_ID_US2, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk usart3_clk = { + .name = "usart3_clk", + .pmc_mask = 1 << AT91RM9200_ID_US3, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk spi_clk = { + .name = "spi_clk", + .pmc_mask = 1 << AT91RM9200_ID_SPI, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk pioA_clk = { + .name = "pioA_clk", + .pmc_mask = 1 << AT91RM9200_ID_PIOA, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk pioB_clk = { + .name = "pioB_clk", + .pmc_mask = 1 << AT91RM9200_ID_PIOB, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk pioC_clk = { + .name = "pioC_clk", + .pmc_mask = 1 << AT91RM9200_ID_PIOC, + .type = CLK_TYPE_PERIPHERAL, +}; +static struct clk pioD_clk = { + .name = "pioD_clk", + .pmc_mask = 1 << AT91RM9200_ID_PIOD, + .type = CLK_TYPE_PERIPHERAL, +}; + +static struct clk *periph_clocks[] __initdata = { + &pioA_clk, + &pioB_clk, + &pioC_clk, + &pioD_clk, + &usart0_clk, + &usart1_clk, + &usart2_clk, + &usart3_clk, + &mmc_clk, + &udc_clk, + &twi_clk, + &spi_clk, + // ssc 0 .. ssc2 + // tc0 .. tc5 + &ohci_clk, + ðer_clk, + // irq0 .. irq6 +}; + +/* + * The four programmable clocks. + * You must configure pin multiplexing to bring these signals out. + */ +static struct clk pck0 = { + .name = "pck0", + .pmc_mask = AT91_PMC_PCK0, + .type = CLK_TYPE_PROGRAMMABLE, + .id = 0, +}; +static struct clk pck1 = { + .name = "pck1", + .pmc_mask = AT91_PMC_PCK1, + .type = CLK_TYPE_PROGRAMMABLE, + .id = 1, +}; +static struct clk pck2 = { + .name = "pck2", + .pmc_mask = AT91_PMC_PCK2, + .type = CLK_TYPE_PROGRAMMABLE, + .id = 2, +}; +static struct clk pck3 = { + .name = "pck3", + .pmc_mask = AT91_PMC_PCK3, + .type = CLK_TYPE_PROGRAMMABLE, + .id = 3, +}; + +static void __init at91rm9200_register_clocks(void) { + int i; + + for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) + clk_register(periph_clocks[i]); + + clk_register(&pck0); + clk_register(&pck1); + clk_register(&pck2); + clk_register(&pck3); +} + +/* -------------------------------------------------------------------- + * GPIO + * -------------------------------------------------------------------- */ + +static struct at91_gpio_bank at91rm9200_gpio[] = { + { + .id = AT91RM9200_ID_PIOA, + .offset = AT91_PIOA, + .clock = &pioA_clk, + }, { + .id = AT91RM9200_ID_PIOB, + .offset = AT91_PIOB, + .clock = &pioB_clk, + }, { + .id = AT91RM9200_ID_PIOC, + .offset = AT91_PIOC, + .clock = &pioC_clk, + }, { + .id = AT91RM9200_ID_PIOD, + .offset = AT91_PIOD, + .clock = &pioD_clk, + } +}; + +/* -------------------------------------------------------------------- + * AT91RM9200 processor initialization + * -------------------------------------------------------------------- */ +void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks) +{ + /* Map peripherals */ iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); + + /* Init clock subsystem */ + at91_clock_init(main_clock); + + /* Register the processor-specific clocks */ + at91rm9200_register_clocks(); + + /* Initialize GPIO subsystem */ + at91_gpio_init(at91rm9200_gpio, banks); } + +/* -------------------------------------------------------------------- + * Interrupt initialization + * -------------------------------------------------------------------- */ + /* * The default interrupt priority levels (0 = lowest, 7 = highest). */ @@ -145,10 +283,14 @@ static unsigned int at91rm9200_default_i 0 /* Advanced Interrupt Controller (IRQ6) */ }; -void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS]) +void __init at91rm9200_init_interrupts(unsigned int priority[NR_AIC_IRQS]) { if (!priority) priority = at91rm9200_default_irq_priority; + /* Initialize the AIC interrupt controller */ at91_aic_init(priority); + + /* Enable GPIO interrupts */ + at91_gpio_irq_setup(); } diff --git a/arch/arm/mach-at91rm9200/board-1arm.c b/arch/arm/mach-at91rm9200/board-1arm.c index dc79e09..36eecd7 100644 --- a/arch/arm/mach-at91rm9200/board-1arm.c +++ b/arch/arm/mach-at91rm9200/board-1arm.c @@ -34,20 +34,11 @@ #include #include #include -#include #include #include #include "generic.h" -static void __init onearm_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(PQFP_GPIO_BANKS); -} /* * Serial port configuration. @@ -62,15 +53,18 @@ static struct at91_uart_config __initdat static void __init onearm_map_io(void) { - at91rm9200_map_io(); - - /* Initialize clocks: 18.432 MHz crystal */ - at91_clock_init(18432000); + /* Initialize processor: 18.432 MHz crystal */ + at91rm9200_initialize(18432000, AT91RM9200_PQFP); /* Setup the serial ports and console */ at91_init_serial(&onearm_uart_config); } +static void __init onearm_init_irq(void) +{ + at91rm9200_init_interrupts(NULL); +} + static struct at91_eth_data __initdata onearm_eth_data = { .phy_irq_pin = AT91_PIN_PC4, .is_rmii = 1, diff --git a/arch/arm/mach-at91rm9200/board-carmeva.c b/arch/arm/mach-at91rm9200/board-carmeva.c index 2c138b5..50e5136 100644 --- a/arch/arm/mach-at91rm9200/board-carmeva.c +++ b/arch/arm/mach-at91rm9200/board-carmeva.c @@ -35,20 +35,11 @@ #include #include #include -#include #include #include #include "generic.h" -static void __init carmeva_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(BGA_GPIO_BANKS); -} /* * Serial port configuration. @@ -63,15 +54,19 @@ static struct at91_uart_config __initdat static void __init carmeva_map_io(void) { - at91rm9200_map_io(); - - /* Initialize clocks: 20.000 MHz crystal */ - at91_clock_init(20000000); + /* Initialize processor: 20.000 MHz crystal */ + at91rm9200_initialize(20000000, AT91RM9200_BGA); /* Setup the serial ports and console */ at91_init_serial(&carmeva_uart_config); } +static void __init carmeva_init_irq(void) +{ + at91rm9200_init_interrupts(NULL); +} + + static struct at91_eth_data __initdata carmeva_eth_data = { .phy_irq_pin = AT91_PIN_PC4, .is_rmii = 1, diff --git a/arch/arm/mach-at91rm9200/board-csb337.c b/arch/arm/mach-at91rm9200/board-csb337.c index 794d3fb..8eeae49 100644 --- a/arch/arm/mach-at91rm9200/board-csb337.c +++ b/arch/arm/mach-at91rm9200/board-csb337.c @@ -34,20 +34,11 @@ #include #include #include -#include #include #include #include "generic.h" -static void __init csb337_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(BGA_GPIO_BANKS); -} /* * Serial port configuration. @@ -62,10 +53,8 @@ static struct at91_uart_config __initdat static void __init csb337_map_io(void) { - at91rm9200_map_io(); - - /* Initialize clocks: 3.6864 MHz crystal */ - at91_clock_init(3686400); + /* Initialize processor: 3.6864 MHz crystal */ + at91rm9200_initialize(3686400, AT91RM9200_BGA); /* Setup the LEDs */ at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); @@ -74,6 +63,11 @@ static void __init csb337_map_io(void) at91_init_serial(&csb337_uart_config); } +static void __init csb337_init_irq(void) +{ + at91rm9200_init_interrupts(NULL); +} + static struct at91_eth_data __initdata csb337_eth_data = { .phy_irq_pin = AT91_PIN_PC2, .is_rmii = 0, diff --git a/arch/arm/mach-at91rm9200/board-csb637.c b/arch/arm/mach-at91rm9200/board-csb637.c index c8b6f33..a29fa0e 100644 --- a/arch/arm/mach-at91rm9200/board-csb637.c +++ b/arch/arm/mach-at91rm9200/board-csb637.c @@ -33,20 +33,11 @@ #include #include #include -#include #include #include #include "generic.h" -static void __init csb637_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(BGA_GPIO_BANKS); -} /* * Serial port configuration. @@ -61,10 +52,8 @@ static struct at91_uart_config __initdat static void __init csb637_map_io(void) { - at91rm9200_map_io(); - - /* Initialize clocks: 3.6864 MHz crystal */ - at91_clock_init(3686400); + /* Initialize processor: 3.6864 MHz crystal */ + at91rm9200_initialize(3686400, AT91RM9200_BGA); /* Setup the LEDs */ at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); @@ -73,6 +62,11 @@ static void __init csb637_map_io(void) at91_init_serial(&csb637_uart_config); } +static void __init csb637_init_irq(void) +{ + at91rm9200_init_interrupts(NULL); +} + static struct at91_eth_data __initdata csb637_eth_data = { .phy_irq_pin = AT91_PIN_PC0, .is_rmii = 0, diff --git a/arch/arm/mach-at91rm9200/board-dk.c b/arch/arm/mach-at91rm9200/board-dk.c index 6587303..c699f39 100644 --- a/arch/arm/mach-at91rm9200/board-dk.c +++ b/arch/arm/mach-at91rm9200/board-dk.c @@ -37,20 +37,11 @@ #include #include #include -#include #include #include #include "generic.h" -static void __init dk_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(BGA_GPIO_BANKS); -} /* * Serial port configuration. @@ -65,10 +56,8 @@ static struct at91_uart_config __initdat static void __init dk_map_io(void) { - at91rm9200_map_io(); - - /* Initialize clocks: 18.432 MHz crystal */ - at91_clock_init(18432000); + /* Initialize processor: 18.432 MHz crystal */ + at91rm9200_initialize(18432000, AT91RM9200_BGA); /* Setup the LEDs */ at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); @@ -77,6 +66,11 @@ static void __init dk_map_io(void) at91_init_serial(&dk_uart_config); } +static void __init dk_init_irq(void) +{ + at91rm9200_init_interrupts(NULL); +} + static struct at91_eth_data __initdata dk_eth_data = { .phy_irq_pin = AT91_PIN_PC4, .is_rmii = 1, @@ -128,6 +122,29 @@ #ifdef CONFIG_MTD_AT91_DATAFLASH_CARD #endif }; +static struct mtd_partition __initdata dk_nand_partition[] = { + { + .name = "NAND Partition 1", + .offset = 0, + .size = MTDPART_SIZ_FULL, + }, +}; + +static struct mtd_partition *nand_partitions(int size, int *num_partitions) +{ + *num_partitions = ARRAY_SIZE(dk_nand_partition); + return dk_nand_partition; +} + +static struct at91_nand_data __initdata dk_nand_data = { + .ale = 22, + .cle = 21, + .det_pin = AT91_PIN_PB1, + .rdy_pin = AT91_PIN_PC2, + // .enable_pin = ... not there + .partition_info = nand_partitions, +}; + static void __init dk_board_init(void) { /* Serial */ @@ -153,6 +170,8 @@ #else at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */ at91_add_device_mmc(&dk_mmc_data); #endif + /* NAND */ + at91_add_device_nand(&dk_nand_data); /* VGA */ // dk_add_device_video(); } diff --git a/arch/arm/mach-at91rm9200/board-eb9200.c b/arch/arm/mach-at91rm9200/board-eb9200.c index a3e2df9..c6e0d51 100644 --- a/arch/arm/mach-at91rm9200/board-eb9200.c +++ b/arch/arm/mach-at91rm9200/board-eb9200.c @@ -35,20 +35,11 @@ #include #include #include -#include #include #include #include "generic.h" -static void __init eb9200_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(BGA_GPIO_BANKS); -} /* * Serial port configuration. @@ -63,15 +54,18 @@ static struct at91_uart_config __initdat static void __init eb9200_map_io(void) { - at91rm9200_map_io(); - - /* Initialize clocks: 18.432 MHz crystal */ - at91_clock_init(18432000); + /* Initialize processor: 18.432 MHz crystal */ + at91rm9200_initialize(18432000, AT91RM9200_BGA); /* Setup the serial ports and console */ at91_init_serial(&eb9200_uart_config); } +static void __init eb9200_init_irq(void) +{ + at91rm9200_init_interrupts(NULL); +} + static struct at91_eth_data __initdata eb9200_eth_data = { .phy_irq_pin = AT91_PIN_PC4, .is_rmii = 1, diff --git a/arch/arm/mach-at91rm9200/board-ek.c b/arch/arm/mach-at91rm9200/board-ek.c index 8681923..830eb79 100644 --- a/arch/arm/mach-at91rm9200/board-ek.c +++ b/arch/arm/mach-at91rm9200/board-ek.c @@ -37,20 +37,11 @@ #include #include #include -#include #include #include #include "generic.h" -static void __init ek_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(BGA_GPIO_BANKS); -} /* * Serial port configuration. @@ -65,10 +56,8 @@ static struct at91_uart_config __initdat static void __init ek_map_io(void) { - at91rm9200_map_io(); - - /* Initialize clocks: 18.432 MHz crystal */ - at91_clock_init(18432000); + /* Initialize processor: 18.432 MHz crystal */ + at91rm9200_initialize(18432000, AT91RM9200_BGA); /* Setup the LEDs */ at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); @@ -77,6 +66,11 @@ static void __init ek_map_io(void) at91_init_serial(&ek_uart_config); } +static void __init ek_init_irq(void) +{ + at91rm9200_init_interrupts(NULL); +} + static struct at91_eth_data __initdata ek_eth_data = { .phy_irq_pin = AT91_PIN_PC4, .is_rmii = 1, diff --git a/arch/arm/mach-at91rm9200/board-kafa.c b/arch/arm/mach-at91rm9200/board-kafa.c index bf760c5..91e3019 100644 --- a/arch/arm/mach-at91rm9200/board-kafa.c +++ b/arch/arm/mach-at91rm9200/board-kafa.c @@ -34,20 +34,11 @@ #include #include #include -#include #include #include #include "generic.h" -static void __init kafa_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(PQFP_GPIO_BANKS); -} /* * Serial port configuration. @@ -62,10 +53,8 @@ static struct at91_uart_config __initdat static void __init kafa_map_io(void) { - at91rm9200_map_io(); - - /* Initialize clocks: 18.432 MHz crystal */ - at91_clock_init(18432000); + /* Initialize processor: 18.432 MHz crystal */ + at91rm9200_initialize(18432000, AT91RM9200_PQFP); /* Set up the LEDs */ at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); @@ -74,6 +63,11 @@ static void __init kafa_map_io(void) at91_init_serial(&kafa_uart_config); } +static void __init kafa_init_irq(void) +{ + at91rm9200_init_interrupts(NULL); +} + static struct at91_eth_data __initdata kafa_eth_data = { .phy_irq_pin = AT91_PIN_PC4, .is_rmii = 0, diff --git a/arch/arm/mach-at91rm9200/board-kb9202.c b/arch/arm/mach-at91rm9200/board-kb9202.c index f06d2b5..272fe43 100644 --- a/arch/arm/mach-at91rm9200/board-kb9202.c +++ b/arch/arm/mach-at91rm9200/board-kb9202.c @@ -35,20 +35,11 @@ #include #include #include -#include #include #include #include "generic.h" -static void __init kb9202_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(PQFP_GPIO_BANKS); -} /* * Serial port configuration. @@ -63,10 +54,8 @@ static struct at91_uart_config __initdat static void __init kb9202_map_io(void) { - at91rm9200_map_io(); - - /* Initialize clocks: 10 MHz crystal */ - at91_clock_init(10000000); + /* Initialize processor: 10 MHz crystal */ + at91rm9200_initialize(10000000, AT91RM9200_PQFP); /* Set up the LEDs */ at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); @@ -75,6 +64,11 @@ static void __init kb9202_map_io(void) at91_init_serial(&kb9202_uart_config); } +static void __init kb9202_init_irq(void) +{ + at91rm9200_init_interrupts(NULL); +} + static struct at91_eth_data __initdata kb9202_eth_data = { .phy_irq_pin = AT91_PIN_PB29, .is_rmii = 0, @@ -95,6 +89,29 @@ static struct at91_mmc_data __initdata k .wire4 = 1, }; +static struct mtd_partition __initdata kb9202_nand_partition[] = { + { + .name = "nand_fs", + .offset = 0, + .size = MTDPART_SIZ_FULL, + }, +}; + +static struct mtd_partition *nand_partitions(int size, int *num_partitions) +{ + *num_partitions = ARRAY_SIZE(kb9202_nand_partition); + return kb9202_nand_partition; +} + +static struct at91_nand_data __initdata kb9202_nand_data = { + .ale = 22, + .cle = 21, + // .det_pin = ... not there + .rdy_pin = AT91_PIN_PC29, + .enable_pin = AT91_PIN_PC28, + .partition_info = nand_partitions, +}; + static void __init kb9202_board_init(void) { /* Serial */ @@ -111,6 +128,8 @@ static void __init kb9202_board_init(voi at91_add_device_i2c(); /* SPI */ at91_add_device_spi(NULL, 0); + /* NAND */ + at91_add_device_nand(&kb9202_nand_data); } MACHINE_START(KB9200, "KB920x") diff --git a/arch/arm/mach-at91rm9200/clock.c b/arch/arm/mach-at91rm9200/clock.c index edc2cc8..a43b061 100644 --- a/arch/arm/mach-at91rm9200/clock.c +++ b/arch/arm/mach-at91rm9200/clock.c @@ -29,7 +29,7 @@ #include #include -#include "generic.h" +#include "clock.h" /* @@ -38,23 +38,15 @@ #include "generic.h" * PLLB be used at other rates (on boards that don't need USB), etc. */ -struct clk { - const char *name; /* unique clock name */ - const char *function; /* function of the clock */ - struct device *dev; /* device associated with function */ - unsigned long rate_hz; - struct clk *parent; - u32 pmc_mask; - void (*mode)(struct clk *, int); - unsigned id:2; /* PCK0..3, or 32k/main/a/b */ - unsigned primary:1; - unsigned pll:1; - unsigned programmable:1; - u16 users; -}; +#define clk_is_primary(x) ((x)->type & CLK_TYPE_PRIMARY) +#define clk_is_programmable(x) ((x)->type & CLK_TYPE_PROGRAMMABLE) +#define clk_is_peripheral(x) ((x)->type & CLK_TYPE_PERIPHERAL) + + +static LIST_HEAD(clocks); +static DEFINE_SPINLOCK(clk_lock); -static spinlock_t clk_lock; -static u32 at91_pllb_usb_init; +static u32 at91_pllb_usb_init; /* * Four primary clock sources: two crystal oscillators (32K, main), and @@ -67,21 +59,20 @@ static struct clk clk32k = { .rate_hz = AT91_SLOW_CLOCK, .users = 1, /* always on */ .id = 0, - .primary = 1, + .type = CLK_TYPE_PRIMARY, }; static struct clk main_clk = { .name = "main", .pmc_mask = AT91_PMC_MOSCS, /* in PMC_SR */ .id = 1, - .primary = 1, + .type = CLK_TYPE_PRIMARY, }; static struct clk plla = { .name = "plla", .parent = &main_clk, .pmc_mask = AT91_PMC_LOCKA, /* in PMC_SR */ .id = 2, - .primary = 1, - .pll = 1, + .type = CLK_TYPE_PRIMARY | CLK_TYPE_PLL, }; static void pllb_mode(struct clk *clk, int is_on) @@ -94,6 +85,7 @@ static void pllb_mode(struct clk *clk, i } else value = 0; + // REVISIT: Add work-around for AT91RM9200 Errata #26 ? at91_sys_write(AT91_CKGR_PLLBR, value); do { @@ -107,8 +99,7 @@ static struct clk pllb = { .pmc_mask = AT91_PMC_LOCKB, /* in PMC_SR */ .mode = pllb_mode, .id = 3, - .primary = 1, - .pll = 1, + .type = CLK_TYPE_PRIMARY | CLK_TYPE_PLL, }; static void pmc_sys_mode(struct clk *clk, int is_on) @@ -133,41 +124,6 @@ static struct clk uhpck = { .mode = pmc_sys_mode, }; -#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS -/* - * The four programmable clocks can be parented by any primary clock. - * You must configure pin multiplexing to bring these signals out. - */ -static struct clk pck0 = { - .name = "pck0", - .pmc_mask = AT91_PMC_PCK0, - .mode = pmc_sys_mode, - .programmable = 1, - .id = 0, -}; -static struct clk pck1 = { - .name = "pck1", - .pmc_mask = AT91_PMC_PCK1, - .mode = pmc_sys_mode, - .programmable = 1, - .id = 1, -}; -static struct clk pck2 = { - .name = "pck2", - .pmc_mask = AT91_PMC_PCK2, - .mode = pmc_sys_mode, - .programmable = 1, - .id = 2, -}; -static struct clk pck3 = { - .name = "pck3", - .pmc_mask = AT91_PMC_PCK3, - .mode = pmc_sys_mode, - .programmable = 1, - .id = 3, -}; -#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */ - /* * The master clock is divided from the CPU clock (by 1-4). It's used for @@ -187,131 +143,21 @@ static void pmc_periph_mode(struct clk * at91_sys_write(AT91_PMC_PCDR, clk->pmc_mask); } -static struct clk udc_clk = { - .name = "udc_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_UDP, - .mode = pmc_periph_mode, -}; -static struct clk ohci_clk = { - .name = "ohci_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_UHP, - .mode = pmc_periph_mode, -}; -static struct clk ether_clk = { - .name = "ether_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_EMAC, - .mode = pmc_periph_mode, -}; -static struct clk mmc_clk = { - .name = "mci_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_MCI, - .mode = pmc_periph_mode, -}; -static struct clk twi_clk = { - .name = "twi_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_TWI, - .mode = pmc_periph_mode, -}; -static struct clk usart0_clk = { - .name = "usart0_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_US0, - .mode = pmc_periph_mode, -}; -static struct clk usart1_clk = { - .name = "usart1_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_US1, - .mode = pmc_periph_mode, -}; -static struct clk usart2_clk = { - .name = "usart2_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_US2, - .mode = pmc_periph_mode, -}; -static struct clk usart3_clk = { - .name = "usart3_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_US3, - .mode = pmc_periph_mode, -}; -static struct clk spi_clk = { - .name = "spi0_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_SPI, - .mode = pmc_periph_mode, -}; -static struct clk pioA_clk = { - .name = "pioA_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_PIOA, - .mode = pmc_periph_mode, -}; -static struct clk pioB_clk = { - .name = "pioB_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_PIOB, - .mode = pmc_periph_mode, -}; -static struct clk pioC_clk = { - .name = "pioC_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_PIOC, - .mode = pmc_periph_mode, -}; -static struct clk pioD_clk = { - .name = "pioD_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_PIOD, - .mode = pmc_periph_mode, -}; - -static struct clk *const clock_list[] = { - /* four primary clocks -- MUST BE FIRST! */ - &clk32k, - &main_clk, - &plla, - &pllb, - - /* PLLB children (USB) */ - &udpck, - &uhpck, - -#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS - /* programmable clocks */ - &pck0, - &pck1, - &pck2, - &pck3, -#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */ - - /* MCK and peripherals */ - &mck, - &usart0_clk, - &usart1_clk, - &usart2_clk, - &usart3_clk, - &mmc_clk, - &udc_clk, - &twi_clk, - &spi_clk, - &pioA_clk, - &pioB_clk, - &pioC_clk, - &pioD_clk, - // ssc0..ssc2 - // tc0..tc5 - // irq0..irq6 - &ohci_clk, - ðer_clk, -}; +static struct clk __init *at91_css_to_clk(unsigned long css) +{ + switch (css) { + case AT91_PMC_CSS_SLOW: + return &clk32k; + case AT91_PMC_CSS_MAIN: + return &main_clk; + case AT91_PMC_CSS_PLLA: + return &plla; + case AT91_PMC_CSS_PLLB: + return &pllb; + } + return NULL; +} /* * Associate a particular clock with a function (eg, "uart") and device. @@ -329,14 +175,12 @@ void __init at91_clock_associate(const c clk->dev = dev; } -/* clocks are all static for now; no refcounting necessary */ +/* clocks cannot be de-registered no refcounting necessary */ struct clk *clk_get(struct device *dev, const char *id) { - int i; - - for (i = 0; i < ARRAY_SIZE(clock_list); i++) { - struct clk *clk = clock_list[i]; + struct clk *clk; + list_for_each_entry(clk, &clocks, node) { if (strcmp(id, clk->name) == 0) return clk; if (clk->function && (dev == clk->dev) && strcmp(id, clk->function) == 0) @@ -424,7 +268,7 @@ long clk_round_rate(struct clk *clk, uns unsigned prescale; unsigned long actual; - if (!clk->programmable) + if (!clk_is_programmable(clk)) return -EINVAL; spin_lock_irqsave(&clk_lock, flags); @@ -446,7 +290,7 @@ int clk_set_rate(struct clk *clk, unsign unsigned prescale; unsigned long actual; - if (!clk->programmable) + if (!clk_is_programmable(clk)) return -EINVAL; if (clk->users) return -EBUSY; @@ -484,7 +328,7 @@ int clk_set_parent(struct clk *clk, stru if (clk->users) return -EBUSY; - if (!parent->primary || !clk->programmable) + if (!clk_is_primary(parent) || !clk_is_programmable(clk)) return -EINVAL; spin_lock_irqsave(&clk_lock, flags); @@ -497,6 +341,18 @@ int clk_set_parent(struct clk *clk, stru } EXPORT_SYMBOL(clk_set_parent); +/* establish PCK0..PCK3 parentage and rate */ +static void init_programmable_clock(struct clk *clk) +{ + struct clk *parent; + u32 pckr; + + pckr = at91_sys_read(AT91_PMC_PCKR(clk->id)); + parent = at91_css_to_clk(pckr & AT91_PMC_CSS); + clk->parent = parent; + clk->rate_hz = parent->rate_hz / (1 << ((pckr >> 2) & 3)); +} + #endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */ /*------------------------------------------------------------------------*/ @@ -506,6 +362,7 @@ #ifdef CONFIG_DEBUG_FS static int at91_clk_show(struct seq_file *s, void *unused) { u32 scsr, pcsr, sr; + struct clk *clk; unsigned i; seq_printf(s, "SCSR = %8x\n", scsr = at91_sys_read(AT91_PMC_SCSR)); @@ -523,9 +380,8 @@ static int at91_clk_show(struct seq_file seq_printf(s, "\n"); - for (i = 0; i < ARRAY_SIZE(clock_list); i++) { - char *state; - struct clk *clk = clock_list[i]; + list_for_each_entry(clk, &clocks, node) { + char *state; if (clk->mode == pmc_sys_mode) state = (scsr & clk->pmc_mask) ? "on" : "off"; @@ -570,6 +426,28 @@ #endif /*------------------------------------------------------------------------*/ +/* Register a new clock */ +int __init clk_register(struct clk *clk) +{ + if (clk_is_peripheral(clk)) { + clk->parent = &mck; + clk->mode = pmc_periph_mode; + list_add_tail(&clk->node, &clocks); + } +#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS + else if (clk_is_programmable(clk)) { + clk->mode = pmc_sys_mode; + init_programmable_clock(clk); + list_add_tail(&clk->node, &clocks); + } +#endif + + return 0; +} + + +/*------------------------------------------------------------------------*/ + static u32 __init at91_pll_rate(struct clk *pll, u32 freq, u32 reg) { unsigned mul, div; @@ -640,20 +518,17 @@ fail: return 0; } - /* * Several unused clocks may be active. Turn them off. */ -static void at91_periphclk_reset(void) +static void __init at91_periphclk_reset(void) { unsigned long reg; - int i; + struct clk *clk; reg = at91_sys_read(AT91_PMC_PCSR); - for (i = 0; i < ARRAY_SIZE(clock_list); i++) { - struct clk *clk = clock_list[i]; - + list_for_each_entry(clk, &clocks, node) { if (clk->mode != pmc_periph_mode) continue; @@ -664,11 +539,25 @@ static void at91_periphclk_reset(void) at91_sys_write(AT91_PMC_PCDR, reg); } +static struct clk *const standard_pmc_clocks[] __initdata = { + /* four primary clocks */ + &clk32k, + &main_clk, + &plla, + &pllb, + + /* PLLB children (USB) */ + &udpck, + &uhpck, + + /* MCK */ + &mck +}; + int __init at91_clock_init(unsigned long main_clock) { unsigned tmp, freq, mckr; - - spin_lock_init(&clk_lock); + int i; /* * When the bootloader initialized the main oscillator correctly, @@ -709,11 +598,15 @@ int __init at91_clock_init(unsigned long * For now, assume this parentage won't change. */ mckr = at91_sys_read(AT91_PMC_MCKR); - mck.parent = clock_list[mckr & AT91_PMC_CSS]; + mck.parent = at91_css_to_clk(mckr & AT91_PMC_CSS); freq = mck.parent->rate_hz; freq /= (1 << ((mckr >> 2) & 3)); /* prescale */ mck.rate_hz = freq / (1 + ((mckr >> 8) & 3)); /* mdiv */ + /* Register the PMC's standard clocks */ + for (i = 0; i < ARRAY_SIZE(standard_pmc_clocks); i++) + list_add_tail(&standard_pmc_clocks[i]->node, &clocks); + /* MCK and CPU clock are "always on" */ clk_enable(&mck); @@ -722,35 +615,8 @@ int __init at91_clock_init(unsigned long (unsigned) main_clock / 1000000, ((unsigned) main_clock % 1000000) / 1000); -#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS - /* establish PCK0..PCK3 parentage */ - for (tmp = 0; tmp < ARRAY_SIZE(clock_list); tmp++) { - struct clk *clk = clock_list[tmp], *parent; - u32 pckr; - - if (!clk->programmable) - continue; - - pckr = at91_sys_read(AT91_PMC_PCKR(clk->id)); - parent = clock_list[pckr & AT91_PMC_CSS]; - clk->parent = parent; - clk->rate_hz = parent->rate_hz / (1 << ((pckr >> 2) & 3)); - - if (clk->users == 0) { - /* not being used, so switch it off */ - at91_sys_write(AT91_PMC_SCDR, clk->pmc_mask); - } - } -#else /* disable all programmable clocks */ at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK0 | AT91_PMC_PCK1 | AT91_PMC_PCK2 | AT91_PMC_PCK3); -#endif - - /* enable the PIO clocks */ - clk_enable(&pioA_clk); - clk_enable(&pioB_clk); - clk_enable(&pioC_clk); - clk_enable(&pioD_clk); /* disable all other unused peripheral clocks */ at91_periphclk_reset(); diff --git a/arch/arm/mach-at91rm9200/clock.h b/arch/arm/mach-at91rm9200/clock.h new file mode 100644 index 0000000..0592e66 --- /dev/null +++ b/arch/arm/mach-at91rm9200/clock.h @@ -0,0 +1,30 @@ +/* + * linux/arch/arm/mach-at91rm9200/clock.h + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#define CLK_TYPE_PRIMARY 0x1 +#define CLK_TYPE_PLL 0x2 +#define CLK_TYPE_PROGRAMMABLE 0x4 +#define CLK_TYPE_PERIPHERAL 0x8 + + +struct clk { + struct list_head node; + const char *name; /* unique clock name */ + const char *function; /* function of the clock */ + struct device *dev; /* device associated with function */ + unsigned long rate_hz; + struct clk *parent; + u32 pmc_mask; + void (*mode)(struct clk *, int); + unsigned id:2; /* PCK0..3, or 32k/main/a/b */ + unsigned type; /* clock type */ + u16 users; +}; + + +extern int __init clk_register(struct clk *clk); diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c index 4352acb..0152553 100644 --- a/arch/arm/mach-at91rm9200/devices.c +++ b/arch/arm/mach-at91rm9200/devices.c @@ -35,13 +35,13 @@ static struct at91_usbh_data usbh_data; static struct resource at91_usbh_resources[] = { [0] = { - .start = AT91_UHP_BASE, - .end = AT91_UHP_BASE + SZ_1M - 1, + .start = AT91RM9200_UHP_BASE, + .end = AT91RM9200_UHP_BASE + SZ_1M - 1, .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91_ID_UHP, - .end = AT91_ID_UHP, + .start = AT91RM9200_ID_UHP, + .end = AT91RM9200_ID_UHP, .flags = IORESOURCE_IRQ, }, }; @@ -80,13 +80,13 @@ static struct at91_udc_data udc_data; static struct resource at91_udc_resources[] = { [0] = { - .start = AT91_BASE_UDP, - .end = AT91_BASE_UDP + SZ_16K - 1, + .start = AT91RM9200_BASE_UDP, + .end = AT91RM9200_BASE_UDP + SZ_16K - 1, .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91_ID_UDP, - .end = AT91_ID_UDP, + .start = AT91RM9200_ID_UDP, + .end = AT91RM9200_ID_UDP, .flags = IORESOURCE_IRQ, }, }; @@ -131,13 +131,13 @@ static struct at91_eth_data eth_data; static struct resource at91_eth_resources[] = { [0] = { - .start = AT91_BASE_EMAC, - .end = AT91_BASE_EMAC + SZ_16K - 1, + .start = AT91_VA_BASE_EMAC, + .end = AT91_VA_BASE_EMAC + SZ_16K - 1, .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91_ID_EMAC, - .end = AT91_ID_EMAC, + .start = AT91RM9200_ID_EMAC, + .end = AT91RM9200_ID_EMAC, .flags = IORESOURCE_IRQ, }, }; @@ -263,13 +263,13 @@ static struct at91_mmc_data mmc_data; static struct resource at91_mmc_resources[] = { [0] = { - .start = AT91_BASE_MCI, - .end = AT91_BASE_MCI + SZ_16K - 1, + .start = AT91RM9200_BASE_MCI, + .end = AT91RM9200_BASE_MCI + SZ_16K - 1, .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91_ID_MCI, - .end = AT91_ID_MCI, + .start = AT91RM9200_ID_MCI, + .end = AT91RM9200_ID_MCI, .flags = IORESOURCE_IRQ, }, }; @@ -423,13 +423,13 @@ static u64 spi_dmamask = 0xffffffffUL; static struct resource at91_spi_resources[] = { [0] = { - .start = AT91_BASE_SPI, - .end = AT91_BASE_SPI + SZ_16K - 1, + .start = AT91RM9200_BASE_SPI, + .end = AT91RM9200_BASE_SPI + SZ_16K - 1, .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91_ID_SPI, - .end = AT91_ID_SPI, + .start = AT91RM9200_ID_SPI, + .end = AT91RM9200_ID_SPI, .flags = IORESOURCE_IRQ, }, }; @@ -582,13 +582,13 @@ static inline void configure_dbgu_pins(v static struct resource uart0_resources[] = { [0] = { - .start = AT91_BASE_US0, - .end = AT91_BASE_US0 + SZ_16K - 1, + .start = AT91RM9200_BASE_US0, + .end = AT91RM9200_BASE_US0 + SZ_16K - 1, .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91_ID_US0, - .end = AT91_ID_US0, + .start = AT91RM9200_ID_US0, + .end = AT91RM9200_ID_US0, .flags = IORESOURCE_IRQ, }, }; @@ -624,13 +624,13 @@ static inline void configure_usart0_pins static struct resource uart1_resources[] = { [0] = { - .start = AT91_BASE_US1, - .end = AT91_BASE_US1 + SZ_16K - 1, + .start = AT91RM9200_BASE_US1, + .end = AT91RM9200_BASE_US1 + SZ_16K - 1, .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91_ID_US1, - .end = AT91_ID_US1, + .start = AT91RM9200_ID_US1, + .end = AT91RM9200_ID_US1, .flags = IORESOURCE_IRQ, }, }; @@ -665,13 +665,13 @@ static inline void configure_usart1_pins static struct resource uart2_resources[] = { [0] = { - .start = AT91_BASE_US2, - .end = AT91_BASE_US2 + SZ_16K - 1, + .start = AT91RM9200_BASE_US2, + .end = AT91RM9200_BASE_US2 + SZ_16K - 1, .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91_ID_US2, - .end = AT91_ID_US2, + .start = AT91RM9200_ID_US2, + .end = AT91RM9200_ID_US2, .flags = IORESOURCE_IRQ, }, }; @@ -700,13 +700,13 @@ static inline void configure_usart2_pins static struct resource uart3_resources[] = { [0] = { - .start = AT91_BASE_US3, - .end = AT91_BASE_US3 + SZ_16K - 1, + .start = AT91RM9200_BASE_US3, + .end = AT91RM9200_BASE_US3 + SZ_16K - 1, .flags = IORESOURCE_MEM, }, [1] = { - .start = AT91_ID_US3, - .end = AT91_ID_US3, + .start = AT91RM9200_ID_US3, + .end = AT91RM9200_ID_US3, .flags = IORESOURCE_IRQ, }, }; diff --git a/arch/arm/mach-at91rm9200/generic.h b/arch/arm/mach-at91rm9200/generic.h index 7979d8a..694e411 100644 --- a/arch/arm/mach-at91rm9200/generic.h +++ b/arch/arm/mach-at91rm9200/generic.h @@ -8,18 +8,17 @@ * published by the Free Software Foundation. */ + /* Processors */ +extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks); + /* Interrupts */ -extern void __init at91rm9200_init_irq(unsigned int priority[]); +extern void __init at91rm9200_init_interrupts(unsigned int priority[]); extern void __init at91_aic_init(unsigned int priority[]); -extern void __init at91_gpio_irq_setup(unsigned banks); /* Timer */ struct sys_timer; extern struct sys_timer at91rm9200_timer; - /* Memory Map */ -extern void __init at91rm9200_map_io(void); - /* Clocks */ extern int __init at91_clock_init(unsigned long main_clock); struct device; @@ -29,3 +28,14 @@ extern void __init at91_clock_associate( extern void at91_irq_suspend(void); extern void at91_irq_resume(void); + /* GPIO */ +#define AT91RM9200_PQFP 3 /* AT91RM9200 PQFP package has 3 banks */ +#define AT91RM9200_BGA 4 /* AT91RM9200 BGA package has 4 banks */ + +struct at91_gpio_bank { + unsigned short id; /* peripheral ID */ + unsigned long offset; /* offset from system peripheral base */ + struct clk *clock; /* associated clock */ +}; +extern void __init at91_gpio_init(struct at91_gpio_bank *, int nr_banks); +extern void __init at91_gpio_irq_setup(void); diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c index cec199f..58c9bf5 100644 --- a/arch/arm/mach-at91rm9200/gpio.c +++ b/arch/arm/mach-at91rm9200/gpio.c @@ -9,6 +9,7 @@ * (at your option) any later version. */ +#include #include #include #include @@ -20,12 +21,12 @@ #include #include #include -static const u32 pio_controller_offset[4] = { - AT91_PIOA, - AT91_PIOB, - AT91_PIOC, - AT91_PIOD, -}; +#include "generic.h" + + +static struct at91_gpio_bank *gpio; +static int gpio_banks; + static inline void __iomem *pin_to_controller(unsigned pin) { @@ -33,8 +34,8 @@ static inline void __iomem *pin_to_contr pin -= PIN_BASE; pin /= 32; - if (likely(pin < BGA_GPIO_BANKS)) - return sys_base + pio_controller_offset[pin]; + if (likely(pin < gpio_banks)) + return sys_base + gpio[pin].offset; return NULL; } @@ -179,7 +180,6 @@ EXPORT_SYMBOL(at91_set_multi_drive); /*--------------------------------------------------------------------------*/ - /* * assuming the pin is muxed as a gpio output, set its value. */ @@ -216,8 +216,8 @@ EXPORT_SYMBOL(at91_get_gpio_value); #ifdef CONFIG_PM -static u32 wakeups[BGA_GPIO_BANKS]; -static u32 backups[BGA_GPIO_BANKS]; +static u32 wakeups[MAX_GPIO_BANKS]; +static u32 backups[MAX_GPIO_BANKS]; static int gpio_irq_set_wake(unsigned pin, unsigned state) { @@ -226,7 +226,7 @@ static int gpio_irq_set_wake(unsigned pi pin -= PIN_BASE; pin /= 32; - if (unlikely(pin >= BGA_GPIO_BANKS)) + if (unlikely(pin >= MAX_GPIO_BANKS)) return -EINVAL; if (state) @@ -241,8 +241,8 @@ void at91_gpio_suspend(void) { int i; - for (i = 0; i < BGA_GPIO_BANKS; i++) { - u32 pio = pio_controller_offset[i]; + for (i = 0; i < gpio_banks; i++) { + u32 pio = gpio[i].offset; /* * Note: drivers should have disabled GPIO interrupts that @@ -257,14 +257,14 @@ void at91_gpio_suspend(void) * first place! */ backups[i] = at91_sys_read(pio + PIO_IMR); - at91_sys_write(pio_controller_offset[i] + PIO_IDR, backups[i]); - at91_sys_write(pio_controller_offset[i] + PIO_IER, wakeups[i]); + at91_sys_write(pio + PIO_IDR, backups[i]); + at91_sys_write(pio + PIO_IER, wakeups[i]); if (!wakeups[i]) { - disable_irq_wake(AT91_ID_PIOA + i); - at91_sys_write(AT91_PMC_PCDR, 1 << (AT91_ID_PIOA + i)); + disable_irq_wake(gpio[i].id); + at91_sys_write(AT91_PMC_PCDR, 1 << gpio[i].id); } else { - enable_irq_wake(AT91_ID_PIOA + i); + enable_irq_wake(gpio[i].id); #ifdef CONFIG_PM_DEBUG printk(KERN_DEBUG "GPIO-%c may wake for %08x\n", "ABCD"[i], wakeups[i]); #endif @@ -276,16 +276,13 @@ void at91_gpio_resume(void) { int i; - for (i = 0; i < BGA_GPIO_BANKS; i++) { - at91_sys_write(pio_controller_offset[i] + PIO_IDR, wakeups[i]); - at91_sys_write(pio_controller_offset[i] + PIO_IER, backups[i]); - } + for (i = 0; i < gpio_banks; i++) { + u32 pio = gpio[i].offset; - at91_sys_write(AT91_PMC_PCER, - (1 << AT91_ID_PIOA) - | (1 << AT91_ID_PIOB) - | (1 << AT91_ID_PIOC) - | (1 << AT91_ID_PIOD)); + at91_sys_write(pio + PIO_IDR, wakeups[i]); + at91_sys_write(pio + PIO_IER, backups[i]); + at91_sys_write(AT91_PMC_PCER, 1 << gpio[i].id); + } } #else @@ -377,20 +374,25 @@ static void gpio_irq_handler(unsigned ir /* now it may re-trigger */ } -/* call this from board-specific init_irq */ -void __init at91_gpio_irq_setup(unsigned banks) +/*--------------------------------------------------------------------------*/ + +/* + * Called from the processor-specific init to enable GPIO interrupt support. + */ +void __init at91_gpio_irq_setup(void) { - unsigned pioc, pin, id; + unsigned pioc, pin; - if (banks > 4) - banks = 4; - for (pioc = 0, pin = PIN_BASE, id = AT91_ID_PIOA; - pioc < banks; - pioc++, id++) { + for (pioc = 0, pin = PIN_BASE; + pioc < gpio_banks; + pioc++) { void __iomem *controller; + unsigned id = gpio[pioc].id; unsigned i; - controller = (void __iomem *) AT91_VA_BASE_SYS + pio_controller_offset[pioc]; + clk_enable(gpio[pioc].clock); /* enable PIO controller's clock */ + + controller = (void __iomem *) AT91_VA_BASE_SYS + gpio[pioc].offset; __raw_writel(~0, controller + PIO_IDR); set_irq_data(id, (void *) pin); @@ -408,5 +410,16 @@ void __init at91_gpio_irq_setup(unsigned set_irq_chained_handler(id, gpio_irq_handler); } - pr_info("AT91: %d gpio irqs in %d banks\n", pin - PIN_BASE, banks); + pr_info("AT91: %d gpio irqs in %d banks\n", pin - PIN_BASE, gpio_banks); +} + +/* + * Called from the processor-specific init to enable GPIO pin support. + */ +void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks) +{ + BUG_ON(nr_banks > MAX_GPIO_BANKS); + + gpio = data; + gpio_banks = nr_banks; } diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91rm9200/irq.c index c3a5e77..3e48811 100644 --- a/arch/arm/mach-at91rm9200/irq.c +++ b/arch/arm/mach-at91rm9200/irq.c @@ -34,8 +34,6 @@ #include #include #include -#include "generic.h" - static void at91_aic_mask_irq(unsigned int irq) { @@ -61,12 +59,12 @@ static int at91_aic_set_type(unsigned ir srctype = AT91_AIC_SRCTYPE_RISING; break; case IRQT_LOW: - if ((irq > AT91_ID_FIQ) && (irq < AT91_ID_IRQ0)) /* only supported on external interrupts */ + if ((irq > AT91_ID_FIQ) && (irq < AT91RM9200_ID_IRQ0)) /* only supported on external interrupts */ return -EINVAL; srctype = AT91_AIC_SRCTYPE_LOW; break; case IRQT_FALLING: - if ((irq > AT91_ID_FIQ) && (irq < AT91_ID_IRQ0)) /* only supported on external interrupts */ + if ((irq > AT91_ID_FIQ) && (irq < AT91RM9200_ID_IRQ0)) /* only supported on external interrupts */ return -EINVAL; srctype = AT91_AIC_SRCTYPE_FALLING; break; diff --git a/arch/arm/mach-at91rm9200/pm.c b/arch/arm/mach-at91rm9200/pm.c index 47e5480..32c95d8 100644 --- a/arch/arm/mach-at91rm9200/pm.c +++ b/arch/arm/mach-at91rm9200/pm.c @@ -123,13 +123,13 @@ static int at91_pm_enter(suspend_state_t (at91_sys_read(AT91_PMC_PCSR) | (1 << AT91_ID_FIQ) | (1 << AT91_ID_SYS) - | (1 << AT91_ID_IRQ0) - | (1 << AT91_ID_IRQ1) - | (1 << AT91_ID_IRQ2) - | (1 << AT91_ID_IRQ3) - | (1 << AT91_ID_IRQ4) - | (1 << AT91_ID_IRQ5) - | (1 << AT91_ID_IRQ6)) + | (1 << AT91RM9200_ID_IRQ0) + | (1 << AT91RM9200_ID_IRQ1) + | (1 << AT91RM9200_ID_IRQ2) + | (1 << AT91RM9200_ID_IRQ3) + | (1 << AT91RM9200_ID_IRQ4) + | (1 << AT91RM9200_ID_IRQ5) + | (1 << AT91RM9200_ID_IRQ6)) & at91_sys_read(AT91_AIC_IMR), state); diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index f1b7400..e346b03 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig @@ -15,6 +15,12 @@ config MACH_EDB9302 Say 'Y' here if you want your kernel to support the Cirrus Logic EDB9302 Evaluation Board. +config MACH_EDB9312 + bool "Support Cirrus Logic EDB9312" + help + Say 'Y' here if you want your kernel to support the Cirrus + Logic EDB9312 Evaluation Board. + config MACH_EDB9315 bool "Support Cirrus Logic EDB9315" help diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index 1f5a6b0..c2eb18b 100644 --- a/arch/arm/mach-ep93xx/Makefile +++ b/arch/arm/mach-ep93xx/Makefile @@ -7,6 +7,7 @@ obj-n := obj- := obj-$(CONFIG_MACH_EDB9302) += edb9302.o +obj-$(CONFIG_MACH_EDB9312) += edb9312.o obj-$(CONFIG_MACH_EDB9315) += edb9315.o obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o diff --git a/arch/arm/mach-ep93xx/edb9312.c b/arch/arm/mach-ep93xx/edb9312.c new file mode 100644 index 0000000..9e39921 --- /dev/null +++ b/arch/arm/mach-ep93xx/edb9312.c @@ -0,0 +1,63 @@ +/* + * arch/arm/mach-ep93xx/edb9312.c + * Cirrus Logic EDB9312 support. + * + * Copyright (C) 2006 Infosys Technologies Limited + * Toufeeq Hussain + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static struct physmap_flash_data edb9312_flash_data = { + .width = 4, +}; + +static struct resource edb9312_flash_resource = { + .start = 0x60000000, + .end = 0x61ffffff, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device edb9312_flash = { + .name = "physmap-flash", + .id = 0, + .dev = { + .platform_data = &edb9312_flash_data, + }, + .num_resources = 1, + .resource = &edb9312_flash_resource, +}; + +static void __init edb9312_init_machine(void) +{ + ep93xx_init_devices(); + platform_device_register(&edb9312_flash); +} + +MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board") + /* Maintainer: Toufeeq Hussain */ + .phys_io = EP93XX_APB_PHYS_BASE, + .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, + .boot_params = 0x00000100, + .map_io = ep93xx_map_io, + .init_irq = ep93xx_init_irq, + .timer = &ep93xx_timer, + .init_machine = edb9312_init_machine, +MACHINE_END diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index 823e25d..a1ae49d 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c @@ -69,16 +69,16 @@ dc21285_read_config(struct pci_bus *bus, if (addr) switch (size) { case 1: - asm("ldr%?b %0, [%1, %2]" - : "=r" (v) : "r" (addr), "r" (where)); + asm("ldrb %0, [%1, %2]" + : "=r" (v) : "r" (addr), "r" (where) : "cc"); break; case 2: - asm("ldr%?h %0, [%1, %2]" - : "=r" (v) : "r" (addr), "r" (where)); + asm("ldrh %0, [%1, %2]" + : "=r" (v) : "r" (addr), "r" (where) : "cc"); break; case 4: - asm("ldr%? %0, [%1, %2]" - : "=r" (v) : "r" (addr), "r" (where)); + asm("ldr %0, [%1, %2]" + : "=r" (v) : "r" (addr), "r" (where) : "cc"); break; } @@ -103,16 +103,19 @@ dc21285_write_config(struct pci_bus *bus if (addr) switch (size) { case 1: - asm("str%?b %0, [%1, %2]" - : : "r" (value), "r" (addr), "r" (where)); + asm("strb %0, [%1, %2]" + : : "r" (value), "r" (addr), "r" (where) + : "cc"); break; case 2: - asm("str%?h %0, [%1, %2]" - : : "r" (value), "r" (addr), "r" (where)); + asm("strh %0, [%1, %2]" + : : "r" (value), "r" (addr), "r" (where) + : "cc"); break; case 4: - asm("str%? %0, [%1, %2]" - : : "r" (value), "r" (addr), "r" (where)); + asm("str %0, [%1, %2]" + : : "r" (value), "r" (addr), "r" (where) + : "cc"); break; } diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig new file mode 100644 index 0000000..c072d94 --- /dev/null +++ b/arch/arm/mach-iop32x/Kconfig @@ -0,0 +1,35 @@ +if ARCH_IOP32X + +menu "IOP32x Implementation Options" + +comment "IOP32x Platform Types" + +config MACH_GLANTANK + bool "Enable support for the IO-Data GLAN Tank" + help + Say Y here if you want to run your kernel on the GLAN Tank + NAS appliance or machines from IO-Data's HDL-Gxxx, HDL-GWxxx + and HDL-GZxxx series. + +config ARCH_IQ80321 + bool "Enable support for IQ80321" + help + Say Y here if you want to run your kernel on the Intel IQ80321 + evaluation kit for the IOP321 processor. + +config ARCH_IQ31244 + bool "Enable support for EP80219/IQ31244" + help + Say Y here if you want to run your kernel on the Intel EP80219 + evaluation kit for the Intel 80219 processor (a IOP321 variant) + or the IQ31244 evaluation kit for the IOP321 processor. + +config MACH_N2100 + bool "Enable support for the Thecus n2100" + help + Say Y here if you want to run your kernel on the Thecus n2100 + NAS appliance. + +endmenu + +endif diff --git a/arch/arm/mach-iop32x/Makefile b/arch/arm/mach-iop32x/Makefile new file mode 100644 index 0000000..7b05b37 --- /dev/null +++ b/arch/arm/mach-iop32x/Makefile @@ -0,0 +1,13 @@ +# +# Makefile for the linux kernel. +# + +obj-y := irq.o +obj-m := +obj-n := +obj- := + +obj-$(CONFIG_MACH_GLANTANK) += glantank.o +obj-$(CONFIG_ARCH_IQ80321) += iq80321.o +obj-$(CONFIG_ARCH_IQ31244) += iq31244.o +obj-$(CONFIG_MACH_N2100) += n2100.o diff --git a/arch/arm/mach-iop32x/Makefile.boot b/arch/arm/mach-iop32x/Makefile.boot new file mode 100644 index 0000000..47000dc --- /dev/null +++ b/arch/arm/mach-iop32x/Makefile.boot @@ -0,0 +1,3 @@ + zreladdr-y := 0xa0008000 +params_phys-y := 0xa0000100 +initrd_phys-y := 0xa0800000 diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c new file mode 100644 index 0000000..b9b7650 --- /dev/null +++ b/arch/arm/mach-iop32x/glantank.c @@ -0,0 +1,195 @@ +/* + * arch/arm/mach-iop32x/glantank.c + * + * Board support code for the GLAN Tank. + * + * Copyright (C) 2006 Martin Michlmayr + * Copyright (C) 2006 Lennert Buytenhek + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * GLAN Tank timer tick configuration. + */ +static void __init glantank_timer_init(void) +{ + /* 33.333 MHz crystal. */ + iop3xx_init_time(200000000); +} + +static struct sys_timer glantank_timer = { + .init = glantank_timer_init, + .offset = iop3xx_gettimeoffset, +}; + + +/* + * GLAN Tank I/O. + */ +static struct map_desc glantank_io_desc[] __initdata = { + { /* on-board devices */ + .virtual = GLANTANK_UART, + .pfn = __phys_to_pfn(GLANTANK_UART), + .length = 0x00100000, + .type = MT_DEVICE + }, +}; + +void __init glantank_map_io(void) +{ + iop3xx_map_io(); + iotable_init(glantank_io_desc, ARRAY_SIZE(glantank_io_desc)); +} + + +/* + * GLAN Tank PCI. + */ +#define INTA IRQ_IOP32X_XINT0 +#define INTB IRQ_IOP32X_XINT1 +#define INTC IRQ_IOP32X_XINT2 +#define INTD IRQ_IOP32X_XINT3 + +static inline int __init +glantank_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + static int pci_irq_table[][4] = { + /* + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + {INTD, INTD, INTD, INTD}, /* UART (8250) */ + {INTA, INTA, INTA, INTA}, /* Ethernet (E1000) */ + {INTB, INTB, INTB, INTB}, /* IDE (AEC6280R) */ + {INTC, INTC, INTC, INTC}, /* USB (NEC) */ + }; + + BUG_ON(pin < 1 || pin > 4); + + return pci_irq_table[slot % 4][pin - 1]; +} + +static struct hw_pci glantank_pci __initdata = { + .swizzle = pci_std_swizzle, + .nr_controllers = 1, + .setup = iop3xx_pci_setup, + .preinit = iop3xx_pci_preinit, + .scan = iop3xx_pci_scan_bus, + .map_irq = glantank_pci_map_irq, +}; + +static int __init glantank_pci_init(void) +{ + if (machine_is_glantank()) + pci_common_init(&glantank_pci); + + return 0; +} + +subsys_initcall(glantank_pci_init); + + +/* + * GLAN Tank machine initialization. + */ +static struct physmap_flash_data glantank_flash_data = { + .width = 1, +}; + +static struct resource glantank_flash_resource = { + .start = 0xf0000000, + .end = 0xf007ffff, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device glantank_flash_device = { + .name = "physmap-flash", + .id = 0, + .dev = { + .platform_data = &glantank_flash_data, + }, + .num_resources = 1, + .resource = &glantank_flash_resource, +}; + +static struct plat_serial8250_port glantank_serial_port[] = { + { + .mapbase = GLANTANK_UART, + .membase = (char *)GLANTANK_UART, + .irq = IRQ_IOP32X_XINT3, + .flags = UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .regshift = 0, + .uartclk = 1843200, + }, + { }, +}; + +static struct resource glantank_uart_resource = { + .start = GLANTANK_UART, + .end = GLANTANK_UART + 7, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device glantank_serial_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = glantank_serial_port, + }, + .num_resources = 1, + .resource = &glantank_uart_resource, +}; + +static void glantank_power_off(void) +{ + __raw_writeb(0x01, 0xfe8d0004); + + while (1) + ; +} + +static void __init glantank_init_machine(void) +{ + platform_device_register(&iop3xx_i2c0_device); + platform_device_register(&iop3xx_i2c1_device); + platform_device_register(&glantank_flash_device); + platform_device_register(&glantank_serial_device); + + pm_power_off = glantank_power_off; +} + +MACHINE_START(GLANTANK, "GLAN Tank") + /* Maintainer: Lennert Buytenhek */ + .phys_io = GLANTANK_UART, + .io_pg_offst = ((GLANTANK_UART) >> 18) & 0xfffc, + .boot_params = 0xa0000100, + .map_io = glantank_map_io, + .init_irq = iop32x_init_irq, + .timer = &glantank_timer, + .init_machine = glantank_init_machine, +MACHINE_END diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c new file mode 100644 index 0000000..be4aedf --- /dev/null +++ b/arch/arm/mach-iop32x/iq31244.c @@ -0,0 +1,293 @@ +/* + * arch/arm/mach-iop32x/iq31244.c + * + * Board support code for the Intel EP80219 and IQ31244 platforms. + * + * Author: Rory Bolt + * Copyright (C) 2002 Rory Bolt + * Copyright 2003 (c) MontaVista, Software, Inc. + * Copyright (C) 2004 Intel Corp. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* + * The EP80219 and IQ31244 use the same machine ID. To find out + * which of the two we're running on, we look at the processor ID. + */ +static int is_80219(void) +{ + extern int processor_id; + return !!((processor_id & 0xffffffe0) == 0x69052e20); +} + + +/* + * EP80219/IQ31244 timer tick configuration. + */ +static void __init iq31244_timer_init(void) +{ + if (is_80219()) { + /* 33.333 MHz crystal. */ + iop3xx_init_time(200000000); + } else { + /* 33.000 MHz crystal. */ + iop3xx_init_time(198000000); + } +} + +static struct sys_timer iq31244_timer = { + .init = iq31244_timer_init, + .offset = iop3xx_gettimeoffset, +}; + + +/* + * IQ31244 I/O. + */ +static struct map_desc iq31244_io_desc[] __initdata = { + { /* on-board devices */ + .virtual = IQ31244_UART, + .pfn = __phys_to_pfn(IQ31244_UART), + .length = 0x00100000, + .type = MT_DEVICE, + }, +}; + +void __init iq31244_map_io(void) +{ + iop3xx_map_io(); + iotable_init(iq31244_io_desc, ARRAY_SIZE(iq31244_io_desc)); +} + + +/* + * EP80219/IQ31244 PCI. + */ +static inline int __init +ep80219_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + int irq; + + if (slot == 0) { + /* CFlash */ + irq = IRQ_IOP32X_XINT1; + } else if (slot == 1) { + /* 82551 Pro 100 */ + irq = IRQ_IOP32X_XINT0; + } else if (slot == 2) { + /* PCI-X Slot */ + irq = IRQ_IOP32X_XINT3; + } else if (slot == 3) { + /* SATA */ + irq = IRQ_IOP32X_XINT2; + } else { + printk(KERN_ERR "ep80219_pci_map_irq() called for unknown " + "device PCI:%d:%d:%d\n", dev->bus->number, + PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); + irq = -1; + } + + return irq; +} + +static struct hw_pci ep80219_pci __initdata = { + .swizzle = pci_std_swizzle, + .nr_controllers = 1, + .setup = iop3xx_pci_setup, + .preinit = iop3xx_pci_preinit, + .scan = iop3xx_pci_scan_bus, + .map_irq = ep80219_pci_map_irq, +}; + +static inline int __init +iq31244_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + int irq; + + if (slot == 0) { + /* CFlash */ + irq = IRQ_IOP32X_XINT1; + } else if (slot == 1) { + /* SATA */ + irq = IRQ_IOP32X_XINT2; + } else if (slot == 2) { + /* PCI-X Slot */ + irq = IRQ_IOP32X_XINT3; + } else if (slot == 3) { + /* 82546 GigE */ + irq = IRQ_IOP32X_XINT0; + } else { + printk(KERN_ERR "iq31244_pci_map_irq called for unknown " + "device PCI:%d:%d:%d\n", dev->bus->number, + PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); + irq = -1; + } + + return irq; +} + +static struct hw_pci iq31244_pci __initdata = { + .swizzle = pci_std_swizzle, + .nr_controllers = 1, + .setup = iop3xx_pci_setup, + .preinit = iop3xx_pci_preinit, + .scan = iop3xx_pci_scan_bus, + .map_irq = iq31244_pci_map_irq, +}; + +static int __init iq31244_pci_init(void) +{ + if (machine_is_iq31244()) { + if (is_80219()) { + pci_common_init(&ep80219_pci); + } else { + pci_common_init(&iq31244_pci); + } + } + + return 0; +} + +subsys_initcall(iq31244_pci_init); + + +/* + * IQ31244 machine initialisation. + */ +static struct physmap_flash_data iq31244_flash_data = { + .width = 2, +}; + +static struct resource iq31244_flash_resource = { + .start = 0xf0000000, + .end = 0xf07fffff, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device iq31244_flash_device = { + .name = "physmap-flash", + .id = 0, + .dev = { + .platform_data = &iq31244_flash_data, + }, + .num_resources = 1, + .resource = &iq31244_flash_resource, +}; + +static struct plat_serial8250_port iq31244_serial_port[] = { + { + .mapbase = IQ31244_UART, + .membase = (char *)IQ31244_UART, + .irq = IRQ_IOP32X_XINT1, + .flags = UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .regshift = 0, + .uartclk = 1843200, + }, + { }, +}; + +static struct resource iq31244_uart_resource = { + .start = IQ31244_UART, + .end = IQ31244_UART + 7, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device iq31244_serial_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = iq31244_serial_port, + }, + .num_resources = 1, + .resource = &iq31244_uart_resource, +}; + +/* + * This function will send a SHUTDOWN_COMPLETE message to the PIC + * controller over I2C. We are not using the i2c subsystem since + * we are going to power off and it may be removed + */ +void ep80219_power_off(void) +{ + /* + * Send the Address byte w/ the start condition + */ + *IOP3XX_IDBR1 = 0x60; + *IOP3XX_ICR1 = 0xE9; + mdelay(1); + + /* + * Send the START_MSG byte w/ no start or stop condition + */ + *IOP3XX_IDBR1 = 0x0F; + *IOP3XX_ICR1 = 0xE8; + mdelay(1); + + /* + * Send the SHUTDOWN_COMPLETE Message ID byte w/ no start or + * stop condition + */ + *IOP3XX_IDBR1 = 0x03; + *IOP3XX_ICR1 = 0xE8; + mdelay(1); + + /* + * Send an ignored byte w/ stop condition + */ + *IOP3XX_IDBR1 = 0x00; + *IOP3XX_ICR1 = 0xEA; + + while (1) + ; +} + +static void __init iq31244_init_machine(void) +{ + platform_device_register(&iop3xx_i2c0_device); + platform_device_register(&iop3xx_i2c1_device); + platform_device_register(&iq31244_flash_device); + platform_device_register(&iq31244_serial_device); + + if (is_80219()) + pm_power_off = ep80219_power_off; +} + +MACHINE_START(IQ31244, "Intel IQ31244") + /* Maintainer: Intel Corp. */ + .phys_io = IQ31244_UART, + .io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc, + .boot_params = 0xa0000100, + .map_io = iq31244_map_io, + .init_irq = iop32x_init_irq, + .timer = &iq31244_timer, + .init_machine = iq31244_init_machine, +MACHINE_END diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c new file mode 100644 index 0000000..1f37b55 --- /dev/null +++ b/arch/arm/mach-iop32x/iq80321.c @@ -0,0 +1,193 @@ +/* + * arch/arm/mach-iop32x/iq80321.c + * + * Board support code for the Intel IQ80321 platform. + * + * Author: Rory Bolt + * Copyright (C) 2002 Rory Bolt + * Copyright (C) 2004 Intel Corp. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * IQ80321 timer tick configuration. + */ +static void __init iq80321_timer_init(void) +{ + /* 33.333 MHz crystal. */ + iop3xx_init_time(200000000); +} + +static struct sys_timer iq80321_timer = { + .init = iq80321_timer_init, + .offset = iop3xx_gettimeoffset, +}; + + +/* + * IQ80321 I/O. + */ +static struct map_desc iq80321_io_desc[] __initdata = { + { /* on-board devices */ + .virtual = IQ80321_UART, + .pfn = __phys_to_pfn(IQ80321_UART), + .length = 0x00100000, + .type = MT_DEVICE, + }, +}; + +void __init iq80321_map_io(void) +{ + iop3xx_map_io(); + iotable_init(iq80321_io_desc, ARRAY_SIZE(iq80321_io_desc)); +} + + +/* + * IQ80321 PCI. + */ +static inline int __init +iq80321_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + int irq; + + if ((slot == 2 || slot == 6) && pin == 1) { + /* PCI-X Slot INTA */ + irq = IRQ_IOP32X_XINT2; + } else if ((slot == 2 || slot == 6) && pin == 2) { + /* PCI-X Slot INTA */ + irq = IRQ_IOP32X_XINT3; + } else if ((slot == 2 || slot == 6) && pin == 3) { + /* PCI-X Slot INTA */ + irq = IRQ_IOP32X_XINT0; + } else if ((slot == 2 || slot == 6) && pin == 4) { + /* PCI-X Slot INTA */ + irq = IRQ_IOP32X_XINT1; + } else if (slot == 4 || slot == 8) { + /* Gig-E */ + irq = IRQ_IOP32X_XINT0; + } else { + printk(KERN_ERR "iq80321_pci_map_irq() called for unknown " + "device PCI:%d:%d:%d\n", dev->bus->number, + PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); + irq = -1; + } + + return irq; +} + +static struct hw_pci iq80321_pci __initdata = { + .swizzle = pci_std_swizzle, + .nr_controllers = 1, + .setup = iop3xx_pci_setup, + .preinit = iop3xx_pci_preinit, + .scan = iop3xx_pci_scan_bus, + .map_irq = iq80321_pci_map_irq, +}; + +static int __init iq80321_pci_init(void) +{ + if (machine_is_iq80321()) + pci_common_init(&iq80321_pci); + + return 0; +} + +subsys_initcall(iq80321_pci_init); + + +/* + * IQ80321 machine initialisation. + */ +static struct physmap_flash_data iq80321_flash_data = { + .width = 1, +}; + +static struct resource iq80321_flash_resource = { + .start = 0xf0000000, + .end = 0xf07fffff, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device iq80321_flash_device = { + .name = "physmap-flash", + .id = 0, + .dev = { + .platform_data = &iq80321_flash_data, + }, + .num_resources = 1, + .resource = &iq80321_flash_resource, +}; + +static struct plat_serial8250_port iq80321_serial_port[] = { + { + .mapbase = IQ80321_UART, + .membase = (char *)IQ80321_UART, + .irq = IRQ_IOP32X_XINT1, + .flags = UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .regshift = 0, + .uartclk = 1843200, + }, + { }, +}; + +static struct resource iq80321_uart_resource = { + .start = IQ80321_UART, + .end = IQ80321_UART + 7, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device iq80321_serial_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = iq80321_serial_port, + }, + .num_resources = 1, + .resource = &iq80321_uart_resource, +}; + +static void __init iq80321_init_machine(void) +{ + platform_device_register(&iop3xx_i2c0_device); + platform_device_register(&iop3xx_i2c1_device); + platform_device_register(&iq80321_flash_device); + platform_device_register(&iq80321_serial_device); +} + +MACHINE_START(IQ80321, "Intel IQ80321") + /* Maintainer: Intel Corp. */ + .phys_io = IQ80321_UART, + .io_pg_offst = ((IQ80321_UART) >> 18) & 0xfffc, + .boot_params = 0xa0000100, + .map_io = iq80321_map_io, + .init_irq = iop32x_init_irq, + .timer = &iq80321_timer, + .init_machine = iq80321_init_machine, +MACHINE_END diff --git a/arch/arm/mach-iop32x/irq.c b/arch/arm/mach-iop32x/irq.c new file mode 100644 index 0000000..69d6302 --- /dev/null +++ b/arch/arm/mach-iop32x/irq.c @@ -0,0 +1,76 @@ +/* + * arch/arm/mach-iop32x/irq.c + * + * Generic IOP32X IRQ handling functionality + * + * Author: Rory Bolt + * Copyright (C) 2002 Rory Bolt + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include + +static u32 iop32x_mask; + +static inline void intctl_write(u32 val) +{ + iop3xx_cp6_enable(); + asm volatile("mcr p6, 0, %0, c0, c0, 0" : : "r" (val)); + iop3xx_cp6_disable(); +} + +static inline void intstr_write(u32 val) +{ + iop3xx_cp6_enable(); + asm volatile("mcr p6, 0, %0, c4, c0, 0" : : "r" (val)); + iop3xx_cp6_disable(); +} + +static void +iop32x_irq_mask(unsigned int irq) +{ + iop32x_mask &= ~(1 << irq); + intctl_write(iop32x_mask); +} + +static void +iop32x_irq_unmask(unsigned int irq) +{ + iop32x_mask |= 1 << irq; + intctl_write(iop32x_mask); +} + +struct irq_chip ext_chip = { + .name = "IOP32x", + .ack = iop32x_irq_mask, + .mask = iop32x_irq_mask, + .unmask = iop32x_irq_unmask, +}; + +void __init iop32x_init_irq(void) +{ + int i; + + intctl_write(0); + intstr_write(0); + if (machine_is_glantank() || + machine_is_iq80321() || + machine_is_iq31244() || + machine_is_n2100()) + *IOP3XX_PCIIRSR = 0x0f; + + for (i = 0; i < NR_IRQS; i++) { + set_irq_chip(i, &ext_chip); + set_irq_handler(i, do_level_IRQ); + set_irq_flags(i, IRQF_VALID | IRQF_PROBE); + } +} diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c new file mode 100644 index 0000000..a2c94a4 --- /dev/null +++ b/arch/arm/mach-iop32x/n2100.c @@ -0,0 +1,251 @@ +/* + * arch/arm/mach-iop32x/n2100.c + * + * Board support code for the Thecus N2100 platform. + * + * Author: Rory Bolt + * Copyright (C) 2002 Rory Bolt + * Copyright 2003 (c) MontaVista, Software, Inc. + * Copyright (C) 2004 Intel Corp. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * N2100 timer tick configuration. + */ +static void __init n2100_timer_init(void) +{ + /* 33.000 MHz crystal. */ + iop3xx_init_time(198000000); +} + +static struct sys_timer n2100_timer = { + .init = n2100_timer_init, + .offset = iop3xx_gettimeoffset, +}; + + +/* + * N2100 I/O. + */ +static struct map_desc n2100_io_desc[] __initdata = { + { /* on-board devices */ + .virtual = N2100_UART, + .pfn = __phys_to_pfn(N2100_UART), + .length = 0x00100000, + .type = MT_DEVICE + }, +}; + +void __init n2100_map_io(void) +{ + iop3xx_map_io(); + iotable_init(n2100_io_desc, ARRAY_SIZE(n2100_io_desc)); +} + + +/* + * N2100 PCI. + */ +static inline int __init +n2100_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + int irq; + + if (PCI_SLOT(dev->devfn) == 1) { + /* RTL8110SB #1 */ + irq = IRQ_IOP32X_XINT0; + } else if (PCI_SLOT(dev->devfn) == 2) { + /* RTL8110SB #2 */ + irq = IRQ_IOP32X_XINT1; + } else if (PCI_SLOT(dev->devfn) == 3) { + /* Sil3512 */ + irq = IRQ_IOP32X_XINT2; + } else if (PCI_SLOT(dev->devfn) == 4 && pin == 1) { + /* VT6212 INTA */ + irq = IRQ_IOP32X_XINT1; + } else if (PCI_SLOT(dev->devfn) == 4 && pin == 2) { + /* VT6212 INTB */ + irq = IRQ_IOP32X_XINT0; + } else if (PCI_SLOT(dev->devfn) == 4 && pin == 3) { + /* VT6212 INTC */ + irq = IRQ_IOP32X_XINT2; + } else if (PCI_SLOT(dev->devfn) == 5) { + /* Mini-PCI slot */ + irq = IRQ_IOP32X_XINT3; + } else { + printk(KERN_ERR "n2100_pci_map_irq() called for unknown " + "device PCI:%d:%d:%d\n", dev->bus->number, + PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); + irq = -1; + } + + return irq; +} + +static struct hw_pci n2100_pci __initdata = { + .swizzle = pci_std_swizzle, + .nr_controllers = 1, + .setup = iop3xx_pci_setup, + .preinit = iop3xx_pci_preinit, + .scan = iop3xx_pci_scan_bus, + .map_irq = n2100_pci_map_irq, +}; + +static int __init n2100_pci_init(void) +{ + if (machine_is_n2100()) + pci_common_init(&n2100_pci); + + return 0; +} + +subsys_initcall(n2100_pci_init); + + +/* + * N2100 machine initialisation. + */ +static struct physmap_flash_data n2100_flash_data = { + .width = 2, +}; + +static struct resource n2100_flash_resource = { + .start = 0xf0000000, + .end = 0xf0ffffff, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device n2100_flash_device = { + .name = "physmap-flash", + .id = 0, + .dev = { + .platform_data = &n2100_flash_data, + }, + .num_resources = 1, + .resource = &n2100_flash_resource, +}; + + +static struct plat_serial8250_port n2100_serial_port[] = { + { + .mapbase = N2100_UART, + .membase = (char *)N2100_UART, + .irq = 0, + .flags = UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .regshift = 0, + .uartclk = 1843200, + }, + { }, +}; + +static struct resource n2100_uart_resource = { + .start = N2100_UART, + .end = N2100_UART + 7, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device n2100_serial_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = n2100_serial_port, + }, + .num_resources = 1, + .resource = &n2100_uart_resource, +}; + + +/* + * Pull PCA9532 GPIO #8 low to power off the machine. + */ +static void n2100_power_off(void) +{ + local_irq_disable(); + + /* Start condition, I2C address of PCA9532, write transaction. */ + *IOP3XX_IDBR0 = 0xc0; + *IOP3XX_ICR0 = 0xe9; + mdelay(1); + + /* Write address 0x08. */ + *IOP3XX_IDBR0 = 0x08; + *IOP3XX_ICR0 = 0xe8; + mdelay(1); + + /* Write data 0x01, stop condition. */ + *IOP3XX_IDBR0 = 0x01; + *IOP3XX_ICR0 = 0xea; + + while (1) + ; +} + + +static struct timer_list power_button_poll_timer; + +static void power_button_poll(unsigned long dummy) +{ + if (gpio_line_get(N2100_POWER_BUTTON) == 0) { + ctrl_alt_del(); + return; + } + + power_button_poll_timer.expires = jiffies + (HZ / 10); + add_timer(&power_button_poll_timer); +} + + +static void __init n2100_init_machine(void) +{ + platform_device_register(&iop3xx_i2c0_device); + platform_device_register(&n2100_flash_device); + platform_device_register(&n2100_serial_device); + + pm_power_off = n2100_power_off; + + init_timer(&power_button_poll_timer); + power_button_poll_timer.function = power_button_poll; + power_button_poll_timer.expires = jiffies + (HZ / 10); + add_timer(&power_button_poll_timer); +} + +MACHINE_START(N2100, "Thecus N2100") + /* Maintainer: Lennert Buytenhek */ + .phys_io = N2100_UART, + .io_pg_offst = ((N2100_UART) >> 18) & 0xfffc, + .boot_params = 0xa0000100, + .map_io = n2100_map_io, + .init_irq = iop32x_init_irq, + .timer = &n2100_timer, + .init_machine = n2100_init_machine, +MACHINE_END diff --git a/arch/arm/mach-iop33x/Kconfig b/arch/arm/mach-iop33x/Kconfig new file mode 100644 index 0000000..9aa016b --- /dev/null +++ b/arch/arm/mach-iop33x/Kconfig @@ -0,0 +1,21 @@ +if ARCH_IOP33X + +menu "IOP33x Implementation Options" + +comment "IOP33x Platform Types" + +config ARCH_IQ80331 + bool "Enable support for IQ80331" + help + Say Y here if you want to run your kernel on the Intel IQ80331 + evaluation kit for the IOP331 chipset. + +config MACH_IQ80332 + bool "Enable support for IQ80332" + help + Say Y here if you want to run your kernel on the Intel IQ80332 + evaluation kit for the IOP332 chipset. + +endmenu + +endif diff --git a/arch/arm/mach-iop33x/Makefile b/arch/arm/mach-iop33x/Makefile new file mode 100644 index 0000000..90081d8 --- /dev/null +++ b/arch/arm/mach-iop33x/Makefile @@ -0,0 +1,11 @@ +# +# Makefile for the linux kernel. +# + +obj-y := irq.o uart.o +obj-m := +obj-n := +obj- := + +obj-$(CONFIG_ARCH_IQ80331) += iq80331.o +obj-$(CONFIG_MACH_IQ80332) += iq80332.o diff --git a/arch/arm/mach-iop33x/Makefile.boot b/arch/arm/mach-iop33x/Makefile.boot new file mode 100644 index 0000000..67039c3 --- /dev/null +++ b/arch/arm/mach-iop33x/Makefile.boot @@ -0,0 +1,3 @@ + zreladdr-y := 0x00008000 +params_phys-y := 0x00000100 +initrd_phys-y := 0x00800000 diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c new file mode 100644 index 0000000..97a7b74 --- /dev/null +++ b/arch/arm/mach-iop33x/iq80331.c @@ -0,0 +1,148 @@ +/* + * arch/arm/mach-iop33x/iq80331.c + * + * Board support code for the Intel IQ80331 platform. + * + * Author: Dave Jiang + * Copyright (C) 2003 Intel Corp. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * IQ80331 timer tick configuration. + */ +static void __init iq80331_timer_init(void) +{ + /* D-Step parts run at a higher internal bus frequency */ + if (*IOP3XX_ATURID >= 0xa) + iop3xx_init_time(333000000); + else + iop3xx_init_time(266000000); +} + +static struct sys_timer iq80331_timer = { + .init = iq80331_timer_init, + .offset = iop3xx_gettimeoffset, +}; + + +/* + * IQ80331 PCI. + */ +static inline int __init +iq80331_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + int irq; + + if (slot == 1 && pin == 1) { + /* PCI-X Slot INTA */ + irq = IRQ_IOP33X_XINT1; + } else if (slot == 1 && pin == 2) { + /* PCI-X Slot INTB */ + irq = IRQ_IOP33X_XINT2; + } else if (slot == 1 && pin == 3) { + /* PCI-X Slot INTC */ + irq = IRQ_IOP33X_XINT3; + } else if (slot == 1 && pin == 4) { + /* PCI-X Slot INTD */ + irq = IRQ_IOP33X_XINT0; + } else if (slot == 2) { + /* GigE */ + irq = IRQ_IOP33X_XINT2; + } else { + printk(KERN_ERR "iq80331_pci_map_irq() called for unknown " + "device PCI:%d:%d:%d\n", dev->bus->number, + PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); + irq = -1; + } + + return irq; +} + +static struct hw_pci iq80331_pci __initdata = { + .swizzle = pci_std_swizzle, + .nr_controllers = 1, + .setup = iop3xx_pci_setup, + .preinit = iop3xx_pci_preinit, + .scan = iop3xx_pci_scan_bus, + .map_irq = iq80331_pci_map_irq, +}; + +static int __init iq80331_pci_init(void) +{ + if (machine_is_iq80331()) + pci_common_init(&iq80331_pci); + + return 0; +} + +subsys_initcall(iq80331_pci_init); + + +/* + * IQ80331 machine initialisation. + */ +static struct physmap_flash_data iq80331_flash_data = { + .width = 1, +}; + +static struct resource iq80331_flash_resource = { + .start = 0xc0000000, + .end = 0xc07fffff, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device iq80331_flash_device = { + .name = "physmap-flash", + .id = 0, + .dev = { + .platform_data = &iq80331_flash_data, + }, + .num_resources = 1, + .resource = &iq80331_flash_resource, +}; + +static void __init iq80331_init_machine(void) +{ + platform_device_register(&iop3xx_i2c0_device); + platform_device_register(&iop3xx_i2c1_device); + platform_device_register(&iop33x_uart0_device); + platform_device_register(&iop33x_uart1_device); + platform_device_register(&iq80331_flash_device); +} + +MACHINE_START(IQ80331, "Intel IQ80331") + /* Maintainer: Intel Corp. */ + .phys_io = 0xfefff000, + .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, + .boot_params = 0x00000100, + .map_io = iop3xx_map_io, + .init_irq = iop33x_init_irq, + .timer = &iq80331_timer, + .init_machine = iq80331_init_machine, +MACHINE_END diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c new file mode 100644 index 0000000..9887bfc --- /dev/null +++ b/arch/arm/mach-iop33x/iq80332.c @@ -0,0 +1,148 @@ +/* + * arch/arm/mach-iop33x/iq80332.c + * + * Board support code for the Intel IQ80332 platform. + * + * Author: Dave Jiang + * Copyright (C) 2004 Intel Corp. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * IQ80332 timer tick configuration. + */ +static void __init iq80332_timer_init(void) +{ + /* D-Step parts and the iop333 run at a higher internal bus frequency */ + if (*IOP3XX_ATURID >= 0xa || *IOP3XX_ATUDID == 0x374) + iop3xx_init_time(333000000); + else + iop3xx_init_time(266000000); +} + +static struct sys_timer iq80332_timer = { + .init = iq80332_timer_init, + .offset = iop3xx_gettimeoffset, +}; + + +/* + * IQ80332 PCI. + */ +static inline int __init +iq80332_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + int irq; + + if (slot == 4 && pin == 1) { + /* PCI-X Slot INTA */ + irq = IRQ_IOP33X_XINT0; + } else if (slot == 4 && pin == 2) { + /* PCI-X Slot INTB */ + irq = IRQ_IOP33X_XINT1; + } else if (slot == 4 && pin == 3) { + /* PCI-X Slot INTC */ + irq = IRQ_IOP33X_XINT2; + } else if (slot == 4 && pin == 4) { + /* PCI-X Slot INTD */ + irq = IRQ_IOP33X_XINT3; + } else if (slot == 6) { + /* GigE */ + irq = IRQ_IOP33X_XINT2; + } else { + printk(KERN_ERR "iq80332_pci_map_irq() called for unknown " + "device PCI:%d:%d:%d\n", dev->bus->number, + PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); + irq = -1; + } + + return irq; +} + +static struct hw_pci iq80332_pci __initdata = { + .swizzle = pci_std_swizzle, + .nr_controllers = 1, + .setup = iop3xx_pci_setup, + .preinit = iop3xx_pci_preinit, + .scan = iop3xx_pci_scan_bus, + .map_irq = iq80332_pci_map_irq, +}; + +static int __init iq80332_pci_init(void) +{ + if (machine_is_iq80332()) + pci_common_init(&iq80332_pci); + + return 0; +} + +subsys_initcall(iq80332_pci_init); + + +/* + * IQ80332 machine initialisation. + */ +static struct physmap_flash_data iq80332_flash_data = { + .width = 1, +}; + +static struct resource iq80332_flash_resource = { + .start = 0xc0000000, + .end = 0xc07fffff, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device iq80332_flash_device = { + .name = "physmap-flash", + .id = 0, + .dev = { + .platform_data = &iq80332_flash_data, + }, + .num_resources = 1, + .resource = &iq80332_flash_resource, +}; + +static void __init iq80332_init_machine(void) +{ + platform_device_register(&iop3xx_i2c0_device); + platform_device_register(&iop3xx_i2c1_device); + platform_device_register(&iop33x_uart0_device); + platform_device_register(&iop33x_uart1_device); + platform_device_register(&iq80332_flash_device); +} + +MACHINE_START(IQ80332, "Intel IQ80332") + /* Maintainer: Intel Corp. */ + .phys_io = 0xfefff000, + .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, + .boot_params = 0x00000100, + .map_io = iop3xx_map_io, + .init_irq = iop33x_init_irq, + .timer = &iq80332_timer, + .init_machine = iq80332_init_machine, +MACHINE_END diff --git a/arch/arm/mach-iop33x/irq.c b/arch/arm/mach-iop33x/irq.c new file mode 100644 index 0000000..63304b3 --- /dev/null +++ b/arch/arm/mach-iop33x/irq.c @@ -0,0 +1,127 @@ +/* + * arch/arm/mach-iop33x/irq.c + * + * Generic IOP331 IRQ handling functionality + * + * Author: Dave Jiang + * Copyright (C) 2003 Intel Corp. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include + +static u32 iop33x_mask0; +static u32 iop33x_mask1; + +static inline void intctl0_write(u32 val) +{ + iop3xx_cp6_enable(); + asm volatile("mcr p6, 0, %0, c0, c0, 0" : : "r" (val)); + iop3xx_cp6_disable(); +} + +static inline void intctl1_write(u32 val) +{ + iop3xx_cp6_enable(); + asm volatile("mcr p6, 0, %0, c1, c0, 0" : : "r" (val)); + iop3xx_cp6_disable(); +} + +static inline void intstr0_write(u32 val) +{ + iop3xx_cp6_enable(); + asm volatile("mcr p6, 0, %0, c2, c0, 0" : : "r" (val)); + iop3xx_cp6_disable(); +} + +static inline void intstr1_write(u32 val) +{ + iop3xx_cp6_enable(); + asm volatile("mcr p6, 0, %0, c3, c0, 0" : : "r" (val)); + iop3xx_cp6_disable(); +} + +static inline void intbase_write(u32 val) +{ + iop3xx_cp6_enable(); + asm volatile("mcr p6, 0, %0, c12, c0, 0" : : "r" (val)); + iop3xx_cp6_disable(); +} + +static inline void intsize_write(u32 val) +{ + iop3xx_cp6_enable(); + asm volatile("mcr p6, 0, %0, c13, c0, 0" : : "r" (val)); + iop3xx_cp6_disable(); +} + +static void +iop33x_irq_mask1 (unsigned int irq) +{ + iop33x_mask0 &= ~(1 << irq); + intctl0_write(iop33x_mask0); +} + +static void +iop33x_irq_mask2 (unsigned int irq) +{ + iop33x_mask1 &= ~(1 << (irq - 32)); + intctl1_write(iop33x_mask1); +} + +static void +iop33x_irq_unmask1(unsigned int irq) +{ + iop33x_mask0 |= 1 << irq; + intctl0_write(iop33x_mask0); +} + +static void +iop33x_irq_unmask2(unsigned int irq) +{ + iop33x_mask1 |= (1 << (irq - 32)); + intctl1_write(iop33x_mask1); +} + +struct irq_chip iop33x_irqchip1 = { + .name = "IOP33x-1", + .ack = iop33x_irq_mask1, + .mask = iop33x_irq_mask1, + .unmask = iop33x_irq_unmask1, +}; + +struct irq_chip iop33x_irqchip2 = { + .name = "IOP33x-2", + .ack = iop33x_irq_mask2, + .mask = iop33x_irq_mask2, + .unmask = iop33x_irq_unmask2, +}; + +void __init iop33x_init_irq(void) +{ + int i; + + intctl0_write(0); + intctl1_write(0); + intstr0_write(0); + intstr1_write(0); + intbase_write(0); + intsize_write(1); + if (machine_is_iq80331()) + *IOP3XX_PCIIRSR = 0x0f; + + for (i = 0; i < NR_IRQS; i++) { + set_irq_chip(i, (i < 32) ? &iop33x_irqchip1 : &iop33x_irqchip2); + set_irq_handler(i, do_level_IRQ); + set_irq_flags(i, IRQF_VALID | IRQF_PROBE); + } +} diff --git a/arch/arm/mach-iop33x/uart.c b/arch/arm/mach-iop33x/uart.c new file mode 100644 index 0000000..ac297cd --- /dev/null +++ b/arch/arm/mach-iop33x/uart.c @@ -0,0 +1,105 @@ +/* + * arch/arm/mach-iop33x/uart.c + * + * Author: Dave Jiang (dave.jiang@intel.com) + * Copyright (C) 2004 Intel Corporation. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define IOP33X_UART_XTAL 33334000 + +static struct plat_serial8250_port iop33x_uart0_data[] = { + { + .membase = (char *)IOP33X_UART0_VIRT, + .mapbase = IOP33X_UART0_PHYS, + .irq = IRQ_IOP33X_UART0, + .uartclk = IOP33X_UART_XTAL, + .regshift = 2, + .iotype = UPIO_MEM, + .flags = UPF_SKIP_TEST, + }, + { }, +}; + +static struct resource iop33x_uart0_resources[] = { + [0] = { + .start = IOP33X_UART0_PHYS, + .end = IOP33X_UART0_PHYS + 0x3f, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_IOP33X_UART0, + .end = IRQ_IOP33X_UART0, + .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device iop33x_uart0_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = iop33x_uart0_data, + }, + .num_resources = 2, + .resource = iop33x_uart0_resources, +}; + + +static struct resource iop33x_uart1_resources[] = { + [0] = { + .start = IOP33X_UART1_PHYS, + .end = IOP33X_UART1_PHYS + 0x3f, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_IOP33X_UART1, + .end = IRQ_IOP33X_UART1, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct plat_serial8250_port iop33x_uart1_data[] = { + { + .membase = (char *)IOP33X_UART1_VIRT, + .mapbase = IOP33X_UART1_PHYS, + .irq = IRQ_IOP33X_UART1, + .uartclk = IOP33X_UART_XTAL, + .regshift = 2, + .iotype = UPIO_MEM, + .flags = UPF_SKIP_TEST, + }, + { }, +}; + +struct platform_device iop33x_uart1_device = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM1, + .dev = { + .platform_data = iop33x_uart1_data, + }, + .num_resources = 2, + .resource = iop33x_uart1_resources, +}; diff --git a/arch/arm/mach-iop3xx/Kconfig b/arch/arm/mach-iop3xx/Kconfig deleted file mode 100644 index 4422f23..0000000 --- a/arch/arm/mach-iop3xx/Kconfig +++ /dev/null @@ -1,66 +0,0 @@ -if ARCH_IOP3XX - -menu "IOP3xx Implementation Options" - -comment "IOP3xx Platform Types" - -config ARCH_IQ80321 - bool "Enable support for IQ80321" - select ARCH_IOP321 - help - Say Y here if you want to run your kernel on the Intel IQ80321 - evaluation kit for the IOP321 chipset. - -config ARCH_IQ31244 - bool "Enable support for IQ31244" - select ARCH_IOP321 - help - Say Y here if you want to run your kernel on the Intel IQ31244 - evaluation kit for the IOP321 chipset. - -config ARCH_IQ80331 - bool "Enable support for IQ80331" - select ARCH_IOP331 - help - Say Y here if you want to run your kernel on the Intel IQ80331 - evaluation kit for the IOP331 chipset. - -config MACH_IQ80332 - bool "Enable support for IQ80332" - select ARCH_IOP331 - help - Say Y here if you want to run your kernel on the Intel IQ80332 - evaluation kit for the IOP332 chipset. - -config ARCH_EP80219 - bool "Enable support for EP80219" - select ARCH_IOP321 - select ARCH_IQ31244 - help - Say Y here if you want to run your kernel on the Intel EP80219 - evaluation kit for the Intel 80219 chipset (a IOP321 variant). - -# Which IOP variant are we running? -config ARCH_IOP321 - bool - help - The IQ80321 uses the IOP321 variant. - The IQ31244 and EP80219 uses the IOP321 variant. - -config ARCH_IOP331 - bool - default ARCH_IQ80331 - help - The IQ80331, IQ80332, and IQ80333 uses the IOP331 variant. - -comment "IOP3xx Chipset Features" - -config IOP331_STEPD - bool "Chip stepping D of the IOP80331 processor or IOP80333" - depends on (ARCH_IOP331) - help - Say Y here if you have StepD of the IOP80331 or IOP8033 - based platforms. - -endmenu -endif diff --git a/arch/arm/mach-iop3xx/Makefile b/arch/arm/mach-iop3xx/Makefile deleted file mode 100644 index b17eb1f..0000000 --- a/arch/arm/mach-iop3xx/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# -# Makefile for the linux kernel. -# - -# Object file lists. - -obj-y := common.o - -obj-m := -obj-n := -obj- := - -obj-$(CONFIG_ARCH_IOP321) += iop321-setup.o iop321-irq.o iop321-pci.o iop321-time.o - -obj-$(CONFIG_ARCH_IOP331) += iop331-setup.o iop331-irq.o iop331-pci.o iop331-time.o - -obj-$(CONFIG_ARCH_IQ80321) += iq80321-mm.o iq80321-pci.o - -obj-$(CONFIG_ARCH_IQ31244) += iq31244-mm.o iq31244-pci.o - -obj-$(CONFIG_ARCH_IQ80331) += iq80331-mm.o iq80331-pci.o - -obj-$(CONFIG_MACH_IQ80332) += iq80332-mm.o iq80332-pci.o diff --git a/arch/arm/mach-iop3xx/Makefile.boot b/arch/arm/mach-iop3xx/Makefile.boot deleted file mode 100644 index 6387aa2..0000000 --- a/arch/arm/mach-iop3xx/Makefile.boot +++ /dev/null @@ -1,9 +0,0 @@ - zreladdr-y := 0xa0008000 -params_phys-y := 0xa0000100 -initrd_phys-y := 0xa0800000 -ifeq ($(CONFIG_ARCH_IOP331),y) - zreladdr-y := 0x00008000 -params_phys-y := 0x00000100 -initrd_phys-y := 0x00800000 -endif - diff --git a/arch/arm/mach-iop3xx/common.c b/arch/arm/mach-iop3xx/common.c deleted file mode 100644 index d7f50e5..0000000 --- a/arch/arm/mach-iop3xx/common.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * arch/arm/mach-iop3xx/common.c - * - * Common routines shared across all IOP3xx implementations - * - * Author: Deepak Saxena - * - * Copyright 2003 (c) MontaVista, Software, Inc. - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include - -/* - * Shared variables - */ -unsigned long iop3xx_pcibios_min_io = 0; -unsigned long iop3xx_pcibios_min_mem = 0; - -#ifdef CONFIG_ARCH_EP80219 -#include -/* - * Default power-off for EP80219 - */ - -static inline void ep80219_send_to_pic(__u8 c) { -} - -void ep80219_power_off(void) -{ - /* - * This function will send a SHUTDOWN_COMPLETE message to the PIC controller - * over I2C. We are not using the i2c subsystem since we are going to power - * off and it may be removed - */ - - /* Send the Address byte w/ the start condition */ - *IOP321_IDBR1 = 0x60; - *IOP321_ICR1 = 0xE9; - mdelay(1); - - /* Send the START_MSG byte w/ no start or stop condition */ - *IOP321_IDBR1 = 0x0F; - *IOP321_ICR1 = 0xE8; - mdelay(1); - - /* Send the SHUTDOWN_COMPLETE Message ID byte w/ no start or stop condition */ - *IOP321_IDBR1 = 0x03; - *IOP321_ICR1 = 0xE8; - mdelay(1); - - /* Send an ignored byte w/ stop condition */ - *IOP321_IDBR1 = 0x00; - *IOP321_ICR1 = 0xEA; - - while (1) ; -} - -#include -#include - -static int __init ep80219_init(void) -{ - pm_power_off = ep80219_power_off; - return 0; -} -arch_initcall(ep80219_init); -#endif diff --git a/arch/arm/mach-iop3xx/iop321-irq.c b/arch/arm/mach-iop3xx/iop321-irq.c deleted file mode 100644 index 88ac333..0000000 --- a/arch/arm/mach-iop3xx/iop321-irq.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * linux/arch/arm/mach-iop3xx/iop321-irq.c - * - * Generic IOP321 IRQ handling functionality - * - * Author: Rory Bolt - * Copyright (C) 2002 Rory Bolt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Added IOP3XX chipset and IQ80321 board masking code. - * - */ -#include -#include -#include - -#include -#include -#include - -#include - -static u32 iop321_mask /* = 0 */; - -static inline void intctl_write(u32 val) -{ - asm volatile("mcr p6,0,%0,c0,c0,0"::"r" (val)); -} - -static inline void intstr_write(u32 val) -{ - asm volatile("mcr p6,0,%0,c4,c0,0"::"r" (val)); -} - -static void -iop321_irq_mask (unsigned int irq) -{ - - iop321_mask &= ~(1 << (irq - IOP321_IRQ_OFS)); - - intctl_write(iop321_mask); -} - -static void -iop321_irq_unmask (unsigned int irq) -{ - iop321_mask |= (1 << (irq - IOP321_IRQ_OFS)); - - intctl_write(iop321_mask); -} - -struct irq_chip ext_chip = { - .name = "IOP", - .ack = iop321_irq_mask, - .mask = iop321_irq_mask, - .unmask = iop321_irq_unmask, -}; - -void __init iop321_init_irq(void) -{ - unsigned int i, tmp; - - /* Enable access to coprocessor 6 for dealing with IRQs. - * From RMK: - * Basically, the Intel documentation here is poor. It appears that - * you need to set the bit to be able to access the coprocessor from - * SVC mode. Whether that allows access from user space or not is - * unclear. - */ - asm volatile ( - "mrc p15, 0, %0, c15, c1, 0\n\t" - "orr %0, %0, %1\n\t" - "mcr p15, 0, %0, c15, c1, 0\n\t" - /* The action is delayed, so we have to do this: */ - "mrc p15, 0, %0, c15, c1, 0\n\t" - "mov %0, %0\n\t" - "sub pc, pc, #4" - : "=r" (tmp) : "i" (1 << 6) ); - - intctl_write(0); // disable all interrupts - intstr_write(0); // treat all as IRQ - if(machine_is_iq80321() || - machine_is_iq31244()) // all interrupts are inputs to chip - *IOP321_PCIIRSR = 0x0f; - - for(i = IOP321_IRQ_OFS; i < NR_IOP321_IRQS; i++) - { - set_irq_chip(i, &ext_chip); - set_irq_handler(i, do_level_IRQ); - set_irq_flags(i, IRQF_VALID | IRQF_PROBE); - - } -} - diff --git a/arch/arm/mach-iop3xx/iop321-pci.c b/arch/arm/mach-iop3xx/iop321-pci.c deleted file mode 100644 index 8ba6a0e..0000000 --- a/arch/arm/mach-iop3xx/iop321-pci.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - * arch/arm/mach-iop3xx/iop321-pci.c - * - * PCI support for the Intel IOP321 chipset - * - * Author: Rory Bolt - * Copyright (C) 2002 Rory Bolt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -// #define DEBUG - -#ifdef DEBUG -#define DBG(x...) printk(x) -#else -#define DBG(x...) do { } while (0) -#endif - -/* - * This routine builds either a type0 or type1 configuration command. If the - * bus is on the 80321 then a type0 made, else a type1 is created. - */ -static u32 iop321_cfg_address(struct pci_bus *bus, int devfn, int where) -{ - struct pci_sys_data *sys = bus->sysdata; - u32 addr; - - if (sys->busnr == bus->number) - addr = 1 << (PCI_SLOT(devfn) + 16) | (PCI_SLOT(devfn) << 11); - else - addr = bus->number << 16 | PCI_SLOT(devfn) << 11 | 1; - - addr |= PCI_FUNC(devfn) << 8 | (where & ~3); - - return addr; -} - -/* - * This routine checks the status of the last configuration cycle. If an error - * was detected it returns a 1, else it returns a 0. The errors being checked - * are parity, master abort, target abort (master and target). These types of - * errors occure during a config cycle where there is no device, like during - * the discovery stage. - */ -static int iop321_pci_status(void) -{ - unsigned int status; - int ret = 0; - - /* - * Check the status registers. - */ - status = *IOP321_ATUSR; - if (status & 0xf900) - { - DBG("\t\t\tPCI: P0 - status = 0x%08x\n", status); - *IOP321_ATUSR = status & 0xf900; - ret = 1; - } - status = *IOP321_ATUISR; - if (status & 0x679f) - { - DBG("\t\t\tPCI: P1 - status = 0x%08x\n", status); - *IOP321_ATUISR = status & 0x679f; - ret = 1; - } - return ret; -} - -/* - * Simply write the address register and read the configuration - * data. Note that the 4 nop's ensure that we are able to handle - * a delayed abort (in theory.) - */ -static inline u32 iop321_read(unsigned long addr) -{ - u32 val; - - __asm__ __volatile__( - "str %1, [%2]\n\t" - "ldr %0, [%3]\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - : "=r" (val) - : "r" (addr), "r" (IOP321_OCCAR), "r" (IOP321_OCCDR)); - - return val; -} - -/* - * The read routines must check the error status of the last configuration - * cycle. If there was an error, the routine returns all hex f's. - */ -static int -iop321_read_config(struct pci_bus *bus, unsigned int devfn, int where, - int size, u32 *value) -{ - unsigned long addr = iop321_cfg_address(bus, devfn, where); - u32 val = iop321_read(addr) >> ((where & 3) * 8); - - if( iop321_pci_status() ) - val = 0xffffffff; - - *value = val; - - return PCIBIOS_SUCCESSFUL; -} - -static int -iop321_write_config(struct pci_bus *bus, unsigned int devfn, int where, - int size, u32 value) -{ - unsigned long addr = iop321_cfg_address(bus, devfn, where); - u32 val; - - if (size != 4) { - val = iop321_read(addr); - if (!iop321_pci_status() == 0) - return PCIBIOS_SUCCESSFUL; - - where = (where & 3) * 8; - - if (size == 1) - val &= ~(0xff << where); - else - val &= ~(0xffff << where); - - *IOP321_OCCDR = val | value << where; - } else { - asm volatile( - "str %1, [%2]\n\t" - "str %0, [%3]\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - : - : "r" (value), "r" (addr), - "r" (IOP321_OCCAR), "r" (IOP321_OCCDR)); - } - - return PCIBIOS_SUCCESSFUL; -} - -static struct pci_ops iop321_ops = { - .read = iop321_read_config, - .write = iop321_write_config, -}; - -/* - * When a PCI device does not exist during config cycles, the 80200 gets a - * bus error instead of returning 0xffffffff. This handler simply returns. - */ -int -iop321_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) -{ - DBG("PCI abort: address = 0x%08lx fsr = 0x%03x PC = 0x%08lx LR = 0x%08lx\n", - addr, fsr, regs->ARM_pc, regs->ARM_lr); - - /* - * If it was an imprecise abort, then we need to correct the - * return address to be _after_ the instruction. - */ - if (fsr & (1 << 10)) - regs->ARM_pc += 4; - - return 0; -} - -/* - * Scan an IOP321 PCI bus. sys->bus defines which bus we scan. - */ -struct pci_bus *iop321_scan_bus(int nr, struct pci_sys_data *sys) -{ - return pci_scan_bus(sys->busnr, &iop321_ops, sys); -} - -void iop321_init(void) -{ - DBG("PCI: Intel 80321 PCI init code.\n"); - DBG("ATU: IOP321_ATUCMD=0x%04x\n", *IOP321_ATUCMD); - DBG("ATU: IOP321_OMWTVR0=0x%04x, IOP321_OIOWTVR=0x%04x\n", - *IOP321_OMWTVR0, - *IOP321_OIOWTVR); - DBG("ATU: IOP321_ATUCR=0x%08x\n", *IOP321_ATUCR); - DBG("ATU: IOP321_IABAR0=0x%08x IOP321_IALR0=0x%08x IOP321_IATVR0=%08x\n", - *IOP321_IABAR0, *IOP321_IALR0, *IOP321_IATVR0); - DBG("ATU: IOP321_OMWTVR0=0x%08x\n", *IOP321_OMWTVR0); - DBG("ATU: IOP321_IABAR1=0x%08x IOP321_IALR1=0x%08x\n", - *IOP321_IABAR1, *IOP321_IALR1); - DBG("ATU: IOP321_ERBAR=0x%08x IOP321_ERLR=0x%08x IOP321_ERTVR=%08x\n", - *IOP321_ERBAR, *IOP321_ERLR, *IOP321_ERTVR); - DBG("ATU: IOP321_IABAR2=0x%08x IOP321_IALR2=0x%08x IOP321_IATVR2=%08x\n", - *IOP321_IABAR2, *IOP321_IALR2, *IOP321_IATVR2); - DBG("ATU: IOP321_IABAR3=0x%08x IOP321_IALR3=0x%08x IOP321_IATVR3=%08x\n", - *IOP321_IABAR3, *IOP321_IALR3, *IOP321_IATVR3); - - hook_fault_code(16+6, iop321_pci_abort, SIGBUS, "imprecise external abort"); -} - diff --git a/arch/arm/mach-iop3xx/iop321-setup.c b/arch/arm/mach-iop3xx/iop321-setup.c deleted file mode 100644 index b6d0969..0000000 --- a/arch/arm/mach-iop3xx/iop321-setup.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * linux/arch/arm/mach-iop3xx/iop321-setup.c - * - * Author: Nicolas Pitre - * Copyright (C) 2001 MontaVista Software, Inc. - * Copyright (C) 2004 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define IOP321_UART_XTAL 1843200 - -/* - * Standard IO mapping for all IOP321 based systems - */ -static struct map_desc iop321_std_desc[] __initdata = { - { /* mem mapped registers */ - .virtual = IOP321_VIRT_MEM_BASE, - .pfn = __phys_to_pfn(IOP321_PHYS_MEM_BASE), - .length = 0x00002000, - .type = MT_DEVICE - }, { /* PCI IO space */ - .virtual = IOP321_PCI_LOWER_IO_VA, - .pfn = __phys_to_pfn(IOP321_PCI_LOWER_IO_PA), - .length = IOP321_PCI_IO_WINDOW_SIZE, - .type = MT_DEVICE - } -}; - -#ifdef CONFIG_ARCH_IQ80321 -#define UARTBASE IQ80321_UART -#define IRQ_UART IRQ_IQ80321_UART -#endif - -#ifdef CONFIG_ARCH_IQ31244 -#define UARTBASE IQ31244_UART -#define IRQ_UART IRQ_IQ31244_UART -#endif - -static struct uart_port iop321_serial_ports[] = { - { - .membase = (char*)(UARTBASE), - .mapbase = (UARTBASE), - .irq = IRQ_UART, - .flags = UPF_SKIP_TEST, - .iotype = UPIO_MEM, - .regshift = 0, - .uartclk = IOP321_UART_XTAL, - .line = 0, - .type = PORT_16550A, - .fifosize = 16 - } -}; - -static struct resource iop32x_i2c_0_resources[] = { - [0] = { - .start = 0xfffff680, - .end = 0xfffff698, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_IOP321_I2C_0, - .end = IRQ_IOP321_I2C_0, - .flags = IORESOURCE_IRQ - } -}; - -static struct resource iop32x_i2c_1_resources[] = { - [0] = { - .start = 0xfffff6a0, - .end = 0xfffff6b8, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_IOP321_I2C_1, - .end = IRQ_IOP321_I2C_1, - .flags = IORESOURCE_IRQ - } -}; - -static struct platform_device iop32x_i2c_0_controller = { - .name = "IOP3xx-I2C", - .id = 0, - .num_resources = 2, - .resource = iop32x_i2c_0_resources -}; - -static struct platform_device iop32x_i2c_1_controller = { - .name = "IOP3xx-I2C", - .id = 1, - .num_resources = 2, - .resource = iop32x_i2c_1_resources -}; - -static struct platform_device *iop32x_devices[] __initdata = { - &iop32x_i2c_0_controller, - &iop32x_i2c_1_controller -}; - -void __init iop32x_init(void) -{ - if(iop_is_321()) - { - platform_add_devices(iop32x_devices, - ARRAY_SIZE(iop32x_devices)); - } -} - -void __init iop321_map_io(void) -{ - iotable_init(iop321_std_desc, ARRAY_SIZE(iop321_std_desc)); - early_serial_setup(&iop321_serial_ports[0]); -} - -#ifdef CONFIG_ARCH_IQ80321 -extern void iq80321_map_io(void); -extern struct sys_timer iop321_timer; -extern void iop321_init_time(void); -#endif - -#ifdef CONFIG_ARCH_IQ31244 -extern void iq31244_map_io(void); -extern struct sys_timer iop321_timer; -extern void iop321_init_time(void); -#endif - -#if defined(CONFIG_ARCH_IQ80321) -MACHINE_START(IQ80321, "Intel IQ80321") - /* Maintainer: Intel Corporation */ - .phys_io = IQ80321_UART, - .io_pg_offst = ((IQ80321_UART) >> 18) & 0xfffc, - .map_io = iq80321_map_io, - .init_irq = iop321_init_irq, - .timer = &iop321_timer, - .boot_params = 0xa0000100, - .init_machine = iop32x_init, -MACHINE_END -#elif defined(CONFIG_ARCH_IQ31244) -MACHINE_START(IQ31244, "Intel IQ31244") - /* Maintainer: Intel Corp. */ - .phys_io = IQ31244_UART, - .io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc, - .map_io = iq31244_map_io, - .init_irq = iop321_init_irq, - .timer = &iop321_timer, - .boot_params = 0xa0000100, - .init_machine = iop32x_init, -MACHINE_END -#else -#error No machine descriptor defined for this IOP3XX implementation -#endif diff --git a/arch/arm/mach-iop3xx/iop321-time.c b/arch/arm/mach-iop3xx/iop321-time.c deleted file mode 100644 index 04b1a6f..0000000 --- a/arch/arm/mach-iop3xx/iop321-time.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - * arch/arm/mach-iop3xx/iop321-time.c - * - * Timer code for IOP321 based systems - * - * Author: Deepak Saxena - * - * Copyright 2002-2003 MontaVista Software Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#define IOP321_TIME_SYNC 0 - -static inline unsigned long get_elapsed(void) -{ - return LATCH - *IOP321_TU_TCR0; -} - -static unsigned long iop321_gettimeoffset(void) -{ - unsigned long elapsed, usec; - u32 tisr1, tisr2; - - /* - * If an interrupt was pending before we read the timer, - * we've already wrapped. Factor this into the time. - * If an interrupt was pending after we read the timer, - * it may have wrapped between checking the interrupt - * status and reading the timer. Re-read the timer to - * be sure its value is after the wrap. - */ - - asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr1)); - elapsed = get_elapsed(); - asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr2)); - - if(tisr1 & 1) - elapsed += LATCH; - else if (tisr2 & 1) - elapsed = LATCH + get_elapsed(); - - /* - * Now convert them to usec. - */ - usec = (unsigned long)(elapsed / (CLOCK_TICK_RATE/1000000)); - - return usec; -} - -static irqreturn_t -iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - u32 tisr; - - write_seqlock(&xtime_lock); - - asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr)); - tisr |= 1; - asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (tisr)); - - timer_tick(regs); - - write_sequnlock(&xtime_lock); - - return IRQ_HANDLED; -} - -static struct irqaction iop321_timer_irq = { - .name = "IOP321 Timer Tick", - .handler = iop321_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, -}; - -static void __init iop321_timer_init(void) -{ - u32 timer_ctl; - - setup_irq(IRQ_IOP321_TIMER0, &iop321_timer_irq); - - timer_ctl = IOP321_TMR_EN | IOP321_TMR_PRIVILEGED | IOP321_TMR_RELOAD | - IOP321_TMR_RATIO_1_1; - - asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (LATCH)); - - asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (timer_ctl)); -} - -struct sys_timer iop321_timer = { - .init = &iop321_timer_init, - .offset = iop321_gettimeoffset, -}; diff --git a/arch/arm/mach-iop3xx/iop331-irq.c b/arch/arm/mach-iop3xx/iop331-irq.c deleted file mode 100644 index cab1172..0000000 --- a/arch/arm/mach-iop3xx/iop331-irq.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * linux/arch/arm/mach-iop3xx/iop331-irq.c - * - * Generic IOP331 IRQ handling functionality - * - * Author: Dave Jiang - * Copyright (C) 2003 Intel Corp. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * - */ -#include -#include -#include - -#include -#include -#include - -#include - -static u32 iop331_mask0 = 0; -static u32 iop331_mask1 = 0; - -static inline void intctl_write0(u32 val) -{ - // INTCTL0 - asm volatile("mcr p6,0,%0,c0,c0,0"::"r" (val)); -} - -static inline void intctl_write1(u32 val) -{ - // INTCTL1 - asm volatile("mcr p6,0,%0,c1,c0,0"::"r" (val)); -} - -static inline void intstr_write0(u32 val) -{ - // INTSTR0 - asm volatile("mcr p6,0,%0,c2,c0,0"::"r" (val)); -} - -static inline void intstr_write1(u32 val) -{ - // INTSTR1 - asm volatile("mcr p6,0,%0,c3,c0,0"::"r" (val)); -} - -static void -iop331_irq_mask1 (unsigned int irq) -{ - iop331_mask0 &= ~(1 << (irq - IOP331_IRQ_OFS)); - intctl_write0(iop331_mask0); -} - -static void -iop331_irq_mask2 (unsigned int irq) -{ - iop331_mask1 &= ~(1 << (irq - IOP331_IRQ_OFS - 32)); - intctl_write1(iop331_mask1); -} - -static void -iop331_irq_unmask1(unsigned int irq) -{ - iop331_mask0 |= (1 << (irq - IOP331_IRQ_OFS)); - intctl_write0(iop331_mask0); -} - -static void -iop331_irq_unmask2(unsigned int irq) -{ - iop331_mask1 |= (1 << (irq - IOP331_IRQ_OFS - 32)); - intctl_write1(iop331_mask1); -} - -struct irq_chip iop331_irqchip1 = { - .name = "IOP-1", - .ack = iop331_irq_mask1, - .mask = iop331_irq_mask1, - .unmask = iop331_irq_unmask1, -}; - -struct irq_chip iop331_irqchip2 = { - .name = "IOP-2", - .ack = iop331_irq_mask2, - .mask = iop331_irq_mask2, - .unmask = iop331_irq_unmask2, -}; - -void __init iop331_init_irq(void) -{ - unsigned int i, tmp; - - /* Enable access to coprocessor 6 for dealing with IRQs. - * From RMK: - * Basically, the Intel documentation here is poor. It appears that - * you need to set the bit to be able to access the coprocessor from - * SVC mode. Whether that allows access from user space or not is - * unclear. - */ - asm volatile ( - "mrc p15, 0, %0, c15, c1, 0\n\t" - "orr %0, %0, %1\n\t" - "mcr p15, 0, %0, c15, c1, 0\n\t" - /* The action is delayed, so we have to do this: */ - "mrc p15, 0, %0, c15, c1, 0\n\t" - "mov %0, %0\n\t" - "sub pc, pc, #4" - : "=r" (tmp) : "i" (1 << 6) ); - - intctl_write0(0); // disable all interrupts - intctl_write1(0); - intstr_write0(0); // treat all as IRQ - intstr_write1(0); - if(machine_is_iq80331()) // all interrupts are inputs to chip - *IOP331_PCIIRSR = 0x0f; - - for(i = IOP331_IRQ_OFS; i < NR_IOP331_IRQS; i++) - { - set_irq_chip(i, (i < 32) ? &iop331_irqchip1 : &iop331_irqchip2); - set_irq_handler(i, do_level_IRQ); - set_irq_flags(i, IRQF_VALID | IRQF_PROBE); - } -} - diff --git a/arch/arm/mach-iop3xx/iop331-pci.c b/arch/arm/mach-iop3xx/iop331-pci.c deleted file mode 100644 index 44dd213..0000000 --- a/arch/arm/mach-iop3xx/iop331-pci.c +++ /dev/null @@ -1,222 +0,0 @@ -/* - * arch/arm/mach-iop3xx/iop331-pci.c - * - * PCI support for the Intel IOP331 chipset - * - * Author: Dave Jiang (dave.jiang@intel.com) - * Copyright (C) 2003, 2004 Intel Corp. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#undef DEBUG -#undef DEBUG1 - -#ifdef DEBUG -#define DBG(x...) printk(x) -#else -#define DBG(x...) do { } while (0) -#endif - -#ifdef DEBUG1 -#define DBG1(x...) printk(x) -#else -#define DBG1(x...) do { } while (0) -#endif - -/* - * This routine builds either a type0 or type1 configuration command. If the - * bus is on the 80331 then a type0 made, else a type1 is created. - */ -static u32 iop331_cfg_address(struct pci_bus *bus, int devfn, int where) -{ - struct pci_sys_data *sys = bus->sysdata; - u32 addr; - - if (sys->busnr == bus->number) - addr = 1 << (PCI_SLOT(devfn) + 16) | (PCI_SLOT(devfn) << 11); - else - addr = bus->number << 16 | PCI_SLOT(devfn) << 11 | 1; - - addr |= PCI_FUNC(devfn) << 8 | (where & ~3); - - return addr; -} - -/* - * This routine checks the status of the last configuration cycle. If an error - * was detected it returns a 1, else it returns a 0. The errors being checked - * are parity, master abort, target abort (master and target). These types of - * errors occure during a config cycle where there is no device, like during - * the discovery stage. - */ -static int iop331_pci_status(void) -{ - unsigned int status; - int ret = 0; - - /* - * Check the status registers. - */ - status = *IOP331_ATUSR; - if (status & 0xf900) - { - DBG("\t\t\tPCI: P0 - status = 0x%08x\n", status); - *IOP331_ATUSR = status & 0xf900; - ret = 1; - } - status = *IOP331_ATUISR; - if (status & 0x679f) - { - DBG("\t\t\tPCI: P1 - status = 0x%08x\n", status); - *IOP331_ATUISR = status & 0x679f; - ret = 1; - } - return ret; -} - -/* - * Simply write the address register and read the configuration - * data. Note that the 4 nop's ensure that we are able to handle - * a delayed abort (in theory.) - */ -static inline u32 iop331_read(unsigned long addr) -{ - u32 val; - - __asm__ __volatile__( - "str %1, [%2]\n\t" - "ldr %0, [%3]\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - : "=r" (val) - : "r" (addr), "r" (IOP331_OCCAR), "r" (IOP331_OCCDR)); - - return val; -} - -/* - * The read routines must check the error status of the last configuration - * cycle. If there was an error, the routine returns all hex f's. - */ -static int -iop331_read_config(struct pci_bus *bus, unsigned int devfn, int where, - int size, u32 *value) -{ - unsigned long addr = iop331_cfg_address(bus, devfn, where); - u32 val = iop331_read(addr) >> ((where & 3) * 8); - - if( iop331_pci_status() ) - val = 0xffffffff; - - *value = val; - - return PCIBIOS_SUCCESSFUL; -} - -static int -iop331_write_config(struct pci_bus *bus, unsigned int devfn, int where, - int size, u32 value) -{ - unsigned long addr = iop331_cfg_address(bus, devfn, where); - u32 val; - - if (size != 4) { - val = iop331_read(addr); - if (!iop331_pci_status() == 0) - return PCIBIOS_SUCCESSFUL; - - where = (where & 3) * 8; - - if (size == 1) - val &= ~(0xff << where); - else - val &= ~(0xffff << where); - - *IOP331_OCCDR = val | value << where; - } else { - asm volatile( - "str %1, [%2]\n\t" - "str %0, [%3]\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - : - : "r" (value), "r" (addr), - "r" (IOP331_OCCAR), "r" (IOP331_OCCDR)); - } - - return PCIBIOS_SUCCESSFUL; -} - -static struct pci_ops iop331_ops = { - .read = iop331_read_config, - .write = iop331_write_config, -}; - -/* - * When a PCI device does not exist during config cycles, the XScale gets a - * bus error instead of returning 0xffffffff. This handler simply returns. - */ -int -iop331_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) -{ - DBG("PCI abort: address = 0x%08lx fsr = 0x%03x PC = 0x%08lx LR = 0x%08lx\n", - addr, fsr, regs->ARM_pc, regs->ARM_lr); - - /* - * If it was an imprecise abort, then we need to correct the - * return address to be _after_ the instruction. - */ - if (fsr & (1 << 10)) - regs->ARM_pc += 4; - - return 0; -} - -/* - * Scan an IOP331 PCI bus. sys->bus defines which bus we scan. - */ -struct pci_bus *iop331_scan_bus(int nr, struct pci_sys_data *sys) -{ - return pci_scan_bus(sys->busnr, &iop331_ops, sys); -} - -void iop331_init(void) -{ - DBG1("PCI: Intel 80331 PCI init code.\n"); - DBG1("\tATU: IOP331_ATUCMD=0x%04x\n", *IOP331_ATUCMD); - DBG1("\tATU: IOP331_OMWTVR0=0x%04x, IOP331_OIOWTVR=0x%04x\n", - *IOP331_OMWTVR0, - *IOP331_OIOWTVR); - DBG1("\tATU: IOP331_OMWTVR1=0x%04x\n", *IOP331_OMWTVR1); - DBG1("\tATU: IOP331_ATUCR=0x%08x\n", *IOP331_ATUCR); - DBG1("\tATU: IOP331_IABAR0=0x%08x IOP331_IALR0=0x%08x IOP331_IATVR0=%08x\n", *IOP331_IABAR0, *IOP331_IALR0, *IOP331_IATVR0); - DBG1("\tATU: IOP31_IABAR1=0x%08x IOP331_IALR1=0x%08x\n", *IOP331_IABAR1, *IOP331_IALR1); - DBG1("\tATU: IOP331_ERBAR=0x%08x IOP331_ERLR=0x%08x IOP331_ERTVR=%08x\n", *IOP331_ERBAR, *IOP331_ERLR, *IOP331_ERTVR); - DBG1("\tATU: IOP331_IABAR2=0x%08x IOP331_IALR2=0x%08x IOP331_IATVR2=%08x\n", *IOP331_IABAR2, *IOP331_IALR2, *IOP331_IATVR2); - DBG1("\tATU: IOP331_IABAR3=0x%08x IOP331_IALR3=0x%08x IOP331_IATVR3=%08x\n", *IOP331_IABAR3, *IOP331_IALR3, *IOP331_IATVR3); - - hook_fault_code(16+6, iop331_pci_abort, SIGBUS, "imprecise external abort"); -} - diff --git a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c deleted file mode 100644 index 3cc98d8..0000000 --- a/arch/arm/mach-iop3xx/iop331-setup.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * linux/arch/arm/mach-iop3xx/iop331-setup.c - * - * Author: Dave Jiang (dave.jiang@intel.com) - * Copyright (C) 2004 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define IOP331_UART_XTAL 33334000 - -/* - * Standard IO mapping for all IOP331 based systems - */ -static struct map_desc iop331_std_desc[] __initdata = { - { /* mem mapped registers */ - .virtual = IOP331_VIRT_MEM_BASE, - .pfn = __phys_to_pfn(IOP331_PHYS_MEM_BASE), - .length = 0x00002000, - .type = MT_DEVICE - }, { /* PCI IO space */ - .virtual = IOP331_PCI_LOWER_IO_VA, - .pfn = __phys_to_pfn(IOP331_PCI_LOWER_IO_PA), - .length = IOP331_PCI_IO_WINDOW_SIZE, - .type = MT_DEVICE - } -}; - -static struct resource iop33x_uart0_resources[] = { - [0] = { - .start = IOP331_UART0_PHYS, - .end = IOP331_UART0_PHYS + 0x3f, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_IOP331_UART0, - .end = IRQ_IOP331_UART0, - .flags = IORESOURCE_IRQ - } -}; - -static struct resource iop33x_uart1_resources[] = { - [0] = { - .start = IOP331_UART1_PHYS, - .end = IOP331_UART1_PHYS + 0x3f, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_IOP331_UART1, - .end = IRQ_IOP331_UART1, - .flags = IORESOURCE_IRQ - } -}; - -static struct plat_serial8250_port iop33x_uart0_data[] = { - { - .membase = (char*)(IOP331_UART0_VIRT), - .mapbase = (IOP331_UART0_PHYS), - .irq = IRQ_IOP331_UART0, - .uartclk = IOP331_UART_XTAL, - .regshift = 2, - .iotype = UPIO_MEM, - .flags = UPF_SKIP_TEST, - }, - { }, -}; - -static struct plat_serial8250_port iop33x_uart1_data[] = { - { - .membase = (char*)(IOP331_UART1_VIRT), - .mapbase = (IOP331_UART1_PHYS), - .irq = IRQ_IOP331_UART1, - .uartclk = IOP331_UART_XTAL, - .regshift = 2, - .iotype = UPIO_MEM, - .flags = UPF_SKIP_TEST, - }, - { }, -}; - -static struct platform_device iop33x_uart0 = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM, - .dev.platform_data = iop33x_uart0_data, - .num_resources = 2, - .resource = iop33x_uart0_resources, -}; - -static struct platform_device iop33x_uart1 = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM1, - .dev.platform_data = iop33x_uart1_data, - .num_resources = 2, - .resource = iop33x_uart1_resources, -}; - -static struct resource iop33x_i2c_0_resources[] = { - [0] = { - .start = 0xfffff680, - .end = 0xfffff698, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_IOP331_I2C_0, - .end = IRQ_IOP331_I2C_0, - .flags = IORESOURCE_IRQ - } -}; - -static struct resource iop33x_i2c_1_resources[] = { - [0] = { - .start = 0xfffff6a0, - .end = 0xfffff6b8, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_IOP331_I2C_1, - .end = IRQ_IOP331_I2C_1, - .flags = IORESOURCE_IRQ - } -}; - -static struct platform_device iop33x_i2c_0_controller = { - .name = "IOP3xx-I2C", - .id = 0, - .num_resources = 2, - .resource = iop33x_i2c_0_resources -}; - -static struct platform_device iop33x_i2c_1_controller = { - .name = "IOP3xx-I2C", - .id = 1, - .num_resources = 2, - .resource = iop33x_i2c_1_resources -}; - -static struct platform_device *iop33x_devices[] __initdata = { - &iop33x_uart0, - &iop33x_uart1, - &iop33x_i2c_0_controller, - &iop33x_i2c_1_controller -}; - -void __init iop33x_init(void) -{ - if(iop_is_331()) - { - platform_add_devices(iop33x_devices, - ARRAY_SIZE(iop33x_devices)); - } -} - -void __init iop331_map_io(void) -{ - iotable_init(iop331_std_desc, ARRAY_SIZE(iop331_std_desc)); -} - -#ifdef CONFIG_ARCH_IOP331 -extern void iop331_init_irq(void); -extern struct sys_timer iop331_timer; -#endif - -#ifdef CONFIG_ARCH_IQ80331 -extern void iq80331_map_io(void); -#endif - -#ifdef CONFIG_MACH_IQ80332 -extern void iq80332_map_io(void); -#endif - -#if defined(CONFIG_ARCH_IQ80331) -MACHINE_START(IQ80331, "Intel IQ80331") - /* Maintainer: Intel Corp. */ - .phys_io = 0xfefff000, - .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical - .map_io = iq80331_map_io, - .init_irq = iop331_init_irq, - .timer = &iop331_timer, - .boot_params = 0x0100, - .init_machine = iop33x_init, -MACHINE_END - -#elif defined(CONFIG_MACH_IQ80332) -MACHINE_START(IQ80332, "Intel IQ80332") - /* Maintainer: Intel Corp. */ - .phys_io = 0xfefff000, - .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical - .map_io = iq80332_map_io, - .init_irq = iop331_init_irq, - .timer = &iop331_timer, - .boot_params = 0x0100, - .init_machine = iop33x_init, -MACHINE_END - -#else -#error No machine descriptor defined for this IOP3XX implementation -#endif - - diff --git a/arch/arm/mach-iop3xx/iop331-time.c b/arch/arm/mach-iop3xx/iop331-time.c deleted file mode 100644 index 0c09e74..0000000 --- a/arch/arm/mach-iop3xx/iop331-time.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * arch/arm/mach-iop3xx/iop331-time.c - * - * Timer code for IOP331 based systems - * - * Author: Dave Jiang - * - * Copyright 2003 Intel Corp. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -static inline unsigned long get_elapsed(void) -{ - return LATCH - *IOP331_TU_TCR0; -} - -static unsigned long iop331_gettimeoffset(void) -{ - unsigned long elapsed, usec; - u32 tisr1, tisr2; - - /* - * If an interrupt was pending before we read the timer, - * we've already wrapped. Factor this into the time. - * If an interrupt was pending after we read the timer, - * it may have wrapped between checking the interrupt - * status and reading the timer. Re-read the timer to - * be sure its value is after the wrap. - */ - - asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr1)); - elapsed = get_elapsed(); - asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr2)); - - if(tisr1 & 1) - elapsed += LATCH; - else if (tisr2 & 1) - elapsed = LATCH + get_elapsed(); - - /* - * Now convert them to usec. - */ - usec = (unsigned long)(elapsed / (CLOCK_TICK_RATE/1000000)); - - return usec; -} - -static irqreturn_t -iop331_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - u32 tisr; - - write_seqlock(&xtime_lock); - - asm volatile("mrc p6, 0, %0, c6, c1, 0" : "=r" (tisr)); - tisr |= 1; - asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (tisr)); - - timer_tick(regs); - - write_sequnlock(&xtime_lock); - return IRQ_HANDLED; -} - -static struct irqaction iop331_timer_irq = { - .name = "IOP331 Timer Tick", - .handler = iop331_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, -}; - -static void __init iop331_timer_init(void) -{ - u32 timer_ctl; - - setup_irq(IRQ_IOP331_TIMER0, &iop331_timer_irq); - - timer_ctl = IOP331_TMR_EN | IOP331_TMR_PRIVILEGED | IOP331_TMR_RELOAD | - IOP331_TMR_RATIO_1_1; - - asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (LATCH)); - - asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (timer_ctl)); - -} - -struct sys_timer iop331_timer = { - .init = iop331_timer_init, - .offset = iop331_gettimeoffset, -}; diff --git a/arch/arm/mach-iop3xx/iq31244-mm.c b/arch/arm/mach-iop3xx/iq31244-mm.c deleted file mode 100644 index e874b54..0000000 --- a/arch/arm/mach-iop3xx/iq31244-mm.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * linux/arch/arm/mach-iop3xx/mm.c - * - * Low level memory initialization for iq80321 platform - * - * Author: Rory Bolt - * Copyright (C) 2002 Rory Bolt - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ - -#include -#include - -#include -#include -#include - -#include - - -/* - * IQ80321 specific IO mappings - * - * We use RedBoot's setup for the onboard devices. - */ -static struct map_desc iq31244_io_desc[] __initdata = { - { /* on-board devices */ - .virtual = IQ31244_UART, - .pfn = __phys_to_pfn(IQ31244_UART), - .length = 0x00100000, - .type = MT_DEVICE - } -}; - -void __init iq31244_map_io(void) -{ - iop321_map_io(); - - iotable_init(iq31244_io_desc, ARRAY_SIZE(iq31244_io_desc)); -} diff --git a/arch/arm/mach-iop3xx/iq31244-pci.c b/arch/arm/mach-iop3xx/iq31244-pci.c deleted file mode 100644 index f3c6413..0000000 --- a/arch/arm/mach-iop3xx/iq31244-pci.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * arch/arm/mach-iop3xx/iq80321-pci.c - * - * PCI support for the Intel IQ80321 reference board - * - * Author: Rory Bolt - * Copyright (C) 2002 Rory Bolt - * Copyright (C) 2004 Intel Corp. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/* - * The following macro is used to lookup irqs in a standard table - * format for those systems that do not already have PCI - * interrupts properly routed. We assume 1 <= pin <= 4 - */ -#define PCI_IRQ_TABLE_LOOKUP(minid,maxid) \ -({ int _ctl_ = -1; \ - unsigned int _idsel = idsel - minid; \ - if (_idsel <= maxid) \ - _ctl_ = pci_irq_table[_idsel][pin-1]; \ - _ctl_; }) - -#define INTA IRQ_IQ31244_INTA -#define INTB IRQ_IQ31244_INTB -#define INTC IRQ_IQ31244_INTC -#define INTD IRQ_IQ31244_INTD - -#define INTE IRQ_IQ31244_I82546 - -static inline int __init -iq31244_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) -{ - static int pci_irq_table[][4] = { - /* - * PCI IDSEL/INTPIN->INTLINE - * A B C D - */ -#ifdef CONFIG_ARCH_EP80219 - {INTB, INTB, INTB, INTB}, /* CFlash */ - {INTE, INTE, INTE, INTE}, /* 82551 Pro 100 */ - {INTD, INTD, INTD, INTD}, /* PCI-X Slot */ - {INTC, INTC, INTC, INTC}, /* SATA */ -#else - {INTB, INTB, INTB, INTB}, /* CFlash */ - {INTC, INTC, INTC, INTC}, /* SATA */ - {INTD, INTD, INTD, INTD}, /* PCI-X Slot */ - {INTE, INTE, INTE, INTE}, /* 82546 GigE */ -#endif // CONFIG_ARCH_EP80219 - }; - - BUG_ON(pin < 1 || pin > 4); - - return PCI_IRQ_TABLE_LOOKUP(0, 7); -} - -static int iq31244_setup(int nr, struct pci_sys_data *sys) -{ - struct resource *res; - - if(nr != 0) - return 0; - - res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); - if (!res) - panic("PCI: unable to alloc resources"); - - res[0].start = IOP321_PCI_LOWER_IO_VA; - res[0].end = IOP321_PCI_UPPER_IO_VA; - res[0].name = "IQ31244 PCI I/O Space"; - res[0].flags = IORESOURCE_IO; - - res[1].start = IOP321_PCI_LOWER_MEM_PA; - res[1].end = IOP321_PCI_UPPER_MEM_PA; - res[1].name = "IQ31244 PCI Memory Space"; - res[1].flags = IORESOURCE_MEM; - - request_resource(&ioport_resource, &res[0]); - request_resource(&iomem_resource, &res[1]); - - sys->mem_offset = IOP321_PCI_MEM_OFFSET; - sys->io_offset = IOP321_PCI_IO_OFFSET; - - sys->resource[0] = &res[0]; - sys->resource[1] = &res[1]; - sys->resource[2] = NULL; - - return 1; -} - -static void iq31244_preinit(void) -{ - iop321_init(); -} - -static struct hw_pci iq31244_pci __initdata = { - .swizzle = pci_std_swizzle, - .nr_controllers = 1, - .setup = iq31244_setup, - .scan = iop321_scan_bus, - .preinit = iq31244_preinit, - .map_irq = iq31244_map_irq -}; - -static int __init iq31244_pci_init(void) -{ - if (machine_is_iq31244()) - pci_common_init(&iq31244_pci); - return 0; -} - -subsys_initcall(iq31244_pci_init); - - - - diff --git a/arch/arm/mach-iop3xx/iq80321-mm.c b/arch/arm/mach-iop3xx/iq80321-mm.c deleted file mode 100644 index d9cac5e..0000000 --- a/arch/arm/mach-iop3xx/iq80321-mm.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * linux/arch/arm/mach-iop3xx/mm.c - * - * Low level memory initialization for iq80321 platform - * - * Author: Rory Bolt - * Copyright (C) 2002 Rory Bolt - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ - -#include -#include - -#include -#include -#include - -#include - - -/* - * IQ80321 specific IO mappings - * - * We use RedBoot's setup for the onboard devices. - */ -static struct map_desc iq80321_io_desc[] __initdata = { - { /* on-board devices */ - .virtual = IQ80321_UART, - .pfn = __phys_to_pfn(IQ80321_UART), - .length = 0x00100000, - .type = MT_DEVICE - } -}; - -void __init iq80321_map_io(void) -{ - iop321_map_io(); - - iotable_init(iq80321_io_desc, ARRAY_SIZE(iq80321_io_desc)); -} diff --git a/arch/arm/mach-iop3xx/iq80321-pci.c b/arch/arm/mach-iop3xx/iq80321-pci.c deleted file mode 100644 index d9758d3..0000000 --- a/arch/arm/mach-iop3xx/iq80321-pci.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * arch/arm/mach-iop3xx/iq80321-pci.c - * - * PCI support for the Intel IQ80321 reference board - * - * Author: Rory Bolt - * Copyright (C) 2002 Rory Bolt - * Copyright (C) 2004 Intel Corp. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/* - * The following macro is used to lookup irqs in a standard table - * format for those systems that do not already have PCI - * interrupts properly routed. We assume 1 <= pin <= 4 - */ -#define PCI_IRQ_TABLE_LOOKUP(minid,maxid) \ -({ int _ctl_ = -1; \ - unsigned int _idsel = idsel - minid; \ - if (_idsel <= maxid) \ - _ctl_ = pci_irq_table[_idsel][pin-1]; \ - _ctl_; }) - -#define INTA IRQ_IQ80321_INTA -#define INTB IRQ_IQ80321_INTB -#define INTC IRQ_IQ80321_INTC -#define INTD IRQ_IQ80321_INTD - -#define INTE IRQ_IQ80321_I82544 - -static inline int __init -iq80321_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) -{ - static int pci_irq_table[][4] = { - /* - * PCI IDSEL/INTPIN->INTLINE - * A B C D - */ - {INTE, INTE, INTE, INTE}, /* Gig-E */ - {-1, -1, -1, -1}, /* Unused */ - {INTC, INTD, INTA, INTB}, /* PCI-X Slot */ - {-1, -1, -1, -1}, - }; - - BUG_ON(pin < 1 || pin > 4); - -// return PCI_IRQ_TABLE_LOOKUP(4, 7); - return pci_irq_table[idsel%4][pin-1]; -} - -static int iq80321_setup(int nr, struct pci_sys_data *sys) -{ - struct resource *res; - - if(nr != 0) - return 0; - - res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); - if (!res) - panic("PCI: unable to alloc resources"); - - res[0].start = IOP321_PCI_LOWER_IO_VA; - res[0].end = IOP321_PCI_UPPER_IO_VA; - res[0].name = "IQ80321 PCI I/O Space"; - res[0].flags = IORESOURCE_IO; - - res[1].start = IOP321_PCI_LOWER_MEM_PA; - res[1].end = IOP321_PCI_UPPER_MEM_PA; - res[1].name = "IQ80321 PCI Memory Space"; - res[1].flags = IORESOURCE_MEM; - - request_resource(&ioport_resource, &res[0]); - request_resource(&iomem_resource, &res[1]); - - sys->mem_offset = IOP321_PCI_MEM_OFFSET; - sys->io_offset = IOP321_PCI_IO_OFFSET; - - sys->resource[0] = &res[0]; - sys->resource[1] = &res[1]; - sys->resource[2] = NULL; - - return 1; -} - -static void iq80321_preinit(void) -{ - iop321_init(); -} - -static struct hw_pci iq80321_pci __initdata = { - .swizzle = pci_std_swizzle, - .nr_controllers = 1, - .setup = iq80321_setup, - .scan = iop321_scan_bus, - .preinit = iq80321_preinit, - .map_irq = iq80321_map_irq -}; - -static int __init iq80321_pci_init(void) -{ - if (machine_is_iq80321()) - pci_common_init(&iq80321_pci); - return 0; -} - -subsys_initcall(iq80321_pci_init); - - - - diff --git a/arch/arm/mach-iop3xx/iq80331-mm.c b/arch/arm/mach-iop3xx/iq80331-mm.c deleted file mode 100644 index 129eb49..0000000 --- a/arch/arm/mach-iop3xx/iq80331-mm.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * linux/arch/arm/mach-iop3xx/mm.c - * - * Low level memory initialization for iq80331 platform - * - * Author: Dave Jiang - * Copyright (C) 2003 Intel Corp. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ - -#include -#include - -#include -#include -#include - -#include - - -/* - * IQ80331 specific IO mappings - * - * We use RedBoot's setup for the onboard devices. - */ - -void __init iq80331_map_io(void) -{ - iop331_map_io(); -} diff --git a/arch/arm/mach-iop3xx/iq80331-pci.c b/arch/arm/mach-iop3xx/iq80331-pci.c deleted file mode 100644 index 40d8610..0000000 --- a/arch/arm/mach-iop3xx/iq80331-pci.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * arch/arm/mach-iop3xx/iq80331-pci.c - * - * PCI support for the Intel IQ80331 reference board - * - * Author: Dave Jiang - * Copyright (C) 2003, 2004 Intel Corp. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/* - * The following macro is used to lookup irqs in a standard table - * format for those systems that do not already have PCI - * interrupts properly routed. We assume 1 <= pin <= 4 - */ -#define PCI_IRQ_TABLE_LOOKUP(minid,maxid) \ -({ int _ctl_ = -1; \ - unsigned int _idsel = idsel - minid; \ - if (_idsel <= maxid) \ - _ctl_ = pci_irq_table[_idsel][pin-1]; \ - _ctl_; }) - -#define INTA IRQ_IQ80331_INTA -#define INTB IRQ_IQ80331_INTB -#define INTC IRQ_IQ80331_INTC -#define INTD IRQ_IQ80331_INTD - -//#define INTE IRQ_IQ80331_I82544 - -static inline int __init -iq80331_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) -{ - static int pci_irq_table[][4] = { - /* - * PCI IDSEL/INTPIN->INTLINE - * A B C D - */ - {INTB, INTC, INTD, INTA}, /* PCI-X Slot */ - {INTC, INTC, INTC, INTC}, /* GigE */ - }; - - BUG_ON(pin < 1 || pin > 4); - - return PCI_IRQ_TABLE_LOOKUP(1, 7); -} - -static int iq80331_setup(int nr, struct pci_sys_data *sys) -{ - struct resource *res; - - if(nr != 0) - return 0; - - res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); - if (!res) - panic("PCI: unable to alloc resources"); - - res[0].start = IOP331_PCI_LOWER_IO_VA; - res[0].end = IOP331_PCI_UPPER_IO_VA; - res[0].name = "IQ80331 PCI I/O Space"; - res[0].flags = IORESOURCE_IO; - - res[1].start = IOP331_PCI_LOWER_MEM_PA; - res[1].end = IOP331_PCI_UPPER_MEM_PA; - res[1].name = "IQ80331 PCI Memory Space"; - res[1].flags = IORESOURCE_MEM; - - request_resource(&ioport_resource, &res[0]); - request_resource(&iomem_resource, &res[1]); - - sys->mem_offset = IOP331_PCI_MEM_OFFSET; - sys->io_offset = IOP331_PCI_IO_OFFSET; - - sys->resource[0] = &res[0]; - sys->resource[1] = &res[1]; - sys->resource[2] = NULL; - - return 1; -} - -static void iq80331_preinit(void) -{ - iop331_init(); -} - -static struct hw_pci iq80331_pci __initdata = { - .swizzle = pci_std_swizzle, - .nr_controllers = 1, - .setup = iq80331_setup, - .scan = iop331_scan_bus, - .preinit = iq80331_preinit, - .map_irq = iq80331_map_irq -}; - -static int __init iq80331_pci_init(void) -{ - if (machine_is_iq80331()) - pci_common_init(&iq80331_pci); - return 0; -} - -subsys_initcall(iq80331_pci_init); - - - - diff --git a/arch/arm/mach-iop3xx/iq80332-mm.c b/arch/arm/mach-iop3xx/iq80332-mm.c deleted file mode 100644 index 2feaf75..0000000 --- a/arch/arm/mach-iop3xx/iq80332-mm.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * linux/arch/arm/mach-iop3xx/mm.c - * - * Low level memory initialization for iq80332 platform - * - * Author: Dave Jiang - * Copyright (C) 2004 Intel Corp. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ - -#include -#include - -#include -#include -#include - -#include - - -/* - * IQ80332 specific IO mappings - * - * We use RedBoot's setup for the onboard devices. - */ - -void __init iq80332_map_io(void) -{ - iop331_map_io(); -} diff --git a/arch/arm/mach-iop3xx/iq80332-pci.c b/arch/arm/mach-iop3xx/iq80332-pci.c deleted file mode 100644 index afc0676..0000000 --- a/arch/arm/mach-iop3xx/iq80332-pci.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - * arch/arm/mach-iop3xx/iq80332-pci.c - * - * PCI support for the Intel IQ80332 reference board - * - * Author: Dave Jiang - * Copyright (C) 2004 Intel Corp. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/* - * The following macro is used to lookup irqs in a standard table - * format for those systems that do not already have PCI - * interrupts properly routed. We assume 1 <= pin <= 4 - */ -#define PCI_IRQ_TABLE_LOOKUP(minid,maxid) \ -({ int _ctl_ = -1; \ - unsigned int _idsel = idsel - minid; \ - if (_idsel <= maxid) \ - _ctl_ = pci_irq_table[_idsel][pin-1]; \ - _ctl_; }) - -#define INTA IRQ_IQ80332_INTA -#define INTB IRQ_IQ80332_INTB -#define INTC IRQ_IQ80332_INTC -#define INTD IRQ_IQ80332_INTD - -//#define INTE IRQ_IQ80332_I82544 - -static inline int __init -iq80332_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) -{ - static int pci_irq_table[][8] = { - /* - * PCI IDSEL/INTPIN->INTLINE - * A B C D - */ - {-1, -1, -1, -1}, - {-1, -1, -1, -1}, - {-1, -1, -1, -1}, - {INTA, INTB, INTC, INTD}, /* PCI-X Slot */ - {-1, -1, -1, -1}, - {INTC, INTC, INTC, INTC}, /* GigE */ - {-1, -1, -1, -1}, - {-1, -1, -1, -1}, - }; - - BUG_ON(pin < 1 || pin > 4); - - return PCI_IRQ_TABLE_LOOKUP(1, 7); -} - -static int iq80332_setup(int nr, struct pci_sys_data *sys) -{ - struct resource *res; - - if(nr != 0) - return 0; - - res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); - if (!res) - panic("PCI: unable to alloc resources"); - - res[0].start = IOP331_PCI_LOWER_IO_VA; - res[0].end = IOP331_PCI_UPPER_IO_VA; - res[0].name = "IQ80332 PCI I/O Space"; - res[0].flags = IORESOURCE_IO; - - res[1].start = IOP331_PCI_LOWER_MEM_PA; - res[1].end = IOP331_PCI_UPPER_MEM_PA; - res[1].name = "IQ80332 PCI Memory Space"; - res[1].flags = IORESOURCE_MEM; - - request_resource(&ioport_resource, &res[0]); - request_resource(&iomem_resource, &res[1]); - - sys->mem_offset = IOP331_PCI_MEM_OFFSET; - sys->io_offset = IOP331_PCI_IO_OFFSET; - - sys->resource[0] = &res[0]; - sys->resource[1] = &res[1]; - sys->resource[2] = NULL; - - return 1; -} - -static void iq80332_preinit(void) -{ - iop331_init(); -} - -static struct hw_pci iq80332_pci __initdata = { - .swizzle = pci_std_swizzle, - .nr_controllers = 1, - .setup = iq80332_setup, - .scan = iop331_scan_bus, - .preinit = iq80332_preinit, - .map_irq = iq80332_map_irq -}; - -static int __init iq80332_pci_init(void) -{ - if (machine_is_iq80332()) - pci_common_init(&iq80332_pci); - return 0; -} - -subsys_initcall(iq80332_pci_init); - - - - diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 7c25dbd..35dd8b3 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c @@ -26,6 +26,7 @@ #include #include #include #include +#include #include #include @@ -255,16 +256,6 @@ static unsigned volatile last_jiffy_time #define CLOCK_TICKS_PER_USEC ((CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC) -/* IRQs are disabled before entering here from do_gettimeofday() */ -static unsigned long ixp4xx_gettimeoffset(void) -{ - u32 elapsed; - - elapsed = *IXP4XX_OSTS - last_jiffy_time; - - return elapsed / CLOCK_TICKS_PER_USEC; -} - static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { write_seqlock(&xtime_lock); @@ -309,7 +300,6 @@ static void __init ixp4xx_timer_init(voi struct sys_timer ixp4xx_timer = { .init = ixp4xx_timer_init, - .offset = ixp4xx_gettimeoffset, }; static struct resource ixp46x_i2c_resources[] = { @@ -365,3 +355,29 @@ void __init ixp4xx_sys_init(void) ixp4xx_exp_bus_size >> 20); } +cycle_t ixp4xx_get_cycles(void) +{ + return *IXP4XX_OSTS; +} + +static struct clocksource clocksource_ixp4xx = { + .name = "OSTS", + .rating = 200, + .read = ixp4xx_get_cycles, + .mask = CLOCKSOURCE_MASK(32), + .shift = 20, + .is_continuous = 1, +}; + +unsigned long ixp4xx_timer_freq = FREQ; +static int __init ixp4xx_clocksource_init(void) +{ + clocksource_ixp4xx.mult = + clocksource_hz2mult(ixp4xx_timer_freq, + clocksource_ixp4xx.shift); + clocksource_register(&clocksource_ixp4xx); + + return 0; +} + +device_initcall(ixp4xx_clocksource_init); diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index 749a337..162c266 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c @@ -159,6 +159,8 @@ static void nslu2_power_off(void) static void __init nslu2_init(void) { + ixp4xx_timer_freq = NSLU2_FREQ; + ixp4xx_sys_init(); nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index c753a3c..62e42c7 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c @@ -172,9 +172,11 @@ static struct resource kp_resources[] = }; static struct omap_kp_platform_data kp_data = { - .rows = 8, - .cols = 8, - .keymap = fsample_keymap, + .rows = 8, + .cols = 8, + .keymap = fsample_keymap, + .keymapsize = ARRAY_SIZE(fsample_keymap), + .delay = 4, }; static struct platform_device kp_device = { diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index cd3a06d..6e11307 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -167,10 +167,13 @@ static struct resource h2_kp_resources[] }; static struct omap_kp_platform_data h2_kp_data = { - .rows = 8, - .cols = 8, - .keymap = h2_keymap, - .rep = 1, + .rows = 8, + .cols = 8, + .keymap = h2_keymap, + .keymapsize = ARRAY_SIZE(h2_keymap), + .rep = 1, + .delay = 9, + .dbounce = 1, }; static struct platform_device h2_kp_device = { diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 7b20611..f225a08 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -247,10 +247,13 @@ static struct resource h3_kp_resources[] }; static struct omap_kp_platform_data h3_kp_data = { - .rows = 8, - .cols = 8, - .keymap = h3_keymap, - .rep = 1, + .rows = 8, + .cols = 8, + .keymap = h3_keymap, + .keymapsize = ARRAY_SIZE(h3_keymap), + .rep = 1, + .delay = 9, + .dbounce = 1, }; static struct platform_device h3_kp_device = { diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 4cbc62d..cb00530 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c @@ -159,9 +159,11 @@ static struct resource innovator_kp_reso }; static struct omap_kp_platform_data innovator_kp_data = { - .rows = 8, - .cols = 8, - .keymap = innovator_keymap, + .rows = 8, + .cols = 8, + .keymap = innovator_keymap, + .keymapsize = ARRAY_SIZE(innovator_keymap), + .delay = 4, }; static struct platform_device innovator_kp_device = { diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 02b980d..dbc555d 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c @@ -71,9 +71,11 @@ static struct resource nokia770_kp_resou }; static struct omap_kp_platform_data nokia770_kp_data = { - .rows = 8, - .cols = 8, - .keymap = nokia770_keymap + .rows = 8, + .cols = 8, + .keymap = nokia770_keymap, + .keymapsize = ARRAY_SIZE(nokia770_keymap) + .delay = 4, }; static struct platform_device nokia770_kp_device = { diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index b742261..6b05647 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -266,9 +266,11 @@ static const int osk_keymap[] = { }; static struct omap_kp_platform_data osk_kp_data = { - .rows = 8, - .cols = 8, - .keymap = (int *) osk_keymap, + .rows = 8, + .cols = 8, + .keymap = (int *) osk_keymap, + .keymapsize = ARRAY_SIZE(osk_keymap), + .delay = 9, }; static struct resource osk5912_kp_resources[] = { diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 64b45d8..fa4be96 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c @@ -171,9 +171,12 @@ static struct resource kp_resources[] = }; static struct omap_kp_platform_data kp_data = { - .rows = 8, - .cols = 8, - .keymap = p2_keymap, + .rows = 8, + .cols = 8, + .keymap = p2_keymap, + .keymapsize = ARRAY_SIZE(p2_keymap), + .delay = 4, + .dbounce = 1, }; static struct platform_device kp_device = { diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index f1958e8..638490e 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -586,77 +587,53 @@ static int omap1_clk_set_rate(struct clk *-------------------------------------------------------------------------*/ #ifdef CONFIG_OMAP_RESET_CLOCKS -/* - * Resets some clocks that may be left on from bootloader, - * but leaves serial clocks on. See also omap_late_clk_reset(). - */ -static inline void omap1_early_clk_reset(void) -{ - //omap_writel(0x3 << 29, MOD_CONF_CTRL_0); -} -static int __init omap1_late_clk_reset(void) +static void __init omap1_clk_disable_unused(struct clk *clk) { - /* Turn off all unused clocks */ - struct clk *p; __u32 regval32; - /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */ - regval32 = omap_readw(SOFT_REQ_REG) & (1 << 4); - omap_writew(regval32, SOFT_REQ_REG); - omap_writew(0, SOFT_REQ_REG2); - - list_for_each_entry(p, &clocks, node) { - if (p->usecount > 0 || (p->flags & ALWAYS_ENABLED) || - p->enable_reg == 0) - continue; - - /* Clocks in the DSP domain need api_ck. Just assume bootloader - * has not enabled any DSP clocks */ - if ((u32)p->enable_reg == DSP_IDLECT2) { - printk(KERN_INFO "Skipping reset check for DSP domain " - "clock \"%s\"\n", p->name); - continue; - } + /* Clocks in the DSP domain need api_ck. Just assume bootloader + * has not enabled any DSP clocks */ + if ((u32)clk->enable_reg == DSP_IDLECT2) { + printk(KERN_INFO "Skipping reset check for DSP domain " + "clock \"%s\"\n", clk->name); + return; + } - /* Is the clock already disabled? */ - if (p->flags & ENABLE_REG_32BIT) { - if (p->flags & VIRTUAL_IO_ADDRESS) - regval32 = __raw_readl(p->enable_reg); - else - regval32 = omap_readl(p->enable_reg); - } else { - if (p->flags & VIRTUAL_IO_ADDRESS) - regval32 = __raw_readw(p->enable_reg); + /* Is the clock already disabled? */ + if (clk->flags & ENABLE_REG_32BIT) { + if (clk->flags & VIRTUAL_IO_ADDRESS) + regval32 = __raw_readl(clk->enable_reg); else - regval32 = omap_readw(p->enable_reg); - } - - if ((regval32 & (1 << p->enable_bit)) == 0) - continue; + regval32 = omap_readl(clk->enable_reg); + } else { + if (clk->flags & VIRTUAL_IO_ADDRESS) + regval32 = __raw_readw(clk->enable_reg); + else + regval32 = omap_readw(clk->enable_reg); + } - /* FIXME: This clock seems to be necessary but no-one - * has asked for its activation. */ - if (p == &tc2_ck // FIX: pm.c (SRAM), CCP, Camera - || p == &ck_dpll1out.clk // FIX: SoSSI, SSR - || p == &arm_gpio_ck // FIX: GPIO code for 1510 - ) { - printk(KERN_INFO "FIXME: Clock \"%s\" seems unused\n", - p->name); - continue; - } + if ((regval32 & (1 << clk->enable_bit)) == 0) + return; - printk(KERN_INFO "Disabling unused clock \"%s\"... ", p->name); - p->disable(p); - printk(" done\n"); + /* FIXME: This clock seems to be necessary but no-one + * has asked for its activation. */ + if (clk == &tc2_ck // FIX: pm.c (SRAM), CCP, Camera + || clk == &ck_dpll1out.clk // FIX: SoSSI, SSR + || clk == &arm_gpio_ck // FIX: GPIO code for 1510 + ) { + printk(KERN_INFO "FIXME: Clock \"%s\" seems unused\n", + clk->name); + return; } - return 0; + printk(KERN_INFO "Disabling unused clock \"%s\"... ", clk->name); + clk->disable(clk); + printk(" done\n"); } -late_initcall(omap1_late_clk_reset); #else -#define omap1_early_clk_reset() {} +#define omap1_clk_disable_unused NULL #endif static struct clk_functions omap1_clk_functions = { @@ -664,6 +641,7 @@ static struct clk_functions omap1_clk_fu .clk_disable = omap1_clk_disable, .clk_round_rate = omap1_clk_round_rate, .clk_set_rate = omap1_clk_set_rate, + .clk_disable_unused = omap1_clk_disable_unused, }; int __init omap1_clk_init(void) @@ -671,8 +649,13 @@ int __init omap1_clk_init(void) struct clk ** clkp; const struct omap_clock_config *info; int crystal_type = 0; /* Default 12 MHz */ + u32 reg; + + /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */ + reg = omap_readw(SOFT_REQ_REG) & (1 << 4); + omap_writew(reg, SOFT_REQ_REG); + omap_writew(0, SOFT_REQ_REG2); - omap1_early_clk_reset(); clk_init(&omap1_clk_functions); /* By default all idlect1 clocks are allowed to idle */ @@ -772,6 +755,12 @@ #if defined(CONFIG_MACH_OMAP_PERSEUS2) | omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL); #endif + /* Amstrad Delta wants BCLK high when inactive */ + if (machine_is_ams_delta()) + omap_writel(omap_readl(ULPD_CLOCK_CTRL) | + (1 << SDW_MCLK_INV_BIT), + ULPD_CLOCK_CTRL); + /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */ /* (on 730, bit 13 must not be cleared) */ if (cpu_is_omap730()) diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h index b7c6881..f7df002 100644 --- a/arch/arm/mach-omap1/clock.h +++ b/arch/arm/mach-omap1/clock.h @@ -89,6 +89,7 @@ #define EN_TC2_CK 4 #define EN_DSPTIMCK 5 /* Various register defines for clock controls scattered around OMAP chip */ +#define SDW_MCLK_INV_BIT 2 /* In ULPD_CLKC_CTRL */ #define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */ #define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */ #define SWD_ULPD_PLL_CLK_REQ 1 /* In SWD_CLK_DIV_CTRL_SEL */ @@ -741,6 +742,18 @@ static struct clk i2c_fck = { .disable = &omap1_clk_disable_generic, }; +static struct clk i2c_ick = { + .name = "i2c_ick", + .id = 1, + .flags = CLOCK_IN_OMAP16XX | + VIRTUAL_CLOCK | CLOCK_NO_IDLE_PARENT | + ALWAYS_ENABLED, + .parent = &armper_ck.clk, + .recalc = &followparent_recalc, + .enable = &omap1_clk_enable_generic, + .disable = &omap1_clk_disable_generic, +}; + static struct clk * onchip_clks[] = { /* non-ULPD clocks */ &ck_ref, @@ -790,6 +803,7 @@ static struct clk * onchip_clks[] = { /* Virtual clocks */ &virtual_ck_mpu, &i2c_fck, + &i2c_ick, }; #endif diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index fa74ef7..5432335 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c @@ -199,6 +199,17 @@ MUX_CFG("N14_1610_UWIRE_CS0", 8, 9, MUX_CFG("P15_1610_UWIRE_CS3", 8, 12, 1, 1, 22, 0, 1, 1, 1) MUX_CFG("N15_1610_UWIRE_CS1", 7, 18, 2, 1, 14, 0, NA, 0, 1) +/* OMAP-1610 SPI */ +MUX_CFG("U19_1610_SPIF_SCK", 7, 21, 6, 1, 15, 0, 1, 1, 1) +MUX_CFG("U18_1610_SPIF_DIN", 8, 0, 6, 1, 18, 1, 1, 0, 1) +MUX_CFG("P20_1610_SPIF_DIN", 6, 27, 4, 1, 7, 1, 1, 0, 1) +MUX_CFG("W21_1610_SPIF_DOUT", 8, 3, 6, 1, 19, 0, 1, 0, 1) +MUX_CFG("R18_1610_SPIF_DOUT", 7, 9, 3, 1, 11, 0, 1, 0, 1) +MUX_CFG("N14_1610_SPIF_CS0", 8, 9, 6, 1, 21, 0, 1, 1, 1) +MUX_CFG("N15_1610_SPIF_CS1", 7, 18, 6, 1, 14, 0, 1, 1, 1) +MUX_CFG("T19_1610_SPIF_CS2", 7, 15, 4, 1, 13, 0, 1, 1, 1) +MUX_CFG("P15_1610_SPIF_CS3", 8, 12, 3, 1, 22, 0, 1, 1, 1) + /* OMAP-1610 Flash */ MUX_CFG("L3_1610_FLASH_CS2B_OE",10, 6, 1, NA, 0, 0, NA, 0, 1) MUX_CFG("M8_1610_FLASH_CS2B_WE",10, 3, 1, NA, 0, 0, NA, 0, 1) diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 7993b7b..2db6b73 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c @@ -166,8 +166,8 @@ static struct omap_uart_config apollon_u static struct omap_mmc_config apollon_mmc_config __initdata = { .mmc [0] = { - .enabled = 0, - .wire4 = 0, + .enabled = 1, + .wire4 = 1, .wp_pin = -1, .power_pin = -1, .switch_pin = -1, @@ -257,6 +257,9 @@ static void __init omap_apollon_init(voi /* REVISIT: where's the correct place */ omap_cfg_reg(W19_24XX_SYS_NIRQ); + /* Use Interal loop-back in MMC/SDIO Module Input Clock selection */ + CONTROL_DEVCONF |= (1 << 24); + /* * Make sure the serial ports are muxed on at this point. * You have to mux them off in device drivers later on diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 4933fce..996aeda 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -245,6 +245,7 @@ static struct omap_kp_platform_data h4_k .rows = 6, .cols = 7, .keymap = h4_keymap, + .keymapsize = ARRAY_SIZE(h4_keymap), .rep = 1, .row_gpios = row_gpios, .col_gpios = col_gpios, diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index d1b648a..0de201c 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -32,10 +32,14 @@ #include "prcm-regs.h" #include "memory.h" #include "clock.h" +#undef DEBUG + //#define DOWN_VARIABLE_DPLL 1 /* Experimental */ static struct prcm_config *curr_prcm_set; static u32 curr_perf_level = PRCM_FULL_SPEED; +static struct clk *vclk; +static struct clk *sclk; /*------------------------------------------------------------------------- * Omap2 specific clock functions @@ -79,6 +83,14 @@ static void omap2_propagate_rate(struct propagate_rate(clk); } +static void omap2_set_osc_ck(int enable) +{ + if (enable) + PRCM_CLKSRC_CTRL &= ~(0x3 << 3); + else + PRCM_CLKSRC_CTRL |= 0x3 << 3; +} + /* Enable an APLL if off */ static void omap2_clk_fixed_enable(struct clk *clk) { @@ -101,12 +113,54 @@ static void omap2_clk_fixed_enable(struc else if (clk == &apll54_ck) cval = (1 << 6); - while (!CM_IDLEST_CKGEN & cval) { /* Wait for lock */ + while (!(CM_IDLEST_CKGEN & cval)) { /* Wait for lock */ ++i; udelay(1); - if (i == 100000) + if (i == 100000) { + printk(KERN_ERR "Clock %s didn't lock\n", clk->name); + break; + } + } +} + +static void omap2_clk_wait_ready(struct clk *clk) +{ + unsigned long reg, other_reg, st_reg; + u32 bit; + int i; + + reg = (unsigned long) clk->enable_reg; + if (reg == (unsigned long) &CM_FCLKEN1_CORE || + reg == (unsigned long) &CM_FCLKEN2_CORE) + other_reg = (reg & ~0xf0) | 0x10; + else if (reg == (unsigned long) &CM_ICLKEN1_CORE || + reg == (unsigned long) &CM_ICLKEN2_CORE) + other_reg = (reg & ~0xf0) | 0x00; + else + return; + + /* No check for DSS or cam clocks */ + if ((reg & 0x0f) == 0) { + if (clk->enable_bit <= 1 || clk->enable_bit == 31) + return; + } + + /* Check if both functional and interface clocks + * are running. */ + bit = 1 << clk->enable_bit; + if (!(__raw_readl(other_reg) & bit)) + return; + st_reg = (other_reg & ~0xf0) | 0x20; + i = 0; + while (!(__raw_readl(st_reg) & bit)) { + i++; + if (i == 100000) { + printk(KERN_ERR "Timeout enabling clock %s\n", clk->name); break; + } } + if (i) + pr_debug("Clock %s stable after %d loops\n", clk->name, i); } /* Enables clock without considering parent dependencies or use count @@ -119,6 +173,11 @@ static int _omap2_clk_enable(struct clk if (clk->flags & ALWAYS_ENABLED) return 0; + if (unlikely(clk == &osc_ck)) { + omap2_set_osc_ck(1); + return 0; + } + if (unlikely(clk->enable_reg == 0)) { printk(KERN_ERR "clock.c: Enable for %s without enable code\n", clk->name); @@ -133,6 +192,9 @@ static int _omap2_clk_enable(struct clk regval32 = __raw_readl(clk->enable_reg); regval32 |= (1 << clk->enable_bit); __raw_writel(regval32, clk->enable_reg); + wmb(); + + omap2_clk_wait_ready(clk); return 0; } @@ -155,6 +217,11 @@ static void _omap2_clk_disable(struct cl { u32 regval32; + if (unlikely(clk == &osc_ck)) { + omap2_set_osc_ck(0); + return; + } + if (clk->enable_reg == 0) return; @@ -166,6 +233,7 @@ static void _omap2_clk_disable(struct cl regval32 = __raw_readl(clk->enable_reg); regval32 &= ~(1 << clk->enable_bit); __raw_writel(regval32, clk->enable_reg); + wmb(); } static int omap2_clk_enable(struct clk *clk) @@ -695,12 +763,14 @@ static int omap2_clk_set_rate(struct clk reg_val = __raw_readl(reg); reg_val &= ~(field_mask << div_off); reg_val |= (field_val << div_off); - __raw_writel(reg_val, reg); + wmb(); clk->rate = clk->parent->rate / field_val; - if (clk->flags & DELAYED_APP) + if (clk->flags & DELAYED_APP) { __raw_writel(0x1, (void __iomem *)&PRCM_CLKCFG_CTRL); + wmb(); + } ret = 0; } else if (clk->set_rate != 0) ret = clk->set_rate(clk, rate); @@ -836,10 +906,12 @@ static int omap2_clk_set_parent(struct c reg_val = __raw_readl(reg) & ~(field_mask << src_off); reg_val |= (field_val << src_off); __raw_writel(reg_val, reg); + wmb(); - if (clk->flags & DELAYED_APP) + if (clk->flags & DELAYED_APP) { __raw_writel(0x1, (void __iomem *)&PRCM_CLKCFG_CTRL); - + wmb(); + } if (clk->usecount > 0) _omap2_clk_enable(clk); @@ -953,12 +1025,29 @@ static int omap2_select_table_rate(struc * Omap2 clock reset and init functions *-------------------------------------------------------------------------*/ +#ifdef CONFIG_OMAP_RESET_CLOCKS +static void __init omap2_clk_disable_unused(struct clk *clk) +{ + u32 regval32; + + regval32 = __raw_readl(clk->enable_reg); + if ((regval32 & (1 << clk->enable_bit)) == 0) + return; + + printk(KERN_INFO "Disabling unused clock \"%s\"\n", clk->name); + _omap2_clk_disable(clk); +} +#else +#define omap2_clk_disable_unused NULL +#endif + static struct clk_functions omap2_clk_functions = { .clk_enable = omap2_clk_enable, .clk_disable = omap2_clk_disable, .clk_round_rate = omap2_clk_round_rate, .clk_set_rate = omap2_clk_set_rate, .clk_set_parent = omap2_clk_set_parent, + .clk_disable_unused = omap2_clk_disable_unused, }; static void __init omap2_get_crystal_rate(struct clk *osc, struct clk *sys) @@ -984,27 +1073,19 @@ static void __init omap2_get_crystal_rat sys->rate = sclk; } -#ifdef CONFIG_OMAP_RESET_CLOCKS -static void __init omap2_disable_unused_clocks(void) +/* + * Set clocks for bypass mode for reboot to work. + */ +void omap2_clk_prepare_for_reboot(void) { - struct clk *ck; - u32 regval32; + u32 rate; - list_for_each_entry(ck, &clocks, node) { - if (ck->usecount > 0 || (ck->flags & ALWAYS_ENABLED) || - ck->enable_reg == 0) - continue; - - regval32 = __raw_readl(ck->enable_reg); - if ((regval32 & (1 << ck->enable_bit)) == 0) - continue; + if (vclk == NULL || sclk == NULL) + return; - printk(KERN_INFO "Disabling unused clock \"%s\"\n", ck->name); - _omap2_clk_disable(ck); - } + rate = clk_get_rate(sclk); + clk_set_rate(vclk, rate); } -late_initcall(omap2_disable_unused_clocks); -#endif /* * Switch the MPU rate if specified on cmdline. @@ -1077,8 +1158,27 @@ int __init omap2_clk_init(void) */ clk_enable(&sync_32k_ick); clk_enable(&omapctrl_ick); + + /* Force the APLLs active during bootup to avoid disabling and + * enabling them unnecessarily. */ + clk_enable(&apll96_ck); + clk_enable(&apll54_ck); + if (cpu_is_omap2430()) clk_enable(&sdrc_ick); + /* Avoid sleeping sleeping during omap2_clk_prepare_for_reboot() */ + vclk = clk_get(NULL, "virt_prcm_set"); + sclk = clk_get(NULL, "sys_ck"); + + return 0; +} + +static int __init omap2_disable_aplls(void) +{ + clk_disable(&apll96_ck); + clk_disable(&apll54_ck); + return 0; } +late_initcall(omap2_disable_aplls); diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 2781dfb..8816f5a 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -560,7 +560,7 @@ static struct clk osc_ck = { /* (*12, * .name = "osc_ck", .rate = 26000000, /* fixed up in clock init */ .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X | - RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES, + RATE_FIXED | RATE_PROPAGATES, }; /* With out modem likely 12MHz, with modem likely 13MHz */ @@ -1368,7 +1368,8 @@ static struct clk mcbsp5_fck = { }; static struct clk mcspi1_ick = { - .name = "mcspi1_ick", + .name = "mcspi_ick", + .id = 1, .parent = &l4_ck, .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, @@ -1377,7 +1378,8 @@ static struct clk mcspi1_ick = { }; static struct clk mcspi1_fck = { - .name = "mcspi1_fck", + .name = "mcspi_fck", + .id = 1, .parent = &func_48m_ck, .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE, @@ -1386,7 +1388,8 @@ static struct clk mcspi1_fck = { }; static struct clk mcspi2_ick = { - .name = "mcspi2_ick", + .name = "mcspi_ick", + .id = 2, .parent = &l4_ck, .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, @@ -1395,7 +1398,8 @@ static struct clk mcspi2_ick = { }; static struct clk mcspi2_fck = { - .name = "mcspi2_fck", + .name = "mcspi_fck", + .id = 2, .parent = &func_48m_ck, .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, .enable_reg = (void __iomem *)&CM_FCLKEN1_CORE, @@ -1404,7 +1408,8 @@ static struct clk mcspi2_fck = { }; static struct clk mcspi3_ick = { - .name = "mcspi3_ick", + .name = "mcspi_ick", + .id = 3, .parent = &l4_ck, .flags = CLOCK_IN_OMAP243X, .enable_reg = (void __iomem *)&CM_ICLKEN2_CORE, @@ -1413,7 +1418,8 @@ static struct clk mcspi3_ick = { }; static struct clk mcspi3_fck = { - .name = "mcspi3_fck", + .name = "mcspi_fck", + .id = 3, .parent = &func_48m_ck, .flags = CLOCK_IN_OMAP243X, .enable_reg = (void __iomem *)&CM_FCLKEN2_CORE, diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index c7a48f9..f4f04d8 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -13,6 +13,8 @@ #include #include #include #include +#include +#include #include #include @@ -41,6 +43,19 @@ #define GPMC_ECC_SIZE_CONFIG 0x1fc #define GPMC_CS0 0x60 #define GPMC_CS_SIZE 0x30 +#define GPMC_CS_NUM 8 +#define GPMC_MEM_START 0x00000000 +#define GPMC_MEM_END 0x3FFFFFFF +#define BOOT_ROM_SPACE 0x100000 /* 1MB */ + +#define GPMC_CHUNK_SHIFT 24 /* 16 MB */ +#define GPMC_SECTION_SHIFT 28 /* 128 MB */ + +static struct resource gpmc_mem_root; +static struct resource gpmc_cs_mem[GPMC_CS_NUM]; +static spinlock_t gpmc_mem_lock = SPIN_LOCK_UNLOCKED; +static unsigned gpmc_cs_map; + static void __iomem *gpmc_base = (void __iomem *) IO_ADDRESS(GPMC_BASE); static void __iomem *gpmc_cs_base = @@ -187,9 +202,168 @@ #endif return 0; } -unsigned long gpmc_cs_get_base_addr(int cs) +static void gpmc_cs_enable_mem(int cs, u32 base, u32 size) +{ + u32 l; + u32 mask; + + mask = (1 << GPMC_SECTION_SHIFT) - size; + l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7); + l &= ~0x3f; + l = (base >> GPMC_CHUNK_SHIFT) & 0x3f; + l &= ~(0x0f << 8); + l |= ((mask >> GPMC_CHUNK_SHIFT) & 0x0f) << 8; + l |= 1 << 6; /* CSVALID */ + gpmc_cs_write_reg(cs, GPMC_CS_CONFIG7, l); +} + +static void gpmc_cs_disable_mem(int cs) +{ + u32 l; + + l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7); + l &= ~(1 << 6); /* CSVALID */ + gpmc_cs_write_reg(cs, GPMC_CS_CONFIG7, l); +} + +static void gpmc_cs_get_memconf(int cs, u32 *base, u32 *size) +{ + u32 l; + u32 mask; + + l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7); + *base = (l & 0x3f) << GPMC_CHUNK_SHIFT; + mask = (l >> 8) & 0x0f; + *size = (1 << GPMC_SECTION_SHIFT) - (mask << GPMC_CHUNK_SHIFT); +} + +static int gpmc_cs_mem_enabled(int cs) +{ + u32 l; + + l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7); + return l & (1 << 6); +} + +static void gpmc_cs_set_reserved(int cs, int reserved) { - return (gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7) & 0x1f) << 24; + gpmc_cs_map &= ~(1 << cs); + gpmc_cs_map |= (reserved ? 1 : 0) << cs; +} + +static int gpmc_cs_reserved(int cs) +{ + return gpmc_cs_map & (1 << cs); +} + +static unsigned long gpmc_mem_align(unsigned long size) +{ + int order; + + size = (size - 1) >> (GPMC_CHUNK_SHIFT - 1); + order = GPMC_CHUNK_SHIFT - 1; + do { + size >>= 1; + order++; + } while (size); + size = 1 << order; + return size; +} + +static int gpmc_cs_insert_mem(int cs, unsigned long base, unsigned long size) +{ + struct resource *res = &gpmc_cs_mem[cs]; + int r; + + size = gpmc_mem_align(size); + spin_lock(&gpmc_mem_lock); + res->start = base; + res->end = base + size - 1; + r = request_resource(&gpmc_mem_root, res); + spin_unlock(&gpmc_mem_lock); + + return r; +} + +int gpmc_cs_request(int cs, unsigned long size, unsigned long *base) +{ + struct resource *res = &gpmc_cs_mem[cs]; + int r = -1; + + if (cs > GPMC_CS_NUM) + return -ENODEV; + + size = gpmc_mem_align(size); + if (size > (1 << GPMC_SECTION_SHIFT)) + return -ENOMEM; + + spin_lock(&gpmc_mem_lock); + if (gpmc_cs_reserved(cs)) { + r = -EBUSY; + goto out; + } + if (gpmc_cs_mem_enabled(cs)) + r = adjust_resource(res, res->start & ~(size - 1), size); + if (r < 0) + r = allocate_resource(&gpmc_mem_root, res, size, 0, ~0, + size, NULL, NULL); + if (r < 0) + goto out; + + gpmc_cs_enable_mem(cs, res->start, res->end - res->start + 1); + *base = res->start; + gpmc_cs_set_reserved(cs, 1); +out: + spin_unlock(&gpmc_mem_lock); + return r; +} + +void gpmc_cs_free(int cs) +{ + spin_lock(&gpmc_mem_lock); + if (cs >= GPMC_CS_NUM || !gpmc_cs_reserved(cs)) { + printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs); + BUG(); + spin_unlock(&gpmc_mem_lock); + return; + } + gpmc_cs_disable_mem(cs); + release_resource(&gpmc_cs_mem[cs]); + gpmc_cs_set_reserved(cs, 0); + spin_unlock(&gpmc_mem_lock); +} + +void __init gpmc_mem_init(void) +{ + int cs; + unsigned long boot_rom_space = 0; + + if (cpu_is_omap242x()) { + u32 l; + l = omap_readl(OMAP242X_CONTROL_STATUS); + /* In case of internal boot the 1st MB is redirected to the + * boot ROM memory space. + */ + if (l & (1 << 3)) + boot_rom_space = BOOT_ROM_SPACE; + } else + /* We assume internal boot if the mode can't be + * determined. + */ + boot_rom_space = BOOT_ROM_SPACE; + gpmc_mem_root.start = GPMC_MEM_START + boot_rom_space; + gpmc_mem_root.end = GPMC_MEM_END; + + /* Reserve all regions that has been set up by bootloader */ + for (cs = 0; cs < GPMC_CS_NUM; cs++) { + u32 base, size; + + if (!gpmc_cs_mem_enabled(cs)) + continue; + gpmc_cs_get_memconf(cs, &base, &size); + if (gpmc_cs_insert_mem(cs, base, size) < 0) + BUG(); + } } void __init gpmc_init(void) @@ -206,4 +380,6 @@ void __init gpmc_init(void) l &= 0x03 << 3; l |= (0x02 << 3) | (1 << 0); gpmc_write_reg(GPMC_SYSCONFIG, l); + + gpmc_mem_init(); } diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index dfc3b35..1ed2fff 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -41,18 +41,6 @@ static struct omap_irq_bank { .nr_irqs = 96, }, { /* XXX: DSP INTC */ - -#if 0 - /* - * Commented out for now until we fix the IVA clocking - */ -#ifdef CONFIG_ARCH_OMAP2420 - }, { - /* IVA INTC (2420 only) */ - .base_reg = OMAP24XX_IVA_INTC_BASE, - .nr_irqs = 16, /* Actually 32, but only 16 are used */ -#endif -#endif } }; diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 60ef084..f538d0f 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c @@ -104,6 +104,20 @@ MUX_CFG_24XX("P20_24XX_TSC_IRQ", 0x108, MUX_CFG_24XX("K15_24XX_UART3_TX", 0x118, 0, 0, 0, 1) MUX_CFG_24XX("K14_24XX_UART3_RX", 0x119, 0, 0, 0, 1) +/* MMC/SDIO */ +MUX_CFG_24XX("G19_24XX_MMC_CLKO", 0x0f3, 0, 0, 0, 1) +MUX_CFG_24XX("H18_24XX_MMC_CMD", 0x0f4, 0, 0, 0, 1) +MUX_CFG_24XX("F20_24XX_MMC_DAT0", 0x0f5, 0, 0, 0, 1) +MUX_CFG_24XX("H14_24XX_MMC_DAT1", 0x0f6, 0, 0, 0, 1) +MUX_CFG_24XX("E19_24XX_MMC_DAT2", 0x0f7, 0, 0, 0, 1) +MUX_CFG_24XX("D19_24XX_MMC_DAT3", 0x0f8, 0, 0, 0, 1) +MUX_CFG_24XX("F19_24XX_MMC_DAT_DIR0", 0x0f9, 0, 0, 0, 1) +MUX_CFG_24XX("E20_24XX_MMC_DAT_DIR1", 0x0fa, 0, 0, 0, 1) +MUX_CFG_24XX("F18_24XX_MMC_DAT_DIR2", 0x0fb, 0, 0, 0, 1) +MUX_CFG_24XX("E18_24XX_MMC_DAT_DIR3", 0x0fc, 0, 0, 0, 1) +MUX_CFG_24XX("G18_24XX_MMC_CMD_DIR", 0x0fd, 0, 0, 0, 1) +MUX_CFG_24XX("H15_24XX_MMC_CLKI", 0x0fe, 0, 0, 0, 1) + /* Keypad GPIO*/ MUX_CFG_24XX("T19_24XX_KBR0", 0x106, 3, 1, 1, 1) MUX_CFG_24XX("R19_24XX_KBR1", 0x107, 3, 1, 1, 1) diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index c2bf57e..90f5305 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c @@ -19,6 +19,8 @@ #include #include "prcm-regs.h" +extern void omap2_clk_prepare_for_reboot(void); + u32 omap_prcm_get_reset_sources(void) { return RM_RSTST_WKUP & 0x7f; @@ -28,12 +30,6 @@ EXPORT_SYMBOL(omap_prcm_get_reset_source /* Resets clock rates and reboots the system. Only called from system.h */ void omap_prcm_arch_reset(char mode) { - u32 rate; - struct clk *vclk, *sclk; - - vclk = clk_get(NULL, "virt_prcm_set"); - sclk = clk_get(NULL, "sys_ck"); - rate = clk_get_rate(sclk); - clk_set_rate(vclk, rate); /* go to bypass for OMAP limitation */ + omap2_clk_prepare_for_reboot(); RM_RSTCTRL_WKUP |= 2; } diff --git a/arch/arm/mach-pnx4008/clock.c b/arch/arm/mach-pnx4008/clock.c index f582ed2..daa8d3d 100644 --- a/arch/arm/mach-pnx4008/clock.c +++ b/arch/arm/mach-pnx4008/clock.c @@ -735,6 +735,16 @@ static struct clk uart6_ck = { .enable_reg = UARTCLKCTRL_REG, }; +static struct clk wdt_ck = { + .name = "wdt_ck", + .parent = &per_ck, + .flags = NEEDS_INITIALIZATION, + .round_rate = &on_off_round_rate, + .set_rate = &on_off_set_rate, + .enable_shift = 0, + .enable_reg = TIMCLKCTRL_REG, +}; + /* These clocks are visible outside this module * and can be initialized */ @@ -765,6 +775,7 @@ static struct clk *onchip_clks[] = { &uart4_ck, &uart5_ck, &uart6_ck, + &wdt_ck, }; static int local_clk_enable(struct clk *clk) diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index cce2657..337c01c 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -284,21 +284,9 @@ static struct pxaficp_platform_data corg /* * USB Device Controller */ -static void corgi_udc_command(int cmd) -{ - switch(cmd) { - case PXA2XX_UDC_CMD_CONNECT: - GPSR(CORGI_GPIO_USB_PULLUP) = GPIO_bit(CORGI_GPIO_USB_PULLUP); - break; - case PXA2XX_UDC_CMD_DISCONNECT: - GPCR(CORGI_GPIO_USB_PULLUP) = GPIO_bit(CORGI_GPIO_USB_PULLUP); - break; - } -} - static struct pxa2xx_udc_mach_info udc_info __initdata = { /* no connect GPIO; corgi can't tell connection status */ - .udc_command = corgi_udc_command, + .gpio_pullup = CORGI_GPIO_USB_PULLUP, }; @@ -350,7 +338,6 @@ static void __init corgi_init(void) corgi_ssp_set_machinfo(&corgi_ssp_machinfo); pxa_gpio_mode(CORGI_GPIO_IR_ON | GPIO_OUT); - pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT); pxa_gpio_mode(CORGI_GPIO_HSYNC | GPIO_IN); pxa_set_udc_info(&udc_info); diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index bbd138b..df37594 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig @@ -2,6 +2,13 @@ if ARCH_S3C2410 menu "S3C24XX Implementations" +config MACH_AML_M5900 + bool "AML M5900 Series" + select CPU_S3C2410 + help + Say Y here if you are using the American Microsystems M5900 Series + + config MACH_ANUBIS bool "Simtec Electronics ANUBIS" select CPU_S3C2440 @@ -126,6 +133,12 @@ config MACH_NEXCODER_2440 help Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board +config MACH_VSTMS + bool "VMSTMS" + select CPU_S3C2412 + help + Say Y here if you are using an VSTMS board + endmenu config S3C2410_CLOCK @@ -133,10 +146,24 @@ config S3C2410_CLOCK help Clock code for the S3C2410, and similar processors +config S3C2410_PM + bool + depends on CONFIG_PM + help + Power Management code common to S3C2410 and better + +config CPU_S3C2410_DMA + bool + depends on S3C2410_DMA && (CPU_S3C2410 || CPU_S3C2442) + default y if CPU_S3C2410 || CPU_S3C2442 + help + DMA device selection for S3C2410 and compatible CPUs + config CPU_S3C2410 bool depends on ARCH_S3C2410 select S3C2410_CLOCK + select S3C2410_PM help Support for S3C2410 and S3C2410A family from the S3C24XX line of Samsung Mobile CPUs. @@ -149,6 +176,13 @@ config CPU_S3C2412_ONLY !CPU_S3C2440 && !CPU_S3C2442 && CPU_S3C2412 default y if CPU_S3C2412 +config S3C2412_PM + bool + default y if PM + depends on CPU_S3C2412 + help + Internal config node to apply S3C2412 power management + config CPU_S3C2412 bool depends on ARCH_S3C2410 @@ -165,6 +199,7 @@ config CPU_S3C2440 bool depends on ARCH_S3C2410 select S3C2410_CLOCK + select S3C2410_PM select CPU_S3C244X help Support for S3C2440 Samsung Mobile CPU based systems. @@ -173,6 +208,7 @@ config CPU_S3C2442 bool depends on ARCH_S3C2420 select S3C2410_CLOCK + select S3C2410_PM select CPU_S3C244X help Support for S3C2442 Samsung Mobile CPU based systems. @@ -256,7 +292,7 @@ config S3C2410_PM_CHECK_CHUNKSIZE config PM_SIMTEC bool - depends on PM && (ARCH_BAST || MACH_VR1000) + depends on PM && (ARCH_BAST || MACH_VR1000 || MACH_AML_M5900) default y config S3C2410_LOWLEVEL_UART_PORT diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 0eadec9..d660133 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile @@ -9,6 +9,8 @@ obj-y := cpu.o irq.o time.o gpio.o clo obj-m := obj-n := obj- := +obj-dma-y := +obj-dma-n := # DMA obj-$(CONFIG_S3C2410_DMA) += dma.o @@ -20,6 +22,10 @@ # S3C2410 support files obj-$(CONFIG_CPU_S3C2410) += s3c2410.o obj-$(CONFIG_CPU_S3C2410) += s3c2410-gpio.o +obj-$(CONFIG_CPU_S3C2410) += s3c2410-irq.o + +obj-$(CONFIG_S3C2410_PM) += s3c2410-pm.o s3c2410-sleep.o +obj-$(CONFIG_CPU_S3C2410_DMA) += s3c2410-dma.o # Power Management support @@ -30,6 +36,9 @@ # S3C2412 support obj-$(CONFIG_CPU_S3C2412) += s3c2412.o obj-$(CONFIG_CPU_S3C2412) += s3c2412-irq.o obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o +obj-dma-$(CONFIG_CPU_S3C2412) += s3c2412-dma.o + +obj-$(CONFIG_S3C2412_PM) += s3c2412-pm.o # # S3C244X support @@ -47,6 +56,7 @@ obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o obj-$(CONFIG_CPU_S3C2440) += s3c2410-gpio.o +obj-dma-$(CONFIG_CPU_S3C2440) += s3c2440-dma.o # S3C2442 support @@ -57,8 +67,13 @@ # bast extras obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o +# merge in dma objects + +obj-y += $(obj-dma-y) + # machine specific support +obj-$(CONFIG_MACH_AML_M5900) += mach-amlm5900.o obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o obj-$(CONFIG_MACH_OSIRIS) += mach-osiris.o obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o @@ -71,5 +86,6 @@ obj-$(CONFIG_MACH_VR1000) += mach-vr1000 obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o obj-$(CONFIG_MACH_OTOM) += mach-otom.o obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o +obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o obj-$(CONFIG_MACH_SMDK) += common-smdk.o \ No newline at end of file diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c index def4441..440e9aa 100644 --- a/arch/arm/mach-s3c2410/bast-irq.c +++ b/arch/arm/mach-s3c2410/bast-irq.c @@ -18,10 +18,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Modifications: - * 08-Jan-2003 BJD Moved from central IRQ code - * 21-Aug-2005 BJD Fixed missing code and compile errors */ diff --git a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c index 1c3c6ad..9d4899e 100644 --- a/arch/arm/mach-s3c2410/cpu.c +++ b/arch/arm/mach-s3c2410/cpu.c @@ -124,6 +124,15 @@ static struct cpu_table cpu_ids[] __init .init = s3c2412_init, .name = name_s3c2412, }, + { /* a newer version of the s3c2412 */ + .idcode = 0x32412003, + .idmask = 0xffffffff, + .map_io = s3c2412_map_io, + .init_clocks = s3c2412_init_clocks, + .init_uarts = s3c2412_init_uarts, + .init = s3c2412_init, + .name = name_s3c2412, + }, { .idcode = 0x0, /* S3C2400 doesn't have an idcode */ .idmask = 0xffffffff, diff --git a/arch/arm/mach-s3c2410/devs.h b/arch/arm/mach-s3c2410/devs.h index 726e2ea..14fb0ba 100644 --- a/arch/arm/mach-s3c2410/devs.h +++ b/arch/arm/mach-s3c2410/devs.h @@ -8,11 +8,6 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. - * - * Modifications: - * 18-Aug-2004 BJD Created initial version - * 27-Aug-2004 BJD Added timers 0 through 3 - * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv */ #include diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index cc92a7b..d264bbb 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c @@ -1,35 +1,16 @@ -/* linux/arch/arm/mach-bast/dma.c +/* linux/arch/arm/mach-s3c2410/dma.c * - * (c) 2003-2005 Simtec Electronics + * (c) 2003-2005,2006 Simtec Electronics * Ben Dooks * * S3C2410 DMA core * - * http://www.simtec.co.uk/products/EB2410ITX/ + * http://armlinux.simtec.co.uk/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. - * - * Changelog: - * 27-Feb-2005 BJD Added kmem cache for dma descriptors - * 18-Nov-2004 BJD Removed error for loading onto stopped channel - * 10-Nov-2004 BJD Ensure all external symbols exported for modules - * 10-Nov-2004 BJD Use sys_device and sysdev_class for power management - * 08-Aug-2004 BJD Apply rmk's suggestions - * 21-Jul-2004 BJD Ported to linux 2.6 - * 12-Jul-2004 BJD Finished re-write and change of API - * 06-Jul-2004 BJD Rewrote dma code to try and cope with various problems - * 23-May-2003 BJD Created file - * 19-Aug-2003 BJD Cleanup, header fix, added URL - * - * This file is based on the Sangwook Lee/Samsung patches, re-written due - * to various ommisions from the code (such as flexible dma configuration) - * for use with the BAST system board. - * - * The re-write is pretty much complete, and should be good enough for any - * possible DMA function - */ +*/ #ifdef CONFIG_S3C2410_DMA_DEBUG @@ -55,10 +36,14 @@ #include #include #include +#include "dma.h" + /* io map for dma */ static void __iomem *dma_base; static kmem_cache_t *dma_kmem; +struct s3c24xx_dma_selection dma_sel; + /* dma channel state information */ struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS]; @@ -79,7 +64,6 @@ dma_wrreg(struct s3c2410_dma_chan *chan, pr_debug("writing %08x to register %08x\n",(unsigned int)val,reg); writel(val, dma_regaddr(chan, reg)); } - #endif #define dma_rdreg(chan, reg) readl((chan)->regs + (reg)) @@ -151,12 +135,20 @@ #define dbg_showregs(chan) do { } while( #define dbg_showchan(chan) do { } while(0) #endif /* CONFIG_S3C2410_DMA_DEBUG */ -#define check_channel(chan) \ - do { if ((chan) >= S3C2410_DMA_CHANNELS) { \ - printk(KERN_ERR "%s: invalid channel %d\n", __FUNCTION__, (chan)); \ - return -EINVAL; \ - } } while(0) +static struct s3c2410_dma_chan *dma_chan_map[DMACH_MAX]; +/* lookup_dma_channel + * + * change the dma channel number given into a real dma channel id +*/ + +static struct s3c2410_dma_chan *lookup_dma_channel(unsigned int channel) +{ + if (channel & DMACH_LOW_LEVEL) + return &s3c2410_chans[channel & ~DMACH_LOW_LEVEL]; + else + return dma_chan_map[channel]; +} /* s3c2410_dma_stats_timeout * @@ -321,8 +313,10 @@ static inline void s3c2410_dma_buffdone(struct s3c2410_dma_chan *chan, struct s3c2410_dma_buf *buf, enum s3c2410_dma_buffresult result) { +#if 0 pr_debug("callback_fn=%p, buf=%p, id=%p, size=%d, result=%d\n", chan->callback_fn, buf, buf->id, buf->size, result); +#endif if (chan->callback_fn != NULL) { (chan->callback_fn)(chan, buf->id, buf->size, result); @@ -439,7 +433,6 @@ s3c2410_dma_canload(struct s3c2410_dma_c return 0; } - /* s3c2410_dma_enqueue * * queue an given buffer for dma transfer. @@ -460,11 +453,12 @@ s3c2410_dma_canload(struct s3c2410_dma_c int s3c2410_dma_enqueue(unsigned int channel, void *id, dma_addr_t data, int size) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); struct s3c2410_dma_buf *buf; unsigned long flags; - check_channel(channel); + if (chan == NULL) + return -EINVAL; pr_debug("%s: id=%p, data=%08x, size=%d\n", __FUNCTION__, id, (unsigned int)data, size); @@ -562,8 +556,10 @@ s3c2410_dma_freebuf(struct s3c2410_dma_b static inline void s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan) { +#if 0 pr_debug("dma%d: s3c2410_dma_lastxfer: load_state %d\n", chan->number, chan->load_state); +#endif switch (chan->load_state) { case S3C2410_DMALOAD_NONE: @@ -718,7 +714,8 @@ s3c2410_dma_irq(int irq, void *devpw, st if (chan->load_state == S3C2410_DMALOAD_NONE) { pr_debug("dma%d: end of transfer, stopping channel (%ld)\n", chan->number, jiffies); - s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_STOP); + s3c2410_dma_ctrl(chan->number | DMACH_LOW_LEVEL, + S3C2410_DMAOP_STOP); } } @@ -726,37 +723,34 @@ s3c2410_dma_irq(int irq, void *devpw, st return IRQ_HANDLED; } +static struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel); + /* s3c2410_request_dma * * get control of an dma channel */ -int s3c2410_dma_request(unsigned int channel, struct s3c2410_dma_client *client, +int s3c2410_dma_request(unsigned int channel, + struct s3c2410_dma_client *client, void *dev) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + struct s3c2410_dma_chan *chan; unsigned long flags; int err; pr_debug("dma%d: s3c2410_request_dma: client=%s, dev=%p\n", channel, client->name, dev); - check_channel(channel); - local_irq_save(flags); - dbg_showchan(chan); - - if (chan->in_use) { - if (client != chan->client) { - printk(KERN_ERR "dma%d: already in use\n", channel); - local_irq_restore(flags); - return -EBUSY; - } else { - printk(KERN_ERR "dma%d: client already has channel\n", channel); - } + chan = s3c2410_dma_map_channel(channel); + if (chan == NULL) { + local_irq_restore(flags); + return -EBUSY; } + dbg_showchan(chan); + chan->client = client; chan->in_use = 1; @@ -809,14 +803,14 @@ EXPORT_SYMBOL(s3c2410_dma_request); int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); unsigned long flags; - check_channel(channel); + if (chan == NULL) + return -EINVAL; local_irq_save(flags); - if (chan->client != client) { printk(KERN_WARNING "dma%d: possible free from different client (channel %p, passed %p)\n", channel, chan->client, client); @@ -837,8 +831,12 @@ int s3c2410_dma_free(dmach_t channel, st if (chan->irq_claimed) free_irq(chan->irq, (void *)chan); + chan->irq_claimed = 0; + if (!(channel & DMACH_LOW_LEVEL)) + dma_chan_map[channel] = NULL; + local_irq_restore(flags); return 0; @@ -848,8 +846,8 @@ EXPORT_SYMBOL(s3c2410_dma_free); static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan) { - unsigned long tmp; unsigned long flags; + unsigned long tmp; pr_debug("%s:\n", __FUNCTION__); @@ -997,9 +995,10 @@ s3c2410_dma_started(struct s3c2410_dma_c int s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); - check_channel(channel); + if (chan == NULL) + return -EINVAL; switch (op) { case S3C2410_DMAOP_START: @@ -1046,12 +1045,19 @@ int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n", __FUNCTION__, channel, xferunit, dcon); - check_channel(channel); + if (chan == NULL) + return -EINVAL; + + printk("Initial dcon is %08x\n", dcon); + + dcon |= chan->dcon & dma_sel.dcon_mask; + + printk("New dcon is %08x\n", dcon); switch (xferunit) { case 1: @@ -1086,9 +1092,10 @@ EXPORT_SYMBOL(s3c2410_dma_config); int s3c2410_dma_setflags(dmach_t channel, unsigned int flags) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); - check_channel(channel); + if (chan == NULL) + return -EINVAL; pr_debug("%s: chan=%p, flags=%08x\n", __FUNCTION__, chan, flags); @@ -1106,9 +1113,10 @@ EXPORT_SYMBOL(s3c2410_dma_setflags); int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); - check_channel(channel); + if (chan == NULL) + return -EINVAL; pr_debug("%s: chan=%p, op rtn=%p\n", __FUNCTION__, chan, rtn); @@ -1121,9 +1129,10 @@ EXPORT_SYMBOL(s3c2410_dma_set_opfn); int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); - check_channel(channel); + if (chan == NULL) + return -EINVAL; pr_debug("%s: chan=%p, callback rtn=%p\n", __FUNCTION__, chan, rtn); @@ -1153,9 +1162,10 @@ int s3c2410_dma_devconfig(int channel, int hwcfg, unsigned long devaddr) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); - check_channel(channel); + if (chan == NULL) + return -EINVAL; pr_debug("%s: source=%d, hwcfg=%08x, devaddr=%08lx\n", __FUNCTION__, (int)source, hwcfg, devaddr); @@ -1200,9 +1210,10 @@ EXPORT_SYMBOL(s3c2410_dma_devconfig); int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); - check_channel(channel); + if (chan == NULL) + return -EINVAL; if (src != NULL) *src = dma_rdreg(chan, S3C2410_DMA_DCSRC); @@ -1252,7 +1263,7 @@ #define s3c2410_dma_suspend NULL #define s3c2410_dma_resume NULL #endif /* CONFIG_PM */ -static struct sysdev_class dma_sysclass = { +struct sysdev_class dma_sysclass = { set_kset_name("s3c24xx-dma"), .suspend = s3c2410_dma_suspend, .resume = s3c2410_dma_resume, @@ -1265,7 +1276,6 @@ static void s3c2410_dma_cache_ctor(void memset(p, 0, sizeof(struct s3c2410_dma_buf)); } - /* initialisation code */ static int __init s3c2410_init_dma(void) @@ -1274,7 +1284,7 @@ static int __init s3c2410_init_dma(void) int channel; int ret; - printk("S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics\n"); + printk("S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics\n"); dma_base = ioremap(S3C24XX_PA_DMA, 0x200); if (dma_base == NULL) { @@ -1282,6 +1292,8 @@ static int __init s3c2410_init_dma(void) return -ENOMEM; } + printk("Registering sysclass\n"); + ret = sysdev_class_register(&dma_sysclass); if (ret != 0) { printk(KERN_ERR "dma sysclass registration failed\n"); @@ -1335,4 +1347,95 @@ static int __init s3c2410_init_dma(void) return ret; } -__initcall(s3c2410_init_dma); +core_initcall(s3c2410_init_dma); + +static inline int is_channel_valid(unsigned int channel) +{ + return (channel & DMA_CH_VALID); +} + +/* s3c2410_dma_map_channel() + * + * turn the virtual channel number into a real, and un-used hardware + * channel. + * + * currently this code uses first-free channel from the specified harware + * map, not taking into account anything that the board setup code may + * have to say about the likely peripheral set to be in use. +*/ + +struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel) +{ + struct s3c24xx_dma_map *ch_map; + struct s3c2410_dma_chan *dmach; + int ch; + + if (dma_sel.map == NULL || channel > dma_sel.map_size) + return NULL; + + ch_map = dma_sel.map + channel; + + for (ch = 0; ch < S3C2410_DMA_CHANNELS; ch++) { + if (!is_channel_valid(ch_map->channels[ch])) + continue; + + if (s3c2410_chans[ch].in_use == 0) { + printk("mapped channel %d to %d\n", channel, ch); + break; + } + } + + if (ch >= S3C2410_DMA_CHANNELS) + return NULL; + + /* update our channel mapping */ + + dmach = &s3c2410_chans[ch]; + dma_chan_map[channel] = dmach; + + /* select the channel */ + + (dma_sel.select)(dmach, ch_map); + + return dmach; +} + +static void s3c24xx_dma_show_ch(struct s3c24xx_dma_map *map, int ch) +{ + /* show the channel configuration */ + + printk("%2d: %20s, channels %c%c%c%c\n", ch, map->name, + (is_channel_valid(map->channels[0]) ? '0' : '-'), + (is_channel_valid(map->channels[1]) ? '1' : '-'), + (is_channel_valid(map->channels[2]) ? '2' : '-'), + (is_channel_valid(map->channels[3]) ? '3' : '-')); +} + +static int s3c24xx_dma_check_entry(struct s3c24xx_dma_map *map, int ch) +{ + if (1) + s3c24xx_dma_show_ch(map, ch); + + return 0; +} + +int __init s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel) +{ + struct s3c24xx_dma_map *nmap; + size_t map_sz = sizeof(*nmap) * sel->map_size; + int ptr; + + nmap = kmalloc(map_sz, GFP_KERNEL); + if (nmap == NULL) + return -ENOMEM; + + memcpy(nmap, sel->map, map_sz); + memcpy(&dma_sel, sel, sizeof(*sel)); + + dma_sel.map = nmap; + + for (ptr = 0; ptr < sel->map_size; ptr++) + s3c24xx_dma_check_entry(nmap+ptr, ptr); + + return 0; +} diff --git a/arch/arm/mach-s3c2410/dma.h b/arch/arm/mach-s3c2410/dma.h new file mode 100644 index 0000000..0ebfe0a --- /dev/null +++ b/arch/arm/mach-s3c2410/dma.h @@ -0,0 +1,45 @@ +/* arch/arm/mach-s3c2410/dma.h + * + * Copyright (C) 2006 Simtec Electronics + * Ben Dooks + * + * Samsung S3C24XX DMA support + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +extern struct sysdev_class dma_sysclass; +extern struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS]; + +#define DMA_CH_VALID (1<<31) + +struct s3c24xx_dma_addr { + unsigned long from; + unsigned long to; +}; + +/* struct s3c24xx_dma_map + * + * this holds the mapping information for the channel selected + * to be connected to the specified device +*/ + +struct s3c24xx_dma_map { + const char *name; + struct s3c24xx_dma_addr hw_addr; + + unsigned long channels[S3C2410_DMA_CHANNELS]; +}; + +struct s3c24xx_dma_selection { + struct s3c24xx_dma_map *map; + unsigned long map_size; + unsigned long dcon_mask; + + void (*select)(struct s3c2410_dma_chan *chan, + struct s3c24xx_dma_map *map); +}; + +extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); diff --git a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c index cd39e86..db6393c 100644 --- a/arch/arm/mach-s3c2410/gpio.c +++ b/arch/arm/mach-s3c2410/gpio.c @@ -18,21 +18,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Changelog - * 13-Sep-2004 BJD Implemented change of MISCCR - * 14-Sep-2004 BJD Added getpin call - * 14-Sep-2004 BJD Fixed bug in setpin() call - * 30-Sep-2004 BJD Fixed cfgpin() mask bug - * 01-Oct-2004 BJD Added getcfg() to get pin configuration - * 01-Oct-2004 BJD Fixed mask bug in pullup() call - * 01-Oct-2004 BJD Added getirq() to turn pin into irqno - * 04-Oct-2004 BJD Added irq filter controls for GPIO - * 05-Nov-2004 BJD EXPORT_SYMBOL() added for all code - * 13-Mar-2005 BJD Updates for __iomem - * 26-Oct-2005 BJD Added generic configuration types - * 15-Jan-2006 LCVR Added support for the S3C2400 - */ +*/ #include diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c index cd6139b..3e9f346 100644 --- a/arch/arm/mach-s3c2410/irq.c +++ b/arch/arm/mach-s3c2410/irq.c @@ -181,17 +181,19 @@ s3c_irq_unmask(unsigned int irqno) } struct irqchip s3c_irq_level_chip = { - .ack = s3c_irq_maskack, - .mask = s3c_irq_mask, - .unmask = s3c_irq_unmask, - .set_wake = s3c_irq_wake + .name = "s3c-level", + .ack = s3c_irq_maskack, + .mask = s3c_irq_mask, + .unmask = s3c_irq_unmask, + .set_wake = s3c_irq_wake }; static struct irqchip s3c_irq_chip = { - .ack = s3c_irq_ack, - .mask = s3c_irq_mask, - .unmask = s3c_irq_unmask, - .set_wake = s3c_irq_wake + .name = "s3c", + .ack = s3c_irq_ack, + .mask = s3c_irq_mask, + .unmask = s3c_irq_unmask, + .set_wake = s3c_irq_wake }; static void @@ -343,19 +345,21 @@ s3c_irqext_type(unsigned int irq, unsign } static struct irqchip s3c_irqext_chip = { - .mask = s3c_irqext_mask, - .unmask = s3c_irqext_unmask, - .ack = s3c_irqext_ack, - .set_type = s3c_irqext_type, - .set_wake = s3c_irqext_wake + .name = "s3c-ext", + .mask = s3c_irqext_mask, + .unmask = s3c_irqext_unmask, + .ack = s3c_irqext_ack, + .set_type = s3c_irqext_type, + .set_wake = s3c_irqext_wake }; static struct irqchip s3c_irq_eint0t4 = { - .ack = s3c_irq_ack, - .mask = s3c_irq_mask, - .unmask = s3c_irq_unmask, - .set_wake = s3c_irq_wake, - .set_type = s3c_irqext_type, + .name = "s3c-ext0", + .ack = s3c_irq_ack, + .mask = s3c_irq_mask, + .unmask = s3c_irq_unmask, + .set_wake = s3c_irq_wake, + .set_type = s3c_irqext_type, }; /* mask values for the parent registers for each of the interrupt types */ @@ -387,9 +391,10 @@ s3c_irq_uart0_ack(unsigned int irqno) } static struct irqchip s3c_irq_uart0 = { - .mask = s3c_irq_uart0_mask, - .unmask = s3c_irq_uart0_unmask, - .ack = s3c_irq_uart0_ack, + .name = "s3c-uart0", + .mask = s3c_irq_uart0_mask, + .unmask = s3c_irq_uart0_unmask, + .ack = s3c_irq_uart0_ack, }; /* UART1 */ @@ -413,9 +418,10 @@ s3c_irq_uart1_ack(unsigned int irqno) } static struct irqchip s3c_irq_uart1 = { - .mask = s3c_irq_uart1_mask, - .unmask = s3c_irq_uart1_unmask, - .ack = s3c_irq_uart1_ack, + .name = "s3c-uart1", + .mask = s3c_irq_uart1_mask, + .unmask = s3c_irq_uart1_unmask, + .ack = s3c_irq_uart1_ack, }; /* UART2 */ @@ -439,9 +445,10 @@ s3c_irq_uart2_ack(unsigned int irqno) } static struct irqchip s3c_irq_uart2 = { - .mask = s3c_irq_uart2_mask, - .unmask = s3c_irq_uart2_unmask, - .ack = s3c_irq_uart2_ack, + .name = "s3c-uart2", + .mask = s3c_irq_uart2_mask, + .unmask = s3c_irq_uart2_unmask, + .ack = s3c_irq_uart2_ack, }; /* ADC and Touchscreen */ @@ -465,9 +472,10 @@ s3c_irq_adc_ack(unsigned int irqno) } static struct irqchip s3c_irq_adc = { - .mask = s3c_irq_adc_mask, - .unmask = s3c_irq_adc_unmask, - .ack = s3c_irq_adc_ack, + .name = "s3c-adc", + .mask = s3c_irq_adc_mask, + .unmask = s3c_irq_adc_unmask, + .ack = s3c_irq_adc_ack, }; /* irq demux for adc */ @@ -569,23 +577,104 @@ s3c_irq_demux_uart2(unsigned int irq, } static void -s3c_irq_demux_extint(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) +s3c_irq_demux_extint8(unsigned int irq, + struct irqdesc *desc, + struct pt_regs *regs) { unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND); unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK); eintpnd &= ~eintmsk; + eintpnd &= ~0xff; /* ignore lower irqs */ - if (eintpnd) { - irq = fls(eintpnd); - irq += (IRQ_EINT4 - (4 + 1)); + /* we may as well handle all the pending IRQs here */ + while (eintpnd) { + irq = __ffs(eintpnd); + eintpnd &= ~(1< + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * @History: + * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by + * Ben Dooks + * + ***********************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "devs.h" +#include "cpu.h" + +#ifdef CONFIG_MTD_PARTITIONS + +#include +#include +#include +#include + +static struct resource amlm5900_nor_resource = { + .start = 0x00000000, + .end = 0x01000000 - 1, + .flags = IORESOURCE_MEM, +}; + + + +static struct mtd_partition amlm5900_mtd_partitions[] = { + { + .name = "System", + .size = 0x240000, + .offset = 0, + .mask_flags = MTD_WRITEABLE, /* force read-only */ + }, { + .name = "Kernel", + .size = 0x100000, + .offset = MTDPART_OFS_APPEND, + }, { + .name = "Ramdisk", + .size = 0x300000, + .offset = MTDPART_OFS_APPEND, + }, { + .name = "JFFS2", + .size = 0x9A0000, + .offset = MTDPART_OFS_APPEND, + }, { + .name = "Settings", + .size = MTDPART_SIZ_FULL, + .offset = MTDPART_OFS_APPEND, + } +}; + +static struct physmap_flash_data amlm5900_flash_data = { + .width = 2, + .parts = amlm5900_mtd_partitions, + .nr_parts = ARRAY_SIZE(amlm5900_mtd_partitions), +}; + +static struct platform_device amlm5900_device_nor = { + .name = "physmap-flash", + .id = 0, + .dev = { + .platform_data = &amlm5900_flash_data, + }, + .num_resources = 1, + .resource = &amlm5900_nor_resource, +}; +#endif + +static struct map_desc amlm5900_iodesc[] __initdata = { + { + .virtual = (u32)S3C24XX_VA_SPI, + .pfn = __phys_to_pfn(S3C2410_PA_SPI), + .length = SZ_1M, + .type = MT_DEVICE + } +}; + +#define UCON S3C2410_UCON_DEFAULT +#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB +#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE + +static struct s3c2410_uartcfg amlm5900_uartcfgs[] = { + [0] = { + .hwport = 0, + .flags = 0, + .ucon = UCON, + .ulcon = ULCON, + .ufcon = UFCON, + }, + [1] = { + .hwport = 1, + .flags = 0, + .ucon = UCON, + .ulcon = ULCON, + .ufcon = UFCON, + }, + [2] = { + .hwport = 2, + .flags = 0, + .ucon = UCON, + .ulcon = ULCON, + .ufcon = UFCON, + } +}; + + +static struct platform_device *amlm5900_devices[] __initdata = { +#ifdef CONFIG_FB_S3C2410 + &s3c_device_lcd, +#endif + &s3c_device_adc, + &s3c_device_wdt, + &s3c_device_i2c, + &s3c_device_usb, + &s3c_device_rtc, + &s3c_device_usbgadget, + &s3c_device_sdi, +#ifdef CONFIG_MTD_PARTITIONS + &amlm5900_device_nor, +#endif +}; + +static struct s3c24xx_board amlm5900_board __initdata = { + .devices = amlm5900_devices, + .devices_count = ARRAY_SIZE(amlm5900_devices) +}; + +void __init amlm5900_map_io(void) +{ + s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc)); + s3c24xx_init_clocks(0); + s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs)); + s3c24xx_set_board(&amlm5900_board); +} + +#ifdef CONFIG_FB_S3C2410 +static struct s3c2410fb_mach_info __initdata amlm5900_lcd_info = { + .width = 160, + .height = 160, + +/* commented out until stn patch is submitted +* .type = S3C2410_LCDCON1_STN4, +*/ + .gpccon = 0xaaaaaaaa, + .gpccon_mask = 0xffffffff, + .gpcup = 0x0000ffff, + .gpcup_mask = 0xffffffff, + + .gpdcon = 0xaaaaaaaa, + .gpdcon_mask = 0xffffffff, + .gpdup = 0x0000ffff, + .gpdup_mask = 0xffffffff, + + .xres = { + .min = 160, + .max = 160, + .defval = 160, + }, + + .yres = { + .min = 160, + .max = 160, + .defval = 160, + }, + + .bpp = { + .min = 4, + .max = 4, + .defval = 4, + }, + + .regs = { + .lcdcon1 = 0x00008225, + .lcdcon2 = 0x0027c000, + .lcdcon3 = 0x00182708, + .lcdcon4 = 0x00000002, + .lcdcon5 = 0x00000001, + } +}; +#endif + +static irqreturn_t +amlm5900_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) +{ + return IRQ_HANDLED; +} + +static void amlm5900_init_pm(void) +{ + int ret = 0; + + ret = request_irq(IRQ_EINT9, &amlm5900_wake_interrupt, + IRQF_TRIGGER_RISING | IRQF_SHARED, + "amlm5900_wakeup", &amlm5900_wake_interrupt); + if (ret != 0) { + printk(KERN_ERR "AML-M5900: no wakeup irq, %d?\n", ret); + } else { + enable_irq_wake(IRQ_EINT9); + /* configure the suspend/resume status pin */ + s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPF2_OUTP); + s3c2410_gpio_pullup(S3C2410_GPF2, 0); + } +} +static void __init amlm5900_init(void) +{ + amlm5900_init_pm(); +#ifdef CONFIG_FB_S3C2410 + s3c24xx_fb_set_platdata(&amlm5900_lcd_info); +#endif +} + +MACHINE_START(AML_M5900, "AML_M5900") + .phys_io = S3C2410_PA_UART, + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, + .boot_params = S3C2410_SDRAM_PA + 0x100, + .map_io = amlm5900_map_io, + .init_irq = s3c24xx_init_irq, + .init_machine = amlm5900_init, + .timer = &s3c24xx_timer, +MACHINE_END diff --git a/arch/arm/mach-s3c2410/mach-anubis.c b/arch/arm/mach-s3c2410/mach-anubis.c index 60641d4..e94cdcd 100644 --- a/arch/arm/mach-s3c2410/mach-anubis.c +++ b/arch/arm/mach-s3c2410/mach-anubis.c @@ -4,15 +4,9 @@ * http://armlinux.simtec.co.uk/ * Ben Dooks * - * - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. - * - * Modifications: - * 02-May-2005 BJD Copied from mach-bast.c - * 20-Sep-2005 BJD Added static to non-exported items */ #include diff --git a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c index d661c6b..e2205ff 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2440.c +++ b/arch/arm/mach-s3c2410/mach-smdk2440.c @@ -11,15 +11,6 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Modifications: - * 01-Nov-2004 BJD Initial version - * 12-Nov-2004 BJD Updated for release - * 04-Jan-2005 BJD Fixes for pre-release - * 22-Feb-2005 BJD Updated for 2.6.11-rc5 relesa - * 10-Mar-2005 LCVR Replaced S3C2410_VA by S3C24XX_VA - * 14-Mar-2005 BJD void __iomem fixes - * 20-Sep-2005 BJD Added static to non-exported items - * 26-Oct-2005 BJD Added framebuffer data */ #include diff --git a/arch/arm/mach-s3c2410/mach-vstms.c b/arch/arm/mach-s3c2410/mach-vstms.c new file mode 100644 index 0000000..ea554e7 --- /dev/null +++ b/arch/arm/mach-s3c2410/mach-vstms.c @@ -0,0 +1,168 @@ +/* linux/arch/arm/mach-s3c2410/mach-vstms.c + * + * (C) 2006 Thomas Gleixner + * + * Derived from mach-smdk2413.c - (C) 2006 Simtec Electronics + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include "s3c2410.h" +#include "s3c2412.h" +#include "clock.h" +#include "devs.h" +#include "cpu.h" + + +static struct map_desc vstms_iodesc[] __initdata = { +}; + +static struct s3c2410_uartcfg vstms_uartcfgs[] __initdata = { + [0] = { + .hwport = 0, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x03, + .ufcon = 0x51, + }, + [1] = { + .hwport = 1, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x03, + .ufcon = 0x51, + }, + [2] = { + .hwport = 2, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x03, + .ufcon = 0x51, + } +}; + +static struct mtd_partition vstms_nand_part[] = { + [0] = { + .name = "Boot Agent", + .size = 0x7C000, + .offset = 0, + }, + [1] = { + .name = "UBoot Config", + .offset = 0x7C000, + .size = 0x4000, + }, + [2] = { + .name = "Kernel", + .offset = 0x80000, + .size = 0x200000, + }, + [3] = { + .name = "RFS", + .offset = 0x280000, + .size = 0x3d80000, + }, +}; + +static struct s3c2410_nand_set vstms_nand_sets[] = { + [0] = { + .name = "NAND", + .nr_chips = 1, + .nr_partitions = ARRAY_SIZE(vstms_nand_part), + .partitions = vstms_nand_part, + }, +}; + +/* choose a set of timings which should suit most 512Mbit + * chips and beyond. +*/ + +static struct s3c2410_platform_nand vstms_nand_info = { + .tacls = 20, + .twrph0 = 60, + .twrph1 = 20, + .nr_sets = ARRAY_SIZE(vstms_nand_sets), + .sets = vstms_nand_sets, +}; + +static struct platform_device *vstms_devices[] __initdata = { + &s3c_device_usb, + &s3c_device_wdt, + &s3c_device_i2c, + &s3c_device_iis, + &s3c_device_rtc, + &s3c_device_nand, +}; + +static struct s3c24xx_board vstms_board __initdata = { + .devices = vstms_devices, + .devices_count = ARRAY_SIZE(vstms_devices) +}; + +static void __init vstms_fixup(struct machine_desc *desc, + struct tag *tags, char **cmdline, + struct meminfo *mi) +{ + if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { + mi->nr_banks=1; + mi->bank[0].start = 0x30000000; + mi->bank[0].size = SZ_64M; + mi->bank[0].node = 0; + } +} + +static void __init vstms_map_io(void) +{ + s3c_device_nand.dev.platform_data = &vstms_nand_info; + + s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc)); + s3c24xx_init_clocks(12000000); + s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs)); + s3c24xx_set_board(&vstms_board); +} + +MACHINE_START(VSTMS, "VSTMS") + .phys_io = S3C2410_PA_UART, + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, + .boot_params = S3C2410_SDRAM_PA + 0x100, + + .fixup = vstms_fixup, + .init_irq = s3c24xx_init_irq, + .map_io = vstms_map_io, + .timer = &s3c24xx_timer, +MACHINE_END diff --git a/arch/arm/mach-s3c2410/pm-simtec.c b/arch/arm/mach-s3c2410/pm-simtec.c index 7b24456..42cd05e 100644 --- a/arch/arm/mach-s3c2410/pm-simtec.c +++ b/arch/arm/mach-s3c2410/pm-simtec.c @@ -49,7 +49,8 @@ static __init int pm_simtec_init(void) /* check which machine we are running on */ if (!machine_is_bast() && !machine_is_vr1000() && - !machine_is_anubis() && !machine_is_osiris()) + !machine_is_anubis() && !machine_is_osiris() && + !machine_is_aml_m5900()) return 0; printk(KERN_INFO "Simtec Board Power Manangement" COPYRIGHT "\n"); diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c index a589fe7..b49a0b3 100644 --- a/arch/arm/mach-s3c2410/pm.c +++ b/arch/arm/mach-s3c2410/pm.c @@ -1,9 +1,9 @@ /* linux/arch/arm/mach-s3c2410/pm.c * - * Copyright (c) 2004 Simtec Electronics + * Copyright (c) 2004,2006 Simtec Electronics * Ben Dooks * - * S3C2410 Power Manager (Suspend-To-RAM) support + * S3C24XX Power Manager (Suspend-To-RAM) support * * See Documentation/arm/Samsung-S3C24XX/Suspend.txt for more information * @@ -24,9 +24,6 @@ * Parts based on arch/arm/mach-pxa/pm.c * * Thanks to Dimitry Andric for debugging - * - * Modifications: - * 10-Mar-2005 LCVR Changed S3C2410_VA_UART to S3C24XX_VA_UART */ #include @@ -38,6 +35,7 @@ #include #include #include +#include #include #include @@ -55,14 +53,6 @@ #include "pm.h" unsigned long s3c_pm_flags; -/* cache functions from arch/arm/mm/proc-arm920.S */ - -#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH -extern void arm920_flush_kern_cache_all(void); -#else -static void arm920_flush_kern_cache_all(void) { } -#endif - #define PFX "s3c24xx-pm: " static struct sleep_save core_save[] = { @@ -92,19 +82,6 @@ static struct sleep_save core_save[] = { SAVE_ITEM(S3C2410_REFRESH), }; -/* this lot should be really saved by the IRQ code */ -static struct sleep_save irq_save[] = { - SAVE_ITEM(S3C2410_EXTINT0), - SAVE_ITEM(S3C2410_EXTINT1), - SAVE_ITEM(S3C2410_EXTINT2), - SAVE_ITEM(S3C2410_EINFLT0), - SAVE_ITEM(S3C2410_EINFLT1), - SAVE_ITEM(S3C2410_EINFLT2), - SAVE_ITEM(S3C2410_EINFLT3), - SAVE_ITEM(S3C2410_EINTMASK), - SAVE_ITEM(S3C2410_INTMSK) -}; - static struct sleep_save gpio_save[] = { SAVE_ITEM(S3C2410_GPACON), SAVE_ITEM(S3C2410_GPADAT), @@ -165,7 +142,7 @@ #endif extern void printascii(const char *); -static void pm_dbg(const char *fmt, ...) +void pm_dbg(const char *fmt, ...) { va_list va; char buff[256]; @@ -509,6 +486,9 @@ static void s3c2410_pm_configure_extint( } } +void (*pm_cpu_prep)(void); +void (*pm_cpu_sleep)(void); + #define any_allowed(mask, allow) (((mask) & (allow)) != (allow)) /* s3c2410_pm_enter @@ -519,7 +499,6 @@ #define any_allowed(mask, allow) (((mask static int s3c2410_pm_enter(suspend_state_t state) { unsigned long regs_save[16]; - unsigned long tmp; /* ensure the debug is initialised (if enabled) */ @@ -527,6 +506,11 @@ static int s3c2410_pm_enter(suspend_stat DBG("s3c2410_pm_enter(%d)\n", state); + if (pm_cpu_prep == NULL || pm_cpu_sleep == NULL) { + printk(KERN_ERR PFX "error: no cpu sleep functions set\n"); + return -EINVAL; + } + if (state != PM_SUSPEND_MEM) { printk(KERN_ERR PFX "error: only PM_SUSPEND_MEM supported\n"); return -EINVAL; @@ -554,17 +538,9 @@ static int s3c2410_pm_enter(suspend_stat DBG("s3c2410_sleep_save_phys=0x%08lx\n", s3c2410_sleep_save_phys); - /* ensure at least GESTATUS3 has the resume address */ - - __raw_writel(virt_to_phys(s3c2410_cpu_resume), S3C2410_GSTATUS3); - - DBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3)); - DBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4)); - /* save all necessary core registers not covered by the drivers */ s3c2410_pm_do_save(gpio_save, ARRAY_SIZE(gpio_save)); - s3c2410_pm_do_save(irq_save, ARRAY_SIZE(irq_save)); s3c2410_pm_do_save(core_save, ARRAY_SIZE(core_save)); s3c2410_pm_do_save(uart_save, ARRAY_SIZE(uart_save)); @@ -581,10 +557,16 @@ static int s3c2410_pm_enter(suspend_stat /* ack any outstanding external interrupts before we go to sleep */ __raw_writel(__raw_readl(S3C2410_EINTPEND), S3C2410_EINTPEND); + __raw_writel(__raw_readl(S3C2410_INTPND), S3C2410_INTPND); + __raw_writel(__raw_readl(S3C2410_SRCPND), S3C2410_SRCPND); + + /* call cpu specific preperation */ + + pm_cpu_prep(); /* flush cache back to ram */ - arm920_flush_kern_cache_all(); + flush_cache_all(); s3c2410_pm_check_store(); @@ -592,23 +574,23 @@ static int s3c2410_pm_enter(suspend_stat __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ - s3c2410_cpu_suspend(regs_save); + /* s3c2410_cpu_save will also act as our return point from when + * we resume as it saves its own register state, so use the return + * code to differentiate return from save and return from sleep */ + + if (s3c2410_cpu_save(regs_save) == 0) { + flush_cache_all(); + pm_cpu_sleep(); + } /* restore the cpu state */ cpu_init(); - /* unset the return-from-sleep flag, to ensure reset */ - - tmp = __raw_readl(S3C2410_GSTATUS2); - tmp &= S3C2410_GSTATUS2_OFFRESET; - __raw_writel(tmp, S3C2410_GSTATUS2); - /* restore the system state */ s3c2410_pm_do_restore_core(core_save, ARRAY_SIZE(core_save)); s3c2410_pm_do_restore(gpio_save, ARRAY_SIZE(gpio_save)); - s3c2410_pm_do_restore(irq_save, ARRAY_SIZE(irq_save)); s3c2410_pm_do_restore(uart_save, ARRAY_SIZE(uart_save)); s3c2410_pm_debug_init(); diff --git a/arch/arm/mach-s3c2410/pm.h b/arch/arm/mach-s3c2410/pm.h index 7a5e714..ffe197a 100644 --- a/arch/arm/mach-s3c2410/pm.h +++ b/arch/arm/mach-s3c2410/pm.h @@ -34,13 +34,19 @@ extern unsigned long s3c_irqwake_eintmas extern unsigned long s3c_irqwake_intallow; extern unsigned long s3c_irqwake_eintallow; +/* per-cpu sleep functions */ + +extern void (*pm_cpu_prep)(void); +extern void (*pm_cpu_sleep)(void); + /* Flags for PM Control */ extern unsigned long s3c_pm_flags; /* from sleep.S */ -extern void s3c2410_cpu_suspend(unsigned long *saveblk); +extern int s3c2410_cpu_save(unsigned long *saveblk); +extern void s3c2410_cpu_suspend(void); extern void s3c2410_cpu_resume(void); extern unsigned long s3c2410_sleep_save_phys; @@ -57,3 +63,11 @@ #define SAVE_ITEM(x) \ extern void s3c2410_pm_do_save(struct sleep_save *ptr, int count); extern void s3c2410_pm_do_restore(struct sleep_save *ptr, int count); + +#ifdef CONFIG_PM +extern int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state); +extern int s3c24xx_irq_resume(struct sys_device *dev); +#else +#define s3c24xx_irq_suspend NULL +#define s3c24xx_irq_resume NULL +#endif diff --git a/arch/arm/mach-s3c2410/s3c2410-dma.c b/arch/arm/mach-s3c2410/s3c2410-dma.c new file mode 100644 index 0000000..51e5098 --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2410-dma.c @@ -0,0 +1,158 @@ +/* linux/arch/arm/mach-s3c2410/s3c2410-dma.c + * + * (c) 2006 Simtec Electronics + * Ben Dooks + * + * S3C2410 DMA selection + * + * http://armlinux.simtec.co.uk/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include +#include + +#include +#include +#include "dma.h" + +#include "cpu.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +static struct s3c24xx_dma_map __initdata s3c2410_dma_mappings[] = { + [DMACH_XD0] = { + .name = "xdreq0", + .channels[0] = S3C2410_DCON_CH0_XDREQ0 | DMA_CH_VALID, + }, + [DMACH_XD1] = { + .name = "xdreq1", + .channels[1] = S3C2410_DCON_CH1_XDREQ1 | DMA_CH_VALID, + }, + [DMACH_SDI] = { + .name = "sdi", + .channels[0] = S3C2410_DCON_CH0_SDI | DMA_CH_VALID, + .channels[2] = S3C2410_DCON_CH2_SDI | DMA_CH_VALID, + .channels[3] = S3C2410_DCON_CH3_SDI | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO, + .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO, + }, + [DMACH_SPI0] = { + .name = "spi0", + .channels[1] = S3C2410_DCON_CH1_SPI | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_SPI + S3C2410_SPTDAT, + .hw_addr.from = S3C2410_PA_SPI + S3C2410_SPRDAT, + }, + [DMACH_SPI1] = { + .name = "spi1", + .channels[3] = S3C2410_DCON_CH3_SPI | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_SPI + 0x20 + S3C2410_SPTDAT, + .hw_addr.from = S3C2410_PA_SPI + 0x20 + S3C2410_SPRDAT, + }, + [DMACH_UART0] = { + .name = "uart0", + .channels[0] = S3C2410_DCON_CH0_UART0 | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_UART0 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART0 + S3C2410_URXH, + }, + [DMACH_UART1] = { + .name = "uart1", + .channels[1] = S3C2410_DCON_CH1_UART1 | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_UART1 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART1 + S3C2410_URXH, + }, + [DMACH_UART2] = { + .name = "uart2", + .channels[3] = S3C2410_DCON_CH3_UART2 | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_UART2 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART2 + S3C2410_URXH, + }, + [DMACH_TIMER] = { + .name = "timer", + .channels[0] = S3C2410_DCON_CH0_TIMER | DMA_CH_VALID, + .channels[2] = S3C2410_DCON_CH2_TIMER | DMA_CH_VALID, + .channels[3] = S3C2410_DCON_CH3_TIMER | DMA_CH_VALID, + }, + [DMACH_I2S_IN] = { + .name = "i2s-sdi", + .channels[1] = S3C2410_DCON_CH1_I2SSDI | DMA_CH_VALID, + .channels[2] = S3C2410_DCON_CH2_I2SSDI | DMA_CH_VALID, + .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO, + }, + [DMACH_I2S_OUT] = { + .name = "i2s-sdo", + .channels[2] = S3C2410_DCON_CH2_I2SSDO | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO, + }, + [DMACH_USB_EP1] = { + .name = "usb-ep1", + .channels[0] = S3C2410_DCON_CH0_USBEP1 | DMA_CH_VALID, + }, + [DMACH_USB_EP2] = { + .name = "usb-ep2", + .channels[1] = S3C2410_DCON_CH1_USBEP2 | DMA_CH_VALID, + }, + [DMACH_USB_EP3] = { + .name = "usb-ep3", + .channels[2] = S3C2410_DCON_CH2_USBEP3 | DMA_CH_VALID, + }, + [DMACH_USB_EP4] = { + .name = "usb-ep4", + .channels[3] =S3C2410_DCON_CH3_USBEP4 | DMA_CH_VALID, + }, +}; + +static void s3c2410_dma_select(struct s3c2410_dma_chan *chan, + struct s3c24xx_dma_map *map) +{ + chan->dcon = map->channels[chan->number] & ~DMA_CH_VALID; +} + +static struct s3c24xx_dma_selection __initdata s3c2410_dma_sel = { + .select = s3c2410_dma_select, + .dcon_mask = 7 << 24, + .map = s3c2410_dma_mappings, + .map_size = ARRAY_SIZE(s3c2410_dma_mappings), +}; + +static int s3c2410_dma_add(struct sys_device *sysdev) +{ + return s3c24xx_dma_init_map(&s3c2410_dma_sel); +} + +static struct sysdev_driver s3c2410_dma_driver = { + .add = s3c2410_dma_add, +}; + +static int __init s3c2410_dma_init(void) +{ + return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_dma_driver); +} + +arch_initcall(s3c2410_dma_init); + +/* S3C2442 DMA contains the same selection table as the S3C2410 */ + +static struct sysdev_driver s3c2442_dma_driver = { + .add = s3c2410_dma_add, +}; + +static int __init s3c2442_dma_init(void) +{ + return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_dma_driver); +} + +arch_initcall(s3c2442_dma_init); + + diff --git a/arch/arm/mach-s3c2410/s3c2410-irq.c b/arch/arm/mach-s3c2410/s3c2410-irq.c new file mode 100644 index 0000000..c796c9c --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2410-irq.c @@ -0,0 +1,48 @@ +/* linux/arch/arm/mach-s3c2410/s3c2410-irq.c + * + * Copyright (c) 2006 Simtec Electronics + * Ben Dooks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * +*/ + +#include +#include +#include +#include +#include +#include + +#include "cpu.h" +#include "pm.h" + +static int s3c2410_irq_add(struct sys_device *sysdev) +{ + return 0; +} + +static struct sysdev_driver s3c2410_irq_driver = { + .add = s3c2410_irq_add, + .suspend = s3c24xx_irq_suspend, + .resume = s3c24xx_irq_resume, +}; + +static int s3c2410_irq_init(void) +{ + return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_irq_driver); +} + +arch_initcall(s3c2410_irq_init); diff --git a/arch/arm/mach-s3c2410/s3c2410-pm.c b/arch/arm/mach-s3c2410/s3c2410-pm.c new file mode 100644 index 0000000..e51d766 --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2410-pm.c @@ -0,0 +1,120 @@ +/* linux/arch/arm/mach-s3c2410/s3c2410-pm.c + * + * Copyright (c) 2006 Simtec Electronics + * Ben Dooks + * + * S3C2410 (and compatible) Power Manager (Suspend-To-RAM) support + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +#include "cpu.h" +#include "pm.h" + +#ifdef CONFIG_S3C2410_PM_DEBUG +extern void pm_dbg(const char *fmt, ...); +#define DBG(fmt...) pm_dbg(fmt) +#else +#define DBG(fmt...) printk(KERN_DEBUG fmt) +#endif + +static void s3c2410_pm_prepare(void) +{ + /* ensure at least GSTATUS3 has the resume address */ + + __raw_writel(virt_to_phys(s3c2410_cpu_resume), S3C2410_GSTATUS3); + + DBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3)); + DBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4)); + + if ( machine_is_aml_m5900() ) + s3c2410_gpio_setpin(S3C2410_GPF2, 1); + +} + +int s3c2410_pm_resume(struct sys_device *dev) +{ + unsigned long tmp; + + /* unset the return-from-sleep flag, to ensure reset */ + + tmp = __raw_readl(S3C2410_GSTATUS2); + tmp &= S3C2410_GSTATUS2_OFFRESET; + __raw_writel(tmp, S3C2410_GSTATUS2); + + if ( machine_is_aml_m5900() ) + s3c2410_gpio_setpin(S3C2410_GPF2, 0); + + return 0; +} + +static int s3c2410_pm_add(struct sys_device *dev) +{ + pm_cpu_prep = s3c2410_pm_prepare; + pm_cpu_sleep = s3c2410_cpu_suspend; + + return 0; +} + +static struct sysdev_driver s3c2410_pm_driver = { + .add = s3c2410_pm_add, + .resume = s3c2410_pm_resume, +}; + +/* register ourselves */ + +static int __init s3c2410_pm_drvinit(void) +{ + return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_pm_driver); +} + +arch_initcall(s3c2410_pm_drvinit); + +static struct sysdev_driver s3c2440_pm_driver = { + .add = s3c2410_pm_add, + .resume = s3c2410_pm_resume, +}; + +static int __init s3c2440_pm_drvinit(void) +{ + return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_pm_driver); +} + +arch_initcall(s3c2440_pm_drvinit); + +static struct sysdev_driver s3c2442_pm_driver = { + .add = s3c2410_pm_add, + .resume = s3c2410_pm_resume, +}; + +static int __init s3c2442_pm_drvinit(void) +{ + return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_pm_driver); +} + +arch_initcall(s3c2442_pm_drvinit); diff --git a/arch/arm/mach-s3c2410/s3c2410-sleep.S b/arch/arm/mach-s3c2410/s3c2410-sleep.S new file mode 100644 index 0000000..9179a10 --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2410-sleep.S @@ -0,0 +1,68 @@ +/* linux/arch/arm/mach-s3c2410/s3c2410-sleep.S + * + * Copyright (c) 2004 Simtec Electronics + * Ben Dooks + * + * S3C2410 Power Manager (Suspend-To-RAM) support + * + * Based on PXA/SA1100 sleep code by: + * Nicolas Pitre, (c) 2002 Monta Vista Software Inc + * Cliff Brake, (c) 2001 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include +#include +#include + +#include +#include +#include +#include + + /* s3c2410_cpu_suspend + * + * put the cpu into sleep mode + */ + +ENTRY(s3c2410_cpu_suspend) + @@ prepare cpu to sleep + + ldr r4, =S3C2410_REFRESH + ldr r5, =S3C24XX_MISCCR + ldr r6, =S3C2410_CLKCON + ldr r7, [ r4 ] @ get REFRESH (and ensure in TLB) + ldr r8, [ r5 ] @ get MISCCR (and ensure in TLB) + ldr r9, [ r6 ] @ get CLKCON (and ensure in TLB) + + orr r7, r7, #S3C2410_REFRESH_SELF @ SDRAM sleep command + orr r8, r8, #S3C2410_MISCCR_SDSLEEP @ SDRAM power-down signals + orr r9, r9, #S3C2410_CLKCON_POWER @ power down command + + teq pc, #0 @ first as a trial-run to load cache + bl s3c2410_do_sleep + teq r0, r0 @ now do it for real + b s3c2410_do_sleep @ + + @@ align next bit of code to cache line + .align 8 +s3c2410_do_sleep: + streq r7, [ r4 ] @ SDRAM sleep command + streq r8, [ r5 ] @ SDRAM power-down config + streq r9, [ r6 ] @ CPU sleep +1: beq 1b + mov pc, r14 diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index a110cff..183e403 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c @@ -8,17 +8,6 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. - * - * Modifications: - * 16-May-2003 BJD Created initial version - * 16-Aug-2003 BJD Fixed header files and copyright, added URL - * 05-Sep-2003 BJD Moved to kernel v2.6 - * 18-Jan-2004 BJD Added serial port configuration - * 21-Aug-2004 BJD Added new struct s3c2410_board handler - * 28-Sep-2004 BJD Updates for new serial port bits - * 04-Nov-2004 BJD Updated UART configuration process - * 10-Jan-2005 BJD Removed s3c2410_clock_tick_rate - * 13-Aug-2005 DA Removed UART from initial I/O mappings */ #include diff --git a/arch/arm/mach-s3c2410/s3c2412-dma.c b/arch/arm/mach-s3c2410/s3c2412-dma.c new file mode 100644 index 0000000..171f370 --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2412-dma.c @@ -0,0 +1,160 @@ +/* linux/arch/arm/mach-s3c2410/s3c2412-dma.c + * + * (c) 2006 Simtec Electronics + * Ben Dooks + * + * S3C2412 DMA selection + * + * http://armlinux.simtec.co.uk/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include +#include + +#include +#include +#include + +#include "dma.h" +#include "cpu.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define MAP(x) { (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID } + +static struct s3c24xx_dma_map __initdata s3c2412_dma_mappings[] = { + [DMACH_XD0] = { + .name = "xdreq0", + .channels = MAP(S3C2412_DMAREQSEL_XDREQ0), + }, + [DMACH_XD1] = { + .name = "xdreq1", + .channels = MAP(S3C2412_DMAREQSEL_XDREQ1), + }, + [DMACH_SDI] = { + .name = "sdi", + .channels = MAP(S3C2412_DMAREQSEL_SDI), + .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO, + .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO, + }, + [DMACH_SPI0] = { + .name = "spi0", + .channels = MAP(S3C2412_DMAREQSEL_SPI0TX), + .hw_addr.to = S3C2410_PA_SPI + S3C2410_SPTDAT, + .hw_addr.from = S3C2410_PA_SPI + S3C2410_SPRDAT, + }, + [DMACH_SPI1] = { + .name = "spi1", + .channels = MAP(S3C2412_DMAREQSEL_SPI1TX), + .hw_addr.to = S3C2410_PA_SPI + 0x20 + S3C2410_SPTDAT, + .hw_addr.from = S3C2410_PA_SPI + 0x20 + S3C2410_SPRDAT, + }, + [DMACH_UART0] = { + .name = "uart0", + .channels = MAP(S3C2412_DMAREQSEL_UART0_0), + .hw_addr.to = S3C2410_PA_UART0 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART0 + S3C2410_URXH, + }, + [DMACH_UART1] = { + .name = "uart1", + .channels = MAP(S3C2412_DMAREQSEL_UART1_0), + .hw_addr.to = S3C2410_PA_UART1 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART1 + S3C2410_URXH, + }, + [DMACH_UART2] = { + .name = "uart2", + .channels = MAP(S3C2412_DMAREQSEL_UART2_0), + .hw_addr.to = S3C2410_PA_UART2 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART2 + S3C2410_URXH, + }, + [DMACH_UART0_SRC2] = { + .name = "uart0", + .channels = MAP(S3C2412_DMAREQSEL_UART0_1), + .hw_addr.to = S3C2410_PA_UART0 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART0 + S3C2410_URXH, + }, + [DMACH_UART1_SRC2] = { + .name = "uart1", + .channels = MAP(S3C2412_DMAREQSEL_UART1_1), + .hw_addr.to = S3C2410_PA_UART1 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART1 + S3C2410_URXH, + }, + [DMACH_UART2_SRC2] = { + .name = "uart2", + .channels = MAP(S3C2412_DMAREQSEL_UART2_1), + .hw_addr.to = S3C2410_PA_UART2 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART2 + S3C2410_URXH, + }, + [DMACH_TIMER] = { + .name = "timer", + .channels = MAP(S3C2412_DMAREQSEL_TIMER), + }, + [DMACH_I2S_IN] = { + .name = "i2s-sdi", + .channels = MAP(S3C2412_DMAREQSEL_I2SRX), + .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO, + }, + [DMACH_I2S_OUT] = { + .name = "i2s-sdo", + .channels = MAP(S3C2412_DMAREQSEL_I2STX), + .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO, + }, + [DMACH_USB_EP1] = { + .name = "usb-ep1", + .channels = MAP(S3C2412_DMAREQSEL_USBEP1), + }, + [DMACH_USB_EP2] = { + .name = "usb-ep2", + .channels = MAP(S3C2412_DMAREQSEL_USBEP2), + }, + [DMACH_USB_EP3] = { + .name = "usb-ep3", + .channels = MAP(S3C2412_DMAREQSEL_USBEP3), + }, + [DMACH_USB_EP4] = { + .name = "usb-ep4", + .channels = MAP(S3C2412_DMAREQSEL_USBEP4), + }, +}; + +static void s3c2412_dma_select(struct s3c2410_dma_chan *chan, + struct s3c24xx_dma_map *map) +{ + writel(chan->regs + S3C2412_DMA_DMAREQSEL, + map->channels[0] | S3C2412_DMAREQSEL_HW); +} + +static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = { + .select = s3c2412_dma_select, + .dcon_mask = 0, + .map = s3c2412_dma_mappings, + .map_size = ARRAY_SIZE(s3c2412_dma_mappings), +}; + +static int s3c2412_dma_add(struct sys_device *sysdev) +{ + return s3c24xx_dma_init_map(&s3c2412_dma_sel); +} + +static struct sysdev_driver s3c2412_dma_driver = { + .add = s3c2412_dma_add, +}; + +static int __init s3c2412_dma_init(void) +{ + return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_dma_driver); +} + +arch_initcall(s3c2412_dma_init); diff --git a/arch/arm/mach-s3c2410/s3c2412-irq.c b/arch/arm/mach-s3c2410/s3c2412-irq.c index c80ec93..7f74154 100644 --- a/arch/arm/mach-s3c2410/s3c2412-irq.c +++ b/arch/arm/mach-s3c2410/s3c2412-irq.c @@ -37,6 +37,7 @@ #include #include "cpu.h" #include "irq.h" +#include "pm.h" /* the s3c2412 changes the behaviour of IRQ_EINT0 through IRQ_EINT3 by * having them turn up in both the INT* and the EINT* registers. Whilst @@ -120,6 +121,8 @@ static int s3c2412_irq_add(struct sys_de static struct sysdev_driver s3c2412_irq_driver = { .add = s3c2412_irq_add, + .suspend = s3c24xx_irq_suspend, + .resume = s3c24xx_irq_resume, }; static int s3c2412_irq_init(void) diff --git a/arch/arm/mach-s3c2410/s3c2412-pm.c b/arch/arm/mach-s3c2410/s3c2412-pm.c new file mode 100644 index 0000000..19b6332 --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2412-pm.c @@ -0,0 +1,128 @@ +/* linux/arch/arm/mach-s3c2410/s3c2412-pm.c + * + * Copyright (c) 2006 Simtec Electronics + * Ben Dooks + * + * http://armlinux.simtec.co.uk/. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include "cpu.h" +#include "pm.h" + +#include "s3c2412.h" + +static void s3c2412_cpu_suspend(void) +{ + unsigned long tmp; + + /* set our standby method to sleep */ + + tmp = __raw_readl(S3C2412_PWRCFG); + tmp |= S3C2412_PWRCFG_STANDBYWFI_SLEEP; + __raw_writel(tmp, S3C2412_PWRCFG); + + /* issue the standby signal into the pm unit. Note, we + * issue a write-buffer drain just in case */ + + tmp = 0; + + asm("b 1f\n\t" + ".align 5\n\t" + "1:\n\t" + "mcr p15, 0, %0, c7, c10, 4\n\t" + "mcr p15, 0, %0, c7, c0, 4" :: "r" (tmp)); + + /* we should never get past here */ + + panic("sleep resumed to originator?"); +} + +static void s3c2412_pm_prepare(void) +{ +} + +static int s3c2412_pm_add(struct sys_device *sysdev) +{ + pm_cpu_prep = s3c2412_pm_prepare; + pm_cpu_sleep = s3c2412_cpu_suspend; + + return 0; +} + +static struct sleep_save s3c2412_sleep[] = { + SAVE_ITEM(S3C2412_DSC0), + SAVE_ITEM(S3C2412_DSC1), + SAVE_ITEM(S3C2413_GPJDAT), + SAVE_ITEM(S3C2413_GPJCON), + SAVE_ITEM(S3C2413_GPJUP), + + /* save the PWRCFG to get back to original sleep method */ + + SAVE_ITEM(S3C2412_PWRCFG), + + /* save the sleep configuration anyway, just in case these + * get damaged during wakeup */ + + SAVE_ITEM(S3C2412_GPBSLPCON), + SAVE_ITEM(S3C2412_GPCSLPCON), + SAVE_ITEM(S3C2412_GPDSLPCON), + SAVE_ITEM(S3C2412_GPESLPCON), + SAVE_ITEM(S3C2412_GPFSLPCON), + SAVE_ITEM(S3C2412_GPGSLPCON), + SAVE_ITEM(S3C2412_GPHSLPCON), + SAVE_ITEM(S3C2413_GPJSLPCON), +}; + +static int s3c2412_pm_suspend(struct sys_device *dev, pm_message_t state) +{ + s3c2410_pm_do_save(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep)); + return 0; +} + +static int s3c2412_pm_resume(struct sys_device *dev) +{ + unsigned long tmp; + + tmp = __raw_readl(S3C2412_PWRCFG); + tmp &= ~S3C2412_PWRCFG_STANDBYWFI_MASK; + tmp |= S3C2412_PWRCFG_STANDBYWFI_IDLE; + __raw_writel(tmp, S3C2412_PWRCFG); + + s3c2410_pm_do_restore(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep)); + return 0; +} + +static struct sysdev_driver s3c2412_pm_driver = { + .add = s3c2412_pm_add, + .suspend = s3c2412_pm_suspend, + .resume = s3c2412_pm_resume, +}; + +static __init int s3c2412_pm_init(void) +{ + return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_pm_driver); +} + +arch_initcall(s3c2412_pm_init); diff --git a/arch/arm/mach-s3c2410/s3c2412.c b/arch/arm/mach-s3c2410/s3c2412.c index 2d163f7..e76431c 100644 --- a/arch/arm/mach-s3c2410/s3c2412.c +++ b/arch/arm/mach-s3c2410/s3c2412.c @@ -8,17 +8,6 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. - * - * Modifications: - * 16-May-2003 BJD Created initial version - * 16-Aug-2003 BJD Fixed header files and copyright, added URL - * 05-Sep-2003 BJD Moved to kernel v2.6 - * 18-Jan-2004 BJD Added serial port configuration - * 21-Aug-2004 BJD Added new struct s3c2410_board handler - * 28-Sep-2004 BJD Updates for new serial port bits - * 04-Nov-2004 BJD Updated UART configuration process - * 10-Jan-2005 BJD Removed s3c2410_clock_tick_rate - * 13-Aug-2005 DA Removed UART from initial I/O mappings */ #include @@ -56,6 +45,13 @@ #include "pm.h" #ifndef CONFIG_CPU_S3C2412_ONLY void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; + +static inline void s3c2412_init_gpio2(void) +{ + s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10; +} +#else +#define s3c2412_init_gpio2() do { } while(0) #endif /* Initial IO mappings */ @@ -76,6 +72,7 @@ void __init s3c2412_init_uarts(struct s3 /* rename devices that are s3c2412/s3c2413 specific */ s3c_device_sdi.name = "s3c2412-sdi"; + s3c_device_lcd.name = "s3c2412-lcd"; s3c_device_nand.name = "s3c2412-nand"; } @@ -110,7 +107,7 @@ void __init s3c2412_map_io(struct map_de { /* move base of IO */ - s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10; + s3c2412_init_gpio2(); /* set our idle function */ @@ -161,48 +158,8 @@ void __init s3c2412_init_clocks(int xtal * as a driver which may support both 2410 and 2440 may try and use it. */ -#ifdef CONFIG_PM -static struct sleep_save s3c2412_sleep[] = { - SAVE_ITEM(S3C2412_DSC0), - SAVE_ITEM(S3C2412_DSC1), - SAVE_ITEM(S3C2413_GPJDAT), - SAVE_ITEM(S3C2413_GPJCON), - SAVE_ITEM(S3C2413_GPJUP), - - /* save the sleep configuration anyway, just in case these - * get damaged during wakeup */ - - SAVE_ITEM(S3C2412_GPBSLPCON), - SAVE_ITEM(S3C2412_GPCSLPCON), - SAVE_ITEM(S3C2412_GPDSLPCON), - SAVE_ITEM(S3C2412_GPESLPCON), - SAVE_ITEM(S3C2412_GPFSLPCON), - SAVE_ITEM(S3C2412_GPGSLPCON), - SAVE_ITEM(S3C2412_GPHSLPCON), - SAVE_ITEM(S3C2413_GPJSLPCON), -}; - -static int s3c2412_suspend(struct sys_device *dev, pm_message_t state) -{ - s3c2410_pm_do_save(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep)); - return 0; -} - -static int s3c2412_resume(struct sys_device *dev) -{ - s3c2410_pm_do_restore(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep)); - return 0; -} - -#else -#define s3c2412_suspend NULL -#define s3c2412_resume NULL -#endif - struct sysdev_class s3c2412_sysclass = { set_kset_name("s3c2412-core"), - .suspend = s3c2412_suspend, - .resume = s3c2412_resume }; static int __init s3c2412_core_init(void) diff --git a/arch/arm/mach-s3c2410/s3c2440-dma.c b/arch/arm/mach-s3c2410/s3c2440-dma.c new file mode 100644 index 0000000..11e109c --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2440-dma.c @@ -0,0 +1,164 @@ +/* linux/arch/arm/mach-s3c2410/s3c2440-dma.c + * + * (c) 2006 Simtec Electronics + * Ben Dooks + * + * S3C2440 DMA selection + * + * http://armlinux.simtec.co.uk/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include +#include + +#include +#include +#include "dma.h" + +#include "cpu.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +static struct s3c24xx_dma_map __initdata s3c2440_dma_mappings[] = { + [DMACH_XD0] = { + .name = "xdreq0", + .channels[0] = S3C2410_DCON_CH0_XDREQ0 | DMA_CH_VALID, + }, + [DMACH_XD1] = { + .name = "xdreq1", + .channels[1] = S3C2410_DCON_CH1_XDREQ1 | DMA_CH_VALID, + }, + [DMACH_SDI] = { + .name = "sdi", + .channels[0] = S3C2410_DCON_CH0_SDI | DMA_CH_VALID, + .channels[1] = S3C2440_DCON_CH1_SDI | DMA_CH_VALID, + .channels[2] = S3C2410_DCON_CH2_SDI | DMA_CH_VALID, + .channels[3] = S3C2410_DCON_CH3_SDI | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO, + .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO, + }, + [DMACH_SPI0] = { + .name = "spi0", + .channels[1] = S3C2410_DCON_CH1_SPI | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_SPI + S3C2410_SPTDAT, + .hw_addr.from = S3C2410_PA_SPI + S3C2410_SPRDAT, + }, + [DMACH_SPI1] = { + .name = "spi1", + .channels[3] = S3C2410_DCON_CH3_SPI | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_SPI + 0x20 + S3C2410_SPTDAT, + .hw_addr.from = S3C2410_PA_SPI + 0x20 + S3C2410_SPRDAT, + }, + [DMACH_UART0] = { + .name = "uart0", + .channels[0] = S3C2410_DCON_CH0_UART0 | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_UART0 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART0 + S3C2410_URXH, + }, + [DMACH_UART1] = { + .name = "uart1", + .channels[1] = S3C2410_DCON_CH1_UART1 | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_UART1 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART1 + S3C2410_URXH, + }, + [DMACH_UART2] = { + .name = "uart2", + .channels[3] = S3C2410_DCON_CH3_UART2 | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_UART2 + S3C2410_UTXH, + .hw_addr.from = S3C2410_PA_UART2 + S3C2410_URXH, + }, + [DMACH_TIMER] = { + .name = "timer", + .channels[0] = S3C2410_DCON_CH0_TIMER | DMA_CH_VALID, + .channels[2] = S3C2410_DCON_CH2_TIMER | DMA_CH_VALID, + .channels[3] = S3C2410_DCON_CH3_TIMER | DMA_CH_VALID, + }, + [DMACH_I2S_IN] = { + .name = "i2s-sdi", + .channels[1] = S3C2410_DCON_CH1_I2SSDI | DMA_CH_VALID, + .channels[2] = S3C2410_DCON_CH2_I2SSDI | DMA_CH_VALID, + .hw_addr.from = S3C2410_PA_IIS + S3C2410_IISFIFO, + }, + [DMACH_I2S_OUT] = { + .name = "i2s-sdo", + .channels[0] = S3C2440_DCON_CH0_I2SSDO | DMA_CH_VALID, + .channels[2] = S3C2410_DCON_CH2_I2SSDO | DMA_CH_VALID, + .hw_addr.to = S3C2410_PA_IIS + S3C2410_IISFIFO, + }, + [DMACH_PCM_IN] = { + .name = "pcm-in", + .channels[0] = S3C2440_DCON_CH0_PCMIN | DMA_CH_VALID, + .channels[2] = S3C2440_DCON_CH2_PCMIN | DMA_CH_VALID, + .hw_addr.from = S3C2440_PA_AC97 + S3C_AC97_PCM_DATA, + }, + [DMACH_PCM_OUT] = { + .name = "pcm-out", + .channels[1] = S3C2440_DCON_CH1_PCMOUT | DMA_CH_VALID, + .channels[3] = S3C2440_DCON_CH3_PCMOUT | DMA_CH_VALID, + .hw_addr.to = S3C2440_PA_AC97 + S3C_AC97_PCM_DATA, + }, + [DMACH_MIC_IN] = { + .name = "mic-in", + .channels[2] = S3C2440_DCON_CH2_MICIN | DMA_CH_VALID, + .channels[3] = S3C2440_DCON_CH3_MICIN | DMA_CH_VALID, + .hw_addr.from = S3C2440_PA_AC97 + S3C_AC97_MIC_DATA, + }, + [DMACH_USB_EP1] = { + .name = "usb-ep1", + .channels[0] = S3C2410_DCON_CH0_USBEP1 | DMA_CH_VALID, + }, + [DMACH_USB_EP2] = { + .name = "usb-ep2", + .channels[1] = S3C2410_DCON_CH1_USBEP2 | DMA_CH_VALID, + }, + [DMACH_USB_EP3] = { + .name = "usb-ep3", + .channels[2] = S3C2410_DCON_CH2_USBEP3 | DMA_CH_VALID, + }, + [DMACH_USB_EP4] = { + .name = "usb-ep4", + .channels[3] = S3C2410_DCON_CH3_USBEP4 | DMA_CH_VALID, + }, +}; + +static void s3c2440_dma_select(struct s3c2410_dma_chan *chan, + struct s3c24xx_dma_map *map) +{ + chan->dcon = map->channels[chan->number] & ~DMA_CH_VALID; +} + +static struct s3c24xx_dma_selection __initdata s3c2440_dma_sel = { + .select = s3c2440_dma_select, + .dcon_mask = 7 << 24, + .map = s3c2440_dma_mappings, + .map_size = ARRAY_SIZE(s3c2440_dma_mappings), +}; + +static int s3c2440_dma_add(struct sys_device *sysdev) +{ + return s3c24xx_dma_init_map(&s3c2440_dma_sel); +} + +static struct sysdev_driver s3c2440_dma_driver = { + .add = s3c2440_dma_add, +}; + +static int __init s3c2440_dma_init(void) +{ + return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_dma_driver); +} + +arch_initcall(s3c2440_dma_init); + diff --git a/arch/arm/mach-s3c2410/s3c2440-dsc.c b/arch/arm/mach-s3c2410/s3c2440-dsc.c index 16fa2a3..c92ea66 100644 --- a/arch/arm/mach-s3c2410/s3c2440-dsc.c +++ b/arch/arm/mach-s3c2410/s3c2440-dsc.c @@ -8,11 +8,6 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. - * - * Modifications: - * 29-Aug-2004 BJD Start of drive-strength control - * 09-Nov-2004 BJD Added symbol export - * 11-Jan-2005 BJD Include fix */ #include diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c index 1667ba1..fc08feb 100644 --- a/arch/arm/mach-s3c2410/s3c2440-irq.c +++ b/arch/arm/mach-s3c2410/s3c2440-irq.c @@ -119,7 +119,7 @@ static int s3c2440_irq_add(struct sys_de } static struct sysdev_driver s3c2440_irq_driver = { - .add = s3c2440_irq_add, + .add = s3c2440_irq_add, }; static int s3c2440_irq_init(void) diff --git a/arch/arm/mach-s3c2410/s3c244x-irq.c b/arch/arm/mach-s3c2410/s3c244x-irq.c index 44c5aff..0d13546 100644 --- a/arch/arm/mach-s3c2410/s3c244x-irq.c +++ b/arch/arm/mach-s3c2410/s3c244x-irq.c @@ -120,7 +120,9 @@ static int s3c244x_irq_add(struct sys_de } static struct sysdev_driver s3c2440_irq_driver = { - .add = s3c244x_irq_add, + .add = s3c244x_irq_add, + .suspend = s3c24xx_irq_suspend, + .resume = s3c24xx_irq_resume, }; static int s3c2440_irq_init(void) @@ -131,9 +133,12 @@ static int s3c2440_irq_init(void) arch_initcall(s3c2440_irq_init); static struct sysdev_driver s3c2442_irq_driver = { - .add = s3c244x_irq_add, + .add = s3c244x_irq_add, + .suspend = s3c24xx_irq_suspend, + .resume = s3c24xx_irq_resume, }; + static int s3c2442_irq_init(void) { return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_irq_driver); diff --git a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S index a7561a7..2018c2e 100644 --- a/arch/arm/mach-s3c2410/sleep.S +++ b/arch/arm/mach-s3c2410/sleep.S @@ -41,15 +41,25 @@ #include .text - /* s3c2410_cpu_suspend + /* s3c2410_cpu_save * - * put the cpu into sleep mode + * save enough of the CPU state to allow us to re-start + * pm.c code. as we store items like the sp/lr, we will + * end up returning from this function when the cpu resumes + * so the return value is set to mark this. + * + * This arangement means we avoid having to flush the cache + * from this code. * * entry: - * r0 = sleep save block + * r0 = pointer to save block + * + * exit: + * r0 = 0 => we stored everything + * 1 => resumed from sleep */ -ENTRY(s3c2410_cpu_suspend) +ENTRY(s3c2410_cpu_save) stmfd sp!, { r4 - r12, lr } @@ store co-processor registers @@ -62,44 +72,14 @@ ENTRY(s3c2410_cpu_suspend) stmia r0, { r4 - r13 } - @@ flush the caches to ensure everything is back out to - @@ SDRAM before the core powers down - -#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH - bl arm920_flush_kern_cache_all -#endif - - @@ prepare cpu to sleep - - ldr r4, =S3C2410_REFRESH - ldr r5, =S3C24XX_MISCCR - ldr r6, =S3C2410_CLKCON - ldr r7, [ r4 ] @ get REFRESH (and ensure in TLB) - ldr r8, [ r5 ] @ get MISCCR (and ensure in TLB) - ldr r9, [ r6 ] @ get CLKCON (and ensure in TLB) - - orr r7, r7, #S3C2410_REFRESH_SELF @ SDRAM sleep command - orr r8, r8, #S3C2410_MISCCR_SDSLEEP @ SDRAM power-down signals - orr r9, r9, #S3C2410_CLKCON_POWER @ power down command - - teq pc, #0 @ first as a trial-run to load cache - bl s3c2410_do_sleep - teq r0, r0 @ now do it for real - b s3c2410_do_sleep @ - - @@ align next bit of code to cache line - .align 8 -s3c2410_do_sleep: - streq r7, [ r4 ] @ SDRAM sleep command - streq r8, [ r5 ] @ SDRAM power-down config - streq r9, [ r6 ] @ CPU sleep -1: beq 1b - mov pc, r14 + mov r0, #0 + ldmfd sp, { r4 - r12, pc } @@ return to the caller, after having the MMU @@ turned on, this restores the last bits from the @@ stack resume_with_mmu: + mov r0, #1 ldmfd sp!, { r4 - r12, pc } .ltorg diff --git a/arch/arm/mach-s3c2410/usb-simtec.c b/arch/arm/mach-s3c2410/usb-simtec.c index 6b22d8f..c635efa 100644 --- a/arch/arm/mach-s3c2410/usb-simtec.c +++ b/arch/arm/mach-s3c2410/usb-simtec.c @@ -10,12 +10,6 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. - * - * Modifications: - * 14-Sep-2004 BJD Created - * 18-Oct-2004 BJD Cleanups, and added code to report OC cleared - * 09-Aug-2005 BJD Renamed s3c2410_report_oc to s3c2410_usb_report_oc - * 09-Aug-2005 BJD Ports powered only if both are enabled */ #define DEBUG diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index a0dfa39..6496eb6 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c @@ -91,30 +91,29 @@ #ifdef CONFIG_SHARP_LOCOMO /* * low-level UART features. */ -static struct locomo_dev *uart_dev = NULL; +struct platform_device collie_locomo_device; static void collie_uart_set_mctrl(struct uart_port *port, u_int mctrl) { - if (!uart_dev) return; - if (mctrl & TIOCM_RTS) - locomo_gpio_write(uart_dev, LOCOMO_GPIO_RTS, 0); + locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_RTS, 0); else - locomo_gpio_write(uart_dev, LOCOMO_GPIO_RTS, 1); + locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_RTS, 1); if (mctrl & TIOCM_DTR) - locomo_gpio_write(uart_dev, LOCOMO_GPIO_DTR, 0); + locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_DTR, 0); else - locomo_gpio_write(uart_dev, LOCOMO_GPIO_DTR, 1); + locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_DTR, 1); } static u_int collie_uart_get_mctrl(struct uart_port *port) { int ret = TIOCM_CD; unsigned int r; - if (!uart_dev) return ret; - r = locomo_gpio_read_output(uart_dev, LOCOMO_GPIO_CTS & LOCOMO_GPIO_DSR); + r = locomo_gpio_read_output(&collie_locomo_device.dev, LOCOMO_GPIO_CTS & LOCOMO_GPIO_DSR); + if (r == -ENODEV) + return ret; if (r & LOCOMO_GPIO_CTS) ret |= TIOCM_CTS; if (r & LOCOMO_GPIO_DSR) @@ -130,13 +129,11 @@ static struct sa1100_port_fns collie_por static int collie_uart_probe(struct locomo_dev *dev) { - uart_dev = dev; return 0; } static int collie_uart_remove(struct locomo_dev *dev) { - uart_dev = NULL; return 0; } @@ -170,7 +167,7 @@ static struct resource locomo_resources[ }, }; -static struct platform_device locomo_device = { +struct platform_device collie_locomo_device = { .name = "locomo", .id = 0, .num_resources = ARRAY_SIZE(locomo_resources), @@ -178,7 +175,7 @@ static struct platform_device locomo_dev }; static struct platform_device *devices[] __initdata = { - &locomo_device, + &collie_locomo_device, &colliescoop_device, }; diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index 41b3700..13bbd08 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c @@ -117,7 +117,6 @@ static int versatile_read_config(struct } else { switch (size) { case 1: - addr &= ~3; v = __raw_readb(addr); break; diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index b4f220d..c0bfb82 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -15,6 +15,7 @@ config CPU_ARM610 select CPU_32v3 select CPU_CACHE_V3 select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V3 if MMU select CPU_TLB_V3 if MMU help @@ -24,6 +25,20 @@ config CPU_ARM610 Say Y if you want support for the ARM610 processor. Otherwise, say N. +# ARM7TDMI +config CPU_ARM7TDMI + bool "Support ARM7TDMI processor" + depends on !MMU + select CPU_32v4T + select CPU_ABRT_LV4T + select CPU_CACHE_V4 + help + A 32-bit RISC microprocessor based on the ARM7 processor core + which has no memory control unit and cache. + + Say Y if you want support for the ARM7TDMI processor. + Otherwise, say N. + # ARM710 config CPU_ARM710 bool "Support ARM710 processor" if !ARCH_CLPS7500 && ARCH_RPC @@ -31,6 +46,7 @@ config CPU_ARM710 select CPU_32v3 select CPU_CACHE_V3 select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V3 if MMU select CPU_TLB_V3 if MMU help @@ -50,6 +66,7 @@ config CPU_ARM720T select CPU_ABRT_LV4T select CPU_CACHE_V4 select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V4WT if MMU select CPU_TLB_V4WT if MMU help @@ -59,6 +76,36 @@ config CPU_ARM720T Say Y if you want support for the ARM720T processor. Otherwise, say N. +# ARM740T +config CPU_ARM740T + bool "Support ARM740T processor" if ARCH_INTEGRATOR + depends on !MMU + select CPU_32v4T + select CPU_ABRT_LV4T + select CPU_CACHE_V3 # although the core is v4t + select CPU_CP15_MPU + help + A 32-bit RISC processor with 8KB cache or 4KB variants, + write buffer and MPU(Protection Unit) built around + an ARM7TDMI core. + + Say Y if you want support for the ARM740T processor. + Otherwise, say N. + +# ARM9TDMI +config CPU_ARM9TDMI + bool "Support ARM9TDMI processor" + depends on !MMU + select CPU_32v4T + select CPU_ABRT_NOMMU + select CPU_CACHE_V4 + help + A 32-bit RISC microprocessor based on the ARM9 processor core + which has no memory control unit and cache. + + Say Y if you want support for the ARM9TDMI processor. + Otherwise, say N. + # ARM920T config CPU_ARM920T bool "Support ARM920T processor" @@ -68,6 +115,7 @@ config CPU_ARM920T select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V4WB if MMU select CPU_TLB_V4WBI if MMU help @@ -89,6 +137,7 @@ config CPU_ARM922T select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V4WB if MMU select CPU_TLB_V4WBI if MMU help @@ -108,6 +157,7 @@ config CPU_ARM925T select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V4WB if MMU select CPU_TLB_V4WBI if MMU help @@ -126,6 +176,7 @@ config CPU_ARM926T select CPU_32v5 select CPU_ABRT_EV5TJ select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V4WB if MMU select CPU_TLB_V4WBI if MMU help @@ -136,6 +187,39 @@ config CPU_ARM926T Say Y if you want support for the ARM926T processor. Otherwise, say N. +# ARM940T +config CPU_ARM940T + bool "Support ARM940T processor" if ARCH_INTEGRATOR + depends on !MMU + select CPU_32v4T + select CPU_ABRT_NOMMU + select CPU_CACHE_VIVT + select CPU_CP15_MPU + help + ARM940T is a member of the ARM9TDMI family of general- + purpose microprocessors with MPU and seperate 4KB + instruction and 4KB data cases, each with a 4-word line + length. + + Say Y if you want support for the ARM940T processor. + Otherwise, say N. + +# ARM946E-S +config CPU_ARM946E + bool "Support ARM946E-S processor" if ARCH_INTEGRATOR + depends on !MMU + select CPU_32v5 + select CPU_ABRT_NOMMU + select CPU_CACHE_VIVT + select CPU_CP15_MPU + help + ARM946E-S is a member of the ARM9E-S family of high- + performance, 32-bit system-on-chip processor solutions. + The TCM and ARMv5TE 32-bit instruction set is supported. + + Say Y if you want support for the ARM946E-S processor. + Otherwise, say N. + # ARM1020 - needs validating config CPU_ARM1020 bool "Support ARM1020T (rev 0) processor" @@ -144,6 +228,7 @@ config CPU_ARM1020 select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V4WB if MMU select CPU_TLB_V4WBI if MMU help @@ -161,6 +246,7 @@ config CPU_ARM1020E select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V4WB if MMU select CPU_TLB_V4WBI if MMU depends on n @@ -172,6 +258,7 @@ config CPU_ARM1022 select CPU_32v5 select CPU_ABRT_EV4T select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V4WB if MMU # can probably do better select CPU_TLB_V4WBI if MMU help @@ -189,6 +276,7 @@ config CPU_ARM1026 select CPU_32v5 select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10 select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V4WB if MMU # can probably do better select CPU_TLB_V4WBI if MMU help @@ -207,6 +295,7 @@ config CPU_SA110 select CPU_ABRT_EV4 select CPU_CACHE_V4WB select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_COPY_V4WB if MMU select CPU_TLB_V4WB if MMU help @@ -227,16 +316,18 @@ config CPU_SA1100 select CPU_ABRT_EV4 select CPU_CACHE_V4WB select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_TLB_V4WB if MMU # XScale config CPU_XSCALE bool - depends on ARCH_IOP3XX || ARCH_PXA || ARCH_IXP4XX || ARCH_IXP2000 + depends on ARCH_IOP32X || ARCH_IOP33X || ARCH_PXA || ARCH_IXP4XX || ARCH_IXP2000 default y select CPU_32v5 select CPU_ABRT_EV5T select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_TLB_V4WBI if MMU # XScale Core Version 3 @@ -247,6 +338,7 @@ config CPU_XSC3 select CPU_32v5 select CPU_ABRT_EV5T select CPU_CACHE_VIVT + select CPU_CP15_MMU select CPU_TLB_V4WBI if MMU select IO_36 @@ -258,6 +350,7 @@ config CPU_V6 select CPU_ABRT_EV6 select CPU_CACHE_V6 select CPU_CACHE_VIPT + select CPU_CP15_MMU select CPU_COPY_V6 if MMU select CPU_TLB_V6 if MMU @@ -299,6 +392,9 @@ config CPU_32v6 bool # The abort model +config CPU_ABRT_NOMMU + bool + config CPU_ABRT_EV4 bool @@ -380,6 +476,23 @@ config CPU_TLB_V6 endif +config CPU_CP15 + bool + help + Processor has the CP15 register. + +config CPU_CP15_MMU + bool + select CPU_CP15 + help + Processor has the CP15 register, which has MMU related registers. + +config CPU_CP15_MPU + bool + select CPU_CP15 + help + Processor has the CP15 register, which has MPU related registers. + # # CPU supports 36-bit I/O # @@ -390,7 +503,7 @@ comment "Processor Features" config ARM_THUMB bool "Support Thumb user binaries" - depends on CPU_ARM720T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_V6 + depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_V6 default y help Say Y if you want to include kernel support for running user space @@ -411,23 +524,48 @@ config CPU_BIG_ENDIAN port must properly enable any big-endian related features of your chipset/board/processor. +config CPU_HIGH_VECTOR + depends !MMU && CPU_CP15 && !CPU_ARM740T + bool "Select the High exception vector" + default n + help + Say Y here to select high exception vector(0xFFFF0000~). + The exception vector can be vary depending on the platform + design in nommu mode. If your platform needs to select + high exception vector, say Y. + Otherwise or if you are unsure, say N, and the low exception + vector (0x00000000~) will be used. + config CPU_ICACHE_DISABLE - bool "Disable I-Cache" - depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020 || CPU_V6 + bool "Disable I-Cache (I-bit)" + depends on CPU_CP15 && !(CPU_ARM610 || CPU_ARM710 || CPU_ARM720T || CPU_ARM740T || CPU_XSCALE || CPU_XSC3) help Say Y here to disable the processor instruction cache. Unless you have a reason not to or are unsure, say N. config CPU_DCACHE_DISABLE - bool "Disable D-Cache" - depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020 || CPU_V6 + bool "Disable D-Cache (C-bit)" + depends on CPU_CP15 help Say Y here to disable the processor data cache. Unless you have a reason not to or are unsure, say N. +config CPU_DCACHE_SIZE + hex + depends on CPU_ARM740T || CPU_ARM946E + default 0x00001000 if CPU_ARM740T + default 0x00002000 # default size for ARM946E-S + help + Some cores are synthesizable to have various sized cache. For + ARM946E-S case, it can vary from 0KB to 1MB. + To support such cache operations, it is efficient to know the size + before compile time. + If your SoC is configured to have a different size, define the value + here with proper conditions. + config CPU_DCACHE_WRITETHROUGH bool "Force write through D-cache" - depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020 || CPU_V6) && !CPU_DCACHE_DISABLE + depends on (CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_V6) && !CPU_DCACHE_DISABLE default y if CPU_ARM925T help Say Y here to use the data cache in writethrough mode. Unless you @@ -435,7 +573,7 @@ config CPU_DCACHE_WRITETHROUGH config CPU_CACHE_ROUND_ROBIN bool "Round robin I and D cache replacement algorithm" - depends on (CPU_ARM926T || CPU_ARM1020) && (!CPU_ICACHE_DISABLE || !CPU_DCACHE_DISABLE) + depends on (CPU_ARM926T || CPU_ARM946E || CPU_ARM1020) && (!CPU_ICACHE_DISABLE || !CPU_DCACHE_DISABLE) help Say Y here to use the predictable round-robin cache replacement policy. Unless you specifically require this or are unsure, say N. diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index 21a2770..d2f5672 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile @@ -6,7 +6,7 @@ obj-y := consistent.o extable.o fault iomap.o obj-$(CONFIG_MMU) += fault-armv.o flush.o ioremap.o mmap.o \ - mm-armv.o + pgd.o mmu.o ifneq ($(CONFIG_MMU),y) obj-y += nommu.o @@ -17,6 +17,7 @@ obj-$(CONFIG_MODULES) += proc-syms.o obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o obj-$(CONFIG_DISCONTIGMEM) += discontig.o +obj-$(CONFIG_CPU_ABRT_NOMMU) += abort-nommu.o obj-$(CONFIG_CPU_ABRT_EV4) += abort-ev4.o obj-$(CONFIG_CPU_ABRT_EV4T) += abort-ev4t.o obj-$(CONFIG_CPU_ABRT_LV4T) += abort-lv4t.o @@ -33,7 +34,7 @@ obj-$(CONFIG_CPU_CACHE_V6) += cache-v6.o obj-$(CONFIG_CPU_COPY_V3) += copypage-v3.o obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o -obj-$(CONFIG_CPU_COPY_V6) += copypage-v6.o mmu.o +obj-$(CONFIG_CPU_COPY_V6) += copypage-v6.o context.o obj-$(CONFIG_CPU_SA1100) += copypage-v4mc.o obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o obj-$(CONFIG_CPU_XSC3) += copypage-xsc3.o @@ -46,11 +47,16 @@ obj-$(CONFIG_CPU_TLB_V6) += tlb-v6.o obj-$(CONFIG_CPU_ARM610) += proc-arm6_7.o obj-$(CONFIG_CPU_ARM710) += proc-arm6_7.o +obj-$(CONFIG_CPU_ARM7TDMI) += proc-arm7tdmi.o obj-$(CONFIG_CPU_ARM720T) += proc-arm720.o +obj-$(CONFIG_CPU_ARM740T) += proc-arm740.o +obj-$(CONFIG_CPU_ARM9TDMI) += proc-arm9tdmi.o obj-$(CONFIG_CPU_ARM920T) += proc-arm920.o obj-$(CONFIG_CPU_ARM922T) += proc-arm922.o obj-$(CONFIG_CPU_ARM925T) += proc-arm925.o obj-$(CONFIG_CPU_ARM926T) += proc-arm926.o +obj-$(CONFIG_CPU_ARM940T) += proc-arm940.o +obj-$(CONFIG_CPU_ARM946E) += proc-arm946.o obj-$(CONFIG_CPU_ARM1020) += proc-arm1020.o obj-$(CONFIG_CPU_ARM1020E) += proc-arm1020e.o obj-$(CONFIG_CPU_ARM1022) += proc-arm1022.o diff --git a/arch/arm/mm/abort-lv4t.S b/arch/arm/mm/abort-lv4t.S index db743e5..9fb7b0e 100644 --- a/arch/arm/mm/abort-lv4t.S +++ b/arch/arm/mm/abort-lv4t.S @@ -19,11 +19,16 @@ #include */ ENTRY(v4t_late_abort) tst r3, #PSR_T_BIT @ check for thumb mode +#ifdef CONFIG_CPU_CP15_MMU mrc p15, 0, r1, c5, c0, 0 @ get FSR mrc p15, 0, r0, c6, c0, 0 @ get FAR + bic r1, r1, #1 << 11 | 1 << 10 @ clear bits 11 and 10 of FSR +#else + mov r0, #0 @ clear r0, r1 (no FSR/FAR) + mov r1, #0 +#endif bne .data_thumb_abort ldr r8, [r2] @ read arm instruction - bic r1, r1, #1 << 11 | 1 << 10 @ clear bits 11 and 10 of FSR tst r8, #1 << 20 @ L = 1 -> write? orreq r1, r1, #1 << 11 @ yes. and r7, r8, #15 << 24 diff --git a/arch/arm/mm/abort-nommu.S b/arch/arm/mm/abort-nommu.S new file mode 100644 index 0000000..a7cc7f9 --- /dev/null +++ b/arch/arm/mm/abort-nommu.S @@ -0,0 +1,19 @@ +#include +#include +/* + * Function: nommu_early_abort + * + * Params : r2 = address of aborted instruction + * : r3 = saved SPSR + * + * Returns : r0 = 0 (abort address) + * : r1 = 0 (FSR) + * + * Note: There is no FSR/FAR on !CPU_CP15_MMU cores. + * Just fill zero into the registers. + */ + .align 5 +ENTRY(nommu_early_abort) + mov r0, #0 @ clear r0, r1 (no FSR/FAR) + mov r1, #0 + mov pc, lr diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index e0d21bb..aa109f0 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c @@ -735,7 +735,7 @@ do_alignment(unsigned long addr, unsigne /* * We got a fault - fix it up, or die. */ - do_bad_area(current, current->mm, addr, fsr, regs); + do_bad_area(addr, fsr, regs); return 0; swp: diff --git a/arch/arm/mm/cache-v4.S b/arch/arm/mm/cache-v4.S index b8ad5d5..b290806 100644 --- a/arch/arm/mm/cache-v4.S +++ b/arch/arm/mm/cache-v4.S @@ -29,9 +29,13 @@ ENTRY(v4_flush_user_cache_all) * Clean and invalidate the entire cache. */ ENTRY(v4_flush_kern_cache_all) +#ifdef CPU_CP15 mov r0, #0 mcr p15, 0, r0, c7, c7, 0 @ flush ID cache mov pc, lr +#else + /* FALLTHROUGH */ +#endif /* * flush_user_cache_range(start, end, flags) @@ -44,9 +48,13 @@ ENTRY(v4_flush_kern_cache_all) * - flags - vma_area_struct flags describing address space */ ENTRY(v4_flush_user_cache_range) +#ifdef CPU_CP15 mov ip, #0 mcreq p15, 0, ip, c7, c7, 0 @ flush ID cache mov pc, lr +#else + /* FALLTHROUGH */ +#endif /* * coherent_kern_range(start, end) @@ -108,8 +116,10 @@ ENTRY(v4_dma_inv_range) * - end - virtual end address */ ENTRY(v4_dma_flush_range) +#ifdef CPU_CP15 mov r0, #0 mcr p15, 0, r0, c7, c7, 0 @ flush ID cache +#endif /* FALLTHROUGH */ /* diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c new file mode 100644 index 0000000..79e8002 --- /dev/null +++ b/arch/arm/mm/context.c @@ -0,0 +1,45 @@ +/* + * linux/arch/arm/mm/context.c + * + * Copyright (C) 2002-2003 Deep Blue Solutions Ltd, all rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +#include +#include + +unsigned int cpu_last_asid = { 1 << ASID_BITS }; + +/* + * We fork()ed a process, and we need a new context for the child + * to run in. We reserve version 0 for initial tasks so we will + * always allocate an ASID. + */ +void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) +{ + mm->context.id = 0; +} + +void __new_context(struct mm_struct *mm) +{ + unsigned int asid; + + asid = ++cpu_last_asid; + if (asid == 0) + asid = cpu_last_asid = 1 << ASID_BITS; + + /* + * If we've used up all our ASIDs, we need + * to start a new version and flush the TLB. + */ + if ((asid & ~ASID_MASK) == 0) + flush_tlb_all(); + + mm->context.id = asid; +} diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c index fc69dcc..df1645e 100644 --- a/arch/arm/mm/copypage-v4mc.c +++ b/arch/arm/mm/copypage-v4mc.c @@ -20,6 +20,8 @@ #include #include #include +#include "mm.h" + /* * 0xffff8000 to 0xffffffff is reserved for any ARM architecture * specific hacks for copying pages efficiently. @@ -27,8 +29,6 @@ #include #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ L_PTE_CACHEABLE) -#define TOP_PTE(x) pte_offset_kernel(top_pmd, x) - static DEFINE_SPINLOCK(minicache_lock); /* diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index 269ce69..3d0d3a9 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c @@ -17,6 +17,8 @@ #include #include #include +#include "mm.h" + #if SHMLBA > 16384 #error FIX ME #endif @@ -24,8 +26,6 @@ #endif #define from_address (0xffff8000) #define to_address (0xffffc000) -#define TOP_PTE(x) pte_offset_kernel(top_pmd, x) - static DEFINE_SPINLOCK(v6_lock); /* diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c index 42a6ee2..84ebe0a 100644 --- a/arch/arm/mm/copypage-xscale.c +++ b/arch/arm/mm/copypage-xscale.c @@ -20,6 +20,8 @@ #include #include #include +#include "mm.h" + /* * 0xffff8000 to 0xffffffff is reserved for any ARM architecture * specific hacks for copying pages efficiently. @@ -29,8 +31,6 @@ #define COPYPAGE_MINICACHE 0xffff8000 #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ L_PTE_CACHEABLE) -#define TOP_PTE(x) pte_offset_kernel(top_pmd, x) - static DEFINE_SPINLOCK(minicache_lock); /* diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index c5e0622..5e658a8 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -131,10 +131,11 @@ #endif force_sig_info(sig, &si, tsk); } -void -do_bad_area(struct task_struct *tsk, struct mm_struct *mm, unsigned long addr, - unsigned int fsr, struct pt_regs *regs) +void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs) { + struct task_struct *tsk = current; + struct mm_struct *mm = tsk->active_mm; + /* * If we are in kernel mode at this point, we * have no context to handle this fault with. @@ -170,7 +171,7 @@ good_area: if (fsr & (1 << 11)) /* write? */ mask = VM_WRITE; else - mask = VM_READ|VM_EXEC; + mask = VM_READ|VM_EXEC|VM_WRITE; fault = VM_FAULT_BADACCESS; if (!(vma->vm_flags & mask)) @@ -197,7 +198,7 @@ survive: return fault; } - if (tsk->pid != 1) + if (!is_init(tsk)) goto out; /* @@ -319,7 +320,6 @@ static int do_translation_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) { - struct task_struct *tsk; unsigned int index; pgd_t *pgd, *pgd_k; pmd_t *pmd, *pmd_k; @@ -351,9 +351,7 @@ do_translation_fault(unsigned long addr, return 0; bad_area: - tsk = current; - - do_bad_area(tsk, tsk->active_mm, addr, fsr, regs); + do_bad_area(addr, fsr, regs); return 0; } @@ -364,8 +362,7 @@ bad_area: static int do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) { - struct task_struct *tsk = current; - do_bad_area(tsk, tsk->active_mm, addr, fsr, regs); + do_bad_area(addr, fsr, regs); return 0; } diff --git a/arch/arm/mm/fault.h b/arch/arm/mm/fault.h index 73b59e8..49e9e38 100644 --- a/arch/arm/mm/fault.h +++ b/arch/arm/mm/fault.h @@ -1,6 +1,3 @@ -void do_bad_area(struct task_struct *tsk, struct mm_struct *mm, - unsigned long addr, unsigned int fsr, struct pt_regs *regs); - -void show_pte(struct mm_struct *mm, unsigned long addr); +void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs); unsigned long search_exception_table(unsigned long addr); diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index d438ce4..454205b 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -15,12 +15,12 @@ #include #include #include +#include "mm.h" + #ifdef CONFIG_CPU_CACHE_VIPT #define ALIAS_FLUSH_START 0xffff4000 -#define TOP_PTE(x) pte_offset_kernel(top_pmd, x) - static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) { unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT); @@ -107,7 +107,7 @@ void flush_ptrace_access(struct vm_area_ /* VIPT non-aliasing cache */ if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask) && - vma->vm_flags | VM_EXEC) { + vma->vm_flags & VM_EXEC) { unsigned long addr = (unsigned long)kaddr; /* only flushing the kernel mapping on non-aliasing VIPT */ __cpuc_coherent_kern_range(addr, addr + len); diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index fe3f7f6..22217fe 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -25,10 +25,9 @@ #include #include #include -DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); +#include "mm.h" -extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; -extern void _stext, _text, _etext, __data_start, _end, __init_begin, __init_end; +extern void _text, _etext, __data_start, _end, __init_begin, __init_end; extern unsigned long phys_initrd_start; extern unsigned long phys_initrd_size; @@ -38,12 +37,6 @@ extern unsigned long phys_initrd_size; */ static struct meminfo meminfo __initdata = { 0, }; -/* - * empty_zero_page is a special page that is used for - * zero-initialized data and COW. - */ -struct page *empty_zero_page; - void show_mem(void) { int free = 0, total = 0, reserved = 0; @@ -83,16 +76,6 @@ void show_mem(void) printk("%d pages swap cached\n", cached); } -static inline pmd_t *pmd_off(pgd_t *pgd, unsigned long virt) -{ - return pmd_offset(pgd, virt); -} - -static inline pmd_t *pmd_off_k(unsigned long virt) -{ - return pmd_off(pgd_offset_k(virt), virt); -} - #define for_each_nodebank(iter,mi,no) \ for (iter = 0; iter < mi->nr_banks; iter++) \ if (mi->bank[iter].node == no) @@ -176,62 +159,20 @@ #endif return initrd_node; } -/* - * Reserve the various regions of node 0 - */ -static __init void reserve_node_zero(pg_data_t *pgdat) +static inline void map_memory_bank(struct membank *bank) { - unsigned long res_size = 0; - - /* - * Register the kernel text and data with bootmem. - * Note that this can only be in node 0. - */ -#ifdef CONFIG_XIP_KERNEL - reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start); -#else - reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext); -#endif - - /* - * Reserve the page tables. These are already in use, - * and can only be in node 0. - */ - reserve_bootmem_node(pgdat, __pa(swapper_pg_dir), - PTRS_PER_PGD * sizeof(pgd_t)); - - /* - * Hmm... This should go elsewhere, but we really really need to - * stop things allocating the low memory; ideally we need a better - * implementation of GFP_DMA which does not assume that DMA-able - * memory starts at zero. - */ - if (machine_is_integrator() || machine_is_cintegrator()) - res_size = __pa(swapper_pg_dir) - PHYS_OFFSET; +#ifdef CONFIG_MMU + struct map_desc map; - /* - * These should likewise go elsewhere. They pre-reserve the - * screen memory region at the start of main system memory. - */ - if (machine_is_edb7211()) - res_size = 0x00020000; - if (machine_is_p720t()) - res_size = 0x00014000; + map.pfn = __phys_to_pfn(bank->start); + map.virtual = __phys_to_virt(bank->start); + map.length = bank->size; + map.type = MT_MEMORY; -#ifdef CONFIG_SA1111 - /* - * Because of the SA1111 DMA bug, we want to preserve our - * precious DMA-able memory... - */ - res_size = __pa(swapper_pg_dir) - PHYS_OFFSET; + create_mapping(&map); #endif - if (res_size) - reserve_bootmem_node(pgdat, PHYS_OFFSET, res_size); } -void __init build_mem_type_table(void); -void __init create_mapping(struct map_desc *md); - static unsigned long __init bootmem_init_node(int node, int initrd_node, struct meminfo *mi) { @@ -248,23 +189,18 @@ bootmem_init_node(int node, int initrd_n * Calculate the pfn range, and map the memory banks for this node. */ for_each_nodebank(i, mi, node) { + struct membank *bank = &mi->bank[i]; unsigned long start, end; - struct map_desc map; - start = mi->bank[i].start >> PAGE_SHIFT; - end = (mi->bank[i].start + mi->bank[i].size) >> PAGE_SHIFT; + start = bank->start >> PAGE_SHIFT; + end = (bank->start + bank->size) >> PAGE_SHIFT; if (start_pfn > start) start_pfn = start; if (end_pfn < end) end_pfn = end; - map.pfn = __phys_to_pfn(mi->bank[i].start); - map.virtual = __phys_to_virt(mi->bank[i].start); - map.length = mi->bank[i].size; - map.type = MT_MEMORY; - - create_mapping(&map); + map_memory_bank(bank); } /* @@ -346,9 +282,9 @@ #endif return end_pfn; } -static void __init bootmem_init(struct meminfo *mi) +void __init bootmem_init(struct meminfo *mi) { - unsigned long addr, memend_pfn = 0; + unsigned long memend_pfn = 0; int node, initrd_node, i; /* @@ -361,26 +297,6 @@ static void __init bootmem_init(struct m memcpy(&meminfo, mi, sizeof(meminfo)); /* - * Clear out all the mappings below the kernel image. - */ - for (addr = 0; addr < MODULE_START; addr += PGDIR_SIZE) - pmd_clear(pmd_off_k(addr)); -#ifdef CONFIG_XIP_KERNEL - /* The XIP kernel is mapped in the module area -- skip over it */ - addr = ((unsigned long)&_etext + PGDIR_SIZE - 1) & PGDIR_MASK; -#endif - for ( ; addr < PAGE_OFFSET; addr += PGDIR_SIZE) - pmd_clear(pmd_off_k(addr)); - - /* - * Clear out all the kernel space mappings, except for the first - * memory bank, up to the end of the vmalloc region. - */ - for (addr = __phys_to_virt(mi->bank[0].start + mi->bank[0].size); - addr < VMALLOC_END; addr += PGDIR_SIZE) - pmd_clear(pmd_off_k(addr)); - - /* * Locate which node contains the ramdisk image, if any. */ initrd_node = check_initrd(mi); @@ -413,114 +329,6 @@ #endif max_pfn = max_low_pfn = memend_pfn - PHYS_PFN_OFFSET; } -/* - * Set up device the mappings. Since we clear out the page tables for all - * mappings above VMALLOC_END, we will remove any debug device mappings. - * This means you have to be careful how you debug this function, or any - * called function. This means you can't use any function or debugging - * method which may touch any device, otherwise the kernel _will_ crash. - */ -static void __init devicemaps_init(struct machine_desc *mdesc) -{ - struct map_desc map; - unsigned long addr; - void *vectors; - - /* - * Allocate the vector page early. - */ - vectors = alloc_bootmem_low_pages(PAGE_SIZE); - BUG_ON(!vectors); - - for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) - pmd_clear(pmd_off_k(addr)); - - /* - * Map the kernel if it is XIP. - * It is always first in the modulearea. - */ -#ifdef CONFIG_XIP_KERNEL - map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & PGDIR_MASK); - map.virtual = MODULE_START; - map.length = ((unsigned long)&_etext - map.virtual + ~PGDIR_MASK) & PGDIR_MASK; - map.type = MT_ROM; - create_mapping(&map); -#endif - - /* - * Map the cache flushing regions. - */ -#ifdef FLUSH_BASE - map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS); - map.virtual = FLUSH_BASE; - map.length = SZ_1M; - map.type = MT_CACHECLEAN; - create_mapping(&map); -#endif -#ifdef FLUSH_BASE_MINICACHE - map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS + SZ_1M); - map.virtual = FLUSH_BASE_MINICACHE; - map.length = SZ_1M; - map.type = MT_MINICLEAN; - create_mapping(&map); -#endif - - /* - * Create a mapping for the machine vectors at the high-vectors - * location (0xffff0000). If we aren't using high-vectors, also - * create a mapping at the low-vectors virtual address. - */ - map.pfn = __phys_to_pfn(virt_to_phys(vectors)); - map.virtual = 0xffff0000; - map.length = PAGE_SIZE; - map.type = MT_HIGH_VECTORS; - create_mapping(&map); - - if (!vectors_high()) { - map.virtual = 0; - map.type = MT_LOW_VECTORS; - create_mapping(&map); - } - - /* - * Ask the machine support to map in the statically mapped devices. - */ - if (mdesc->map_io) - mdesc->map_io(); - - /* - * Finally flush the caches and tlb to ensure that we're in a - * consistent state wrt the writebuffer. This also ensures that - * any write-allocated cache lines in the vector page are written - * back. After this point, we can start to touch devices again. - */ - local_flush_tlb_all(); - flush_cache_all(); -} - -/* - * paging_init() sets up the page tables, initialises the zone memory - * maps, and sets up the zero page, bad page and bad page tables. - */ -void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) -{ - void *zero_page; - - build_mem_type_table(); - bootmem_init(mi); - devicemaps_init(mdesc); - - top_pmd = pmd_off_k(0xffff0000); - - /* - * allocate the zero page. Note that we count on this going ok. - */ - zero_page = alloc_bootmem_low_pages(PAGE_SIZE); - memzero(zero_page, PAGE_SIZE); - empty_zero_page = virt_to_page(zero_page); - flush_dcache_page(empty_zero_page); -} - static inline void free_area(unsigned long addr, unsigned long end, char *s) { unsigned int size = (end - addr) >> 10; diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 88a999d..591fc31 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -177,7 +177,7 @@ static void unmap_area_sections(unsigned * Free the page table, if there was one. */ if ((pmd_val(pmd) & PMD_TYPE_MASK) == PMD_TYPE_TABLE) - pte_free_kernel(pmd_page_kernel(pmd)); + pte_free_kernel(pmd_page_vaddr(pmd)); } addr += PGDIR_SIZE; diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c deleted file mode 100644 index 38769f5..0000000 --- a/arch/arm/mm/mm-armv.c +++ /dev/null @@ -1,663 +0,0 @@ -/* - * linux/arch/arm/mm/mm-armv.c - * - * Copyright (C) 1998-2005 Russell King - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Page table sludge for ARM v3 and v4 processor architectures. - */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#define CPOLICY_UNCACHED 0 -#define CPOLICY_BUFFERED 1 -#define CPOLICY_WRITETHROUGH 2 -#define CPOLICY_WRITEBACK 3 -#define CPOLICY_WRITEALLOC 4 - -static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK; -static unsigned int ecc_mask __initdata = 0; -pgprot_t pgprot_kernel; - -EXPORT_SYMBOL(pgprot_kernel); - -pmd_t *top_pmd; - -struct cachepolicy { - const char policy[16]; - unsigned int cr_mask; - unsigned int pmd; - unsigned int pte; -}; - -static struct cachepolicy cache_policies[] __initdata = { - { - .policy = "uncached", - .cr_mask = CR_W|CR_C, - .pmd = PMD_SECT_UNCACHED, - .pte = 0, - }, { - .policy = "buffered", - .cr_mask = CR_C, - .pmd = PMD_SECT_BUFFERED, - .pte = PTE_BUFFERABLE, - }, { - .policy = "writethrough", - .cr_mask = 0, - .pmd = PMD_SECT_WT, - .pte = PTE_CACHEABLE, - }, { - .policy = "writeback", - .cr_mask = 0, - .pmd = PMD_SECT_WB, - .pte = PTE_BUFFERABLE|PTE_CACHEABLE, - }, { - .policy = "writealloc", - .cr_mask = 0, - .pmd = PMD_SECT_WBWA, - .pte = PTE_BUFFERABLE|PTE_CACHEABLE, - } -}; - -/* - * These are useful for identifing cache coherency - * problems by allowing the cache or the cache and - * writebuffer to be turned off. (Note: the write - * buffer should not be on and the cache off). - */ -static void __init early_cachepolicy(char **p) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(cache_policies); i++) { - int len = strlen(cache_policies[i].policy); - - if (memcmp(*p, cache_policies[i].policy, len) == 0) { - cachepolicy = i; - cr_alignment &= ~cache_policies[i].cr_mask; - cr_no_alignment &= ~cache_policies[i].cr_mask; - *p += len; - break; - } - } - if (i == ARRAY_SIZE(cache_policies)) - printk(KERN_ERR "ERROR: unknown or unsupported cache policy\n"); - flush_cache_all(); - set_cr(cr_alignment); -} - -static void __init early_nocache(char **__unused) -{ - char *p = "buffered"; - printk(KERN_WARNING "nocache is deprecated; use cachepolicy=%s\n", p); - early_cachepolicy(&p); -} - -static void __init early_nowrite(char **__unused) -{ - char *p = "uncached"; - printk(KERN_WARNING "nowb is deprecated; use cachepolicy=%s\n", p); - early_cachepolicy(&p); -} - -static void __init early_ecc(char **p) -{ - if (memcmp(*p, "on", 2) == 0) { - ecc_mask = PMD_PROTECTION; - *p += 2; - } else if (memcmp(*p, "off", 3) == 0) { - ecc_mask = 0; - *p += 3; - } -} - -__early_param("nocache", early_nocache); -__early_param("nowb", early_nowrite); -__early_param("cachepolicy=", early_cachepolicy); -__early_param("ecc=", early_ecc); - -static int __init noalign_setup(char *__unused) -{ - cr_alignment &= ~CR_A; - cr_no_alignment &= ~CR_A; - set_cr(cr_alignment); - return 1; -} - -__setup("noalign", noalign_setup); - -#define FIRST_KERNEL_PGD_NR (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD) - -static inline pmd_t *pmd_off(pgd_t *pgd, unsigned long virt) -{ - return pmd_offset(pgd, virt); -} - -static inline pmd_t *pmd_off_k(unsigned long virt) -{ - return pmd_off(pgd_offset_k(virt), virt); -} - -/* - * need to get a 16k page for level 1 - */ -pgd_t *get_pgd_slow(struct mm_struct *mm) -{ - pgd_t *new_pgd, *init_pgd; - pmd_t *new_pmd, *init_pmd; - pte_t *new_pte, *init_pte; - - new_pgd = (pgd_t *)__get_free_pages(GFP_KERNEL, 2); - if (!new_pgd) - goto no_pgd; - - memzero(new_pgd, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); - - /* - * Copy over the kernel and IO PGD entries - */ - init_pgd = pgd_offset_k(0); - memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR, - (PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t)); - - clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t)); - - if (!vectors_high()) { - /* - * On ARM, first page must always be allocated since it - * contains the machine vectors. - */ - new_pmd = pmd_alloc(mm, new_pgd, 0); - if (!new_pmd) - goto no_pmd; - - new_pte = pte_alloc_map(mm, new_pmd, 0); - if (!new_pte) - goto no_pte; - - init_pmd = pmd_offset(init_pgd, 0); - init_pte = pte_offset_map_nested(init_pmd, 0); - set_pte(new_pte, *init_pte); - pte_unmap_nested(init_pte); - pte_unmap(new_pte); - } - - return new_pgd; - -no_pte: - pmd_free(new_pmd); -no_pmd: - free_pages((unsigned long)new_pgd, 2); -no_pgd: - return NULL; -} - -void free_pgd_slow(pgd_t *pgd) -{ - pmd_t *pmd; - struct page *pte; - - if (!pgd) - return; - - /* pgd is always present and good */ - pmd = pmd_off(pgd, 0); - if (pmd_none(*pmd)) - goto free; - if (pmd_bad(*pmd)) { - pmd_ERROR(*pmd); - pmd_clear(pmd); - goto free; - } - - pte = pmd_page(*pmd); - pmd_clear(pmd); - dec_zone_page_state(virt_to_page((unsigned long *)pgd), NR_PAGETABLE); - pte_lock_deinit(pte); - pte_free(pte); - pmd_free(pmd); -free: - free_pages((unsigned long) pgd, 2); -} - -/* - * Create a SECTION PGD between VIRT and PHYS in domain - * DOMAIN with protection PROT. This operates on half- - * pgdir entry increments. - */ -static inline void -alloc_init_section(unsigned long virt, unsigned long phys, int prot) -{ - pmd_t *pmdp = pmd_off_k(virt); - - if (virt & (1 << 20)) - pmdp++; - - *pmdp = __pmd(phys | prot); - flush_pmd_entry(pmdp); -} - -/* - * Create a SUPER SECTION PGD between VIRT and PHYS with protection PROT - */ -static inline void -alloc_init_supersection(unsigned long virt, unsigned long phys, int prot) -{ - int i; - - for (i = 0; i < 16; i += 1) { - alloc_init_section(virt, phys, prot | PMD_SECT_SUPER); - - virt += (PGDIR_SIZE / 2); - } -} - -/* - * Add a PAGE mapping between VIRT and PHYS in domain - * DOMAIN with protection PROT. Note that due to the - * way we map the PTEs, we must allocate two PTE_SIZE'd - * blocks - one for the Linux pte table, and one for - * the hardware pte table. - */ -static inline void -alloc_init_page(unsigned long virt, unsigned long phys, unsigned int prot_l1, pgprot_t prot) -{ - pmd_t *pmdp = pmd_off_k(virt); - pte_t *ptep; - - if (pmd_none(*pmdp)) { - ptep = alloc_bootmem_low_pages(2 * PTRS_PER_PTE * - sizeof(pte_t)); - - __pmd_populate(pmdp, __pa(ptep) | prot_l1); - } - ptep = pte_offset_kernel(pmdp, virt); - - set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, prot)); -} - -struct mem_types { - unsigned int prot_pte; - unsigned int prot_l1; - unsigned int prot_sect; - unsigned int domain; -}; - -static struct mem_types mem_types[] __initdata = { - [MT_DEVICE] = { - .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | - L_PTE_WRITE, - .prot_l1 = PMD_TYPE_TABLE, - .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED | - PMD_SECT_AP_WRITE, - .domain = DOMAIN_IO, - }, - [MT_CACHECLEAN] = { - .prot_sect = PMD_TYPE_SECT | PMD_BIT4, - .domain = DOMAIN_KERNEL, - }, - [MT_MINICLEAN] = { - .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_MINICACHE, - .domain = DOMAIN_KERNEL, - }, - [MT_LOW_VECTORS] = { - .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | - L_PTE_EXEC, - .prot_l1 = PMD_TYPE_TABLE, - .domain = DOMAIN_USER, - }, - [MT_HIGH_VECTORS] = { - .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | - L_PTE_USER | L_PTE_EXEC, - .prot_l1 = PMD_TYPE_TABLE, - .domain = DOMAIN_USER, - }, - [MT_MEMORY] = { - .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_AP_WRITE, - .domain = DOMAIN_KERNEL, - }, - [MT_ROM] = { - .prot_sect = PMD_TYPE_SECT | PMD_BIT4, - .domain = DOMAIN_KERNEL, - }, - [MT_IXP2000_DEVICE] = { /* IXP2400 requires XCB=101 for on-chip I/O */ - .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | - L_PTE_WRITE, - .prot_l1 = PMD_TYPE_TABLE, - .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED | - PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | - PMD_SECT_TEX(1), - .domain = DOMAIN_IO, - }, - [MT_NONSHARED_DEVICE] = { - .prot_l1 = PMD_TYPE_TABLE, - .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_NONSHARED_DEV | - PMD_SECT_AP_WRITE, - .domain = DOMAIN_IO, - } -}; - -/* - * Adjust the PMD section entries according to the CPU in use. - */ -void __init build_mem_type_table(void) -{ - struct cachepolicy *cp; - unsigned int cr = get_cr(); - unsigned int user_pgprot, kern_pgprot; - int cpu_arch = cpu_architecture(); - int i; - -#if defined(CONFIG_CPU_DCACHE_DISABLE) - if (cachepolicy > CPOLICY_BUFFERED) - cachepolicy = CPOLICY_BUFFERED; -#elif defined(CONFIG_CPU_DCACHE_WRITETHROUGH) - if (cachepolicy > CPOLICY_WRITETHROUGH) - cachepolicy = CPOLICY_WRITETHROUGH; -#endif - if (cpu_arch < CPU_ARCH_ARMv5) { - if (cachepolicy >= CPOLICY_WRITEALLOC) - cachepolicy = CPOLICY_WRITEBACK; - ecc_mask = 0; - } - - /* - * Xscale must not have PMD bit 4 set for section mappings. - */ - if (cpu_is_xscale()) - for (i = 0; i < ARRAY_SIZE(mem_types); i++) - mem_types[i].prot_sect &= ~PMD_BIT4; - - /* - * ARMv5 and lower, excluding Xscale, bit 4 must be set for - * page tables. - */ - if (cpu_arch < CPU_ARCH_ARMv6 && !cpu_is_xscale()) - for (i = 0; i < ARRAY_SIZE(mem_types); i++) - if (mem_types[i].prot_l1) - mem_types[i].prot_l1 |= PMD_BIT4; - - cp = &cache_policies[cachepolicy]; - kern_pgprot = user_pgprot = cp->pte; - - /* - * Enable CPU-specific coherency if supported. - * (Only available on XSC3 at the moment.) - */ - if (arch_is_coherent()) { - if (cpu_is_xsc3()) { - mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; - mem_types[MT_MEMORY].prot_pte |= L_PTE_COHERENT; - } - } - - /* - * ARMv6 and above have extended page tables. - */ - if (cpu_arch >= CPU_ARCH_ARMv6 && (cr & CR_XP)) { - /* - * bit 4 becomes XN which we must clear for the - * kernel memory mapping. - */ - mem_types[MT_MEMORY].prot_sect &= ~PMD_SECT_XN; - mem_types[MT_ROM].prot_sect &= ~PMD_SECT_XN; - - /* - * Mark cache clean areas and XIP ROM read only - * from SVC mode and no access from userspace. - */ - mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; - mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; - mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; - - /* - * Mark the device area as "shared device" - */ - mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE; - mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED; - - /* - * User pages need to be mapped with the ASID - * (iow, non-global) - */ - user_pgprot |= L_PTE_ASID; - -#ifdef CONFIG_SMP - /* - * Mark memory with the "shared" attribute for SMP systems - */ - user_pgprot |= L_PTE_SHARED; - kern_pgprot |= L_PTE_SHARED; - mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; -#endif - } - - for (i = 0; i < 16; i++) { - unsigned long v = pgprot_val(protection_map[i]); - v = (v & ~(L_PTE_BUFFERABLE|L_PTE_CACHEABLE)) | user_pgprot; - protection_map[i] = __pgprot(v); - } - - mem_types[MT_LOW_VECTORS].prot_pte |= kern_pgprot; - mem_types[MT_HIGH_VECTORS].prot_pte |= kern_pgprot; - - if (cpu_arch >= CPU_ARCH_ARMv5) { -#ifndef CONFIG_SMP - /* - * Only use write-through for non-SMP systems - */ - mem_types[MT_LOW_VECTORS].prot_pte &= ~L_PTE_BUFFERABLE; - mem_types[MT_HIGH_VECTORS].prot_pte &= ~L_PTE_BUFFERABLE; -#endif - } else { - mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1); - } - - pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | - L_PTE_DIRTY | L_PTE_WRITE | - L_PTE_EXEC | kern_pgprot); - - mem_types[MT_LOW_VECTORS].prot_l1 |= ecc_mask; - mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask; - mem_types[MT_MEMORY].prot_sect |= ecc_mask | cp->pmd; - mem_types[MT_ROM].prot_sect |= cp->pmd; - - switch (cp->pmd) { - case PMD_SECT_WT: - mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WT; - break; - case PMD_SECT_WB: - case PMD_SECT_WBWA: - mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB; - break; - } - printk("Memory policy: ECC %sabled, Data cache %s\n", - ecc_mask ? "en" : "dis", cp->policy); -} - -#define vectors_base() (vectors_high() ? 0xffff0000 : 0) - -/* - * Create the page directory entries and any necessary - * page tables for the mapping specified by `md'. We - * are able to cope here with varying sizes and address - * offsets, and we take full advantage of sections and - * supersections. - */ -void __init create_mapping(struct map_desc *md) -{ - unsigned long virt, length; - int prot_sect, prot_l1, domain; - pgprot_t prot_pte; - unsigned long off = (u32)__pfn_to_phys(md->pfn); - - if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) { - printk(KERN_WARNING "BUG: not creating mapping for " - "0x%08llx at 0x%08lx in user region\n", - __pfn_to_phys((u64)md->pfn), md->virtual); - return; - } - - if ((md->type == MT_DEVICE || md->type == MT_ROM) && - md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) { - printk(KERN_WARNING "BUG: mapping for 0x%08llx at 0x%08lx " - "overlaps vmalloc space\n", - __pfn_to_phys((u64)md->pfn), md->virtual); - } - - domain = mem_types[md->type].domain; - prot_pte = __pgprot(mem_types[md->type].prot_pte); - prot_l1 = mem_types[md->type].prot_l1 | PMD_DOMAIN(domain); - prot_sect = mem_types[md->type].prot_sect | PMD_DOMAIN(domain); - - /* - * Catch 36-bit addresses - */ - if(md->pfn >= 0x100000) { - if(domain) { - printk(KERN_ERR "MM: invalid domain in supersection " - "mapping for 0x%08llx at 0x%08lx\n", - __pfn_to_phys((u64)md->pfn), md->virtual); - return; - } - if((md->virtual | md->length | __pfn_to_phys(md->pfn)) - & ~SUPERSECTION_MASK) { - printk(KERN_ERR "MM: cannot create mapping for " - "0x%08llx at 0x%08lx invalid alignment\n", - __pfn_to_phys((u64)md->pfn), md->virtual); - return; - } - - /* - * Shift bits [35:32] of address into bits [23:20] of PMD - * (See ARMv6 spec). - */ - off |= (((md->pfn >> (32 - PAGE_SHIFT)) & 0xF) << 20); - } - - virt = md->virtual; - off -= virt; - length = md->length; - - if (mem_types[md->type].prot_l1 == 0 && - (virt & 0xfffff || (virt + off) & 0xfffff || (virt + length) & 0xfffff)) { - printk(KERN_WARNING "BUG: map for 0x%08lx at 0x%08lx can not " - "be mapped using pages, ignoring.\n", - __pfn_to_phys(md->pfn), md->virtual); - return; - } - - while ((virt & 0xfffff || (virt + off) & 0xfffff) && length >= PAGE_SIZE) { - alloc_init_page(virt, virt + off, prot_l1, prot_pte); - - virt += PAGE_SIZE; - length -= PAGE_SIZE; - } - - /* N.B. ARMv6 supersections are only defined to work with domain 0. - * Since domain assignments can in fact be arbitrary, the - * 'domain == 0' check below is required to insure that ARMv6 - * supersections are only allocated for domain 0 regardless - * of the actual domain assignments in use. - */ - if ((cpu_architecture() >= CPU_ARCH_ARMv6 || cpu_is_xsc3()) - && domain == 0) { - /* - * Align to supersection boundary if !high pages. - * High pages have already been checked for proper - * alignment above and they will fail the SUPSERSECTION_MASK - * check because of the way the address is encoded into - * offset. - */ - if (md->pfn <= 0x100000) { - while ((virt & ~SUPERSECTION_MASK || - (virt + off) & ~SUPERSECTION_MASK) && - length >= (PGDIR_SIZE / 2)) { - alloc_init_section(virt, virt + off, prot_sect); - - virt += (PGDIR_SIZE / 2); - length -= (PGDIR_SIZE / 2); - } - } - - while (length >= SUPERSECTION_SIZE) { - alloc_init_supersection(virt, virt + off, prot_sect); - - virt += SUPERSECTION_SIZE; - length -= SUPERSECTION_SIZE; - } - } - - /* - * A section mapping covers half a "pgdir" entry. - */ - while (length >= (PGDIR_SIZE / 2)) { - alloc_init_section(virt, virt + off, prot_sect); - - virt += (PGDIR_SIZE / 2); - length -= (PGDIR_SIZE / 2); - } - - while (length >= PAGE_SIZE) { - alloc_init_page(virt, virt + off, prot_l1, prot_pte); - - virt += PAGE_SIZE; - length -= PAGE_SIZE; - } -} - -/* - * In order to soft-boot, we need to insert a 1:1 mapping in place of - * the user-mode pages. This will then ensure that we have predictable - * results when turning the mmu off - */ -void setup_mm_for_reboot(char mode) -{ - unsigned long base_pmdval; - pgd_t *pgd; - int i; - - if (current->mm && current->mm->pgd) - pgd = current->mm->pgd; - else - pgd = init_mm.pgd; - - base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; - if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) - base_pmdval |= PMD_BIT4; - - for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) { - unsigned long pmdval = (i << PGDIR_SHIFT) | base_pmdval; - pmd_t *pmd; - - pmd = pmd_off(pgd, i << PGDIR_SHIFT); - pmd[0] = __pmd(pmdval); - pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1))); - flush_pmd_entry(pmd); - } -} - -/* - * Create the architecture specific mappings - */ -void __init iotable_init(struct map_desc *io_desc, int nr) -{ - int i; - - for (i = 0; i < nr; i++) - create_mapping(io_desc + i); -} diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h new file mode 100644 index 0000000..bb2bc9a --- /dev/null +++ b/arch/arm/mm/mm.h @@ -0,0 +1,22 @@ +/* the upper-most page table pointer */ +extern pmd_t *top_pmd; + +#define TOP_PTE(x) pte_offset_kernel(top_pmd, x) + +static inline pmd_t *pmd_off(pgd_t *pgd, unsigned long virt) +{ + return pmd_offset(pgd, virt); +} + +static inline pmd_t *pmd_off_k(unsigned long virt) +{ + return pmd_off(pgd_offset_k(virt), virt); +} + +struct map_desc; +struct meminfo; +struct pglist_data; + +void __init create_mapping(struct map_desc *md); +void __init bootmem_init(struct meminfo *mi); +void reserve_node_zero(struct pglist_data *pgdat); diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index 29e5480..b0b5f46 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c @@ -114,3 +114,25 @@ full_search: } } + +/* + * You really shouldn't be using read() or write() on /dev/mem. This + * might go away in the future. + */ +int valid_phys_addr_range(unsigned long addr, size_t size) +{ + if (addr + size > __pa(high_memory)) + return 0; + + return 1; +} + +/* + * We don't use supersection mappings for mmap() on /dev/mem, which + * means that we can't map the memory area above the 4G barrier into + * userspace. + */ +int valid_mmap_phys_addr_range(unsigned long pfn, size_t size) +{ + return !(pfn + (size >> PAGE_SHIFT) > 0x00100000); +} diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 0d90227..e566cbe 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1,45 +1,771 @@ /* * linux/arch/arm/mm/mmu.c * - * Copyright (C) 2002-2003 Deep Blue Solutions Ltd, all rights reserved. + * Copyright (C) 1995-2005 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include +#include +#include #include -#include -#include +#include +#include +#include -#include -#include +#include +#include +#include +#include -unsigned int cpu_last_asid = { 1 << ASID_BITS }; +#include +#include + +#include "mm.h" + +DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); + +extern void _stext, __data_start, _end; +extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; + +/* + * empty_zero_page is a special page that is used for + * zero-initialized data and COW. + */ +struct page *empty_zero_page; /* - * We fork()ed a process, and we need a new context for the child - * to run in. We reserve version 0 for initial tasks so we will - * always allocate an ASID. + * The pmd table for the upper-most set of pages. */ -void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) +pmd_t *top_pmd; + +#define CPOLICY_UNCACHED 0 +#define CPOLICY_BUFFERED 1 +#define CPOLICY_WRITETHROUGH 2 +#define CPOLICY_WRITEBACK 3 +#define CPOLICY_WRITEALLOC 4 + +static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK; +static unsigned int ecc_mask __initdata = 0; +pgprot_t pgprot_kernel; + +EXPORT_SYMBOL(pgprot_kernel); + +struct cachepolicy { + const char policy[16]; + unsigned int cr_mask; + unsigned int pmd; + unsigned int pte; +}; + +static struct cachepolicy cache_policies[] __initdata = { + { + .policy = "uncached", + .cr_mask = CR_W|CR_C, + .pmd = PMD_SECT_UNCACHED, + .pte = 0, + }, { + .policy = "buffered", + .cr_mask = CR_C, + .pmd = PMD_SECT_BUFFERED, + .pte = PTE_BUFFERABLE, + }, { + .policy = "writethrough", + .cr_mask = 0, + .pmd = PMD_SECT_WT, + .pte = PTE_CACHEABLE, + }, { + .policy = "writeback", + .cr_mask = 0, + .pmd = PMD_SECT_WB, + .pte = PTE_BUFFERABLE|PTE_CACHEABLE, + }, { + .policy = "writealloc", + .cr_mask = 0, + .pmd = PMD_SECT_WBWA, + .pte = PTE_BUFFERABLE|PTE_CACHEABLE, + } +}; + +/* + * These are useful for identifing cache coherency + * problems by allowing the cache or the cache and + * writebuffer to be turned off. (Note: the write + * buffer should not be on and the cache off). + */ +static void __init early_cachepolicy(char **p) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(cache_policies); i++) { + int len = strlen(cache_policies[i].policy); + + if (memcmp(*p, cache_policies[i].policy, len) == 0) { + cachepolicy = i; + cr_alignment &= ~cache_policies[i].cr_mask; + cr_no_alignment &= ~cache_policies[i].cr_mask; + *p += len; + break; + } + } + if (i == ARRAY_SIZE(cache_policies)) + printk(KERN_ERR "ERROR: unknown or unsupported cache policy\n"); + flush_cache_all(); + set_cr(cr_alignment); +} +__early_param("cachepolicy=", early_cachepolicy); + +static void __init early_nocache(char **__unused) +{ + char *p = "buffered"; + printk(KERN_WARNING "nocache is deprecated; use cachepolicy=%s\n", p); + early_cachepolicy(&p); +} +__early_param("nocache", early_nocache); + +static void __init early_nowrite(char **__unused) +{ + char *p = "uncached"; + printk(KERN_WARNING "nowb is deprecated; use cachepolicy=%s\n", p); + early_cachepolicy(&p); +} +__early_param("nowb", early_nowrite); + +static void __init early_ecc(char **p) +{ + if (memcmp(*p, "on", 2) == 0) { + ecc_mask = PMD_PROTECTION; + *p += 2; + } else if (memcmp(*p, "off", 3) == 0) { + ecc_mask = 0; + *p += 3; + } +} +__early_param("ecc=", early_ecc); + +static int __init noalign_setup(char *__unused) { - mm->context.id = 0; + cr_alignment &= ~CR_A; + cr_no_alignment &= ~CR_A; + set_cr(cr_alignment); + return 1; } +__setup("noalign", noalign_setup); + +struct mem_types { + unsigned int prot_pte; + unsigned int prot_l1; + unsigned int prot_sect; + unsigned int domain; +}; -void __new_context(struct mm_struct *mm) +static struct mem_types mem_types[] __initdata = { + [MT_DEVICE] = { + .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | + L_PTE_WRITE, + .prot_l1 = PMD_TYPE_TABLE, + .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED | + PMD_SECT_AP_WRITE, + .domain = DOMAIN_IO, + }, + [MT_CACHECLEAN] = { + .prot_sect = PMD_TYPE_SECT | PMD_BIT4, + .domain = DOMAIN_KERNEL, + }, + [MT_MINICLEAN] = { + .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_MINICACHE, + .domain = DOMAIN_KERNEL, + }, + [MT_LOW_VECTORS] = { + .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | + L_PTE_EXEC, + .prot_l1 = PMD_TYPE_TABLE, + .domain = DOMAIN_USER, + }, + [MT_HIGH_VECTORS] = { + .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | + L_PTE_USER | L_PTE_EXEC, + .prot_l1 = PMD_TYPE_TABLE, + .domain = DOMAIN_USER, + }, + [MT_MEMORY] = { + .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_AP_WRITE, + .domain = DOMAIN_KERNEL, + }, + [MT_ROM] = { + .prot_sect = PMD_TYPE_SECT | PMD_BIT4, + .domain = DOMAIN_KERNEL, + }, + [MT_IXP2000_DEVICE] = { /* IXP2400 requires XCB=101 for on-chip I/O */ + .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | + L_PTE_WRITE, + .prot_l1 = PMD_TYPE_TABLE, + .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED | + PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | + PMD_SECT_TEX(1), + .domain = DOMAIN_IO, + }, + [MT_NONSHARED_DEVICE] = { + .prot_l1 = PMD_TYPE_TABLE, + .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_NONSHARED_DEV | + PMD_SECT_AP_WRITE, + .domain = DOMAIN_IO, + } +}; + +/* + * Adjust the PMD section entries according to the CPU in use. + */ +static void __init build_mem_type_table(void) { - unsigned int asid; + struct cachepolicy *cp; + unsigned int cr = get_cr(); + unsigned int user_pgprot, kern_pgprot; + int cpu_arch = cpu_architecture(); + int i; - asid = ++cpu_last_asid; - if (asid == 0) - asid = cpu_last_asid = 1 << ASID_BITS; +#if defined(CONFIG_CPU_DCACHE_DISABLE) + if (cachepolicy > CPOLICY_BUFFERED) + cachepolicy = CPOLICY_BUFFERED; +#elif defined(CONFIG_CPU_DCACHE_WRITETHROUGH) + if (cachepolicy > CPOLICY_WRITETHROUGH) + cachepolicy = CPOLICY_WRITETHROUGH; +#endif + if (cpu_arch < CPU_ARCH_ARMv5) { + if (cachepolicy >= CPOLICY_WRITEALLOC) + cachepolicy = CPOLICY_WRITEBACK; + ecc_mask = 0; + } + + /* + * Xscale must not have PMD bit 4 set for section mappings. + */ + if (cpu_is_xscale()) + for (i = 0; i < ARRAY_SIZE(mem_types); i++) + mem_types[i].prot_sect &= ~PMD_BIT4; /* - * If we've used up all our ASIDs, we need - * to start a new version and flush the TLB. + * ARMv5 and lower, excluding Xscale, bit 4 must be set for + * page tables. */ - if ((asid & ~ASID_MASK) == 0) - flush_tlb_all(); + if (cpu_arch < CPU_ARCH_ARMv6 && !cpu_is_xscale()) + for (i = 0; i < ARRAY_SIZE(mem_types); i++) + if (mem_types[i].prot_l1) + mem_types[i].prot_l1 |= PMD_BIT4; + + cp = &cache_policies[cachepolicy]; + kern_pgprot = user_pgprot = cp->pte; + + /* + * Enable CPU-specific coherency if supported. + * (Only available on XSC3 at the moment.) + */ + if (arch_is_coherent()) { + if (cpu_is_xsc3()) { + mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; + mem_types[MT_MEMORY].prot_pte |= L_PTE_COHERENT; + } + } + + /* + * ARMv6 and above have extended page tables. + */ + if (cpu_arch >= CPU_ARCH_ARMv6 && (cr & CR_XP)) { + /* + * bit 4 becomes XN which we must clear for the + * kernel memory mapping. + */ + mem_types[MT_MEMORY].prot_sect &= ~PMD_SECT_XN; + mem_types[MT_ROM].prot_sect &= ~PMD_SECT_XN; + + /* + * Mark cache clean areas and XIP ROM read only + * from SVC mode and no access from userspace. + */ + mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; + mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; + mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; + + /* + * Mark the device area as "shared device" + */ + mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE; + mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED; + + /* + * User pages need to be mapped with the ASID + * (iow, non-global) + */ + user_pgprot |= L_PTE_ASID; + +#ifdef CONFIG_SMP + /* + * Mark memory with the "shared" attribute for SMP systems + */ + user_pgprot |= L_PTE_SHARED; + kern_pgprot |= L_PTE_SHARED; + mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S; +#endif + } + + for (i = 0; i < 16; i++) { + unsigned long v = pgprot_val(protection_map[i]); + v = (v & ~(L_PTE_BUFFERABLE|L_PTE_CACHEABLE)) | user_pgprot; + protection_map[i] = __pgprot(v); + } + + mem_types[MT_LOW_VECTORS].prot_pte |= kern_pgprot; + mem_types[MT_HIGH_VECTORS].prot_pte |= kern_pgprot; + + if (cpu_arch >= CPU_ARCH_ARMv5) { +#ifndef CONFIG_SMP + /* + * Only use write-through for non-SMP systems + */ + mem_types[MT_LOW_VECTORS].prot_pte &= ~L_PTE_BUFFERABLE; + mem_types[MT_HIGH_VECTORS].prot_pte &= ~L_PTE_BUFFERABLE; +#endif + } else { + mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1); + } + + pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | + L_PTE_DIRTY | L_PTE_WRITE | + L_PTE_EXEC | kern_pgprot); + + mem_types[MT_LOW_VECTORS].prot_l1 |= ecc_mask; + mem_types[MT_HIGH_VECTORS].prot_l1 |= ecc_mask; + mem_types[MT_MEMORY].prot_sect |= ecc_mask | cp->pmd; + mem_types[MT_ROM].prot_sect |= cp->pmd; + + switch (cp->pmd) { + case PMD_SECT_WT: + mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WT; + break; + case PMD_SECT_WB: + case PMD_SECT_WBWA: + mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB; + break; + } + printk("Memory policy: ECC %sabled, Data cache %s\n", + ecc_mask ? "en" : "dis", cp->policy); +} + +#define vectors_base() (vectors_high() ? 0xffff0000 : 0) + +/* + * Create a SECTION PGD between VIRT and PHYS in domain + * DOMAIN with protection PROT. This operates on half- + * pgdir entry increments. + */ +static inline void +alloc_init_section(unsigned long virt, unsigned long phys, int prot) +{ + pmd_t *pmdp = pmd_off_k(virt); + + if (virt & (1 << 20)) + pmdp++; + + *pmdp = __pmd(phys | prot); + flush_pmd_entry(pmdp); +} + +/* + * Create a SUPER SECTION PGD between VIRT and PHYS with protection PROT + */ +static inline void +alloc_init_supersection(unsigned long virt, unsigned long phys, int prot) +{ + int i; + + for (i = 0; i < 16; i += 1) { + alloc_init_section(virt, phys, prot | PMD_SECT_SUPER); + + virt += (PGDIR_SIZE / 2); + } +} + +/* + * Add a PAGE mapping between VIRT and PHYS in domain + * DOMAIN with protection PROT. Note that due to the + * way we map the PTEs, we must allocate two PTE_SIZE'd + * blocks - one for the Linux pte table, and one for + * the hardware pte table. + */ +static inline void +alloc_init_page(unsigned long virt, unsigned long phys, unsigned int prot_l1, pgprot_t prot) +{ + pmd_t *pmdp = pmd_off_k(virt); + pte_t *ptep; + + if (pmd_none(*pmdp)) { + ptep = alloc_bootmem_low_pages(2 * PTRS_PER_PTE * + sizeof(pte_t)); + + __pmd_populate(pmdp, __pa(ptep) | prot_l1); + } + ptep = pte_offset_kernel(pmdp, virt); + + set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, prot)); +} + +/* + * Create the page directory entries and any necessary + * page tables for the mapping specified by `md'. We + * are able to cope here with varying sizes and address + * offsets, and we take full advantage of sections and + * supersections. + */ +void __init create_mapping(struct map_desc *md) +{ + unsigned long virt, length; + int prot_sect, prot_l1, domain; + pgprot_t prot_pte; + unsigned long off = (u32)__pfn_to_phys(md->pfn); + + if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) { + printk(KERN_WARNING "BUG: not creating mapping for " + "0x%08llx at 0x%08lx in user region\n", + __pfn_to_phys((u64)md->pfn), md->virtual); + return; + } + + if ((md->type == MT_DEVICE || md->type == MT_ROM) && + md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) { + printk(KERN_WARNING "BUG: mapping for 0x%08llx at 0x%08lx " + "overlaps vmalloc space\n", + __pfn_to_phys((u64)md->pfn), md->virtual); + } + + domain = mem_types[md->type].domain; + prot_pte = __pgprot(mem_types[md->type].prot_pte); + prot_l1 = mem_types[md->type].prot_l1 | PMD_DOMAIN(domain); + prot_sect = mem_types[md->type].prot_sect | PMD_DOMAIN(domain); + + /* + * Catch 36-bit addresses + */ + if(md->pfn >= 0x100000) { + if(domain) { + printk(KERN_ERR "MM: invalid domain in supersection " + "mapping for 0x%08llx at 0x%08lx\n", + __pfn_to_phys((u64)md->pfn), md->virtual); + return; + } + if((md->virtual | md->length | __pfn_to_phys(md->pfn)) + & ~SUPERSECTION_MASK) { + printk(KERN_ERR "MM: cannot create mapping for " + "0x%08llx at 0x%08lx invalid alignment\n", + __pfn_to_phys((u64)md->pfn), md->virtual); + return; + } + + /* + * Shift bits [35:32] of address into bits [23:20] of PMD + * (See ARMv6 spec). + */ + off |= (((md->pfn >> (32 - PAGE_SHIFT)) & 0xF) << 20); + } + + virt = md->virtual; + off -= virt; + length = md->length; + + if (mem_types[md->type].prot_l1 == 0 && + (virt & 0xfffff || (virt + off) & 0xfffff || (virt + length) & 0xfffff)) { + printk(KERN_WARNING "BUG: map for 0x%08lx at 0x%08lx can not " + "be mapped using pages, ignoring.\n", + __pfn_to_phys(md->pfn), md->virtual); + return; + } + + while ((virt & 0xfffff || (virt + off) & 0xfffff) && length >= PAGE_SIZE) { + alloc_init_page(virt, virt + off, prot_l1, prot_pte); + + virt += PAGE_SIZE; + length -= PAGE_SIZE; + } + + /* N.B. ARMv6 supersections are only defined to work with domain 0. + * Since domain assignments can in fact be arbitrary, the + * 'domain == 0' check below is required to insure that ARMv6 + * supersections are only allocated for domain 0 regardless + * of the actual domain assignments in use. + */ + if ((cpu_architecture() >= CPU_ARCH_ARMv6 || cpu_is_xsc3()) + && domain == 0) { + /* + * Align to supersection boundary if !high pages. + * High pages have already been checked for proper + * alignment above and they will fail the SUPSERSECTION_MASK + * check because of the way the address is encoded into + * offset. + */ + if (md->pfn <= 0x100000) { + while ((virt & ~SUPERSECTION_MASK || + (virt + off) & ~SUPERSECTION_MASK) && + length >= (PGDIR_SIZE / 2)) { + alloc_init_section(virt, virt + off, prot_sect); + + virt += (PGDIR_SIZE / 2); + length -= (PGDIR_SIZE / 2); + } + } + + while (length >= SUPERSECTION_SIZE) { + alloc_init_supersection(virt, virt + off, prot_sect); + + virt += SUPERSECTION_SIZE; + length -= SUPERSECTION_SIZE; + } + } + + /* + * A section mapping covers half a "pgdir" entry. + */ + while (length >= (PGDIR_SIZE / 2)) { + alloc_init_section(virt, virt + off, prot_sect); + + virt += (PGDIR_SIZE / 2); + length -= (PGDIR_SIZE / 2); + } + + while (length >= PAGE_SIZE) { + alloc_init_page(virt, virt + off, prot_l1, prot_pte); + + virt += PAGE_SIZE; + length -= PAGE_SIZE; + } +} + +/* + * Create the architecture specific mappings + */ +void __init iotable_init(struct map_desc *io_desc, int nr) +{ + int i; + + for (i = 0; i < nr; i++) + create_mapping(io_desc + i); +} + +static inline void prepare_page_table(struct meminfo *mi) +{ + unsigned long addr; + + /* + * Clear out all the mappings below the kernel image. + */ + for (addr = 0; addr < MODULE_START; addr += PGDIR_SIZE) + pmd_clear(pmd_off_k(addr)); + +#ifdef CONFIG_XIP_KERNEL + /* The XIP kernel is mapped in the module area -- skip over it */ + addr = ((unsigned long)&_etext + PGDIR_SIZE - 1) & PGDIR_MASK; +#endif + for ( ; addr < PAGE_OFFSET; addr += PGDIR_SIZE) + pmd_clear(pmd_off_k(addr)); + + /* + * Clear out all the kernel space mappings, except for the first + * memory bank, up to the end of the vmalloc region. + */ + for (addr = __phys_to_virt(mi->bank[0].start + mi->bank[0].size); + addr < VMALLOC_END; addr += PGDIR_SIZE) + pmd_clear(pmd_off_k(addr)); +} + +/* + * Reserve the various regions of node 0 + */ +void __init reserve_node_zero(pg_data_t *pgdat) +{ + unsigned long res_size = 0; + + /* + * Register the kernel text and data with bootmem. + * Note that this can only be in node 0. + */ +#ifdef CONFIG_XIP_KERNEL + reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start); +#else + reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext); +#endif + + /* + * Reserve the page tables. These are already in use, + * and can only be in node 0. + */ + reserve_bootmem_node(pgdat, __pa(swapper_pg_dir), + PTRS_PER_PGD * sizeof(pgd_t)); + + /* + * Hmm... This should go elsewhere, but we really really need to + * stop things allocating the low memory; ideally we need a better + * implementation of GFP_DMA which does not assume that DMA-able + * memory starts at zero. + */ + if (machine_is_integrator() || machine_is_cintegrator()) + res_size = __pa(swapper_pg_dir) - PHYS_OFFSET; + + /* + * These should likewise go elsewhere. They pre-reserve the + * screen memory region at the start of main system memory. + */ + if (machine_is_edb7211()) + res_size = 0x00020000; + if (machine_is_p720t()) + res_size = 0x00014000; + +#ifdef CONFIG_SA1111 + /* + * Because of the SA1111 DMA bug, we want to preserve our + * precious DMA-able memory... + */ + res_size = __pa(swapper_pg_dir) - PHYS_OFFSET; +#endif + if (res_size) + reserve_bootmem_node(pgdat, PHYS_OFFSET, res_size); +} + +/* + * Set up device the mappings. Since we clear out the page tables for all + * mappings above VMALLOC_END, we will remove any debug device mappings. + * This means you have to be careful how you debug this function, or any + * called function. This means you can't use any function or debugging + * method which may touch any device, otherwise the kernel _will_ crash. + */ +static void __init devicemaps_init(struct machine_desc *mdesc) +{ + struct map_desc map; + unsigned long addr; + void *vectors; + + /* + * Allocate the vector page early. + */ + vectors = alloc_bootmem_low_pages(PAGE_SIZE); + BUG_ON(!vectors); + + for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) + pmd_clear(pmd_off_k(addr)); + + /* + * Map the kernel if it is XIP. + * It is always first in the modulearea. + */ +#ifdef CONFIG_XIP_KERNEL + map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK); + map.virtual = MODULE_START; + map.length = ((unsigned long)&_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK; + map.type = MT_ROM; + create_mapping(&map); +#endif + + /* + * Map the cache flushing regions. + */ +#ifdef FLUSH_BASE + map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS); + map.virtual = FLUSH_BASE; + map.length = SZ_1M; + map.type = MT_CACHECLEAN; + create_mapping(&map); +#endif +#ifdef FLUSH_BASE_MINICACHE + map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS + SZ_1M); + map.virtual = FLUSH_BASE_MINICACHE; + map.length = SZ_1M; + map.type = MT_MINICLEAN; + create_mapping(&map); +#endif + + /* + * Create a mapping for the machine vectors at the high-vectors + * location (0xffff0000). If we aren't using high-vectors, also + * create a mapping at the low-vectors virtual address. + */ + map.pfn = __phys_to_pfn(virt_to_phys(vectors)); + map.virtual = 0xffff0000; + map.length = PAGE_SIZE; + map.type = MT_HIGH_VECTORS; + create_mapping(&map); + + if (!vectors_high()) { + map.virtual = 0; + map.type = MT_LOW_VECTORS; + create_mapping(&map); + } + + /* + * Ask the machine support to map in the statically mapped devices. + */ + if (mdesc->map_io) + mdesc->map_io(); + + /* + * Finally flush the caches and tlb to ensure that we're in a + * consistent state wrt the writebuffer. This also ensures that + * any write-allocated cache lines in the vector page are written + * back. After this point, we can start to touch devices again. + */ + local_flush_tlb_all(); + flush_cache_all(); +} + +/* + * paging_init() sets up the page tables, initialises the zone memory + * maps, and sets up the zero page, bad page and bad page tables. + */ +void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) +{ + void *zero_page; + + build_mem_type_table(); + prepare_page_table(mi); + bootmem_init(mi); + devicemaps_init(mdesc); + + top_pmd = pmd_off_k(0xffff0000); + + /* + * allocate the zero page. Note that we count on this going ok. + */ + zero_page = alloc_bootmem_low_pages(PAGE_SIZE); + memzero(zero_page, PAGE_SIZE); + empty_zero_page = virt_to_page(zero_page); + flush_dcache_page(empty_zero_page); +} + +/* + * In order to soft-boot, we need to insert a 1:1 mapping in place of + * the user-mode pages. This will then ensure that we have predictable + * results when turning the mmu off + */ +void setup_mm_for_reboot(char mode) +{ + unsigned long base_pmdval; + pgd_t *pgd; + int i; + + if (current->mm && current->mm->pgd) + pgd = current->mm->pgd; + else + pgd = init_mm.pgd; + + base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; + if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) + base_pmdval |= PMD_BIT4; + + for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) { + unsigned long pmdval = (i << PGDIR_SHIFT) | base_pmdval; + pmd_t *pmd; - mm->context.id = asid; + pmd = pmd_off(pgd, i << PGDIR_SHIFT); + pmd[0] = __pmd(pmdval); + pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1))); + flush_pmd_entry(pmd); + } } diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 1464ed8..d0e6642 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c @@ -11,6 +11,49 @@ #include #include #include +#include "mm.h" + +extern void _stext, __data_start, _end; + +/* + * Reserve the various regions of node 0 + */ +void __init reserve_node_zero(pg_data_t *pgdat) +{ + /* + * Register the kernel text and data with bootmem. + * Note that this can only be in node 0. + */ +#ifdef CONFIG_XIP_KERNEL + reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start); +#else + reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext); +#endif + + /* + * Register the exception vector page. + * some architectures which the DRAM is the exception vector to trap, + * alloc_page breaks with error, although it is not NULL, but "0." + */ + reserve_bootmem_node(pgdat, CONFIG_VECTORS_BASE, PAGE_SIZE); +} + +/* + * paging_init() sets up the page tables, initialises the zone memory + * maps, and sets up the zero page, bad page and bad page tables. + */ +void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) +{ + bootmem_init(mi); +} + +/* + * We don't need to do anything here for nommu machines. + */ +void setup_mm_for_reboot(char mode) +{ +} + void flush_dcache_page(struct page *page) { __cpuc_flush_dcache_page(page_address(page)); diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c new file mode 100644 index 0000000..20c1b0d --- /dev/null +++ b/arch/arm/mm/pgd.c @@ -0,0 +1,101 @@ +/* + * linux/arch/arm/mm/pgd.c + * + * Copyright (C) 1998-2005 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + +#include +#include +#include + +#include "mm.h" + +#define FIRST_KERNEL_PGD_NR (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD) + +/* + * need to get a 16k page for level 1 + */ +pgd_t *get_pgd_slow(struct mm_struct *mm) +{ + pgd_t *new_pgd, *init_pgd; + pmd_t *new_pmd, *init_pmd; + pte_t *new_pte, *init_pte; + + new_pgd = (pgd_t *)__get_free_pages(GFP_KERNEL, 2); + if (!new_pgd) + goto no_pgd; + + memzero(new_pgd, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); + + /* + * Copy over the kernel and IO PGD entries + */ + init_pgd = pgd_offset_k(0); + memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR, + (PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t)); + + clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t)); + + if (!vectors_high()) { + /* + * On ARM, first page must always be allocated since it + * contains the machine vectors. + */ + new_pmd = pmd_alloc(mm, new_pgd, 0); + if (!new_pmd) + goto no_pmd; + + new_pte = pte_alloc_map(mm, new_pmd, 0); + if (!new_pte) + goto no_pte; + + init_pmd = pmd_offset(init_pgd, 0); + init_pte = pte_offset_map_nested(init_pmd, 0); + set_pte(new_pte, *init_pte); + pte_unmap_nested(init_pte); + pte_unmap(new_pte); + } + + return new_pgd; + +no_pte: + pmd_free(new_pmd); +no_pmd: + free_pages((unsigned long)new_pgd, 2); +no_pgd: + return NULL; +} + +void free_pgd_slow(pgd_t *pgd) +{ + pmd_t *pmd; + struct page *pte; + + if (!pgd) + return; + + /* pgd is always present and good */ + pmd = pmd_off(pgd, 0); + if (pmd_none(*pmd)) + goto free; + if (pmd_bad(*pmd)) { + pmd_ERROR(*pmd); + pmd_clear(pmd); + goto free; + } + + pte = pmd_page(*pmd); + pmd_clear(pmd); + dec_zone_page_state(virt_to_page((unsigned long *)pgd), NR_PAGETABLE); + pte_lock_deinit(pte); + pte_free(pte); + pmd_free(pmd); +free: + free_pages((unsigned long) pgd, 2); +} diff --git a/arch/arm/mm/proc-arm740.S b/arch/arm/mm/proc-arm740.S new file mode 100644 index 0000000..4071381 --- /dev/null +++ b/arch/arm/mm/proc-arm740.S @@ -0,0 +1,174 @@ +/* + * linux/arch/arm/mm/arm740.S: utility functions for ARM740 + * + * Copyright (C) 2004-2006 Hyok S. Choi (hyok.choi@samsung.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include + + .text +/* + * cpu_arm740_proc_init() + * cpu_arm740_do_idle() + * cpu_arm740_dcache_clean_area() + * cpu_arm740_switch_mm() + * + * These are not required. + */ +ENTRY(cpu_arm740_proc_init) +ENTRY(cpu_arm740_do_idle) +ENTRY(cpu_arm740_dcache_clean_area) +ENTRY(cpu_arm740_switch_mm) + mov pc, lr + +/* + * cpu_arm740_proc_fin() + */ +ENTRY(cpu_arm740_proc_fin) + stmfd sp!, {lr} + mov ip, #PSR_F_BIT | PSR_I_BIT | SVC_MODE + msr cpsr_c, ip + mrc p15, 0, r0, c1, c0, 0 + bic r0, r0, #0x3f000000 @ bank/f/lock/s + bic r0, r0, #0x0000000c @ w-buffer/cache + mcr p15, 0, r0, c1, c0, 0 @ disable caches + mcr p15, 0, r0, c7, c0, 0 @ invalidate cache + ldmfd sp!, {pc} + +/* + * cpu_arm740_reset(loc) + * Params : r0 = address to jump to + * Notes : This sets up everything for a reset + */ +ENTRY(cpu_arm740_reset) + mov ip, #0 + mcr p15, 0, ip, c7, c0, 0 @ invalidate cache + mrc p15, 0, ip, c1, c0, 0 @ get ctrl register + bic ip, ip, #0x0000000c @ ............wc.. + mcr p15, 0, ip, c1, c0, 0 @ ctrl register + mov pc, r0 + + __INIT + + .type __arm740_setup, #function +__arm740_setup: + mov r0, #0 + mcr p15, 0, r0, c7, c0, 0 @ invalidate caches + + mcr p15, 0, r0, c6, c3 @ disable area 3~7 + mcr p15, 0, r0, c6, c4 + mcr p15, 0, r0, c6, c5 + mcr p15, 0, r0, c6, c6 + mcr p15, 0, r0, c6, c7 + + mov r0, #0x0000003F @ base = 0, size = 4GB + mcr p15, 0, r0, c6, c0 @ set area 0, default + + ldr r0, =(CONFIG_DRAM_BASE & 0xFFFFF000) @ base[31:12] of RAM + ldr r1, =(CONFIG_DRAM_SIZE >> 12) @ size of RAM (must be >= 4KB) + mov r2, #10 @ 11 is the minimum (4KB) +1: add r2, r2, #1 @ area size *= 2 + mov r1, r1, lsr #1 + bne 1b @ count not zero r-shift + orr r0, r0, r2, lsl #1 @ the area register value + orr r0, r0, #1 @ set enable bit + mcr p15, 0, r0, c6, c1 @ set area 1, RAM + + ldr r0, =(CONFIG_FLASH_MEM_BASE & 0xFFFFF000) @ base[31:12] of FLASH + ldr r1, =(CONFIG_FLASH_SIZE >> 12) @ size of FLASH (must be >= 4KB) + mov r2, #10 @ 11 is the minimum (4KB) +1: add r2, r2, #1 @ area size *= 2 + mov r1, r1, lsr #1 + bne 1b @ count not zero r-shift + orr r0, r0, r2, lsl #1 @ the area register value + orr r0, r0, #1 @ set enable bit + mcr p15, 0, r0, c6, c2 @ set area 2, ROM/FLASH + + mov r0, #0x06 + mcr p15, 0, r0, c2, c0 @ Region 1&2 cacheable +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + mov r0, #0x00 @ disable whole write buffer +#else + mov r0, #0x02 @ Region 1 write bufferred +#endif + mcr p15, 0, r0, c3, c0 + + mov r0, #0x10000 + sub r0, r0, #1 @ r0 = 0xffff + mcr p15, 0, r0, c5, c0 @ all read/write access + + mrc p15, 0, r0, c1, c0 @ get control register + bic r0, r0, #0x3F000000 @ set to standard caching mode + @ need some benchmark + orr r0, r0, #0x0000000d @ MPU/Cache/WB + + mov pc, lr + + .size __arm740_setup, . - __arm740_setup + + __INITDATA + +/* + * Purpose : Function pointers used to access above functions - all calls + * come through these + */ + .type arm740_processor_functions, #object +ENTRY(arm740_processor_functions) + .word v4t_late_abort + .word cpu_arm740_proc_init + .word cpu_arm740_proc_fin + .word cpu_arm740_reset + .word cpu_arm740_do_idle + .word cpu_arm740_dcache_clean_area + .word cpu_arm740_switch_mm + .word 0 @ cpu_*_set_pte + .size arm740_processor_functions, . - arm740_processor_functions + + .section ".rodata" + + .type cpu_arch_name, #object +cpu_arch_name: + .asciz "armv4" + .size cpu_arch_name, . - cpu_arch_name + + .type cpu_elf_name, #object +cpu_elf_name: + .asciz "v4" + .size cpu_elf_name, . - cpu_elf_name + + .type cpu_arm740_name, #object +cpu_arm740_name: + .ascii "ARM740T" + .size cpu_arm740_name, . - cpu_arm740_name + + .align + + .section ".proc.info.init", #alloc, #execinstr + .type __arm740_proc_info,#object +__arm740_proc_info: + .long 0x41807400 + .long 0xfffffff0 + .long 0 + b __arm740_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT + .long cpu_arm740_name + .long arm740_processor_functions + .long 0 + .long 0 + .long v3_cache_fns @ cache model + .size __arm740_proc_info, . - __arm740_proc_info + + diff --git a/arch/arm/mm/proc-arm7tdmi.S b/arch/arm/mm/proc-arm7tdmi.S new file mode 100644 index 0000000..22d7e31 --- /dev/null +++ b/arch/arm/mm/proc-arm7tdmi.S @@ -0,0 +1,249 @@ +/* + * linux/arch/arm/mm/proc-arm7tdmi.S: utility functions for ARM7TDMI + * + * Copyright (C) 2003-2006 Hyok S. Choi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include + + .text +/* + * cpu_arm7tdmi_proc_init() + * cpu_arm7tdmi_do_idle() + * cpu_arm7tdmi_dcache_clean_area() + * cpu_arm7tdmi_switch_mm() + * + * These are not required. + */ +ENTRY(cpu_arm7tdmi_proc_init) +ENTRY(cpu_arm7tdmi_do_idle) +ENTRY(cpu_arm7tdmi_dcache_clean_area) +ENTRY(cpu_arm7tdmi_switch_mm) + mov pc, lr + +/* + * cpu_arm7tdmi_proc_fin() + */ +ENTRY(cpu_arm7tdmi_proc_fin) + mov r0, #PSR_F_BIT | PSR_I_BIT | SVC_MODE + msr cpsr_c, r0 + mov pc, lr + +/* + * Function: cpu_arm7tdmi_reset(loc) + * Params : loc(r0) address to jump to + * Purpose : Sets up everything for a reset and jump to the location for soft reset. + */ +ENTRY(cpu_arm7tdmi_reset) + mov pc, r0 + + __INIT + + .type __arm7tdmi_setup, #function +__arm7tdmi_setup: + mov pc, lr + .size __arm7tdmi_setup, . - __arm7tdmi_setup + + __INITDATA + +/* + * Purpose : Function pointers used to access above functions - all calls + * come through these + */ + .type arm7tdmi_processor_functions, #object +ENTRY(arm7tdmi_processor_functions) + .word v4t_late_abort + .word cpu_arm7tdmi_proc_init + .word cpu_arm7tdmi_proc_fin + .word cpu_arm7tdmi_reset + .word cpu_arm7tdmi_do_idle + .word cpu_arm7tdmi_dcache_clean_area + .word cpu_arm7tdmi_switch_mm + .word 0 @ cpu_*_set_pte + .size arm7tdmi_processor_functions, . - arm7tdmi_processor_functions + + .section ".rodata" + + .type cpu_arch_name, #object +cpu_arch_name: + .asciz "armv4t" + .size cpu_arch_name, . - cpu_arch_name + + .type cpu_elf_name, #object +cpu_elf_name: + .asciz "v4" + .size cpu_elf_name, . - cpu_elf_name + + .type cpu_arm7tdmi_name, #object +cpu_arm7tdmi_name: + .asciz "ARM7TDMI" + .size cpu_arm7tdmi_name, . - cpu_arm7tdmi_name + + .type cpu_triscenda7_name, #object +cpu_triscenda7_name: + .asciz "Triscend-A7x" + .size cpu_triscenda7_name, . - cpu_triscenda7_name + + .type cpu_at91_name, #object +cpu_at91_name: + .asciz "Atmel-AT91M40xxx" + .size cpu_at91_name, . - cpu_at91_name + + .type cpu_s3c3410_name, #object +cpu_s3c3410_name: + .asciz "Samsung-S3C3410" + .size cpu_s3c3410_name, . - cpu_s3c3410_name + + .type cpu_s3c44b0x_name, #object +cpu_s3c44b0x_name: + .asciz "Samsung-S3C44B0x" + .size cpu_s3c44b0x_name, . - cpu_s3c44b0x_name + + .type cpu_s3c4510b, #object +cpu_s3c4510b_name: + .asciz "Samsung-S3C4510B" + .size cpu_s3c4510b_name, . - cpu_s3c4510b_name + + .type cpu_s3c4530_name, #object +cpu_s3c4530_name: + .asciz "Samsung-S3C4530" + .size cpu_s3c4530_name, . - cpu_s3c4530_name + + .type cpu_netarm_name, #object +cpu_netarm_name: + .asciz "NETARM" + .size cpu_netarm_name, . - cpu_netarm_name + + .align + + .section ".proc.info.init", #alloc, #execinstr + + .type __arm7tdmi_proc_info, #object +__arm7tdmi_proc_info: + .long 0x41007700 + .long 0xfff8ff00 + .long 0 + .long 0 + b __arm7tdmi_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_26BIT + .long cpu_arm7tdmi_name + .long arm7tdmi_processor_functions + .long 0 + .long 0 + .long v4_cache_fns + .size __arm7tdmi_proc_info, . - __arm7dmi_proc_info + + .type __triscenda7_proc_info, #object +__triscenda7_proc_info: + .long 0x0001d2ff + .long 0x0001ffff + .long 0 + .long 0 + b __arm7tdmi_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT + .long cpu_triscenda7_name + .long arm7tdmi_processor_functions + .long 0 + .long 0 + .long v4_cache_fns + .size __triscenda7_proc_info, . - __triscenda7_proc_info + + .type __at91_proc_info, #object +__at91_proc_info: + .long 0x14000040 + .long 0xfff000e0 + .long 0 + .long 0 + b __arm7tdmi_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT + .long cpu_at91_name + .long arm7tdmi_processor_functions + .long 0 + .long 0 + .long v4_cache_fns + .size __at91_proc_info, . - __at91_proc_info + + .type __s3c4510b_proc_info, #object +__s3c4510b_proc_info: + .long 0x36365000 + .long 0xfffff000 + .long 0 + .long 0 + b __arm7tdmi_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT + .long cpu_s3c4510b_name + .long arm7tdmi_processor_functions + .long 0 + .long 0 + .long v4_cache_fns + .size __s3c4510b_proc_info, . - __s3c4510b_proc_info + + .type __s3c4530_proc_info, #object +__s3c4530_proc_info: + .long 0x4c000000 + .long 0xfff000e0 + .long 0 + .long 0 + b __arm7tdmi_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT + .long cpu_s3c4530_name + .long arm7tdmi_processor_functions + .long 0 + .long 0 + .long v4_cache_fns + .size __s3c4530_proc_info, . - __s3c4530_proc_info + + .type __s3c3410_proc_info, #object +__s3c3410_proc_info: + .long 0x34100000 + .long 0xffff0000 + .long 0 + .long 0 + b __arm7tdmi_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT + .long cpu_s3c3410_name + .long arm7tdmi_processor_functions + .long 0 + .long 0 + .long v4_cache_fns + .size __s3c3410_proc_info, . - __s3c3410_proc_info + + .type __s3c44b0x_proc_info, #object +__s3c44b0x_proc_info: + .long 0x44b00000 + .long 0xffff0000 + .long 0 + .long 0 + b __arm7tdmi_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT + .long cpu_s3c44b0x_name + .long arm7tdmi_processor_functions + .long 0 + .long 0 + .long v4_cache_fns + .size __s3c44b0x_proc_info, . - __s3c44b0x_proc_info diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S new file mode 100644 index 0000000..2397f4b --- /dev/null +++ b/arch/arm/mm/proc-arm940.S @@ -0,0 +1,369 @@ +/* + * linux/arch/arm/mm/arm940.S: utility functions for ARM940T + * + * Copyright (C) 2004-2006 Hyok S. Choi (hyok.choi@samsung.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ +#include +#include +#include +#include +#include +#include +#include + +/* ARM940T has a 4KB DCache comprising 256 lines of 4 words */ +#define CACHE_DLINESIZE 16 +#define CACHE_DSEGMENTS 4 +#define CACHE_DENTRIES 64 + + .text +/* + * cpu_arm940_proc_init() + * cpu_arm940_switch_mm() + * + * These are not required. + */ +ENTRY(cpu_arm940_proc_init) +ENTRY(cpu_arm940_switch_mm) + mov pc, lr + +/* + * cpu_arm940_proc_fin() + */ +ENTRY(cpu_arm940_proc_fin) + stmfd sp!, {lr} + mov ip, #PSR_F_BIT | PSR_I_BIT | SVC_MODE + msr cpsr_c, ip + bl arm940_flush_kern_cache_all + mrc p15, 0, r0, c1, c0, 0 @ ctrl register + bic r0, r0, #0x00001000 @ i-cache + bic r0, r0, #0x00000004 @ d-cache + mcr p15, 0, r0, c1, c0, 0 @ disable caches + ldmfd sp!, {pc} + +/* + * cpu_arm940_reset(loc) + * Params : r0 = address to jump to + * Notes : This sets up everything for a reset + */ +ENTRY(cpu_arm940_reset) + mov ip, #0 + mcr p15, 0, ip, c7, c5, 0 @ flush I cache + mcr p15, 0, ip, c7, c6, 0 @ flush D cache + mcr p15, 0, ip, c7, c10, 4 @ drain WB + mrc p15, 0, ip, c1, c0, 0 @ ctrl register + bic ip, ip, #0x00000005 @ .............c.p + bic ip, ip, #0x00001000 @ i-cache + mcr p15, 0, ip, c1, c0, 0 @ ctrl register + mov pc, r0 + +/* + * cpu_arm940_do_idle() + */ + .align 5 +ENTRY(cpu_arm940_do_idle) + mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt + mov pc, lr + +/* + * flush_user_cache_all() + */ +ENTRY(arm940_flush_user_cache_all) + /* FALLTHROUGH */ + +/* + * flush_kern_cache_all() + * + * Clean and invalidate the entire cache. + */ +ENTRY(arm940_flush_kern_cache_all) + mov r2, #VM_EXEC + /* FALLTHROUGH */ + +/* + * flush_user_cache_range(start, end, flags) + * + * There is no efficient way to flush a range of cache entries + * in the specified address range. Thus, flushes all. + * + * - start - start address (inclusive) + * - end - end address (exclusive) + * - flags - vm_flags describing address space + */ +ENTRY(arm940_flush_user_cache_range) + mov ip, #0 +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + mcr p15, 0, ip, c7, c6, 0 @ flush D cache +#else + mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments +1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries +2: mcr p15, 0, r3, c7, c14, 2 @ clean/flush D index + subs r3, r3, #1 << 26 + bcs 2b @ entries 63 to 0 + subs r1, r1, #1 << 4 + bcs 1b @ segments 3 to 0 +#endif + tst r2, #VM_EXEC + mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache + mcrne p15, 0, ip, c7, c10, 4 @ drain WB + mov pc, lr + +/* + * coherent_kern_range(start, end) + * + * Ensure coherency between the Icache and the Dcache in the + * region described by start, end. If you have non-snooping + * Harvard caches, you need to implement this function. + * + * - start - virtual start address + * - end - virtual end address + */ +ENTRY(arm940_coherent_kern_range) + /* FALLTHROUGH */ + +/* + * coherent_user_range(start, end) + * + * Ensure coherency between the Icache and the Dcache in the + * region described by start, end. If you have non-snooping + * Harvard caches, you need to implement this function. + * + * - start - virtual start address + * - end - virtual end address + */ +ENTRY(arm940_coherent_user_range) + /* FALLTHROUGH */ + +/* + * flush_kern_dcache_page(void *page) + * + * Ensure no D cache aliasing occurs, either with itself or + * the I cache + * + * - addr - page aligned address + */ +ENTRY(arm940_flush_kern_dcache_page) + mov ip, #0 + mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments +1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries +2: mcr p15, 0, r3, c7, c14, 2 @ clean/flush D index + subs r3, r3, #1 << 26 + bcs 2b @ entries 63 to 0 + subs r1, r1, #1 << 4 + bcs 1b @ segments 7 to 0 + mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache + mcr p15, 0, ip, c7, c10, 4 @ drain WB + mov pc, lr + +/* + * dma_inv_range(start, end) + * + * There is no efficient way to invalidate a specifid virtual + * address range. Thus, invalidates all. + * + * - start - virtual start address + * - end - virtual end address + */ +ENTRY(arm940_dma_inv_range) + mov ip, #0 + mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments +1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries +2: mcr p15, 0, r3, c7, c6, 2 @ flush D entry + subs r3, r3, #1 << 26 + bcs 2b @ entries 63 to 0 + subs r1, r1, #1 << 4 + bcs 1b @ segments 7 to 0 + mcr p15, 0, ip, c7, c10, 4 @ drain WB + mov pc, lr + +/* + * dma_clean_range(start, end) + * + * There is no efficient way to clean a specifid virtual + * address range. Thus, cleans all. + * + * - start - virtual start address + * - end - virtual end address + */ +ENTRY(arm940_dma_clean_range) +ENTRY(cpu_arm940_dcache_clean_area) + mov ip, #0 +#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH + mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments +1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries +2: mcr p15, 0, r3, c7, c10, 2 @ clean D entry + subs r3, r3, #1 << 26 + bcs 2b @ entries 63 to 0 + subs r1, r1, #1 << 4 + bcs 1b @ segments 7 to 0 +#endif + mcr p15, 0, ip, c7, c10, 4 @ drain WB + mov pc, lr + +/* + * dma_flush_range(start, end) + * + * There is no efficient way to clean and invalidate a specifid + * virtual address range. + * + * - start - virtual start address + * - end - virtual end address + */ +ENTRY(arm940_dma_flush_range) + mov ip, #0 + mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments +1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries +2: +#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH + mcr p15, 0, r3, c7, c14, 2 @ clean/flush D entry +#else + mcr p15, 0, r3, c7, c10, 2 @ clean D entry +#endif + subs r3, r3, #1 << 26 + bcs 2b @ entries 63 to 0 + subs r1, r1, #1 << 4 + bcs 1b @ segments 7 to 0 + mcr p15, 0, ip, c7, c10, 4 @ drain WB + mov pc, lr + +ENTRY(arm940_cache_fns) + .long arm940_flush_kern_cache_all + .long arm940_flush_user_cache_all + .long arm940_flush_user_cache_range + .long arm940_coherent_kern_range + .long arm940_coherent_user_range + .long arm940_flush_kern_dcache_page + .long arm940_dma_inv_range + .long arm940_dma_clean_range + .long arm940_dma_flush_range + + __INIT + + .type __arm940_setup, #function +__arm940_setup: + mov r0, #0 + mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache + mcr p15, 0, r0, c7, c6, 0 @ invalidate D cache + mcr p15, 0, r0, c7, c10, 4 @ drain WB + + mcr p15, 0, r0, c6, c3, 0 @ disable data area 3~7 + mcr p15, 0, r0, c6, c4, 0 + mcr p15, 0, r0, c6, c5, 0 + mcr p15, 0, r0, c6, c6, 0 + mcr p15, 0, r0, c6, c7, 0 + + mcr p15, 0, r0, c6, c3, 1 @ disable instruction area 3~7 + mcr p15, 0, r0, c6, c4, 1 + mcr p15, 0, r0, c6, c5, 1 + mcr p15, 0, r0, c6, c6, 1 + mcr p15, 0, r0, c6, c7, 1 + + mov r0, #0x0000003F @ base = 0, size = 4GB + mcr p15, 0, r0, c6, c0, 0 @ set area 0, default + mcr p15, 0, r0, c6, c0, 1 + + ldr r0, =(CONFIG_DRAM_BASE & 0xFFFFF000) @ base[31:12] of RAM + ldr r1, =(CONFIG_DRAM_SIZE >> 12) @ size of RAM (must be >= 4KB) + mov r2, #10 @ 11 is the minimum (4KB) +1: add r2, r2, #1 @ area size *= 2 + mov r1, r1, lsr #1 + bne 1b @ count not zero r-shift + orr r0, r0, r2, lsl #1 @ the area register value + orr r0, r0, #1 @ set enable bit + mcr p15, 0, r0, c6, c1, 0 @ set area 1, RAM + mcr p15, 0, r0, c6, c1, 1 + + ldr r0, =(CONFIG_FLASH_MEM_BASE & 0xFFFFF000) @ base[31:12] of FLASH + ldr r1, =(CONFIG_FLASH_SIZE >> 12) @ size of FLASH (must be >= 4KB) + mov r2, #10 @ 11 is the minimum (4KB) +1: add r2, r2, #1 @ area size *= 2 + mov r1, r1, lsr #1 + bne 1b @ count not zero r-shift + orr r0, r0, r2, lsl #1 @ the area register value + orr r0, r0, #1 @ set enable bit + mcr p15, 0, r0, c6, c2, 0 @ set area 2, ROM/FLASH + mcr p15, 0, r0, c6, c2, 1 + + mov r0, #0x06 + mcr p15, 0, r0, c2, c0, 0 @ Region 1&2 cacheable + mcr p15, 0, r0, c2, c0, 1 +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + mov r0, #0x00 @ disable whole write buffer +#else + mov r0, #0x02 @ Region 1 write bufferred +#endif + mcr p15, 0, r0, c3, c0, 0 + + mov r0, #0x10000 + sub r0, r0, #1 @ r0 = 0xffff + mcr p15, 0, r0, c5, c0, 0 @ all read/write access + mcr p15, 0, r0, c5, c0, 1 + + mrc p15, 0, r0, c1, c0 @ get control register + orr r0, r0, #0x00001000 @ I-cache + orr r0, r0, #0x00000005 @ MPU/D-cache + + mov pc, lr + + .size __arm940_setup, . - __arm940_setup + + __INITDATA + +/* + * Purpose : Function pointers used to access above functions - all calls + * come through these + */ + .type arm940_processor_functions, #object +ENTRY(arm940_processor_functions) + .word nommu_early_abort + .word cpu_arm940_proc_init + .word cpu_arm940_proc_fin + .word cpu_arm940_reset + .word cpu_arm940_do_idle + .word cpu_arm940_dcache_clean_area + .word cpu_arm940_switch_mm + .word 0 @ cpu_*_set_pte + .size arm940_processor_functions, . - arm940_processor_functions + + .section ".rodata" + +.type cpu_arch_name, #object +cpu_arch_name: + .asciz "armv4t" + .size cpu_arch_name, . - cpu_arch_name + + .type cpu_elf_name, #object +cpu_elf_name: + .asciz "v4" + .size cpu_elf_name, . - cpu_elf_name + + .type cpu_arm940_name, #object +cpu_arm940_name: + .ascii "ARM940T" + .size cpu_arm940_name, . - cpu_arm940_name + + .align + + .section ".proc.info.init", #alloc, #execinstr + + .type __arm940_proc_info,#object +__arm940_proc_info: + .long 0x41009400 + .long 0xff00fff0 + .long 0 + b __arm940_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB + .long cpu_arm940_name + .long arm940_processor_functions + .long 0 + .long 0 + .long arm940_cache_fns + .size __arm940_proc_info, . - __arm940_proc_info + diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S new file mode 100644 index 0000000..e186175 --- /dev/null +++ b/arch/arm/mm/proc-arm946.S @@ -0,0 +1,424 @@ +/* + * linux/arch/arm/mm/arm946.S: utility functions for ARM946E-S + * + * Copyright (C) 2004-2006 Hyok S. Choi (hyok.choi@samsung.com) + * + * (Many of cache codes are from proc-arm926.S) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ +#include +#include +#include +#include +#include +#include +#include + +/* + * ARM946E-S is synthesizable to have 0KB to 1MB sized D-Cache, + * comprising 256 lines of 32 bytes (8 words). + */ +#define CACHE_DSIZE (CONFIG_CPU_DCACHE_SIZE) /* typically 8KB. */ +#define CACHE_DLINESIZE 32 /* fixed */ +#define CACHE_DSEGMENTS 4 /* fixed */ +#define CACHE_DENTRIES (CACHE_DSIZE / CACHE_DSEGMENTS / CACHE_DLINESIZE) +#define CACHE_DLIMIT (CACHE_DSIZE * 4) /* benchmark needed */ + + .text +/* + * cpu_arm946_proc_init() + * cpu_arm946_switch_mm() + * + * These are not required. + */ +ENTRY(cpu_arm946_proc_init) +ENTRY(cpu_arm946_switch_mm) + mov pc, lr + +/* + * cpu_arm946_proc_fin() + */ +ENTRY(cpu_arm946_proc_fin) + stmfd sp!, {lr} + mov ip, #PSR_F_BIT | PSR_I_BIT | SVC_MODE + msr cpsr_c, ip + bl arm946_flush_kern_cache_all + mrc p15, 0, r0, c1, c0, 0 @ ctrl register + bic r0, r0, #0x00001000 @ i-cache + bic r0, r0, #0x00000004 @ d-cache + mcr p15, 0, r0, c1, c0, 0 @ disable caches + ldmfd sp!, {pc} + +/* + * cpu_arm946_reset(loc) + * Params : r0 = address to jump to + * Notes : This sets up everything for a reset + */ +ENTRY(cpu_arm946_reset) + mov ip, #0 + mcr p15, 0, ip, c7, c5, 0 @ flush I cache + mcr p15, 0, ip, c7, c6, 0 @ flush D cache + mcr p15, 0, ip, c7, c10, 4 @ drain WB + mrc p15, 0, ip, c1, c0, 0 @ ctrl register + bic ip, ip, #0x00000005 @ .............c.p + bic ip, ip, #0x00001000 @ i-cache + mcr p15, 0, ip, c1, c0, 0 @ ctrl register + mov pc, r0 + +/* + * cpu_arm946_do_idle() + */ + .align 5 +ENTRY(cpu_arm946_do_idle) + mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt + mov pc, lr + +/* + * flush_user_cache_all() + */ +ENTRY(arm946_flush_user_cache_all) + /* FALLTHROUGH */ + +/* + * flush_kern_cache_all() + * + * Clean and invalidate the entire cache. + */ +ENTRY(arm946_flush_kern_cache_all) + mov r2, #VM_EXEC + mov ip, #0 +__flush_whole_cache: +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + mcr p15, 0, ip, c7, c6, 0 @ flush D cache +#else + mov r1, #(CACHE_DSEGMENTS - 1) << 29 @ 4 segments +1: orr r3, r1, #(CACHE_DENTRIES - 1) << 4 @ n entries +2: mcr p15, 0, r3, c7, c14, 2 @ clean/flush D index + subs r3, r3, #1 << 4 + bcs 2b @ entries n to 0 + subs r1, r1, #1 << 29 + bcs 1b @ segments 3 to 0 +#endif + tst r2, #VM_EXEC + mcrne p15, 0, ip, c7, c5, 0 @ flush I cache + mcrne p15, 0, ip, c7, c10, 4 @ drain WB + mov pc, lr + +/* + * flush_user_cache_range(start, end, flags) + * + * Clean and invalidate a range of cache entries in the + * specified address range. + * + * - start - start address (inclusive) + * - end - end address (exclusive) + * - flags - vm_flags describing address space + * (same as arm926) + */ +ENTRY(arm946_flush_user_cache_range) + mov ip, #0 + sub r3, r1, r0 @ calculate total size + cmp r3, #CACHE_DLIMIT + bhs __flush_whole_cache + +1: tst r2, #VM_EXEC +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry + mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry + add r0, r0, #CACHE_DLINESIZE + mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry + mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry + add r0, r0, #CACHE_DLINESIZE +#else + mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry + mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry + add r0, r0, #CACHE_DLINESIZE + mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry + mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry + add r0, r0, #CACHE_DLINESIZE +#endif + cmp r0, r1 + blo 1b + tst r2, #VM_EXEC + mcrne p15, 0, ip, c7, c10, 4 @ drain WB + mov pc, lr + +/* + * coherent_kern_range(start, end) + * + * Ensure coherency between the Icache and the Dcache in the + * region described by start, end. If you have non-snooping + * Harvard caches, you need to implement this function. + * + * - start - virtual start address + * - end - virtual end address + */ +ENTRY(arm946_coherent_kern_range) + /* FALLTHROUGH */ + +/* + * coherent_user_range(start, end) + * + * Ensure coherency between the Icache and the Dcache in the + * region described by start, end. If you have non-snooping + * Harvard caches, you need to implement this function. + * + * - start - virtual start address + * - end - virtual end address + * (same as arm926) + */ +ENTRY(arm946_coherent_user_range) + bic r0, r0, #CACHE_DLINESIZE - 1 +1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry + mcr p15, 0, r0, c7, c5, 1 @ invalidate I entry + add r0, r0, #CACHE_DLINESIZE + cmp r0, r1 + blo 1b + mcr p15, 0, r0, c7, c10, 4 @ drain WB + mov pc, lr + +/* + * flush_kern_dcache_page(void *page) + * + * Ensure no D cache aliasing occurs, either with itself or + * the I cache + * + * - addr - page aligned address + * (same as arm926) + */ +ENTRY(arm946_flush_kern_dcache_page) + add r1, r0, #PAGE_SZ +1: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry + add r0, r0, #CACHE_DLINESIZE + cmp r0, r1 + blo 1b + mov r0, #0 + mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache + mcr p15, 0, r0, c7, c10, 4 @ drain WB + mov pc, lr + +/* + * dma_inv_range(start, end) + * + * Invalidate (discard) the specified virtual address range. + * May not write back any entries. If 'start' or 'end' + * are not cache line aligned, those lines must be written + * back. + * + * - start - virtual start address + * - end - virtual end address + * (same as arm926) + */ +ENTRY(arm946_dma_inv_range) +#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH + tst r0, #CACHE_DLINESIZE - 1 + mcrne p15, 0, r0, c7, c10, 1 @ clean D entry + tst r1, #CACHE_DLINESIZE - 1 + mcrne p15, 0, r1, c7, c10, 1 @ clean D entry +#endif + bic r0, r0, #CACHE_DLINESIZE - 1 +1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry + add r0, r0, #CACHE_DLINESIZE + cmp r0, r1 + blo 1b + mcr p15, 0, r0, c7, c10, 4 @ drain WB + mov pc, lr + +/* + * dma_clean_range(start, end) + * + * Clean the specified virtual address range. + * + * - start - virtual start address + * - end - virtual end address + * + * (same as arm926) + */ +ENTRY(arm946_dma_clean_range) +#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH + bic r0, r0, #CACHE_DLINESIZE - 1 +1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry + add r0, r0, #CACHE_DLINESIZE + cmp r0, r1 + blo 1b +#endif + mcr p15, 0, r0, c7, c10, 4 @ drain WB + mov pc, lr + +/* + * dma_flush_range(start, end) + * + * Clean and invalidate the specified virtual address range. + * + * - start - virtual start address + * - end - virtual end address + * + * (same as arm926) + */ +ENTRY(arm946_dma_flush_range) + bic r0, r0, #CACHE_DLINESIZE - 1 +1: +#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH + mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry +#else + mcr p15, 0, r0, c7, c10, 1 @ clean D entry +#endif + add r0, r0, #CACHE_DLINESIZE + cmp r0, r1 + blo 1b + mcr p15, 0, r0, c7, c10, 4 @ drain WB + mov pc, lr + +ENTRY(arm946_cache_fns) + .long arm946_flush_kern_cache_all + .long arm946_flush_user_cache_all + .long arm946_flush_user_cache_range + .long arm946_coherent_kern_range + .long arm946_coherent_user_range + .long arm946_flush_kern_dcache_page + .long arm946_dma_inv_range + .long arm946_dma_clean_range + .long arm946_dma_flush_range + + +ENTRY(cpu_arm946_dcache_clean_area) +#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH +1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry + add r0, r0, #CACHE_DLINESIZE + subs r1, r1, #CACHE_DLINESIZE + bhi 1b +#endif + mcr p15, 0, r0, c7, c10, 4 @ drain WB + mov pc, lr + + __INIT + + .type __arm946_setup, #function +__arm946_setup: + mov r0, #0 + mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache + mcr p15, 0, r0, c7, c6, 0 @ invalidate D cache + mcr p15, 0, r0, c7, c10, 4 @ drain WB + + mcr p15, 0, r0, c6, c3, 0 @ disable memory region 3~7 + mcr p15, 0, r0, c6, c4, 0 + mcr p15, 0, r0, c6, c5, 0 + mcr p15, 0, r0, c6, c6, 0 + mcr p15, 0, r0, c6, c7, 0 + + mov r0, #0x0000003F @ base = 0, size = 4GB + mcr p15, 0, r0, c6, c0, 0 @ set region 0, default + + ldr r0, =(CONFIG_DRAM_BASE & 0xFFFFF000) @ base[31:12] of RAM + ldr r1, =(CONFIG_DRAM_SIZE >> 12) @ size of RAM (must be >= 4KB) + mov r2, #10 @ 11 is the minimum (4KB) +1: add r2, r2, #1 @ area size *= 2 + mov r1, r1, lsr #1 + bne 1b @ count not zero r-shift + orr r0, r0, r2, lsl #1 @ the region register value + orr r0, r0, #1 @ set enable bit + mcr p15, 0, r0, c6, c1, 0 @ set region 1, RAM + + ldr r0, =(CONFIG_FLASH_MEM_BASE & 0xFFFFF000) @ base[31:12] of FLASH + ldr r1, =(CONFIG_FLASH_SIZE >> 12) @ size of FLASH (must be >= 4KB) + mov r2, #10 @ 11 is the minimum (4KB) +1: add r2, r2, #1 @ area size *= 2 + mov r1, r1, lsr #1 + bne 1b @ count not zero r-shift + orr r0, r0, r2, lsl #1 @ the region register value + orr r0, r0, #1 @ set enable bit + mcr p15, 0, r0, c6, c2, 0 @ set region 2, ROM/FLASH + + mov r0, #0x06 + mcr p15, 0, r0, c2, c0, 0 @ region 1,2 d-cacheable + mcr p15, 0, r0, c2, c0, 1 @ region 1,2 i-cacheable +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + mov r0, #0x00 @ disable whole write buffer +#else + mov r0, #0x02 @ region 1 write bufferred +#endif + mcr p15, 0, r0, c3, c0, 0 + +/* + * Access Permission Settings for future permission control by PU. + * + * priv. user + * region 0 (whole) rw -- : b0001 + * region 1 (RAM) rw rw : b0011 + * region 2 (FLASH) rw r- : b0010 + * region 3~7 (none) -- -- : b0000 + */ + mov r0, #0x00000031 + orr r0, r0, #0x00000200 + mcr p15, 0, r0, c5, c0, 2 @ set data access permission + mcr p15, 0, r0, c5, c0, 3 @ set inst. access permission + + mrc p15, 0, r0, c1, c0 @ get control register + orr r0, r0, #0x00001000 @ I-cache + orr r0, r0, #0x00000005 @ MPU/D-cache +#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN + orr r0, r0, #0x00004000 @ .1.. .... .... .... +#endif + mov pc, lr + + .size __arm946_setup, . - __arm946_setup + + __INITDATA + +/* + * Purpose : Function pointers used to access above functions - all calls + * come through these + */ + .type arm946_processor_functions, #object +ENTRY(arm946_processor_functions) + .word nommu_early_abort + .word cpu_arm946_proc_init + .word cpu_arm946_proc_fin + .word cpu_arm946_reset + .word cpu_arm946_do_idle + + .word cpu_arm946_dcache_clean_area + .word cpu_arm946_switch_mm + .word 0 @ cpu_*_set_pte + .size arm946_processor_functions, . - arm946_processor_functions + + .section ".rodata" + + .type cpu_arch_name, #object +cpu_arch_name: + .asciz "armv5te" + .size cpu_arch_name, . - cpu_arch_name + + .type cpu_elf_name, #object +cpu_elf_name: + .asciz "v5t" + .size cpu_elf_name, . - cpu_elf_name + + .type cpu_arm946_name, #object +cpu_arm946_name: + .ascii "ARM946E-S" + .size cpu_arm946_name, . - cpu_arm946_name + + .align + + .section ".proc.info.init", #alloc, #execinstr + .type __arm946_proc_info,#object +__arm946_proc_info: + .long 0x41009460 + .long 0xff00fff0 + .long 0 + b __arm946_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB + .long cpu_arm946_name + .long arm946_processor_functions + .long 0 + .long 0 + .long arm940_cache_fns + .size __arm946_proc_info, . - __arm946_proc_info + diff --git a/arch/arm/mm/proc-arm9tdmi.S b/arch/arm/mm/proc-arm9tdmi.S new file mode 100644 index 0000000..918ebf6 --- /dev/null +++ b/arch/arm/mm/proc-arm9tdmi.S @@ -0,0 +1,134 @@ +/* + * linux/arch/arm/mm/proc-arm9tdmi.S: utility functions for ARM9TDMI + * + * Copyright (C) 2003-2006 Hyok S. Choi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include + + .text +/* + * cpu_arm9tdmi_proc_init() + * cpu_arm9tdmi_do_idle() + * cpu_arm9tdmi_dcache_clean_area() + * cpu_arm9tdmi_switch_mm() + * + * These are not required. + */ +ENTRY(cpu_arm9tdmi_proc_init) +ENTRY(cpu_arm9tdmi_do_idle) +ENTRY(cpu_arm9tdmi_dcache_clean_area) +ENTRY(cpu_arm9tdmi_switch_mm) + mov pc, lr + +/* + * cpu_arm9tdmi_proc_fin() + */ +ENTRY(cpu_arm9tdmi_proc_fin) + mov r0, #PSR_F_BIT | PSR_I_BIT | SVC_MODE + msr cpsr_c, r0 + mov pc, lr + +/* + * Function: cpu_arm9tdmi_reset(loc) + * Params : loc(r0) address to jump to + * Purpose : Sets up everything for a reset and jump to the location for soft reset. + */ +ENTRY(cpu_arm9tdmi_reset) + mov pc, r0 + + __INIT + + .type __arm9tdmi_setup, #function +__arm9tdmi_setup: + mov pc, lr + .size __arm9tdmi_setup, . - __arm9tdmi_setup + + __INITDATA + +/* + * Purpose : Function pointers used to access above functions - all calls + * come through these + */ + .type arm9tdmi_processor_functions, #object +ENTRY(arm9tdmi_processor_functions) + .word nommu_early_abort + .word cpu_arm9tdmi_proc_init + .word cpu_arm9tdmi_proc_fin + .word cpu_arm9tdmi_reset + .word cpu_arm9tdmi_do_idle + .word cpu_arm9tdmi_dcache_clean_area + .word cpu_arm9tdmi_switch_mm + .word 0 @ cpu_*_set_pte + .size arm9tdmi_processor_functions, . - arm9tdmi_processor_functions + + .section ".rodata" + + .type cpu_arch_name, #object +cpu_arch_name: + .asciz "armv4t" + .size cpu_arch_name, . - cpu_arch_name + + .type cpu_elf_name, #object +cpu_elf_name: + .asciz "v4" + .size cpu_elf_name, . - cpu_elf_name + + .type cpu_arm9tdmi_name, #object +cpu_arm9tdmi_name: + .asciz "ARM9TDMI" + .size cpu_arm9tdmi_name, . - cpu_arm9tdmi_name + + .type cpu_p2001_name, #object +cpu_p2001_name: + .asciz "P2001" + .size cpu_p2001_name, . - cpu_p2001_name + + .align + + .section ".proc.info.init", #alloc, #execinstr + + .type __arm9tdmi_proc_info, #object +__arm9tdmi_proc_info: + .long 0x41009900 + .long 0xfff8ff00 + .long 0 + .long 0 + b __arm9tdmi_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT + .long cpu_arm9tdmi_name + .long arm9tdmi_processor_functions + .long 0 + .long 0 + .long v4_cache_fns + .size __arm9tdmi_proc_info, . - __arm9dmi_proc_info + + .type __p2001_proc_info, #object +__p2001_proc_info: + .long 0x41029000 + .long 0xffffffff + .long 0 + .long 0 + b __arm9tdmi_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT + .long cpu_p2001_name + .long arm9tdmi_processor_functions + .long 0 + .long 0 + .long v4_cache_fns + .size __p2001_proc_info, . - __p2001_proc_info diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 3ca0c92..e8b377d 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S @@ -311,12 +311,6 @@ ENTRY(xscale_flush_kern_dcache_page) * - end - virtual end address */ ENTRY(xscale_dma_inv_range) - mrc p15, 0, r2, c0, c0, 0 @ read ID - eor r2, r2, #0x69000000 - eor r2, r2, #0x00052000 - bics r2, r2, #1 - beq xscale_dma_flush_range - tst r0, #CACHELINESIZE - 1 bic r0, r0, #CACHELINESIZE - 1 mcrne p15, 0, r0, c7, c10, 1 @ clean D entry @@ -375,6 +369,30 @@ ENTRY(xscale_cache_fns) .long xscale_dma_clean_range .long xscale_dma_flush_range +/* + * On stepping A0/A1 of the 80200, invalidating D-cache by line doesn't + * clear the dirty bits, which means that if we invalidate a dirty line, + * the dirty data can still be written back to external memory later on. + * + * The recommended workaround is to always do a clean D-cache line before + * doing an invalidate D-cache line, so on the affected processors, + * dma_inv_range() is implemented as dma_flush_range(). + * + * See erratum #25 of "Intel 80200 Processor Specification Update", + * revision January 22, 2003, available at: + * http://www.intel.com/design/iio/specupdt/273415.htm + */ +ENTRY(xscale_80200_A0_A1_cache_fns) + .long xscale_flush_kern_cache_all + .long xscale_flush_user_cache_all + .long xscale_flush_user_cache_range + .long xscale_coherent_kern_range + .long xscale_coherent_user_range + .long xscale_flush_kern_dcache_page + .long xscale_dma_flush_range + .long xscale_dma_clean_range + .long xscale_dma_flush_range + ENTRY(cpu_xscale_dcache_clean_area) 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry add r0, r0, #CACHELINESIZE @@ -531,6 +549,11 @@ cpu_elf_name: .asciz "v5" .size cpu_elf_name, . - cpu_elf_name + .type cpu_80200_A0_A1_name, #object +cpu_80200_A0_A1_name: + .asciz "XScale-80200 A0/A1" + .size cpu_80200_A0_A1_name, . - cpu_80200_A0_A1_name + .type cpu_80200_name, #object cpu_80200_name: .asciz "XScale-80200" @@ -595,6 +618,29 @@ cpu_pxa270_name: .section ".proc.info.init", #alloc, #execinstr + .type __80200_A0_A1_proc_info,#object +__80200_A0_A1_proc_info: + .long 0x69052000 + .long 0xfffffffe + .long PMD_TYPE_SECT | \ + PMD_SECT_BUFFERABLE | \ + PMD_SECT_CACHEABLE | \ + PMD_SECT_AP_WRITE | \ + PMD_SECT_AP_READ + .long PMD_TYPE_SECT | \ + PMD_SECT_AP_WRITE | \ + PMD_SECT_AP_READ + b __xscale_setup + .long cpu_arch_name + .long cpu_elf_name + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP + .long cpu_80200_name + .long xscale_processor_functions + .long v4wbi_tlb_fns + .long xscale_mc_user_fns + .long xscale_80200_A0_A1_cache_fns + .size __80200_A0_A1_proc_info, . - __80200_A0_A1_proc_info + .type __80200_proc_info,#object __80200_proc_info: .long 0x69052000 diff --git a/arch/arm/oprofile/op_model_xscale.c b/arch/arm/oprofile/op_model_xscale.c index 34fdc73..6576143 100644 --- a/arch/arm/oprofile/op_model_xscale.c +++ b/arch/arm/oprofile/op_model_xscale.c @@ -36,11 +36,11 @@ #define PMU_CNT64 0x008 /* Make CCNT cou #ifdef CONFIG_ARCH_IOP310 #define XSCALE_PMU_IRQ IRQ_XS80200_PMU #endif -#ifdef CONFIG_ARCH_IOP321 -#define XSCALE_PMU_IRQ IRQ_IOP321_CORE_PMU +#ifdef CONFIG_ARCH_IOP32X +#define XSCALE_PMU_IRQ IRQ_IOP32X_CORE_PMU #endif -#ifdef CONFIG_ARCH_IOP331 -#define XSCALE_PMU_IRQ IRQ_IOP331_CORE_PMU +#ifdef CONFIG_ARCH_IOP33X +#define XSCALE_PMU_IRQ IRQ_IOP33X_CORE_PMU #endif #ifdef CONFIG_ARCH_PXA #define XSCALE_PMU_IRQ IRQ_PMU @@ -88,7 +88,7 @@ static struct pmu_counter results[MAX_CO /* * There are two versions of the PMU in current XScale processors * with differing register layouts and number of performance counters. - * e.g. IOP321 is xsc1 whilst IOP331 is xsc2. + * e.g. IOP32x is xsc1 whilst IOP33x is xsc2. * We detect which register layout to use in xscale_detect_pmu() */ enum { PMU_XSC1, PMU_XSC2 }; diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile new file mode 100644 index 0000000..23da00b --- /dev/null +++ b/arch/arm/plat-iop/Makefile @@ -0,0 +1,8 @@ +# +# Makefile for the linux kernel. +# + +obj-y := gpio.o i2c.o pci.o setup.o time.o +obj-m := +obj-n := +obj- := diff --git a/arch/arm/plat-iop/gpio.c b/arch/arm/plat-iop/gpio.c new file mode 100644 index 0000000..eda4360 --- /dev/null +++ b/arch/arm/plat-iop/gpio.c @@ -0,0 +1,48 @@ +/* + * arch/arm/plat-iop/gpio.c + * GPIO handling for Intel IOP3xx processors. + * + * Copyright (C) 2006 Lennert Buytenhek + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + */ + +#include +#include + +void gpio_line_config(int line, int direction) +{ + unsigned long flags; + + local_irq_save(flags); + if (direction == GPIO_IN) { + *IOP3XX_GPOE |= 1 << line; + } else if (direction == GPIO_OUT) { + *IOP3XX_GPOE &= ~(1 << line); + } + local_irq_restore(flags); +} +EXPORT_SYMBOL(gpio_line_config); + +int gpio_line_get(int line) +{ + return !!(*IOP3XX_GPID & (1 << line)); +} +EXPORT_SYMBOL(gpio_line_get); + +void gpio_line_set(int line, int value) +{ + unsigned long flags; + + local_irq_save(flags); + if (value == GPIO_LOW) { + *IOP3XX_GPOD &= ~(1 << line); + } else if (value == GPIO_HIGH) { + *IOP3XX_GPOD |= 1 << line; + } + local_irq_restore(flags); +} +EXPORT_SYMBOL(gpio_line_set); diff --git a/arch/arm/plat-iop/i2c.c b/arch/arm/plat-iop/i2c.c new file mode 100644 index 0000000..e99909b --- /dev/null +++ b/arch/arm/plat-iop/i2c.c @@ -0,0 +1,81 @@ +/* + * arch/arm/plat-iop/i2c.c + * + * Author: Nicolas Pitre + * Copyright (C) 2001 MontaVista Software, Inc. + * Copyright (C) 2004 Intel Corporation. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_ARCH_IOP32X +#define IRQ_IOP3XX_I2C_0 IRQ_IOP32X_I2C_0 +#define IRQ_IOP3XX_I2C_1 IRQ_IOP32X_I2C_1 +#endif +#ifdef CONFIG_ARCH_IOP33X +#define IRQ_IOP3XX_I2C_0 IRQ_IOP33X_I2C_0 +#define IRQ_IOP3XX_I2C_1 IRQ_IOP33X_I2C_1 +#endif + +static struct resource iop3xx_i2c0_resources[] = { + [0] = { + .start = 0xfffff680, + .end = 0xfffff697, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_IOP3XX_I2C_0, + .end = IRQ_IOP3XX_I2C_0, + .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device iop3xx_i2c0_device = { + .name = "IOP3xx-I2C", + .id = 0, + .num_resources = 2, + .resource = iop3xx_i2c0_resources, +}; + + +static struct resource iop3xx_i2c1_resources[] = { + [0] = { + .start = 0xfffff6a0, + .end = 0xfffff6b7, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_IOP3XX_I2C_1, + .end = IRQ_IOP3XX_I2C_1, + .flags = IORESOURCE_IRQ, + } +}; + +struct platform_device iop3xx_i2c1_device = { + .name = "IOP3xx-I2C", + .id = 1, + .num_resources = 2, + .resource = iop3xx_i2c1_resources, +}; diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c new file mode 100644 index 0000000..e647812 --- /dev/null +++ b/arch/arm/plat-iop/pci.c @@ -0,0 +1,247 @@ +/* + * arch/arm/plat-iop/pci.c + * + * PCI support for the Intel IOP32X and IOP33X processors + * + * Author: Rory Bolt + * Copyright (C) 2002 Rory Bolt + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// #define DEBUG + +#ifdef DEBUG +#define DBG(x...) printk(x) +#else +#define DBG(x...) do { } while (0) +#endif + +/* + * This routine builds either a type0 or type1 configuration command. If the + * bus is on the 803xx then a type0 made, else a type1 is created. + */ +static u32 iop3xx_cfg_address(struct pci_bus *bus, int devfn, int where) +{ + struct pci_sys_data *sys = bus->sysdata; + u32 addr; + + if (sys->busnr == bus->number) + addr = 1 << (PCI_SLOT(devfn) + 16) | (PCI_SLOT(devfn) << 11); + else + addr = bus->number << 16 | PCI_SLOT(devfn) << 11 | 1; + + addr |= PCI_FUNC(devfn) << 8 | (where & ~3); + + return addr; +} + +/* + * This routine checks the status of the last configuration cycle. If an error + * was detected it returns a 1, else it returns a 0. The errors being checked + * are parity, master abort, target abort (master and target). These types of + * errors occure during a config cycle where there is no device, like during + * the discovery stage. + */ +static int iop3xx_pci_status(void) +{ + unsigned int status; + int ret = 0; + + /* + * Check the status registers. + */ + status = *IOP3XX_ATUSR; + if (status & 0xf900) { + DBG("\t\t\tPCI: P0 - status = 0x%08x\n", status); + *IOP3XX_ATUSR = status & 0xf900; + ret = 1; + } + + status = *IOP3XX_ATUISR; + if (status & 0x679f) { + DBG("\t\t\tPCI: P1 - status = 0x%08x\n", status); + *IOP3XX_ATUISR = status & 0x679f; + ret = 1; + } + + return ret; +} + +/* + * Simply write the address register and read the configuration + * data. Note that the 4 nop's ensure that we are able to handle + * a delayed abort (in theory.) + */ +static inline u32 iop3xx_read(unsigned long addr) +{ + u32 val; + + __asm__ __volatile__( + "str %1, [%2]\n\t" + "ldr %0, [%3]\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + : "=r" (val) + : "r" (addr), "r" (IOP3XX_OCCAR), "r" (IOP3XX_OCCDR)); + + return val; +} + +/* + * The read routines must check the error status of the last configuration + * cycle. If there was an error, the routine returns all hex f's. + */ +static int +iop3xx_read_config(struct pci_bus *bus, unsigned int devfn, int where, + int size, u32 *value) +{ + unsigned long addr = iop3xx_cfg_address(bus, devfn, where); + u32 val = iop3xx_read(addr) >> ((where & 3) * 8); + + if (iop3xx_pci_status()) + val = 0xffffffff; + + *value = val; + + return PCIBIOS_SUCCESSFUL; +} + +static int +iop3xx_write_config(struct pci_bus *bus, unsigned int devfn, int where, + int size, u32 value) +{ + unsigned long addr = iop3xx_cfg_address(bus, devfn, where); + u32 val; + + if (size != 4) { + val = iop3xx_read(addr); + if (iop3xx_pci_status()) + return PCIBIOS_SUCCESSFUL; + + where = (where & 3) * 8; + + if (size == 1) + val &= ~(0xff << where); + else + val &= ~(0xffff << where); + + *IOP3XX_OCCDR = val | value << where; + } else { + asm volatile( + "str %1, [%2]\n\t" + "str %0, [%3]\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + "nop\n\t" + : + : "r" (value), "r" (addr), + "r" (IOP3XX_OCCAR), "r" (IOP3XX_OCCDR)); + } + + return PCIBIOS_SUCCESSFUL; +} + +static struct pci_ops iop3xx_ops = { + .read = iop3xx_read_config, + .write = iop3xx_write_config, +}; + +/* + * When a PCI device does not exist during config cycles, the 80200 gets a + * bus error instead of returning 0xffffffff. This handler simply returns. + */ +static int +iop3xx_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) +{ + DBG("PCI abort: address = 0x%08lx fsr = 0x%03x PC = 0x%08lx LR = 0x%08lx\n", + addr, fsr, regs->ARM_pc, regs->ARM_lr); + + /* + * If it was an imprecise abort, then we need to correct the + * return address to be _after_ the instruction. + */ + if (fsr & (1 << 10)) + regs->ARM_pc += 4; + + return 0; +} + +int iop3xx_pci_setup(int nr, struct pci_sys_data *sys) +{ + struct resource *res; + + if (nr != 0) + return 0; + + res = kzalloc(2 * sizeof(struct resource), GFP_KERNEL); + if (!res) + panic("PCI: unable to alloc resources"); + + res[0].start = IOP3XX_PCI_LOWER_IO_VA; + res[0].end = IOP3XX_PCI_LOWER_IO_VA + IOP3XX_PCI_IO_WINDOW_SIZE - 1; + res[0].name = "IOP3XX PCI I/O Space"; + res[0].flags = IORESOURCE_IO; + request_resource(&ioport_resource, &res[0]); + + res[1].start = IOP3XX_PCI_LOWER_MEM_PA; + res[1].end = IOP3XX_PCI_LOWER_MEM_PA + IOP3XX_PCI_MEM_WINDOW_SIZE - 1; + res[1].name = "IOP3XX PCI Memory Space"; + res[1].flags = IORESOURCE_MEM; + request_resource(&iomem_resource, &res[1]); + + sys->mem_offset = IOP3XX_PCI_LOWER_MEM_PA - IOP3XX_PCI_LOWER_MEM_BA; + sys->io_offset = IOP3XX_PCI_LOWER_IO_VA - IOP3XX_PCI_LOWER_IO_BA; + + sys->resource[0] = &res[0]; + sys->resource[1] = &res[1]; + sys->resource[2] = NULL; + + return 1; +} + +struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *sys) +{ + return pci_scan_bus(sys->busnr, &iop3xx_ops, sys); +} + +void iop3xx_pci_preinit(void) +{ + DBG("PCI: Intel 803xx PCI init code.\n"); + DBG("ATU: IOP3XX_ATUCMD=0x%04x\n", *IOP3XX_ATUCMD); + DBG("ATU: IOP3XX_OMWTVR0=0x%04x, IOP3XX_OIOWTVR=0x%04x\n", + *IOP3XX_OMWTVR0, + *IOP3XX_OIOWTVR); + DBG("ATU: IOP3XX_ATUCR=0x%08x\n", *IOP3XX_ATUCR); + DBG("ATU: IOP3XX_IABAR0=0x%08x IOP3XX_IALR0=0x%08x IOP3XX_IATVR0=%08x\n", + *IOP3XX_IABAR0, *IOP3XX_IALR0, *IOP3XX_IATVR0); + DBG("ATU: IOP3XX_OMWTVR0=0x%08x\n", *IOP3XX_OMWTVR0); + DBG("ATU: IOP3XX_IABAR1=0x%08x IOP3XX_IALR1=0x%08x\n", + *IOP3XX_IABAR1, *IOP3XX_IALR1); + DBG("ATU: IOP3XX_ERBAR=0x%08x IOP3XX_ERLR=0x%08x IOP3XX_ERTVR=%08x\n", + *IOP3XX_ERBAR, *IOP3XX_ERLR, *IOP3XX_ERTVR); + DBG("ATU: IOP3XX_IABAR2=0x%08x IOP3XX_IALR2=0x%08x IOP3XX_IATVR2=%08x\n", + *IOP3XX_IABAR2, *IOP3XX_IALR2, *IOP3XX_IATVR2); + DBG("ATU: IOP3XX_IABAR3=0x%08x IOP3XX_IALR3=0x%08x IOP3XX_IATVR3=%08x\n", + *IOP3XX_IABAR3, *IOP3XX_IALR3, *IOP3XX_IATVR3); + + hook_fault_code(16+6, iop3xx_pci_abort, SIGBUS, "imprecise external abort"); +} diff --git a/arch/arm/plat-iop/setup.c b/arch/arm/plat-iop/setup.c new file mode 100644 index 0000000..4689db6 --- /dev/null +++ b/arch/arm/plat-iop/setup.c @@ -0,0 +1,38 @@ +/* + * arch/arm/plat-iop/setup.c + * + * Author: Nicolas Pitre + * Copyright (C) 2001 MontaVista Software, Inc. + * Copyright (C) 2004 Intel Corporation. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include + +/* + * Standard IO mapping for all IOP3xx based systems + */ +static struct map_desc iop3xx_std_desc[] __initdata = { + { /* mem mapped registers */ + .virtual = IOP3XX_PERIPHERAL_VIRT_BASE, + .pfn = __phys_to_pfn(IOP3XX_PERIPHERAL_PHYS_BASE), + .length = IOP3XX_PERIPHERAL_SIZE, + .type = MT_DEVICE, + }, { /* PCI IO space */ + .virtual = IOP3XX_PCI_LOWER_IO_VA, + .pfn = __phys_to_pfn(IOP3XX_PCI_LOWER_IO_PA), + .length = IOP3XX_PCI_IO_WINDOW_SIZE, + .type = MT_DEVICE, + }, +}; + +void __init iop3xx_map_io(void) +{ + iotable_init(iop3xx_std_desc, ARRAY_SIZE(iop3xx_std_desc)); +} diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c new file mode 100644 index 0000000..06282df --- /dev/null +++ b/arch/arm/plat-iop/time.c @@ -0,0 +1,98 @@ +/* + * arch/arm/plat-iop/time.c + * + * Timer code for IOP32x and IOP33x based systems + * + * Author: Deepak Saxena + * + * Copyright 2002-2003 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_ARCH_IOP32X +#define IRQ_IOP3XX_TIMER0 IRQ_IOP32X_TIMER0 +#else +#ifdef CONFIG_ARCH_IOP33X +#define IRQ_IOP3XX_TIMER0 IRQ_IOP33X_TIMER0 +#endif +#endif + +static unsigned long ticks_per_jiffy; +static unsigned long ticks_per_usec; +static unsigned long next_jiffy_time; + +unsigned long iop3xx_gettimeoffset(void) +{ + unsigned long offset; + + offset = next_jiffy_time - *IOP3XX_TU_TCR1; + + return offset / ticks_per_usec; +} + +static irqreturn_t +iop3xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + write_seqlock(&xtime_lock); + + iop3xx_cp6_enable(); + asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (1)); + iop3xx_cp6_disable(); + + while ((signed long)(next_jiffy_time - *IOP3XX_TU_TCR1) + >= ticks_per_jiffy) { + timer_tick(regs); + next_jiffy_time -= ticks_per_jiffy; + } + + write_sequnlock(&xtime_lock); + + return IRQ_HANDLED; +} + +static struct irqaction iop3xx_timer_irq = { + .name = "IOP3XX Timer Tick", + .handler = iop3xx_timer_interrupt, + .flags = IRQF_DISABLED | IRQF_TIMER, +}; + +void __init iop3xx_init_time(unsigned long tick_rate) +{ + u32 timer_ctl; + + ticks_per_jiffy = (tick_rate + HZ/2) / HZ; + ticks_per_usec = tick_rate / 1000000; + next_jiffy_time = 0xffffffff; + + timer_ctl = IOP3XX_TMR_EN | IOP3XX_TMR_PRIVILEGED | + IOP3XX_TMR_RELOAD | IOP3XX_TMR_RATIO_1_1; + + /* + * We use timer 0 for our timer interrupt, and timer 1 as + * monotonic counter for tracking missed jiffies. + */ + iop3xx_cp6_enable(); + asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (ticks_per_jiffy - 1)); + asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (timer_ctl)); + asm volatile("mcr p6, 0, %0, c5, c1, 0" : : "r" (0xffffffff)); + asm volatile("mcr p6, 0, %0, c1, c1, 0" : : "r" (timer_ctl)); + iop3xx_cp6_disable(); + + setup_irq(IRQ_IOP3XX_TIMER0, &iop3xx_timer_irq); +} diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 7f45c7c..f1179ad 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -100,6 +100,7 @@ void clk_disable(struct clk *clk) return; spin_lock_irqsave(&clockfw_lock, flags); + BUG_ON(clk->usecount == 0); if (arch_clock->clk_disable) arch_clock->clk_disable(clk); spin_unlock_irqrestore(&clockfw_lock, flags); @@ -322,6 +323,31 @@ EXPORT_SYMBOL(clk_allow_idle); /*-------------------------------------------------------------------------*/ +#ifdef CONFIG_OMAP_RESET_CLOCKS +/* + * Disable any unused clocks left on by the bootloader + */ +static int __init clk_disable_unused(void) +{ + struct clk *ck; + unsigned long flags; + + list_for_each_entry(ck, &clocks, node) { + if (ck->usecount > 0 || (ck->flags & ALWAYS_ENABLED) || + ck->enable_reg == 0) + continue; + + spin_lock_irqsave(&clockfw_lock, flags); + if (arch_clock->clk_disable_unused) + arch_clock->clk_disable_unused(ck); + spin_unlock_irqrestore(&clockfw_lock, flags); + } + + return 0; +} +late_initcall(clk_disable_unused); +#endif + int __init clk_init(struct clk_functions * custom_clocks) { if (!custom_clocks) { diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 1812f23..dbc3f44 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c @@ -148,7 +148,7 @@ #if defined(CONFIG_MMC_OMAP) || defined( #ifdef CONFIG_ARCH_OMAP24XX #define OMAP_MMC1_BASE 0x4809c000 -#define OMAP_MMC1_INT 83 +#define OMAP_MMC1_INT INT_24XX_MMC_IRQ #else #define OMAP_MMC1_BASE 0xfffb7800 #define OMAP_MMC1_INT INT_MMC @@ -225,7 +225,14 @@ static void __init omap_init_mmc(void) /* block 1 is always available and has just one pinout option */ mmc = &mmc_conf->mmc[0]; if (mmc->enabled) { - if (!cpu_is_omap24xx()) { + if (cpu_is_omap24xx()) { + omap_cfg_reg(H18_24XX_MMC_CMD); + omap_cfg_reg(H15_24XX_MMC_CLKI); + omap_cfg_reg(G19_24XX_MMC_CLKO); + omap_cfg_reg(F20_24XX_MMC_DAT0); + omap_cfg_reg(F19_24XX_MMC_DAT_DIR0); + omap_cfg_reg(G18_24XX_MMC_CMD_DIR); + } else { omap_cfg_reg(MMC_CMD); omap_cfg_reg(MMC_CLK); omap_cfg_reg(MMC_DAT0); @@ -236,7 +243,14 @@ static void __init omap_init_mmc(void) } } if (mmc->wire4) { - if (!cpu_is_omap24xx()) { + if (cpu_is_omap24xx()) { + omap_cfg_reg(H14_24XX_MMC_DAT1); + omap_cfg_reg(E19_24XX_MMC_DAT2); + omap_cfg_reg(D19_24XX_MMC_DAT3); + omap_cfg_reg(E20_24XX_MMC_DAT_DIR1); + omap_cfg_reg(F18_24XX_MMC_DAT_DIR2); + omap_cfg_reg(E18_24XX_MMC_DAT_DIR3); + } else { omap_cfg_reg(MMC_DAT1); /* NOTE: DAT2 can be on W10 (here) or M15 */ if (!mmc->nomux) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 9eddc95..1bbb431 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -119,32 +119,41 @@ static void clear_lch_regs(int lch) omap_writew(0, lch_base + i); } -void omap_set_dma_priority(int dst_port, int priority) +void omap_set_dma_priority(int lch, int dst_port, int priority) { unsigned long reg; u32 l; - switch (dst_port) { - case OMAP_DMA_PORT_OCP_T1: /* FFFECC00 */ - reg = OMAP_TC_OCPT1_PRIOR; - break; - case OMAP_DMA_PORT_OCP_T2: /* FFFECCD0 */ - reg = OMAP_TC_OCPT2_PRIOR; - break; - case OMAP_DMA_PORT_EMIFF: /* FFFECC08 */ - reg = OMAP_TC_EMIFF_PRIOR; - break; - case OMAP_DMA_PORT_EMIFS: /* FFFECC04 */ - reg = OMAP_TC_EMIFS_PRIOR; - break; - default: - BUG(); - return; + if (cpu_class_is_omap1()) { + switch (dst_port) { + case OMAP_DMA_PORT_OCP_T1: /* FFFECC00 */ + reg = OMAP_TC_OCPT1_PRIOR; + break; + case OMAP_DMA_PORT_OCP_T2: /* FFFECCD0 */ + reg = OMAP_TC_OCPT2_PRIOR; + break; + case OMAP_DMA_PORT_EMIFF: /* FFFECC08 */ + reg = OMAP_TC_EMIFF_PRIOR; + break; + case OMAP_DMA_PORT_EMIFS: /* FFFECC04 */ + reg = OMAP_TC_EMIFS_PRIOR; + break; + default: + BUG(); + return; + } + l = omap_readl(reg); + l &= ~(0xf << 8); + l |= (priority & 0xf) << 8; + omap_writel(l, reg); + } + + if (cpu_is_omap24xx()) { + if (priority) + OMAP_DMA_CCR_REG(lch) |= (1 << 6); + else + OMAP_DMA_CCR_REG(lch) &= ~(1 << 6); } - l = omap_readl(reg); - l &= ~(0xf << 8); - l |= (priority & 0xf) << 8; - omap_writel(l, reg); } void omap_set_dma_transfer_params(int lch, int data_type, int elem_count, @@ -234,6 +243,14 @@ void omap_set_dma_color_mode(int lch, en OMAP1_DMA_LCH_CTRL_REG(lch) = w; } +void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode) +{ + if (cpu_is_omap24xx()) { + OMAP_DMA_CSDP_REG(lch) &= ~(0x3 << 16); + OMAP_DMA_CSDP_REG(lch) |= (mode << 16); + } +} + /* Note that src_port is only for omap1 */ void omap_set_dma_src_params(int lch, int src_port, int src_amode, unsigned long src_start, @@ -698,6 +715,32 @@ void omap_stop_dma(int lch) } /* + * Allows changing the DMA callback function or data. This may be needed if + * the driver shares a single DMA channel for multiple dma triggers. + */ +int omap_set_dma_callback(int lch, + void (* callback)(int lch, u16 ch_status, void *data), + void *data) +{ + unsigned long flags; + + if (lch < 0) + return -ENODEV; + + spin_lock_irqsave(&dma_chan_lock, flags); + if (dma_chan[lch].dev_id == -1) { + printk(KERN_ERR "DMA callback for not set for free channel\n"); + spin_unlock_irqrestore(&dma_chan_lock, flags); + return -EINVAL; + } + dma_chan[lch].callback = callback; + dma_chan[lch].data = data; + spin_unlock_irqrestore(&dma_chan_lock, flags); + + return 0; +} + +/* * Returns current physical source address for the given DMA channel. * If the channel is running the caller must disable interrupts prior calling * this function and process the returned value before re-enabling interrupt to @@ -1339,6 +1382,14 @@ static int __init omap_init_dma(void) dma_chan_count = 16; } else dma_chan_count = 9; + if (cpu_is_omap16xx()) { + u16 w; + + /* this would prevent OMAP sleep */ + w = omap_readw(OMAP1610_DMA_LCD_CTRL); + w &= ~(1 << 8); + omap_writew(w, OMAP1610_DMA_LCD_CTRL); + } } else if (cpu_is_omap24xx()) { u8 revision = omap_readb(OMAP_DMA4_REVISION); printk(KERN_INFO "OMAP DMA hardware revision %d.%d\n", @@ -1414,11 +1465,13 @@ EXPORT_SYMBOL(omap_request_dma); EXPORT_SYMBOL(omap_free_dma); EXPORT_SYMBOL(omap_start_dma); EXPORT_SYMBOL(omap_stop_dma); +EXPORT_SYMBOL(omap_set_dma_callback); EXPORT_SYMBOL(omap_enable_dma_irq); EXPORT_SYMBOL(omap_disable_dma_irq); EXPORT_SYMBOL(omap_set_dma_transfer_params); EXPORT_SYMBOL(omap_set_dma_color_mode); +EXPORT_SYMBOL(omap_set_dma_write_mode); EXPORT_SYMBOL(omap_set_dma_src_params); EXPORT_SYMBOL(omap_set_dma_src_index); diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 5052443..bcbb8d7 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -75,10 +75,14 @@ #ifdef CONFIG_ARCH_OMAP2 #endif void __iomem *io_base; unsigned reserved:1; + unsigned enabled:1; }; #ifdef CONFIG_ARCH_OMAP1 +#define omap_dm_clk_enable(x) +#define omap_dm_clk_disable(x) + static struct omap_dm_timer dm_timers[] = { { .phys_base = 0xfffb1400, .irq = INT_1610_GPTIMER1 }, { .phys_base = 0xfffb1c00, .irq = INT_1610_GPTIMER2 }, @@ -92,6 +96,9 @@ static struct omap_dm_timer dm_timers[] #elif defined(CONFIG_ARCH_OMAP2) +#define omap_dm_clk_enable(x) clk_enable(x) +#define omap_dm_clk_disable(x) clk_disable(x) + static struct omap_dm_timer dm_timers[] = { { .phys_base = 0x48028000, .irq = INT_24XX_GPTIMER1 }, { .phys_base = 0x4802a000, .irq = INT_24XX_GPTIMER2 }, @@ -154,24 +161,28 @@ static void omap_dm_timer_reset(struct o { u32 l; - if (timer != &dm_timers[0]) { + if (!cpu_class_is_omap2() || timer != &dm_timers[0]) { omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06); omap_dm_timer_wait_for_reset(timer); } - omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_SYS_CLK); + omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ); /* Set to smart-idle mode */ l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG); l |= 0x02 << 3; + + if (cpu_class_is_omap2() && timer == &dm_timers[0]) { + /* Enable wake-up only for GPT1 on OMAP2 CPUs*/ + l |= 1 << 2; + /* Non-posted mode */ + omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0); + } omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l); } static void omap_dm_timer_prepare(struct omap_dm_timer *timer) { -#ifdef CONFIG_ARCH_OMAP2 - clk_enable(timer->iclk); - clk_enable(timer->fclk); -#endif + omap_dm_timer_enable(timer); omap_dm_timer_reset(timer); } @@ -223,15 +234,36 @@ struct omap_dm_timer *omap_dm_timer_requ void omap_dm_timer_free(struct omap_dm_timer *timer) { + omap_dm_timer_enable(timer); omap_dm_timer_reset(timer); -#ifdef CONFIG_ARCH_OMAP2 - clk_disable(timer->iclk); - clk_disable(timer->fclk); -#endif + omap_dm_timer_disable(timer); + WARN_ON(!timer->reserved); timer->reserved = 0; } +void omap_dm_timer_enable(struct omap_dm_timer *timer) +{ + if (timer->enabled) + return; + + omap_dm_clk_enable(timer->fclk); + omap_dm_clk_enable(timer->iclk); + + timer->enabled = 1; +} + +void omap_dm_timer_disable(struct omap_dm_timer *timer) +{ + if (!timer->enabled) + return; + + omap_dm_clk_disable(timer->iclk); + omap_dm_clk_disable(timer->fclk); + + timer->enabled = 0; +} + int omap_dm_timer_get_irq(struct omap_dm_timer *timer) { return timer->irq; @@ -276,7 +308,7 @@ #elif defined(CONFIG_ARCH_OMAP2) struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer) { - return timer->fclk; + return timer->fclk; } __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) @@ -406,11 +438,16 @@ void omap_dm_timer_set_int_enable(struct unsigned int value) { omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value); + omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, value); } unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) { - return omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG); + unsigned int l; + + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG); + + return l; } void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) @@ -420,12 +457,16 @@ void omap_dm_timer_write_status(struct o unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) { - return omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG); + unsigned int l; + + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG); + + return l; } void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value) { - return omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, value); + omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, value); } int omap_dm_timers_active(void) @@ -436,9 +477,14 @@ int omap_dm_timers_active(void) struct omap_dm_timer *timer; timer = &dm_timers[i]; + + if (!timer->enabled) + continue; + if (omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG) & - OMAP_TIMER_CTRL_ST) + OMAP_TIMER_CTRL_ST) { return 1; + } } return 0; } diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index cd7f973..f55f99a 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -94,6 +94,8 @@ #define OMAP24XX_GPIO_REVISION 0x0000 #define OMAP24XX_GPIO_SYSCONFIG 0x0010 #define OMAP24XX_GPIO_SYSSTATUS 0x0014 #define OMAP24XX_GPIO_IRQSTATUS1 0x0018 +#define OMAP24XX_GPIO_IRQSTATUS2 0x0028 +#define OMAP24XX_GPIO_IRQENABLE2 0x002c #define OMAP24XX_GPIO_IRQENABLE1 0x001c #define OMAP24XX_GPIO_CTRL 0x0030 #define OMAP24XX_GPIO_OE 0x0034 @@ -110,8 +112,6 @@ #define OMAP24XX_GPIO_SETWKUENA 0x0084 #define OMAP24XX_GPIO_CLEARDATAOUT 0x0090 #define OMAP24XX_GPIO_SETDATAOUT 0x0094 -#define OMAP_MPUIO_MASK (~OMAP_MAX_GPIO_LINES & 0xff) - struct gpio_bank { void __iomem *base; u16 irq; @@ -216,11 +216,13 @@ static inline int gpio_valid(int gpio) { if (gpio < 0) return -1; +#ifndef CONFIG_ARCH_OMAP24XX if (OMAP_GPIO_IS_MPUIO(gpio)) { - if ((gpio & OMAP_MPUIO_MASK) > 16) + if (gpio >= OMAP_MAX_GPIO_LINES + 16) return -1; return 0; } +#endif #ifdef CONFIG_ARCH_OMAP15XX if (cpu_is_omap15xx() && gpio < 16) return 0; @@ -529,6 +531,10 @@ static void _clear_gpio_irqbank(struct g return; } __raw_writel(gpio_mask, reg); + + /* Workaround for clearing DSP GPIO interrupts to allow retention */ + if (cpu_is_omap2420()) + __raw_writel(gpio_mask, bank->base + OMAP24XX_GPIO_IRQSTATUS2); } static inline void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio) @@ -662,6 +668,14 @@ static int _set_gpio_wakeup(struct gpio_ } } +static void _reset_gpio(struct gpio_bank *bank, int gpio) +{ + _set_gpio_direction(bank, get_gpio_index(gpio), 1); + _set_gpio_irqenable(bank, gpio, 0); + _clear_gpio_irqstatus(bank, gpio); + _set_gpio_triggering(bank, get_gpio_index(gpio), IRQT_NOEDGE); +} + /* Use disable_irq_wake() and enable_irq_wake() functions from drivers */ static int gpio_wake_enable(unsigned int irq, unsigned int enable) { @@ -672,9 +686,7 @@ static int gpio_wake_enable(unsigned int if (check_gpio(gpio) < 0) return -ENODEV; bank = get_gpio_bank(gpio); - spin_lock(&bank->lock); retval = _set_gpio_wakeup(bank, get_gpio_index(gpio), enable); - spin_unlock(&bank->lock); return retval; } @@ -696,7 +708,9 @@ int omap_request_gpio(int gpio) } bank->reserved_map |= (1 << get_gpio_index(gpio)); - /* Set trigger to none. You need to enable the trigger after request_irq */ + /* Set trigger to none. You need to enable the desired trigger with + * request_irq() or set_irq_type(). + */ _set_gpio_triggering(bank, get_gpio_index(gpio), IRQT_NOEDGE); #ifdef CONFIG_ARCH_OMAP15XX @@ -756,9 +770,7 @@ #ifdef CONFIG_ARCH_OMAP24XX } #endif bank->reserved_map &= ~(1 << get_gpio_index(gpio)); - _set_gpio_direction(bank, get_gpio_index(gpio), 1); - _set_gpio_irqenable(bank, gpio, 0); - _clear_gpio_irqstatus(bank, gpio); + _reset_gpio(bank, gpio); spin_unlock(&bank->lock); } @@ -898,6 +910,14 @@ #endif } +static void gpio_irq_shutdown(unsigned int irq) +{ + unsigned int gpio = irq - IH_GPIO_BASE; + struct gpio_bank *bank = get_gpio_bank(gpio); + + _reset_gpio(bank, gpio); +} + static void gpio_ack_irq(unsigned int irq) { unsigned int gpio = irq - IH_GPIO_BASE; @@ -946,6 +966,7 @@ static void mpuio_unmask_irq(unsigned in static struct irq_chip gpio_irq_chip = { .name = "GPIO", + .shutdown = gpio_irq_shutdown, .ack = gpio_ack_irq, .mask = gpio_mask_irq, .unmask = gpio_unmask_irq, @@ -985,7 +1006,7 @@ static int __init _omap_gpio_init(void) else clk_enable(gpio_ick); gpio_fck = clk_get(NULL, "gpios_fck"); - if (IS_ERR(gpio_ick)) + if (IS_ERR(gpio_fck)) printk("Could not get gpios_fck\n"); else clk_enable(gpio_fck); @@ -1144,8 +1165,8 @@ static int omap_gpio_resume(struct sys_d wake_set = bank->base + OMAP1610_GPIO_SET_WAKEUPENA; break; case METHOD_GPIO_24XX: - wake_clear = bank->base + OMAP1610_GPIO_CLEAR_WAKEUPENA; - wake_set = bank->base + OMAP1610_GPIO_SET_WAKEUPENA; + wake_clear = bank->base + OMAP24XX_GPIO_CLEARWKUENA; + wake_set = bank->base + OMAP24XX_GPIO_SETWKUENA; break; default: continue; diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 196aac3..ade9a0f 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c @@ -75,8 +75,6 @@ static struct clk *mcbsp1_ick = 0; static struct clk *mcbsp1_fck = 0; static struct clk *mcbsp2_ick = 0; static struct clk *mcbsp2_fck = 0; -static struct clk *sys_ck = 0; -static struct clk *sys_clkout = 0; #endif static void omap_mcbsp_dump_reg(u8 id) @@ -232,7 +230,6 @@ static void omap2_mcbsp2_mux_setup(void) omap_cfg_reg(W15_24XX_MCBSP2_DR); omap_cfg_reg(V15_24XX_MCBSP2_DX); omap_cfg_reg(V14_24XX_GPIO117); - omap_cfg_reg(W14_24XX_SYS_CLKOUT); } #endif @@ -984,13 +981,7 @@ #if defined(CONFIG_ARCH_OMAP24XX) if (cpu_is_omap24xx()) { mcbsp_info = mcbsp_24xx; mcbsp_count = ARRAY_SIZE(mcbsp_24xx); - - /* REVISIT: where's the right place? */ omap2_mcbsp2_mux_setup(); - sys_ck = clk_get(0, "sys_ck"); - sys_clkout = clk_get(0, "sys_clkout"); - clk_set_parent(sys_clkout, sys_ck); - clk_enable(sys_clkout); } #endif for (i = 0; i < OMAP_MAX_MCBSP_COUNT ; i++) { diff --git a/arch/arm/plat-omap/pm.c b/arch/arm/plat-omap/pm.c deleted file mode 100644 index 04b4102..0000000 --- a/arch/arm/plat-omap/pm.c +++ /dev/null @@ -1,670 +0,0 @@ -/* - * linux/arch/arm/plat-omap/pm.c - * - * OMAP Power Management Routines - * - * Original code for the SA11x0: - * Copyright (c) 2001 Cliff Brake - * - * Modified for the PXA250 by Nicolas Pitre: - * Copyright (c) 2002 Monta Vista Software, Inc. - * - * Modified for the OMAP1510 by David Singleton: - * Copyright (c) 2002 Monta Vista Software, Inc. - * - * Cleanup 2004 for OMAP1510/1610 by Dirk Behme - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE]; -static unsigned short ulpd_sleep_save[ULPD_SLEEP_SAVE_SIZE]; -static unsigned int mpui730_sleep_save[MPUI730_SLEEP_SAVE_SIZE]; -static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE]; -static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE]; - -static void (*omap_sram_idle)(void) = NULL; -static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL; - -/* - * Let's power down on idle, but only if we are really - * idle, because once we start down the path of - * going idle we continue to do idle even if we get - * a clock tick interrupt . . - */ -void omap_pm_idle(void) -{ - unsigned int mask32 = 0; - - /* - * If the DSP is being used let's just idle the CPU, the overhead - * to wake up from Big Sleep is big, milliseconds versus micro - * seconds for wait for interrupt. - */ - - local_irq_disable(); - local_fiq_disable(); - if (need_resched()) { - local_fiq_enable(); - local_irq_enable(); - return; - } - mask32 = omap_readl(ARM_SYSST); - - /* - * Prevent the ULPD from entering low power state by setting - * POWER_CTRL_REG:4 = 0 - */ - omap_writew(omap_readw(ULPD_POWER_CTRL) & - ~ULPD_DEEP_SLEEP_TRANSITION_EN, ULPD_POWER_CTRL); - - /* - * Since an interrupt may set up a timer, we don't want to - * reprogram the hardware timer with interrupts enabled. - * Re-enable interrupts only after returning from idle. - */ - timer_dyn_reprogram(); - - if ((mask32 & DSP_IDLE) == 0) { - __asm__ volatile ("mcr p15, 0, r0, c7, c0, 4"); - } else - omap_sram_idle(); - - local_fiq_enable(); - local_irq_enable(); -} - -/* - * Configuration of the wakeup event is board specific. For the - * moment we put it into this helper function. Later it may move - * to board specific files. - */ -static void omap_pm_wakeup_setup(void) -{ - u32 level1_wake = 0; - u32 level2_wake = OMAP_IRQ_BIT(INT_UART2); - - /* - * Turn off all interrupts except GPIO bank 1, L1-2nd level cascade, - * and the L2 wakeup interrupts: keypad and UART2. Note that the - * drivers must still separately call omap_set_gpio_wakeup() to - * wake up to a GPIO interrupt. - */ - if (cpu_is_omap730()) - level1_wake = OMAP_IRQ_BIT(INT_730_GPIO_BANK1) | - OMAP_IRQ_BIT(INT_730_IH2_IRQ); - else if (cpu_is_omap1510()) - level1_wake = OMAP_IRQ_BIT(INT_GPIO_BANK1) | - OMAP_IRQ_BIT(INT_1510_IH2_IRQ); - else if (cpu_is_omap16xx()) - level1_wake = OMAP_IRQ_BIT(INT_GPIO_BANK1) | - OMAP_IRQ_BIT(INT_1610_IH2_IRQ); - - omap_writel(~level1_wake, OMAP_IH1_MIR); - - if (cpu_is_omap730()) { - omap_writel(~level2_wake, OMAP_IH2_0_MIR); - omap_writel(~(OMAP_IRQ_BIT(INT_730_WAKE_UP_REQ) | OMAP_IRQ_BIT(INT_730_MPUIO_KEYPAD)), OMAP_IH2_1_MIR); - } else if (cpu_is_omap1510()) { - level2_wake |= OMAP_IRQ_BIT(INT_KEYBOARD); - omap_writel(~level2_wake, OMAP_IH2_MIR); - } else if (cpu_is_omap16xx()) { - level2_wake |= OMAP_IRQ_BIT(INT_KEYBOARD); - omap_writel(~level2_wake, OMAP_IH2_0_MIR); - - /* INT_1610_WAKE_UP_REQ is needed for GPIO wakeup... */ - omap_writel(~OMAP_IRQ_BIT(INT_1610_WAKE_UP_REQ), OMAP_IH2_1_MIR); - omap_writel(~0x0, OMAP_IH2_2_MIR); - omap_writel(~0x0, OMAP_IH2_3_MIR); - } - - /* New IRQ agreement, recalculate in cascade order */ - omap_writel(1, OMAP_IH2_CONTROL); - omap_writel(1, OMAP_IH1_CONTROL); -} - -void omap_pm_suspend(void) -{ - unsigned long arg0 = 0, arg1 = 0; - - printk("PM: OMAP%x is trying to enter deep sleep...\n", system_rev); - - omap_serial_wake_trigger(1); - - if (machine_is_omap_osk()) { - /* Stop LED1 (D9) blink */ - tps65010_set_led(LED1, OFF); - } - - omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG); - - /* - * Step 1: turn off interrupts (FIXME: NOTE: already disabled) - */ - - local_irq_disable(); - local_fiq_disable(); - - /* - * Step 2: save registers - * - * The omap is a strange/beautiful device. The caches, memory - * and register state are preserved across power saves. - * We have to save and restore very little register state to - * idle the omap. - * - * Save interrupt, MPUI, ARM and UPLD control registers. - */ - - if (cpu_is_omap730()) { - MPUI730_SAVE(OMAP_IH1_MIR); - MPUI730_SAVE(OMAP_IH2_0_MIR); - MPUI730_SAVE(OMAP_IH2_1_MIR); - MPUI730_SAVE(MPUI_CTRL); - MPUI730_SAVE(MPUI_DSP_BOOT_CONFIG); - MPUI730_SAVE(MPUI_DSP_API_CONFIG); - MPUI730_SAVE(EMIFS_CONFIG); - MPUI730_SAVE(EMIFF_SDRAM_CONFIG); - - } else if (cpu_is_omap1510()) { - MPUI1510_SAVE(OMAP_IH1_MIR); - MPUI1510_SAVE(OMAP_IH2_MIR); - MPUI1510_SAVE(MPUI_CTRL); - MPUI1510_SAVE(MPUI_DSP_BOOT_CONFIG); - MPUI1510_SAVE(MPUI_DSP_API_CONFIG); - MPUI1510_SAVE(EMIFS_CONFIG); - MPUI1510_SAVE(EMIFF_SDRAM_CONFIG); - } else if (cpu_is_omap16xx()) { - MPUI1610_SAVE(OMAP_IH1_MIR); - MPUI1610_SAVE(OMAP_IH2_0_MIR); - MPUI1610_SAVE(OMAP_IH2_1_MIR); - MPUI1610_SAVE(OMAP_IH2_2_MIR); - MPUI1610_SAVE(OMAP_IH2_3_MIR); - MPUI1610_SAVE(MPUI_CTRL); - MPUI1610_SAVE(MPUI_DSP_BOOT_CONFIG); - MPUI1610_SAVE(MPUI_DSP_API_CONFIG); - MPUI1610_SAVE(EMIFS_CONFIG); - MPUI1610_SAVE(EMIFF_SDRAM_CONFIG); - } - - ARM_SAVE(ARM_CKCTL); - ARM_SAVE(ARM_IDLECT1); - ARM_SAVE(ARM_IDLECT2); - if (!(cpu_is_omap1510())) - ARM_SAVE(ARM_IDLECT3); - ARM_SAVE(ARM_EWUPCT); - ARM_SAVE(ARM_RSTCT1); - ARM_SAVE(ARM_RSTCT2); - ARM_SAVE(ARM_SYSST); - ULPD_SAVE(ULPD_CLOCK_CTRL); - ULPD_SAVE(ULPD_STATUS_REQ); - - /* (Step 3 removed - we now allow deep sleep by default) */ - - /* - * Step 4: OMAP DSP Shutdown - */ - - - /* - * Step 5: Wakeup Event Setup - */ - - omap_pm_wakeup_setup(); - - /* - * Step 6: ARM and Traffic controller shutdown - */ - - /* disable ARM watchdog */ - omap_writel(0x00F5, OMAP_WDT_TIMER_MODE); - omap_writel(0x00A0, OMAP_WDT_TIMER_MODE); - - /* - * Step 6b: ARM and Traffic controller shutdown - * - * Step 6 continues here. Prepare jump to power management - * assembly code in internal SRAM. - * - * Since the omap_cpu_suspend routine has been copied to - * SRAM, we'll do an indirect procedure call to it and pass the - * contents of arm_idlect1 and arm_idlect2 so it can restore - * them when it wakes up and it will return. - */ - - arg0 = arm_sleep_save[ARM_SLEEP_SAVE_ARM_IDLECT1]; - arg1 = arm_sleep_save[ARM_SLEEP_SAVE_ARM_IDLECT2]; - - /* - * Step 6c: ARM and Traffic controller shutdown - * - * Jump to assembly code. The processor will stay there - * until wake up. - */ - omap_sram_suspend(arg0, arg1); - - /* - * If we are here, processor is woken up! - */ - - /* - * Restore ARM state, except ARM_IDLECT1/2 which omap_cpu_suspend did - */ - - if (!(cpu_is_omap1510())) - ARM_RESTORE(ARM_IDLECT3); - ARM_RESTORE(ARM_CKCTL); - ARM_RESTORE(ARM_EWUPCT); - ARM_RESTORE(ARM_RSTCT1); - ARM_RESTORE(ARM_RSTCT2); - ARM_RESTORE(ARM_SYSST); - ULPD_RESTORE(ULPD_CLOCK_CTRL); - ULPD_RESTORE(ULPD_STATUS_REQ); - - if (cpu_is_omap730()) { - MPUI730_RESTORE(EMIFS_CONFIG); - MPUI730_RESTORE(EMIFF_SDRAM_CONFIG); - MPUI730_RESTORE(OMAP_IH1_MIR); - MPUI730_RESTORE(OMAP_IH2_0_MIR); - MPUI730_RESTORE(OMAP_IH2_1_MIR); - } else if (cpu_is_omap1510()) { - MPUI1510_RESTORE(MPUI_CTRL); - MPUI1510_RESTORE(MPUI_DSP_BOOT_CONFIG); - MPUI1510_RESTORE(MPUI_DSP_API_CONFIG); - MPUI1510_RESTORE(EMIFS_CONFIG); - MPUI1510_RESTORE(EMIFF_SDRAM_CONFIG); - MPUI1510_RESTORE(OMAP_IH1_MIR); - MPUI1510_RESTORE(OMAP_IH2_MIR); - } else if (cpu_is_omap16xx()) { - MPUI1610_RESTORE(MPUI_CTRL); - MPUI1610_RESTORE(MPUI_DSP_BOOT_CONFIG); - MPUI1610_RESTORE(MPUI_DSP_API_CONFIG); - MPUI1610_RESTORE(EMIFS_CONFIG); - MPUI1610_RESTORE(EMIFF_SDRAM_CONFIG); - - MPUI1610_RESTORE(OMAP_IH1_MIR); - MPUI1610_RESTORE(OMAP_IH2_0_MIR); - MPUI1610_RESTORE(OMAP_IH2_1_MIR); - MPUI1610_RESTORE(OMAP_IH2_2_MIR); - MPUI1610_RESTORE(OMAP_IH2_3_MIR); - } - - omap_writew(0, ULPD_SOFT_DISABLE_REQ_REG); - - /* - * Reenable interrupts - */ - - local_irq_enable(); - local_fiq_enable(); - - omap_serial_wake_trigger(0); - - printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev); - - if (machine_is_omap_osk()) { - /* Let LED1 (D9) blink again */ - tps65010_set_led(LED1, BLINK); - } -} - -#if defined(DEBUG) && defined(CONFIG_PROC_FS) -static int g_read_completed; - -/* - * Read system PM registers for debugging - */ -static int omap_pm_read_proc( - char *page_buffer, - char **my_first_byte, - off_t virtual_start, - int length, - int *eof, - void *data) -{ - int my_buffer_offset = 0; - char * const my_base = page_buffer; - - ARM_SAVE(ARM_CKCTL); - ARM_SAVE(ARM_IDLECT1); - ARM_SAVE(ARM_IDLECT2); - if (!(cpu_is_omap1510())) - ARM_SAVE(ARM_IDLECT3); - ARM_SAVE(ARM_EWUPCT); - ARM_SAVE(ARM_RSTCT1); - ARM_SAVE(ARM_RSTCT2); - ARM_SAVE(ARM_SYSST); - - ULPD_SAVE(ULPD_IT_STATUS); - ULPD_SAVE(ULPD_CLOCK_CTRL); - ULPD_SAVE(ULPD_SOFT_REQ); - ULPD_SAVE(ULPD_STATUS_REQ); - ULPD_SAVE(ULPD_DPLL_CTRL); - ULPD_SAVE(ULPD_POWER_CTRL); - - if (cpu_is_omap730()) { - MPUI730_SAVE(MPUI_CTRL); - MPUI730_SAVE(MPUI_DSP_STATUS); - MPUI730_SAVE(MPUI_DSP_BOOT_CONFIG); - MPUI730_SAVE(MPUI_DSP_API_CONFIG); - MPUI730_SAVE(EMIFF_SDRAM_CONFIG); - MPUI730_SAVE(EMIFS_CONFIG); - } else if (cpu_is_omap1510()) { - MPUI1510_SAVE(MPUI_CTRL); - MPUI1510_SAVE(MPUI_DSP_STATUS); - MPUI1510_SAVE(MPUI_DSP_BOOT_CONFIG); - MPUI1510_SAVE(MPUI_DSP_API_CONFIG); - MPUI1510_SAVE(EMIFF_SDRAM_CONFIG); - MPUI1510_SAVE(EMIFS_CONFIG); - } else if (cpu_is_omap16xx()) { - MPUI1610_SAVE(MPUI_CTRL); - MPUI1610_SAVE(MPUI_DSP_STATUS); - MPUI1610_SAVE(MPUI_DSP_BOOT_CONFIG); - MPUI1610_SAVE(MPUI_DSP_API_CONFIG); - MPUI1610_SAVE(EMIFF_SDRAM_CONFIG); - MPUI1610_SAVE(EMIFS_CONFIG); - } - - if (virtual_start == 0) { - g_read_completed = 0; - - my_buffer_offset += sprintf(my_base + my_buffer_offset, - "ARM_CKCTL_REG: 0x%-8x \n" - "ARM_IDLECT1_REG: 0x%-8x \n" - "ARM_IDLECT2_REG: 0x%-8x \n" - "ARM_IDLECT3_REG: 0x%-8x \n" - "ARM_EWUPCT_REG: 0x%-8x \n" - "ARM_RSTCT1_REG: 0x%-8x \n" - "ARM_RSTCT2_REG: 0x%-8x \n" - "ARM_SYSST_REG: 0x%-8x \n" - "ULPD_IT_STATUS_REG: 0x%-4x \n" - "ULPD_CLOCK_CTRL_REG: 0x%-4x \n" - "ULPD_SOFT_REQ_REG: 0x%-4x \n" - "ULPD_DPLL_CTRL_REG: 0x%-4x \n" - "ULPD_STATUS_REQ_REG: 0x%-4x \n" - "ULPD_POWER_CTRL_REG: 0x%-4x \n", - ARM_SHOW(ARM_CKCTL), - ARM_SHOW(ARM_IDLECT1), - ARM_SHOW(ARM_IDLECT2), - ARM_SHOW(ARM_IDLECT3), - ARM_SHOW(ARM_EWUPCT), - ARM_SHOW(ARM_RSTCT1), - ARM_SHOW(ARM_RSTCT2), - ARM_SHOW(ARM_SYSST), - ULPD_SHOW(ULPD_IT_STATUS), - ULPD_SHOW(ULPD_CLOCK_CTRL), - ULPD_SHOW(ULPD_SOFT_REQ), - ULPD_SHOW(ULPD_DPLL_CTRL), - ULPD_SHOW(ULPD_STATUS_REQ), - ULPD_SHOW(ULPD_POWER_CTRL)); - - if (cpu_is_omap730()) { - my_buffer_offset += sprintf(my_base + my_buffer_offset, - "MPUI730_CTRL_REG 0x%-8x \n" - "MPUI730_DSP_STATUS_REG: 0x%-8x \n" - "MPUI730_DSP_BOOT_CONFIG_REG: 0x%-8x \n" - "MPUI730_DSP_API_CONFIG_REG: 0x%-8x \n" - "MPUI730_SDRAM_CONFIG_REG: 0x%-8x \n" - "MPUI730_EMIFS_CONFIG_REG: 0x%-8x \n", - MPUI730_SHOW(MPUI_CTRL), - MPUI730_SHOW(MPUI_DSP_STATUS), - MPUI730_SHOW(MPUI_DSP_BOOT_CONFIG), - MPUI730_SHOW(MPUI_DSP_API_CONFIG), - MPUI730_SHOW(EMIFF_SDRAM_CONFIG), - MPUI730_SHOW(EMIFS_CONFIG)); - } else if (cpu_is_omap1510()) { - my_buffer_offset += sprintf(my_base + my_buffer_offset, - "MPUI1510_CTRL_REG 0x%-8x \n" - "MPUI1510_DSP_STATUS_REG: 0x%-8x \n" - "MPUI1510_DSP_BOOT_CONFIG_REG: 0x%-8x \n" - "MPUI1510_DSP_API_CONFIG_REG: 0x%-8x \n" - "MPUI1510_SDRAM_CONFIG_REG: 0x%-8x \n" - "MPUI1510_EMIFS_CONFIG_REG: 0x%-8x \n", - MPUI1510_SHOW(MPUI_CTRL), - MPUI1510_SHOW(MPUI_DSP_STATUS), - MPUI1510_SHOW(MPUI_DSP_BOOT_CONFIG), - MPUI1510_SHOW(MPUI_DSP_API_CONFIG), - MPUI1510_SHOW(EMIFF_SDRAM_CONFIG), - MPUI1510_SHOW(EMIFS_CONFIG)); - } else if (cpu_is_omap16xx()) { - my_buffer_offset += sprintf(my_base + my_buffer_offset, - "MPUI1610_CTRL_REG 0x%-8x \n" - "MPUI1610_DSP_STATUS_REG: 0x%-8x \n" - "MPUI1610_DSP_BOOT_CONFIG_REG: 0x%-8x \n" - "MPUI1610_DSP_API_CONFIG_REG: 0x%-8x \n" - "MPUI1610_SDRAM_CONFIG_REG: 0x%-8x \n" - "MPUI1610_EMIFS_CONFIG_REG: 0x%-8x \n", - MPUI1610_SHOW(MPUI_CTRL), - MPUI1610_SHOW(MPUI_DSP_STATUS), - MPUI1610_SHOW(MPUI_DSP_BOOT_CONFIG), - MPUI1610_SHOW(MPUI_DSP_API_CONFIG), - MPUI1610_SHOW(EMIFF_SDRAM_CONFIG), - MPUI1610_SHOW(EMIFS_CONFIG)); - } - - g_read_completed++; - } else if (g_read_completed >= 1) { - *eof = 1; - return 0; - } - g_read_completed++; - - *my_first_byte = page_buffer; - return my_buffer_offset; -} - -static void omap_pm_init_proc(void) -{ - struct proc_dir_entry *entry; - - entry = create_proc_read_entry("driver/omap_pm", - S_IWUSR | S_IRUGO, NULL, - omap_pm_read_proc, NULL); -} - -#endif /* DEBUG && CONFIG_PROC_FS */ - -/* - * omap_pm_prepare - Do preliminary suspend work. - * @state: suspend state we're entering. - * - */ -//#include - -static int omap_pm_prepare(suspend_state_t state) -{ - int error = 0; - - switch (state) - { - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - break; - - case PM_SUSPEND_DISK: - return -ENOTSUPP; - - default: - return -EINVAL; - } - - return error; -} - - -/* - * omap_pm_enter - Actually enter a sleep state. - * @state: State we're entering. - * - */ - -static int omap_pm_enter(suspend_state_t state) -{ - switch (state) - { - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - omap_pm_suspend(); - break; - - case PM_SUSPEND_DISK: - return -ENOTSUPP; - - default: - return -EINVAL; - } - - return 0; -} - - -/** - * omap_pm_finish - Finish up suspend sequence. - * @state: State we're coming out of. - * - * This is called after we wake back up (or if entering the sleep state - * failed). - */ - -static int omap_pm_finish(suspend_state_t state) -{ - return 0; -} - - -static irqreturn_t omap_wakeup_interrupt(int irq, void * dev, - struct pt_regs * regs) -{ - return IRQ_HANDLED; -} - -static struct irqaction omap_wakeup_irq = { - .name = "peripheral wakeup", - .flags = IRQF_DISABLED, - .handler = omap_wakeup_interrupt -}; - - - -static struct pm_ops omap_pm_ops ={ - .pm_disk_mode = 0, - .prepare = omap_pm_prepare, - .enter = omap_pm_enter, - .finish = omap_pm_finish, -}; - -static int __init omap_pm_init(void) -{ - printk("Power Management for TI OMAP.\n"); - /* - * We copy the assembler sleep/wakeup routines to SRAM. - * These routines need to be in SRAM as that's the only - * memory the MPU can see when it wakes up. - */ - if (cpu_is_omap730()) { - omap_sram_idle = omap_sram_push(omap730_idle_loop_suspend, - omap730_idle_loop_suspend_sz); - omap_sram_suspend = omap_sram_push(omap730_cpu_suspend, - omap730_cpu_suspend_sz); - } else if (cpu_is_omap1510()) { - omap_sram_idle = omap_sram_push(omap1510_idle_loop_suspend, - omap1510_idle_loop_suspend_sz); - omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend, - omap1510_cpu_suspend_sz); - } else if (cpu_is_omap16xx()) { - omap_sram_idle = omap_sram_push(omap1610_idle_loop_suspend, - omap1610_idle_loop_suspend_sz); - omap_sram_suspend = omap_sram_push(omap1610_cpu_suspend, - omap1610_cpu_suspend_sz); - } - - if (omap_sram_idle == NULL || omap_sram_suspend == NULL) { - printk(KERN_ERR "PM not initialized: Missing SRAM support\n"); - return -ENODEV; - } - - pm_idle = omap_pm_idle; - - if (cpu_is_omap730()) - setup_irq(INT_730_WAKE_UP_REQ, &omap_wakeup_irq); - else if (cpu_is_omap16xx()) - setup_irq(INT_1610_WAKE_UP_REQ, &omap_wakeup_irq); - -#if 0 - /* --- BEGIN BOARD-DEPENDENT CODE --- */ - /* Sleepx mask direction */ - omap_writew((omap_readw(0xfffb5008) & ~2), 0xfffb5008); - /* Unmask sleepx signal */ - omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004); - /* --- END BOARD-DEPENDENT CODE --- */ -#endif - - /* Program new power ramp-up time - * (0 for most boards since we don't lower voltage when in deep sleep) - */ - omap_writew(ULPD_SETUP_ANALOG_CELL_3_VAL, ULPD_SETUP_ANALOG_CELL_3); - - /* Setup ULPD POWER_CTRL_REG - enter deep sleep whenever possible */ - omap_writew(ULPD_POWER_CTRL_REG_VAL, ULPD_POWER_CTRL); - - /* Configure IDLECT3 */ - if (cpu_is_omap730()) - omap_writel(OMAP730_IDLECT3_VAL, OMAP730_IDLECT3); - else if (cpu_is_omap16xx()) - omap_writel(OMAP1610_IDLECT3_VAL, OMAP1610_IDLECT3); - - pm_set_ops(&omap_pm_ops); - -#if defined(DEBUG) && defined(CONFIG_PROC_FS) - omap_pm_init_proc(); -#endif - - if (cpu_is_omap16xx()) { - /* configure LOW_PWR pin */ - omap_cfg_reg(T20_1610_LOW_PWR); - } - - return 0; -} -__initcall(omap_pm_init); - diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index e757183..19014b2 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -174,10 +174,7 @@ void __init omap_map_sram(void) if (cpu_is_omap24xx()) { omap_sram_io_desc[0].virtual = OMAP2_SRAM_VA; - if (is_sram_locked()) - base = OMAP2_SRAM_PUB_PA; - else - base = OMAP2_SRAM_PA; + base = OMAP2_SRAM_PA; base = ROUND_DOWN(base, PAGE_SIZE); omap_sram_io_desc[0].pfn = __phys_to_pfn(base); } diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c index 281ecc7..cf6df33 100644 --- a/arch/arm/plat-omap/timer32k.c +++ b/arch/arm/plat-omap/timer32k.c @@ -105,6 +105,8 @@ static inline unsigned long omap_32k_tim static inline void omap_32k_timer_start(unsigned long load_val) { + if (!load_val) + load_val = 1; omap_32k_timer_write(load_val, OMAP1_32K_TIMER_TVR); omap_32k_timer_write(0x0f, OMAP1_32K_TIMER_CR); } @@ -192,14 +194,11 @@ unsigned long long sched_clock(void) * issues with dynamic tick. In the dynamic tick case, we need to lock * with irqsave. */ -static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id, + struct pt_regs *regs) { - unsigned long flags; unsigned long now; - write_seqlock_irqsave(&xtime_lock, flags); - omap_32k_timer_ack_irq(); now = omap_32k_sync_timer_read(); @@ -215,6 +214,23 @@ static irqreturn_t omap_32k_timer_interr * continuous timer can be overridden from pm_idle to be longer. */ omap_32k_timer_start(omap_32k_last_tick + OMAP_32K_TICKS_PER_HZ - now); + + return IRQ_HANDLED; +} + +static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id, + struct pt_regs *regs) +{ + return _omap_32k_timer_interrupt(irq, dev_id, regs); +} + +static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id, + struct pt_regs *regs) +{ + unsigned long flags; + + write_seqlock_irqsave(&xtime_lock, flags); + _omap_32k_timer_interrupt(irq, dev_id, regs); write_sequnlock_irqrestore(&xtime_lock, flags); return IRQ_HANDLED; @@ -230,7 +246,15 @@ #ifdef CONFIG_NO_IDLE_HZ */ void omap_32k_timer_reprogram(unsigned long next_tick) { - omap_32k_timer_start(JIFFIES_TO_HW_TICKS(next_tick, 32768) + 1); + unsigned long ticks = JIFFIES_TO_HW_TICKS(next_tick, 32768) + 1; + unsigned long now = omap_32k_sync_timer_read(); + unsigned long idled = now - omap_32k_last_tick; + + if (idled + 1 < ticks) + ticks -= idled; + else + ticks = 1; + omap_32k_timer_start(ticks); } static struct irqaction omap_32k_timer_irq; @@ -252,7 +276,7 @@ static struct dyn_tick_timer omap_dyn_ti .enable = omap_32k_timer_enable_dyn_tick, .disable = omap_32k_timer_disable_dyn_tick, .reprogram = omap_32k_timer_reprogram, - .handler = omap_32k_timer_interrupt, + .handler = omap_32k_timer_handler, }; #endif /* CONFIG_NO_IDLE_HZ */ diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c index 9b81532..7e80968 100644 --- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c @@ -26,7 +26,7 @@ #include #include #include #include -#include +#include #include #include diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index e1372a2..b02af1d 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types @@ -12,7 +12,7 @@ # or visit: # # http://www.arm.linux.org.uk/developer/machines/?action=new # -# Last update: Mon Jun 26 22:26:08 2006 +# Last update: Sat Sep 23 13:20:43 2006 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -329,7 +329,7 @@ nimbra29x ARCH_NIMBRA29X NIMBRA29X 31 nimbra210 ARCH_NIMBRA210 NIMBRA210 312 hhp_d95xx ARCH_HHP_D95XX HHP_D95XX 313 labarm ARCH_LABARM LABARM 314 -comcerto ARCH_M825XX M825XX 315 +m825xx ARCH_M825XX M825XX 315 m7100 SA1100_M7100 M7100 316 nipc2 ARCH_NIPC2 NIPC2 317 fu7202 ARCH_FU7202 FU7202 318 @@ -857,12 +857,12 @@ osiris MACH_OSIRIS OSIRIS 842 maestro MACH_MAESTRO MAESTRO 843 tunge2 MACH_TUNGE2 TUNGE2 844 ixbbm MACH_IXBBM IXBBM 845 -mx27ads MACH_MX27 MX27 846 +mx27ads MACH_MX27ADS MX27ADS 846 ax8004 MACH_AX8004 AX8004 847 at91sam9261ek MACH_AT91SAM9261EK AT91SAM9261EK 848 loft MACH_LOFT LOFT 849 magpie MACH_MAGPIE MAGPIE 850 -mx21ads MACH_MX21 MX21 851 +mx21ads MACH_MX21ADS MX21ADS 851 mb87m3400 MACH_MB87M3400 MB87M3400 852 mguard_delta MACH_MGUARD_DELTA MGUARD_DELTA 853 davinci_dvdp MACH_DAVINCI_DVDP DAVINCI_DVDP 854 @@ -1058,7 +1058,7 @@ akai9307 MACH_AKAI9307 AKAI9307 1044 fontaine MACH_FONTAINE FONTAINE 1045 wombat MACH_WOMBAT WOMBAT 1046 acq300 MACH_ACQ300 ACQ300 1047 -mod_270 MACH_MOD_270 MOD_270 1048 +mod272 MACH_MOD_270 MOD_270 1048 vmc_vc0820 MACH_VC0820 VC0820 1049 ani_aim MACH_ANI_AIM ANI_AIM 1050 jellyfish MACH_JELLYFISH JELLYFISH 1051 @@ -1093,3 +1093,67 @@ msm6100 MACH_MSM6100 MSM6100 1079 eti_b1 MACH_ETI_B1 ETI_B1 1080 za9l_series MACH_ZILOG_ZA9L ZILOG_ZA9L 1081 bit2440 MACH_BIT2440 BIT2440 1082 +nbi MACH_NBI NBI 1083 +smdk2443 MACH_SMDK2443 SMDK2443 1084 +vdavinci MACH_VDAVINCI VDAVINCI 1085 +atc6 MACH_ATC6 ATC6 1086 +multmdw MACH_MULTMDW MULTMDW 1087 +mba2440 MACH_MBA2440 MBA2440 1088 +ecsd MACH_ECSD ECSD 1089 +zire31 MACH_ZIRE31 ZIRE31 1090 +fsg MACH_FSG FSG 1091 +razor101 MACH_RAZOR101 RAZOR101 1092 +opera_tdm MACH_OPERA_TDM OPERA_TDM 1093 +comcerto MACH_COMCERTO COMCERTO 1094 +tb0319 MACH_TB0319 TB0319 1095 +kws8000 MACH_KWS8000 KWS8000 1096 +b2 MACH_B2 B2 1097 +lcl54 MACH_LCL54 LCL54 1098 +at91sam9260ek MACH_AT91SAM9260EK AT91SAM9260EK 1099 +glantank MACH_GLANTANK GLANTANK 1100 +n2100 MACH_N2100 N2100 1101 +n4100 MACH_N4100 N4100 1102 +rsc4 MACH_VERTICAL_RSC4 VERTICAL_RSC4 1103 +sg8100 MACH_SG8100 SG8100 1104 +im42xx MACH_IM42XX IM42XX 1105 +ftxx MACH_FTXX FTXX 1106 +lwfusion MACH_LWFUSION LWFUSION 1107 +qt2410 MACH_QT2410 QT2410 1108 +kixrp435 MACH_KIXRP435 KIXRP435 1109 +ccw9c MACH_CCW9C CCW9C 1110 +dabhs MACH_DABHS DABHS 1111 +gzmx MACH_GZMX GZMX 1112 +ipnw100ap MACH_IPNW100AP IPNW100AP 1113 +cc9p9360dev MACH_CC9P9360DEV CC9P9360DEV 1114 +cc9p9750dev MACH_CC9P9750DEV CC9P9750DEV 1115 +cc9p9360val MACH_CC9P9360VAL CC9P9360VAL 1116 +cc9p9750val MACH_CC9P9750VAL CC9P9750VAL 1117 +nx70v MACH_NX70V NX70V 1118 +at91rm9200df MACH_AT91RM9200DF AT91RM9200DF 1119 +se_pilot2 MACH_SE_PILOT2 SE_PILOT2 1120 +mtcn_t800 MACH_MTCN_T800 MTCN_T800 1121 +vcmx212 MACH_VCMX212 VCMX212 1122 +lynx MACH_LYNX LYNX 1123 +at91sam9260id MACH_AT91SAM9260ID AT91SAM9260ID 1124 +hw86052 MACH_HW86052 HW86052 1125 +pilz_pmi3 MACH_PILZ_PMI3 PILZ_PMI3 1126 +edb9302a MACH_EDB9302A EDB9302A 1127 +edb9307a MACH_EDB9307A EDB9307A 1128 +ct_dfs MACH_CT_DFS CT_DFS 1129 +pilz_pmi4 MACH_PILZ_PMI4 PILZ_PMI4 1130 +xceednp_ixp MACH_XCEEDNP_IXP XCEEDNP_IXP 1131 +smdk2442b MACH_SMDK2442B SMDK2442B 1132 +xnode MACH_XNODE XNODE 1133 +aidx270 MACH_AIDX270 AIDX270 1134 +rema MACH_REMA REMA 1135 +bps1000 MACH_BPS1000 BPS1000 1136 +hw90350 MACH_HW90350 HW90350 1137 +omap_sdp3430 MACH_OMAP_SDP3430 OMAP_SDP3430 1138 +bluetouch MACH_BLUETOUCH BLUETOUCH 1139 +vstms MACH_VSTMS VSTMS 1140 +xsbase270 MACH_XSBASE270 XSBASE270 1141 +at91sam9260ek_cn MACH_AT91SAM9260EK_CN AT91SAM9260EK_CN 1142 +adsturboxb MACH_ADSTURBOXB ADSTURBOXB 1143 +oti4110 MACH_OTI4110 OTI4110 1144 +hme_pxa MACH_HME_PXA HME_PXA 1145 +deisterdca MACH_DEISTERDCA DEISTERDCA 1146 diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h index 96fdf30..f279789 100644 --- a/arch/arm/vfp/vfp.h +++ b/arch/arm/vfp/vfp.h @@ -355,3 +355,18 @@ #define VFP_NAN_FLAG 0x100 * we check for an error. */ #define VFP_EXCEPTION_ERROR ((u32)-1 & ~VFP_NAN_FLAG) + +/* + * A flag to tell vfp instruction type. + * OP_SCALAR - this operation always operates in scalar mode + * OP_SD - the instruction exceptionally writes to a single precision result. + * OP_DD - the instruction exceptionally writes to a double precision result. + */ +#define OP_SCALAR (1 << 0) +#define OP_SD (1 << 1) +#define OP_DD (1 << 1) + +struct op { + u32 (* const fn)(int dd, int dn, int dm, u32 fpscr); + u32 flags; +}; diff --git a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c index add48e3..4fc05ee 100644 --- a/arch/arm/vfp/vfpdouble.c +++ b/arch/arm/vfp/vfpdouble.c @@ -659,22 +659,22 @@ static u32 vfp_double_ftosiz(int dd, int } -static u32 (* const fop_extfns[32])(int dd, int unused, int dm, u32 fpscr) = { - [FEXT_TO_IDX(FEXT_FCPY)] = vfp_double_fcpy, - [FEXT_TO_IDX(FEXT_FABS)] = vfp_double_fabs, - [FEXT_TO_IDX(FEXT_FNEG)] = vfp_double_fneg, - [FEXT_TO_IDX(FEXT_FSQRT)] = vfp_double_fsqrt, - [FEXT_TO_IDX(FEXT_FCMP)] = vfp_double_fcmp, - [FEXT_TO_IDX(FEXT_FCMPE)] = vfp_double_fcmpe, - [FEXT_TO_IDX(FEXT_FCMPZ)] = vfp_double_fcmpz, - [FEXT_TO_IDX(FEXT_FCMPEZ)] = vfp_double_fcmpez, - [FEXT_TO_IDX(FEXT_FCVT)] = vfp_double_fcvts, - [FEXT_TO_IDX(FEXT_FUITO)] = vfp_double_fuito, - [FEXT_TO_IDX(FEXT_FSITO)] = vfp_double_fsito, - [FEXT_TO_IDX(FEXT_FTOUI)] = vfp_double_ftoui, - [FEXT_TO_IDX(FEXT_FTOUIZ)] = vfp_double_ftouiz, - [FEXT_TO_IDX(FEXT_FTOSI)] = vfp_double_ftosi, - [FEXT_TO_IDX(FEXT_FTOSIZ)] = vfp_double_ftosiz, +static struct op fops_ext[32] = { + [FEXT_TO_IDX(FEXT_FCPY)] = { vfp_double_fcpy, 0 }, + [FEXT_TO_IDX(FEXT_FABS)] = { vfp_double_fabs, 0 }, + [FEXT_TO_IDX(FEXT_FNEG)] = { vfp_double_fneg, 0 }, + [FEXT_TO_IDX(FEXT_FSQRT)] = { vfp_double_fsqrt, 0 }, + [FEXT_TO_IDX(FEXT_FCMP)] = { vfp_double_fcmp, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FCMPE)] = { vfp_double_fcmpe, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FCMPZ)] = { vfp_double_fcmpz, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FCMPEZ)] = { vfp_double_fcmpez, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FCVT)] = { vfp_double_fcvts, OP_SCALAR|OP_SD }, + [FEXT_TO_IDX(FEXT_FUITO)] = { vfp_double_fuito, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FSITO)] = { vfp_double_fsito, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FTOUI)] = { vfp_double_ftoui, OP_SCALAR|OP_SD }, + [FEXT_TO_IDX(FEXT_FTOUIZ)] = { vfp_double_ftouiz, OP_SCALAR|OP_SD }, + [FEXT_TO_IDX(FEXT_FTOSI)] = { vfp_double_ftosi, OP_SCALAR|OP_SD }, + [FEXT_TO_IDX(FEXT_FTOSIZ)] = { vfp_double_ftosiz, OP_SCALAR|OP_SD }, }; @@ -1108,16 +1108,16 @@ static u32 vfp_double_fdiv(int dd, int d return FPSCR_IOC; } -static u32 (* const fop_fns[16])(int dd, int dn, int dm, u32 fpscr) = { - [FOP_TO_IDX(FOP_FMAC)] = vfp_double_fmac, - [FOP_TO_IDX(FOP_FNMAC)] = vfp_double_fnmac, - [FOP_TO_IDX(FOP_FMSC)] = vfp_double_fmsc, - [FOP_TO_IDX(FOP_FNMSC)] = vfp_double_fnmsc, - [FOP_TO_IDX(FOP_FMUL)] = vfp_double_fmul, - [FOP_TO_IDX(FOP_FNMUL)] = vfp_double_fnmul, - [FOP_TO_IDX(FOP_FADD)] = vfp_double_fadd, - [FOP_TO_IDX(FOP_FSUB)] = vfp_double_fsub, - [FOP_TO_IDX(FOP_FDIV)] = vfp_double_fdiv, +static struct op fops[16] = { + [FOP_TO_IDX(FOP_FMAC)] = { vfp_double_fmac, 0 }, + [FOP_TO_IDX(FOP_FNMAC)] = { vfp_double_fnmac, 0 }, + [FOP_TO_IDX(FOP_FMSC)] = { vfp_double_fmsc, 0 }, + [FOP_TO_IDX(FOP_FNMSC)] = { vfp_double_fnmsc, 0 }, + [FOP_TO_IDX(FOP_FMUL)] = { vfp_double_fmul, 0 }, + [FOP_TO_IDX(FOP_FNMUL)] = { vfp_double_fnmul, 0 }, + [FOP_TO_IDX(FOP_FADD)] = { vfp_double_fadd, 0 }, + [FOP_TO_IDX(FOP_FSUB)] = { vfp_double_fsub, 0 }, + [FOP_TO_IDX(FOP_FDIV)] = { vfp_double_fdiv, 0 }, }; #define FREG_BANK(x) ((x) & 0x0c) @@ -1131,69 +1131,60 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) unsigned int dn = vfp_get_dn(inst); unsigned int dm = vfp_get_dm(inst); unsigned int vecitr, veclen, vecstride; - u32 (*fop)(int, int, s32, u32); + struct op *fop; - veclen = fpscr & FPSCR_LENGTH_MASK; vecstride = (1 + ((fpscr & FPSCR_STRIDE_MASK) == FPSCR_STRIDE_MASK)) * 2; + fop = (op == FOP_EXT) ? &fops_ext[FEXT_TO_IDX(inst)] : &fops[FOP_TO_IDX(op)]; + /* * fcvtds takes an sN register number as destination, not dN. * It also always operates on scalars. */ - if ((inst & FEXT_MASK) == FEXT_FCVT) { - veclen = 0; + if (fop->flags & OP_SD) dest = vfp_get_sd(inst); - } else + else dest = vfp_get_dd(inst); /* * If destination bank is zero, vector length is always '1'. * ARM DDI0100F C5.1.3, C5.3.2. */ - if (FREG_BANK(dest) == 0) + if ((fop->flags & OP_SCALAR) || (FREG_BANK(dest) == 0)) veclen = 0; + else + veclen = fpscr & FPSCR_LENGTH_MASK; pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride, (veclen >> FPSCR_LENGTH_BIT) + 1); - fop = (op == FOP_EXT) ? fop_extfns[FEXT_TO_IDX(inst)] : fop_fns[FOP_TO_IDX(op)]; - if (!fop) + if (!fop->fn) goto invalid; for (vecitr = 0; vecitr <= veclen; vecitr += 1 << FPSCR_LENGTH_BIT) { u32 except; + char type; - if (op == FOP_EXT && (inst & FEXT_MASK) == FEXT_FCVT) - pr_debug("VFP: itr%d (s%u) = op[%u] (d%u)\n", - vecitr >> FPSCR_LENGTH_BIT, - dest, dn, dm); - else if (op == FOP_EXT) - pr_debug("VFP: itr%d (d%u) = op[%u] (d%u)\n", + type = fop->flags & OP_SD ? 's' : 'd'; + if (op == FOP_EXT) + pr_debug("VFP: itr%d (%c%u) = op[%u] (d%u)\n", vecitr >> FPSCR_LENGTH_BIT, - dest, dn, dm); + type, dest, dn, dm); else - pr_debug("VFP: itr%d (d%u) = (d%u) op[%u] (d%u)\n", + pr_debug("VFP: itr%d (%c%u) = (d%u) op[%u] (d%u)\n", vecitr >> FPSCR_LENGTH_BIT, - dest, dn, FOP_TO_IDX(op), dm); + type, dest, dn, FOP_TO_IDX(op), dm); - except = fop(dest, dn, dm, fpscr); + except = fop->fn(dest, dn, dm, fpscr); pr_debug("VFP: itr%d: exceptions=%08x\n", vecitr >> FPSCR_LENGTH_BIT, except); exceptions |= except; /* - * This ensures that comparisons only operate on scalars; - * comparisons always return with one FPSCR status bit set. - */ - if (except & (FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V)) - break; - - /* * CHECK: It appears to be undefined whether we stop when * we encounter an exception. We continue. */ - dest = FREG_BANK(dest) + ((FREG_IDX(dest) + vecstride) & 6); dn = FREG_BANK(dn) + ((FREG_IDX(dn) + vecstride) & 6); if (FREG_BANK(dm) != 0) diff --git a/arch/arm/vfp/vfpinstr.h b/arch/arm/vfp/vfpinstr.h index 6c819ae..7f343a4 100644 --- a/arch/arm/vfp/vfpinstr.h +++ b/arch/arm/vfp/vfpinstr.h @@ -73,14 +73,14 @@ #define vfpreg(_vfp_) #_vfp_ #define fmrx(_vfp_) ({ \ u32 __v; \ - asm("mrc%? p10, 7, %0, " vfpreg(_vfp_) ", cr0, 0 @ fmrx %0, " #_vfp_ \ - : "=r" (__v)); \ + asm("mrc p10, 7, %0, " vfpreg(_vfp_) ", cr0, 0 @ fmrx %0, " #_vfp_ \ + : "=r" (__v) : : "cc"); \ __v; \ }) #define fmxr(_vfp_,_var_) \ - asm("mcr%? p10, 7, %0, " vfpreg(_vfp_) ", cr0, 0 @ fmxr " #_vfp_ ", %0" \ - : : "r" (_var_)) + asm("mcr p10, 7, %0, " vfpreg(_vfp_) ", cr0, 0 @ fmxr " #_vfp_ ", %0" \ + : : "r" (_var_) : "cc") u32 vfp_single_cpdo(u32 inst, u32 fpscr); u32 vfp_single_cprt(u32 inst, u32 fpscr, struct pt_regs *regs); diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 4178f6c..dedbb44 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -40,10 +40,19 @@ unsigned int VFP_arch; static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) { struct thread_info *thread = v; - union vfp_state *vfp = &thread->vfpstate; + union vfp_state *vfp; - switch (cmd) { - case THREAD_NOTIFY_FLUSH: + if (likely(cmd == THREAD_NOTIFY_SWITCH)) { + /* + * Always disable VFP so we can lazily save/restore the + * old state. + */ + fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_ENABLE); + return NOTIFY_DONE; + } + + vfp = &thread->vfpstate; + if (cmd == THREAD_NOTIFY_FLUSH) { /* * Per-thread VFP initialisation. */ @@ -56,29 +65,12 @@ static int vfp_notifier(struct notifier_ * Disable VFP to ensure we initialise it first. */ fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_ENABLE); - - /* - * FALLTHROUGH: Ensure we don't try to overwrite our newly - * initialised state information on the first fault. - */ - - case THREAD_NOTIFY_RELEASE: - /* - * Per-thread VFP cleanup. - */ - if (last_VFP_context == vfp) - last_VFP_context = NULL; - break; - - case THREAD_NOTIFY_SWITCH: - /* - * Always disable VFP so we can lazily save/restore the - * old state. - */ - fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_ENABLE); - break; } + /* flush and release case: Per-thread VFP cleanup. */ + if (last_VFP_context == vfp) + last_VFP_context = NULL; + return NOTIFY_DONE; } diff --git a/arch/arm/vfp/vfpsingle.c b/arch/arm/vfp/vfpsingle.c index 8f6c179..ab5e950 100644 --- a/arch/arm/vfp/vfpsingle.c +++ b/arch/arm/vfp/vfpsingle.c @@ -702,22 +702,22 @@ static u32 vfp_single_ftosiz(int sd, int return vfp_single_ftosi(sd, unused, m, FPSCR_ROUND_TOZERO); } -static u32 (* const fop_extfns[32])(int sd, int unused, s32 m, u32 fpscr) = { - [FEXT_TO_IDX(FEXT_FCPY)] = vfp_single_fcpy, - [FEXT_TO_IDX(FEXT_FABS)] = vfp_single_fabs, - [FEXT_TO_IDX(FEXT_FNEG)] = vfp_single_fneg, - [FEXT_TO_IDX(FEXT_FSQRT)] = vfp_single_fsqrt, - [FEXT_TO_IDX(FEXT_FCMP)] = vfp_single_fcmp, - [FEXT_TO_IDX(FEXT_FCMPE)] = vfp_single_fcmpe, - [FEXT_TO_IDX(FEXT_FCMPZ)] = vfp_single_fcmpz, - [FEXT_TO_IDX(FEXT_FCMPEZ)] = vfp_single_fcmpez, - [FEXT_TO_IDX(FEXT_FCVT)] = vfp_single_fcvtd, - [FEXT_TO_IDX(FEXT_FUITO)] = vfp_single_fuito, - [FEXT_TO_IDX(FEXT_FSITO)] = vfp_single_fsito, - [FEXT_TO_IDX(FEXT_FTOUI)] = vfp_single_ftoui, - [FEXT_TO_IDX(FEXT_FTOUIZ)] = vfp_single_ftouiz, - [FEXT_TO_IDX(FEXT_FTOSI)] = vfp_single_ftosi, - [FEXT_TO_IDX(FEXT_FTOSIZ)] = vfp_single_ftosiz, +static struct op fops_ext[32] = { + [FEXT_TO_IDX(FEXT_FCPY)] = { vfp_single_fcpy, 0 }, + [FEXT_TO_IDX(FEXT_FABS)] = { vfp_single_fabs, 0 }, + [FEXT_TO_IDX(FEXT_FNEG)] = { vfp_single_fneg, 0 }, + [FEXT_TO_IDX(FEXT_FSQRT)] = { vfp_single_fsqrt, 0 }, + [FEXT_TO_IDX(FEXT_FCMP)] = { vfp_single_fcmp, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FCMPE)] = { vfp_single_fcmpe, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FCMPZ)] = { vfp_single_fcmpz, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FCMPEZ)] = { vfp_single_fcmpez, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FCVT)] = { vfp_single_fcvtd, OP_SCALAR|OP_DD }, + [FEXT_TO_IDX(FEXT_FUITO)] = { vfp_single_fuito, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FSITO)] = { vfp_single_fsito, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FTOUI)] = { vfp_single_ftoui, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FTOUIZ)] = { vfp_single_ftouiz, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FTOSI)] = { vfp_single_ftosi, OP_SCALAR }, + [FEXT_TO_IDX(FEXT_FTOSIZ)] = { vfp_single_ftosiz, OP_SCALAR }, }; @@ -1151,16 +1151,16 @@ static u32 vfp_single_fdiv(int sd, int s return FPSCR_IOC; } -static u32 (* const fop_fns[16])(int sd, int sn, s32 m, u32 fpscr) = { - [FOP_TO_IDX(FOP_FMAC)] = vfp_single_fmac, - [FOP_TO_IDX(FOP_FNMAC)] = vfp_single_fnmac, - [FOP_TO_IDX(FOP_FMSC)] = vfp_single_fmsc, - [FOP_TO_IDX(FOP_FNMSC)] = vfp_single_fnmsc, - [FOP_TO_IDX(FOP_FMUL)] = vfp_single_fmul, - [FOP_TO_IDX(FOP_FNMUL)] = vfp_single_fnmul, - [FOP_TO_IDX(FOP_FADD)] = vfp_single_fadd, - [FOP_TO_IDX(FOP_FSUB)] = vfp_single_fsub, - [FOP_TO_IDX(FOP_FDIV)] = vfp_single_fdiv, +static struct op fops[16] = { + [FOP_TO_IDX(FOP_FMAC)] = { vfp_single_fmac, 0 }, + [FOP_TO_IDX(FOP_FNMAC)] = { vfp_single_fnmac, 0 }, + [FOP_TO_IDX(FOP_FMSC)] = { vfp_single_fmsc, 0 }, + [FOP_TO_IDX(FOP_FNMSC)] = { vfp_single_fnmsc, 0 }, + [FOP_TO_IDX(FOP_FMUL)] = { vfp_single_fmul, 0 }, + [FOP_TO_IDX(FOP_FNMUL)] = { vfp_single_fnmul, 0 }, + [FOP_TO_IDX(FOP_FADD)] = { vfp_single_fadd, 0 }, + [FOP_TO_IDX(FOP_FSUB)] = { vfp_single_fsub, 0 }, + [FOP_TO_IDX(FOP_FDIV)] = { vfp_single_fdiv, 0 }, }; #define FREG_BANK(x) ((x) & 0x18) @@ -1174,70 +1174,63 @@ u32 vfp_single_cpdo(u32 inst, u32 fpscr) unsigned int sn = vfp_get_sn(inst); unsigned int sm = vfp_get_sm(inst); unsigned int vecitr, veclen, vecstride; - u32 (*fop)(int, int, s32, u32); + struct op *fop; - veclen = fpscr & FPSCR_LENGTH_MASK; vecstride = 1 + ((fpscr & FPSCR_STRIDE_MASK) == FPSCR_STRIDE_MASK); + fop = (op == FOP_EXT) ? &fops_ext[FEXT_TO_IDX(inst)] : &fops[FOP_TO_IDX(op)]; + /* * fcvtsd takes a dN register number as destination, not sN. * Technically, if bit 0 of dd is set, this is an invalid * instruction. However, we ignore this for efficiency. * It also only operates on scalars. */ - if ((inst & FEXT_MASK) == FEXT_FCVT) { - veclen = 0; + if (fop->flags & OP_DD) dest = vfp_get_dd(inst); - } else + else dest = vfp_get_sd(inst); /* * If destination bank is zero, vector length is always '1'. * ARM DDI0100F C5.1.3, C5.3.2. */ - if (FREG_BANK(dest) == 0) + if ((fop->flags & OP_SCALAR) || FREG_BANK(dest) == 0) veclen = 0; + else + veclen = fpscr & FPSCR_LENGTH_MASK; pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride, (veclen >> FPSCR_LENGTH_BIT) + 1); - fop = (op == FOP_EXT) ? fop_extfns[FEXT_TO_IDX(inst)] : fop_fns[FOP_TO_IDX(op)]; - if (!fop) + if (!fop->fn) goto invalid; for (vecitr = 0; vecitr <= veclen; vecitr += 1 << FPSCR_LENGTH_BIT) { s32 m = vfp_get_float(sm); u32 except; + char type; - if (op == FOP_EXT && (inst & FEXT_MASK) == FEXT_FCVT) - pr_debug("VFP: itr%d (d%u) = op[%u] (s%u=%08x)\n", - vecitr >> FPSCR_LENGTH_BIT, dest, sn, sm, m); - else if (op == FOP_EXT) - pr_debug("VFP: itr%d (s%u) = op[%u] (s%u=%08x)\n", - vecitr >> FPSCR_LENGTH_BIT, dest, sn, sm, m); + type = fop->flags & OP_DD ? 'd' : 's'; + if (op == FOP_EXT) + pr_debug("VFP: itr%d (%c%u) = op[%u] (s%u=%08x)\n", + vecitr >> FPSCR_LENGTH_BIT, type, dest, sn, + sm, m); else - pr_debug("VFP: itr%d (s%u) = (s%u) op[%u] (s%u=%08x)\n", - vecitr >> FPSCR_LENGTH_BIT, dest, sn, + pr_debug("VFP: itr%d (%c%u) = (s%u) op[%u] (s%u=%08x)\n", + vecitr >> FPSCR_LENGTH_BIT, type, dest, sn, FOP_TO_IDX(op), sm, m); - except = fop(dest, sn, m, fpscr); + except = fop->fn(dest, sn, m, fpscr); pr_debug("VFP: itr%d: exceptions=%08x\n", vecitr >> FPSCR_LENGTH_BIT, except); exceptions |= except; /* - * This ensures that comparisons only operate on scalars; - * comparisons always return with one FPSCR status bit set. - */ - if (except & (FPSCR_N|FPSCR_Z|FPSCR_C|FPSCR_V)) - break; - - /* * CHECK: It appears to be undefined whether we stop when * we encounter an exception. We continue. */ - dest = FREG_BANK(dest) + ((FREG_IDX(dest) + vecstride) & 7); sn = FREG_BANK(sn) + ((FREG_IDX(sn) + vecstride) & 7); if (FREG_BANK(sm) != 0) diff --git a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c index e7eb070..466ddb5 100644 --- a/arch/arm26/kernel/setup.c +++ b/arch/arm26/kernel/setup.c @@ -143,7 +143,7 @@ static void __init setup_processor(void) dump_cpu_info(); - sprintf(system_utsname.machine, "%s", list->arch_name); + sprintf(init_utsname()->machine, "%s", list->arch_name); sprintf(elf_platform, "%s", list->elf_name); elf_hwcap = list->elf_hwcap; diff --git a/arch/arm26/kernel/sys_arm.c b/arch/arm26/kernel/sys_arm.c index 8545789..dc05aba 100644 --- a/arch/arm26/kernel/sys_arm.c +++ b/arch/arm26/kernel/sys_arm.c @@ -283,7 +283,7 @@ out: } /* FIXME - see if this is correct for arm26 */ -long execve(const char *filename, char **argv, char **envp) +int kernel_execve(const char *filename, char *const argv[], char *const envp[]) { struct pt_regs regs; int ret; @@ -320,4 +320,4 @@ long execve(const char *filename, char * return ret; } -EXPORT_SYMBOL(execve); +EXPORT_SYMBOL(kernel_execve); diff --git a/arch/arm26/kernel/time.c b/arch/arm26/kernel/time.c index db63d75..1206469 100644 --- a/arch/arm26/kernel/time.c +++ b/arch/arm26/kernel/time.c @@ -33,8 +33,6 @@ #include #include #include -extern unsigned long wall_jiffies; - /* this needs a better home */ DEFINE_SPINLOCK(rtc_lock); @@ -136,16 +134,11 @@ void do_gettimeofday(struct timeval *tv) { unsigned long flags; unsigned long seq; - unsigned long usec, sec, lost; + unsigned long usec, sec; do { seq = read_seqbegin_irqsave(&xtime_lock, flags); usec = gettimeoffset(); - - lost = jiffies - wall_jiffies; - if (lost) - usec += lost * USECS_PER_JIFFY; - sec = xtime.tv_sec; usec += xtime.tv_nsec / 1000; } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); @@ -174,8 +167,7 @@ int do_settimeofday(struct timespec *tv) * wall time. Discover what correction gettimeofday() would have * done, and then undo it! */ - tv->tv_nsec -= 1000 * (gettimeoffset() + - (jiffies - wall_jiffies) * USECS_PER_JIFFY); + tv->tv_nsec -= 1000 * gettimeoffset(); while (tv->tv_nsec < 0) { tv->tv_nsec += NSEC_PER_SEC; @@ -194,7 +186,7 @@ EXPORT_SYMBOL(do_settimeofday); static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { - do_timer(regs); + do_timer(1); #ifndef CONFIG_SMP update_process_times(user_mode(regs)); #endif diff --git a/arch/arm26/mm/fault.c b/arch/arm26/mm/fault.c index 761938b..a1f6d8a 100644 --- a/arch/arm26/mm/fault.c +++ b/arch/arm26/mm/fault.c @@ -155,7 +155,7 @@ __do_page_fault(struct mm_struct *mm, un */ good_area: if (READ_FAULT(fsr)) /* read? */ - mask = VM_READ|VM_EXEC; + mask = VM_READ|VM_EXEC|VM_WRITE; else mask = VM_WRITE; @@ -185,7 +185,7 @@ survive: } fault = -3; /* out of memory */ - if (tsk->pid != 1) + if (!is_init(tsk)) goto out; /* diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig new file mode 100644 index 0000000..5f1694e --- /dev/null +++ b/arch/avr32/Kconfig @@ -0,0 +1,196 @@ +# +# For a description of the syntax of this configuration file, +# see Documentation/kbuild/kconfig-language.txt. +# + +mainmenu "Linux Kernel Configuration" + +config AVR32 + bool + default y + # With EMBEDDED=n, we get lots of stuff automatically selected + # that we usually don't need on AVR32. + select EMBEDDED + help + AVR32 is a high-performance 32-bit RISC microprocessor core, + designed for cost-sensitive embedded applications, with particular + emphasis on low power consumption and high code density. + + There is an AVR32 Linux project with a web page at + http://avr32linux.org/. + +config UID16 + bool + +config GENERIC_HARDIRQS + bool + default y + +config HARDIRQS_SW_RESEND + bool + default y + +config GENERIC_IRQ_PROBE + bool + default y + +config RWSEM_GENERIC_SPINLOCK + bool + default y + +config GENERIC_TIME + bool + default y + +config RWSEM_XCHGADD_ALGORITHM + bool + +config GENERIC_BUST_SPINLOCK + bool + +config GENERIC_HWEIGHT + bool + default y + +config GENERIC_CALIBRATE_DELAY + bool + default y + +source "init/Kconfig" + +menu "System Type and features" + +config SUBARCH_AVR32B + bool +config MMU + bool +config PERFORMANCE_COUNTERS + bool + +config PLATFORM_AT32AP + bool + select SUBARCH_AVR32B + select MMU + select PERFORMANCE_COUNTERS + +choice + prompt "AVR32 CPU type" + default CPU_AT32AP7000 + +config CPU_AT32AP7000 + bool "AT32AP7000" + select PLATFORM_AT32AP +endchoice + +# +# CPU Daughterboards for ATSTK1000 +config BOARD_ATSTK1002 + bool + +choice + prompt "AVR32 board type" + default BOARD_ATSTK1000 + +config BOARD_ATSTK1000 + bool "ATSTK1000 evaluation board" + select BOARD_ATSTK1002 if CPU_AT32AP7000 +endchoice + +choice + prompt "Boot loader type" + default LOADER_U_BOOT + +config LOADER_U_BOOT + bool "U-Boot (or similar) bootloader" +endchoice + +config LOAD_ADDRESS + hex + default 0x10000000 if LOADER_U_BOOT=y && CPU_AT32AP7000=y + +config ENTRY_ADDRESS + hex + default 0x90000000 if LOADER_U_BOOT=y && CPU_AT32AP7000=y + +config PHYS_OFFSET + hex + default 0x10000000 if CPU_AT32AP7000=y + +source "kernel/Kconfig.preempt" + +config HAVE_ARCH_BOOTMEM_NODE + bool + default n + +config ARCH_HAVE_MEMORY_PRESENT + bool + default n + +config NEED_NODE_MEMMAP_SIZE + bool + default n + +config ARCH_FLATMEM_ENABLE + bool + default y + +config ARCH_DISCONTIGMEM_ENABLE + bool + default n + +config ARCH_SPARSEMEM_ENABLE + bool + default n + +source "mm/Kconfig" + +config OWNERSHIP_TRACE + bool "Ownership trace support" + default y + help + Say Y to generate an Ownership Trace message on every context switch, + enabling Nexus-compliant debuggers to keep track of the PID of the + currently executing task. + +# FPU emulation goes here + +source "kernel/Kconfig.hz" + +config CMDLINE + string "Default kernel command line" + default "" + help + If you don't have a boot loader capable of passing a command line string + to the kernel, you may specify one here. As a minimum, you should specify + the memory size and the root device (e.g., mem=8M, root=/dev/nfs). + +endmenu + +menu "Bus options" + +config PCI + bool + +source "drivers/pci/Kconfig" + +source "drivers/pcmcia/Kconfig" + +endmenu + +menu "Executable file formats" +source "fs/Kconfig.binfmt" +endmenu + +source "net/Kconfig" + +source "drivers/Kconfig" + +source "fs/Kconfig" + +source "arch/avr32/Kconfig.debug" + +source "security/Kconfig" + +source "crypto/Kconfig" + +source "lib/Kconfig" diff --git a/arch/avr32/Kconfig.debug b/arch/avr32/Kconfig.debug new file mode 100644 index 0000000..64ace00 --- /dev/null +++ b/arch/avr32/Kconfig.debug @@ -0,0 +1,19 @@ +menu "Kernel hacking" + +config TRACE_IRQFLAGS_SUPPORT + bool + default y + +source "lib/Kconfig.debug" + +config KPROBES + bool "Kprobes" + depends on DEBUG_KERNEL + help + Kprobes allows you to trap at almost any kernel address and + execute a callback function. register_kprobe() establishes + a probepoint and specifies the callback. Kprobes is useful + for kernel debugging, non-intrusive instrumentation and testing. + If in doubt, say "N". + +endmenu diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile new file mode 100644 index 0000000..cefc95a --- /dev/null +++ b/arch/avr32/Makefile @@ -0,0 +1,84 @@ +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 2004-2006 Atmel Corporation. + +# Default target when executing plain make +.PHONY: all +all: uImage vmlinux.elf linux.lst + +KBUILD_DEFCONFIG := atstk1002_defconfig + +CFLAGS += -pipe -fno-builtin -mno-pic +AFLAGS += -mrelax -mno-pic +CFLAGS_MODULE += -mno-relax +LDFLAGS_vmlinux += --relax + +cpuflags-$(CONFIG_CPU_AP7000) += -mcpu=ap7000 + +CFLAGS += $(cpuflags-y) +AFLAGS += $(cpuflags-y) + +CHECKFLAGS += -D__avr32__ + +LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) + +head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o +head-y += arch/avr32/kernel/head.o +core-$(CONFIG_PLATFORM_AT32AP) += arch/avr32/mach-at32ap/ +core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/ +core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/ +core-y += arch/avr32/kernel/ +core-y += arch/avr32/mm/ +libs-y += arch/avr32/lib/ #$(LIBGCC) + +archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap + +include/asm-avr32/.arch: $(wildcard include/config/platform/*.h) include/config/auto.conf + @echo ' SYMLINK include/asm-avr32/arch -> include/asm-avr32/$(archincdir-y)' +ifneq ($(KBUILD_SRC),) + $(Q)mkdir -p include/asm-avr32 + $(Q)ln -fsn $(srctree)/include/asm-avr32/$(archincdir-y) include/asm-avr32/arch +else + $(Q)ln -fsn $(archincdir-y) include/asm-avr32/arch +endif + @touch $@ + +archprepare: include/asm-avr32/.arch + +BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec + +.PHONY: $(BOOT_TARGETS) install + +boot := arch/$(ARCH)/boot/images + + KBUILD_IMAGE := $(boot)/uImage +vmlinux.elf: KBUILD_IMAGE := $(boot)/vmlinux.elf +vmlinux.cso: KBUILD_IMAGE := $(boot)/vmlinux.cso +uImage.srec: KBUILD_IMAGE := $(boot)/uImage.srec +uImage: KBUILD_IMAGE := $(boot)/uImage + +quiet_cmd_listing = LST $@ + cmd_listing = avr32-linux-objdump $(OBJDUMPFLAGS) -lS $< > $@ +quiet_cmd_disasm = DIS $@ + cmd_disasm = avr32-linux-objdump $(OBJDUMPFLAGS) -d $< > $@ + +vmlinux.elf vmlinux.bin uImage.srec uImage vmlinux.cso: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ + +install: vmlinux + $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ + +linux.s: vmlinux + $(call if_changed,disasm) + +linux.lst: vmlinux + $(call if_changed,listing) + +define archhelp + @echo '* vmlinux.elf - ELF image with load address 0' + @echo ' vmlinux.cso - PathFinder CSO image' + @echo ' uImage - Create a bootable image for U-Boot' +endef diff --git a/arch/avr32/boards/atstk1000/Makefile b/arch/avr32/boards/atstk1000/Makefile new file mode 100644 index 0000000..df94994 --- /dev/null +++ b/arch/avr32/boards/atstk1000/Makefile @@ -0,0 +1,2 @@ +obj-y += setup.o spi.o flash.o +obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c new file mode 100644 index 0000000..49164e9 --- /dev/null +++ b/arch/avr32/boards/atstk1000/atstk1002.c @@ -0,0 +1,37 @@ +/* + * ATSTK1002 daughterboard-specific init code + * + * Copyright (C) 2005-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include + +#include + +struct eth_platform_data __initdata eth0_data = { + .valid = 1, + .mii_phy_addr = 0x10, + .is_rmii = 0, + .hw_addr = { 0x6a, 0x87, 0x71, 0x14, 0xcd, 0xcb }, +}; + +extern struct lcdc_platform_data atstk1000_fb0_data; + +static int __init atstk1002_init(void) +{ + at32_add_system_devices(); + + at32_add_device_usart(1); /* /dev/ttyS0 */ + at32_add_device_usart(2); /* /dev/ttyS1 */ + at32_add_device_usart(3); /* /dev/ttyS2 */ + + at32_add_device_eth(0, ð0_data); + at32_add_device_spi(0); + at32_add_device_lcdc(0, &atstk1000_fb0_data); + + return 0; +} +postcore_initcall(atstk1002_init); diff --git a/arch/avr32/boards/atstk1000/flash.c b/arch/avr32/boards/atstk1000/flash.c new file mode 100644 index 0000000..aac4300 --- /dev/null +++ b/arch/avr32/boards/atstk1000/flash.c @@ -0,0 +1,95 @@ +/* + * ATSTK1000 board-specific flash initialization + * + * Copyright (C) 2005-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include + +#include + +static struct smc_config flash_config __initdata = { + .ncs_read_setup = 0, + .nrd_setup = 40, + .ncs_write_setup = 0, + .nwe_setup = 10, + + .ncs_read_pulse = 80, + .nrd_pulse = 40, + .ncs_write_pulse = 65, + .nwe_pulse = 55, + + .read_cycle = 120, + .write_cycle = 120, + + .bus_width = 2, + .nrd_controlled = 1, + .nwe_controlled = 1, + .byte_write = 1, +}; + +static struct mtd_partition flash_parts[] = { + { + .name = "u-boot", + .offset = 0x00000000, + .size = 0x00020000, /* 128 KiB */ + .mask_flags = MTD_WRITEABLE, + }, + { + .name = "root", + .offset = 0x00020000, + .size = 0x007d0000, + }, + { + .name = "env", + .offset = 0x007f0000, + .size = 0x00010000, + .mask_flags = MTD_WRITEABLE, + }, +}; + +static struct physmap_flash_data flash_data = { + .width = 2, + .nr_parts = ARRAY_SIZE(flash_parts), + .parts = flash_parts, +}; + +static struct resource flash_resource = { + .start = 0x00000000, + .end = 0x007fffff, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device flash_device = { + .name = "physmap-flash", + .id = 0, + .resource = &flash_resource, + .num_resources = 1, + .dev = { + .platform_data = &flash_data, + }, +}; + +/* This needs to be called after the SMC has been initialized */ +static int __init atstk1000_flash_init(void) +{ + int ret; + + ret = smc_set_configuration(0, &flash_config); + if (ret < 0) { + printk(KERN_ERR "atstk1000: failed to set NOR flash timing\n"); + return ret; + } + + platform_device_register(&flash_device); + + return 0; +} +device_initcall(atstk1000_flash_init); diff --git a/arch/avr32/boards/atstk1000/setup.c b/arch/avr32/boards/atstk1000/setup.c new file mode 100644 index 0000000..191ab85 --- /dev/null +++ b/arch/avr32/boards/atstk1000/setup.c @@ -0,0 +1,59 @@ +/* + * ATSTK1000 board-specific setup code. + * + * Copyright (C) 2005-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include + +#include + +#include + +/* Initialized by bootloader-specific startup code. */ +struct tag *bootloader_tags __initdata; + +struct lcdc_platform_data __initdata atstk1000_fb0_data; + +asmlinkage void __init board_early_init(void) +{ + extern void sdram_init(void); + +#ifdef CONFIG_LOADER_STANDALONE + sdram_init(); +#endif +} + +void __init board_setup_fbmem(unsigned long fbmem_start, + unsigned long fbmem_size) +{ + if (!fbmem_size) + return; + + if (!fbmem_start) { + void *fbmem; + + fbmem = alloc_bootmem_low_pages(fbmem_size); + fbmem_start = __pa(fbmem); + } else { + pg_data_t *pgdat; + + for_each_online_pgdat(pgdat) { + if (fbmem_start >= pgdat->bdata->node_boot_start + && fbmem_start <= pgdat->bdata->node_low_pfn) + reserve_bootmem_node(pgdat, fbmem_start, + fbmem_size); + } + } + + printk("%luKiB framebuffer memory at address 0x%08lx\n", + fbmem_size >> 10, fbmem_start); + atstk1000_fb0_data.fbmem_start = fbmem_start; + atstk1000_fb0_data.fbmem_size = fbmem_size; +} diff --git a/arch/avr32/boards/atstk1000/spi.c b/arch/avr32/boards/atstk1000/spi.c new file mode 100644 index 0000000..567726c --- /dev/null +++ b/arch/avr32/boards/atstk1000/spi.c @@ -0,0 +1,27 @@ +/* + * ATSTK1000 SPI devices + * + * Copyright (C) 2005 Atmel Norway + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + +static struct spi_board_info spi_board_info[] __initdata = { + { + .modalias = "ltv350qv", + .max_speed_hz = 16000000, + .bus_num = 0, + .chip_select = 1, + }, +}; + +static int board_init_spi(void) +{ + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); + return 0; +} +arch_initcall(board_init_spi); diff --git a/arch/avr32/boot/images/Makefile b/arch/avr32/boot/images/Makefile new file mode 100644 index 0000000..ccd74ee --- /dev/null +++ b/arch/avr32/boot/images/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2004-2006 Atmel Corporation +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# + +MKIMAGE := $(srctree)/scripts/mkuboot.sh + +extra-y := vmlinux.bin vmlinux.gz + +OBJCOPYFLAGS_vmlinux.bin := -O binary +$(obj)/vmlinux.bin: vmlinux FORCE + $(call if_changed,objcopy) + +$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE + $(call if_changed,gzip) + +quiet_cmd_uimage = UIMAGE $@ + cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A avr32 -O linux -T kernel \ + -C gzip -a $(CONFIG_LOAD_ADDRESS) -e $(CONFIG_ENTRY_ADDRESS) \ + -n 'Linux-$(KERNELRELEASE)' -d $< $@ + +targets += uImage uImage.srec +$(obj)/uImage: $(obj)/vmlinux.gz + $(call if_changed,uimage) + @echo ' Image $@ is ready' + +OBJCOPYFLAGS_uImage.srec := -I binary -O srec +$(obj)/uImage.srec: $(obj)/uImage + $(call if_changed,objcopy) + +OBJCOPYFLAGS_vmlinux.elf := --change-section-lma .text-0x80000000 \ + --change-section-lma __ex_table-0x80000000 \ + --change-section-lma .rodata-0x80000000 \ + --change-section-lma .data-0x80000000 \ + --change-section-lma .init-0x80000000 \ + --change-section-lma .bss-0x80000000 \ + --change-section-lma .initrd-0x80000000 \ + --change-section-lma __param-0x80000000 \ + --change-section-lma __ksymtab-0x80000000 \ + --change-section-lma __ksymtab_gpl-0x80000000 \ + --change-section-lma __kcrctab-0x80000000 \ + --change-section-lma __kcrctab_gpl-0x80000000 \ + --change-section-lma __ksymtab_strings-0x80000000 \ + --change-section-lma .got-0x80000000 \ + --set-start 0xa0000000 +$(obj)/vmlinux.elf: vmlinux FORCE + $(call if_changed,objcopy) + +quiet_cmd_sfdwarf = SFDWARF $@ + cmd_sfdwarf = sfdwarf $< TO $@ GNUAVR IW $(SFDWARF_FLAGS) > $(obj)/sfdwarf.log + +$(obj)/vmlinux.cso: $(obj)/vmlinux.elf FORCE + $(call if_changed,sfdwarf) + +install: $(BOOTIMAGE) + sh $(srctree)/install-kernel.sh $< + +# Generated files to be removed upon make clean +clean-files := vmlinux* uImage uImage.srec diff --git a/arch/avr32/boot/u-boot/Makefile b/arch/avr32/boot/u-boot/Makefile new file mode 100644 index 0000000..125ddc9 --- /dev/null +++ b/arch/avr32/boot/u-boot/Makefile @@ -0,0 +1,3 @@ +extra-y := head.o + +obj-y := empty.o diff --git a/arch/avr32/boot/u-boot/empty.S b/arch/avr32/boot/u-boot/empty.S new file mode 100644 index 0000000..8ac91a5 --- /dev/null +++ b/arch/avr32/boot/u-boot/empty.S @@ -0,0 +1 @@ +/* Empty file */ diff --git a/arch/avr32/boot/u-boot/head.S b/arch/avr32/boot/u-boot/head.S new file mode 100644 index 0000000..4488fa2 --- /dev/null +++ b/arch/avr32/boot/u-boot/head.S @@ -0,0 +1,60 @@ +/* + * Startup code for use with the u-boot bootloader. + * + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include + + /* + * The kernel is loaded where we want it to be and all caches + * have just been flushed. We get two parameters from u-boot: + * + * r12 contains a magic number (ATAG_MAGIC) + * r11 points to a tag table providing information about + * the system. + */ + .section .init.text,"ax" + .global _start +_start: + /* Check if the boot loader actually provided a tag table */ + lddpc r0, magic_number + cp.w r12, r0 + brne no_tag_table + + /* Initialize .bss */ + lddpc r2, bss_start_addr + lddpc r3, end_addr + mov r0, 0 + mov r1, 0 +1: st.d r2++, r0 + cp r2, r3 + brlo 1b + + /* + * Save the tag table address for later use. This must be done + * _after_ .bss has been initialized... + */ + lddpc r0, tag_table_addr + st.w r0[0], r11 + + /* Jump to loader-independent setup code */ + rjmp kernel_entry + + .align 2 +magic_number: + .long ATAG_MAGIC +tag_table_addr: + .long bootloader_tags +bss_start_addr: + .long __bss_start +end_addr: + .long _end + +no_tag_table: + sub r12, pc, (. - 2f) + bral panic +2: .asciz "Boot loader didn't provide correct magic number\n" diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig new file mode 100644 index 0000000..1d22255 --- /dev/null +++ b/arch/avr32/configs/atstk1002_defconfig @@ -0,0 +1,754 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.18-rc1 +# Tue Jul 11 12:41:36 2006 +# +CONFIG_AVR32=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SWAP=y +# CONFIG_SYSVIPC is not set +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +# CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_EMBEDDED=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +# CONFIG_BASE_FULL is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +CONFIG_SHMEM=y +# CONFIG_SLAB is not set +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=1 +CONFIG_SLOB=y + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_KMOD is not set + +# +# Block layer +# +# CONFIG_BLK_DEV_IO_TRACE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +CONFIG_DEFAULT_NOOP=y +CONFIG_DEFAULT_IOSCHED="noop" + +# +# System Type and features +# +CONFIG_SUBARCH_AVR32B=y +CONFIG_MMU=y +CONFIG_PERFORMANCE_COUNTERS=y +CONFIG_PLATFORM_AT32AP=y +CONFIG_CPU_AT32AP7000=y +CONFIG_BOARD_ATSTK1002=y +CONFIG_BOARD_ATSTK1000=y +CONFIG_LOADER_U_BOOT=y +CONFIG_LOAD_ADDRESS=0x10000000 +CONFIG_ENTRY_ADDRESS=0x90000000 +CONFIG_PHYS_OFFSET=0x10000000 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set +# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set +# CONFIG_NEED_NODE_MEMMAP_SIZE is not set +CONFIG_ARCH_FLATMEM_ENABLE=y +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +# CONFIG_ARCH_SPARSEMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_RESOURCES_64BIT is not set +# CONFIG_OWNERSHIP_TRACE is not set +# CONFIG_HZ_100 is not set +CONFIG_HZ_250=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=250 +CONFIG_CMDLINE="" + +# +# Bus options +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_BIC=y +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NET_TCPPROBE is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_IEEE80211 is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +# CONFIG_CONNECTOR is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Network device support +# +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +CONFIG_TUN=m + +# +# PHY device support +# +# CONFIG_PHYLIB is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_MACB=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +# CONFIG_PPP_BSDCOMP is not set +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +# CONFIG_INPUT is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_AT91=y +CONFIG_SERIAL_AT91_CONSOLE=y +# CONFIG_SERIAL_AT91_TTYAT is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# SPI support +# +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +CONFIG_SPI_ATMEL=m +# CONFIG_SPI_BITBANG is not set + +# +# SPI Protocol Masters +# + +# +# Dallas's 1-wire bus +# + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FIRMWARE_EDID is not set +CONFIG_FB=m +CONFIG_FB_CFB_FILLRECT=m +CONFIG_FB_CFB_COPYAREA=m +CONFIG_FB_CFB_IMAGEBLIT=m +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_SIDSA=m +CONFIG_FB_SIDSA_DEFAULT_BPP=24 +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_LCD_DEVICE=y +CONFIG_LCD_LTV350QV=m + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# +# InfiniBand support +# + +# +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# + +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set + +# +# DMA Engine support +# +# CONFIG_DMA_ENGINE is not set + +# +# DMA Clients +# + +# +# DMA Devices +# + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +# CONFIG_EXT3_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set +CONFIG_MINIX_FS=m +CONFIG_ROMFS_FS=m +# CONFIG_INOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_DNOTIFY is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +CONFIG_CONFIGFS_FS=m + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=m +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_PRINTK_TIME=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_KERNEL=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y +# CONFIG_DEBUG_VM is not set +CONFIG_FRAME_POINTER=y +# CONFIG_UNWIND_INFO is not set +CONFIG_FORCED_INLINING=y +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_KPROBES=y + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +CONFIG_CRC_CCITT=m +# CONFIG_CRC16 is not set +CONFIG_CRC32=m +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=m +CONFIG_ZLIB_DEFLATE=m diff --git a/arch/avr32/kernel/Makefile b/arch/avr32/kernel/Makefile new file mode 100644 index 0000000..90e5aff --- /dev/null +++ b/arch/avr32/kernel/Makefile @@ -0,0 +1,18 @@ +# +# Makefile for the Linux/AVR32 kernel. +# + +extra-y := head.o vmlinux.lds + +obj-$(CONFIG_SUBARCH_AVR32B) += entry-avr32b.o +obj-y += syscall_table.o syscall-stubs.o irq.o +obj-y += setup.o traps.o semaphore.o ptrace.o +obj-y += signal.o sys_avr32.o process.o time.o +obj-y += init_task.o switch_to.o cpu.o +obj-$(CONFIG_MODULES) += module.o avr32_ksyms.o +obj-$(CONFIG_KPROBES) += kprobes.o + +USE_STANDARD_AS_RULE := true + +%.lds: %.lds.c FORCE + $(call if_changed_dep,cpp_lds_S) diff --git a/arch/avr32/kernel/asm-offsets.c b/arch/avr32/kernel/asm-offsets.c new file mode 100644 index 0000000..97d8658 --- /dev/null +++ b/arch/avr32/kernel/asm-offsets.c @@ -0,0 +1,25 @@ +/* + * Generate definitions needed by assembly language modules. + * This code generates raw asm output which is post-processed + * to extract and format the required data. + */ + +#include + +#define DEFINE(sym, val) \ + asm volatile("\n->" #sym " %0 " #val : : "i" (val)) + +#define BLANK() asm volatile("\n->" : : ) + +#define OFFSET(sym, str, mem) \ + DEFINE(sym, offsetof(struct str, mem)); + +void foo(void) +{ + OFFSET(TI_task, thread_info, task); + OFFSET(TI_exec_domain, thread_info, exec_domain); + OFFSET(TI_flags, thread_info, flags); + OFFSET(TI_cpu, thread_info, cpu); + OFFSET(TI_preempt_count, thread_info, preempt_count); + OFFSET(TI_restart_block, thread_info, restart_block); +} diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c new file mode 100644 index 0000000..04f767a --- /dev/null +++ b/arch/avr32/kernel/avr32_ksyms.c @@ -0,0 +1,55 @@ +/* + * Export AVR32-specific functions for loadable modules. + * + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include + +#include +#include +#include + +/* + * GCC functions + */ +extern unsigned long long __avr32_lsl64(unsigned long long u, unsigned long b); +extern unsigned long long __avr32_lsr64(unsigned long long u, unsigned long b); +extern unsigned long long __avr32_asr64(unsigned long long u, unsigned long b); +EXPORT_SYMBOL(__avr32_lsl64); +EXPORT_SYMBOL(__avr32_lsr64); +EXPORT_SYMBOL(__avr32_asr64); + +/* + * String functions + */ +EXPORT_SYMBOL(memset); +EXPORT_SYMBOL(memcpy); + +/* + * Userspace access stuff. + */ +EXPORT_SYMBOL(copy_from_user); +EXPORT_SYMBOL(copy_to_user); +EXPORT_SYMBOL(__copy_user); +EXPORT_SYMBOL(strncpy_from_user); +EXPORT_SYMBOL(__strncpy_from_user); +EXPORT_SYMBOL(clear_user); +EXPORT_SYMBOL(__clear_user); +EXPORT_SYMBOL(csum_partial); +EXPORT_SYMBOL(csum_partial_copy_generic); + +/* Delay loops (lib/delay.S) */ +EXPORT_SYMBOL(__ndelay); +EXPORT_SYMBOL(__udelay); +EXPORT_SYMBOL(__const_udelay); + +/* Bit operations (lib/findbit.S) */ +EXPORT_SYMBOL(find_first_zero_bit); +EXPORT_SYMBOL(find_next_zero_bit); +EXPORT_SYMBOL(find_first_bit); +EXPORT_SYMBOL(find_next_bit); +EXPORT_SYMBOL(generic_find_next_zero_le_bit); diff --git a/arch/avr32/kernel/cpu.c b/arch/avr32/kernel/cpu.c new file mode 100644 index 0000000..342452b --- /dev/null +++ b/arch/avr32/kernel/cpu.c @@ -0,0 +1,327 @@ +/* + * Copyright (C) 2005-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +static DEFINE_PER_CPU(struct cpu, cpu_devices); + +#ifdef CONFIG_PERFORMANCE_COUNTERS + +/* + * XXX: If/when a SMP-capable implementation of AVR32 will ever be + * made, we must make sure that the code executes on the correct CPU. + */ +static ssize_t show_pc0event(struct sys_device *dev, char *buf) +{ + unsigned long pccr; + + pccr = sysreg_read(PCCR); + return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f); +} +static ssize_t store_pc0event(struct sys_device *dev, const char *buf, + size_t count) +{ + unsigned long val; + char *endp; + + val = simple_strtoul(buf, &endp, 0); + if (endp == buf || val > 0x3f) + return -EINVAL; + val = (val << 12) | (sysreg_read(PCCR) & 0xfffc0fff); + sysreg_write(PCCR, val); + return count; +} +static ssize_t show_pc0count(struct sys_device *dev, char *buf) +{ + unsigned long pcnt0; + + pcnt0 = sysreg_read(PCNT0); + return sprintf(buf, "%lu\n", pcnt0); +} +static ssize_t store_pc0count(struct sys_device *dev, const char *buf, + size_t count) +{ + unsigned long val; + char *endp; + + val = simple_strtoul(buf, &endp, 0); + if (endp == buf) + return -EINVAL; + sysreg_write(PCNT0, val); + + return count; +} + +static ssize_t show_pc1event(struct sys_device *dev, char *buf) +{ + unsigned long pccr; + + pccr = sysreg_read(PCCR); + return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f); +} +static ssize_t store_pc1event(struct sys_device *dev, const char *buf, + size_t count) +{ + unsigned long val; + char *endp; + + val = simple_strtoul(buf, &endp, 0); + if (endp == buf || val > 0x3f) + return -EINVAL; + val = (val << 18) | (sysreg_read(PCCR) & 0xff03ffff); + sysreg_write(PCCR, val); + return count; +} +static ssize_t show_pc1count(struct sys_device *dev, char *buf) +{ + unsigned long pcnt1; + + pcnt1 = sysreg_read(PCNT1); + return sprintf(buf, "%lu\n", pcnt1); +} +static ssize_t store_pc1count(struct sys_device *dev, const char *buf, + size_t count) +{ + unsigned long val; + char *endp; + + val = simple_strtoul(buf, &endp, 0); + if (endp == buf) + return -EINVAL; + sysreg_write(PCNT1, val); + + return count; +} + +static ssize_t show_pccycles(struct sys_device *dev, char *buf) +{ + unsigned long pccnt; + + pccnt = sysreg_read(PCCNT); + return sprintf(buf, "%lu\n", pccnt); +} +static ssize_t store_pccycles(struct sys_device *dev, const char *buf, + size_t count) +{ + unsigned long val; + char *endp; + + val = simple_strtoul(buf, &endp, 0); + if (endp == buf) + return -EINVAL; + sysreg_write(PCCNT, val); + + return count; +} + +static ssize_t show_pcenable(struct sys_device *dev, char *buf) +{ + unsigned long pccr; + + pccr = sysreg_read(PCCR); + return sprintf(buf, "%c\n", (pccr & 1)?'1':'0'); +} +static ssize_t store_pcenable(struct sys_device *dev, const char *buf, + size_t count) +{ + unsigned long pccr, val; + char *endp; + + val = simple_strtoul(buf, &endp, 0); + if (endp == buf) + return -EINVAL; + if (val) + val = 1; + + pccr = sysreg_read(PCCR); + pccr = (pccr & ~1UL) | val; + sysreg_write(PCCR, pccr); + + return count; +} + +static SYSDEV_ATTR(pc0event, 0600, show_pc0event, store_pc0event); +static SYSDEV_ATTR(pc0count, 0600, show_pc0count, store_pc0count); +static SYSDEV_ATTR(pc1event, 0600, show_pc1event, store_pc1event); +static SYSDEV_ATTR(pc1count, 0600, show_pc1count, store_pc1count); +static SYSDEV_ATTR(pccycles, 0600, show_pccycles, store_pccycles); +static SYSDEV_ATTR(pcenable, 0600, show_pcenable, store_pcenable); + +#endif /* CONFIG_PERFORMANCE_COUNTERS */ + +static int __init topology_init(void) +{ + int cpu; + + for_each_possible_cpu(cpu) { + struct cpu *c = &per_cpu(cpu_devices, cpu); + + register_cpu(c, cpu); + +#ifdef CONFIG_PERFORMANCE_COUNTERS + sysdev_create_file(&c->sysdev, &attr_pc0event); + sysdev_create_file(&c->sysdev, &attr_pc0count); + sysdev_create_file(&c->sysdev, &attr_pc1event); + sysdev_create_file(&c->sysdev, &attr_pc1count); + sysdev_create_file(&c->sysdev, &attr_pccycles); + sysdev_create_file(&c->sysdev, &attr_pcenable); +#endif + } + + return 0; +} + +subsys_initcall(topology_init); + +static const char *cpu_names[] = { + "Morgan", + "AP7000", +}; +#define NR_CPU_NAMES ARRAY_SIZE(cpu_names) + +static const char *arch_names[] = { + "AVR32A", + "AVR32B", +}; +#define NR_ARCH_NAMES ARRAY_SIZE(arch_names) + +static const char *mmu_types[] = { + "No MMU", + "ITLB and DTLB", + "Shared TLB", + "MPU" +}; + +void __init setup_processor(void) +{ + unsigned long config0, config1; + unsigned cpu_id, cpu_rev, arch_id, arch_rev, mmu_type; + unsigned tmp; + + config0 = sysreg_read(CONFIG0); /* 0x0000013e; */ + config1 = sysreg_read(CONFIG1); /* 0x01f689a2; */ + cpu_id = config0 >> 24; + cpu_rev = (config0 >> 16) & 0xff; + arch_id = (config0 >> 13) & 0x07; + arch_rev = (config0 >> 10) & 0x07; + mmu_type = (config0 >> 7) & 0x03; + + boot_cpu_data.arch_type = arch_id; + boot_cpu_data.cpu_type = cpu_id; + boot_cpu_data.arch_revision = arch_rev; + boot_cpu_data.cpu_revision = cpu_rev; + boot_cpu_data.tlb_config = mmu_type; + + tmp = (config1 >> 13) & 0x07; + if (tmp) { + boot_cpu_data.icache.ways = 1 << ((config1 >> 10) & 0x07); + boot_cpu_data.icache.sets = 1 << ((config1 >> 16) & 0x0f); + boot_cpu_data.icache.linesz = 1 << (tmp + 1); + } + tmp = (config1 >> 3) & 0x07; + if (tmp) { + boot_cpu_data.dcache.ways = 1 << (config1 & 0x07); + boot_cpu_data.dcache.sets = 1 << ((config1 >> 6) & 0x0f); + boot_cpu_data.dcache.linesz = 1 << (tmp + 1); + } + + if ((cpu_id >= NR_CPU_NAMES) || (arch_id >= NR_ARCH_NAMES)) { + printk ("Unknown CPU configuration (ID %02x, arch %02x), " + "continuing anyway...\n", + cpu_id, arch_id); + return; + } + + printk ("CPU: %s [%02x] revision %d (%s revision %d)\n", + cpu_names[cpu_id], cpu_id, cpu_rev, + arch_names[arch_id], arch_rev); + printk ("CPU: MMU configuration: %s\n", mmu_types[mmu_type]); + printk ("CPU: features:"); + if (config0 & (1 << 6)) + printk(" fpu"); + if (config0 & (1 << 5)) + printk(" java"); + if (config0 & (1 << 4)) + printk(" perfctr"); + if (config0 & (1 << 3)) + printk(" ocd"); + printk("\n"); +} + +#ifdef CONFIG_PROC_FS +static int c_show(struct seq_file *m, void *v) +{ + unsigned int icache_size, dcache_size; + unsigned int cpu = smp_processor_id(); + + icache_size = boot_cpu_data.icache.ways * + boot_cpu_data.icache.sets * + boot_cpu_data.icache.linesz; + dcache_size = boot_cpu_data.dcache.ways * + boot_cpu_data.dcache.sets * + boot_cpu_data.dcache.linesz; + + seq_printf(m, "processor\t: %d\n", cpu); + + if (boot_cpu_data.arch_type < NR_ARCH_NAMES) + seq_printf(m, "cpu family\t: %s revision %d\n", + arch_names[boot_cpu_data.arch_type], + boot_cpu_data.arch_revision); + if (boot_cpu_data.cpu_type < NR_CPU_NAMES) + seq_printf(m, "cpu type\t: %s revision %d\n", + cpu_names[boot_cpu_data.cpu_type], + boot_cpu_data.cpu_revision); + + seq_printf(m, "i-cache\t\t: %dK (%u ways x %u sets x %u)\n", + icache_size >> 10, + boot_cpu_data.icache.ways, + boot_cpu_data.icache.sets, + boot_cpu_data.icache.linesz); + seq_printf(m, "d-cache\t\t: %dK (%u ways x %u sets x %u)\n", + dcache_size >> 10, + boot_cpu_data.dcache.ways, + boot_cpu_data.dcache.sets, + boot_cpu_data.dcache.linesz); + seq_printf(m, "bogomips\t: %lu.%02lu\n", + boot_cpu_data.loops_per_jiffy / (500000/HZ), + (boot_cpu_data.loops_per_jiffy / (5000/HZ)) % 100); + + return 0; +} + +static void *c_start(struct seq_file *m, loff_t *pos) +{ + return *pos < 1 ? (void *)1 : NULL; +} + +static void *c_next(struct seq_file *m, void *v, loff_t *pos) +{ + ++*pos; + return NULL; +} + +static void c_stop(struct seq_file *m, void *v) +{ + +} + +struct seq_operations cpuinfo_op = { + .start = c_start, + .next = c_next, + .stop = c_stop, + .show = c_show +}; +#endif /* CONFIG_PROC_FS */ diff --git a/arch/avr32/kernel/entry-avr32b.S b/arch/avr32/kernel/entry-avr32b.S new file mode 100644 index 0000000..eeb6679 --- /dev/null +++ b/arch/avr32/kernel/entry-avr32b.S @@ -0,0 +1,678 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * This file contains the low-level entry-points into the kernel, that is, + * exception handlers, debug trap handlers, interrupt handlers and the + * system call handler. + */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_PREEMPT +# define preempt_stop mask_interrupts +#else +# define preempt_stop +# define fault_resume_kernel fault_restore_all +#endif + +#define __MASK(x) ((1 << (x)) - 1) +#define IRQ_MASK ((__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) | \ + (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)) + + .section .ex.text,"ax",@progbits + .align 2 +exception_vectors: + bral handle_critical + .align 2 + bral handle_critical + .align 2 + bral do_bus_error_write + .align 2 + bral do_bus_error_read + .align 2 + bral do_nmi_ll + .align 2 + bral handle_address_fault + .align 2 + bral handle_protection_fault + .align 2 + bral handle_debug + .align 2 + bral do_illegal_opcode_ll + .align 2 + bral do_illegal_opcode_ll + .align 2 + bral do_illegal_opcode_ll + .align 2 + bral do_fpe_ll + .align 2 + bral do_illegal_opcode_ll + .align 2 + bral handle_address_fault + .align 2 + bral handle_address_fault + .align 2 + bral handle_protection_fault + .align 2 + bral handle_protection_fault + .align 2 + bral do_dtlb_modified + + /* + * r0 : PGD/PT/PTE + * r1 : Offending address + * r2 : Scratch register + * r3 : Cause (5, 12 or 13) + */ +#define tlbmiss_save pushm r0-r3 +#define tlbmiss_restore popm r0-r3 + + .section .tlbx.ex.text,"ax",@progbits + .global itlb_miss +itlb_miss: + tlbmiss_save + rjmp tlb_miss_common + + .section .tlbr.ex.text,"ax",@progbits +dtlb_miss_read: + tlbmiss_save + rjmp tlb_miss_common + + .section .tlbw.ex.text,"ax",@progbits +dtlb_miss_write: + tlbmiss_save + + .global tlb_miss_common +tlb_miss_common: + mfsr r0, SYSREG_PTBR + mfsr r1, SYSREG_TLBEAR + + /* Is it the vmalloc space? */ + bld r1, 31 + brcs handle_vmalloc_miss + + /* First level lookup */ +pgtbl_lookup: + lsr r2, r1, PGDIR_SHIFT + ld.w r0, r0[r2 << 2] + bld r0, _PAGE_BIT_PRESENT + brcc page_table_not_present + + /* TODO: Check access rights on page table if necessary */ + + /* Translate to virtual address in P1. */ + andl r0, 0xf000 + sbr r0, 31 + + /* Second level lookup */ + lsl r1, (32 - PGDIR_SHIFT) + lsr r1, (32 - PGDIR_SHIFT) + PAGE_SHIFT + add r2, r0, r1 << 2 + ld.w r1, r2[0] + bld r1, _PAGE_BIT_PRESENT + brcc page_not_present + + /* Mark the page as accessed */ + sbr r1, _PAGE_BIT_ACCESSED + st.w r2[0], r1 + + /* Drop software flags */ + andl r1, _PAGE_FLAGS_HARDWARE_MASK & 0xffff + mtsr SYSREG_TLBELO, r1 + + /* Figure out which entry we want to replace */ + mfsr r0, SYSREG_TLBARLO + clz r2, r0 + brcc 1f + mov r1, -1 /* All entries have been accessed, */ + mtsr SYSREG_TLBARLO, r1 /* so reset TLBAR */ + mov r2, 0 /* and start at 0 */ +1: mfsr r1, SYSREG_MMUCR + lsl r2, 14 + andl r1, 0x3fff, COH + or r1, r2 + mtsr SYSREG_MMUCR, r1 + + tlbw + + tlbmiss_restore + rete + +handle_vmalloc_miss: + /* Simply do the lookup in init's page table */ + mov r0, lo(swapper_pg_dir) + orh r0, hi(swapper_pg_dir) + rjmp pgtbl_lookup + + + /* --- System Call --- */ + + .section .scall.text,"ax",@progbits +system_call: + pushm r12 /* r12_orig */ + stmts --sp, r0-lr + zero_fp + mfsr r0, SYSREG_RAR_SUP + mfsr r1, SYSREG_RSR_SUP + stm --sp, r0-r1 + + /* check for syscall tracing */ + get_thread_info r0 + ld.w r1, r0[TI_flags] + bld r1, TIF_SYSCALL_TRACE + brcs syscall_trace_enter + +syscall_trace_cont: + cp.w r8, NR_syscalls + brhs syscall_badsys + + lddpc lr, syscall_table_addr + ld.w lr, lr[r8 << 2] + mov r8, r5 /* 5th argument (6th is pushed by stub) */ + icall lr + + .global syscall_return +syscall_return: + get_thread_info r0 + mask_interrupts /* make sure we don't miss an interrupt + setting need_resched or sigpending + between sampling and the rets */ + + /* Store the return value so that the correct value is loaded below */ + stdsp sp[REG_R12], r12 + + ld.w r1, r0[TI_flags] + andl r1, _TIF_ALLWORK_MASK, COH + brne syscall_exit_work + +syscall_exit_cont: + popm r8-r9 + mtsr SYSREG_RAR_SUP, r8 + mtsr SYSREG_RSR_SUP, r9 + ldmts sp++, r0-lr + sub sp, -4 /* r12_orig */ + rets + + .align 2 +syscall_table_addr: + .long sys_call_table + +syscall_badsys: + mov r12, -ENOSYS + rjmp syscall_return + + .global ret_from_fork +ret_from_fork: + rcall schedule_tail + + /* check for syscall tracing */ + get_thread_info r0 + ld.w r1, r0[TI_flags] + andl r1, _TIF_ALLWORK_MASK, COH + brne syscall_exit_work + rjmp syscall_exit_cont + +syscall_trace_enter: + pushm r8-r12 + rcall syscall_trace + popm r8-r12 + rjmp syscall_trace_cont + +syscall_exit_work: + bld r1, TIF_SYSCALL_TRACE + brcc 1f + unmask_interrupts + rcall syscall_trace + mask_interrupts + ld.w r1, r0[TI_flags] + +1: bld r1, TIF_NEED_RESCHED + brcc 2f + unmask_interrupts + rcall schedule + mask_interrupts + ld.w r1, r0[TI_flags] + rjmp 1b + +2: mov r2, _TIF_SIGPENDING | _TIF_RESTORE_SIGMASK + tst r1, r2 + breq 3f + unmask_interrupts + mov r12, sp + mov r11, r0 + rcall do_notify_resume + mask_interrupts + ld.w r1, r0[TI_flags] + rjmp 1b + +3: bld r1, TIF_BREAKPOINT + brcc syscall_exit_cont + mfsr r3, SYSREG_TLBEHI + lddsp r2, sp[REG_PC] + andl r3, 0xff, COH + lsl r3, 1 + sbr r3, 30 + sbr r3, 0 + mtdr DBGREG_BWA2A, r2 + mtdr DBGREG_BWC2A, r3 + rjmp syscall_exit_cont + + + /* The slow path of the TLB miss handler */ +page_table_not_present: +page_not_present: + tlbmiss_restore + sub sp, 4 + stmts --sp, r0-lr + rcall save_full_context_ex + mfsr r12, SYSREG_ECR + mov r11, sp + rcall do_page_fault + rjmp ret_from_exception + + /* This function expects to find offending PC in SYSREG_RAR_EX */ +save_full_context_ex: + mfsr r8, SYSREG_RSR_EX + mov r12, r8 + andh r8, (MODE_MASK >> 16), COH + mfsr r11, SYSREG_RAR_EX + brne 2f + +1: pushm r11, r12 /* PC and SR */ + unmask_exceptions + ret r12 + +2: sub r10, sp, -(FRAME_SIZE_FULL - REG_LR) + stdsp sp[4], r10 /* replace saved SP */ + rjmp 1b + + /* Low-level exception handlers */ +handle_critical: + pushm r12 + pushm r0-r12 + rcall save_full_context_ex + mfsr r12, SYSREG_ECR + mov r11, sp + rcall do_critical_exception + + /* We should never get here... */ +bad_return: + sub r12, pc, (. - 1f) + bral panic + .align 2 +1: .asciz "Return from critical exception!" + + .align 1 +do_bus_error_write: + sub sp, 4 + stmts --sp, r0-lr + rcall save_full_context_ex + mov r11, 1 + rjmp 1f + +do_bus_error_read: + sub sp, 4 + stmts --sp, r0-lr + rcall save_full_context_ex + mov r11, 0 +1: mfsr r12, SYSREG_BEAR + mov r10, sp + rcall do_bus_error + rjmp ret_from_exception + + .align 1 +do_nmi_ll: + sub sp, 4 + stmts --sp, r0-lr + /* FIXME: Make sure RAR_NMI and RSR_NMI are pushed instead of *_EX */ + rcall save_full_context_ex + mfsr r12, SYSREG_ECR + mov r11, sp + rcall do_nmi + rjmp bad_return + +handle_address_fault: + sub sp, 4 + stmts --sp, r0-lr + rcall save_full_context_ex + mfsr r12, SYSREG_ECR + mov r11, sp + rcall do_address_exception + rjmp ret_from_exception + +handle_protection_fault: + sub sp, 4 + stmts --sp, r0-lr + rcall save_full_context_ex + mfsr r12, SYSREG_ECR + mov r11, sp + rcall do_page_fault + rjmp ret_from_exception + + .align 1 +do_illegal_opcode_ll: + sub sp, 4 + stmts --sp, r0-lr + rcall save_full_context_ex + mfsr r12, SYSREG_ECR + mov r11, sp + rcall do_illegal_opcode + rjmp ret_from_exception + +do_dtlb_modified: + pushm r0-r3 + mfsr r1, SYSREG_TLBEAR + mfsr r0, SYSREG_PTBR + lsr r2, r1, PGDIR_SHIFT + ld.w r0, r0[r2 << 2] + lsl r1, (32 - PGDIR_SHIFT) + lsr r1, (32 - PGDIR_SHIFT) + PAGE_SHIFT + + /* Translate to virtual address in P1 */ + andl r0, 0xf000 + sbr r0, 31 + add r2, r0, r1 << 2 + ld.w r3, r2[0] + sbr r3, _PAGE_BIT_DIRTY + mov r0, r3 + st.w r2[0], r3 + + /* The page table is up-to-date. Update the TLB entry as well */ + andl r0, lo(_PAGE_FLAGS_HARDWARE_MASK) + mtsr SYSREG_TLBELO, r0 + + /* MMUCR[DRP] is updated automatically, so let's go... */ + tlbw + + popm r0-r3 + rete + +do_fpe_ll: + sub sp, 4 + stmts --sp, r0-lr + rcall save_full_context_ex + unmask_interrupts + mov r12, 26 + mov r11, sp + rcall do_fpe + rjmp ret_from_exception + +ret_from_exception: + mask_interrupts + lddsp r4, sp[REG_SR] + andh r4, (MODE_MASK >> 16), COH + brne fault_resume_kernel + + get_thread_info r0 + ld.w r1, r0[TI_flags] + andl r1, _TIF_WORK_MASK, COH + brne fault_exit_work + +fault_resume_user: + popm r8-r9 + mask_exceptions + mtsr SYSREG_RAR_EX, r8 + mtsr SYSREG_RSR_EX, r9 + ldmts sp++, r0-lr + sub sp, -4 + rete + +fault_resume_kernel: +#ifdef CONFIG_PREEMPT + get_thread_info r0 + ld.w r2, r0[TI_preempt_count] + cp.w r2, 0 + brne 1f + ld.w r1, r0[TI_flags] + bld r1, TIF_NEED_RESCHED + brcc 1f + lddsp r4, sp[REG_SR] + bld r4, SYSREG_GM_OFFSET + brcs 1f + rcall preempt_schedule_irq +1: +#endif + + popm r8-r9 + mask_exceptions + mfsr r1, SYSREG_SR + mtsr SYSREG_RAR_EX, r8 + mtsr SYSREG_RSR_EX, r9 + popm lr + sub sp, -4 /* ignore SP */ + popm r0-r12 + sub sp, -4 /* ignore r12_orig */ + rete + +irq_exit_work: + /* Switch to exception mode so that we can share the same code. */ + mfsr r8, SYSREG_SR + cbr r8, SYSREG_M0_OFFSET + orh r8, hi(SYSREG_BIT(M1) | SYSREG_BIT(M2)) + mtsr SYSREG_SR, r8 + sub pc, -2 + get_thread_info r0 + ld.w r1, r0[TI_flags] + +fault_exit_work: + bld r1, TIF_NEED_RESCHED + brcc 1f + unmask_interrupts + rcall schedule + mask_interrupts + ld.w r1, r0[TI_flags] + rjmp fault_exit_work + +1: mov r2, _TIF_SIGPENDING | _TIF_RESTORE_SIGMASK + tst r1, r2 + breq 2f + unmask_interrupts + mov r12, sp + mov r11, r0 + rcall do_notify_resume + mask_interrupts + ld.w r1, r0[TI_flags] + rjmp fault_exit_work + +2: bld r1, TIF_BREAKPOINT + brcc fault_resume_user + mfsr r3, SYSREG_TLBEHI + lddsp r2, sp[REG_PC] + andl r3, 0xff, COH + lsl r3, 1 + sbr r3, 30 + sbr r3, 0 + mtdr DBGREG_BWA2A, r2 + mtdr DBGREG_BWC2A, r3 + rjmp fault_resume_user + + /* If we get a debug trap from privileged context we end up here */ +handle_debug_priv: + /* Fix up LR and SP in regs. r11 contains the mode we came from */ + mfsr r8, SYSREG_SR + mov r9, r8 + andh r8, hi(~MODE_MASK) + or r8, r11 + mtsr SYSREG_SR, r8 + sub pc, -2 + stdsp sp[REG_LR], lr + mtsr SYSREG_SR, r9 + sub pc, -2 + sub r10, sp, -FRAME_SIZE_FULL + stdsp sp[REG_SP], r10 + mov r12, sp + rcall do_debug_priv + + /* Now, put everything back */ + ssrf SR_EM_BIT + popm r10, r11 + mtsr SYSREG_RAR_DBG, r10 + mtsr SYSREG_RSR_DBG, r11 + mfsr r8, SYSREG_SR + mov r9, r8 + andh r8, hi(~MODE_MASK) + andh r11, hi(MODE_MASK) + or r8, r11 + mtsr SYSREG_SR, r8 + sub pc, -2 + popm lr + mtsr SYSREG_SR, r9 + sub pc, -2 + sub sp, -4 /* skip SP */ + popm r0-r12 + sub sp, -4 + retd + + /* + * At this point, everything is masked, that is, interrupts, + * exceptions and debugging traps. We might get called from + * interrupt or exception context in some rare cases, but this + * will be taken care of by do_debug(), so we're not going to + * do a 100% correct context save here. + */ +handle_debug: + sub sp, 4 /* r12_orig */ + stmts --sp, r0-lr + mfsr r10, SYSREG_RAR_DBG + mfsr r11, SYSREG_RSR_DBG + unmask_exceptions + pushm r10,r11 + andh r11, (MODE_MASK >> 16), COH + brne handle_debug_priv + + mov r12, sp + rcall do_debug + + lddsp r10, sp[REG_SR] + andh r10, (MODE_MASK >> 16), COH + breq debug_resume_user + +debug_restore_all: + popm r10,r11 + mask_exceptions + mtsr SYSREG_RSR_DBG, r11 + mtsr SYSREG_RAR_DBG, r10 + ldmts sp++, r0-lr + sub sp, -4 + retd + +debug_resume_user: + get_thread_info r0 + mask_interrupts + + ld.w r1, r0[TI_flags] + andl r1, _TIF_DBGWORK_MASK, COH + breq debug_restore_all + +1: bld r1, TIF_NEED_RESCHED + brcc 2f + unmask_interrupts + rcall schedule + mask_interrupts + ld.w r1, r0[TI_flags] + rjmp 1b + +2: mov r2, _TIF_SIGPENDING | _TIF_RESTORE_SIGMASK + tst r1, r2 + breq 3f + unmask_interrupts + mov r12, sp + mov r11, r0 + rcall do_notify_resume + mask_interrupts + ld.w r1, r0[TI_flags] + rjmp 1b + +3: bld r1, TIF_SINGLE_STEP + brcc debug_restore_all + mfdr r2, DBGREG_DC + sbr r2, DC_SS_BIT + mtdr DBGREG_DC, r2 + rjmp debug_restore_all + + .set rsr_int0, SYSREG_RSR_INT0 + .set rsr_int1, SYSREG_RSR_INT1 + .set rsr_int2, SYSREG_RSR_INT2 + .set rsr_int3, SYSREG_RSR_INT3 + .set rar_int0, SYSREG_RAR_INT0 + .set rar_int1, SYSREG_RAR_INT1 + .set rar_int2, SYSREG_RAR_INT2 + .set rar_int3, SYSREG_RAR_INT3 + + .macro IRQ_LEVEL level + .type irq_level\level, @function +irq_level\level: + sub sp, 4 /* r12_orig */ + stmts --sp,r0-lr + mfsr r8, rar_int\level + mfsr r9, rsr_int\level + pushm r8-r9 + + mov r11, sp + mov r12, \level + + rcall do_IRQ + + lddsp r4, sp[REG_SR] + andh r4, (MODE_MASK >> 16), COH +#ifdef CONFIG_PREEMPT + brne 2f +#else + brne 1f +#endif + + get_thread_info r0 + ld.w r1, r0[TI_flags] + andl r1, _TIF_WORK_MASK, COH + brne irq_exit_work + +1: popm r8-r9 + mtsr rar_int\level, r8 + mtsr rsr_int\level, r9 + ldmts sp++,r0-lr + sub sp, -4 /* ignore r12_orig */ + rete + +#ifdef CONFIG_PREEMPT +2: + get_thread_info r0 + ld.w r2, r0[TI_preempt_count] + cp.w r2, 0 + brne 1b + ld.w r1, r0[TI_flags] + bld r1, TIF_NEED_RESCHED + brcc 1b + lddsp r4, sp[REG_SR] + bld r4, SYSREG_GM_OFFSET + brcs 1b + rcall preempt_schedule_irq + rjmp 1b +#endif + .endm + + .section .irq.text,"ax",@progbits + + .global irq_level0 + .global irq_level1 + .global irq_level2 + .global irq_level3 + IRQ_LEVEL 0 + IRQ_LEVEL 1 + IRQ_LEVEL 2 + IRQ_LEVEL 3 diff --git a/arch/avr32/kernel/head.S b/arch/avr32/kernel/head.S new file mode 100644 index 0000000..773b7ad --- /dev/null +++ b/arch/avr32/kernel/head.S @@ -0,0 +1,45 @@ +/* + * Non-board-specific low-level startup code + * + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include + +#include +#include +#include + + .section .init.text,"ax" + .global kernel_entry +kernel_entry: + /* Initialize status register */ + lddpc r0, init_sr + mtsr SYSREG_SR, r0 + + /* Set initial stack pointer */ + lddpc sp, stack_addr + sub sp, -THREAD_SIZE + +#ifdef CONFIG_FRAME_POINTER + /* Mark last stack frame */ + mov lr, 0 + mov r7, 0 +#endif + + /* Set up the PIO, SDRAM controller, early printk, etc. */ + rcall board_early_init + + /* Start the show */ + lddpc pc, kernel_start_addr + + .align 2 +init_sr: + .long 0x007f0000 /* Supervisor mode, everything masked */ +stack_addr: + .long init_thread_union +kernel_start_addr: + .long start_kernel diff --git a/arch/avr32/kernel/init_task.c b/arch/avr32/kernel/init_task.c new file mode 100644 index 0000000..effcacf --- /dev/null +++ b/arch/avr32/kernel/init_task.c @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include + +#include + +static struct fs_struct init_fs = INIT_FS; +static struct files_struct init_files = INIT_FILES; +static struct signal_struct init_signals = INIT_SIGNALS(init_signals); +static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); +struct mm_struct init_mm = INIT_MM(init_mm); + +EXPORT_SYMBOL(init_mm); + +/* + * Initial thread structure. Must be aligned on an 8192-byte boundary. + */ +union thread_union init_thread_union + __attribute__((__section__(".data.init_task"))) = + { INIT_THREAD_INFO(init_task) }; + +/* + * Initial task structure. + * + * All other task structs will be allocated on slabs in fork.c + */ +struct task_struct init_task = INIT_TASK(init_task); + +EXPORT_SYMBOL(init_task); diff --git a/arch/avr32/kernel/irq.c b/arch/avr32/kernel/irq.c new file mode 100644 index 0000000..856f354 --- /dev/null +++ b/arch/avr32/kernel/irq.c @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * Based on arch/i386/kernel/irq.c + * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This file contains the code used by various IRQ handling routines: + * asking for different IRQ's should be done through these routines + * instead of just grabbing them. Thus setups with different IRQ numbers + * shouldn't result in any weird surprises, and installing new handlers + * should be easier. + * + * IRQ's are in fact implemented a bit like signal handlers for the kernel. + * Naturally it's not a 1:1 relation, but there are similarities. + */ + +#include +#include +#include +#include +#include +#include + +/* + * 'what should we do if we get a hw irq event on an illegal vector'. + * each architecture has to answer this themselves. + */ +void ack_bad_irq(unsigned int irq) +{ + printk("unexpected IRQ %u\n", irq); +} + +#ifdef CONFIG_PROC_FS +int show_interrupts(struct seq_file *p, void *v) +{ + int i = *(loff_t *)v, cpu; + struct irqaction *action; + unsigned long flags; + + if (i == 0) { + seq_puts(p, " "); + for_each_online_cpu(cpu) + seq_printf(p, "CPU%d ", cpu); + seq_putc(p, '\n'); + } + + if (i < NR_IRQS) { + spin_lock_irqsave(&irq_desc[i].lock, flags); + action = irq_desc[i].action; + if (!action) + goto unlock; + + seq_printf(p, "%3d: ", i); + for_each_online_cpu(cpu) + seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]); + seq_printf(p, " %s", action->name); + for (action = action->next; action; action = action->next) + seq_printf(p, ", %s", action->name); + + seq_putc(p, '\n'); + unlock: + spin_unlock_irqrestore(&irq_desc[i].lock, flags); + } + + return 0; +} +#endif diff --git a/arch/avr32/kernel/kprobes.c b/arch/avr32/kernel/kprobes.c new file mode 100644 index 0000000..6caf9e8 --- /dev/null +++ b/arch/avr32/kernel/kprobes.c @@ -0,0 +1,270 @@ +/* + * Kernel Probes (KProbes) + * + * Copyright (C) 2005-2006 Atmel Corporation + * + * Based on arch/ppc64/kernel/kprobes.c + * Copyright (C) IBM Corporation, 2002, 2004 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include + +#include +#include +#include + +DEFINE_PER_CPU(struct kprobe *, current_kprobe); +static unsigned long kprobe_status; +static struct pt_regs jprobe_saved_regs; + +int __kprobes arch_prepare_kprobe(struct kprobe *p) +{ + int ret = 0; + + if ((unsigned long)p->addr & 0x01) { + printk("Attempt to register kprobe at an unaligned address\n"); + ret = -EINVAL; + } + + /* XXX: Might be a good idea to check if p->addr is a valid + * kernel address as well... */ + + if (!ret) { + pr_debug("copy kprobe at %p\n", p->addr); + memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); + p->opcode = *p->addr; + } + + return ret; +} + +void __kprobes arch_arm_kprobe(struct kprobe *p) +{ + pr_debug("arming kprobe at %p\n", p->addr); + *p->addr = BREAKPOINT_INSTRUCTION; + flush_icache_range((unsigned long)p->addr, + (unsigned long)p->addr + sizeof(kprobe_opcode_t)); +} + +void __kprobes arch_disarm_kprobe(struct kprobe *p) +{ + pr_debug("disarming kprobe at %p\n", p->addr); + *p->addr = p->opcode; + flush_icache_range((unsigned long)p->addr, + (unsigned long)p->addr + sizeof(kprobe_opcode_t)); +} + +static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) +{ + unsigned long dc; + + pr_debug("preparing to singlestep over %p (PC=%08lx)\n", + p->addr, regs->pc); + + BUG_ON(!(sysreg_read(SR) & SYSREG_BIT(SR_D))); + + dc = __mfdr(DBGREG_DC); + dc |= DC_SS; + __mtdr(DBGREG_DC, dc); + + /* + * We must run the instruction from its original location + * since it may actually reference PC. + * + * TODO: Do the instruction replacement directly in icache. + */ + *p->addr = p->opcode; + flush_icache_range((unsigned long)p->addr, + (unsigned long)p->addr + sizeof(kprobe_opcode_t)); +} + +static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs) +{ + unsigned long dc; + + pr_debug("resuming execution at PC=%08lx\n", regs->pc); + + dc = __mfdr(DBGREG_DC); + dc &= ~DC_SS; + __mtdr(DBGREG_DC, dc); + + *p->addr = BREAKPOINT_INSTRUCTION; + flush_icache_range((unsigned long)p->addr, + (unsigned long)p->addr + sizeof(kprobe_opcode_t)); +} + +static void __kprobes set_current_kprobe(struct kprobe *p) +{ + __get_cpu_var(current_kprobe) = p; +} + +static int __kprobes kprobe_handler(struct pt_regs *regs) +{ + struct kprobe *p; + void *addr = (void *)regs->pc; + int ret = 0; + + pr_debug("kprobe_handler: kprobe_running=%d\n", + kprobe_running()); + + /* + * We don't want to be preempted for the entire + * duration of kprobe processing + */ + preempt_disable(); + + /* Check that we're not recursing */ + if (kprobe_running()) { + p = get_kprobe(addr); + if (p) { + if (kprobe_status == KPROBE_HIT_SS) { + printk("FIXME: kprobe hit while single-stepping!\n"); + goto no_kprobe; + } + + printk("FIXME: kprobe hit while handling another kprobe\n"); + goto no_kprobe; + } else { + p = kprobe_running(); + if (p->break_handler && p->break_handler(p, regs)) + goto ss_probe; + } + /* If it's not ours, can't be delete race, (we hold lock). */ + goto no_kprobe; + } + + p = get_kprobe(addr); + if (!p) + goto no_kprobe; + + kprobe_status = KPROBE_HIT_ACTIVE; + set_current_kprobe(p); + if (p->pre_handler && p->pre_handler(p, regs)) + /* handler has already set things up, so skip ss setup */ + return 1; + +ss_probe: + prepare_singlestep(p, regs); + kprobe_status = KPROBE_HIT_SS; + return 1; + +no_kprobe: + return ret; +} + +static int __kprobes post_kprobe_handler(struct pt_regs *regs) +{ + struct kprobe *cur = kprobe_running(); + + pr_debug("post_kprobe_handler, cur=%p\n", cur); + + if (!cur) + return 0; + + if (cur->post_handler) { + kprobe_status = KPROBE_HIT_SSDONE; + cur->post_handler(cur, regs, 0); + } + + resume_execution(cur, regs); + reset_current_kprobe(); + preempt_enable_no_resched(); + + return 1; +} + +static int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) +{ + struct kprobe *cur = kprobe_running(); + + pr_debug("kprobe_fault_handler: trapnr=%d\n", trapnr); + + if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr)) + return 1; + + if (kprobe_status & KPROBE_HIT_SS) { + resume_execution(cur, regs); + preempt_enable_no_resched(); + } + return 0; +} + +/* + * Wrapper routine to for handling exceptions. + */ +int __kprobes kprobe_exceptions_notify(struct notifier_block *self, + unsigned long val, void *data) +{ + struct die_args *args = (struct die_args *)data; + int ret = NOTIFY_DONE; + + pr_debug("kprobe_exceptions_notify: val=%lu, data=%p\n", + val, data); + + switch (val) { + case DIE_BREAKPOINT: + if (kprobe_handler(args->regs)) + ret = NOTIFY_STOP; + break; + case DIE_SSTEP: + if (post_kprobe_handler(args->regs)) + ret = NOTIFY_STOP; + break; + case DIE_FAULT: + if (kprobe_running() + && kprobe_fault_handler(args->regs, args->trapnr)) + ret = NOTIFY_STOP; + break; + default: + break; + } + + return ret; +} + +int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) +{ + struct jprobe *jp = container_of(p, struct jprobe, kp); + + memcpy(&jprobe_saved_regs, regs, sizeof(struct pt_regs)); + + /* + * TODO: We should probably save some of the stack here as + * well, since gcc may pass arguments on the stack for certain + * functions (lots of arguments, large aggregates, varargs) + */ + + /* setup return addr to the jprobe handler routine */ + regs->pc = (unsigned long)jp->entry; + return 1; +} + +void __kprobes jprobe_return(void) +{ + asm volatile("breakpoint" ::: "memory"); +} + +int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) +{ + /* + * FIXME - we should ideally be validating that we got here 'cos + * of the "trap" in jprobe_return() above, before restoring the + * saved regs... + */ + memcpy(regs, &jprobe_saved_regs, sizeof(struct pt_regs)); + return 1; +} + +int __init arch_init_kprobes(void) +{ + printk("KPROBES: Enabling monitor mode (MM|DBE)...\n"); + __mtdr(DBGREG_DC, DC_MM | DC_DBE); + + /* TODO: Register kretprobe trampoline */ + return 0; +} diff --git a/arch/avr32/kernel/module.c b/arch/avr32/kernel/module.c new file mode 100644 index 0000000..dfc32f2 --- /dev/null +++ b/arch/avr32/kernel/module.c @@ -0,0 +1,324 @@ +/* + * AVR32-specific kernel module loader + * + * Copyright (C) 2005-2006 Atmel Corporation + * + * GOT initialization parts are based on the s390 version + * Copyright (C) 2002, 2003 IBM Deutschland Entwicklung GmbH, + * IBM Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include + +void *module_alloc(unsigned long size) +{ + if (size == 0) + return NULL; + return vmalloc(size); +} + +void module_free(struct module *mod, void *module_region) +{ + vfree(mod->arch.syminfo); + mod->arch.syminfo = NULL; + + vfree(module_region); + /* FIXME: if module_region == mod->init_region, trim exception + * table entries. */ +} + +static inline int check_rela(Elf32_Rela *rela, struct module *module, + char *strings, Elf32_Sym *symbols) +{ + struct mod_arch_syminfo *info; + + info = module->arch.syminfo + ELF32_R_SYM(rela->r_info); + switch (ELF32_R_TYPE(rela->r_info)) { + case R_AVR32_GOT32: + case R_AVR32_GOT16: + case R_AVR32_GOT8: + case R_AVR32_GOT21S: + case R_AVR32_GOT18SW: /* mcall */ + case R_AVR32_GOT16S: /* ld.w */ + if (rela->r_addend != 0) { + printk(KERN_ERR + "GOT relocation against %s at offset %u with addend\n", + strings + symbols[ELF32_R_SYM(rela->r_info)].st_name, + rela->r_offset); + return -ENOEXEC; + } + if (info->got_offset == -1UL) { + info->got_offset = module->arch.got_size; + module->arch.got_size += sizeof(void *); + } + pr_debug("GOT[%3lu] %s\n", info->got_offset, + strings + symbols[ELF32_R_SYM(rela->r_info)].st_name); + break; + } + + return 0; +} + +int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, + char *secstrings, struct module *module) +{ + Elf32_Shdr *symtab; + Elf32_Sym *symbols; + Elf32_Rela *rela; + char *strings; + int nrela, i, j; + int ret; + + /* Find the symbol table */ + symtab = NULL; + for (i = 0; i < hdr->e_shnum; i++) + switch (sechdrs[i].sh_type) { + case SHT_SYMTAB: + symtab = &sechdrs[i]; + break; + } + if (!symtab) { + printk(KERN_ERR "module %s: no symbol table\n", module->name); + return -ENOEXEC; + } + + /* Allocate room for one syminfo structure per symbol. */ + module->arch.nsyms = symtab->sh_size / sizeof(Elf_Sym); + module->arch.syminfo = vmalloc(module->arch.nsyms + * sizeof(struct mod_arch_syminfo)); + if (!module->arch.syminfo) + return -ENOMEM; + + symbols = (void *)hdr + symtab->sh_offset; + strings = (void *)hdr + sechdrs[symtab->sh_link].sh_offset; + for (i = 0; i < module->arch.nsyms; i++) { + if (symbols[i].st_shndx == SHN_UNDEF && + strcmp(strings + symbols[i].st_name, + "_GLOBAL_OFFSET_TABLE_") == 0) + /* "Define" it as absolute. */ + symbols[i].st_shndx = SHN_ABS; + module->arch.syminfo[i].got_offset = -1UL; + module->arch.syminfo[i].got_initialized = 0; + } + + /* Allocate GOT entries for symbols that need it. */ + module->arch.got_size = 0; + for (i = 0; i < hdr->e_shnum; i++) { + if (sechdrs[i].sh_type != SHT_RELA) + continue; + nrela = sechdrs[i].sh_size / sizeof(Elf32_Rela); + rela = (void *)hdr + sechdrs[i].sh_offset; + for (j = 0; j < nrela; j++) { + ret = check_rela(rela + j, module, + strings, symbols); + if (ret) + goto out_free_syminfo; + } + } + + /* + * Increase core size to make room for GOT and set start + * offset for GOT. + */ + module->core_size = ALIGN(module->core_size, 4); + module->arch.got_offset = module->core_size; + module->core_size += module->arch.got_size; + + return 0; + +out_free_syminfo: + vfree(module->arch.syminfo); + module->arch.syminfo = NULL; + + return ret; +} + +static inline int reloc_overflow(struct module *module, const char *reloc_name, + Elf32_Addr relocation) +{ + printk(KERN_ERR "module %s: Value %lx does not fit relocation %s\n", + module->name, (unsigned long)relocation, reloc_name); + return -ENOEXEC; +} + +#define get_u16(loc) (*((uint16_t *)loc)) +#define put_u16(loc, val) (*((uint16_t *)loc) = (val)) + +int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, + unsigned int symindex, unsigned int relindex, + struct module *module) +{ + Elf32_Shdr *symsec = sechdrs + symindex; + Elf32_Shdr *relsec = sechdrs + relindex; + Elf32_Shdr *dstsec = sechdrs + relsec->sh_info; + Elf32_Rela *rel = (void *)relsec->sh_addr; + unsigned int i; + int ret = 0; + + for (i = 0; i < relsec->sh_size / sizeof(Elf32_Rela); i++, rel++) { + struct mod_arch_syminfo *info; + Elf32_Sym *sym; + Elf32_Addr relocation; + uint32_t *location; + uint32_t value; + + location = (void *)dstsec->sh_addr + rel->r_offset; + sym = (Elf32_Sym *)symsec->sh_addr + ELF32_R_SYM(rel->r_info); + relocation = sym->st_value + rel->r_addend; + + info = module->arch.syminfo + ELF32_R_SYM(rel->r_info); + + /* Initialize GOT entry if necessary */ + switch (ELF32_R_TYPE(rel->r_info)) { + case R_AVR32_GOT32: + case R_AVR32_GOT16: + case R_AVR32_GOT8: + case R_AVR32_GOT21S: + case R_AVR32_GOT18SW: + case R_AVR32_GOT16S: + if (!info->got_initialized) { + Elf32_Addr *gotent; + + gotent = (module->module_core + + module->arch.got_offset + + info->got_offset); + *gotent = relocation; + info->got_initialized = 1; + } + + relocation = info->got_offset; + break; + } + + switch (ELF32_R_TYPE(rel->r_info)) { + case R_AVR32_32: + case R_AVR32_32_CPENT: + *location = relocation; + break; + case R_AVR32_22H_PCREL: + relocation -= (Elf32_Addr)location; + if ((relocation & 0xffe00001) != 0 + && (relocation & 0xffc00001) != 0xffc00000) + return reloc_overflow(module, + "R_AVR32_22H_PCREL", + relocation); + relocation >>= 1; + + value = *location; + value = ((value & 0xe1ef0000) + | (relocation & 0xffff) + | ((relocation & 0x10000) << 4) + | ((relocation & 0x1e0000) << 8)); + *location = value; + break; + case R_AVR32_11H_PCREL: + relocation -= (Elf32_Addr)location; + if ((relocation & 0xfffffc01) != 0 + && (relocation & 0xfffff801) != 0xfffff800) + return reloc_overflow(module, + "R_AVR32_11H_PCREL", + relocation); + value = get_u16(location); + value = ((value & 0xf00c) + | ((relocation & 0x1fe) << 3) + | ((relocation & 0x600) >> 9)); + put_u16(location, value); + break; + case R_AVR32_9H_PCREL: + relocation -= (Elf32_Addr)location; + if ((relocation & 0xffffff01) != 0 + && (relocation & 0xfffffe01) != 0xfffffe00) + return reloc_overflow(module, + "R_AVR32_9H_PCREL", + relocation); + value = get_u16(location); + value = ((value & 0xf00f) + | ((relocation & 0x1fe) << 3)); + put_u16(location, value); + break; + case R_AVR32_9UW_PCREL: + relocation -= ((Elf32_Addr)location) & 0xfffffffc; + if ((relocation & 0xfffffc03) != 0) + return reloc_overflow(module, + "R_AVR32_9UW_PCREL", + relocation); + value = get_u16(location); + value = ((value & 0xf80f) + | ((relocation & 0x1fc) << 2)); + put_u16(location, value); + break; + case R_AVR32_GOTPC: + /* + * R6 = PC - (PC - GOT) + * + * At this point, relocation contains the + * value of PC. Just subtract the value of + * GOT, and we're done. + */ + pr_debug("GOTPC: PC=0x%lx, got_offset=0x%lx, core=0x%p\n", + relocation, module->arch.got_offset, + module->module_core); + relocation -= ((unsigned long)module->module_core + + module->arch.got_offset); + *location = relocation; + break; + case R_AVR32_GOT18SW: + if ((relocation & 0xfffe0003) != 0 + && (relocation & 0xfffc0003) != 0xffff0000) + return reloc_overflow(module, "R_AVR32_GOT18SW", + relocation); + relocation >>= 2; + /* fall through */ + case R_AVR32_GOT16S: + if ((relocation & 0xffff8000) != 0 + && (relocation & 0xffff0000) != 0xffff0000) + return reloc_overflow(module, "R_AVR32_GOT16S", + relocation); + pr_debug("GOT reloc @ 0x%lx -> %lu\n", + rel->r_offset, relocation); + value = *location; + value = ((value & 0xffff0000) + | (relocation & 0xffff)); + *location = value; + break; + + default: + printk(KERN_ERR "module %s: Unknown relocation: %u\n", + module->name, ELF32_R_TYPE(rel->r_info)); + return -ENOEXEC; + } + } + + return ret; +} + +int apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, + unsigned int symindex, unsigned int relindex, + struct module *module) +{ + printk(KERN_ERR "module %s: REL relocations are not supported\n", + module->name); + return -ENOEXEC; +} + +int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, + struct module *module) +{ + vfree(module->arch.syminfo); + module->arch.syminfo = NULL; + + return 0; +} + +void module_arch_cleanup(struct module *module) +{ + +} diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c new file mode 100644 index 0000000..317dc50 --- /dev/null +++ b/arch/avr32/kernel/process.c @@ -0,0 +1,276 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +void (*pm_power_off)(void) = NULL; +EXPORT_SYMBOL(pm_power_off); + +/* + * This file handles the architecture-dependent parts of process handling.. + */ + +void cpu_idle(void) +{ + /* endless idle loop with no priority at all */ + while (1) { + /* TODO: Enter sleep mode */ + while (!need_resched()) + cpu_relax(); + preempt_enable_no_resched(); + schedule(); + preempt_disable(); + } +} + +void machine_halt(void) +{ +} + +void machine_power_off(void) +{ +} + +void machine_restart(char *cmd) +{ + __mtdr(DBGREG_DC, DC_DBE); + __mtdr(DBGREG_DC, DC_RES); + while (1) ; +} + +/* + * PC is actually discarded when returning from a system call -- the + * return address must be stored in LR. This function will make sure + * LR points to do_exit before starting the thread. + * + * Also, when returning from fork(), r12 is 0, so we must copy the + * argument as well. + * + * r0 : The argument to the main thread function + * r1 : The address of do_exit + * r2 : The address of the main thread function + */ +asmlinkage extern void kernel_thread_helper(void); +__asm__(" .type kernel_thread_helper, @function\n" + "kernel_thread_helper:\n" + " mov r12, r0\n" + " mov lr, r2\n" + " mov pc, r1\n" + " .size kernel_thread_helper, . - kernel_thread_helper"); + +int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) +{ + struct pt_regs regs; + + memset(®s, 0, sizeof(regs)); + + regs.r0 = (unsigned long)arg; + regs.r1 = (unsigned long)fn; + regs.r2 = (unsigned long)do_exit; + regs.lr = (unsigned long)kernel_thread_helper; + regs.pc = (unsigned long)kernel_thread_helper; + regs.sr = MODE_SUPERVISOR; + + return do_fork(flags | CLONE_VM | CLONE_UNTRACED, + 0, ®s, 0, NULL, NULL); +} +EXPORT_SYMBOL(kernel_thread); + +/* + * Free current thread data structures etc + */ +void exit_thread(void) +{ + /* nothing to do */ +} + +void flush_thread(void) +{ + /* nothing to do */ +} + +void release_thread(struct task_struct *dead_task) +{ + /* do nothing */ +} + +static const char *cpu_modes[] = { + "Application", "Supervisor", "Interrupt level 0", "Interrupt level 1", + "Interrupt level 2", "Interrupt level 3", "Exception", "NMI" +}; + +void show_regs(struct pt_regs *regs) +{ + unsigned long sp = regs->sp; + unsigned long lr = regs->lr; + unsigned long mode = (regs->sr & MODE_MASK) >> MODE_SHIFT; + + if (!user_mode(regs)) + sp = (unsigned long)regs + FRAME_SIZE_FULL; + + print_symbol("PC is at %s\n", instruction_pointer(regs)); + print_symbol("LR is at %s\n", lr); + printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" + "sp : %08lx r12: %08lx r11: %08lx\n", + instruction_pointer(regs), + lr, print_tainted(), sp, regs->r12, regs->r11); + printk("r10: %08lx r9 : %08lx r8 : %08lx\n", + regs->r10, regs->r9, regs->r8); + printk("r7 : %08lx r6 : %08lx r5 : %08lx r4 : %08lx\n", + regs->r7, regs->r6, regs->r5, regs->r4); + printk("r3 : %08lx r2 : %08lx r1 : %08lx r0 : %08lx\n", + regs->r3, regs->r2, regs->r1, regs->r0); + printk("Flags: %c%c%c%c%c\n", + regs->sr & SR_Q ? 'Q' : 'q', + regs->sr & SR_V ? 'V' : 'v', + regs->sr & SR_N ? 'N' : 'n', + regs->sr & SR_Z ? 'Z' : 'z', + regs->sr & SR_C ? 'C' : 'c'); + printk("Mode bits: %c%c%c%c%c%c%c%c%c\n", + regs->sr & SR_H ? 'H' : 'h', + regs->sr & SR_R ? 'R' : 'r', + regs->sr & SR_J ? 'J' : 'j', + regs->sr & SR_EM ? 'E' : 'e', + regs->sr & SR_I3M ? '3' : '.', + regs->sr & SR_I2M ? '2' : '.', + regs->sr & SR_I1M ? '1' : '.', + regs->sr & SR_I0M ? '0' : '.', + regs->sr & SR_GM ? 'G' : 'g'); + printk("CPU Mode: %s\n", cpu_modes[mode]); + + show_trace(NULL, (unsigned long *)sp, regs); +} +EXPORT_SYMBOL(show_regs); + +/* Fill in the fpu structure for a core dump. This is easy -- we don't have any */ +int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) +{ + /* Not valid */ + return 0; +} + +asmlinkage void ret_from_fork(void); + +int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, + unsigned long unused, + struct task_struct *p, struct pt_regs *regs) +{ + struct pt_regs *childregs; + + childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)p->thread_info)) - 1; + *childregs = *regs; + + if (user_mode(regs)) + childregs->sp = usp; + else + childregs->sp = (unsigned long)p->thread_info + THREAD_SIZE; + + childregs->r12 = 0; /* Set return value for child */ + + p->thread.cpu_context.sr = MODE_SUPERVISOR | SR_GM; + p->thread.cpu_context.ksp = (unsigned long)childregs; + p->thread.cpu_context.pc = (unsigned long)ret_from_fork; + + return 0; +} + +/* r12-r8 are dummy parameters to force the compiler to use the stack */ +asmlinkage int sys_fork(struct pt_regs *regs) +{ + return do_fork(SIGCHLD, regs->sp, regs, 0, NULL, NULL); +} + +asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, + unsigned long parent_tidptr, + unsigned long child_tidptr, struct pt_regs *regs) +{ + if (!newsp) + newsp = regs->sp; + return do_fork(clone_flags, newsp, regs, 0, + (int __user *)parent_tidptr, + (int __user *)child_tidptr); +} + +asmlinkage int sys_vfork(struct pt_regs *regs) +{ + return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->sp, regs, + 0, NULL, NULL); +} + +asmlinkage int sys_execve(char __user *ufilename, char __user *__user *uargv, + char __user *__user *uenvp, struct pt_regs *regs) +{ + int error; + char *filename; + + filename = getname(ufilename); + error = PTR_ERR(filename); + if (IS_ERR(filename)) + goto out; + + error = do_execve(filename, uargv, uenvp, regs); + if (error == 0) + current->ptrace &= ~PT_DTRACE; + putname(filename); + +out: + return error; +} + + +/* + * This function is supposed to answer the question "who called + * schedule()?" + */ +unsigned long get_wchan(struct task_struct *p) +{ + unsigned long pc; + unsigned long stack_page; + + if (!p || p == current || p->state == TASK_RUNNING) + return 0; + + stack_page = (unsigned long)p->thread_info; + BUG_ON(!stack_page); + + /* + * The stored value of PC is either the address right after + * the call to __switch_to() or ret_from_fork. + */ + pc = thread_saved_pc(p); + if (in_sched_functions(pc)) { +#ifdef CONFIG_FRAME_POINTER + unsigned long fp = p->thread.cpu_context.r7; + BUG_ON(fp < stack_page || fp > (THREAD_SIZE + stack_page)); + pc = *(unsigned long *)fp; +#else + /* + * We depend on the frame size of schedule here, which + * is actually quite ugly. It might be possible to + * determine the frame size automatically at build + * time by doing this: + * - compile sched.c + * - disassemble the resulting sched.o + * - look for 'sub sp,??' shortly after ':' + */ + unsigned long sp = p->thread.cpu_context.ksp + 16; + BUG_ON(sp < stack_page || sp > (THREAD_SIZE + stack_page)); + pc = *(unsigned long *)sp; +#endif + } + + return pc; +} diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c new file mode 100644 index 0000000..3c89e59 --- /dev/null +++ b/arch/avr32/kernel/ptrace.c @@ -0,0 +1,371 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#undef DEBUG +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +static struct pt_regs *get_user_regs(struct task_struct *tsk) +{ + return (struct pt_regs *)((unsigned long) tsk->thread_info + + THREAD_SIZE - sizeof(struct pt_regs)); +} + +static void ptrace_single_step(struct task_struct *tsk) +{ + pr_debug("ptrace_single_step: pid=%u, SR=0x%08lx\n", + tsk->pid, tsk->thread.cpu_context.sr); + if (!(tsk->thread.cpu_context.sr & SR_D)) { + /* + * Set a breakpoint at the current pc to force the + * process into debug mode. The syscall/exception + * exit code will set a breakpoint at the return + * address when this flag is set. + */ + pr_debug("ptrace_single_step: Setting TIF_BREAKPOINT\n"); + set_tsk_thread_flag(tsk, TIF_BREAKPOINT); + } + + /* The monitor code will do the actual step for us */ + set_tsk_thread_flag(tsk, TIF_SINGLE_STEP); +} + +/* + * Called by kernel/ptrace.c when detaching + * + * Make sure any single step bits, etc. are not set + */ +void ptrace_disable(struct task_struct *child) +{ + clear_tsk_thread_flag(child, TIF_SINGLE_STEP); +} + +/* + * Handle hitting a breakpoint + */ +static void ptrace_break(struct task_struct *tsk, struct pt_regs *regs) +{ + siginfo_t info; + + info.si_signo = SIGTRAP; + info.si_errno = 0; + info.si_code = TRAP_BRKPT; + info.si_addr = (void __user *)instruction_pointer(regs); + + pr_debug("ptrace_break: Sending SIGTRAP to PID %u (pc = 0x%p)\n", + tsk->pid, info.si_addr); + force_sig_info(SIGTRAP, &info, tsk); +} + +/* + * Read the word at offset "offset" into the task's "struct user". We + * actually access the pt_regs struct stored on the kernel stack. + */ +static int ptrace_read_user(struct task_struct *tsk, unsigned long offset, + unsigned long __user *data) +{ + unsigned long *regs; + unsigned long value; + + pr_debug("ptrace_read_user(%p, %#lx, %p)\n", + tsk, offset, data); + + if (offset & 3 || offset >= sizeof(struct user)) { + printk("ptrace_read_user: invalid offset 0x%08lx\n", offset); + return -EIO; + } + + regs = (unsigned long *)get_user_regs(tsk); + + value = 0; + if (offset < sizeof(struct pt_regs)) + value = regs[offset / sizeof(regs[0])]; + + return put_user(value, data); +} + +/* + * Write the word "value" to offset "offset" into the task's "struct + * user". We actually access the pt_regs struct stored on the kernel + * stack. + */ +static int ptrace_write_user(struct task_struct *tsk, unsigned long offset, + unsigned long value) +{ + unsigned long *regs; + + if (offset & 3 || offset >= sizeof(struct user)) { + printk("ptrace_write_user: invalid offset 0x%08lx\n", offset); + return -EIO; + } + + if (offset >= sizeof(struct pt_regs)) + return 0; + + regs = (unsigned long *)get_user_regs(tsk); + regs[offset / sizeof(regs[0])] = value; + + return 0; +} + +static int ptrace_getregs(struct task_struct *tsk, void __user *uregs) +{ + struct pt_regs *regs = get_user_regs(tsk); + + return copy_to_user(uregs, regs, sizeof(*regs)) ? -EFAULT : 0; +} + +static int ptrace_setregs(struct task_struct *tsk, const void __user *uregs) +{ + struct pt_regs newregs; + int ret; + + ret = -EFAULT; + if (copy_from_user(&newregs, uregs, sizeof(newregs)) == 0) { + struct pt_regs *regs = get_user_regs(tsk); + + ret = -EINVAL; + if (valid_user_regs(&newregs)) { + *regs = newregs; + ret = 0; + } + } + + return ret; +} + +long arch_ptrace(struct task_struct *child, long request, long addr, long data) +{ + unsigned long tmp; + int ret; + + pr_debug("arch_ptrace(%ld, %ld, %#lx, %#lx)\n", + request, child->pid, addr, data); + + pr_debug("ptrace: Enabling monitor mode...\n"); + __mtdr(DBGREG_DC, __mfdr(DBGREG_DC) | DC_MM | DC_DBE); + + switch (request) { + /* Read the word at location addr in the child process */ + case PTRACE_PEEKTEXT: + case PTRACE_PEEKDATA: + ret = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); + if (ret == sizeof(tmp)) + ret = put_user(tmp, (unsigned long __user *)data); + else + ret = -EIO; + break; + + case PTRACE_PEEKUSR: + ret = ptrace_read_user(child, addr, + (unsigned long __user *)data); + break; + + /* Write the word in data at location addr */ + case PTRACE_POKETEXT: + case PTRACE_POKEDATA: + ret = access_process_vm(child, addr, &data, sizeof(data), 1); + if (ret == sizeof(data)) + ret = 0; + else + ret = -EIO; + break; + + case PTRACE_POKEUSR: + ret = ptrace_write_user(child, addr, data); + break; + + /* continue and stop at next (return from) syscall */ + case PTRACE_SYSCALL: + /* restart after signal */ + case PTRACE_CONT: + ret = -EIO; + if (!valid_signal(data)) + break; + if (request == PTRACE_SYSCALL) + set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); + else + clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); + child->exit_code = data; + /* XXX: Are we sure no breakpoints are active here? */ + wake_up_process(child); + ret = 0; + break; + + /* + * Make the child exit. Best I can do is send it a + * SIGKILL. Perhaps it should be put in the status that it + * wants to exit. + */ + case PTRACE_KILL: + ret = 0; + if (child->exit_state == EXIT_ZOMBIE) + break; + child->exit_code = SIGKILL; + wake_up_process(child); + break; + + /* + * execute single instruction. + */ + case PTRACE_SINGLESTEP: + ret = -EIO; + if (!valid_signal(data)) + break; + clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); + ptrace_single_step(child); + child->exit_code = data; + wake_up_process(child); + ret = 0; + break; + + /* Detach a process that was attached */ + case PTRACE_DETACH: + ret = ptrace_detach(child, data); + break; + + case PTRACE_GETREGS: + ret = ptrace_getregs(child, (void __user *)data); + break; + + case PTRACE_SETREGS: + ret = ptrace_setregs(child, (const void __user *)data); + break; + + default: + ret = ptrace_request(child, request, addr, data); + break; + } + + pr_debug("sys_ptrace returning %d (DC = 0x%08lx)\n", ret, __mfdr(DBGREG_DC)); + return ret; +} + +asmlinkage void syscall_trace(void) +{ + pr_debug("syscall_trace called\n"); + if (!test_thread_flag(TIF_SYSCALL_TRACE)) + return; + if (!(current->ptrace & PT_PTRACED)) + return; + + pr_debug("syscall_trace: notifying parent\n"); + /* The 0x80 provides a way for the tracing parent to + * distinguish between a syscall stop and SIGTRAP delivery */ + ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) + ? 0x80 : 0)); + + /* + * this isn't the same as continuing with a signal, but it + * will do for normal use. strace only continues with a + * signal if the stopping signal is not SIGTRAP. -brl + */ + if (current->exit_code) { + pr_debug("syscall_trace: sending signal %d to PID %u\n", + current->exit_code, current->pid); + send_sig(current->exit_code, current, 1); + current->exit_code = 0; + } +} + +asmlinkage void do_debug_priv(struct pt_regs *regs) +{ + unsigned long dc, ds; + unsigned long die_val; + + ds = __mfdr(DBGREG_DS); + + pr_debug("do_debug_priv: pc = %08lx, ds = %08lx\n", regs->pc, ds); + + if (ds & DS_SSS) + die_val = DIE_SSTEP; + else + die_val = DIE_BREAKPOINT; + + if (notify_die(die_val, regs, 0, SIGTRAP) == NOTIFY_STOP) + return; + + if (likely(ds & DS_SSS)) { + extern void itlb_miss(void); + extern void tlb_miss_common(void); + struct thread_info *ti; + + dc = __mfdr(DBGREG_DC); + dc &= ~DC_SS; + __mtdr(DBGREG_DC, dc); + + ti = current_thread_info(); + ti->flags |= _TIF_BREAKPOINT; + + /* The TLB miss handlers don't check thread flags */ + if ((regs->pc >= (unsigned long)&itlb_miss) + && (regs->pc <= (unsigned long)&tlb_miss_common)) { + __mtdr(DBGREG_BWA2A, sysreg_read(RAR_EX)); + __mtdr(DBGREG_BWC2A, 0x40000001 | (get_asid() << 1)); + } + + /* + * If we're running in supervisor mode, the breakpoint + * will take us where we want directly, no need to + * single step. + */ + if ((regs->sr & MODE_MASK) != MODE_SUPERVISOR) + ti->flags |= TIF_SINGLE_STEP; + } else { + panic("Unable to handle debug trap at pc = %08lx\n", + regs->pc); + } +} + +/* + * Handle breakpoints, single steps and other debuggy things. To keep + * things simple initially, we run with interrupts and exceptions + * disabled all the time. + */ +asmlinkage void do_debug(struct pt_regs *regs) +{ + unsigned long dc, ds; + + ds = __mfdr(DBGREG_DS); + pr_debug("do_debug: pc = %08lx, ds = %08lx\n", regs->pc, ds); + + if (test_thread_flag(TIF_BREAKPOINT)) { + pr_debug("TIF_BREAKPOINT set\n"); + /* We're taking care of it */ + clear_thread_flag(TIF_BREAKPOINT); + __mtdr(DBGREG_BWC2A, 0); + } + + if (test_thread_flag(TIF_SINGLE_STEP)) { + pr_debug("TIF_SINGLE_STEP set, ds = 0x%08lx\n", ds); + if (ds & DS_SSS) { + dc = __mfdr(DBGREG_DC); + dc &= ~DC_SS; + __mtdr(DBGREG_DC, dc); + + clear_thread_flag(TIF_SINGLE_STEP); + ptrace_break(current, regs); + } + } else { + /* regular breakpoint */ + ptrace_break(current, regs); + } +} diff --git a/arch/avr32/kernel/semaphore.c b/arch/avr32/kernel/semaphore.c new file mode 100644 index 0000000..1e2705a --- /dev/null +++ b/arch/avr32/kernel/semaphore.c @@ -0,0 +1,148 @@ +/* + * AVR32 sempahore implementation. + * + * Copyright (C) 2004-2006 Atmel Corporation + * + * Based on linux/arch/i386/kernel/semaphore.c + * Copyright (C) 1999 Linus Torvalds + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include + +#include +#include + +/* + * Semaphores are implemented using a two-way counter: + * The "count" variable is decremented for each process + * that tries to acquire the semaphore, while the "sleeping" + * variable is a count of such acquires. + * + * Notably, the inline "up()" and "down()" functions can + * efficiently test if they need to do any extra work (up + * needs to do something only if count was negative before + * the increment operation. + * + * "sleeping" and the contention routine ordering is protected + * by the spinlock in the semaphore's waitqueue head. + * + * Note that these functions are only called when there is + * contention on the lock, and as such all this is the + * "non-critical" part of the whole semaphore business. The + * critical part is the inline stuff in + * where we want to avoid any extra jumps and calls. + */ + +/* + * Logic: + * - only on a boundary condition do we need to care. When we go + * from a negative count to a non-negative, we wake people up. + * - when we go from a non-negative count to a negative do we + * (a) synchronize with the "sleeper" count and (b) make sure + * that we're on the wakeup list before we synchronize so that + * we cannot lose wakeup events. + */ + +void __up(struct semaphore *sem) +{ + wake_up(&sem->wait); +} +EXPORT_SYMBOL(__up); + +void __sched __down(struct semaphore *sem) +{ + struct task_struct *tsk = current; + DECLARE_WAITQUEUE(wait, tsk); + unsigned long flags; + + tsk->state = TASK_UNINTERRUPTIBLE; + spin_lock_irqsave(&sem->wait.lock, flags); + add_wait_queue_exclusive_locked(&sem->wait, &wait); + + sem->sleepers++; + for (;;) { + int sleepers = sem->sleepers; + + /* + * Add "everybody else" into it. They aren't + * playing, because we own the spinlock in + * the wait_queue_head. + */ + if (atomic_add_return(sleepers - 1, &sem->count) >= 0) { + sem->sleepers = 0; + break; + } + sem->sleepers = 1; /* us - see -1 above */ + spin_unlock_irqrestore(&sem->wait.lock, flags); + + schedule(); + + spin_lock_irqsave(&sem->wait.lock, flags); + tsk->state = TASK_UNINTERRUPTIBLE; + } + remove_wait_queue_locked(&sem->wait, &wait); + wake_up_locked(&sem->wait); + spin_unlock_irqrestore(&sem->wait.lock, flags); + tsk->state = TASK_RUNNING; +} +EXPORT_SYMBOL(__down); + +int __sched __down_interruptible(struct semaphore *sem) +{ + int retval = 0; + struct task_struct *tsk = current; + DECLARE_WAITQUEUE(wait, tsk); + unsigned long flags; + + tsk->state = TASK_INTERRUPTIBLE; + spin_lock_irqsave(&sem->wait.lock, flags); + add_wait_queue_exclusive_locked(&sem->wait, &wait); + + sem->sleepers++; + for (;;) { + int sleepers = sem->sleepers; + + /* + * With signals pending, this turns into the trylock + * failure case - we won't be sleeping, and we can't + * get the lock as it has contention. Just correct the + * count and exit. + */ + if (signal_pending(current)) { + retval = -EINTR; + sem->sleepers = 0; + atomic_add(sleepers, &sem->count); + break; + } + + /* + * Add "everybody else" into it. They aren't + * playing, because we own the spinlock in + * the wait_queue_head. + */ + if (atomic_add_return(sleepers - 1, &sem->count) >= 0) { + sem->sleepers = 0; + break; + } + sem->sleepers = 1; /* us - see -1 above */ + spin_unlock_irqrestore(&sem->wait.lock, flags); + + schedule(); + + spin_lock_irqsave(&sem->wait.lock, flags); + tsk->state = TASK_INTERRUPTIBLE; + } + remove_wait_queue_locked(&sem->wait, &wait); + wake_up_locked(&sem->wait); + spin_unlock_irqrestore(&sem->wait.lock, flags); + + tsk->state = TASK_RUNNING; + return retval; +} +EXPORT_SYMBOL(__down_interruptible); diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c new file mode 100644 index 0000000..5d68f3c --- /dev/null +++ b/arch/avr32/kernel/setup.c @@ -0,0 +1,335 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +extern int root_mountflags; + +/* + * Bootloader-provided information about physical memory + */ +struct tag_mem_range *mem_phys; +struct tag_mem_range *mem_reserved; +struct tag_mem_range *mem_ramdisk; + +/* + * Initialize loops_per_jiffy as 5000000 (500MIPS). + * Better make it too large than too small... + */ +struct avr32_cpuinfo boot_cpu_data = { + .loops_per_jiffy = 5000000 +}; +EXPORT_SYMBOL(boot_cpu_data); + +static char command_line[COMMAND_LINE_SIZE]; + +/* + * Should be more than enough, but if you have a _really_ complex + * setup, you might need to increase the size of this... + */ +static struct tag_mem_range __initdata mem_range_cache[32]; +static unsigned mem_range_next_free; + +/* + * Standard memory resources + */ +static struct resource mem_res[] = { + { + .name = "Kernel code", + .start = 0, + .end = 0, + .flags = IORESOURCE_MEM + }, + { + .name = "Kernel data", + .start = 0, + .end = 0, + .flags = IORESOURCE_MEM, + }, +}; + +#define kernel_code mem_res[0] +#define kernel_data mem_res[1] + +/* + * Early framebuffer allocation. Works as follows: + * - If fbmem_size is zero, nothing will be allocated or reserved. + * - If fbmem_start is zero when setup_bootmem() is called, + * fbmem_size bytes will be allocated from the bootmem allocator. + * - If fbmem_start is nonzero, an area of size fbmem_size will be + * reserved at the physical address fbmem_start if necessary. If + * the area isn't in a memory region known to the kernel, it will + * be left alone. + * + * Board-specific code may use these variables to set up platform data + * for the framebuffer driver if fbmem_size is nonzero. + */ +static unsigned long __initdata fbmem_start; +static unsigned long __initdata fbmem_size; + +/* + * "fbmem=xxx[kKmM]" allocates the specified amount of boot memory for + * use as framebuffer. + * + * "fbmem=xxx[kKmM]@yyy[kKmM]" defines a memory region of size xxx and + * starting at yyy to be reserved for use as framebuffer. + * + * The kernel won't verify that the memory region starting at yyy + * actually contains usable RAM. + */ +static int __init early_parse_fbmem(char *p) +{ + fbmem_size = memparse(p, &p); + if (*p == '@') + fbmem_start = memparse(p, &p); + return 0; +} +early_param("fbmem", early_parse_fbmem); + +static inline void __init resource_init(void) +{ + struct tag_mem_range *region; + + kernel_code.start = __pa(init_mm.start_code); + kernel_code.end = __pa(init_mm.end_code - 1); + kernel_data.start = __pa(init_mm.end_code); + kernel_data.end = __pa(init_mm.brk - 1); + + for (region = mem_phys; region; region = region->next) { + struct resource *res; + unsigned long phys_start, phys_end; + + if (region->size == 0) + continue; + + phys_start = region->addr; + phys_end = phys_start + region->size - 1; + + res = alloc_bootmem_low(sizeof(*res)); + res->name = "System RAM"; + res->start = phys_start; + res->end = phys_end; + res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; + + request_resource (&iomem_resource, res); + + if (kernel_code.start >= res->start && + kernel_code.end <= res->end) + request_resource (res, &kernel_code); + if (kernel_data.start >= res->start && + kernel_data.end <= res->end) + request_resource (res, &kernel_data); + } +} + +static int __init parse_tag_core(struct tag *tag) +{ + if (tag->hdr.size > 2) { + if ((tag->u.core.flags & 1) == 0) + root_mountflags &= ~MS_RDONLY; + ROOT_DEV = new_decode_dev(tag->u.core.rootdev); + } + return 0; +} +__tagtable(ATAG_CORE, parse_tag_core); + +static int __init parse_tag_mem_range(struct tag *tag, + struct tag_mem_range **root) +{ + struct tag_mem_range *cur, **pprev; + struct tag_mem_range *new; + + /* + * Ignore zero-sized entries. If we're running standalone, the + * SDRAM code may emit such entries if something goes + * wrong... + */ + if (tag->u.mem_range.size == 0) + return 0; + + /* + * Copy the data so the bootmem init code doesn't need to care + * about it. + */ + if (mem_range_next_free >= + (sizeof(mem_range_cache) / sizeof(mem_range_cache[0]))) + panic("Physical memory map too complex!\n"); + + new = &mem_range_cache[mem_range_next_free++]; + *new = tag->u.mem_range; + + pprev = root; + cur = *root; + while (cur) { + pprev = &cur->next; + cur = cur->next; + } + + *pprev = new; + new->next = NULL; + + return 0; +} + +static int __init parse_tag_mem(struct tag *tag) +{ + return parse_tag_mem_range(tag, &mem_phys); +} +__tagtable(ATAG_MEM, parse_tag_mem); + +static int __init parse_tag_cmdline(struct tag *tag) +{ + strlcpy(saved_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE); + return 0; +} +__tagtable(ATAG_CMDLINE, parse_tag_cmdline); + +static int __init parse_tag_rdimg(struct tag *tag) +{ + return parse_tag_mem_range(tag, &mem_ramdisk); +} +__tagtable(ATAG_RDIMG, parse_tag_rdimg); + +static int __init parse_tag_clock(struct tag *tag) +{ + /* + * We'll figure out the clocks by peeking at the system + * manager regs directly. + */ + return 0; +} +__tagtable(ATAG_CLOCK, parse_tag_clock); + +static int __init parse_tag_rsvd_mem(struct tag *tag) +{ + return parse_tag_mem_range(tag, &mem_reserved); +} +__tagtable(ATAG_RSVD_MEM, parse_tag_rsvd_mem); + +static int __init parse_tag_ethernet(struct tag *tag) +{ +#if 0 + const struct platform_device *pdev; + + /* + * We really need a bus type that supports "classes"...this + * will do for now (until we must handle other kinds of + * ethernet controllers) + */ + pdev = platform_get_device("macb", tag->u.ethernet.mac_index); + if (pdev && pdev->dev.platform_data) { + struct eth_platform_data *data = pdev->dev.platform_data; + + data->valid = 1; + data->mii_phy_addr = tag->u.ethernet.mii_phy_addr; + memcpy(data->hw_addr, tag->u.ethernet.hw_address, + sizeof(data->hw_addr)); + } +#endif + return 0; +} +__tagtable(ATAG_ETHERNET, parse_tag_ethernet); + +/* + * Scan the tag table for this tag, and call its parse function. The + * tag table is built by the linker from all the __tagtable + * declarations. + */ +static int __init parse_tag(struct tag *tag) +{ + extern struct tagtable __tagtable_begin, __tagtable_end; + struct tagtable *t; + + for (t = &__tagtable_begin; t < &__tagtable_end; t++) + if (tag->hdr.tag == t->tag) { + t->parse(tag); + break; + } + + return t < &__tagtable_end; +} + +/* + * Parse all tags in the list we got from the boot loader + */ +static void __init parse_tags(struct tag *t) +{ + for (; t->hdr.tag != ATAG_NONE; t = tag_next(t)) + if (!parse_tag(t)) + printk(KERN_WARNING + "Ignoring unrecognised tag 0x%08x\n", + t->hdr.tag); +} + +void __init setup_arch (char **cmdline_p) +{ + struct clk *cpu_clk; + + parse_tags(bootloader_tags); + + setup_processor(); + setup_platform(); + + cpu_clk = clk_get(NULL, "cpu"); + if (IS_ERR(cpu_clk)) { + printk(KERN_WARNING "Warning: Unable to get CPU clock\n"); + } else { + unsigned long cpu_hz = clk_get_rate(cpu_clk); + + /* + * Well, duh, but it's probably a good idea to + * increment the use count. + */ + clk_enable(cpu_clk); + + boot_cpu_data.clk = cpu_clk; + boot_cpu_data.loops_per_jiffy = cpu_hz * 4; + printk("CPU: Running at %lu.%03lu MHz\n", + ((cpu_hz + 500) / 1000) / 1000, + ((cpu_hz + 500) / 1000) % 1000); + } + + init_mm.start_code = (unsigned long) &_text; + init_mm.end_code = (unsigned long) &_etext; + init_mm.end_data = (unsigned long) &_edata; + init_mm.brk = (unsigned long) &_end; + + strlcpy(command_line, saved_command_line, COMMAND_LINE_SIZE); + *cmdline_p = command_line; + parse_early_param(); + + setup_bootmem(); + + board_setup_fbmem(fbmem_start, fbmem_size); + +#ifdef CONFIG_VT + conswitchp = &dummy_con; +#endif + + paging_init(); + + resource_init(); +} diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c new file mode 100644 index 0000000..3309665 --- /dev/null +++ b/arch/avr32/kernel/signal.c @@ -0,0 +1,328 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * Based on linux/arch/sh/kernel/signal.c + * Copyright (C) 1999, 2000 Niibe Yutaka & Kaz Kojima + * Copyright (C) 1991, 1992 Linus Torvalds + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) + +asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, + struct pt_regs *regs) +{ + return do_sigaltstack(uss, uoss, regs->sp); +} + +struct rt_sigframe +{ + struct siginfo info; + struct ucontext uc; + unsigned long retcode; +}; + +static int +restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) +{ + int err = 0; + +#define COPY(x) err |= __get_user(regs->x, &sc->x) + COPY(sr); + COPY(pc); + COPY(lr); + COPY(sp); + COPY(r12); + COPY(r11); + COPY(r10); + COPY(r9); + COPY(r8); + COPY(r7); + COPY(r6); + COPY(r5); + COPY(r4); + COPY(r3); + COPY(r2); + COPY(r1); + COPY(r0); +#undef COPY + + /* + * Don't allow anyone to pretend they're running in supervisor + * mode or something... + */ + err |= !valid_user_regs(regs); + + return err; +} + + +asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) +{ + struct rt_sigframe __user *frame; + sigset_t set; + + frame = (struct rt_sigframe __user *)regs->sp; + pr_debug("SIG return: frame = %p\n", frame); + + if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) + goto badframe; + + if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) + goto badframe; + + sigdelsetmask(&set, ~_BLOCKABLE); + spin_lock_irq(¤t->sighand->siglock); + current->blocked = set; + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); + + if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) + goto badframe; + + pr_debug("Context restored: pc = %08lx, lr = %08lx, sp = %08lx\n", + regs->pc, regs->lr, regs->sp); + + return regs->r12; + +badframe: + force_sig(SIGSEGV, current); + return 0; +} + +static int +setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs) +{ + int err = 0; + +#define COPY(x) err |= __put_user(regs->x, &sc->x) + COPY(sr); + COPY(pc); + COPY(lr); + COPY(sp); + COPY(r12); + COPY(r11); + COPY(r10); + COPY(r9); + COPY(r8); + COPY(r7); + COPY(r6); + COPY(r5); + COPY(r4); + COPY(r3); + COPY(r2); + COPY(r1); + COPY(r0); +#undef COPY + + return err; +} + +static inline void __user * +get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, int framesize) +{ + unsigned long sp = regs->sp; + + if ((ka->sa.sa_flags & SA_ONSTACK) && !sas_ss_flags(sp)) + sp = current->sas_ss_sp + current->sas_ss_size; + + return (void __user *)((sp - framesize) & ~3); +} + +static int +setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, + sigset_t *set, struct pt_regs *regs) +{ + struct rt_sigframe __user *frame; + int err = 0; + + frame = get_sigframe(ka, regs, sizeof(*frame)); + err = -EFAULT; + if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame))) + goto out; + + /* + * Set up the return code: + * + * mov r8, __NR_rt_sigreturn + * scall + * + * Note: This will blow up since we're using a non-executable + * stack. Better use SA_RESTORER. + */ +#if __NR_rt_sigreturn > 127 +# error __NR_rt_sigreturn must be < 127 to fit in a short mov +#endif + err = __put_user(0x3008d733 | (__NR_rt_sigreturn << 20), + &frame->retcode); + + err |= copy_siginfo_to_user(&frame->info, info); + + /* Set up the ucontext */ + err |= __put_user(0, &frame->uc.uc_flags); + err |= __put_user(NULL, &frame->uc.uc_link); + err |= __put_user((void __user *)current->sas_ss_sp, + &frame->uc.uc_stack.ss_sp); + err |= __put_user(sas_ss_flags(regs->sp), + &frame->uc.uc_stack.ss_flags); + err |= __put_user(current->sas_ss_size, + &frame->uc.uc_stack.ss_size); + err |= setup_sigcontext(&frame->uc.uc_mcontext, regs); + err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); + + if (err) + goto out; + + regs->r12 = sig; + regs->r11 = (unsigned long) &frame->info; + regs->r10 = (unsigned long) &frame->uc; + regs->sp = (unsigned long) frame; + if (ka->sa.sa_flags & SA_RESTORER) + regs->lr = (unsigned long)ka->sa.sa_restorer; + else { + printk(KERN_NOTICE "[%s:%d] did not set SA_RESTORER\n", + current->comm, current->pid); + regs->lr = (unsigned long) &frame->retcode; + } + + pr_debug("SIG deliver [%s:%d]: sig=%d sp=0x%lx pc=0x%lx->0x%p lr=0x%lx\n", + current->comm, current->pid, sig, regs->sp, + regs->pc, ka->sa.sa_handler, regs->lr); + + regs->pc = (unsigned long) ka->sa.sa_handler; + +out: + return err; +} + +static inline void restart_syscall(struct pt_regs *regs) +{ + if (regs->r12 == -ERESTART_RESTARTBLOCK) + regs->r8 = __NR_restart_syscall; + else + regs->r12 = regs->r12_orig; + regs->pc -= 2; +} + +static inline void +handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, + sigset_t *oldset, struct pt_regs *regs, int syscall) +{ + int ret; + + /* + * Set up the stack frame + */ + ret = setup_rt_frame(sig, ka, info, oldset, regs); + + /* + * Check that the resulting registers are sane + */ + ret |= !valid_user_regs(regs); + + /* + * Block the signal if we were unsuccessful. + */ + if (ret != 0 || !(ka->sa.sa_flags & SA_NODEFER)) { + spin_lock_irq(¤t->sighand->siglock); + sigorsets(¤t->blocked, ¤t->blocked, + &ka->sa.sa_mask); + sigaddset(¤t->blocked, sig); + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); + } + + if (ret == 0) + return; + + force_sigsegv(sig, current); +} + +/* + * Note that 'init' is a special process: it doesn't get signals it + * doesn't want to handle. Thus you cannot kill init even with a + * SIGKILL even by mistake. + */ +int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall) +{ + siginfo_t info; + int signr; + struct k_sigaction ka; + + /* + * We want the common case to go fast, which is why we may in + * certain cases get here from kernel mode. Just return + * without doing anything if so. + */ + if (!user_mode(regs)) + return 0; + + if (try_to_freeze()) { + signr = 0; + if (!signal_pending(current)) + goto no_signal; + } + + if (test_thread_flag(TIF_RESTORE_SIGMASK)) + oldset = ¤t->saved_sigmask; + else if (!oldset) + oldset = ¤t->blocked; + + signr = get_signal_to_deliver(&info, &ka, regs, NULL); +no_signal: + if (syscall) { + switch (regs->r12) { + case -ERESTART_RESTARTBLOCK: + case -ERESTARTNOHAND: + if (signr > 0) { + regs->r12 = -EINTR; + break; + } + /* fall through */ + case -ERESTARTSYS: + if (signr > 0 && !(ka.sa.sa_flags & SA_RESTART)) { + regs->r12 = -EINTR; + break; + } + /* fall through */ + case -ERESTARTNOINTR: + restart_syscall(regs); + } + } + + if (signr == 0) { + /* No signal to deliver -- put the saved sigmask back */ + if (test_thread_flag(TIF_RESTORE_SIGMASK)) { + clear_thread_flag(TIF_RESTORE_SIGMASK); + sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); + } + return 0; + } + + handle_signal(signr, &ka, &info, oldset, regs, syscall); + return 1; +} + +asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti) +{ + int syscall = 0; + + if ((sysreg_read(SR) & MODE_MASK) == MODE_SUPERVISOR) + syscall = 1; + + if (ti->flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) + do_signal(regs, ¤t->blocked, syscall); +} diff --git a/arch/avr32/kernel/switch_to.S b/arch/avr32/kernel/switch_to.S new file mode 100644 index 0000000..a48d046 --- /dev/null +++ b/arch/avr32/kernel/switch_to.S @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include + + .text + .global __switch_to + .type __switch_to, @function + + /* Switch thread context from "prev" to "next", returning "last" + * r12 : prev + * r11 : &prev->thread + 1 + * r10 : &next->thread + */ +__switch_to: + stm --r11, r0,r1,r2,r3,r4,r5,r6,r7,sp,lr + mfsr r9, SYSREG_SR + st.w --r11, r9 + ld.w r8, r10++ + /* + * schedule() may have been called from a mode with a different + * set of registers. Make sure we don't lose anything here. + */ + pushm r10,r12 + mtsr SYSREG_SR, r8 + frs /* flush the return stack */ + sub pc, -2 /* flush the pipeline */ + popm r10,r12 + ldm r10++, r0,r1,r2,r3,r4,r5,r6,r7,sp,pc + .size __switch_to, . - __switch_to diff --git a/arch/avr32/kernel/sys_avr32.c b/arch/avr32/kernel/sys_avr32.c new file mode 100644 index 0000000..8deb600 --- /dev/null +++ b/arch/avr32/kernel/sys_avr32.c @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include +#include + +#include +#include + +asmlinkage int sys_pipe(unsigned long __user *filedes) +{ + int fd[2]; + int error; + + error = do_pipe(fd); + if (!error) { + if (copy_to_user(filedes, fd, sizeof(fd))) + error = -EFAULT; + } + return error; +} + +asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, off_t offset) +{ + int error = -EBADF; + struct file *file = NULL; + + flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); + if (!(flags & MAP_ANONYMOUS)) { + file = fget(fd); + if (!file) + return error; + } + + down_write(¤t->mm->mmap_sem); + error = do_mmap_pgoff(file, addr, len, prot, flags, offset); + up_write(¤t->mm->mmap_sem); + + if (file) + fput(file); + return error; +} + +int kernel_execve(const char *file, char **argv, char **envp) +{ + register long scno asm("r8") = __NR_execve; + register long sc1 asm("r12") = (long)file; + register long sc2 asm("r11") = (long)argv; + register long sc3 asm("r10") = (long)envp; + + asm volatile("scall" + : "=r"(sc1) + : "r"(scno), "0"(sc1), "r"(sc2), "r"(sc3) + : "cc", "memory"); + return sc1; +} diff --git a/arch/avr32/kernel/syscall-stubs.S b/arch/avr32/kernel/syscall-stubs.S new file mode 100644 index 0000000..7589a9b --- /dev/null +++ b/arch/avr32/kernel/syscall-stubs.S @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2005-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * Stubs for syscalls that require access to pt_regs or that take more + * than five parameters. + */ + +#define ARG6 r3 + + .text + .global __sys_rt_sigsuspend + .type __sys_rt_sigsuspend,@function +__sys_rt_sigsuspend: + mov r10, sp + rjmp sys_rt_sigsuspend + + .global __sys_sigaltstack + .type __sys_sigaltstack,@function +__sys_sigaltstack: + mov r10, sp + rjmp sys_sigaltstack + + .global __sys_rt_sigreturn + .type __sys_rt_sigreturn,@function +__sys_rt_sigreturn: + mov r12, sp + rjmp sys_rt_sigreturn + + .global __sys_fork + .type __sys_fork,@function +__sys_fork: + mov r12, sp + rjmp sys_fork + + .global __sys_clone + .type __sys_clone,@function +__sys_clone: + mov r8, sp + rjmp sys_clone + + .global __sys_vfork + .type __sys_vfork,@function +__sys_vfork: + mov r12, sp + rjmp sys_vfork + + .global __sys_execve + .type __sys_execve,@function +__sys_execve: + mov r9, sp + rjmp sys_execve + + .global __sys_mmap2 + .type __sys_mmap2,@function +__sys_mmap2: + pushm lr + st.w --sp, ARG6 + rcall sys_mmap2 + sub sp, -4 + popm pc + + .global __sys_sendto + .type __sys_sendto,@function +__sys_sendto: + pushm lr + st.w --sp, ARG6 + rcall sys_sendto + sub sp, -4 + popm pc + + .global __sys_recvfrom + .type __sys_recvfrom,@function +__sys_recvfrom: + pushm lr + st.w --sp, ARG6 + rcall sys_recvfrom + sub sp, -4 + popm pc + + .global __sys_pselect6 + .type __sys_pselect6,@function +__sys_pselect6: + pushm lr + st.w --sp, ARG6 + rcall sys_pselect6 + sub sp, -4 + popm pc + + .global __sys_splice + .type __sys_splice,@function +__sys_splice: + pushm lr + st.w --sp, ARG6 + rcall sys_splice + sub sp, -4 + popm pc diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S new file mode 100644 index 0000000..63b2069 --- /dev/null +++ b/arch/avr32/kernel/syscall_table.S @@ -0,0 +1,289 @@ +/* + * AVR32 system call table + * + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#if !defined(CONFIG_NFSD) && !defined(CONFIG_NFSD_MODULE) +#define sys_nfsservctl sys_ni_syscall +#endif + +#if !defined(CONFIG_SYSV_IPC) +# define sys_ipc sys_ni_syscall +#endif + + .section .rodata,"a",@progbits + .type sys_call_table,@object + .global sys_call_table + .align 2 +sys_call_table: + .long sys_restart_syscall + .long sys_exit + .long __sys_fork + .long sys_read + .long sys_write + .long sys_open /* 5 */ + .long sys_close + .long sys_umask + .long sys_creat + .long sys_link + .long sys_unlink /* 10 */ + .long __sys_execve + .long sys_chdir + .long sys_time + .long sys_mknod + .long sys_chmod /* 15 */ + .long sys_chown + .long sys_lchown + .long sys_lseek + .long sys_llseek + .long sys_getpid /* 20 */ + .long sys_mount + .long sys_umount + .long sys_setuid + .long sys_getuid + .long sys_stime /* 25 */ + .long sys_ptrace + .long sys_alarm + .long sys_pause + .long sys_utime + .long sys_newstat /* 30 */ + .long sys_newfstat + .long sys_newlstat + .long sys_access + .long sys_chroot + .long sys_sync /* 35 */ + .long sys_fsync + .long sys_kill + .long sys_rename + .long sys_mkdir + .long sys_rmdir /* 40 */ + .long sys_dup + .long sys_pipe + .long sys_times + .long __sys_clone + .long sys_brk /* 45 */ + .long sys_setgid + .long sys_getgid + .long sys_getcwd + .long sys_geteuid + .long sys_getegid /* 50 */ + .long sys_acct + .long sys_setfsuid + .long sys_setfsgid + .long sys_ioctl + .long sys_fcntl /* 55 */ + .long sys_setpgid + .long sys_mremap + .long sys_setresuid + .long sys_getresuid + .long sys_setreuid /* 60 */ + .long sys_setregid + .long sys_ustat + .long sys_dup2 + .long sys_getppid + .long sys_getpgrp /* 65 */ + .long sys_setsid + .long sys_rt_sigaction + .long __sys_rt_sigreturn + .long sys_rt_sigprocmask + .long sys_rt_sigpending /* 70 */ + .long sys_rt_sigtimedwait + .long sys_rt_sigqueueinfo + .long __sys_rt_sigsuspend + .long sys_sethostname + .long sys_setrlimit /* 75 */ + .long sys_getrlimit + .long sys_getrusage + .long sys_gettimeofday + .long sys_settimeofday + .long sys_getgroups /* 80 */ + .long sys_setgroups + .long sys_select + .long sys_symlink + .long sys_fchdir + .long sys_readlink /* 85 */ + .long sys_pread64 + .long sys_pwrite64 + .long sys_swapon + .long sys_reboot + .long __sys_mmap2 /* 90 */ + .long sys_munmap + .long sys_truncate + .long sys_ftruncate + .long sys_fchmod + .long sys_fchown /* 95 */ + .long sys_getpriority + .long sys_setpriority + .long sys_wait4 + .long sys_statfs + .long sys_fstatfs /* 100 */ + .long sys_vhangup + .long __sys_sigaltstack + .long sys_syslog + .long sys_setitimer + .long sys_getitimer /* 105 */ + .long sys_swapoff + .long sys_sysinfo + .long sys_ipc + .long sys_sendfile + .long sys_setdomainname /* 110 */ + .long sys_newuname + .long sys_adjtimex + .long sys_mprotect + .long __sys_vfork + .long sys_init_module /* 115 */ + .long sys_delete_module + .long sys_quotactl + .long sys_getpgid + .long sys_bdflush + .long sys_sysfs /* 120 */ + .long sys_personality + .long sys_ni_syscall /* reserved for afs_syscall */ + .long sys_getdents + .long sys_flock + .long sys_msync /* 125 */ + .long sys_readv + .long sys_writev + .long sys_getsid + .long sys_fdatasync + .long sys_sysctl /* 130 */ + .long sys_mlock + .long sys_munlock + .long sys_mlockall + .long sys_munlockall + .long sys_sched_setparam /* 135 */ + .long sys_sched_getparam + .long sys_sched_setscheduler + .long sys_sched_getscheduler + .long sys_sched_yield + .long sys_sched_get_priority_max /* 140 */ + .long sys_sched_get_priority_min + .long sys_sched_rr_get_interval + .long sys_nanosleep + .long sys_poll + .long sys_nfsservctl /* 145 */ + .long sys_setresgid + .long sys_getresgid + .long sys_prctl + .long sys_socket + .long sys_bind /* 150 */ + .long sys_connect + .long sys_listen + .long sys_accept + .long sys_getsockname + .long sys_getpeername /* 155 */ + .long sys_socketpair + .long sys_send + .long sys_recv + .long __sys_sendto + .long __sys_recvfrom /* 160 */ + .long sys_shutdown + .long sys_setsockopt + .long sys_getsockopt + .long sys_sendmsg + .long sys_recvmsg /* 165 */ + .long sys_truncate64 + .long sys_ftruncate64 + .long sys_stat64 + .long sys_lstat64 + .long sys_fstat64 /* 170 */ + .long sys_pivot_root + .long sys_mincore + .long sys_madvise + .long sys_getdents64 + .long sys_fcntl64 /* 175 */ + .long sys_gettid + .long sys_readahead + .long sys_setxattr + .long sys_lsetxattr + .long sys_fsetxattr /* 180 */ + .long sys_getxattr + .long sys_lgetxattr + .long sys_fgetxattr + .long sys_listxattr + .long sys_llistxattr /* 185 */ + .long sys_flistxattr + .long sys_removexattr + .long sys_lremovexattr + .long sys_fremovexattr + .long sys_tkill /* 190 */ + .long sys_sendfile64 + .long sys_futex + .long sys_sched_setaffinity + .long sys_sched_getaffinity + .long sys_capget /* 195 */ + .long sys_capset + .long sys_io_setup + .long sys_io_destroy + .long sys_io_getevents + .long sys_io_submit /* 200 */ + .long sys_io_cancel + .long sys_fadvise64 + .long sys_exit_group + .long sys_lookup_dcookie + .long sys_epoll_create /* 205 */ + .long sys_epoll_ctl + .long sys_epoll_wait + .long sys_remap_file_pages + .long sys_set_tid_address + .long sys_timer_create /* 210 */ + .long sys_timer_settime + .long sys_timer_gettime + .long sys_timer_getoverrun + .long sys_timer_delete + .long sys_clock_settime /* 215 */ + .long sys_clock_gettime + .long sys_clock_getres + .long sys_clock_nanosleep + .long sys_statfs64 + .long sys_fstatfs64 /* 220 */ + .long sys_tgkill + .long sys_ni_syscall /* reserved for TUX */ + .long sys_utimes + .long sys_fadvise64_64 + .long sys_cacheflush /* 225 */ + .long sys_ni_syscall /* sys_vserver */ + .long sys_mq_open + .long sys_mq_unlink + .long sys_mq_timedsend + .long sys_mq_timedreceive /* 230 */ + .long sys_mq_notify + .long sys_mq_getsetattr + .long sys_kexec_load + .long sys_waitid + .long sys_add_key /* 235 */ + .long sys_request_key + .long sys_keyctl + .long sys_ioprio_set + .long sys_ioprio_get + .long sys_inotify_init /* 240 */ + .long sys_inotify_add_watch + .long sys_inotify_rm_watch + .long sys_openat + .long sys_mkdirat + .long sys_mknodat /* 245 */ + .long sys_fchownat + .long sys_futimesat + .long sys_fstatat64 + .long sys_unlinkat + .long sys_renameat /* 250 */ + .long sys_linkat + .long sys_symlinkat + .long sys_readlinkat + .long sys_fchmodat + .long sys_faccessat /* 255 */ + .long __sys_pselect6 + .long sys_ppoll + .long sys_unshare + .long sys_set_robust_list + .long sys_get_robust_list /* 260 */ + .long __sys_splice + .long sys_sync_file_range + .long sys_tee + .long sys_vmsplice + .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c new file mode 100644 index 0000000..3e56b9f --- /dev/null +++ b/arch/avr32/kernel/time.c @@ -0,0 +1,238 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * Based on MIPS implementation arch/mips/kernel/time.c + * Copyright 2001 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +static cycle_t read_cycle_count(void) +{ + return (cycle_t)sysreg_read(COUNT); +} + +static struct clocksource clocksource_avr32 = { + .name = "avr32", + .rating = 350, + .read = read_cycle_count, + .mask = CLOCKSOURCE_MASK(32), + .shift = 16, + .is_continuous = 1, +}; + +/* + * By default we provide the null RTC ops + */ +static unsigned long null_rtc_get_time(void) +{ + return mktime(2004, 1, 1, 0, 0, 0); +} + +static int null_rtc_set_time(unsigned long sec) +{ + return 0; +} + +static unsigned long (*rtc_get_time)(void) = null_rtc_get_time; +static int (*rtc_set_time)(unsigned long) = null_rtc_set_time; + +/* how many counter cycles in a jiffy? */ +static unsigned long cycles_per_jiffy; + +/* cycle counter value at the previous timer interrupt */ +static unsigned int timerhi, timerlo; + +/* the count value for the next timer interrupt */ +static unsigned int expirelo; + +static void avr32_timer_ack(void) +{ + unsigned int count; + + /* Ack this timer interrupt and set the next one */ + expirelo += cycles_per_jiffy; + if (expirelo == 0) { + printk(KERN_DEBUG "expirelo == 0\n"); + sysreg_write(COMPARE, expirelo + 1); + } else { + sysreg_write(COMPARE, expirelo); + } + + /* Check to see if we have missed any timer interrupts */ + count = sysreg_read(COUNT); + if ((count - expirelo) < 0x7fffffff) { + expirelo = count + cycles_per_jiffy; + sysreg_write(COMPARE, expirelo); + } +} + +static unsigned int avr32_hpt_read(void) +{ + return sysreg_read(COUNT); +} + +/* + * Taken from MIPS c0_hpt_timer_init(). + * + * Why is it so complicated, and what is "count"? My assumption is + * that `count' specifies the "reference cycle", i.e. the cycle since + * reset that should mean "zero". The reason COUNT is written twice is + * probably to make sure we don't get any timer interrupts while we + * are messing with the counter. + */ +static void avr32_hpt_init(unsigned int count) +{ + count = sysreg_read(COUNT) - count; + expirelo = (count / cycles_per_jiffy + 1) * cycles_per_jiffy; + sysreg_write(COUNT, expirelo - cycles_per_jiffy); + sysreg_write(COMPARE, expirelo); + sysreg_write(COUNT, count); +} + +/* + * Scheduler clock - returns current time in nanosec units. + */ +unsigned long long sched_clock(void) +{ + /* There must be better ways...? */ + return (unsigned long long)jiffies * (1000000000 / HZ); +} + +/* + * local_timer_interrupt() does profiling and process accounting on a + * per-CPU basis. + * + * In UP mode, it is invoked from the (global) timer_interrupt. + */ +static void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + if (current->pid) + profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(regs)); +} + +static irqreturn_t +timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + unsigned int count; + + /* ack timer interrupt and try to set next interrupt */ + count = avr32_hpt_read(); + avr32_timer_ack(); + + /* Update timerhi/timerlo for intra-jiffy calibration */ + timerhi += count < timerlo; /* Wrap around */ + timerlo = count; + + /* + * Call the generic timer interrupt handler + */ + write_seqlock(&xtime_lock); + do_timer(1); + write_sequnlock(&xtime_lock); + + /* + * In UP mode, we call local_timer_interrupt() to do profiling + * and process accounting. + * + * SMP is not supported yet. + */ + local_timer_interrupt(irq, dev_id, regs); + + return IRQ_HANDLED; +} + +static struct irqaction timer_irqaction = { + .handler = timer_interrupt, + .flags = IRQF_DISABLED, + .name = "timer", +}; + +void __init time_init(void) +{ + unsigned long mult, shift, count_hz; + int ret; + + xtime.tv_sec = rtc_get_time(); + xtime.tv_nsec = 0; + + set_normalized_timespec(&wall_to_monotonic, + -xtime.tv_sec, -xtime.tv_nsec); + + printk("Before time_init: count=%08lx, compare=%08lx\n", + (unsigned long)sysreg_read(COUNT), + (unsigned long)sysreg_read(COMPARE)); + + count_hz = clk_get_rate(boot_cpu_data.clk); + shift = clocksource_avr32.shift; + mult = clocksource_hz2mult(count_hz, shift); + clocksource_avr32.mult = mult; + + printk("Cycle counter: mult=%lu, shift=%lu\n", mult, shift); + + { + u64 tmp; + + tmp = TICK_NSEC; + tmp <<= shift; + tmp += mult / 2; + do_div(tmp, mult); + + cycles_per_jiffy = tmp; + } + + /* This sets up the high precision timer for the first interrupt. */ + avr32_hpt_init(avr32_hpt_read()); + + printk("After time_init: count=%08lx, compare=%08lx\n", + (unsigned long)sysreg_read(COUNT), + (unsigned long)sysreg_read(COMPARE)); + + ret = clocksource_register(&clocksource_avr32); + if (ret) + printk(KERN_ERR + "timer: could not register clocksource: %d\n", ret); + + ret = setup_irq(0, &timer_irqaction); + if (ret) + printk("timer: could not request IRQ 0: %d\n", ret); +} + +static struct sysdev_class timer_class = { + set_kset_name("timer"), +}; + +static struct sys_device timer_device = { + .id = 0, + .cls = &timer_class, +}; + +static int __init init_timer_sysfs(void) +{ + int err = sysdev_class_register(&timer_class); + if (!err) + err = sysdev_register(&timer_device); + return err; +} + +device_initcall(init_timer_sysfs); diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c new file mode 100644 index 0000000..7e803f4 --- /dev/null +++ b/arch/avr32/kernel/traps.c @@ -0,0 +1,425 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#undef DEBUG +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +static void dump_mem(const char *str, unsigned long bottom, unsigned long top) +{ + unsigned long p; + int i; + + printk("%s(0x%08lx to 0x%08lx)\n", str, bottom, top); + + for (p = bottom & ~31; p < top; ) { + printk("%04lx: ", p & 0xffff); + + for (i = 0; i < 8; i++, p += 4) { + unsigned int val; + + if (p < bottom || p >= top) + printk(" "); + else { + if (__get_user(val, (unsigned int __user *)p)) { + printk("\n"); + goto out; + } + printk("%08x ", val); + } + } + printk("\n"); + } + +out: + return; +} + +#ifdef CONFIG_FRAME_POINTER +static inline void __show_trace(struct task_struct *tsk, unsigned long *sp, + struct pt_regs *regs) +{ + unsigned long __user *fp; + unsigned long __user *last_fp = NULL; + + if (regs) { + fp = (unsigned long __user *)regs->r7; + } else if (tsk == current) { + register unsigned long __user *real_fp __asm__("r7"); + fp = real_fp; + } else { + fp = (unsigned long __user *)tsk->thread.cpu_context.r7; + } + + /* + * Walk the stack until (a) we get an exception, (b) the frame + * pointer becomes zero, or (c) the frame pointer gets stuck + * at the same value. + */ + while (fp && fp != last_fp) { + unsigned long lr, new_fp = 0; + + last_fp = fp; + if (__get_user(lr, fp)) + break; + if (fp && __get_user(new_fp, fp + 1)) + break; + fp = (unsigned long __user *)new_fp; + + printk(" [<%08lx>] ", lr); + print_symbol("%s\n", lr); + } + printk("\n"); +} +#else +static inline void __show_trace(struct task_struct *tsk, unsigned long *sp, + struct pt_regs *regs) +{ + unsigned long addr; + + while (!kstack_end(sp)) { + addr = *sp++; + if (kernel_text_address(addr)) { + printk(" [<%08lx>] ", addr); + print_symbol("%s\n", addr); + } + } +} +#endif + +void show_trace(struct task_struct *tsk, unsigned long *sp, + struct pt_regs *regs) +{ + if (regs && + (((regs->sr & MODE_MASK) == MODE_EXCEPTION) || + ((regs->sr & MODE_MASK) == MODE_USER))) + return; + + printk ("Call trace:"); +#ifdef CONFIG_KALLSYMS + printk("\n"); +#endif + + __show_trace(tsk, sp, regs); + printk("\n"); +} + +void show_stack(struct task_struct *tsk, unsigned long *sp) +{ + unsigned long stack; + + if (!tsk) + tsk = current; + if (sp == 0) { + if (tsk == current) { + register unsigned long *real_sp __asm__("sp"); + sp = real_sp; + } else { + sp = (unsigned long *)tsk->thread.cpu_context.ksp; + } + } + + stack = (unsigned long)sp; + dump_mem("Stack: ", stack, + THREAD_SIZE + (unsigned long)tsk->thread_info); + show_trace(tsk, sp, NULL); +} + +void dump_stack(void) +{ + show_stack(NULL, NULL); +} +EXPORT_SYMBOL(dump_stack); + +ATOMIC_NOTIFIER_HEAD(avr32_die_chain); + +int register_die_notifier(struct notifier_block *nb) +{ + pr_debug("register_die_notifier: %p\n", nb); + + return atomic_notifier_chain_register(&avr32_die_chain, nb); +} +EXPORT_SYMBOL(register_die_notifier); + +int unregister_die_notifier(struct notifier_block *nb) +{ + return atomic_notifier_chain_unregister(&avr32_die_chain, nb); +} +EXPORT_SYMBOL(unregister_die_notifier); + +static DEFINE_SPINLOCK(die_lock); + +void __die(const char *str, struct pt_regs *regs, unsigned long err, + const char *file, const char *func, unsigned long line) +{ + struct task_struct *tsk = current; + static int die_counter; + + console_verbose(); + spin_lock_irq(&die_lock); + bust_spinlocks(1); + + printk(KERN_ALERT "%s", str); + if (file && func) + printk(" in %s:%s, line %ld", file, func, line); + printk("[#%d]:\n", ++die_counter); + print_modules(); + show_regs(regs); + printk("Process %s (pid: %d, stack limit = 0x%p)\n", + tsk->comm, tsk->pid, tsk->thread_info + 1); + + if (!user_mode(regs) || in_interrupt()) { + dump_mem("Stack: ", regs->sp, + THREAD_SIZE + (unsigned long)tsk->thread_info); + } + + bust_spinlocks(0); + spin_unlock_irq(&die_lock); + do_exit(SIGSEGV); +} + +void __die_if_kernel(const char *str, struct pt_regs *regs, unsigned long err, + const char *file, const char *func, unsigned long line) +{ + if (!user_mode(regs)) + __die(str, regs, err, file, func, line); +} + +asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs) +{ +#ifdef CONFIG_SUBARCH_AVR32B + /* + * The exception entry always saves RSR_EX. For NMI, this is + * wrong; it should be RSR_NMI + */ + regs->sr = sysreg_read(RSR_NMI); +#endif + + printk("NMI taken!!!!\n"); + die("NMI", regs, ecr); + BUG(); +} + +asmlinkage void do_critical_exception(unsigned long ecr, struct pt_regs *regs) +{ + printk("Unable to handle critical exception %lu at pc = %08lx!\n", + ecr, regs->pc); + die("Oops", regs, ecr); + BUG(); +} + +asmlinkage void do_address_exception(unsigned long ecr, struct pt_regs *regs) +{ + siginfo_t info; + + die_if_kernel("Oops: Address exception in kernel mode", regs, ecr); + +#ifdef DEBUG + if (ecr == ECR_ADDR_ALIGN_X) + pr_debug("Instruction Address Exception at pc = %08lx\n", + regs->pc); + else if (ecr == ECR_ADDR_ALIGN_R) + pr_debug("Data Address Exception (Read) at pc = %08lx\n", + regs->pc); + else if (ecr == ECR_ADDR_ALIGN_W) + pr_debug("Data Address Exception (Write) at pc = %08lx\n", + regs->pc); + else + BUG(); + + show_regs(regs); +#endif + + info.si_signo = SIGBUS; + info.si_errno = 0; + info.si_code = BUS_ADRALN; + info.si_addr = (void __user *)regs->pc; + + force_sig_info(SIGBUS, &info, current); +} + +/* This way of handling undefined instructions is stolen from ARM */ +static LIST_HEAD(undef_hook); +static spinlock_t undef_lock = SPIN_LOCK_UNLOCKED; + +void register_undef_hook(struct undef_hook *hook) +{ + spin_lock_irq(&undef_lock); + list_add(&hook->node, &undef_hook); + spin_unlock_irq(&undef_lock); +} + +void unregister_undef_hook(struct undef_hook *hook) +{ + spin_lock_irq(&undef_lock); + list_del(&hook->node); + spin_unlock_irq(&undef_lock); +} + +static int do_cop_absent(u32 insn) +{ + int cop_nr; + u32 cpucr; + if ( (insn & 0xfdf00000) == 0xf1900000 ) + /* LDC0 */ + cop_nr = 0; + else + cop_nr = (insn >> 13) & 0x7; + + /* Try enabling the coprocessor */ + cpucr = sysreg_read(CPUCR); + cpucr |= (1 << (24 + cop_nr)); + sysreg_write(CPUCR, cpucr); + + cpucr = sysreg_read(CPUCR); + if ( !(cpucr & (1 << (24 + cop_nr))) ){ + printk("Coprocessor #%i not found!\n", cop_nr); + return -1; + } + + return 0; +} + +#ifdef CONFIG_BUG +#ifdef CONFIG_DEBUG_BUGVERBOSE +static inline void do_bug_verbose(struct pt_regs *regs, u32 insn) +{ + char *file; + u16 line; + char c; + + if (__get_user(line, (u16 __user *)(regs->pc + 2))) + return; + if (__get_user(file, (char * __user *)(regs->pc + 4)) + || (unsigned long)file < PAGE_OFFSET + || __get_user(c, file)) + file = ""; + + printk(KERN_ALERT "kernel BUG at %s:%d!\n", file, line); +} +#else +static inline void do_bug_verbose(struct pt_regs *regs, u32 insn) +{ + +} +#endif +#endif + +asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs) +{ + u32 insn; + struct undef_hook *hook; + siginfo_t info; + void __user *pc; + + if (!user_mode(regs)) + goto kernel_trap; + + local_irq_enable(); + + pc = (void __user *)instruction_pointer(regs); + if (__get_user(insn, (u32 __user *)pc)) + goto invalid_area; + + if (ecr == ECR_COPROC_ABSENT) { + if (do_cop_absent(insn) == 0) + return; + } + + spin_lock_irq(&undef_lock); + list_for_each_entry(hook, &undef_hook, node) { + if ((insn & hook->insn_mask) == hook->insn_val) { + if (hook->fn(regs, insn) == 0) { + spin_unlock_irq(&undef_lock); + return; + } + } + } + spin_unlock_irq(&undef_lock); + +invalid_area: + +#ifdef DEBUG + printk("Illegal instruction at pc = %08lx\n", regs->pc); + if (regs->pc < TASK_SIZE) { + unsigned long ptbr, pgd, pte, *p; + + ptbr = sysreg_read(PTBR); + p = (unsigned long *)ptbr; + pgd = p[regs->pc >> 22]; + p = (unsigned long *)((pgd & 0x1ffff000) | 0x80000000); + pte = p[(regs->pc >> 12) & 0x3ff]; + printk("page table: 0x%08lx -> 0x%08lx -> 0x%08lx\n", ptbr, pgd, pte); + } +#endif + + info.si_signo = SIGILL; + info.si_errno = 0; + info.si_addr = (void __user *)regs->pc; + switch (ecr) { + case ECR_ILLEGAL_OPCODE: + case ECR_UNIMPL_INSTRUCTION: + info.si_code = ILL_ILLOPC; + break; + case ECR_PRIVILEGE_VIOLATION: + info.si_code = ILL_PRVOPC; + break; + case ECR_COPROC_ABSENT: + info.si_code = ILL_COPROC; + break; + default: + BUG(); + } + + force_sig_info(SIGILL, &info, current); + return; + +kernel_trap: +#ifdef CONFIG_BUG + if (__kernel_text_address(instruction_pointer(regs))) { + insn = *(u16 *)instruction_pointer(regs); + if (insn == AVR32_BUG_OPCODE) { + do_bug_verbose(regs, insn); + die("Kernel BUG", regs, 0); + return; + } + } +#endif + + die("Oops: Illegal instruction in kernel code", regs, ecr); +} + +asmlinkage void do_fpe(unsigned long ecr, struct pt_regs *regs) +{ + siginfo_t info; + + printk("Floating-point exception at pc = %08lx\n", regs->pc); + + /* We have no FPU... */ + info.si_signo = SIGILL; + info.si_errno = 0; + info.si_addr = (void __user *)regs->pc; + info.si_code = ILL_COPROC; + + force_sig_info(SIGILL, &info, current); +} + + +void __init trap_init(void) +{ + +} diff --git a/arch/avr32/kernel/vmlinux.lds.c b/arch/avr32/kernel/vmlinux.lds.c new file mode 100644 index 0000000..cdd627c --- /dev/null +++ b/arch/avr32/kernel/vmlinux.lds.c @@ -0,0 +1,139 @@ +/* + * AVR32 linker script for the Linux kernel + * + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#define LOAD_OFFSET 0x00000000 +#include + +OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32") +OUTPUT_ARCH(avr32) +ENTRY(_start) + +/* Big endian */ +jiffies = jiffies_64 + 4; + +SECTIONS +{ + . = CONFIG_ENTRY_ADDRESS; + .init : AT(ADDR(.init) - LOAD_OFFSET) { + _stext = .; + __init_begin = .; + _sinittext = .; + *(.text.reset) + *(.init.text) + _einittext = .; + . = ALIGN(4); + __tagtable_begin = .; + *(.taglist) + __tagtable_end = .; + *(.init.data) + . = ALIGN(16); + __setup_start = .; + *(.init.setup) + __setup_end = .; + . = ALIGN(4); + __initcall_start = .; + *(.initcall1.init) + *(.initcall2.init) + *(.initcall3.init) + *(.initcall4.init) + *(.initcall5.init) + *(.initcall6.init) + *(.initcall7.init) + __initcall_end = .; + __con_initcall_start = .; + *(.con_initcall.init) + __con_initcall_end = .; + __security_initcall_start = .; + *(.security_initcall.init) + __security_initcall_end = .; + . = ALIGN(32); + __initramfs_start = .; + *(.init.ramfs) + __initramfs_end = .; + . = ALIGN(4096); + __init_end = .; + } + + . = ALIGN(8192); + .text : AT(ADDR(.text) - LOAD_OFFSET) { + _evba = .; + _text = .; + *(.ex.text) + . = 0x50; + *(.tlbx.ex.text) + . = 0x60; + *(.tlbr.ex.text) + . = 0x70; + *(.tlbw.ex.text) + . = 0x100; + *(.scall.text) + *(.irq.text) + *(.text) + SCHED_TEXT + LOCK_TEXT + KPROBES_TEXT + *(.fixup) + *(.gnu.warning) + _etext = .; + } = 0xd703d703 + + . = ALIGN(4); + __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { + __start___ex_table = .; + *(__ex_table) + __stop___ex_table = .; + } + + RODATA + + . = ALIGN(8192); + + .data : AT(ADDR(.data) - LOAD_OFFSET) { + _data = .; + _sdata = .; + /* + * First, the init task union, aligned to an 8K boundary. + */ + *(.data.init_task) + + /* Then, the cacheline aligned data */ + . = ALIGN(32); + *(.data.cacheline_aligned) + + /* And the rest... */ + *(.data.rel*) + *(.data) + CONSTRUCTORS + + _edata = .; + } + + + . = ALIGN(8); + .bss : AT(ADDR(.bss) - LOAD_OFFSET) { + __bss_start = .; + *(.bss) + *(COMMON) + . = ALIGN(8); + __bss_stop = .; + _end = .; + } + + /* When something in the kernel is NOT compiled as a module, the module + * cleanup code and data are put into these segments. Both can then be + * thrown away, as cleanup code is never called unless it's a module. + */ + /DISCARD/ : { + *(.exit.text) + *(.exit.data) + *(.exitcall.exit) + } + + DWARF_DEBUG +} diff --git a/arch/avr32/lib/Makefile b/arch/avr32/lib/Makefile new file mode 100644 index 0000000..09ac43e --- /dev/null +++ b/arch/avr32/lib/Makefile @@ -0,0 +1,10 @@ +# +# Makefile for AVR32-specific library files +# + +lib-y := copy_user.o clear_user.o +lib-y += strncpy_from_user.o strnlen_user.o +lib-y += delay.o memset.o memcpy.o findbit.o +lib-y += csum_partial.o csum_partial_copy_generic.o +lib-y += io-readsw.o io-readsl.o io-writesw.o io-writesl.o +lib-y += __avr32_lsl64.o __avr32_lsr64.o __avr32_asr64.o diff --git a/arch/avr32/lib/__avr32_asr64.S b/arch/avr32/lib/__avr32_asr64.S new file mode 100644 index 0000000..368b6bc --- /dev/null +++ b/arch/avr32/lib/__avr32_asr64.S @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2005-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + /* + * DWtype __avr32_asr64(DWtype u, word_type b) + */ + .text + .global __avr32_asr64 + .type __avr32_asr64,@function +__avr32_asr64: + cp.w r12, 0 + reteq r12 + + rsub r9, r12, 32 + brle 1f + + lsl r8, r11, r9 + lsr r10, r10, r12 + asr r11, r11, r12 + or r10, r8 + retal r12 + +1: neg r9 + asr r10, r11, r9 + asr r11, 31 + retal r12 diff --git a/arch/avr32/lib/__avr32_lsl64.S b/arch/avr32/lib/__avr32_lsl64.S new file mode 100644 index 0000000..f1dbc2b --- /dev/null +++ b/arch/avr32/lib/__avr32_lsl64.S @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2005-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + /* + * DWtype __avr32_lsl64(DWtype u, word_type b) + */ + .text + .global __avr32_lsl64 + .type __avr32_lsl64,@function +__avr32_lsl64: + cp.w r12, 0 + reteq r12 + + rsub r9, r12, 32 + brle 1f + + lsr r8, r10, r9 + lsl r10, r10, r12 + lsl r11, r11, r12 + or r11, r8 + retal r12 + +1: neg r9 + lsl r11, r10, r9 + mov r10, 0 + retal r12 diff --git a/arch/avr32/lib/__avr32_lsr64.S b/arch/avr32/lib/__avr32_lsr64.S new file mode 100644 index 0000000..e65bb7f --- /dev/null +++ b/arch/avr32/lib/__avr32_lsr64.S @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2005-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + /* + * DWtype __avr32_lsr64(DWtype u, word_type b) + */ + .text + .global __avr32_lsr64 + .type __avr32_lsr64,@function +__avr32_lsr64: + cp.w r12, 0 + reteq r12 + + rsub r9, r12, 32 + brle 1f + + lsl r8, r11, r9 + lsr r11, r11, r12 + lsr r10, r10, r12 + or r10, r8 + retal r12 + +1: neg r9 + lsr r10, r11, r9 + mov r11, 0 + retal r12 diff --git a/arch/avr32/lib/clear_user.S b/arch/avr32/lib/clear_user.S new file mode 100644 index 0000000..d8991b6 --- /dev/null +++ b/arch/avr32/lib/clear_user.S @@ -0,0 +1,76 @@ +/* + * Copyright 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + + .text + .align 1 + .global clear_user + .type clear_user, "function" +clear_user: + branch_if_kernel r8, __clear_user + ret_if_privileged r8, r12, r11, r11 + + .global __clear_user + .type __clear_user, "function" +__clear_user: + mov r9, r12 + mov r8, 0 + andl r9, 3, COH + brne 5f + +1: sub r11, 4 + brlt 2f + +10: st.w r12++, r8 + sub r11, 4 + brge 10b + +2: sub r11, -4 + reteq 0 + + /* Unaligned count or address */ + bld r11, 1 + brcc 12f +11: st.h r12++, r8 + sub r11, 2 + reteq 0 +12: st.b r12++, r8 + retal 0 + + /* Unaligned address */ +5: cp.w r11, 4 + brlt 2b + + lsl r9, 2 + add pc, pc, r9 +13: st.b r12++, r8 + sub r11, 1 +14: st.b r12++, r8 + sub r11, 1 +15: st.b r12++, r8 + sub r11, 1 + rjmp 1b + + .size clear_user, . - clear_user + .size __clear_user, . - __clear_user + + .section .fixup, "ax" + .align 1 +18: sub r11, -4 +19: retal r11 + + .section __ex_table, "a" + .align 2 + .long 10b, 18b + .long 11b, 19b + .long 12b, 19b + .long 13b, 19b + .long 14b, 19b + .long 15b, 19b diff --git a/arch/avr32/lib/copy_user.S b/arch/avr32/lib/copy_user.S new file mode 100644 index 0000000..ea59c04 --- /dev/null +++ b/arch/avr32/lib/copy_user.S @@ -0,0 +1,119 @@ +/* + * Copy to/from userspace with optional address space checking. + * + * Copyright 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + + /* + * __kernel_size_t + * __copy_user(void *to, const void *from, __kernel_size_t n) + * + * Returns the number of bytes not copied. Might be off by + * max 3 bytes if we get a fault in the main loop. + * + * The address-space checking functions simply fall through to + * the non-checking version. + */ + .text + .align 1 + .global copy_from_user + .type copy_from_user, @function +copy_from_user: + branch_if_kernel r8, __copy_user + ret_if_privileged r8, r11, r10, r10 + rjmp __copy_user + .size copy_from_user, . - copy_from_user + + .global copy_to_user + .type copy_to_user, @function +copy_to_user: + branch_if_kernel r8, __copy_user + ret_if_privileged r8, r12, r10, r10 + .size copy_to_user, . - copy_to_user + + .global __copy_user + .type __copy_user, @function +__copy_user: + mov r9, r11 + andl r9, 3, COH + brne 6f + + /* At this point, from is word-aligned */ +1: sub r10, 4 + brlt 3f + +2: +10: ld.w r8, r11++ +11: st.w r12++, r8 + sub r10, 4 + brge 2b + +3: sub r10, -4 + reteq 0 + + /* + * Handle unaligned count. Need to be careful with r10 here so + * that we return the correct value even if we get a fault + */ +4: +20: ld.ub r8, r11++ +21: st.b r12++, r8 + sub r10, 1 + reteq 0 +22: ld.ub r8, r11++ +23: st.b r12++, r8 + sub r10, 1 + reteq 0 +24: ld.ub r8, r11++ +25: st.b r12++, r8 + retal 0 + + /* Handle unaligned from-pointer */ +6: cp.w r10, 4 + brlt 4b + rsub r9, r9, 4 + +30: ld.ub r8, r11++ +31: st.b r12++, r8 + sub r10, 1 + sub r9, 1 + breq 1b +32: ld.ub r8, r11++ +33: st.b r12++, r8 + sub r10, 1 + sub r9, 1 + breq 1b +34: ld.ub r8, r11++ +35: st.b r12++, r8 + sub r10, 1 + rjmp 1b + .size __copy_user, . - __copy_user + + .section .fixup,"ax" + .align 1 +19: sub r10, -4 +29: retal r10 + + .section __ex_table,"a" + .align 2 + .long 10b, 19b + .long 11b, 19b + .long 20b, 29b + .long 21b, 29b + .long 22b, 29b + .long 23b, 29b + .long 24b, 29b + .long 25b, 29b + .long 30b, 29b + .long 31b, 29b + .long 32b, 29b + .long 33b, 29b + .long 34b, 29b + .long 35b, 29b diff --git a/arch/avr32/lib/csum_partial.S b/arch/avr32/lib/csum_partial.S new file mode 100644 index 0000000..6a262b5 --- /dev/null +++ b/arch/avr32/lib/csum_partial.S @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + /* + * unsigned int csum_partial(const unsigned char *buff, + * int len, unsigned int sum) + */ + .text + .global csum_partial + .type csum_partial,"function" + .align 1 +csum_partial: + /* checksum complete words, aligned or not */ +3: sub r11, 4 + brlt 5f +4: ld.w r9, r12++ + add r10, r9 + acr r10 + sub r11, 4 + brge 4b + + /* return if we had a whole number of words */ +5: sub r11, -4 + reteq r10 + + /* checksum any remaining bytes at the end */ + mov r9, 0 + mov r8, 0 + cp r11, 2 + brlt 6f + ld.uh r9, r12++ + sub r11, 2 + breq 7f + lsl r9, 16 +6: ld.ub r8, r12++ + lsl r8, 8 +7: or r9, r8 + add r10, r9 + acr r10 + + retal r10 + .size csum_partial, . - csum_partial diff --git a/arch/avr32/lib/csum_partial_copy_generic.S b/arch/avr32/lib/csum_partial_copy_generic.S new file mode 100644 index 0000000..a3a0f9b --- /dev/null +++ b/arch/avr32/lib/csum_partial_copy_generic.S @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + + /* + * unsigned int csum_partial_copy_generic(const char *src, char *dst, int len + * int sum, int *src_err_ptr, + * int *dst_err_ptr) + * + * Copy src to dst while checksumming, otherwise like csum_partial. + */ + + .macro ld_src size, reg, ptr +9999: ld.\size \reg, \ptr + .section __ex_table, "a" + .long 9999b, fixup_ld_src + .previous + .endm + + .macro st_dst size, ptr, reg +9999: st.\size \ptr, \reg + .section __ex_table, "a" + .long 9999b, fixup_st_dst + .previous + .endm + + .text + .global csum_partial_copy_generic + .type csum_partial_copy_generic,"function" + .align 1 +csum_partial_copy_generic: + pushm r4-r7,lr + + /* The inner loop */ +1: sub r10, 4 + brlt 5f +2: ld_src w, r5, r12++ + st_dst w, r11++, r5 + add r9, r5 + acr r9 + sub r10, 4 + brge 2b + + /* return if we had a whole number of words */ +5: sub r10, -4 + brne 7f + +6: mov r12, r9 + popm r4-r7,pc + + /* handle additional bytes at the tail */ +7: mov r5, 0 + mov r4, 32 +8: ld_src ub, r6, r12++ + st_dst b, r11++, r6 + lsl r5, 8 + sub r4, 8 + bfins r5, r6, 0, 8 + sub r10, 1 + brne 8b + + lsl r5, r5, r4 + add r9, r5 + acr r9 + rjmp 6b + + /* Exception handler */ + .section .fixup,"ax" + .align 1 +fixup_ld_src: + mov r9, -EFAULT + cp.w r8, 0 + breq 1f + st.w r8[0], r9 + +1: /* + * TODO: zero the complete destination - computing the rest + * is too much work + */ + + mov r9, 0 + rjmp 6b + +fixup_st_dst: + mov r9, -EFAULT + lddsp r8, sp[20] + cp.w r8, 0 + breq 1f + st.w r8[0], r9 +1: mov r9, 0 + rjmp 6b + + .previous diff --git a/arch/avr32/lib/delay.c b/arch/avr32/lib/delay.c new file mode 100644 index 0000000..462c830 --- /dev/null +++ b/arch/avr32/lib/delay.c @@ -0,0 +1,55 @@ +/* + * Precise Delay Loops for avr32 + * + * Copyright (C) 1993 Linus Torvalds + * Copyright (C) 1997 Martin Mares + * Copyright (C) 2005-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include + +#include +#include +#include + +int read_current_timer(unsigned long *timer_value) +{ + *timer_value = sysreg_read(COUNT); + return 0; +} + +void __delay(unsigned long loops) +{ + unsigned bclock, now; + + bclock = sysreg_read(COUNT); + do { + now = sysreg_read(COUNT); + } while ((now - bclock) < loops); +} + +inline void __const_udelay(unsigned long xloops) +{ + unsigned long long loops; + + asm("mulu.d %0, %1, %2" + : "=r"(loops) + : "r"(current_cpu_data.loops_per_jiffy * HZ), "r"(xloops)); + __delay(loops >> 32); +} + +void __udelay(unsigned long usecs) +{ + __const_udelay(usecs * 0x000010c7); /* 2**32 / 1000000 (rounded up) */ +} + +void __ndelay(unsigned long nsecs) +{ + __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ +} diff --git a/arch/avr32/lib/findbit.S b/arch/avr32/lib/findbit.S new file mode 100644 index 0000000..2b4856f --- /dev/null +++ b/arch/avr32/lib/findbit.S @@ -0,0 +1,154 @@ +/* + * Copyright (C) 2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include + + .text + /* + * unsigned long find_first_zero_bit(const unsigned long *addr, + * unsigned long size) + */ +ENTRY(find_first_zero_bit) + cp.w r11, 0 + reteq r11 + mov r9, r11 +1: ld.w r8, r12[0] + com r8 + brne .L_found + sub r12, -4 + sub r9, 32 + brgt 1b + retal r11 + + /* + * unsigned long find_next_zero_bit(const unsigned long *addr, + * unsigned long size, + * unsigned long offset) + */ +ENTRY(find_next_zero_bit) + lsr r8, r10, 5 + sub r9, r11, r10 + retle r11 + + lsl r8, 2 + add r12, r8 + andl r10, 31, COH + breq 1f + + /* offset is not word-aligned. Handle the first (32 - r10) bits */ + ld.w r8, r12[0] + com r8 + sub r12, -4 + lsr r8, r8, r10 + brne .L_found + + /* r9 = r9 - (32 - r10) = r9 + r10 - 32 */ + add r9, r10 + sub r9, 32 + retle r11 + + /* Main loop. offset must be word-aligned */ +1: ld.w r8, r12[0] + com r8 + brne .L_found + sub r12, -4 + sub r9, 32 + brgt 1b + retal r11 + + /* Common return path for when a bit is actually found. */ +.L_found: + brev r8 + clz r10, r8 + rsub r9, r11 + add r10, r9 + + /* XXX: If we don't have to return exactly "size" when the bit + is not found, we may drop this "min" thing */ + min r12, r11, r10 + retal r12 + + /* + * unsigned long find_first_bit(const unsigned long *addr, + * unsigned long size) + */ +ENTRY(find_first_bit) + cp.w r11, 0 + reteq r11 + mov r9, r11 +1: ld.w r8, r12[0] + cp.w r8, 0 + brne .L_found + sub r12, -4 + sub r9, 32 + brgt 1b + retal r11 + + /* + * unsigned long find_next_bit(const unsigned long *addr, + * unsigned long size, + * unsigned long offset) + */ +ENTRY(find_next_bit) + lsr r8, r10, 5 + sub r9, r11, r10 + retle r11 + + lsl r8, 2 + add r12, r8 + andl r10, 31, COH + breq 1f + + /* offset is not word-aligned. Handle the first (32 - r10) bits */ + ld.w r8, r12[0] + sub r12, -4 + lsr r8, r8, r10 + brne .L_found + + /* r9 = r9 - (32 - r10) = r9 + r10 - 32 */ + add r9, r10 + sub r9, 32 + retle r11 + + /* Main loop. offset must be word-aligned */ +1: ld.w r8, r12[0] + cp.w r8, 0 + brne .L_found + sub r12, -4 + sub r9, 32 + brgt 1b + retal r11 + +ENTRY(generic_find_next_zero_le_bit) + lsr r8, r10, 5 + sub r9, r11, r10 + retle r11 + + lsl r8, 2 + add r12, r8 + andl r10, 31, COH + breq 1f + + /* offset is not word-aligned. Handle the first (32 - r10) bits */ + ldswp.w r8, r12[0] + sub r12, -4 + lsr r8, r8, r10 + brne .L_found + + /* r9 = r9 - (32 - r10) = r9 + r10 - 32 */ + add r9, r10 + sub r9, 32 + retle r11 + + /* Main loop. offset must be word-aligned */ +1: ldswp.w r8, r12[0] + cp.w r8, 0 + brne .L_found + sub r12, -4 + sub r9, 32 + brgt 1b + retal r11 diff --git a/arch/avr32/lib/io-readsl.S b/arch/avr32/lib/io-readsl.S new file mode 100644 index 0000000..b103511 --- /dev/null +++ b/arch/avr32/lib/io-readsl.S @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + .global __raw_readsl + .type __raw_readsl,@function +__raw_readsl: + cp.w r10, 0 + reteq r12 + + /* + * If r11 isn't properly aligned, we might get an exception on + * some implementations. But there's not much we can do about it. + */ +1: ld.w r8, r12[0] + sub r10, 1 + st.w r11++, r8 + brne 1b + + retal r12 diff --git a/arch/avr32/lib/io-readsw.S b/arch/avr32/lib/io-readsw.S new file mode 100644 index 0000000..456be99 --- /dev/null +++ b/arch/avr32/lib/io-readsw.S @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +.Lnot_word_aligned: + /* + * Bad alignment will cause a hardware exception, which is as + * good as anything. No need for us to check for proper alignment. + */ + ld.uh r8, r12[0] + sub r10, 1 + st.h r11++, r8 + + /* fall through */ + + .global __raw_readsw + .type __raw_readsw,@function +__raw_readsw: + cp.w r10, 0 + reteq r12 + mov r9, 3 + tst r11, r9 + brne .Lnot_word_aligned + + sub r10, 2 + brlt 2f + +1: ldins.h r8:t, r12[0] + ldins.h r8:b, r12[0] + st.w r11++, r8 + sub r10, 2 + brge 1b + +2: sub r10, -2 + reteq r12 + + ld.uh r8, r12[0] + st.h r11++, r8 + retal r12 diff --git a/arch/avr32/lib/io-writesl.S b/arch/avr32/lib/io-writesl.S new file mode 100644 index 0000000..22138b3 --- /dev/null +++ b/arch/avr32/lib/io-writesl.S @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + .global __raw_writesl + .type __raw_writesl,@function +__raw_writesl: + cp.w r10, 0 + reteq r12 + +1: ld.w r8, r11++ + sub r10, 1 + st.w r12[0], r8 + brne 1b + + retal r12 diff --git a/arch/avr32/lib/io-writesw.S b/arch/avr32/lib/io-writesw.S new file mode 100644 index 0000000..8c4a53f --- /dev/null +++ b/arch/avr32/lib/io-writesw.S @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +.Lnot_word_aligned: + ld.uh r8, r11++ + sub r10, 1 + st.h r12[0], r8 + + .global __raw_writesw + .type __raw_writesw,@function +__raw_writesw: + cp.w r10, 0 + mov r9, 3 + reteq r12 + tst r11, r9 + brne .Lnot_word_aligned + + sub r10, 2 + brlt 2f + +1: ld.w r8, r11++ + bfextu r9, r8, 16, 16 + st.h r12[0], r9 + st.h r12[0], r8 + sub r10, 2 + brge 1b + +2: sub r10, -2 + reteq r12 + + ld.uh r8, r11++ + st.h r12[0], r8 + retal r12 diff --git a/arch/avr32/lib/libgcc.h b/arch/avr32/lib/libgcc.h new file mode 100644 index 0000000..5a091b5 --- /dev/null +++ b/arch/avr32/lib/libgcc.h @@ -0,0 +1,33 @@ +/* Definitions for various functions 'borrowed' from gcc-3.4.3 */ + +#define BITS_PER_UNIT 8 + +typedef int QItype __attribute__ ((mode (QI))); +typedef unsigned int UQItype __attribute__ ((mode (QI))); +typedef int HItype __attribute__ ((mode (HI))); +typedef unsigned int UHItype __attribute__ ((mode (HI))); +typedef int SItype __attribute__ ((mode (SI))); +typedef unsigned int USItype __attribute__ ((mode (SI))); +typedef int DItype __attribute__ ((mode (DI))); +typedef unsigned int UDItype __attribute__ ((mode (DI))); +typedef float SFtype __attribute__ ((mode (SF))); +typedef float DFtype __attribute__ ((mode (DF))); +typedef int word_type __attribute__ ((mode (__word__))); + +#define W_TYPE_SIZE (4 * BITS_PER_UNIT) +#define Wtype SItype +#define UWtype USItype +#define HWtype SItype +#define UHWtype USItype +#define DWtype DItype +#define UDWtype UDItype +#define __NW(a,b) __ ## a ## si ## b +#define __NDW(a,b) __ ## a ## di ## b + +struct DWstruct {Wtype high, low;}; + +typedef union +{ + struct DWstruct s; + DWtype ll; +} DWunion; diff --git a/arch/avr32/lib/longlong.h b/arch/avr32/lib/longlong.h new file mode 100644 index 0000000..cd5e369 --- /dev/null +++ b/arch/avr32/lib/longlong.h @@ -0,0 +1,98 @@ +/* longlong.h -- definitions for mixed size 32/64 bit arithmetic. + Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. + + This definition file is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2, or (at your option) any later version. + + This definition file is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Borrowed from gcc-3.4.3 */ + +#define __BITS4 (W_TYPE_SIZE / 4) +#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2)) +#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1)) +#define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2)) + +#define count_leading_zeros(count, x) ((count) = __builtin_clz(x)) + +#define __udiv_qrnnd_c(q, r, n1, n0, d) \ + do { \ + UWtype __d1, __d0, __q1, __q0; \ + UWtype __r1, __r0, __m; \ + __d1 = __ll_highpart (d); \ + __d0 = __ll_lowpart (d); \ + \ + __r1 = (n1) % __d1; \ + __q1 = (n1) / __d1; \ + __m = (UWtype) __q1 * __d0; \ + __r1 = __r1 * __ll_B | __ll_highpart (n0); \ + if (__r1 < __m) \ + { \ + __q1--, __r1 += (d); \ + if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\ + if (__r1 < __m) \ + __q1--, __r1 += (d); \ + } \ + __r1 -= __m; \ + \ + __r0 = __r1 % __d1; \ + __q0 = __r1 / __d1; \ + __m = (UWtype) __q0 * __d0; \ + __r0 = __r0 * __ll_B | __ll_lowpart (n0); \ + if (__r0 < __m) \ + { \ + __q0--, __r0 += (d); \ + if (__r0 >= (d)) \ + if (__r0 < __m) \ + __q0--, __r0 += (d); \ + } \ + __r0 -= __m; \ + \ + (q) = (UWtype) __q1 * __ll_B | __q0; \ + (r) = __r0; \ + } while (0) + +#define udiv_qrnnd __udiv_qrnnd_c + +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + do { \ + UWtype __x; \ + __x = (al) - (bl); \ + (sh) = (ah) - (bh) - (__x > (al)); \ + (sl) = __x; \ + } while (0) + +#define umul_ppmm(w1, w0, u, v) \ + do { \ + UWtype __x0, __x1, __x2, __x3; \ + UHWtype __ul, __vl, __uh, __vh; \ + \ + __ul = __ll_lowpart (u); \ + __uh = __ll_highpart (u); \ + __vl = __ll_lowpart (v); \ + __vh = __ll_highpart (v); \ + \ + __x0 = (UWtype) __ul * __vl; \ + __x1 = (UWtype) __ul * __vh; \ + __x2 = (UWtype) __uh * __vl; \ + __x3 = (UWtype) __uh * __vh; \ + \ + __x1 += __ll_highpart (__x0);/* this can't give carry */ \ + __x1 += __x2; /* but this indeed can */ \ + if (__x1 < __x2) /* did we get it? */ \ + __x3 += __ll_B; /* yes, add it in the proper pos. */ \ + \ + (w1) = __x3 + __ll_highpart (__x1); \ + (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \ + } while (0) diff --git a/arch/avr32/lib/memcpy.S b/arch/avr32/lib/memcpy.S new file mode 100644 index 0000000..0abb261 --- /dev/null +++ b/arch/avr32/lib/memcpy.S @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + + /* + * void *memcpy(void *to, const void *from, unsigned long n) + * + * This implementation does word-aligned loads in the main loop, + * possibly sacrificing alignment of stores. + * + * Hopefully, in most cases, both "to" and "from" will be + * word-aligned to begin with. + */ + .text + .global memcpy + .type memcpy, @function +memcpy: + mov r9, r11 + andl r9, 3, COH + brne 1f + + /* At this point, "from" is word-aligned */ +2: sub r10, 4 + mov r9, r12 + brlt 4f + +3: ld.w r8, r11++ + sub r10, 4 + st.w r12++, r8 + brge 3b + +4: neg r10 + reteq r9 + + /* Handle unaligned count */ + lsl r10, 2 + add pc, pc, r10 + ld.ub r8, r11++ + st.b r12++, r8 + ld.ub r8, r11++ + st.b r12++, r8 + ld.ub r8, r11++ + st.b r12++, r8 + retal r9 + + /* Handle unaligned "from" pointer */ +1: sub r10, 4 + brlt 4b + add r10, r9 + lsl r9, 2 + add pc, pc, r9 + ld.ub r8, r11++ + st.b r12++, r8 + ld.ub r8, r11++ + st.b r12++, r8 + ld.ub r8, r11++ + st.b r12++, r8 + rjmp 2b diff --git a/arch/avr32/lib/memset.S b/arch/avr32/lib/memset.S new file mode 100644 index 0000000..40da32c --- /dev/null +++ b/arch/avr32/lib/memset.S @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * Based on linux/arch/arm/lib/memset.S + * Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ASM optimised string functions + */ +#include + + /* + * r12: void *b + * r11: int c + * r10: size_t len + * + * Returns b in r12 + */ + .text + .global memset + .type memset, @function + .align 5 +memset: + mov r9, r12 + mov r8, r12 + or r11, r11, r11 << 8 + andl r9, 3, COH + brne 1f + +2: or r11, r11, r11 << 16 + sub r10, 4 + brlt 5f + + /* Let's do some real work */ +4: st.w r8++, r11 + sub r10, 4 + brge 4b + + /* + * When we get here, we've got less than 4 bytes to set. r10 + * might be negative. + */ +5: sub r10, -4 + reteq r12 + + /* Fastpath ends here, exactly 32 bytes from memset */ + + /* Handle unaligned count or pointer */ + bld r10, 1 + brcc 6f + st.b r8++, r11 + st.b r8++, r11 + bld r10, 0 + retcc r12 +6: st.b r8++, r11 + retal r12 + + /* Handle unaligned pointer */ +1: sub r10, 4 + brlt 5b + add r10, r9 + lsl r9, 1 + add pc, r9 + st.b r8++, r11 + st.b r8++, r11 + st.b r8++, r11 + rjmp 2b + + .size memset, . - memset diff --git a/arch/avr32/lib/strncpy_from_user.S b/arch/avr32/lib/strncpy_from_user.S new file mode 100644 index 0000000..72bd505 --- /dev/null +++ b/arch/avr32/lib/strncpy_from_user.S @@ -0,0 +1,60 @@ +/* + * Copy to/from userspace with optional address space checking. + * + * Copyright 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include + +#include +#include +#include + + /* + * long strncpy_from_user(char *dst, const char *src, long count) + * + * On success, returns the length of the string, not including + * the terminating NUL. + * + * If the string is longer than count, returns count + * + * If userspace access fails, returns -EFAULT + */ + .text + .align 1 + .global strncpy_from_user + .type strncpy_from_user, "function" +strncpy_from_user: + mov r9, -EFAULT + branch_if_kernel r8, __strncpy_from_user + ret_if_privileged r8, r11, r10, r9 + + .global __strncpy_from_user + .type __strncpy_from_user, "function" +__strncpy_from_user: + cp.w r10, 0 + reteq 0 + + mov r9, r10 + +1: ld.ub r8, r11++ + st.b r12++, r8 + cp.w r8, 0 + breq 2f + sub r9, 1 + brne 1b + +2: sub r10, r9 + retal r10 + + .section .fixup, "ax" + .align 1 +3: mov r12, -EFAULT + retal r12 + + .section __ex_table, "a" + .align 2 + .long 1b, 3b diff --git a/arch/avr32/lib/strnlen_user.S b/arch/avr32/lib/strnlen_user.S new file mode 100644 index 0000000..65ce11a --- /dev/null +++ b/arch/avr32/lib/strnlen_user.S @@ -0,0 +1,67 @@ +/* + * Copy to/from userspace with optional address space checking. + * + * Copyright 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include + + .text + .align 1 + .global strnlen_user + .type strnlen_user, "function" +strnlen_user: + branch_if_kernel r8, __strnlen_user + sub r8, r11, 1 + add r8, r12 + retcs 0 + brmi adjust_length /* do a closer inspection */ + + .global __strnlen_user + .type __strnlen_user, "function" +__strnlen_user: + mov r10, r12 + +10: ld.ub r8, r12++ + cp.w r8, 0 + breq 2f + sub r11, 1 + brne 10b + + sub r12, -1 +2: sub r12, r10 + retal r12 + + + .type adjust_length, "function" +adjust_length: + cp.w r12, 0 /* addr must always be < TASK_SIZE */ + retmi 0 + + pushm lr + lddpc lr, _task_size + sub r11, lr, r12 + mov r9, r11 + rcall __strnlen_user + cp.w r12, r9 + brgt 1f + popm pc +1: popm pc, r12=0 + + .align 2 +_task_size: + .long TASK_SIZE + + .section .fixup, "ax" + .align 1 +19: retal 0 + + .section __ex_table, "a" + .align 2 + .long 10b, 19b diff --git a/arch/avr32/mach-at32ap/Makefile b/arch/avr32/mach-at32ap/Makefile new file mode 100644 index 0000000..f62eb69 --- /dev/null +++ b/arch/avr32/mach-at32ap/Makefile @@ -0,0 +1,2 @@ +obj-y += at32ap.o clock.o pio.o intc.o extint.o hsmc.o +obj-$(CONFIG_CPU_AT32AP7000) += at32ap7000.o diff --git a/arch/avr32/mach-at32ap/at32ap.c b/arch/avr32/mach-at32ap/at32ap.c new file mode 100644 index 0000000..f7cedf5 --- /dev/null +++ b/arch/avr32/mach-at32ap/at32ap.c @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include + +#include + +#include +#include + +struct at32_sm system_manager; + +static int __init at32_sm_init(void) +{ + struct resource *regs; + struct at32_sm *sm = &system_manager; + int ret = -ENXIO; + + regs = platform_get_resource(&at32_sm_device, IORESOURCE_MEM, 0); + if (!regs) + goto fail; + + spin_lock_init(&sm->lock); + sm->pdev = &at32_sm_device; + + ret = -ENOMEM; + sm->regs = ioremap(regs->start, regs->end - regs->start + 1); + if (!sm->regs) + goto fail; + + return 0; + +fail: + printk(KERN_ERR "Failed to initialize System Manager: %d\n", ret); + return ret; +} + +void __init setup_platform(void) +{ + at32_sm_init(); + at32_clock_init(); + at32_portmux_init(); + + /* FIXME: This doesn't belong here */ + at32_setup_serial_console(1); +} + +static int __init pdc_probe(struct platform_device *pdev) +{ + struct clk *pclk, *hclk; + + pclk = clk_get(&pdev->dev, "pclk"); + if (IS_ERR(pclk)) { + dev_err(&pdev->dev, "no pclk defined\n"); + return PTR_ERR(pclk); + } + hclk = clk_get(&pdev->dev, "hclk"); + if (IS_ERR(hclk)) { + dev_err(&pdev->dev, "no hclk defined\n"); + clk_put(pclk); + return PTR_ERR(hclk); + } + + clk_enable(pclk); + clk_enable(hclk); + + dev_info(&pdev->dev, "Atmel Peripheral DMA Controller enabled\n"); + return 0; +} + +static struct platform_driver pdc_driver = { + .probe = pdc_probe, + .driver = { + .name = "pdc", + }, +}; + +static int __init pdc_init(void) +{ + return platform_driver_register(&pdc_driver); +} +arch_initcall(pdc_init); diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c new file mode 100644 index 0000000..37982b6 --- /dev/null +++ b/arch/avr32/mach-at32ap/at32ap7000.c @@ -0,0 +1,876 @@ +/* + * Copyright (C) 2005-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +#include + +#include +#include +#include + +#include "clock.h" +#include "pio.h" +#include "sm.h" + +#define PBMEM(base) \ + { \ + .start = base, \ + .end = base + 0x3ff, \ + .flags = IORESOURCE_MEM, \ + } +#define IRQ(num) \ + { \ + .start = num, \ + .end = num, \ + .flags = IORESOURCE_IRQ, \ + } +#define NAMED_IRQ(num, _name) \ + { \ + .start = num, \ + .end = num, \ + .name = _name, \ + .flags = IORESOURCE_IRQ, \ + } + +#define DEFINE_DEV(_name, _id) \ +static struct platform_device _name##_id##_device = { \ + .name = #_name, \ + .id = _id, \ + .resource = _name##_id##_resource, \ + .num_resources = ARRAY_SIZE(_name##_id##_resource), \ +} +#define DEFINE_DEV_DATA(_name, _id) \ +static struct platform_device _name##_id##_device = { \ + .name = #_name, \ + .id = _id, \ + .dev = { \ + .platform_data = &_name##_id##_data, \ + }, \ + .resource = _name##_id##_resource, \ + .num_resources = ARRAY_SIZE(_name##_id##_resource), \ +} + +#define DEV_CLK(_name, devname, bus, _index) \ +static struct clk devname##_##_name = { \ + .name = #_name, \ + .dev = &devname##_device.dev, \ + .parent = &bus##_clk, \ + .mode = bus##_clk_mode, \ + .get_rate = bus##_clk_get_rate, \ + .index = _index, \ +} + +enum { + PIOA, + PIOB, + PIOC, + PIOD, +}; + +enum { + FUNC_A, + FUNC_B, +}; + +unsigned long at32ap7000_osc_rates[3] = { + [0] = 32768, + /* FIXME: these are ATSTK1002-specific */ + [1] = 20000000, + [2] = 12000000, +}; + +static unsigned long osc_get_rate(struct clk *clk) +{ + return at32ap7000_osc_rates[clk->index]; +} + +static unsigned long pll_get_rate(struct clk *clk, unsigned long control) +{ + unsigned long div, mul, rate; + + if (!(control & SM_BIT(PLLEN))) + return 0; + + div = SM_BFEXT(PLLDIV, control) + 1; + mul = SM_BFEXT(PLLMUL, control) + 1; + + rate = clk->parent->get_rate(clk->parent); + rate = (rate + div / 2) / div; + rate *= mul; + + return rate; +} + +static unsigned long pll0_get_rate(struct clk *clk) +{ + u32 control; + + control = sm_readl(&system_manager, PM_PLL0); + + return pll_get_rate(clk, control); +} + +static unsigned long pll1_get_rate(struct clk *clk) +{ + u32 control; + + control = sm_readl(&system_manager, PM_PLL1); + + return pll_get_rate(clk, control); +} + +/* + * The AT32AP7000 has five primary clock sources: One 32kHz + * oscillator, two crystal oscillators and two PLLs. + */ +static struct clk osc32k = { + .name = "osc32k", + .get_rate = osc_get_rate, + .users = 1, + .index = 0, +}; +static struct clk osc0 = { + .name = "osc0", + .get_rate = osc_get_rate, + .users = 1, + .index = 1, +}; +static struct clk osc1 = { + .name = "osc1", + .get_rate = osc_get_rate, + .index = 2, +}; +static struct clk pll0 = { + .name = "pll0", + .get_rate = pll0_get_rate, + .parent = &osc0, +}; +static struct clk pll1 = { + .name = "pll1", + .get_rate = pll1_get_rate, + .parent = &osc0, +}; + +/* + * The main clock can be either osc0 or pll0. The boot loader may + * have chosen one for us, so we don't really know which one until we + * have a look at the SM. + */ +static struct clk *main_clock; + +/* + * Synchronous clocks are generated from the main clock. The clocks + * must satisfy the constraint + * fCPU >= fHSB >= fPB + * i.e. each clock must not be faster than its parent. + */ +static unsigned long bus_clk_get_rate(struct clk *clk, unsigned int shift) +{ + return main_clock->get_rate(main_clock) >> shift; +}; + +static void cpu_clk_mode(struct clk *clk, int enabled) +{ + struct at32_sm *sm = &system_manager; + unsigned long flags; + u32 mask; + + spin_lock_irqsave(&sm->lock, flags); + mask = sm_readl(sm, PM_CPU_MASK); + if (enabled) + mask |= 1 << clk->index; + else + mask &= ~(1 << clk->index); + sm_writel(sm, PM_CPU_MASK, mask); + spin_unlock_irqrestore(&sm->lock, flags); +} + +static unsigned long cpu_clk_get_rate(struct clk *clk) +{ + unsigned long cksel, shift = 0; + + cksel = sm_readl(&system_manager, PM_CKSEL); + if (cksel & SM_BIT(CPUDIV)) + shift = SM_BFEXT(CPUSEL, cksel) + 1; + + return bus_clk_get_rate(clk, shift); +} + +static void hsb_clk_mode(struct clk *clk, int enabled) +{ + struct at32_sm *sm = &system_manager; + unsigned long flags; + u32 mask; + + spin_lock_irqsave(&sm->lock, flags); + mask = sm_readl(sm, PM_HSB_MASK); + if (enabled) + mask |= 1 << clk->index; + else + mask &= ~(1 << clk->index); + sm_writel(sm, PM_HSB_MASK, mask); + spin_unlock_irqrestore(&sm->lock, flags); +} + +static unsigned long hsb_clk_get_rate(struct clk *clk) +{ + unsigned long cksel, shift = 0; + + cksel = sm_readl(&system_manager, PM_CKSEL); + if (cksel & SM_BIT(HSBDIV)) + shift = SM_BFEXT(HSBSEL, cksel) + 1; + + return bus_clk_get_rate(clk, shift); +} + +static void pba_clk_mode(struct clk *clk, int enabled) +{ + struct at32_sm *sm = &system_manager; + unsigned long flags; + u32 mask; + + spin_lock_irqsave(&sm->lock, flags); + mask = sm_readl(sm, PM_PBA_MASK); + if (enabled) + mask |= 1 << clk->index; + else + mask &= ~(1 << clk->index); + sm_writel(sm, PM_PBA_MASK, mask); + spin_unlock_irqrestore(&sm->lock, flags); +} + +static unsigned long pba_clk_get_rate(struct clk *clk) +{ + unsigned long cksel, shift = 0; + + cksel = sm_readl(&system_manager, PM_CKSEL); + if (cksel & SM_BIT(PBADIV)) + shift = SM_BFEXT(PBASEL, cksel) + 1; + + return bus_clk_get_rate(clk, shift); +} + +static void pbb_clk_mode(struct clk *clk, int enabled) +{ + struct at32_sm *sm = &system_manager; + unsigned long flags; + u32 mask; + + spin_lock_irqsave(&sm->lock, flags); + mask = sm_readl(sm, PM_PBB_MASK); + if (enabled) + mask |= 1 << clk->index; + else + mask &= ~(1 << clk->index); + sm_writel(sm, PM_PBB_MASK, mask); + spin_unlock_irqrestore(&sm->lock, flags); +} + +static unsigned long pbb_clk_get_rate(struct clk *clk) +{ + unsigned long cksel, shift = 0; + + cksel = sm_readl(&system_manager, PM_CKSEL); + if (cksel & SM_BIT(PBBDIV)) + shift = SM_BFEXT(PBBSEL, cksel) + 1; + + return bus_clk_get_rate(clk, shift); +} + +static struct clk cpu_clk = { + .name = "cpu", + .get_rate = cpu_clk_get_rate, + .users = 1, +}; +static struct clk hsb_clk = { + .name = "hsb", + .parent = &cpu_clk, + .get_rate = hsb_clk_get_rate, +}; +static struct clk pba_clk = { + .name = "pba", + .parent = &hsb_clk, + .mode = hsb_clk_mode, + .get_rate = pba_clk_get_rate, + .index = 1, +}; +static struct clk pbb_clk = { + .name = "pbb", + .parent = &hsb_clk, + .mode = hsb_clk_mode, + .get_rate = pbb_clk_get_rate, + .users = 1, + .index = 2, +}; + +/* -------------------------------------------------------------------- + * Generic Clock operations + * -------------------------------------------------------------------- */ + +static void genclk_mode(struct clk *clk, int enabled) +{ + u32 control; + + BUG_ON(clk->index > 7); + + control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); + if (enabled) + control |= SM_BIT(CEN); + else + control &= ~SM_BIT(CEN); + sm_writel(&system_manager, PM_GCCTRL + 4 * clk->index, control); +} + +static unsigned long genclk_get_rate(struct clk *clk) +{ + u32 control; + unsigned long div = 1; + + BUG_ON(clk->index > 7); + + if (!clk->parent) + return 0; + + control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); + if (control & SM_BIT(DIVEN)) + div = 2 * (SM_BFEXT(DIV, control) + 1); + + return clk->parent->get_rate(clk->parent) / div; +} + +static long genclk_set_rate(struct clk *clk, unsigned long rate, int apply) +{ + u32 control; + unsigned long parent_rate, actual_rate, div; + + BUG_ON(clk->index > 7); + + if (!clk->parent) + return 0; + + parent_rate = clk->parent->get_rate(clk->parent); + control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); + + if (rate > 3 * parent_rate / 4) { + actual_rate = parent_rate; + control &= ~SM_BIT(DIVEN); + } else { + div = (parent_rate + rate) / (2 * rate) - 1; + control = SM_BFINS(DIV, div, control) | SM_BIT(DIVEN); + actual_rate = parent_rate / (2 * (div + 1)); + } + + printk("clk %s: new rate %lu (actual rate %lu)\n", + clk->name, rate, actual_rate); + + if (apply) + sm_writel(&system_manager, PM_GCCTRL + 4 * clk->index, + control); + + return actual_rate; +} + +int genclk_set_parent(struct clk *clk, struct clk *parent) +{ + u32 control; + + BUG_ON(clk->index > 7); + + printk("clk %s: new parent %s (was %s)\n", + clk->name, parent->name, + clk->parent ? clk->parent->name : "(null)"); + + control = sm_readl(&system_manager, PM_GCCTRL + 4 * clk->index); + + if (parent == &osc1 || parent == &pll1) + control |= SM_BIT(OSCSEL); + else if (parent == &osc0 || parent == &pll0) + control &= ~SM_BIT(OSCSEL); + else + return -EINVAL; + + if (parent == &pll0 || parent == &pll1) + control |= SM_BIT(PLLSEL); + else + control &= ~SM_BIT(PLLSEL); + + sm_writel(&system_manager, PM_GCCTRL + 4 * clk->index, control); + clk->parent = parent; + + return 0; +} + +/* -------------------------------------------------------------------- + * System peripherals + * -------------------------------------------------------------------- */ +static struct resource sm_resource[] = { + PBMEM(0xfff00000), + NAMED_IRQ(19, "eim"), + NAMED_IRQ(20, "pm"), + NAMED_IRQ(21, "rtc"), +}; +struct platform_device at32_sm_device = { + .name = "sm", + .id = 0, + .resource = sm_resource, + .num_resources = ARRAY_SIZE(sm_resource), +}; +DEV_CLK(pclk, at32_sm, pbb, 0); + +static struct resource intc0_resource[] = { + PBMEM(0xfff00400), +}; +struct platform_device at32_intc0_device = { + .name = "intc", + .id = 0, + .resource = intc0_resource, + .num_resources = ARRAY_SIZE(intc0_resource), +}; +DEV_CLK(pclk, at32_intc0, pbb, 1); + +static struct clk ebi_clk = { + .name = "ebi", + .parent = &hsb_clk, + .mode = hsb_clk_mode, + .get_rate = hsb_clk_get_rate, + .users = 1, +}; +static struct clk hramc_clk = { + .name = "hramc", + .parent = &hsb_clk, + .mode = hsb_clk_mode, + .get_rate = hsb_clk_get_rate, + .users = 1, +}; + +static struct resource smc0_resource[] = { + PBMEM(0xfff03400), +}; +DEFINE_DEV(smc, 0); +DEV_CLK(pclk, smc0, pbb, 13); +DEV_CLK(mck, smc0, hsb, 0); + +static struct platform_device pdc_device = { + .name = "pdc", + .id = 0, +}; +DEV_CLK(hclk, pdc, hsb, 4); +DEV_CLK(pclk, pdc, pba, 16); + +static struct clk pico_clk = { + .name = "pico", + .parent = &cpu_clk, + .mode = cpu_clk_mode, + .get_rate = cpu_clk_get_rate, + .users = 1, +}; + +/* -------------------------------------------------------------------- + * PIO + * -------------------------------------------------------------------- */ + +static struct resource pio0_resource[] = { + PBMEM(0xffe02800), + IRQ(13), +}; +DEFINE_DEV(pio, 0); +DEV_CLK(mck, pio0, pba, 10); + +static struct resource pio1_resource[] = { + PBMEM(0xffe02c00), + IRQ(14), +}; +DEFINE_DEV(pio, 1); +DEV_CLK(mck, pio1, pba, 11); + +static struct resource pio2_resource[] = { + PBMEM(0xffe03000), + IRQ(15), +}; +DEFINE_DEV(pio, 2); +DEV_CLK(mck, pio2, pba, 12); + +static struct resource pio3_resource[] = { + PBMEM(0xffe03400), + IRQ(16), +}; +DEFINE_DEV(pio, 3); +DEV_CLK(mck, pio3, pba, 13); + +void __init at32_add_system_devices(void) +{ + system_manager.eim_first_irq = NR_INTERNAL_IRQS; + + platform_device_register(&at32_sm_device); + platform_device_register(&at32_intc0_device); + platform_device_register(&smc0_device); + platform_device_register(&pdc_device); + + platform_device_register(&pio0_device); + platform_device_register(&pio1_device); + platform_device_register(&pio2_device); + platform_device_register(&pio3_device); +} + +/* -------------------------------------------------------------------- + * USART + * -------------------------------------------------------------------- */ + +static struct resource usart0_resource[] = { + PBMEM(0xffe00c00), + IRQ(7), +}; +DEFINE_DEV(usart, 0); +DEV_CLK(usart, usart0, pba, 4); + +static struct resource usart1_resource[] = { + PBMEM(0xffe01000), + IRQ(7), +}; +DEFINE_DEV(usart, 1); +DEV_CLK(usart, usart1, pba, 4); + +static struct resource usart2_resource[] = { + PBMEM(0xffe01400), + IRQ(8), +}; +DEFINE_DEV(usart, 2); +DEV_CLK(usart, usart2, pba, 5); + +static struct resource usart3_resource[] = { + PBMEM(0xffe01800), + IRQ(9), +}; +DEFINE_DEV(usart, 3); +DEV_CLK(usart, usart3, pba, 6); + +static inline void configure_usart0_pins(void) +{ + portmux_set_func(PIOA, 8, FUNC_B); /* RXD */ + portmux_set_func(PIOA, 9, FUNC_B); /* TXD */ +} + +static inline void configure_usart1_pins(void) +{ + portmux_set_func(PIOA, 17, FUNC_A); /* RXD */ + portmux_set_func(PIOA, 18, FUNC_A); /* TXD */ +} + +static inline void configure_usart2_pins(void) +{ + portmux_set_func(PIOB, 26, FUNC_B); /* RXD */ + portmux_set_func(PIOB, 27, FUNC_B); /* TXD */ +} + +static inline void configure_usart3_pins(void) +{ + portmux_set_func(PIOB, 18, FUNC_B); /* RXD */ + portmux_set_func(PIOB, 17, FUNC_B); /* TXD */ +} + +static struct platform_device *setup_usart(unsigned int id) +{ + struct platform_device *pdev; + + switch (id) { + case 0: + pdev = &usart0_device; + configure_usart0_pins(); + break; + case 1: + pdev = &usart1_device; + configure_usart1_pins(); + break; + case 2: + pdev = &usart2_device; + configure_usart2_pins(); + break; + case 3: + pdev = &usart3_device; + configure_usart3_pins(); + break; + default: + pdev = NULL; + break; + } + + return pdev; +} + +struct platform_device *__init at32_add_device_usart(unsigned int id) +{ + struct platform_device *pdev; + + pdev = setup_usart(id); + if (pdev) + platform_device_register(pdev); + + return pdev; +} + +struct platform_device *at91_default_console_device; + +void __init at32_setup_serial_console(unsigned int usart_id) +{ + at91_default_console_device = setup_usart(usart_id); +} + +/* -------------------------------------------------------------------- + * Ethernet + * -------------------------------------------------------------------- */ + +static struct eth_platform_data macb0_data; +static struct resource macb0_resource[] = { + PBMEM(0xfff01800), + IRQ(25), +}; +DEFINE_DEV_DATA(macb, 0); +DEV_CLK(hclk, macb0, hsb, 8); +DEV_CLK(pclk, macb0, pbb, 6); + +struct platform_device *__init +at32_add_device_eth(unsigned int id, struct eth_platform_data *data) +{ + struct platform_device *pdev; + + switch (id) { + case 0: + pdev = &macb0_device; + + portmux_set_func(PIOC, 3, FUNC_A); /* TXD0 */ + portmux_set_func(PIOC, 4, FUNC_A); /* TXD1 */ + portmux_set_func(PIOC, 7, FUNC_A); /* TXEN */ + portmux_set_func(PIOC, 8, FUNC_A); /* TXCK */ + portmux_set_func(PIOC, 9, FUNC_A); /* RXD0 */ + portmux_set_func(PIOC, 10, FUNC_A); /* RXD1 */ + portmux_set_func(PIOC, 13, FUNC_A); /* RXER */ + portmux_set_func(PIOC, 15, FUNC_A); /* RXDV */ + portmux_set_func(PIOC, 16, FUNC_A); /* MDC */ + portmux_set_func(PIOC, 17, FUNC_A); /* MDIO */ + + if (!data->is_rmii) { + portmux_set_func(PIOC, 0, FUNC_A); /* COL */ + portmux_set_func(PIOC, 1, FUNC_A); /* CRS */ + portmux_set_func(PIOC, 2, FUNC_A); /* TXER */ + portmux_set_func(PIOC, 5, FUNC_A); /* TXD2 */ + portmux_set_func(PIOC, 6, FUNC_A); /* TXD3 */ + portmux_set_func(PIOC, 11, FUNC_A); /* RXD2 */ + portmux_set_func(PIOC, 12, FUNC_A); /* RXD3 */ + portmux_set_func(PIOC, 14, FUNC_A); /* RXCK */ + portmux_set_func(PIOC, 18, FUNC_A); /* SPD */ + } + break; + + default: + return NULL; + } + + memcpy(pdev->dev.platform_data, data, sizeof(struct eth_platform_data)); + platform_device_register(pdev); + + return pdev; +} + +/* -------------------------------------------------------------------- + * SPI + * -------------------------------------------------------------------- */ +static struct resource spi0_resource[] = { + PBMEM(0xffe00000), + IRQ(3), +}; +DEFINE_DEV(spi, 0); +DEV_CLK(mck, spi0, pba, 0); + +struct platform_device *__init at32_add_device_spi(unsigned int id) +{ + struct platform_device *pdev; + + switch (id) { + case 0: + pdev = &spi0_device; + portmux_set_func(PIOA, 0, FUNC_A); /* MISO */ + portmux_set_func(PIOA, 1, FUNC_A); /* MOSI */ + portmux_set_func(PIOA, 2, FUNC_A); /* SCK */ + portmux_set_func(PIOA, 3, FUNC_A); /* NPCS0 */ + portmux_set_func(PIOA, 4, FUNC_A); /* NPCS1 */ + portmux_set_func(PIOA, 5, FUNC_A); /* NPCS2 */ + break; + + default: + return NULL; + } + + platform_device_register(pdev); + return pdev; +} + +/* -------------------------------------------------------------------- + * LCDC + * -------------------------------------------------------------------- */ +static struct lcdc_platform_data lcdc0_data; +static struct resource lcdc0_resource[] = { + { + .start = 0xff000000, + .end = 0xff000fff, + .flags = IORESOURCE_MEM, + }, + IRQ(1), +}; +DEFINE_DEV_DATA(lcdc, 0); +DEV_CLK(hclk, lcdc0, hsb, 7); +static struct clk lcdc0_pixclk = { + .name = "pixclk", + .dev = &lcdc0_device.dev, + .mode = genclk_mode, + .get_rate = genclk_get_rate, + .set_rate = genclk_set_rate, + .set_parent = genclk_set_parent, + .index = 7, +}; + +struct platform_device *__init +at32_add_device_lcdc(unsigned int id, struct lcdc_platform_data *data) +{ + struct platform_device *pdev; + + switch (id) { + case 0: + pdev = &lcdc0_device; + portmux_set_func(PIOC, 19, FUNC_A); /* CC */ + portmux_set_func(PIOC, 20, FUNC_A); /* HSYNC */ + portmux_set_func(PIOC, 21, FUNC_A); /* PCLK */ + portmux_set_func(PIOC, 22, FUNC_A); /* VSYNC */ + portmux_set_func(PIOC, 23, FUNC_A); /* DVAL */ + portmux_set_func(PIOC, 24, FUNC_A); /* MODE */ + portmux_set_func(PIOC, 25, FUNC_A); /* PWR */ + portmux_set_func(PIOC, 26, FUNC_A); /* DATA0 */ + portmux_set_func(PIOC, 27, FUNC_A); /* DATA1 */ + portmux_set_func(PIOC, 28, FUNC_A); /* DATA2 */ + portmux_set_func(PIOC, 29, FUNC_A); /* DATA3 */ + portmux_set_func(PIOC, 30, FUNC_A); /* DATA4 */ + portmux_set_func(PIOC, 31, FUNC_A); /* DATA5 */ + portmux_set_func(PIOD, 0, FUNC_A); /* DATA6 */ + portmux_set_func(PIOD, 1, FUNC_A); /* DATA7 */ + portmux_set_func(PIOD, 2, FUNC_A); /* DATA8 */ + portmux_set_func(PIOD, 3, FUNC_A); /* DATA9 */ + portmux_set_func(PIOD, 4, FUNC_A); /* DATA10 */ + portmux_set_func(PIOD, 5, FUNC_A); /* DATA11 */ + portmux_set_func(PIOD, 6, FUNC_A); /* DATA12 */ + portmux_set_func(PIOD, 7, FUNC_A); /* DATA13 */ + portmux_set_func(PIOD, 8, FUNC_A); /* DATA14 */ + portmux_set_func(PIOD, 9, FUNC_A); /* DATA15 */ + portmux_set_func(PIOD, 10, FUNC_A); /* DATA16 */ + portmux_set_func(PIOD, 11, FUNC_A); /* DATA17 */ + portmux_set_func(PIOD, 12, FUNC_A); /* DATA18 */ + portmux_set_func(PIOD, 13, FUNC_A); /* DATA19 */ + portmux_set_func(PIOD, 14, FUNC_A); /* DATA20 */ + portmux_set_func(PIOD, 15, FUNC_A); /* DATA21 */ + portmux_set_func(PIOD, 16, FUNC_A); /* DATA22 */ + portmux_set_func(PIOD, 17, FUNC_A); /* DATA23 */ + + clk_set_parent(&lcdc0_pixclk, &pll0); + clk_set_rate(&lcdc0_pixclk, clk_get_rate(&pll0)); + break; + + default: + return NULL; + } + + memcpy(pdev->dev.platform_data, data, + sizeof(struct lcdc_platform_data)); + + platform_device_register(pdev); + return pdev; +} + +struct clk *at32_clock_list[] = { + &osc32k, + &osc0, + &osc1, + &pll0, + &pll1, + &cpu_clk, + &hsb_clk, + &pba_clk, + &pbb_clk, + &at32_sm_pclk, + &at32_intc0_pclk, + &ebi_clk, + &hramc_clk, + &smc0_pclk, + &smc0_mck, + &pdc_hclk, + &pdc_pclk, + &pico_clk, + &pio0_mck, + &pio1_mck, + &pio2_mck, + &pio3_mck, + &usart0_usart, + &usart1_usart, + &usart2_usart, + &usart3_usart, + &macb0_hclk, + &macb0_pclk, + &spi0_mck, + &lcdc0_hclk, + &lcdc0_pixclk, +}; +unsigned int at32_nr_clocks = ARRAY_SIZE(at32_clock_list); + +void __init at32_portmux_init(void) +{ + at32_init_pio(&pio0_device); + at32_init_pio(&pio1_device); + at32_init_pio(&pio2_device); + at32_init_pio(&pio3_device); +} + +void __init at32_clock_init(void) +{ + struct at32_sm *sm = &system_manager; + u32 cpu_mask = 0, hsb_mask = 0, pba_mask = 0, pbb_mask = 0; + int i; + + if (sm_readl(sm, PM_MCCTRL) & SM_BIT(PLLSEL)) + main_clock = &pll0; + else + main_clock = &osc0; + + if (sm_readl(sm, PM_PLL0) & SM_BIT(PLLOSC)) + pll0.parent = &osc1; + if (sm_readl(sm, PM_PLL1) & SM_BIT(PLLOSC)) + pll1.parent = &osc1; + + /* + * Turn on all clocks that have at least one user already, and + * turn off everything else. We only do this for module + * clocks, and even though it isn't particularly pretty to + * check the address of the mode function, it should do the + * trick... + */ + for (i = 0; i < ARRAY_SIZE(at32_clock_list); i++) { + struct clk *clk = at32_clock_list[i]; + + if (clk->mode == &cpu_clk_mode) + cpu_mask |= 1 << clk->index; + else if (clk->mode == &hsb_clk_mode) + hsb_mask |= 1 << clk->index; + else if (clk->mode == &pba_clk_mode) + pba_mask |= 1 << clk->index; + else if (clk->mode == &pbb_clk_mode) + pbb_mask |= 1 << clk->index; + } + + sm_writel(sm, PM_CPU_MASK, cpu_mask); + sm_writel(sm, PM_HSB_MASK, hsb_mask); + sm_writel(sm, PM_PBA_MASK, pba_mask); + sm_writel(sm, PM_PBB_MASK, pbb_mask); +} diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c new file mode 100644 index 0000000..3d0d109 --- /dev/null +++ b/arch/avr32/mach-at32ap/clock.c @@ -0,0 +1,148 @@ +/* + * Clock management for AT32AP CPUs + * + * Copyright (C) 2006 Atmel Corporation + * + * Based on arch/arm/mach-at91rm9200/clock.c + * Copyright (C) 2005 David Brownell + * Copyright (C) 2005 Ivan Kokshaysky + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include +#include + +#include "clock.h" + +static spinlock_t clk_lock = SPIN_LOCK_UNLOCKED; + +struct clk *clk_get(struct device *dev, const char *id) +{ + int i; + + for (i = 0; i < at32_nr_clocks; i++) { + struct clk *clk = at32_clock_list[i]; + + if (clk->dev == dev && strcmp(id, clk->name) == 0) + return clk; + } + + return ERR_PTR(-ENOENT); +} +EXPORT_SYMBOL(clk_get); + +void clk_put(struct clk *clk) +{ + /* clocks are static for now, we can't free them */ +} +EXPORT_SYMBOL(clk_put); + +static void __clk_enable(struct clk *clk) +{ + if (clk->parent) + __clk_enable(clk->parent); + if (clk->users++ == 0 && clk->mode) + clk->mode(clk, 1); +} + +int clk_enable(struct clk *clk) +{ + unsigned long flags; + + spin_lock_irqsave(&clk_lock, flags); + __clk_enable(clk); + spin_unlock_irqrestore(&clk_lock, flags); + + return 0; +} +EXPORT_SYMBOL(clk_enable); + +static void __clk_disable(struct clk *clk) +{ + BUG_ON(clk->users == 0); + + if (--clk->users == 0 && clk->mode) + clk->mode(clk, 0); + if (clk->parent) + __clk_disable(clk->parent); +} + +void clk_disable(struct clk *clk) +{ + unsigned long flags; + + spin_lock_irqsave(&clk_lock, flags); + __clk_disable(clk); + spin_unlock_irqrestore(&clk_lock, flags); +} +EXPORT_SYMBOL(clk_disable); + +unsigned long clk_get_rate(struct clk *clk) +{ + unsigned long flags; + unsigned long rate; + + spin_lock_irqsave(&clk_lock, flags); + rate = clk->get_rate(clk); + spin_unlock_irqrestore(&clk_lock, flags); + + return rate; +} +EXPORT_SYMBOL(clk_get_rate); + +long clk_round_rate(struct clk *clk, unsigned long rate) +{ + unsigned long flags, actual_rate; + + if (!clk->set_rate) + return -ENOSYS; + + spin_lock_irqsave(&clk_lock, flags); + actual_rate = clk->set_rate(clk, rate, 0); + spin_unlock_irqrestore(&clk_lock, flags); + + return actual_rate; +} +EXPORT_SYMBOL(clk_round_rate); + +int clk_set_rate(struct clk *clk, unsigned long rate) +{ + unsigned long flags; + long ret; + + if (!clk->set_rate) + return -ENOSYS; + + spin_lock_irqsave(&clk_lock, flags); + ret = clk->set_rate(clk, rate, 1); + spin_unlock_irqrestore(&clk_lock, flags); + + return (ret < 0) ? ret : 0; +} +EXPORT_SYMBOL(clk_set_rate); + +int clk_set_parent(struct clk *clk, struct clk *parent) +{ + unsigned long flags; + int ret; + + if (!clk->set_parent) + return -ENOSYS; + + spin_lock_irqsave(&clk_lock, flags); + ret = clk->set_parent(clk, parent); + spin_unlock_irqrestore(&clk_lock, flags); + + return ret; +} +EXPORT_SYMBOL(clk_set_parent); + +struct clk *clk_get_parent(struct clk *clk) +{ + return clk->parent; +} +EXPORT_SYMBOL(clk_get_parent); diff --git a/arch/avr32/mach-at32ap/clock.h b/arch/avr32/mach-at32ap/clock.h new file mode 100644 index 0000000..f953f04 --- /dev/null +++ b/arch/avr32/mach-at32ap/clock.h @@ -0,0 +1,30 @@ +/* + * Clock management for AT32AP CPUs + * + * Copyright (C) 2006 Atmel Corporation + * + * Based on arch/arm/mach-at91rm9200/clock.c + * Copyright (C) 2005 David Brownell + * Copyright (C) 2005 Ivan Kokshaysky + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include + +struct clk { + const char *name; /* Clock name/function */ + struct device *dev; /* Device the clock is used by */ + struct clk *parent; /* Parent clock, if any */ + void (*mode)(struct clk *clk, int enabled); + unsigned long (*get_rate)(struct clk *clk); + long (*set_rate)(struct clk *clk, unsigned long rate, + int apply); + int (*set_parent)(struct clk *clk, struct clk *parent); + u16 users; /* Enabled if non-zero */ + u16 index; /* Sibling index */ +}; + +extern struct clk *at32_clock_list[]; +extern unsigned int at32_nr_clocks; diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c new file mode 100644 index 0000000..7da9c5f --- /dev/null +++ b/arch/avr32/mach-at32ap/extint.c @@ -0,0 +1,171 @@ +/* + * External interrupt handling for AT32AP CPUs + * + * Copyright (C) 2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include "sm.h" + +static void eim_ack_irq(unsigned int irq) +{ + struct at32_sm *sm = get_irq_chip_data(irq); + sm_writel(sm, EIM_ICR, 1 << (irq - sm->eim_first_irq)); +} + +static void eim_mask_irq(unsigned int irq) +{ + struct at32_sm *sm = get_irq_chip_data(irq); + sm_writel(sm, EIM_IDR, 1 << (irq - sm->eim_first_irq)); +} + +static void eim_mask_ack_irq(unsigned int irq) +{ + struct at32_sm *sm = get_irq_chip_data(irq); + sm_writel(sm, EIM_ICR, 1 << (irq - sm->eim_first_irq)); + sm_writel(sm, EIM_IDR, 1 << (irq - sm->eim_first_irq)); +} + +static void eim_unmask_irq(unsigned int irq) +{ + struct at32_sm *sm = get_irq_chip_data(irq); + sm_writel(sm, EIM_IER, 1 << (irq - sm->eim_first_irq)); +} + +static int eim_set_irq_type(unsigned int irq, unsigned int flow_type) +{ + struct at32_sm *sm = get_irq_chip_data(irq); + unsigned int i = irq - sm->eim_first_irq; + u32 mode, edge, level; + unsigned long flags; + int ret = 0; + + flow_type &= IRQ_TYPE_SENSE_MASK; + + spin_lock_irqsave(&sm->lock, flags); + + mode = sm_readl(sm, EIM_MODE); + edge = sm_readl(sm, EIM_EDGE); + level = sm_readl(sm, EIM_LEVEL); + + switch (flow_type) { + case IRQ_TYPE_LEVEL_LOW: + mode |= 1 << i; + level &= ~(1 << i); + break; + case IRQ_TYPE_LEVEL_HIGH: + mode |= 1 << i; + level |= 1 << i; + break; + case IRQ_TYPE_EDGE_RISING: + mode &= ~(1 << i); + edge |= 1 << i; + break; + case IRQ_TYPE_EDGE_FALLING: + mode &= ~(1 << i); + edge &= ~(1 << i); + break; + default: + ret = -EINVAL; + break; + } + + sm_writel(sm, EIM_MODE, mode); + sm_writel(sm, EIM_EDGE, edge); + sm_writel(sm, EIM_LEVEL, level); + + spin_unlock_irqrestore(&sm->lock, flags); + + return ret; +} + +struct irq_chip eim_chip = { + .name = "eim", + .ack = eim_ack_irq, + .mask = eim_mask_irq, + .mask_ack = eim_mask_ack_irq, + .unmask = eim_unmask_irq, + .set_type = eim_set_irq_type, +}; + +static void demux_eim_irq(unsigned int irq, struct irq_desc *desc, + struct pt_regs *regs) +{ + struct at32_sm *sm = desc->handler_data; + struct irq_desc *ext_desc; + unsigned long status, pending; + unsigned int i, ext_irq; + + spin_lock(&sm->lock); + + status = sm_readl(sm, EIM_ISR); + pending = status & sm_readl(sm, EIM_IMR); + + while (pending) { + i = fls(pending) - 1; + pending &= ~(1 << i); + + ext_irq = i + sm->eim_first_irq; + ext_desc = irq_desc + ext_irq; + ext_desc->handle_irq(ext_irq, ext_desc, regs); + } + + spin_unlock(&sm->lock); +} + +static int __init eim_init(void) +{ + struct at32_sm *sm = &system_manager; + unsigned int i; + unsigned int nr_irqs; + unsigned int int_irq; + u32 pattern; + + /* + * The EIM is really the same module as SM, so register + * mapping, etc. has been taken care of already. + */ + + /* + * Find out how many interrupt lines that are actually + * implemented in hardware. + */ + sm_writel(sm, EIM_IDR, ~0UL); + sm_writel(sm, EIM_MODE, ~0UL); + pattern = sm_readl(sm, EIM_MODE); + nr_irqs = fls(pattern); + + sm->eim_chip = &eim_chip; + + for (i = 0; i < nr_irqs; i++) { + set_irq_chip(sm->eim_first_irq + i, &eim_chip); + set_irq_chip_data(sm->eim_first_irq + i, sm); + } + + int_irq = platform_get_irq_byname(sm->pdev, "eim"); + + set_irq_chained_handler(int_irq, demux_eim_irq); + set_irq_data(int_irq, sm); + + printk("EIM: External Interrupt Module at 0x%p, IRQ %u\n", + sm->regs, int_irq); + printk("EIM: Handling %u external IRQs, starting with IRQ %u\n", + nr_irqs, sm->eim_first_irq); + + return 0; +} +arch_initcall(eim_init); diff --git a/arch/avr32/mach-at32ap/hsmc.c b/arch/avr32/mach-at32ap/hsmc.c new file mode 100644 index 0000000..7691721 --- /dev/null +++ b/arch/avr32/mach-at32ap/hsmc.c @@ -0,0 +1,164 @@ +/* + * Static Memory Controller for AT32 chips + * + * Copyright (C) 2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#define DEBUG +#include +#include +#include +#include +#include + +#include +#include + +#include "hsmc.h" + +#define NR_CHIP_SELECTS 6 + +struct hsmc { + void __iomem *regs; + struct clk *pclk; + struct clk *mck; +}; + +static struct hsmc *hsmc; + +int smc_set_configuration(int cs, const struct smc_config *config) +{ + unsigned long mul; + unsigned long offset; + u32 setup, pulse, cycle, mode; + + if (!hsmc) + return -ENODEV; + if (cs >= NR_CHIP_SELECTS) + return -EINVAL; + + /* + * cycles = x / T = x * f + * = ((x * 1000000000) * ((f * 65536) / 1000000000)) / 65536 + * = ((x * 1000000000) * (((f / 10000) * 65536) / 100000)) / 65536 + */ + mul = (clk_get_rate(hsmc->mck) / 10000) << 16; + mul /= 100000; + +#define ns2cyc(x) ((((x) * mul) + 65535) >> 16) + + setup = (HSMC_BF(NWE_SETUP, ns2cyc(config->nwe_setup)) + | HSMC_BF(NCS_WR_SETUP, ns2cyc(config->ncs_write_setup)) + | HSMC_BF(NRD_SETUP, ns2cyc(config->nrd_setup)) + | HSMC_BF(NCS_RD_SETUP, ns2cyc(config->ncs_read_setup))); + pulse = (HSMC_BF(NWE_PULSE, ns2cyc(config->nwe_pulse)) + | HSMC_BF(NCS_WR_PULSE, ns2cyc(config->ncs_write_pulse)) + | HSMC_BF(NRD_PULSE, ns2cyc(config->nrd_pulse)) + | HSMC_BF(NCS_RD_PULSE, ns2cyc(config->ncs_read_pulse))); + cycle = (HSMC_BF(NWE_CYCLE, ns2cyc(config->write_cycle)) + | HSMC_BF(NRD_CYCLE, ns2cyc(config->read_cycle))); + + switch (config->bus_width) { + case 1: + mode = HSMC_BF(DBW, HSMC_DBW_8_BITS); + break; + case 2: + mode = HSMC_BF(DBW, HSMC_DBW_16_BITS); + break; + case 4: + mode = HSMC_BF(DBW, HSMC_DBW_32_BITS); + break; + default: + return -EINVAL; + } + + if (config->nrd_controlled) + mode |= HSMC_BIT(READ_MODE); + if (config->nwe_controlled) + mode |= HSMC_BIT(WRITE_MODE); + if (config->byte_write) + mode |= HSMC_BIT(BAT); + + pr_debug("smc cs%d: setup/%08x pulse/%08x cycle/%08x mode/%08x\n", + cs, setup, pulse, cycle, mode); + + offset = cs * 0x10; + hsmc_writel(hsmc, SETUP0 + offset, setup); + hsmc_writel(hsmc, PULSE0 + offset, pulse); + hsmc_writel(hsmc, CYCLE0 + offset, cycle); + hsmc_writel(hsmc, MODE0 + offset, mode); + hsmc_readl(hsmc, MODE0); /* I/O barrier */ + + return 0; +} +EXPORT_SYMBOL(smc_set_configuration); + +static int hsmc_probe(struct platform_device *pdev) +{ + struct resource *regs; + struct clk *pclk, *mck; + int ret; + + if (hsmc) + return -EBUSY; + + regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!regs) + return -ENXIO; + pclk = clk_get(&pdev->dev, "pclk"); + if (IS_ERR(pclk)) + return PTR_ERR(pclk); + mck = clk_get(&pdev->dev, "mck"); + if (IS_ERR(mck)) { + ret = PTR_ERR(mck); + goto out_put_pclk; + } + + ret = -ENOMEM; + hsmc = kzalloc(sizeof(struct hsmc), GFP_KERNEL); + if (!hsmc) + goto out_put_clocks; + + clk_enable(pclk); + clk_enable(mck); + + hsmc->pclk = pclk; + hsmc->mck = mck; + hsmc->regs = ioremap(regs->start, regs->end - regs->start + 1); + if (!hsmc->regs) + goto out_disable_clocks; + + dev_info(&pdev->dev, "Atmel Static Memory Controller at 0x%08lx\n", + (unsigned long)regs->start); + + platform_set_drvdata(pdev, hsmc); + + return 0; + +out_disable_clocks: + clk_disable(mck); + clk_disable(pclk); + kfree(hsmc); +out_put_clocks: + clk_put(mck); +out_put_pclk: + clk_put(pclk); + hsmc = NULL; + return ret; +} + +static struct platform_driver hsmc_driver = { + .probe = hsmc_probe, + .driver = { + .name = "smc", + }, +}; + +static int __init hsmc_init(void) +{ + return platform_driver_register(&hsmc_driver); +} +arch_initcall(hsmc_init); diff --git a/arch/avr32/mach-at32ap/hsmc.h b/arch/avr32/mach-at32ap/hsmc.h new file mode 100644 index 0000000..5681276 --- /dev/null +++ b/arch/avr32/mach-at32ap/hsmc.h @@ -0,0 +1,127 @@ +/* + * Register definitions for Atmel Static Memory Controller (SMC) + * + * Copyright (C) 2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __ASM_AVR32_HSMC_H__ +#define __ASM_AVR32_HSMC_H__ + +/* HSMC register offsets */ +#define HSMC_SETUP0 0x0000 +#define HSMC_PULSE0 0x0004 +#define HSMC_CYCLE0 0x0008 +#define HSMC_MODE0 0x000c +#define HSMC_SETUP1 0x0010 +#define HSMC_PULSE1 0x0014 +#define HSMC_CYCLE1 0x0018 +#define HSMC_MODE1 0x001c +#define HSMC_SETUP2 0x0020 +#define HSMC_PULSE2 0x0024 +#define HSMC_CYCLE2 0x0028 +#define HSMC_MODE2 0x002c +#define HSMC_SETUP3 0x0030 +#define HSMC_PULSE3 0x0034 +#define HSMC_CYCLE3 0x0038 +#define HSMC_MODE3 0x003c +#define HSMC_SETUP4 0x0040 +#define HSMC_PULSE4 0x0044 +#define HSMC_CYCLE4 0x0048 +#define HSMC_MODE4 0x004c +#define HSMC_SETUP5 0x0050 +#define HSMC_PULSE5 0x0054 +#define HSMC_CYCLE5 0x0058 +#define HSMC_MODE5 0x005c + +/* Bitfields in SETUP0 */ +#define HSMC_NWE_SETUP_OFFSET 0 +#define HSMC_NWE_SETUP_SIZE 6 +#define HSMC_NCS_WR_SETUP_OFFSET 8 +#define HSMC_NCS_WR_SETUP_SIZE 6 +#define HSMC_NRD_SETUP_OFFSET 16 +#define HSMC_NRD_SETUP_SIZE 6 +#define HSMC_NCS_RD_SETUP_OFFSET 24 +#define HSMC_NCS_RD_SETUP_SIZE 6 + +/* Bitfields in PULSE0 */ +#define HSMC_NWE_PULSE_OFFSET 0 +#define HSMC_NWE_PULSE_SIZE 7 +#define HSMC_NCS_WR_PULSE_OFFSET 8 +#define HSMC_NCS_WR_PULSE_SIZE 7 +#define HSMC_NRD_PULSE_OFFSET 16 +#define HSMC_NRD_PULSE_SIZE 7 +#define HSMC_NCS_RD_PULSE_OFFSET 24 +#define HSMC_NCS_RD_PULSE_SIZE 7 + +/* Bitfields in CYCLE0 */ +#define HSMC_NWE_CYCLE_OFFSET 0 +#define HSMC_NWE_CYCLE_SIZE 9 +#define HSMC_NRD_CYCLE_OFFSET 16 +#define HSMC_NRD_CYCLE_SIZE 9 + +/* Bitfields in MODE0 */ +#define HSMC_READ_MODE_OFFSET 0 +#define HSMC_READ_MODE_SIZE 1 +#define HSMC_WRITE_MODE_OFFSET 1 +#define HSMC_WRITE_MODE_SIZE 1 +#define HSMC_EXNW_MODE_OFFSET 4 +#define HSMC_EXNW_MODE_SIZE 2 +#define HSMC_BAT_OFFSET 8 +#define HSMC_BAT_SIZE 1 +#define HSMC_DBW_OFFSET 12 +#define HSMC_DBW_SIZE 2 +#define HSMC_TDF_CYCLES_OFFSET 16 +#define HSMC_TDF_CYCLES_SIZE 4 +#define HSMC_TDF_MODE_OFFSET 20 +#define HSMC_TDF_MODE_SIZE 1 +#define HSMC_PMEN_OFFSET 24 +#define HSMC_PMEN_SIZE 1 +#define HSMC_PS_OFFSET 28 +#define HSMC_PS_SIZE 2 + +/* Constants for READ_MODE */ +#define HSMC_READ_MODE_NCS_CONTROLLED 0 +#define HSMC_READ_MODE_NRD_CONTROLLED 1 + +/* Constants for WRITE_MODE */ +#define HSMC_WRITE_MODE_NCS_CONTROLLED 0 +#define HSMC_WRITE_MODE_NWE_CONTROLLED 1 + +/* Constants for EXNW_MODE */ +#define HSMC_EXNW_MODE_DISABLED 0 +#define HSMC_EXNW_MODE_RESERVED 1 +#define HSMC_EXNW_MODE_FROZEN 2 +#define HSMC_EXNW_MODE_READY 3 + +/* Constants for BAT */ +#define HSMC_BAT_BYTE_SELECT 0 +#define HSMC_BAT_BYTE_WRITE 1 + +/* Constants for DBW */ +#define HSMC_DBW_8_BITS 0 +#define HSMC_DBW_16_BITS 1 +#define HSMC_DBW_32_BITS 2 + +/* Bit manipulation macros */ +#define HSMC_BIT(name) \ + (1 << HSMC_##name##_OFFSET) +#define HSMC_BF(name,value) \ + (((value) & ((1 << HSMC_##name##_SIZE) - 1)) \ + << HSMC_##name##_OFFSET) +#define HSMC_BFEXT(name,value) \ + (((value) >> HSMC_##name##_OFFSET) \ + & ((1 << HSMC_##name##_SIZE) - 1)) +#define HSMC_BFINS(name,value,old) \ + (((old) & ~(((1 << HSMC_##name##_SIZE) - 1) \ + << HSMC_##name##_OFFSET)) | HSMC_BF(name,value)) + +/* Register access macros */ +#define hsmc_readl(port,reg) \ + readl((port)->regs + HSMC_##reg) +#define hsmc_writel(port,reg,value) \ + writel((value), (port)->regs + HSMC_##reg) + +#endif /* __ASM_AVR32_HSMC_H__ */ diff --git a/arch/avr32/mach-at32ap/intc.c b/arch/avr32/mach-at32ap/intc.c new file mode 100644 index 0000000..74f8c9f --- /dev/null +++ b/arch/avr32/mach-at32ap/intc.c @@ -0,0 +1,133 @@ +/* + * Copyright (C) 2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include "intc.h" + +struct intc { + void __iomem *regs; + struct irq_chip chip; +}; + +extern struct platform_device at32_intc0_device; + +/* + * TODO: We may be able to implement mask/unmask by setting IxM flags + * in the status register. + */ +static void intc_mask_irq(unsigned int irq) +{ + +} + +static void intc_unmask_irq(unsigned int irq) +{ + +} + +static struct intc intc0 = { + .chip = { + .name = "intc", + .mask = intc_mask_irq, + .unmask = intc_unmask_irq, + }, +}; + +/* + * All interrupts go via intc at some point. + */ +asmlinkage void do_IRQ(int level, struct pt_regs *regs) +{ + struct irq_desc *desc; + unsigned int irq; + unsigned long status_reg; + + local_irq_disable(); + + irq_enter(); + + irq = intc_readl(&intc0, INTCAUSE0 - 4 * level); + desc = irq_desc + irq; + desc->handle_irq(irq, desc, regs); + + /* + * Clear all interrupt level masks so that we may handle + * interrupts during softirq processing. If this is a nested + * interrupt, interrupts must stay globally disabled until we + * return. + */ + status_reg = sysreg_read(SR); + status_reg &= ~(SYSREG_BIT(I0M) | SYSREG_BIT(I1M) + | SYSREG_BIT(I2M) | SYSREG_BIT(I3M)); + sysreg_write(SR, status_reg); + + irq_exit(); +} + +void __init init_IRQ(void) +{ + extern void _evba(void); + extern void irq_level0(void); + struct resource *regs; + struct clk *pclk; + unsigned int i; + u32 offset, readback; + + regs = platform_get_resource(&at32_intc0_device, IORESOURCE_MEM, 0); + if (!regs) { + printk(KERN_EMERG "intc: no mmio resource defined\n"); + goto fail; + } + pclk = clk_get(&at32_intc0_device.dev, "pclk"); + if (IS_ERR(pclk)) { + printk(KERN_EMERG "intc: no clock defined\n"); + goto fail; + } + + clk_enable(pclk); + + intc0.regs = ioremap(regs->start, regs->end - regs->start + 1); + if (!intc0.regs) { + printk(KERN_EMERG "intc: failed to map registers (0x%08lx)\n", + (unsigned long)regs->start); + goto fail; + } + + /* + * Initialize all interrupts to level 0 (lowest priority). The + * priority level may be changed by calling + * irq_set_priority(). + * + */ + offset = (unsigned long)&irq_level0 - (unsigned long)&_evba; + for (i = 0; i < NR_INTERNAL_IRQS; i++) { + intc_writel(&intc0, INTPR0 + 4 * i, offset); + readback = intc_readl(&intc0, INTPR0 + 4 * i); + if (readback == offset) + set_irq_chip_and_handler(i, &intc0.chip, + handle_simple_irq); + } + + /* Unmask all interrupt levels */ + sysreg_write(SR, (sysreg_read(SR) + & ~(SR_I3M | SR_I2M | SR_I1M | SR_I0M))); + + return; + +fail: + panic("Interrupt controller initialization failed!\n"); +} + diff --git a/arch/avr32/mach-at32ap/intc.h b/arch/avr32/mach-at32ap/intc.h new file mode 100644 index 0000000..d289ca2 --- /dev/null +++ b/arch/avr32/mach-at32ap/intc.h @@ -0,0 +1,327 @@ +/* + * Automatically generated by gen-header.xsl + */ +#ifndef __ASM_AVR32_PERIHP_INTC_H__ +#define __ASM_AVR32_PERIHP_INTC_H__ + +#define INTC_NUM_INT_GRPS 33 + +#define INTC_INTPR0 0x0 +# define INTC_INTPR0_INTLEV_OFFSET 30 +# define INTC_INTPR0_INTLEV_SIZE 2 +# define INTC_INTPR0_OFFSET_OFFSET 0 +# define INTC_INTPR0_OFFSET_SIZE 24 +#define INTC_INTREQ0 0x100 +# define INTC_INTREQ0_IREQUEST0_OFFSET 0 +# define INTC_INTREQ0_IREQUEST0_SIZE 1 +# define INTC_INTREQ0_IREQUEST1_OFFSET 1 +# define INTC_INTREQ0_IREQUEST1_SIZE 1 +#define INTC_INTPR1 0x4 +# define INTC_INTPR1_INTLEV_OFFSET 30 +# define INTC_INTPR1_INTLEV_SIZE 2 +# define INTC_INTPR1_OFFSET_OFFSET 0 +# define INTC_INTPR1_OFFSET_SIZE 24 +#define INTC_INTREQ1 0x104 +# define INTC_INTREQ1_IREQUEST32_OFFSET 0 +# define INTC_INTREQ1_IREQUEST32_SIZE 1 +# define INTC_INTREQ1_IREQUEST33_OFFSET 1 +# define INTC_INTREQ1_IREQUEST33_SIZE 1 +# define INTC_INTREQ1_IREQUEST34_OFFSET 2 +# define INTC_INTREQ1_IREQUEST34_SIZE 1 +# define INTC_INTREQ1_IREQUEST35_OFFSET 3 +# define INTC_INTREQ1_IREQUEST35_SIZE 1 +# define INTC_INTREQ1_IREQUEST36_OFFSET 4 +# define INTC_INTREQ1_IREQUEST36_SIZE 1 +# define INTC_INTREQ1_IREQUEST37_OFFSET 5 +# define INTC_INTREQ1_IREQUEST37_SIZE 1 +#define INTC_INTPR2 0x8 +# define INTC_INTPR2_INTLEV_OFFSET 30 +# define INTC_INTPR2_INTLEV_SIZE 2 +# define INTC_INTPR2_OFFSET_OFFSET 0 +# define INTC_INTPR2_OFFSET_SIZE 24 +#define INTC_INTREQ2 0x108 +# define INTC_INTREQ2_IREQUEST64_OFFSET 0 +# define INTC_INTREQ2_IREQUEST64_SIZE 1 +# define INTC_INTREQ2_IREQUEST65_OFFSET 1 +# define INTC_INTREQ2_IREQUEST65_SIZE 1 +# define INTC_INTREQ2_IREQUEST66_OFFSET 2 +# define INTC_INTREQ2_IREQUEST66_SIZE 1 +# define INTC_INTREQ2_IREQUEST67_OFFSET 3 +# define INTC_INTREQ2_IREQUEST67_SIZE 1 +# define INTC_INTREQ2_IREQUEST68_OFFSET 4 +# define INTC_INTREQ2_IREQUEST68_SIZE 1 +#define INTC_INTPR3 0xc +# define INTC_INTPR3_INTLEV_OFFSET 30 +# define INTC_INTPR3_INTLEV_SIZE 2 +# define INTC_INTPR3_OFFSET_OFFSET 0 +# define INTC_INTPR3_OFFSET_SIZE 24 +#define INTC_INTREQ3 0x10c +# define INTC_INTREQ3_IREQUEST96_OFFSET 0 +# define INTC_INTREQ3_IREQUEST96_SIZE 1 +#define INTC_INTPR4 0x10 +# define INTC_INTPR4_INTLEV_OFFSET 30 +# define INTC_INTPR4_INTLEV_SIZE 2 +# define INTC_INTPR4_OFFSET_OFFSET 0 +# define INTC_INTPR4_OFFSET_SIZE 24 +#define INTC_INTREQ4 0x110 +# define INTC_INTREQ4_IREQUEST128_OFFSET 0 +# define INTC_INTREQ4_IREQUEST128_SIZE 1 +#define INTC_INTPR5 0x14 +# define INTC_INTPR5_INTLEV_OFFSET 30 +# define INTC_INTPR5_INTLEV_SIZE 2 +# define INTC_INTPR5_OFFSET_OFFSET 0 +# define INTC_INTPR5_OFFSET_SIZE 24 +#define INTC_INTREQ5 0x114 +# define INTC_INTREQ5_IREQUEST160_OFFSET 0 +# define INTC_INTREQ5_IREQUEST160_SIZE 1 +#define INTC_INTPR6 0x18 +# define INTC_INTPR6_INTLEV_OFFSET 30 +# define INTC_INTPR6_INTLEV_SIZE 2 +# define INTC_INTPR6_OFFSET_OFFSET 0 +# define INTC_INTPR6_OFFSET_SIZE 24 +#define INTC_INTREQ6 0x118 +# define INTC_INTREQ6_IREQUEST192_OFFSET 0 +# define INTC_INTREQ6_IREQUEST192_SIZE 1 +#define INTC_INTPR7 0x1c +# define INTC_INTPR7_INTLEV_OFFSET 30 +# define INTC_INTPR7_INTLEV_SIZE 2 +# define INTC_INTPR7_OFFSET_OFFSET 0 +# define INTC_INTPR7_OFFSET_SIZE 24 +#define INTC_INTREQ7 0x11c +# define INTC_INTREQ7_IREQUEST224_OFFSET 0 +# define INTC_INTREQ7_IREQUEST224_SIZE 1 +#define INTC_INTPR8 0x20 +# define INTC_INTPR8_INTLEV_OFFSET 30 +# define INTC_INTPR8_INTLEV_SIZE 2 +# define INTC_INTPR8_OFFSET_OFFSET 0 +# define INTC_INTPR8_OFFSET_SIZE 24 +#define INTC_INTREQ8 0x120 +# define INTC_INTREQ8_IREQUEST256_OFFSET 0 +# define INTC_INTREQ8_IREQUEST256_SIZE 1 +#define INTC_INTPR9 0x24 +# define INTC_INTPR9_INTLEV_OFFSET 30 +# define INTC_INTPR9_INTLEV_SIZE 2 +# define INTC_INTPR9_OFFSET_OFFSET 0 +# define INTC_INTPR9_OFFSET_SIZE 24 +#define INTC_INTREQ9 0x124 +# define INTC_INTREQ9_IREQUEST288_OFFSET 0 +# define INTC_INTREQ9_IREQUEST288_SIZE 1 +#define INTC_INTPR10 0x28 +# define INTC_INTPR10_INTLEV_OFFSET 30 +# define INTC_INTPR10_INTLEV_SIZE 2 +# define INTC_INTPR10_OFFSET_OFFSET 0 +# define INTC_INTPR10_OFFSET_SIZE 24 +#define INTC_INTREQ10 0x128 +# define INTC_INTREQ10_IREQUEST320_OFFSET 0 +# define INTC_INTREQ10_IREQUEST320_SIZE 1 +#define INTC_INTPR11 0x2c +# define INTC_INTPR11_INTLEV_OFFSET 30 +# define INTC_INTPR11_INTLEV_SIZE 2 +# define INTC_INTPR11_OFFSET_OFFSET 0 +# define INTC_INTPR11_OFFSET_SIZE 24 +#define INTC_INTREQ11 0x12c +# define INTC_INTREQ11_IREQUEST352_OFFSET 0 +# define INTC_INTREQ11_IREQUEST352_SIZE 1 +#define INTC_INTPR12 0x30 +# define INTC_INTPR12_INTLEV_OFFSET 30 +# define INTC_INTPR12_INTLEV_SIZE 2 +# define INTC_INTPR12_OFFSET_OFFSET 0 +# define INTC_INTPR12_OFFSET_SIZE 24 +#define INTC_INTREQ12 0x130 +# define INTC_INTREQ12_IREQUEST384_OFFSET 0 +# define INTC_INTREQ12_IREQUEST384_SIZE 1 +#define INTC_INTPR13 0x34 +# define INTC_INTPR13_INTLEV_OFFSET 30 +# define INTC_INTPR13_INTLEV_SIZE 2 +# define INTC_INTPR13_OFFSET_OFFSET 0 +# define INTC_INTPR13_OFFSET_SIZE 24 +#define INTC_INTREQ13 0x134 +# define INTC_INTREQ13_IREQUEST416_OFFSET 0 +# define INTC_INTREQ13_IREQUEST416_SIZE 1 +#define INTC_INTPR14 0x38 +# define INTC_INTPR14_INTLEV_OFFSET 30 +# define INTC_INTPR14_INTLEV_SIZE 2 +# define INTC_INTPR14_OFFSET_OFFSET 0 +# define INTC_INTPR14_OFFSET_SIZE 24 +#define INTC_INTREQ14 0x138 +# define INTC_INTREQ14_IREQUEST448_OFFSET 0 +# define INTC_INTREQ14_IREQUEST448_SIZE 1 +#define INTC_INTPR15 0x3c +# define INTC_INTPR15_INTLEV_OFFSET 30 +# define INTC_INTPR15_INTLEV_SIZE 2 +# define INTC_INTPR15_OFFSET_OFFSET 0 +# define INTC_INTPR15_OFFSET_SIZE 24 +#define INTC_INTREQ15 0x13c +# define INTC_INTREQ15_IREQUEST480_OFFSET 0 +# define INTC_INTREQ15_IREQUEST480_SIZE 1 +#define INTC_INTPR16 0x40 +# define INTC_INTPR16_INTLEV_OFFSET 30 +# define INTC_INTPR16_INTLEV_SIZE 2 +# define INTC_INTPR16_OFFSET_OFFSET 0 +# define INTC_INTPR16_OFFSET_SIZE 24 +#define INTC_INTREQ16 0x140 +# define INTC_INTREQ16_IREQUEST512_OFFSET 0 +# define INTC_INTREQ16_IREQUEST512_SIZE 1 +#define INTC_INTPR17 0x44 +# define INTC_INTPR17_INTLEV_OFFSET 30 +# define INTC_INTPR17_INTLEV_SIZE 2 +# define INTC_INTPR17_OFFSET_OFFSET 0 +# define INTC_INTPR17_OFFSET_SIZE 24 +#define INTC_INTREQ17 0x144 +# define INTC_INTREQ17_IREQUEST544_OFFSET 0 +# define INTC_INTREQ17_IREQUEST544_SIZE 1 +#define INTC_INTPR18 0x48 +# define INTC_INTPR18_INTLEV_OFFSET 30 +# define INTC_INTPR18_INTLEV_SIZE 2 +# define INTC_INTPR18_OFFSET_OFFSET 0 +# define INTC_INTPR18_OFFSET_SIZE 24 +#define INTC_INTREQ18 0x148 +# define INTC_INTREQ18_IREQUEST576_OFFSET 0 +# define INTC_INTREQ18_IREQUEST576_SIZE 1 +#define INTC_INTPR19 0x4c +# define INTC_INTPR19_INTLEV_OFFSET 30 +# define INTC_INTPR19_INTLEV_SIZE 2 +# define INTC_INTPR19_OFFSET_OFFSET 0 +# define INTC_INTPR19_OFFSET_SIZE 24 +#define INTC_INTREQ19 0x14c +# define INTC_INTREQ19_IREQUEST608_OFFSET 0 +# define INTC_INTREQ19_IREQUEST608_SIZE 1 +# define INTC_INTREQ19_IREQUEST609_OFFSET 1 +# define INTC_INTREQ19_IREQUEST609_SIZE 1 +# define INTC_INTREQ19_IREQUEST610_OFFSET 2 +# define INTC_INTREQ19_IREQUEST610_SIZE 1 +# define INTC_INTREQ19_IREQUEST611_OFFSET 3 +# define INTC_INTREQ19_IREQUEST611_SIZE 1 +#define INTC_INTPR20 0x50 +# define INTC_INTPR20_INTLEV_OFFSET 30 +# define INTC_INTPR20_INTLEV_SIZE 2 +# define INTC_INTPR20_OFFSET_OFFSET 0 +# define INTC_INTPR20_OFFSET_SIZE 24 +#define INTC_INTREQ20 0x150 +# define INTC_INTREQ20_IREQUEST640_OFFSET 0 +# define INTC_INTREQ20_IREQUEST640_SIZE 1 +#define INTC_INTPR21 0x54 +# define INTC_INTPR21_INTLEV_OFFSET 30 +# define INTC_INTPR21_INTLEV_SIZE 2 +# define INTC_INTPR21_OFFSET_OFFSET 0 +# define INTC_INTPR21_OFFSET_SIZE 24 +#define INTC_INTREQ21 0x154 +# define INTC_INTREQ21_IREQUEST672_OFFSET 0 +# define INTC_INTREQ21_IREQUEST672_SIZE 1 +#define INTC_INTPR22 0x58 +# define INTC_INTPR22_INTLEV_OFFSET 30 +# define INTC_INTPR22_INTLEV_SIZE 2 +# define INTC_INTPR22_OFFSET_OFFSET 0 +# define INTC_INTPR22_OFFSET_SIZE 24 +#define INTC_INTREQ22 0x158 +# define INTC_INTREQ22_IREQUEST704_OFFSET 0 +# define INTC_INTREQ22_IREQUEST704_SIZE 1 +# define INTC_INTREQ22_IREQUEST705_OFFSET 1 +# define INTC_INTREQ22_IREQUEST705_SIZE 1 +# define INTC_INTREQ22_IREQUEST706_OFFSET 2 +# define INTC_INTREQ22_IREQUEST706_SIZE 1 +#define INTC_INTPR23 0x5c +# define INTC_INTPR23_INTLEV_OFFSET 30 +# define INTC_INTPR23_INTLEV_SIZE 2 +# define INTC_INTPR23_OFFSET_OFFSET 0 +# define INTC_INTPR23_OFFSET_SIZE 24 +#define INTC_INTREQ23 0x15c +# define INTC_INTREQ23_IREQUEST736_OFFSET 0 +# define INTC_INTREQ23_IREQUEST736_SIZE 1 +# define INTC_INTREQ23_IREQUEST737_OFFSET 1 +# define INTC_INTREQ23_IREQUEST737_SIZE 1 +# define INTC_INTREQ23_IREQUEST738_OFFSET 2 +# define INTC_INTREQ23_IREQUEST738_SIZE 1 +#define INTC_INTPR24 0x60 +# define INTC_INTPR24_INTLEV_OFFSET 30 +# define INTC_INTPR24_INTLEV_SIZE 2 +# define INTC_INTPR24_OFFSET_OFFSET 0 +# define INTC_INTPR24_OFFSET_SIZE 24 +#define INTC_INTREQ24 0x160 +# define INTC_INTREQ24_IREQUEST768_OFFSET 0 +# define INTC_INTREQ24_IREQUEST768_SIZE 1 +#define INTC_INTPR25 0x64 +# define INTC_INTPR25_INTLEV_OFFSET 30 +# define INTC_INTPR25_INTLEV_SIZE 2 +# define INTC_INTPR25_OFFSET_OFFSET 0 +# define INTC_INTPR25_OFFSET_SIZE 24 +#define INTC_INTREQ25 0x164 +# define INTC_INTREQ25_IREQUEST800_OFFSET 0 +# define INTC_INTREQ25_IREQUEST800_SIZE 1 +#define INTC_INTPR26 0x68 +# define INTC_INTPR26_INTLEV_OFFSET 30 +# define INTC_INTPR26_INTLEV_SIZE 2 +# define INTC_INTPR26_OFFSET_OFFSET 0 +# define INTC_INTPR26_OFFSET_SIZE 24 +#define INTC_INTREQ26 0x168 +# define INTC_INTREQ26_IREQUEST832_OFFSET 0 +# define INTC_INTREQ26_IREQUEST832_SIZE 1 +#define INTC_INTPR27 0x6c +# define INTC_INTPR27_INTLEV_OFFSET 30 +# define INTC_INTPR27_INTLEV_SIZE 2 +# define INTC_INTPR27_OFFSET_OFFSET 0 +# define INTC_INTPR27_OFFSET_SIZE 24 +#define INTC_INTREQ27 0x16c +# define INTC_INTREQ27_IREQUEST864_OFFSET 0 +# define INTC_INTREQ27_IREQUEST864_SIZE 1 +#define INTC_INTPR28 0x70 +# define INTC_INTPR28_INTLEV_OFFSET 30 +# define INTC_INTPR28_INTLEV_SIZE 2 +# define INTC_INTPR28_OFFSET_OFFSET 0 +# define INTC_INTPR28_OFFSET_SIZE 24 +#define INTC_INTREQ28 0x170 +# define INTC_INTREQ28_IREQUEST896_OFFSET 0 +# define INTC_INTREQ28_IREQUEST896_SIZE 1 +#define INTC_INTPR29 0x74 +# define INTC_INTPR29_INTLEV_OFFSET 30 +# define INTC_INTPR29_INTLEV_SIZE 2 +# define INTC_INTPR29_OFFSET_OFFSET 0 +# define INTC_INTPR29_OFFSET_SIZE 24 +#define INTC_INTREQ29 0x174 +# define INTC_INTREQ29_IREQUEST928_OFFSET 0 +# define INTC_INTREQ29_IREQUEST928_SIZE 1 +#define INTC_INTPR30 0x78 +# define INTC_INTPR30_INTLEV_OFFSET 30 +# define INTC_INTPR30_INTLEV_SIZE 2 +# define INTC_INTPR30_OFFSET_OFFSET 0 +# define INTC_INTPR30_OFFSET_SIZE 24 +#define INTC_INTREQ30 0x178 +# define INTC_INTREQ30_IREQUEST960_OFFSET 0 +# define INTC_INTREQ30_IREQUEST960_SIZE 1 +#define INTC_INTPR31 0x7c +# define INTC_INTPR31_INTLEV_OFFSET 30 +# define INTC_INTPR31_INTLEV_SIZE 2 +# define INTC_INTPR31_OFFSET_OFFSET 0 +# define INTC_INTPR31_OFFSET_SIZE 24 +#define INTC_INTREQ31 0x17c +# define INTC_INTREQ31_IREQUEST992_OFFSET 0 +# define INTC_INTREQ31_IREQUEST992_SIZE 1 +#define INTC_INTPR32 0x80 +# define INTC_INTPR32_INTLEV_OFFSET 30 +# define INTC_INTPR32_INTLEV_SIZE 2 +# define INTC_INTPR32_OFFSET_OFFSET 0 +# define INTC_INTPR32_OFFSET_SIZE 24 +#define INTC_INTREQ32 0x180 +# define INTC_INTREQ32_IREQUEST1024_OFFSET 0 +# define INTC_INTREQ32_IREQUEST1024_SIZE 1 +#define INTC_INTCAUSE0 0x20c +# define INTC_INTCAUSE0_CAUSEGRP_OFFSET 0 +# define INTC_INTCAUSE0_CAUSEGRP_SIZE 6 +#define INTC_INTCAUSE1 0x208 +# define INTC_INTCAUSE1_CAUSEGRP_OFFSET 0 +# define INTC_INTCAUSE1_CAUSEGRP_SIZE 6 +#define INTC_INTCAUSE2 0x204 +# define INTC_INTCAUSE2_CAUSEGRP_OFFSET 0 +# define INTC_INTCAUSE2_CAUSEGRP_SIZE 6 +#define INTC_INTCAUSE3 0x200 +# define INTC_INTCAUSE3_CAUSEGRP_OFFSET 0 +# define INTC_INTCAUSE3_CAUSEGRP_SIZE 6 + +#define INTC_BIT(name) (1 << INTC_##name##_OFFSET) +#define INTC_MKBF(name, value) (((value) & ((1 << INTC_##name##_SIZE) - 1)) << INTC_##name##_OFFSET) +#define INTC_GETBF(name, value) (((value) >> INTC_##name##_OFFSET) & ((1 << INTC_##name##_SIZE) - 1)) + +#define intc_readl(port,reg) readl((port)->regs + INTC_##reg) +#define intc_writel(port,reg,value) writel((value), (port)->regs + INTC_##reg) + +#endif /* __ASM_AVR32_PERIHP_INTC_H__ */ diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c new file mode 100644 index 0000000..d3aabfc --- /dev/null +++ b/arch/avr32/mach-at32ap/pio.c @@ -0,0 +1,118 @@ +/* + * Atmel PIO2 Port Multiplexer support + * + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include + +#include + +#include + +#include "pio.h" + +#define MAX_NR_PIO_DEVICES 8 + +struct pio_device { + void __iomem *regs; + const struct platform_device *pdev; + struct clk *clk; + u32 alloc_mask; + char name[32]; +}; + +static struct pio_device pio_dev[MAX_NR_PIO_DEVICES]; + +void portmux_set_func(unsigned int portmux_id, unsigned int pin_id, + unsigned int function_id) +{ + struct pio_device *pio; + u32 mask = 1 << pin_id; + + BUG_ON(portmux_id >= MAX_NR_PIO_DEVICES); + + pio = &pio_dev[portmux_id]; + + if (function_id) + pio_writel(pio, BSR, mask); + else + pio_writel(pio, ASR, mask); + pio_writel(pio, PDR, mask); +} + +static int __init pio_probe(struct platform_device *pdev) +{ + struct pio_device *pio = NULL; + + BUG_ON(pdev->id >= MAX_NR_PIO_DEVICES); + pio = &pio_dev[pdev->id]; + BUG_ON(!pio->regs); + + /* TODO: Interrupts */ + + platform_set_drvdata(pdev, pio); + + printk(KERN_INFO "%s: Atmel Port Multiplexer at 0x%p (irq %d)\n", + pio->name, pio->regs, platform_get_irq(pdev, 0)); + + return 0; +} + +static struct platform_driver pio_driver = { + .probe = pio_probe, + .driver = { + .name = "pio", + }, +}; + +static int __init pio_init(void) +{ + return platform_driver_register(&pio_driver); +} +subsys_initcall(pio_init); + +void __init at32_init_pio(struct platform_device *pdev) +{ + struct resource *regs; + struct pio_device *pio; + + if (pdev->id > MAX_NR_PIO_DEVICES) { + dev_err(&pdev->dev, "only %d PIO devices supported\n", + MAX_NR_PIO_DEVICES); + return; + } + + pio = &pio_dev[pdev->id]; + snprintf(pio->name, sizeof(pio->name), "pio%d", pdev->id); + + regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!regs) { + dev_err(&pdev->dev, "no mmio resource defined\n"); + return; + } + + pio->clk = clk_get(&pdev->dev, "mck"); + if (IS_ERR(pio->clk)) + /* + * This is a fatal error, but if we continue we might + * be so lucky that we manage to initialize the + * console and display this message... + */ + dev_err(&pdev->dev, "no mck clock defined\n"); + else + clk_enable(pio->clk); + + pio->pdev = pdev; + pio->regs = ioremap(regs->start, regs->end - regs->start + 1); + + pio_writel(pio, ODR, ~0UL); + pio_writel(pio, PER, ~0UL); +} diff --git a/arch/avr32/mach-at32ap/pio.h b/arch/avr32/mach-at32ap/pio.h new file mode 100644 index 0000000..cfea123 --- /dev/null +++ b/arch/avr32/mach-at32ap/pio.h @@ -0,0 +1,178 @@ +/* + * Atmel PIO2 Port Multiplexer support + * + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __ARCH_AVR32_AT32AP_PIO_H__ +#define __ARCH_AVR32_AT32AP_PIO_H__ + +/* PIO register offsets */ +#define PIO_PER 0x0000 +#define PIO_PDR 0x0004 +#define PIO_PSR 0x0008 +#define PIO_OER 0x0010 +#define PIO_ODR 0x0014 +#define PIO_OSR 0x0018 +#define PIO_IFER 0x0020 +#define PIO_IFDR 0x0024 +#define PIO_ISFR 0x0028 +#define PIO_SODR 0x0030 +#define PIO_CODR 0x0034 +#define PIO_ODSR 0x0038 +#define PIO_PDSR 0x003c +#define PIO_IER 0x0040 +#define PIO_IDR 0x0044 +#define PIO_IMR 0x0048 +#define PIO_ISR 0x004c +#define PIO_MDER 0x0050 +#define PIO_MDDR 0x0054 +#define PIO_MDSR 0x0058 +#define PIO_PUDR 0x0060 +#define PIO_PUER 0x0064 +#define PIO_PUSR 0x0068 +#define PIO_ASR 0x0070 +#define PIO_BSR 0x0074 +#define PIO_ABSR 0x0078 +#define PIO_OWER 0x00a0 +#define PIO_OWDR 0x00a4 +#define PIO_OWSR 0x00a8 + +/* Bitfields in PER */ + +/* Bitfields in PDR */ + +/* Bitfields in PSR */ + +/* Bitfields in OER */ + +/* Bitfields in ODR */ + +/* Bitfields in OSR */ + +/* Bitfields in IFER */ + +/* Bitfields in IFDR */ + +/* Bitfields in ISFR */ + +/* Bitfields in SODR */ + +/* Bitfields in CODR */ + +/* Bitfields in ODSR */ + +/* Bitfields in PDSR */ + +/* Bitfields in IER */ + +/* Bitfields in IDR */ + +/* Bitfields in IMR */ + +/* Bitfields in ISR */ + +/* Bitfields in MDER */ + +/* Bitfields in MDDR */ + +/* Bitfields in MDSR */ + +/* Bitfields in PUDR */ + +/* Bitfields in PUER */ + +/* Bitfields in PUSR */ + +/* Bitfields in ASR */ + +/* Bitfields in BSR */ + +/* Bitfields in ABSR */ +#define PIO_P0_OFFSET 0 +#define PIO_P0_SIZE 1 +#define PIO_P1_OFFSET 1 +#define PIO_P1_SIZE 1 +#define PIO_P2_OFFSET 2 +#define PIO_P2_SIZE 1 +#define PIO_P3_OFFSET 3 +#define PIO_P3_SIZE 1 +#define PIO_P4_OFFSET 4 +#define PIO_P4_SIZE 1 +#define PIO_P5_OFFSET 5 +#define PIO_P5_SIZE 1 +#define PIO_P6_OFFSET 6 +#define PIO_P6_SIZE 1 +#define PIO_P7_OFFSET 7 +#define PIO_P7_SIZE 1 +#define PIO_P8_OFFSET 8 +#define PIO_P8_SIZE 1 +#define PIO_P9_OFFSET 9 +#define PIO_P9_SIZE 1 +#define PIO_P10_OFFSET 10 +#define PIO_P10_SIZE 1 +#define PIO_P11_OFFSET 11 +#define PIO_P11_SIZE 1 +#define PIO_P12_OFFSET 12 +#define PIO_P12_SIZE 1 +#define PIO_P13_OFFSET 13 +#define PIO_P13_SIZE 1 +#define PIO_P14_OFFSET 14 +#define PIO_P14_SIZE 1 +#define PIO_P15_OFFSET 15 +#define PIO_P15_SIZE 1 +#define PIO_P16_OFFSET 16 +#define PIO_P16_SIZE 1 +#define PIO_P17_OFFSET 17 +#define PIO_P17_SIZE 1 +#define PIO_P18_OFFSET 18 +#define PIO_P18_SIZE 1 +#define PIO_P19_OFFSET 19 +#define PIO_P19_SIZE 1 +#define PIO_P20_OFFSET 20 +#define PIO_P20_SIZE 1 +#define PIO_P21_OFFSET 21 +#define PIO_P21_SIZE 1 +#define PIO_P22_OFFSET 22 +#define PIO_P22_SIZE 1 +#define PIO_P23_OFFSET 23 +#define PIO_P23_SIZE 1 +#define PIO_P24_OFFSET 24 +#define PIO_P24_SIZE 1 +#define PIO_P25_OFFSET 25 +#define PIO_P25_SIZE 1 +#define PIO_P26_OFFSET 26 +#define PIO_P26_SIZE 1 +#define PIO_P27_OFFSET 27 +#define PIO_P27_SIZE 1 +#define PIO_P28_OFFSET 28 +#define PIO_P28_SIZE 1 +#define PIO_P29_OFFSET 29 +#define PIO_P29_SIZE 1 +#define PIO_P30_OFFSET 30 +#define PIO_P30_SIZE 1 +#define PIO_P31_OFFSET 31 +#define PIO_P31_SIZE 1 + +/* Bitfields in OWER */ + +/* Bitfields in OWDR */ + +/* Bitfields in OWSR */ + +/* Bit manipulation macros */ +#define PIO_BIT(name) (1 << PIO_##name##_OFFSET) +#define PIO_BF(name,value) (((value) & ((1 << PIO_##name##_SIZE) - 1)) << PIO_##name##_OFFSET) +#define PIO_BFEXT(name,value) (((value) >> PIO_##name##_OFFSET) & ((1 << PIO_##name##_SIZE) - 1)) +#define PIO_BFINS(name,value,old) (((old) & ~(((1 << PIO_##name##_SIZE) - 1) << PIO_##name##_OFFSET)) | PIO_BF(name,value)) + +/* Register access macros */ +#define pio_readl(port,reg) readl((port)->regs + PIO_##reg) +#define pio_writel(port,reg,value) writel((value), (port)->regs + PIO_##reg) + +void at32_init_pio(struct platform_device *pdev); + +#endif /* __ARCH_AVR32_AT32AP_PIO_H__ */ diff --git a/arch/avr32/mach-at32ap/sm.c b/arch/avr32/mach-at32ap/sm.c new file mode 100644 index 0000000..03306eb --- /dev/null +++ b/arch/avr32/mach-at32ap/sm.c @@ -0,0 +1,289 @@ +/* + * System Manager driver for AT32AP CPUs + * + * Copyright (C) 2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "sm.h" + +#define SM_EIM_IRQ_RESOURCE 1 +#define SM_PM_IRQ_RESOURCE 2 +#define SM_RTC_IRQ_RESOURCE 3 + +#define to_eim(irqc) container_of(irqc, struct at32_sm, irqc) + +struct at32_sm system_manager; + +int __init at32_sm_init(void) +{ + struct resource *regs; + struct at32_sm *sm = &system_manager; + int ret = -ENXIO; + + regs = platform_get_resource(&at32_sm_device, IORESOURCE_MEM, 0); + if (!regs) + goto fail; + + spin_lock_init(&sm->lock); + sm->pdev = &at32_sm_device; + + ret = -ENOMEM; + sm->regs = ioremap(regs->start, regs->end - regs->start + 1); + if (!sm->regs) + goto fail; + + return 0; + +fail: + printk(KERN_ERR "Failed to initialize System Manager: %d\n", ret); + return ret; +} + +/* + * External Interrupt Module (EIM). + * + * EIM gets level- or edge-triggered interrupts of either polarity + * from the outside and converts it to active-high level-triggered + * interrupts that the internal interrupt controller can handle. EIM + * also provides masking/unmasking of interrupts, as well as + * acknowledging of edge-triggered interrupts. + */ + +static irqreturn_t spurious_eim_interrupt(int irq, void *dev_id, + struct pt_regs *regs) +{ + printk(KERN_WARNING "Spurious EIM interrupt %d\n", irq); + disable_irq(irq); + return IRQ_NONE; +} + +static struct irqaction eim_spurious_action = { + .handler = spurious_eim_interrupt, +}; + +static irqreturn_t eim_handle_irq(int irq, void *dev_id, struct pt_regs *regs) +{ + struct irq_controller * irqc = dev_id; + struct at32_sm *sm = to_eim(irqc); + unsigned long pending; + + /* + * No need to disable interrupts globally. The interrupt + * level relevant to this group must be masked all the time, + * so we know that this particular EIM instance will not be + * re-entered. + */ + spin_lock(&sm->lock); + + pending = intc_get_pending(sm->irqc.irq_group); + if (unlikely(!pending)) { + printk(KERN_ERR "EIM (group %u): No interrupts pending!\n", + sm->irqc.irq_group); + goto unlock; + } + + do { + struct irqaction *action; + unsigned int i; + + i = fls(pending) - 1; + pending &= ~(1 << i); + action = sm->action[i]; + + /* Acknowledge the interrupt */ + sm_writel(sm, EIM_ICR, 1 << i); + + spin_unlock(&sm->lock); + + if (action->flags & SA_INTERRUPT) + local_irq_disable(); + action->handler(sm->irqc.first_irq + i, action->dev_id, regs); + local_irq_enable(); + spin_lock(&sm->lock); + if (action->flags & SA_SAMPLE_RANDOM) + add_interrupt_randomness(sm->irqc.first_irq + i); + } while (pending); + +unlock: + spin_unlock(&sm->lock); + return IRQ_HANDLED; +} + +static void eim_mask(struct irq_controller *irqc, unsigned int irq) +{ + struct at32_sm *sm = to_eim(irqc); + unsigned int i; + + i = irq - sm->irqc.first_irq; + sm_writel(sm, EIM_IDR, 1 << i); +} + +static void eim_unmask(struct irq_controller *irqc, unsigned int irq) +{ + struct at32_sm *sm = to_eim(irqc); + unsigned int i; + + i = irq - sm->irqc.first_irq; + sm_writel(sm, EIM_IER, 1 << i); +} + +static int eim_setup(struct irq_controller *irqc, unsigned int irq, + struct irqaction *action) +{ + struct at32_sm *sm = to_eim(irqc); + sm->action[irq - sm->irqc.first_irq] = action; + /* Acknowledge earlier interrupts */ + sm_writel(sm, EIM_ICR, (1<<(irq - sm->irqc.first_irq))); + eim_unmask(irqc, irq); + return 0; +} + +static void eim_free(struct irq_controller *irqc, unsigned int irq, + void *dev) +{ + struct at32_sm *sm = to_eim(irqc); + eim_mask(irqc, irq); + sm->action[irq - sm->irqc.first_irq] = &eim_spurious_action; +} + +static int eim_set_type(struct irq_controller *irqc, unsigned int irq, + unsigned int type) +{ + struct at32_sm *sm = to_eim(irqc); + unsigned long flags; + u32 value, pattern; + + spin_lock_irqsave(&sm->lock, flags); + + pattern = 1 << (irq - sm->irqc.first_irq); + + value = sm_readl(sm, EIM_MODE); + if (type & IRQ_TYPE_LEVEL) + value |= pattern; + else + value &= ~pattern; + sm_writel(sm, EIM_MODE, value); + value = sm_readl(sm, EIM_EDGE); + if (type & IRQ_EDGE_RISING) + value |= pattern; + else + value &= ~pattern; + sm_writel(sm, EIM_EDGE, value); + value = sm_readl(sm, EIM_LEVEL); + if (type & IRQ_LEVEL_HIGH) + value |= pattern; + else + value &= ~pattern; + sm_writel(sm, EIM_LEVEL, value); + + spin_unlock_irqrestore(&sm->lock, flags); + + return 0; +} + +static unsigned int eim_get_type(struct irq_controller *irqc, + unsigned int irq) +{ + struct at32_sm *sm = to_eim(irqc); + unsigned long flags; + unsigned int type = 0; + u32 mode, edge, level, pattern; + + pattern = 1 << (irq - sm->irqc.first_irq); + + spin_lock_irqsave(&sm->lock, flags); + mode = sm_readl(sm, EIM_MODE); + edge = sm_readl(sm, EIM_EDGE); + level = sm_readl(sm, EIM_LEVEL); + spin_unlock_irqrestore(&sm->lock, flags); + + if (mode & pattern) + type |= IRQ_TYPE_LEVEL; + if (edge & pattern) + type |= IRQ_EDGE_RISING; + if (level & pattern) + type |= IRQ_LEVEL_HIGH; + + return type; +} + +static struct irq_controller_class eim_irq_class = { + .typename = "EIM", + .handle = eim_handle_irq, + .setup = eim_setup, + .free = eim_free, + .mask = eim_mask, + .unmask = eim_unmask, + .set_type = eim_set_type, + .get_type = eim_get_type, +}; + +static int __init eim_init(void) +{ + struct at32_sm *sm = &system_manager; + unsigned int i; + u32 pattern; + int ret; + + /* + * The EIM is really the same module as SM, so register + * mapping, etc. has been taken care of already. + */ + + /* + * Find out how many interrupt lines that are actually + * implemented in hardware. + */ + sm_writel(sm, EIM_IDR, ~0UL); + sm_writel(sm, EIM_MODE, ~0UL); + pattern = sm_readl(sm, EIM_MODE); + sm->irqc.nr_irqs = fls(pattern); + + ret = -ENOMEM; + sm->action = kmalloc(sizeof(*sm->action) * sm->irqc.nr_irqs, + GFP_KERNEL); + if (!sm->action) + goto out; + + for (i = 0; i < sm->irqc.nr_irqs; i++) + sm->action[i] = &eim_spurious_action; + + spin_lock_init(&sm->lock); + sm->irqc.irq_group = sm->pdev->resource[SM_EIM_IRQ_RESOURCE].start; + sm->irqc.class = &eim_irq_class; + + ret = intc_register_controller(&sm->irqc); + if (ret < 0) + goto out_free_actions; + + printk("EIM: External Interrupt Module at 0x%p, IRQ group %u\n", + sm->regs, sm->irqc.irq_group); + printk("EIM: Handling %u external IRQs, starting with IRQ%u\n", + sm->irqc.nr_irqs, sm->irqc.first_irq); + + return 0; + +out_free_actions: + kfree(sm->action); +out: + return ret; +} +arch_initcall(eim_init); diff --git a/arch/avr32/mach-at32ap/sm.h b/arch/avr32/mach-at32ap/sm.h new file mode 100644 index 0000000..2756582 --- /dev/null +++ b/arch/avr32/mach-at32ap/sm.h @@ -0,0 +1,240 @@ +/* + * Register definitions for SM + * + * System Manager + */ +#ifndef __ASM_AVR32_SM_H__ +#define __ASM_AVR32_SM_H__ + +/* SM register offsets */ +#define SM_PM_MCCTRL 0x0000 +#define SM_PM_CKSEL 0x0004 +#define SM_PM_CPU_MASK 0x0008 +#define SM_PM_HSB_MASK 0x000c +#define SM_PM_PBA_MASK 0x0010 +#define SM_PM_PBB_MASK 0x0014 +#define SM_PM_PLL0 0x0020 +#define SM_PM_PLL1 0x0024 +#define SM_PM_VCTRL 0x0030 +#define SM_PM_VMREF 0x0034 +#define SM_PM_VMV 0x0038 +#define SM_PM_IER 0x0040 +#define SM_PM_IDR 0x0044 +#define SM_PM_IMR 0x0048 +#define SM_PM_ISR 0x004c +#define SM_PM_ICR 0x0050 +#define SM_PM_GCCTRL 0x0060 +#define SM_RTC_CTRL 0x0080 +#define SM_RTC_VAL 0x0084 +#define SM_RTC_TOP 0x0088 +#define SM_RTC_IER 0x0090 +#define SM_RTC_IDR 0x0094 +#define SM_RTC_IMR 0x0098 +#define SM_RTC_ISR 0x009c +#define SM_RTC_ICR 0x00a0 +#define SM_WDT_CTRL 0x00b0 +#define SM_WDT_CLR 0x00b4 +#define SM_WDT_EXT 0x00b8 +#define SM_RC_RCAUSE 0x00c0 +#define SM_EIM_IER 0x0100 +#define SM_EIM_IDR 0x0104 +#define SM_EIM_IMR 0x0108 +#define SM_EIM_ISR 0x010c +#define SM_EIM_ICR 0x0110 +#define SM_EIM_MODE 0x0114 +#define SM_EIM_EDGE 0x0118 +#define SM_EIM_LEVEL 0x011c +#define SM_EIM_TEST 0x0120 +#define SM_EIM_NMIC 0x0124 + +/* Bitfields in PM_MCCTRL */ + +/* Bitfields in PM_CKSEL */ +#define SM_CPUSEL_OFFSET 0 +#define SM_CPUSEL_SIZE 3 +#define SM_CPUDIV_OFFSET 7 +#define SM_CPUDIV_SIZE 1 +#define SM_HSBSEL_OFFSET 8 +#define SM_HSBSEL_SIZE 3 +#define SM_HSBDIV_OFFSET 15 +#define SM_HSBDIV_SIZE 1 +#define SM_PBASEL_OFFSET 16 +#define SM_PBASEL_SIZE 3 +#define SM_PBADIV_OFFSET 23 +#define SM_PBADIV_SIZE 1 +#define SM_PBBSEL_OFFSET 24 +#define SM_PBBSEL_SIZE 3 +#define SM_PBBDIV_OFFSET 31 +#define SM_PBBDIV_SIZE 1 + +/* Bitfields in PM_CPU_MASK */ + +/* Bitfields in PM_HSB_MASK */ + +/* Bitfields in PM_PBA_MASK */ + +/* Bitfields in PM_PBB_MASK */ + +/* Bitfields in PM_PLL0 */ +#define SM_PLLEN_OFFSET 0 +#define SM_PLLEN_SIZE 1 +#define SM_PLLOSC_OFFSET 1 +#define SM_PLLOSC_SIZE 1 +#define SM_PLLOPT_OFFSET 2 +#define SM_PLLOPT_SIZE 3 +#define SM_PLLDIV_OFFSET 8 +#define SM_PLLDIV_SIZE 8 +#define SM_PLLMUL_OFFSET 16 +#define SM_PLLMUL_SIZE 8 +#define SM_PLLCOUNT_OFFSET 24 +#define SM_PLLCOUNT_SIZE 6 +#define SM_PLLTEST_OFFSET 31 +#define SM_PLLTEST_SIZE 1 + +/* Bitfields in PM_PLL1 */ + +/* Bitfields in PM_VCTRL */ +#define SM_VAUTO_OFFSET 0 +#define SM_VAUTO_SIZE 1 +#define SM_PM_VCTRL_VAL_OFFSET 8 +#define SM_PM_VCTRL_VAL_SIZE 7 + +/* Bitfields in PM_VMREF */ +#define SM_REFSEL_OFFSET 0 +#define SM_REFSEL_SIZE 4 + +/* Bitfields in PM_VMV */ +#define SM_PM_VMV_VAL_OFFSET 0 +#define SM_PM_VMV_VAL_SIZE 8 + +/* Bitfields in PM_IER */ + +/* Bitfields in PM_IDR */ + +/* Bitfields in PM_IMR */ + +/* Bitfields in PM_ISR */ + +/* Bitfields in PM_ICR */ +#define SM_LOCK0_OFFSET 0 +#define SM_LOCK0_SIZE 1 +#define SM_LOCK1_OFFSET 1 +#define SM_LOCK1_SIZE 1 +#define SM_WAKE_OFFSET 2 +#define SM_WAKE_SIZE 1 +#define SM_VOK_OFFSET 3 +#define SM_VOK_SIZE 1 +#define SM_VMRDY_OFFSET 4 +#define SM_VMRDY_SIZE 1 +#define SM_CKRDY_OFFSET 5 +#define SM_CKRDY_SIZE 1 + +/* Bitfields in PM_GCCTRL */ +#define SM_OSCSEL_OFFSET 0 +#define SM_OSCSEL_SIZE 1 +#define SM_PLLSEL_OFFSET 1 +#define SM_PLLSEL_SIZE 1 +#define SM_CEN_OFFSET 2 +#define SM_CEN_SIZE 1 +#define SM_CPC_OFFSET 3 +#define SM_CPC_SIZE 1 +#define SM_DIVEN_OFFSET 4 +#define SM_DIVEN_SIZE 1 +#define SM_DIV_OFFSET 8 +#define SM_DIV_SIZE 8 + +/* Bitfields in RTC_CTRL */ +#define SM_PCLR_OFFSET 1 +#define SM_PCLR_SIZE 1 +#define SM_TOPEN_OFFSET 2 +#define SM_TOPEN_SIZE 1 +#define SM_CLKEN_OFFSET 3 +#define SM_CLKEN_SIZE 1 +#define SM_PSEL_OFFSET 8 +#define SM_PSEL_SIZE 16 + +/* Bitfields in RTC_VAL */ +#define SM_RTC_VAL_VAL_OFFSET 0 +#define SM_RTC_VAL_VAL_SIZE 31 + +/* Bitfields in RTC_TOP */ +#define SM_RTC_TOP_VAL_OFFSET 0 +#define SM_RTC_TOP_VAL_SIZE 32 + +/* Bitfields in RTC_IER */ + +/* Bitfields in RTC_IDR */ + +/* Bitfields in RTC_IMR */ + +/* Bitfields in RTC_ISR */ + +/* Bitfields in RTC_ICR */ +#define SM_TOPI_OFFSET 0 +#define SM_TOPI_SIZE 1 + +/* Bitfields in WDT_CTRL */ +#define SM_KEY_OFFSET 24 +#define SM_KEY_SIZE 8 + +/* Bitfields in WDT_CLR */ + +/* Bitfields in WDT_EXT */ + +/* Bitfields in RC_RCAUSE */ +#define SM_POR_OFFSET 0 +#define SM_POR_SIZE 1 +#define SM_BOD_OFFSET 1 +#define SM_BOD_SIZE 1 +#define SM_EXT_OFFSET 2 +#define SM_EXT_SIZE 1 +#define SM_WDT_OFFSET 3 +#define SM_WDT_SIZE 1 +#define SM_NTAE_OFFSET 4 +#define SM_NTAE_SIZE 1 +#define SM_SERP_OFFSET 5 +#define SM_SERP_SIZE 1 + +/* Bitfields in EIM_IER */ + +/* Bitfields in EIM_IDR */ + +/* Bitfields in EIM_IMR */ + +/* Bitfields in EIM_ISR */ + +/* Bitfields in EIM_ICR */ + +/* Bitfields in EIM_MODE */ + +/* Bitfields in EIM_EDGE */ +#define SM_INT0_OFFSET 0 +#define SM_INT0_SIZE 1 +#define SM_INT1_OFFSET 1 +#define SM_INT1_SIZE 1 +#define SM_INT2_OFFSET 2 +#define SM_INT2_SIZE 1 +#define SM_INT3_OFFSET 3 +#define SM_INT3_SIZE 1 + +/* Bitfields in EIM_LEVEL */ + +/* Bitfields in EIM_TEST */ +#define SM_TESTEN_OFFSET 31 +#define SM_TESTEN_SIZE 1 + +/* Bitfields in EIM_NMIC */ +#define SM_EN_OFFSET 0 +#define SM_EN_SIZE 1 + +/* Bit manipulation macros */ +#define SM_BIT(name) (1 << SM_##name##_OFFSET) +#define SM_BF(name,value) (((value) & ((1 << SM_##name##_SIZE) - 1)) << SM_##name##_OFFSET) +#define SM_BFEXT(name,value) (((value) >> SM_##name##_OFFSET) & ((1 << SM_##name##_SIZE) - 1)) +#define SM_BFINS(name,value,old) (((old) & ~(((1 << SM_##name##_SIZE) - 1) << SM_##name##_OFFSET)) | SM_BF(name,value)) + +/* Register access macros */ +#define sm_readl(port,reg) readl((port)->regs + SM_##reg) +#define sm_writel(port,reg,value) writel((value), (port)->regs + SM_##reg) + +#endif /* __ASM_AVR32_SM_H__ */ diff --git a/arch/avr32/mm/Makefile b/arch/avr32/mm/Makefile new file mode 100644 index 0000000..0066491 --- /dev/null +++ b/arch/avr32/mm/Makefile @@ -0,0 +1,6 @@ +# +# Makefile for the Linux/AVR32 kernel. +# + +obj-y += init.o clear_page.o copy_page.o dma-coherent.o +obj-y += ioremap.o cache.o fault.o tlb.o diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c new file mode 100644 index 0000000..450515b --- /dev/null +++ b/arch/avr32/mm/cache.c @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include + +#include +#include +#include +#include + +/* + * If you attempt to flush anything more than this, you need superuser + * privileges. The value is completely arbitrary. + */ +#define CACHEFLUSH_MAX_LEN 1024 + +void invalidate_dcache_region(void *start, size_t size) +{ + unsigned long v, begin, end, linesz; + + linesz = boot_cpu_data.dcache.linesz; + + //printk("invalidate dcache: %p + %u\n", start, size); + + /* You asked for it, you got it */ + begin = (unsigned long)start & ~(linesz - 1); + end = ((unsigned long)start + size + linesz - 1) & ~(linesz - 1); + + for (v = begin; v < end; v += linesz) + invalidate_dcache_line((void *)v); +} + +void clean_dcache_region(void *start, size_t size) +{ + unsigned long v, begin, end, linesz; + + linesz = boot_cpu_data.dcache.linesz; + begin = (unsigned long)start & ~(linesz - 1); + end = ((unsigned long)start + size + linesz - 1) & ~(linesz - 1); + + for (v = begin; v < end; v += linesz) + clean_dcache_line((void *)v); + flush_write_buffer(); +} + +void flush_dcache_region(void *start, size_t size) +{ + unsigned long v, begin, end, linesz; + + linesz = boot_cpu_data.dcache.linesz; + begin = (unsigned long)start & ~(linesz - 1); + end = ((unsigned long)start + size + linesz - 1) & ~(linesz - 1); + + for (v = begin; v < end; v += linesz) + flush_dcache_line((void *)v); + flush_write_buffer(); +} + +void invalidate_icache_region(void *start, size_t size) +{ + unsigned long v, begin, end, linesz; + + linesz = boot_cpu_data.icache.linesz; + begin = (unsigned long)start & ~(linesz - 1); + end = ((unsigned long)start + size + linesz - 1) & ~(linesz - 1); + + for (v = begin; v < end; v += linesz) + invalidate_icache_line((void *)v); +} + +static inline void __flush_icache_range(unsigned long start, unsigned long end) +{ + unsigned long v, linesz; + + linesz = boot_cpu_data.dcache.linesz; + for (v = start; v < end; v += linesz) { + clean_dcache_line((void *)v); + invalidate_icache_line((void *)v); + } + + flush_write_buffer(); +} + +/* + * This one is called after a module has been loaded. + */ +void flush_icache_range(unsigned long start, unsigned long end) +{ + unsigned long linesz; + + linesz = boot_cpu_data.dcache.linesz; + __flush_icache_range(start & ~(linesz - 1), + (end + linesz - 1) & ~(linesz - 1)); +} + +/* + * This one is called from do_no_page(), do_swap_page() and install_page(). + */ +void flush_icache_page(struct vm_area_struct *vma, struct page *page) +{ + if (vma->vm_flags & VM_EXEC) { + void *v = kmap(page); + __flush_icache_range((unsigned long)v, (unsigned long)v + PAGE_SIZE); + kunmap(v); + } +} + +/* + * This one is used by copy_to_user_page() + */ +void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, + unsigned long addr, int len) +{ + if (vma->vm_flags & VM_EXEC) + flush_icache_range(addr, addr + len); +} + +asmlinkage int sys_cacheflush(int operation, void __user *addr, size_t len) +{ + int ret; + + if (len > CACHEFLUSH_MAX_LEN) { + ret = -EPERM; + if (!capable(CAP_SYS_ADMIN)) + goto out; + } + + ret = -EFAULT; + if (!access_ok(VERIFY_WRITE, addr, len)) + goto out; + + switch (operation) { + case CACHE_IFLUSH: + flush_icache_range((unsigned long)addr, + (unsigned long)addr + len); + ret = 0; + break; + default: + ret = -EINVAL; + } + +out: + return ret; +} diff --git a/arch/avr32/mm/clear_page.S b/arch/avr32/mm/clear_page.S new file mode 100644 index 0000000..5d70dca --- /dev/null +++ b/arch/avr32/mm/clear_page.S @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include + +/* + * clear_page + * r12: P1 address (to) + */ + .text + .global clear_page +clear_page: + sub r9, r12, -PAGE_SIZE + mov r10, 0 + mov r11, 0 +0: st.d r12++, r10 + cp r12, r9 + brne 0b + mov pc, lr diff --git a/arch/avr32/mm/copy_page.S b/arch/avr32/mm/copy_page.S new file mode 100644 index 0000000..c2b3752 --- /dev/null +++ b/arch/avr32/mm/copy_page.S @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + +/* + * copy_page + * + * r12 to (P1 address) + * r11 from (P1 address) + * r8-r10 scratch + */ + .text + .global copy_page +copy_page: + sub r10, r11, -(1 << PAGE_SHIFT) + /* pref r11[0] */ +1: /* pref r11[8] */ + ld.d r8, r11++ + st.d r12++, r8 + cp r11, r10 + brlo 1b + mov pc, lr diff --git a/arch/avr32/mm/dma-coherent.c b/arch/avr32/mm/dma-coherent.c new file mode 100644 index 0000000..44ab8a7 --- /dev/null +++ b/arch/avr32/mm/dma-coherent.c @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include + +#include +#include + +void dma_cache_sync(void *vaddr, size_t size, int direction) +{ + /* + * No need to sync an uncached area + */ + if (PXSEG(vaddr) == P2SEG) + return; + + switch (direction) { + case DMA_FROM_DEVICE: /* invalidate only */ + dma_cache_inv(vaddr, size); + break; + case DMA_TO_DEVICE: /* writeback only */ + dma_cache_wback(vaddr, size); + break; + case DMA_BIDIRECTIONAL: /* writeback and invalidate */ + dma_cache_wback_inv(vaddr, size); + break; + default: + BUG(); + } +} +EXPORT_SYMBOL(dma_cache_sync); + +static struct page *__dma_alloc(struct device *dev, size_t size, + dma_addr_t *handle, gfp_t gfp) +{ + struct page *page, *free, *end; + int order; + + size = PAGE_ALIGN(size); + order = get_order(size); + + page = alloc_pages(gfp, order); + if (!page) + return NULL; + split_page(page, order); + + /* + * When accessing physical memory with valid cache data, we + * get a cache hit even if the virtual memory region is marked + * as uncached. + * + * Since the memory is newly allocated, there is no point in + * doing a writeback. If the previous owner cares, he should + * have flushed the cache before releasing the memory. + */ + invalidate_dcache_region(phys_to_virt(page_to_phys(page)), size); + + *handle = page_to_bus(page); + free = page + (size >> PAGE_SHIFT); + end = page + (1 << order); + + /* + * Free any unused pages + */ + while (free < end) { + __free_page(free); + free++; + } + + return page; +} + +static void __dma_free(struct device *dev, size_t size, + struct page *page, dma_addr_t handle) +{ + struct page *end = page + (PAGE_ALIGN(size) >> PAGE_SHIFT); + + while (page < end) + __free_page(page++); +} + +void *dma_alloc_coherent(struct device *dev, size_t size, + dma_addr_t *handle, gfp_t gfp) +{ + struct page *page; + void *ret = NULL; + + page = __dma_alloc(dev, size, handle, gfp); + if (page) + ret = phys_to_uncached(page_to_phys(page)); + + return ret; +} +EXPORT_SYMBOL(dma_alloc_coherent); + +void dma_free_coherent(struct device *dev, size_t size, + void *cpu_addr, dma_addr_t handle) +{ + void *addr = phys_to_cached(uncached_to_phys(cpu_addr)); + struct page *page; + + pr_debug("dma_free_coherent addr %p (phys %08lx) size %u\n", + cpu_addr, (unsigned long)handle, (unsigned)size); + BUG_ON(!virt_addr_valid(addr)); + page = virt_to_page(addr); + __dma_free(dev, size, page, handle); +} +EXPORT_SYMBOL(dma_free_coherent); + +#if 0 +void *dma_alloc_writecombine(struct device *dev, size_t size, + dma_addr_t *handle, gfp_t gfp) +{ + struct page *page; + + page = __dma_alloc(dev, size, handle, gfp); + + /* Now, map the page into P3 with write-combining turned on */ + return __ioremap(page_to_phys(page), size, _PAGE_BUFFER); +} +EXPORT_SYMBOL(dma_alloc_writecombine); + +void dma_free_writecombine(struct device *dev, size_t size, + void *cpu_addr, dma_addr_t handle) +{ + struct page *page; + + iounmap(cpu_addr); + + page = bus_to_page(handle); + __dma_free(dev, size, page, handle); +} +EXPORT_SYMBOL(dma_free_writecombine); +#endif diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c new file mode 100644 index 0000000..6785572 --- /dev/null +++ b/arch/avr32/mm/fault.c @@ -0,0 +1,315 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * Based on linux/arch/sh/mm/fault.c: + * Copyright (C) 1999 Niibe Yutaka + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#ifdef DEBUG +static void dump_code(unsigned long pc) +{ + char *p = (char *)pc; + char val; + int i; + + + printk(KERN_DEBUG "Code:"); + for (i = 0; i < 16; i++) { + if (__get_user(val, p + i)) + break; + printk(" %02x", val); + } + printk("\n"); +} +#endif + +#ifdef CONFIG_KPROBES +ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); + +/* Hook to register for page fault notifications */ +int register_page_fault_notifier(struct notifier_block *nb) +{ + return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); +} + +int unregister_page_fault_notifier(struct notifier_block *nb) +{ + return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); +} + +static inline int notify_page_fault(enum die_val val, struct pt_regs *regs, + int trap, int sig) +{ + struct die_args args = { + .regs = regs, + .trapnr = trap, + }; + return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); +} +#else +static inline int notify_page_fault(enum die_val val, struct pt_regs *regs, + int trap, int sig) +{ + return NOTIFY_DONE; +} +#endif + +/* + * This routine handles page faults. It determines the address and the + * problem, and then passes it off to one of the appropriate routines. + * + * ecr is the Exception Cause Register. Possible values are: + * 5: Page not found (instruction access) + * 6: Protection fault (instruction access) + * 12: Page not found (read access) + * 13: Page not found (write access) + * 14: Protection fault (read access) + * 15: Protection fault (write access) + */ +asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs) +{ + struct task_struct *tsk; + struct mm_struct *mm; + struct vm_area_struct *vma; + const struct exception_table_entry *fixup; + unsigned long address; + unsigned long page; + int writeaccess = 0; + + if (notify_page_fault(DIE_PAGE_FAULT, regs, + ecr, SIGSEGV) == NOTIFY_STOP) + return; + + address = sysreg_read(TLBEAR); + + tsk = current; + mm = tsk->mm; + + /* + * If we're in an interrupt or have no user context, we must + * not take the fault... + */ + if (in_atomic() || !mm || regs->sr & SYSREG_BIT(GM)) + goto no_context; + + local_irq_enable(); + + down_read(&mm->mmap_sem); + + vma = find_vma(mm, address); + if (!vma) + goto bad_area; + if (vma->vm_start <= address) + goto good_area; + if (!(vma->vm_flags & VM_GROWSDOWN)) + goto bad_area; + if (expand_stack(vma, address)) + goto bad_area; + + /* + * Ok, we have a good vm_area for this memory access, so we + * can handle it... + */ +good_area: + //pr_debug("good area: vm_flags = 0x%lx\n", vma->vm_flags); + switch (ecr) { + case ECR_PROTECTION_X: + case ECR_TLB_MISS_X: + if (!(vma->vm_flags & VM_EXEC)) + goto bad_area; + break; + case ECR_PROTECTION_R: + case ECR_TLB_MISS_R: + if (!(vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC))) + goto bad_area; + break; + case ECR_PROTECTION_W: + case ECR_TLB_MISS_W: + if (!(vma->vm_flags & VM_WRITE)) + goto bad_area; + writeaccess = 1; + break; + default: + panic("Unhandled case %lu in do_page_fault!", ecr); + } + + /* + * If for any reason at all we couldn't handle the fault, make + * sure we exit gracefully rather than endlessly redo the + * fault. + */ +survive: + switch (handle_mm_fault(mm, vma, address, writeaccess)) { + case VM_FAULT_MINOR: + tsk->min_flt++; + break; + case VM_FAULT_MAJOR: + tsk->maj_flt++; + break; + case VM_FAULT_SIGBUS: + goto do_sigbus; + case VM_FAULT_OOM: + goto out_of_memory; + default: + BUG(); + } + + up_read(&mm->mmap_sem); + return; + + /* + * Something tried to access memory that isn't in our memory + * map. Fix it, but check if it's kernel or user first... + */ +bad_area: + pr_debug("Bad area [%s:%u]: addr %08lx, ecr %lu\n", + tsk->comm, tsk->pid, address, ecr); + + up_read(&mm->mmap_sem); + + if (user_mode(regs)) { + /* Hmm...we have to pass address and ecr somehow... */ + /* tsk->thread.address = address; + tsk->thread.error_code = ecr; */ +#ifdef DEBUG + show_regs(regs); + dump_code(regs->pc); + + page = sysreg_read(PTBR); + printk("ptbr = %08lx", page); + if (page) { + page = ((unsigned long *)page)[address >> 22]; + printk(" pgd = %08lx", page); + if (page & _PAGE_PRESENT) { + page &= PAGE_MASK; + address &= 0x003ff000; + page = ((unsigned long *)__va(page))[address >> PAGE_SHIFT]; + printk(" pte = %08lx\n", page); + } + } +#endif + pr_debug("Sending SIGSEGV to PID %d...\n", + tsk->pid); + force_sig(SIGSEGV, tsk); + return; + } + +no_context: + pr_debug("No context\n"); + + /* Are we prepared to handle this kernel fault? */ + fixup = search_exception_tables(regs->pc); + if (fixup) { + regs->pc = fixup->fixup; + pr_debug("Found fixup at %08lx\n", fixup->fixup); + return; + } + + /* + * Oops. The kernel tried to access some bad page. We'll have + * to terminate things with extreme prejudice. + */ + if (address < PAGE_SIZE) + printk(KERN_ALERT + "Unable to handle kernel NULL pointer dereference"); + else + printk(KERN_ALERT + "Unable to handle kernel paging request"); + printk(" at virtual address %08lx\n", address); + printk(KERN_ALERT "pc = %08lx\n", regs->pc); + + page = sysreg_read(PTBR); + printk(KERN_ALERT "ptbr = %08lx", page); + if (page) { + page = ((unsigned long *)page)[address >> 22]; + printk(" pgd = %08lx", page); + if (page & _PAGE_PRESENT) { + page &= PAGE_MASK; + address &= 0x003ff000; + page = ((unsigned long *)__va(page))[address >> PAGE_SHIFT]; + printk(" pte = %08lx\n", page); + } + } + die("\nOops", regs, ecr); + do_exit(SIGKILL); + + /* + * We ran out of memory, or some other thing happened to us + * that made us unable to handle the page fault gracefully. + */ +out_of_memory: + printk("Out of memory\n"); + up_read(&mm->mmap_sem); + if (current->pid == 1) { + yield(); + down_read(&mm->mmap_sem); + goto survive; + } + printk("VM: Killing process %s\n", tsk->comm); + if (user_mode(regs)) + do_exit(SIGKILL); + goto no_context; + +do_sigbus: + up_read(&mm->mmap_sem); + + /* + * Send a sigbus, regardless of whether we were in kernel or + * user mode. + */ + /* address, error_code, trap_no, ... */ +#ifdef DEBUG + show_regs(regs); + dump_code(regs->pc); +#endif + pr_debug("Sending SIGBUS to PID %d...\n", tsk->pid); + force_sig(SIGBUS, tsk); + + /* Kernel mode? Handle exceptions or die */ + if (!user_mode(regs)) + goto no_context; +} + +asmlinkage void do_bus_error(unsigned long addr, int write_access, + struct pt_regs *regs) +{ + printk(KERN_ALERT + "Bus error at physical address 0x%08lx (%s access)\n", + addr, write_access ? "write" : "read"); + printk(KERN_INFO "DTLB dump:\n"); + dump_dtlb(); + die("Bus Error", regs, write_access); + do_exit(SIGKILL); +} + +/* + * This functionality is currently not possible to implement because + * we're using segmentation to ensure a fixed mapping of the kernel + * virtual address space. + * + * It would be possible to implement this, but it would require us to + * disable segmentation at startup and load the kernel mappings into + * the TLB like any other pages. There will be lots of trickery to + * avoid recursive invocation of the TLB miss handler, though... + */ +#ifdef CONFIG_DEBUG_PAGEALLOC +void kernel_map_pages(struct page *page, int numpages, int enable) +{ + +} +EXPORT_SYMBOL(kernel_map_pages); +#endif diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c new file mode 100644 index 0000000..3e6c410 --- /dev/null +++ b/arch/avr32/mm/init.c @@ -0,0 +1,480 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); + +pgd_t swapper_pg_dir[PTRS_PER_PGD]; + +struct page *empty_zero_page; + +/* + * Cache of MMU context last used. + */ +unsigned long mmu_context_cache = NO_CONTEXT; + +#define START_PFN (NODE_DATA(0)->bdata->node_boot_start >> PAGE_SHIFT) +#define MAX_LOW_PFN (NODE_DATA(0)->bdata->node_low_pfn) + +void show_mem(void) +{ + int total = 0, reserved = 0, cached = 0; + int slab = 0, free = 0, shared = 0; + pg_data_t *pgdat; + + printk("Mem-info:\n"); + show_free_areas(); + + for_each_online_pgdat(pgdat) { + struct page *page, *end; + + page = pgdat->node_mem_map; + end = page + pgdat->node_spanned_pages; + + do { + total++; + if (PageReserved(page)) + reserved++; + else if (PageSwapCache(page)) + cached++; + else if (PageSlab(page)) + slab++; + else if (!page_count(page)) + free++; + else + shared += page_count(page) - 1; + page++; + } while (page < end); + } + + printk ("%d pages of RAM\n", total); + printk ("%d free pages\n", free); + printk ("%d reserved pages\n", reserved); + printk ("%d slab pages\n", slab); + printk ("%d pages shared\n", shared); + printk ("%d pages swap cached\n", cached); +} + +static void __init print_memory_map(const char *what, + struct tag_mem_range *mem) +{ + printk ("%s:\n", what); + for (; mem; mem = mem->next) { + printk (" %08lx - %08lx\n", + (unsigned long)mem->addr, + (unsigned long)(mem->addr + mem->size)); + } +} + +#define MAX_LOWMEM HIGHMEM_START +#define MAX_LOWMEM_PFN PFN_DOWN(MAX_LOWMEM) + +/* + * Sort a list of memory regions in-place by ascending address. + * + * We're using bubble sort because we only have singly linked lists + * with few elements. + */ +static void __init sort_mem_list(struct tag_mem_range **pmem) +{ + int done; + struct tag_mem_range **a, **b; + + if (!*pmem) + return; + + do { + done = 1; + a = pmem, b = &(*pmem)->next; + while (*b) { + if ((*a)->addr > (*b)->addr) { + struct tag_mem_range *tmp; + tmp = (*b)->next; + (*b)->next = *a; + *a = *b; + *b = tmp; + done = 0; + } + a = &(*a)->next; + b = &(*a)->next; + } + } while (!done); +} + +/* + * Find a free memory region large enough for storing the + * bootmem bitmap. + */ +static unsigned long __init +find_bootmap_pfn(const struct tag_mem_range *mem) +{ + unsigned long bootmap_pages, bootmap_len; + unsigned long node_pages = PFN_UP(mem->size); + unsigned long bootmap_addr = mem->addr; + struct tag_mem_range *reserved = mem_reserved; + struct tag_mem_range *ramdisk = mem_ramdisk; + unsigned long kern_start = virt_to_phys(_stext); + unsigned long kern_end = virt_to_phys(_end); + + bootmap_pages = bootmem_bootmap_pages(node_pages); + bootmap_len = bootmap_pages << PAGE_SHIFT; + + /* + * Find a large enough region without reserved pages for + * storing the bootmem bitmap. We can take advantage of the + * fact that all lists have been sorted. + * + * We have to check explicitly reserved regions as well as the + * kernel image and any RAMDISK images... + * + * Oh, and we have to make sure we don't overwrite the taglist + * since we're going to use it until the bootmem allocator is + * fully up and running. + */ + while (1) { + if ((bootmap_addr < kern_end) && + ((bootmap_addr + bootmap_len) > kern_start)) + bootmap_addr = kern_end; + + while (reserved && + (bootmap_addr >= (reserved->addr + reserved->size))) + reserved = reserved->next; + + if (reserved && + ((bootmap_addr + bootmap_len) >= reserved->addr)) { + bootmap_addr = reserved->addr + reserved->size; + continue; + } + + while (ramdisk && + (bootmap_addr >= (ramdisk->addr + ramdisk->size))) + ramdisk = ramdisk->next; + + if (!ramdisk || + ((bootmap_addr + bootmap_len) < ramdisk->addr)) + break; + + bootmap_addr = ramdisk->addr + ramdisk->size; + } + + if ((PFN_UP(bootmap_addr) + bootmap_len) >= (mem->addr + mem->size)) + return ~0UL; + + return PFN_UP(bootmap_addr); +} + +void __init setup_bootmem(void) +{ + unsigned bootmap_size; + unsigned long first_pfn, bootmap_pfn, pages; + unsigned long max_pfn, max_low_pfn; + unsigned long kern_start = virt_to_phys(_stext); + unsigned long kern_end = virt_to_phys(_end); + unsigned node = 0; + struct tag_mem_range *bank, *res; + + sort_mem_list(&mem_phys); + sort_mem_list(&mem_reserved); + + print_memory_map("Physical memory", mem_phys); + print_memory_map("Reserved memory", mem_reserved); + + nodes_clear(node_online_map); + + if (mem_ramdisk) { +#ifdef CONFIG_BLK_DEV_INITRD + initrd_start = __va(mem_ramdisk->addr); + initrd_end = initrd_start + mem_ramdisk->size; + + print_memory_map("RAMDISK images", mem_ramdisk); + if (mem_ramdisk->next) + printk(KERN_WARNING + "Warning: Only the first RAMDISK image " + "will be used\n"); + sort_mem_list(&mem_ramdisk); +#else + printk(KERN_WARNING "RAM disk image present, but " + "no initrd support in kernel!\n"); +#endif + } + + if (mem_phys->next) + printk(KERN_WARNING "Only using first memory bank\n"); + + for (bank = mem_phys; bank; bank = NULL) { + first_pfn = PFN_UP(bank->addr); + max_low_pfn = max_pfn = PFN_DOWN(bank->addr + bank->size); + bootmap_pfn = find_bootmap_pfn(bank); + if (bootmap_pfn > max_pfn) + panic("No space for bootmem bitmap!\n"); + + if (max_low_pfn > MAX_LOWMEM_PFN) { + max_low_pfn = MAX_LOWMEM_PFN; +#ifndef CONFIG_HIGHMEM + /* + * Lowmem is memory that can be addressed + * directly through P1/P2 + */ + printk(KERN_WARNING + "Node %u: Only %ld MiB of memory will be used.\n", + node, MAX_LOWMEM >> 20); + printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n"); +#else +#error HIGHMEM is not supported by AVR32 yet +#endif + } + + /* Initialize the boot-time allocator with low memory only. */ + bootmap_size = init_bootmem_node(NODE_DATA(node), bootmap_pfn, + first_pfn, max_low_pfn); + + printk("Node %u: bdata = %p, bdata->node_bootmem_map = %p\n", + node, NODE_DATA(node)->bdata, + NODE_DATA(node)->bdata->node_bootmem_map); + + /* + * Register fully available RAM pages with the bootmem + * allocator. + */ + pages = max_low_pfn - first_pfn; + free_bootmem_node (NODE_DATA(node), PFN_PHYS(first_pfn), + PFN_PHYS(pages)); + + /* + * Reserve space for the kernel image (if present in + * this node)... + */ + if ((kern_start >= PFN_PHYS(first_pfn)) && + (kern_start < PFN_PHYS(max_pfn))) { + printk("Node %u: Kernel image %08lx - %08lx\n", + node, kern_start, kern_end); + reserve_bootmem_node(NODE_DATA(node), kern_start, + kern_end - kern_start); + } + + /* ...the bootmem bitmap... */ + reserve_bootmem_node(NODE_DATA(node), + PFN_PHYS(bootmap_pfn), + bootmap_size); + + /* ...any RAMDISK images... */ + for (res = mem_ramdisk; res; res = res->next) { + if (res->addr > PFN_PHYS(max_pfn)) + break; + + if (res->addr >= PFN_PHYS(first_pfn)) { + printk("Node %u: RAMDISK %08lx - %08lx\n", + node, + (unsigned long)res->addr, + (unsigned long)(res->addr + res->size)); + reserve_bootmem_node(NODE_DATA(node), + res->addr, res->size); + } + } + + /* ...and any other reserved regions. */ + for (res = mem_reserved; res; res = res->next) { + if (res->addr > PFN_PHYS(max_pfn)) + break; + + if (res->addr >= PFN_PHYS(first_pfn)) { + printk("Node %u: Reserved %08lx - %08lx\n", + node, + (unsigned long)res->addr, + (unsigned long)(res->addr + res->size)); + reserve_bootmem_node(NODE_DATA(node), + res->addr, res->size); + } + } + + node_set_online(node); + } +} + +/* + * paging_init() sets up the page tables + * + * This routine also unmaps the page at virtual kernel address 0, so + * that we can trap those pesky NULL-reference errors in the kernel. + */ +void __init paging_init(void) +{ + extern unsigned long _evba; + void *zero_page; + int nid; + + /* + * Make sure we can handle exceptions before enabling + * paging. Not that we should ever _get_ any exceptions this + * early, but you never know... + */ + printk("Exception vectors start at %p\n", &_evba); + sysreg_write(EVBA, (unsigned long)&_evba); + + /* + * Since we are ready to handle exceptions now, we should let + * the CPU generate them... + */ + __asm__ __volatile__ ("csrf %0" : : "i"(SR_EM_BIT)); + + /* + * Allocate the zero page. The allocator will panic if it + * can't satisfy the request, so no need to check. + */ + zero_page = alloc_bootmem_low_pages_node(NODE_DATA(0), + PAGE_SIZE); + + { + pgd_t *pg_dir; + int i; + + pg_dir = swapper_pg_dir; + sysreg_write(PTBR, (unsigned long)pg_dir); + + for (i = 0; i < PTRS_PER_PGD; i++) + pgd_val(pg_dir[i]) = 0; + + enable_mmu(); + printk ("CPU: Paging enabled\n"); + } + + for_each_online_node(nid) { + pg_data_t *pgdat = NODE_DATA(nid); + unsigned long zones_size[MAX_NR_ZONES]; + unsigned long low, start_pfn; + + start_pfn = pgdat->bdata->node_boot_start; + start_pfn >>= PAGE_SHIFT; + low = pgdat->bdata->node_low_pfn; + + memset(zones_size, 0, sizeof(zones_size)); + zones_size[ZONE_NORMAL] = low - start_pfn; + + printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n", + nid, start_pfn, low); + + free_area_init_node(nid, pgdat, zones_size, start_pfn, NULL); + + printk("Node %u: mem_map starts at %p\n", + pgdat->node_id, pgdat->node_mem_map); + } + + mem_map = NODE_DATA(0)->node_mem_map; + + memset(zero_page, 0, PAGE_SIZE); + empty_zero_page = virt_to_page(zero_page); + flush_dcache_page(empty_zero_page); +} + +void __init mem_init(void) +{ + int codesize, reservedpages, datasize, initsize; + int nid, i; + + reservedpages = 0; + high_memory = NULL; + + /* this will put all low memory onto the freelists */ + for_each_online_node(nid) { + pg_data_t *pgdat = NODE_DATA(nid); + unsigned long node_pages = 0; + void *node_high_memory; + + num_physpages += pgdat->node_present_pages; + + if (pgdat->node_spanned_pages != 0) + node_pages = free_all_bootmem_node(pgdat); + + totalram_pages += node_pages; + + for (i = 0; i < node_pages; i++) + if (PageReserved(pgdat->node_mem_map + i)) + reservedpages++; + + node_high_memory = (void *)((pgdat->node_start_pfn + + pgdat->node_spanned_pages) + << PAGE_SHIFT); + if (node_high_memory > high_memory) + high_memory = node_high_memory; + } + + max_mapnr = MAP_NR(high_memory); + + codesize = (unsigned long)_etext - (unsigned long)_text; + datasize = (unsigned long)_edata - (unsigned long)_data; + initsize = (unsigned long)__init_end - (unsigned long)__init_begin; + + printk ("Memory: %luk/%luk available (%dk kernel code, " + "%dk reserved, %dk data, %dk init)\n", + (unsigned long)nr_free_pages() << (PAGE_SHIFT - 10), + totalram_pages << (PAGE_SHIFT - 10), + codesize >> 10, + reservedpages << (PAGE_SHIFT - 10), + datasize >> 10, + initsize >> 10); +} + +static inline void free_area(unsigned long addr, unsigned long end, char *s) +{ + unsigned int size = (end - addr) >> 10; + + for (; addr < end; addr += PAGE_SIZE) { + struct page *page = virt_to_page(addr); + ClearPageReserved(page); + init_page_count(page); + free_page(addr); + totalram_pages++; + } + + if (size && s) + printk(KERN_INFO "Freeing %s memory: %dK (%lx - %lx)\n", + s, size, end - (size << 10), end); +} + +void free_initmem(void) +{ + free_area((unsigned long)__init_begin, (unsigned long)__init_end, + "init"); +} + +#ifdef CONFIG_BLK_DEV_INITRD + +static int keep_initrd; + +void free_initrd_mem(unsigned long start, unsigned long end) +{ + if (!keep_initrd) + free_area(start, end, "initrd"); +} + +static int __init keepinitrd_setup(char *__unused) +{ + keep_initrd = 1; + return 1; +} + +__setup("keepinitrd", keepinitrd_setup); +#endif diff --git a/arch/avr32/mm/ioremap.c b/arch/avr32/mm/ioremap.c new file mode 100644 index 0000000..8cfec65 --- /dev/null +++ b/arch/avr32/mm/ioremap.c @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include +#include + +#include +#include + +/* + * Re-map an arbitrary physical address space into the kernel virtual + * address space. Needed when the kernel wants to access physical + * memory directly. + */ +void __iomem *__ioremap(unsigned long phys_addr, size_t size, + unsigned long flags) +{ + unsigned long addr; + struct vm_struct *area; + unsigned long offset, last_addr; + pgprot_t prot; + + /* + * Check if we can simply use the P4 segment. This area is + * uncacheable, so if caching/buffering is requested, we can't + * use it. + */ + if ((phys_addr >= P4SEG) && (flags == 0)) + return (void __iomem *)phys_addr; + + /* Don't allow wraparound or zero size */ + last_addr = phys_addr + size - 1; + if (!size || last_addr < phys_addr) + return NULL; + + /* + * XXX: When mapping regular RAM, we'd better make damn sure + * it's never used for anything else. But this is really the + * caller's responsibility... + */ + if (PHYSADDR(P2SEGADDR(phys_addr)) == phys_addr) + return (void __iomem *)P2SEGADDR(phys_addr); + + /* Mappings have to be page-aligned */ + offset = phys_addr & ~PAGE_MASK; + phys_addr &= PAGE_MASK; + size = PAGE_ALIGN(last_addr + 1) - phys_addr; + + prot = __pgprot(_PAGE_PRESENT | _PAGE_GLOBAL | _PAGE_RW | _PAGE_DIRTY + | _PAGE_ACCESSED | _PAGE_TYPE_SMALL | flags); + + /* + * Ok, go for it.. + */ + area = get_vm_area(size, VM_IOREMAP); + if (!area) + return NULL; + area->phys_addr = phys_addr; + addr = (unsigned long )area->addr; + if (ioremap_page_range(addr, addr + size, phys_addr, prot)) { + vunmap((void *)addr); + return NULL; + } + + return (void __iomem *)(offset + (char *)addr); +} +EXPORT_SYMBOL(__ioremap); + +void __iounmap(void __iomem *addr) +{ + struct vm_struct *p; + + if ((unsigned long)addr >= P4SEG) + return; + + p = remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr)); + if (unlikely(!p)) { + printk (KERN_ERR "iounmap: bad address %p\n", addr); + return; + } + + kfree (p); +} +EXPORT_SYMBOL(__iounmap); diff --git a/arch/avr32/mm/tlb.c b/arch/avr32/mm/tlb.c new file mode 100644 index 0000000..7b07305 --- /dev/null +++ b/arch/avr32/mm/tlb.c @@ -0,0 +1,380 @@ +/* + * AVR32 TLB operations + * + * Copyright (C) 2004-2006 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include + +#include + +#define _TLBEHI_I 0x100 + +void show_dtlb_entry(unsigned int index) +{ + unsigned int tlbehi, tlbehi_save, tlbelo, mmucr, mmucr_save; + unsigned long flags; + + local_irq_save(flags); + mmucr_save = sysreg_read(MMUCR); + tlbehi_save = sysreg_read(TLBEHI); + mmucr = mmucr_save & 0x13; + mmucr |= index << 14; + sysreg_write(MMUCR, mmucr); + + asm volatile("tlbr" : : : "memory"); + cpu_sync_pipeline(); + + tlbehi = sysreg_read(TLBEHI); + tlbelo = sysreg_read(TLBELO); + + printk("%2u: %c %c %02x %05x %05x %o %o %c %c %c %c\n", + index, + (tlbehi & 0x200)?'1':'0', + (tlbelo & 0x100)?'1':'0', + (tlbehi & 0xff), + (tlbehi >> 12), (tlbelo >> 12), + (tlbelo >> 4) & 7, (tlbelo >> 2) & 3, + (tlbelo & 0x200)?'1':'0', + (tlbelo & 0x080)?'1':'0', + (tlbelo & 0x001)?'1':'0', + (tlbelo & 0x002)?'1':'0'); + + sysreg_write(MMUCR, mmucr_save); + sysreg_write(TLBEHI, tlbehi_save); + cpu_sync_pipeline(); + local_irq_restore(flags); +} + +void dump_dtlb(void) +{ + unsigned int i; + + printk("ID V G ASID VPN PFN AP SZ C B W D\n"); + for (i = 0; i < 32; i++) + show_dtlb_entry(i); +} + +static unsigned long last_mmucr; + +static inline void set_replacement_pointer(unsigned shift) +{ + unsigned long mmucr, mmucr_save; + + mmucr = mmucr_save = sysreg_read(MMUCR); + + /* Does this mapping already exist? */ + __asm__ __volatile__( + " tlbs\n" + " mfsr %0, %1" + : "=r"(mmucr) + : "i"(SYSREG_MMUCR)); + + if (mmucr & SYSREG_BIT(MMUCR_N)) { + /* Not found -- pick a not-recently-accessed entry */ + unsigned long rp; + unsigned long tlbar = sysreg_read(TLBARLO); + + rp = 32 - fls(tlbar); + if (rp == 32) { + rp = 0; + sysreg_write(TLBARLO, -1L); + } + + mmucr &= 0x13; + mmucr |= (rp << shift); + + sysreg_write(MMUCR, mmucr); + } + + last_mmucr = mmucr; +} + +static void update_dtlb(unsigned long address, pte_t pte, unsigned long asid) +{ + unsigned long vpn; + + vpn = (address & MMU_VPN_MASK) | _TLBEHI_VALID | asid; + sysreg_write(TLBEHI, vpn); + cpu_sync_pipeline(); + + set_replacement_pointer(14); + + sysreg_write(TLBELO, pte_val(pte) & _PAGE_FLAGS_HARDWARE_MASK); + + /* Let's go */ + asm volatile("nop\n\ttlbw" : : : "memory"); + cpu_sync_pipeline(); +} + +void update_mmu_cache(struct vm_area_struct *vma, + unsigned long address, pte_t pte) +{ + unsigned long flags; + + /* ptrace may call this routine */ + if (vma && current->active_mm != vma->vm_mm) + return; + + local_irq_save(flags); + update_dtlb(address, pte, get_asid()); + local_irq_restore(flags); +} + +void __flush_tlb_page(unsigned long asid, unsigned long page) +{ + unsigned long mmucr, tlbehi; + + page |= asid; + sysreg_write(TLBEHI, page); + cpu_sync_pipeline(); + asm volatile("tlbs"); + mmucr = sysreg_read(MMUCR); + + if (!(mmucr & SYSREG_BIT(MMUCR_N))) { + unsigned long tlbarlo; + unsigned long entry; + + /* Clear the "valid" bit */ + tlbehi = sysreg_read(TLBEHI); + tlbehi &= ~_TLBEHI_VALID; + sysreg_write(TLBEHI, tlbehi); + cpu_sync_pipeline(); + + /* mark the entry as "not accessed" */ + entry = (mmucr >> 14) & 0x3f; + tlbarlo = sysreg_read(TLBARLO); + tlbarlo |= (0x80000000 >> entry); + sysreg_write(TLBARLO, tlbarlo); + + /* update the entry with valid bit clear */ + asm volatile("tlbw"); + cpu_sync_pipeline(); + } +} + +void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) +{ + if (vma->vm_mm && vma->vm_mm->context != NO_CONTEXT) { + unsigned long flags, asid; + unsigned long saved_asid = MMU_NO_ASID; + + asid = vma->vm_mm->context & MMU_CONTEXT_ASID_MASK; + page &= PAGE_MASK; + + local_irq_save(flags); + if (vma->vm_mm != current->mm) { + saved_asid = get_asid(); + set_asid(asid); + } + + __flush_tlb_page(asid, page); + + if (saved_asid != MMU_NO_ASID) + set_asid(saved_asid); + local_irq_restore(flags); + } +} + +void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, + unsigned long end) +{ + struct mm_struct *mm = vma->vm_mm; + + if (mm->context != NO_CONTEXT) { + unsigned long flags; + int size; + + local_irq_save(flags); + size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; + if (size > (MMU_DTLB_ENTRIES / 4)) { /* Too many entries to flush */ + mm->context = NO_CONTEXT; + if (mm == current->mm) + activate_context(mm); + } else { + unsigned long asid = mm->context & MMU_CONTEXT_ASID_MASK; + unsigned long saved_asid = MMU_NO_ASID; + + start &= PAGE_MASK; + end += (PAGE_SIZE - 1); + end &= PAGE_MASK; + if (mm != current->mm) { + saved_asid = get_asid(); + set_asid(asid); + } + + while (start < end) { + __flush_tlb_page(asid, start); + start += PAGE_SIZE; + } + if (saved_asid != MMU_NO_ASID) + set_asid(saved_asid); + } + local_irq_restore(flags); + } +} + +/* + * TODO: If this is only called for addresses > TASK_SIZE, we can probably + * skip the ASID stuff and just use the Global bit... + */ +void flush_tlb_kernel_range(unsigned long start, unsigned long end) +{ + unsigned long flags; + int size; + + local_irq_save(flags); + size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; + if (size > (MMU_DTLB_ENTRIES / 4)) { /* Too many entries to flush */ + flush_tlb_all(); + } else { + unsigned long asid = init_mm.context & MMU_CONTEXT_ASID_MASK; + unsigned long saved_asid = get_asid(); + + start &= PAGE_MASK; + end += (PAGE_SIZE - 1); + end &= PAGE_MASK; + set_asid(asid); + while (start < end) { + __flush_tlb_page(asid, start); + start += PAGE_SIZE; + } + set_asid(saved_asid); + } + local_irq_restore(flags); +} + +void flush_tlb_mm(struct mm_struct *mm) +{ + /* Invalidate all TLB entries of this process by getting a new ASID */ + if (mm->context != NO_CONTEXT) { + unsigned long flags; + + local_irq_save(flags); + mm->context = NO_CONTEXT; + if (mm == current->mm) + activate_context(mm); + local_irq_restore(flags); + } +} + +void flush_tlb_all(void) +{ + unsigned long flags; + + local_irq_save(flags); + sysreg_write(MMUCR, sysreg_read(MMUCR) | SYSREG_BIT(MMUCR_I)); + local_irq_restore(flags); +} + +#ifdef CONFIG_PROC_FS + +#include +#include +#include + +static void *tlb_start(struct seq_file *tlb, loff_t *pos) +{ + static unsigned long tlb_index; + + if (*pos >= 32) + return NULL; + + tlb_index = 0; + return &tlb_index; +} + +static void *tlb_next(struct seq_file *tlb, void *v, loff_t *pos) +{ + unsigned long *index = v; + + if (*index >= 31) + return NULL; + + ++*pos; + ++*index; + return index; +} + +static void tlb_stop(struct seq_file *tlb, void *v) +{ + +} + +static int tlb_show(struct seq_file *tlb, void *v) +{ + unsigned int tlbehi, tlbehi_save, tlbelo, mmucr, mmucr_save; + unsigned long flags; + unsigned long *index = v; + + if (*index == 0) + seq_puts(tlb, "ID V G ASID VPN PFN AP SZ C B W D\n"); + + BUG_ON(*index >= 32); + + local_irq_save(flags); + mmucr_save = sysreg_read(MMUCR); + tlbehi_save = sysreg_read(TLBEHI); + mmucr = mmucr_save & 0x13; + mmucr |= *index << 14; + sysreg_write(MMUCR, mmucr); + + asm volatile("tlbr" : : : "memory"); + cpu_sync_pipeline(); + + tlbehi = sysreg_read(TLBEHI); + tlbelo = sysreg_read(TLBELO); + + sysreg_write(MMUCR, mmucr_save); + sysreg_write(TLBEHI, tlbehi_save); + cpu_sync_pipeline(); + local_irq_restore(flags); + + seq_printf(tlb, "%2lu: %c %c %02x %05x %05x %o %o %c %c %c %c\n", + *index, + (tlbehi & 0x200)?'1':'0', + (tlbelo & 0x100)?'1':'0', + (tlbehi & 0xff), + (tlbehi >> 12), (tlbelo >> 12), + (tlbelo >> 4) & 7, (tlbelo >> 2) & 3, + (tlbelo & 0x200)?'1':'0', + (tlbelo & 0x080)?'1':'0', + (tlbelo & 0x001)?'1':'0', + (tlbelo & 0x002)?'1':'0'); + + return 0; +} + +static struct seq_operations tlb_ops = { + .start = tlb_start, + .next = tlb_next, + .stop = tlb_stop, + .show = tlb_show, +}; + +static int tlb_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &tlb_ops); +} + +static struct file_operations proc_tlb_operations = { + .open = tlb_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + +static int __init proctlb_init(void) +{ + struct proc_dir_entry *entry; + + entry = create_proc_entry("tlb", 0, NULL); + if (entry) + entry->proc_fops = &proc_tlb_operations; + return 0; +} +late_initcall(proctlb_init); +#endif /* CONFIG_PROC_FS */ diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index 9c22b76..ebacf14 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c @@ -227,7 +227,7 @@ #endif /* call the real timer interrupt handler */ - do_timer(regs); + do_timer(1); cris_do_profile(regs); /* Save profiling information */ diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index 464ecae..2d0023f 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c @@ -28,6 +28,7 @@ spinlock_t cris_atomic_locks[] = { [0 .. /* CPU masks */ cpumask_t cpu_online_map = CPU_MASK_NONE; +EXPORT_SYMBOL(cpu_online_map); cpumask_t phys_cpu_present_map = CPU_MASK_NONE; EXPORT_SYMBOL(phys_cpu_present_map); diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c index 50f3f93..be0a016 100644 --- a/arch/cris/arch-v32/kernel/time.c +++ b/arch/cris/arch-v32/kernel/time.c @@ -219,7 +219,7 @@ timer_interrupt(int irq, void *dev_id, s return IRQ_HANDLED; /* call the real timer interrupt handler */ - do_timer(regs); + do_timer(1); /* * If we have an externally synchronized Linux clock, then update diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c index 7af3d5d..ca8b45a 100644 --- a/arch/cris/kernel/setup.c +++ b/arch/cris/kernel/setup.c @@ -160,7 +160,7 @@ #endif show_etrax_copyright(); /* Setup utsname */ - strcpy(system_utsname.machine, cris_machine_name); + strcpy(init_utsname()->machine, cris_machine_name); } static void *c_start(struct seq_file *m, loff_t *pos) diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c index 66ba889..0f9213c 100644 --- a/arch/cris/kernel/time.c +++ b/arch/cris/kernel/time.c @@ -37,7 +37,6 @@ int have_rtc; /* used to remember if we #define TICK_SIZE tick -extern unsigned long wall_jiffies; extern unsigned long loops_per_jiffy; /* init/main.c */ unsigned long loops_per_usec; @@ -58,11 +57,6 @@ void do_gettimeofday(struct timeval *tv) local_irq_save(flags); local_irq_disable(); usec = do_gettimeoffset(); - { - unsigned long lost = jiffies - wall_jiffies; - if (lost) - usec += lost * (1000000 / HZ); - } /* * If time_adjust is negative then NTP is slowing the clock @@ -103,7 +97,6 @@ int do_settimeofday(struct timespec *tv) * made, and then undo it! */ nsec -= do_gettimeoffset() * NSEC_PER_USEC; - nsec -= (jiffies - wall_jiffies) * TICK_NSEC; wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); diff --git a/arch/cris/mm/ioremap.c b/arch/cris/mm/ioremap.c index 1780df3..8b0b934 100644 --- a/arch/cris/mm/ioremap.c +++ b/arch/cris/mm/ioremap.c @@ -10,93 +10,10 @@ */ #include -#include +#include #include -#include -#include #include -static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, - unsigned long phys_addr, pgprot_t prot) -{ - unsigned long end; - - address &= ~PMD_MASK; - end = address + size; - if (end > PMD_SIZE) - end = PMD_SIZE; - if (address >= end) - BUG(); - do { - if (!pte_none(*pte)) { - printk("remap_area_pte: page already exists\n"); - BUG(); - } - set_pte(pte, mk_pte_phys(phys_addr, prot)); - address += PAGE_SIZE; - phys_addr += PAGE_SIZE; - pte++; - } while (address && (address < end)); -} - -static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, - unsigned long phys_addr, pgprot_t prot) -{ - unsigned long end; - - address &= ~PGDIR_MASK; - end = address + size; - if (end > PGDIR_SIZE) - end = PGDIR_SIZE; - phys_addr -= address; - if (address >= end) - BUG(); - do { - pte_t * pte = pte_alloc_kernel(pmd, address); - if (!pte) - return -ENOMEM; - remap_area_pte(pte, address, end - address, address + phys_addr, prot); - address = (address + PMD_SIZE) & PMD_MASK; - pmd++; - } while (address && (address < end)); - return 0; -} - -static int remap_area_pages(unsigned long address, unsigned long phys_addr, - unsigned long size, pgprot_t prot) -{ - int error; - pgd_t * dir; - unsigned long end = address + size; - - phys_addr -= address; - dir = pgd_offset(&init_mm, address); - flush_cache_all(); - if (address >= end) - BUG(); - do { - pud_t *pud; - pmd_t *pmd; - - error = -ENOMEM; - pud = pud_alloc(&init_mm, dir, address); - if (!pud) - break; - pmd = pmd_alloc(&init_mm, pud, address); - - if (!pmd) - break; - if (remap_area_pmd(pmd, address, end - address, - phys_addr + address, prot)) - break; - error = 0; - address = (address + PGDIR_SIZE) & PGDIR_MASK; - dir++; - } while (address && (address < end)); - flush_tlb_all(); - return error; -} - /* * Generic mapping function (not visible outside): */ @@ -135,7 +52,8 @@ void __iomem * __ioremap_prot(unsigned l if (!area) return NULL; addr = (void __iomem *)area->addr; - if (remap_area_pages((unsigned long) addr, phys_addr, size, prot)) { + if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, + phys_addr, prot)) { vfree((void __force *)addr); return NULL; } diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index a601a17..f7b171b 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig @@ -27,7 +27,11 @@ config GENERIC_CALIBRATE_DELAY config GENERIC_HARDIRQS bool - default n + default y + +config GENERIC_HARDIRQS_NO__DO_IRQ + bool + default y config GENERIC_TIME bool @@ -251,6 +255,12 @@ config MB93091_NO_MB endchoice endif +config FUJITSU_MB93493 + bool "MB93493 Multimedia chip" + help + Select this option if the MB93493 multimedia chip is going to be + used. + choice prompt "GP-Relative data support" default GPREL_DATA_8 diff --git a/arch/frv/Makefile b/arch/frv/Makefile index d163747..038e3a8 100644 --- a/arch/frv/Makefile +++ b/arch/frv/Makefile @@ -108,11 +108,8 @@ Image: vmlinux bootstrap: $(Q)$(MAKEBOOT) bootstrap -archmrproper: - $(Q)$(MAKE) $(build)=arch/frv/boot mrproper - archclean: - $(Q)$(MAKE) $(build)=arch/frv/boot clean + $(Q)$(MAKE) $(clean)=arch/frv/boot archdep: scripts/mkdep symlinks $(Q)$(MAKE) $(build)=arch/frv/boot dep diff --git a/arch/frv/boot/Makefile b/arch/frv/boot/Makefile index 5dfc93f..dc6f038 100644 --- a/arch/frv/boot/Makefile +++ b/arch/frv/boot/Makefile @@ -8,6 +8,8 @@ # # Copyright (C) 1995-2000 Russell King # +targets := Image zImage bootpImage + SYSTEM =$(TOPDIR)/$(LINUX) ZTEXTADDR = 0x02080000 @@ -66,7 +68,6 @@ # # miscellany # mrproper clean: - $(RM) Image zImage bootpImage # @$(MAKE) -C compressed clean # @$(MAKE) -C bootp clean diff --git a/arch/frv/kernel/Makefile b/arch/frv/kernel/Makefile index 5a827b3..e8f73ed 100644 --- a/arch/frv/kernel/Makefile +++ b/arch/frv/kernel/Makefile @@ -8,17 +8,16 @@ heads-$(CONFIG_MMU) := head-mmu-fr451.o extra-y:= head.o init_task.o vmlinux.lds obj-y := $(heads-y) entry.o entry-table.o break.o switch_to.o kernel_thread.o \ - process.o traps.o ptrace.o signal.o dma.o \ + kernel_execve.o process.o traps.o ptrace.o signal.o dma.o \ sys_frv.o time.o semaphore.o setup.o frv_ksyms.o \ - debug-stub.o irq.o irq-routing.o sleep.o uaccess.o + debug-stub.o irq.o sleep.o uaccess.o obj-$(CONFIG_GDBSTUB) += gdb-stub.o gdb-io.o obj-$(CONFIG_MB93091_VDK) += irq-mb93091.o -obj-$(CONFIG_MB93093_PDK) += irq-mb93093.o -obj-$(CONFIG_FUJITSU_MB93493) += irq-mb93493.o obj-$(CONFIG_PM) += pm.o cmode.o obj-$(CONFIG_MB93093_PDK) += pm-mb93093.o +obj-$(CONFIG_FUJITSU_MB93493) += irq-mb93493.o obj-$(CONFIG_SYSCTL) += sysctl.o obj-$(CONFIG_FUTEX) += futex.o obj-$(CONFIG_MODULES) += module.o diff --git a/arch/frv/kernel/irq-mb93091.c b/arch/frv/kernel/irq-mb93091.c index 1381abc..369bc0a 100644 --- a/arch/frv/kernel/irq-mb93091.c +++ b/arch/frv/kernel/irq-mb93091.c @@ -24,7 +24,6 @@ #include #include #include #include -#include #define __reg16(ADDR) (*(volatile unsigned short *)(ADDR)) @@ -33,83 +32,131 @@ #define __set_IMR(M) do { __reg16(0xffc0 #define __get_IFR() ({ __reg16(0xffc0000c); }) #define __clr_IFR(M) do { __reg16(0xffc0000c) = ~(M); wmb(); } while(0) -static void frv_fpga_doirq(struct irq_source *source); -static void frv_fpga_control(struct irq_group *group, int irq, int on); -/*****************************************************************************/ /* - * FPGA IRQ multiplexor + * on-motherboard FPGA PIC operations */ -static struct irq_source frv_fpga[4] = { -#define __FPGA(X, M) \ - [X] = { \ - .muxname = "fpga."#X, \ - .irqmask = M, \ - .doirq = frv_fpga_doirq, \ - } +static void frv_fpga_mask(unsigned int irq) +{ + uint16_t imr = __get_IMR(); - __FPGA(0, 0x0028), - __FPGA(1, 0x0050), - __FPGA(2, 0x1c00), - __FPGA(3, 0x6386), -}; + imr |= 1 << (irq - IRQ_BASE_FPGA); -static struct irq_group frv_fpga_irqs = { - .first_irq = IRQ_BASE_FPGA, - .control = frv_fpga_control, - .sources = { - [ 1] = &frv_fpga[3], - [ 2] = &frv_fpga[3], - [ 3] = &frv_fpga[0], - [ 4] = &frv_fpga[1], - [ 5] = &frv_fpga[0], - [ 6] = &frv_fpga[1], - [ 7] = &frv_fpga[3], - [ 8] = &frv_fpga[3], - [ 9] = &frv_fpga[3], - [10] = &frv_fpga[2], - [11] = &frv_fpga[2], - [12] = &frv_fpga[2], - [13] = &frv_fpga[3], - [14] = &frv_fpga[3], - }, -}; + __set_IMR(imr); +} +static void frv_fpga_ack(unsigned int irq) +{ + __clr_IFR(1 << (irq - IRQ_BASE_FPGA)); +} -static void frv_fpga_control(struct irq_group *group, int index, int on) +static void frv_fpga_mask_ack(unsigned int irq) { uint16_t imr = __get_IMR(); - if (on) - imr &= ~(1 << index); - else - imr |= 1 << index; + imr |= 1 << (irq - IRQ_BASE_FPGA); + __set_IMR(imr); + + __clr_IFR(1 << (irq - IRQ_BASE_FPGA)); +} + +static void frv_fpga_unmask(unsigned int irq) +{ + uint16_t imr = __get_IMR(); + + imr &= ~(1 << (irq - IRQ_BASE_FPGA)); __set_IMR(imr); } -static void frv_fpga_doirq(struct irq_source *source) +static struct irq_chip frv_fpga_pic = { + .name = "mb93091", + .ack = frv_fpga_ack, + .mask = frv_fpga_mask, + .mask_ack = frv_fpga_mask_ack, + .unmask = frv_fpga_unmask, +}; + +/* + * FPGA PIC interrupt handler + */ +static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs) { - uint16_t mask, imr; + uint16_t imr, mask = (unsigned long) _mask; imr = __get_IMR(); - mask = source->irqmask & ~imr & __get_IFR(); - if (mask) { - __set_IMR(imr | mask); - __clr_IFR(mask); - distribute_irqs(&frv_fpga_irqs, mask); - __set_IMR(imr); + mask = mask & ~imr & __get_IFR(); + + /* poll all the triggered IRQs */ + while (mask) { + int irq; + + asm("scan %1,gr0,%0" : "=r"(irq) : "r"(mask)); + irq = 31 - irq; + mask &= ~(1 << irq); + + generic_handle_irq(IRQ_BASE_FPGA + irq, regs); } + + return IRQ_HANDLED; } +/* + * define an interrupt action for each FPGA PIC output + * - use dev_id to indicate the FPGA PIC input to output mappings + */ +static struct irqaction fpga_irq[4] = { + [0] = { + .handler = fpga_interrupt, + .flags = IRQF_DISABLED | IRQF_SHARED, + .mask = CPU_MASK_NONE, + .name = "fpga.0", + .dev_id = (void *) 0x0028UL, + }, + [1] = { + .handler = fpga_interrupt, + .flags = IRQF_DISABLED | IRQF_SHARED, + .mask = CPU_MASK_NONE, + .name = "fpga.1", + .dev_id = (void *) 0x0050UL, + }, + [2] = { + .handler = fpga_interrupt, + .flags = IRQF_DISABLED | IRQF_SHARED, + .mask = CPU_MASK_NONE, + .name = "fpga.2", + .dev_id = (void *) 0x1c00UL, + }, + [3] = { + .handler = fpga_interrupt, + .flags = IRQF_DISABLED | IRQF_SHARED, + .mask = CPU_MASK_NONE, + .name = "fpga.3", + .dev_id = (void *) 0x6386UL, + } +}; + +/* + * initialise the motherboard FPGA's PIC + */ void __init fpga_init(void) { + int irq; + + /* all PIC inputs are all set to be low-level driven, apart from the + * NMI button (15) which is fixed at falling-edge + */ __set_IMR(0x7ffe); __clr_IFR(0x0000); - frv_irq_route_external(&frv_fpga[0], IRQ_CPU_EXTERNAL0); - frv_irq_route_external(&frv_fpga[1], IRQ_CPU_EXTERNAL1); - frv_irq_route_external(&frv_fpga[2], IRQ_CPU_EXTERNAL2); - frv_irq_route_external(&frv_fpga[3], IRQ_CPU_EXTERNAL3); - frv_irq_set_group(&frv_fpga_irqs); + for (irq = IRQ_BASE_FPGA + 1; irq <= IRQ_BASE_FPGA + 14; irq++) + set_irq_chip_and_handler(irq, &frv_fpga_pic, handle_level_irq); + + set_irq_chip_and_handler(IRQ_FPGA_NMI, &frv_fpga_pic, handle_edge_irq); + + /* the FPGA drives the first four external IRQ inputs on the CPU PIC */ + setup_irq(IRQ_CPU_EXTERNAL0, &fpga_irq[0]); + setup_irq(IRQ_CPU_EXTERNAL1, &fpga_irq[1]); + setup_irq(IRQ_CPU_EXTERNAL2, &fpga_irq[2]); + setup_irq(IRQ_CPU_EXTERNAL3, &fpga_irq[3]); } diff --git a/arch/frv/kernel/irq-mb93093.c b/arch/frv/kernel/irq-mb93093.c index 48b2a64..a43a221 100644 --- a/arch/frv/kernel/irq-mb93093.c +++ b/arch/frv/kernel/irq-mb93093.c @@ -1,6 +1,6 @@ /* irq-mb93093.c: MB93093 FPGA interrupt handling * - * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. + * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ #include #include #include #include -#include #define __reg16(ADDR) (*(volatile unsigned short *)(__region_CS2 + (ADDR))) @@ -33,66 +32,102 @@ #define __set_IMR(M) do { __reg16(0x0a) #define __get_IFR() ({ __reg16(0x02); }) #define __clr_IFR(M) do { __reg16(0x02) = ~(M); wmb(); } while(0) -static void frv_fpga_doirq(struct irq_source *source); -static void frv_fpga_control(struct irq_group *group, int irq, int on); - -/*****************************************************************************/ /* - * FPGA IRQ multiplexor + * off-CPU FPGA PIC operations */ -static struct irq_source frv_fpga[4] = { -#define __FPGA(X, M) \ - [X] = { \ - .muxname = "fpga."#X, \ - .irqmask = M, \ - .doirq = frv_fpga_doirq, \ - } +static void frv_fpga_mask(unsigned int irq) +{ + uint16_t imr = __get_IMR(); - __FPGA(0, 0x0700), -}; + imr |= 1 << (irq - IRQ_BASE_FPGA); + __set_IMR(imr); +} -static struct irq_group frv_fpga_irqs = { - .first_irq = IRQ_BASE_FPGA, - .control = frv_fpga_control, - .sources = { - [ 8] = &frv_fpga[0], - [ 9] = &frv_fpga[0], - [10] = &frv_fpga[0], - }, -}; +static void frv_fpga_ack(unsigned int irq) +{ + __clr_IFR(1 << (irq - IRQ_BASE_FPGA)); +} + +static void frv_fpga_mask_ack(unsigned int irq) +{ + uint16_t imr = __get_IMR(); + imr |= 1 << (irq - IRQ_BASE_FPGA); + __set_IMR(imr); + + __clr_IFR(1 << (irq - IRQ_BASE_FPGA)); +} -static void frv_fpga_control(struct irq_group *group, int index, int on) +static void frv_fpga_unmask(unsigned int irq) { uint16_t imr = __get_IMR(); - if (on) - imr &= ~(1 << index); - else - imr |= 1 << index; + imr &= ~(1 << (irq - IRQ_BASE_FPGA)); __set_IMR(imr); } -static void frv_fpga_doirq(struct irq_source *source) +static struct irq_chip frv_fpga_pic = { + .name = "mb93093", + .ack = frv_fpga_ack, + .mask = frv_fpga_mask, + .mask_ack = frv_fpga_mask_ack, + .unmask = frv_fpga_unmask, + .end = frv_fpga_end, +}; + +/* + * FPGA PIC interrupt handler + */ +static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs) { - uint16_t mask, imr; + uint16_t imr, mask = (unsigned long) _mask; imr = __get_IMR(); - mask = source->irqmask & ~imr & __get_IFR(); - if (mask) { - __set_IMR(imr | mask); - __clr_IFR(mask); - distribute_irqs(&frv_fpga_irqs, mask); - __set_IMR(imr); + mask = mask & ~imr & __get_IFR(); + + /* poll all the triggered IRQs */ + while (mask) { + int irq; + + asm("scan %1,gr0,%0" : "=r"(irq) : "r"(mask)); + irq = 31 - irq; + mask &= ~(1 << irq); + + generic_irq_handle(IRQ_BASE_FPGA + irq, regs); } + + return IRQ_HANDLED; } +/* + * define an interrupt action for each FPGA PIC output + * - use dev_id to indicate the FPGA PIC input to output mappings + */ +static struct irqaction fpga_irq[1] = { + [0] = { + .handler = fpga_interrupt, + .flags = IRQF_DISABLED, + .mask = CPU_MASK_NONE, + .name = "fpga.0", + .dev_id = (void *) 0x0700UL, + } +}; + +/* + * initialise the motherboard FPGA's PIC + */ void __init fpga_init(void) { + int irq; + + /* all PIC inputs are all set to be edge triggered */ __set_IMR(0x0700); __clr_IFR(0x0000); - frv_irq_route_external(&frv_fpga[0], IRQ_CPU_EXTERNAL2); - frv_irq_set_group(&frv_fpga_irqs); + for (irq = IRQ_BASE_FPGA + 8; irq <= IRQ_BASE_FPGA + 10; irq++) + set_irq_chip_and_handler(irq, &frv_fpga_pic, handle_edge_irq); + + /* the FPGA drives external IRQ input #2 on the CPU PIC */ + setup_irq(IRQ_CPU_EXTERNAL2, &fpga_irq[0]); } diff --git a/arch/frv/kernel/irq-mb93493.c b/arch/frv/kernel/irq-mb93493.c index 988d035..39c0188 100644 --- a/arch/frv/kernel/irq-mb93493.c +++ b/arch/frv/kernel/irq-mb93493.c @@ -1,6 +1,6 @@ /* irq-mb93493.c: MB93493 companion chip interrupt handler * - * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. + * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or @@ -24,84 +24,126 @@ #include #include #include #include -#include #include +#include -static void frv_mb93493_doirq(struct irq_source *source); +#define IRQ_ROUTE_ONE(X) (X##_ROUTE << (X - IRQ_BASE_MB93493)) + +#define IRQ_ROUTING \ + (IRQ_ROUTE_ONE(IRQ_MB93493_VDC) | \ + IRQ_ROUTE_ONE(IRQ_MB93493_VCC) | \ + IRQ_ROUTE_ONE(IRQ_MB93493_AUDIO_OUT) | \ + IRQ_ROUTE_ONE(IRQ_MB93493_I2C_0) | \ + IRQ_ROUTE_ONE(IRQ_MB93493_I2C_1) | \ + IRQ_ROUTE_ONE(IRQ_MB93493_USB) | \ + IRQ_ROUTE_ONE(IRQ_MB93493_LOCAL_BUS) | \ + IRQ_ROUTE_ONE(IRQ_MB93493_PCMCIA) | \ + IRQ_ROUTE_ONE(IRQ_MB93493_GPIO) | \ + IRQ_ROUTE_ONE(IRQ_MB93493_AUDIO_IN)) -/*****************************************************************************/ /* - * MB93493 companion chip IRQ multiplexor + * daughter board PIC operations + * - there is no way to ACK interrupts in the MB93493 chip */ -static struct irq_source frv_mb93493[2] = { - [0] = { - .muxname = "mb93493.0", - .muxdata = __region_CS3 + 0x3d0, - .doirq = frv_mb93493_doirq, - .irqmask = 0x0000, - }, - [1] = { - .muxname = "mb93493.1", - .muxdata = __region_CS3 + 0x3d4, - .doirq = frv_mb93493_doirq, - .irqmask = 0x0000, - }, -}; - -static void frv_mb93493_control(struct irq_group *group, int index, int on) +static void frv_mb93493_mask(unsigned int irq) { - struct irq_source *source; uint32_t iqsr; + volatile void *piqsr; - if ((frv_mb93493[0].irqmask & (1 << index))) - source = &frv_mb93493[0]; + if (IRQ_ROUTING & (1 << (irq - IRQ_BASE_MB93493))) + piqsr = __addr_MB93493_IQSR(1); else - source = &frv_mb93493[1]; + piqsr = __addr_MB93493_IQSR(0); + + iqsr = readl(piqsr); + iqsr &= ~(1 << (irq - IRQ_BASE_MB93493 + 16)); + writel(iqsr, piqsr); +} - iqsr = readl(source->muxdata); - if (on) - iqsr |= 1 << (index + 16); +static void frv_mb93493_ack(unsigned int irq) +{ +} + +static void frv_mb93493_unmask(unsigned int irq) +{ + uint32_t iqsr; + volatile void *piqsr; + + if (IRQ_ROUTING & (1 << (irq - IRQ_BASE_MB93493))) + piqsr = __addr_MB93493_IQSR(1); else - iqsr &= ~(1 << (index + 16)); + piqsr = __addr_MB93493_IQSR(0); - writel(iqsr, source->muxdata); + iqsr = readl(piqsr); + iqsr |= 1 << (irq - IRQ_BASE_MB93493 + 16); + writel(iqsr, piqsr); } -static struct irq_group frv_mb93493_irqs = { - .first_irq = IRQ_BASE_MB93493, - .control = frv_mb93493_control, +static struct irq_chip frv_mb93493_pic = { + .name = "mb93093", + .ack = frv_mb93493_ack, + .mask = frv_mb93493_mask, + .mask_ack = frv_mb93493_mask, + .unmask = frv_mb93493_unmask, }; -static void frv_mb93493_doirq(struct irq_source *source) +/* + * MB93493 PIC interrupt handler + */ +static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs) { - uint32_t mask = readl(source->muxdata); - mask = mask & (mask >> 16) & 0xffff; + volatile void *piqsr = _piqsr; + uint32_t iqsr; - if (mask) - distribute_irqs(&frv_mb93493_irqs, mask); -} + iqsr = readl(piqsr); + iqsr = iqsr & (iqsr >> 16) & 0xffff; -static void __init mb93493_irq_route(int irq, int source) -{ - frv_mb93493[source].irqmask |= 1 << (irq - IRQ_BASE_MB93493); - frv_mb93493_irqs.sources[irq - IRQ_BASE_MB93493] = &frv_mb93493[source]; + /* poll all the triggered IRQs */ + while (iqsr) { + int irq; + + asm("scan %1,gr0,%0" : "=r"(irq) : "r"(iqsr)); + irq = 31 - irq; + iqsr &= ~(1 << irq); + + generic_handle_irq(IRQ_BASE_MB93493 + irq, regs); + } + + return IRQ_HANDLED; } -void __init route_mb93493_irqs(void) +/* + * define an interrupt action for each MB93493 PIC output + * - use dev_id to indicate the MB93493 PIC input to output mappings + */ +static struct irqaction mb93493_irq[2] = { + [0] = { + .handler = mb93493_interrupt, + .flags = IRQF_DISABLED | IRQF_SHARED, + .mask = CPU_MASK_NONE, + .name = "mb93493.0", + .dev_id = (void *) __addr_MB93493_IQSR(0), + }, + [1] = { + .handler = mb93493_interrupt, + .flags = IRQF_DISABLED | IRQF_SHARED, + .mask = CPU_MASK_NONE, + .name = "mb93493.1", + .dev_id = (void *) __addr_MB93493_IQSR(1), + } +}; + +/* + * initialise the motherboard MB93493's PIC + */ +void __init mb93493_init(void) { - frv_irq_route_external(&frv_mb93493[0], IRQ_CPU_MB93493_0); - frv_irq_route_external(&frv_mb93493[1], IRQ_CPU_MB93493_1); - - frv_irq_set_group(&frv_mb93493_irqs); - - mb93493_irq_route(IRQ_MB93493_VDC, IRQ_MB93493_VDC_ROUTE); - mb93493_irq_route(IRQ_MB93493_VCC, IRQ_MB93493_VCC_ROUTE); - mb93493_irq_route(IRQ_MB93493_AUDIO_IN, IRQ_MB93493_AUDIO_IN_ROUTE); - mb93493_irq_route(IRQ_MB93493_I2C_0, IRQ_MB93493_I2C_0_ROUTE); - mb93493_irq_route(IRQ_MB93493_I2C_1, IRQ_MB93493_I2C_1_ROUTE); - mb93493_irq_route(IRQ_MB93493_USB, IRQ_MB93493_USB_ROUTE); - mb93493_irq_route(IRQ_MB93493_LOCAL_BUS, IRQ_MB93493_LOCAL_BUS_ROUTE); - mb93493_irq_route(IRQ_MB93493_PCMCIA, IRQ_MB93493_PCMCIA_ROUTE); - mb93493_irq_route(IRQ_MB93493_GPIO, IRQ_MB93493_GPIO_ROUTE); - mb93493_irq_route(IRQ_MB93493_AUDIO_OUT, IRQ_MB93493_AUDIO_OUT_ROUTE); + int irq; + + for (irq = IRQ_BASE_MB93493 + 0; irq <= IRQ_BASE_MB93493 + 10; irq++) + set_irq_chip_and_handler(irq, &frv_mb93493_pic, handle_edge_irq); + + /* the MB93493 drives external IRQ inputs on the CPU PIC */ + setup_irq(IRQ_CPU_MB93493_0, &mb93493_irq[0]); + setup_irq(IRQ_CPU_MB93493_1, &mb93493_irq[1]); } diff --git a/arch/frv/kernel/irq-routing.c b/arch/frv/kernel/irq-routing.c deleted file mode 100644 index 53886ad..0000000 --- a/arch/frv/kernel/irq-routing.c +++ /dev/null @@ -1,291 +0,0 @@ -/* irq-routing.c: IRQ routing - * - * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@redhat.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct irq_level frv_irq_levels[16] = { - [0 ... 15] = { - .lock = SPIN_LOCK_UNLOCKED, - } -}; - -struct irq_group *irq_groups[NR_IRQ_GROUPS]; - -extern struct irq_group frv_cpu_irqs; - -void __init frv_irq_route(struct irq_source *source, int irqlevel) -{ - source->level = &frv_irq_levels[irqlevel]; - source->next = frv_irq_levels[irqlevel].sources; - frv_irq_levels[irqlevel].sources = source; -} - -void __init frv_irq_route_external(struct irq_source *source, int irq) -{ - int irqlevel = 0; - - switch (irq) { - case IRQ_CPU_EXTERNAL0: irqlevel = IRQ_XIRQ0_LEVEL; break; - case IRQ_CPU_EXTERNAL1: irqlevel = IRQ_XIRQ1_LEVEL; break; - case IRQ_CPU_EXTERNAL2: irqlevel = IRQ_XIRQ2_LEVEL; break; - case IRQ_CPU_EXTERNAL3: irqlevel = IRQ_XIRQ3_LEVEL; break; - case IRQ_CPU_EXTERNAL4: irqlevel = IRQ_XIRQ4_LEVEL; break; - case IRQ_CPU_EXTERNAL5: irqlevel = IRQ_XIRQ5_LEVEL; break; - case IRQ_CPU_EXTERNAL6: irqlevel = IRQ_XIRQ6_LEVEL; break; - case IRQ_CPU_EXTERNAL7: irqlevel = IRQ_XIRQ7_LEVEL; break; - default: BUG(); - } - - source->level = &frv_irq_levels[irqlevel]; - source->next = frv_irq_levels[irqlevel].sources; - frv_irq_levels[irqlevel].sources = source; -} - -void __init frv_irq_set_group(struct irq_group *group) -{ - irq_groups[group->first_irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP] = group; -} - -void distribute_irqs(struct irq_group *group, unsigned long irqmask) -{ - struct irqaction *action; - int irq; - - while (irqmask) { - asm("scan %1,gr0,%0" : "=r"(irq) : "r"(irqmask)); - if (irq < 0 || irq > 31) - asm volatile("break"); - irq = 31 - irq; - - irqmask &= ~(1 << irq); - action = group->actions[irq]; - - irq += group->first_irq; - - if (action) { - int status = 0; - -// if (!(action->flags & IRQF_DISABLED)) -// local_irq_enable(); - - do { - status |= action->flags; - action->handler(irq, action->dev_id, __frame); - action = action->next; - } while (action); - - if (status & IRQF_SAMPLE_RANDOM) - add_interrupt_randomness(irq); - local_irq_disable(); - } - } -} - -/*****************************************************************************/ -/* - * CPU UART interrupts - */ -static void frv_cpuuart_doirq(struct irq_source *source) -{ -// uint8_t iir = readb(source->muxdata + UART_IIR * 8); -// if ((iir & 0x0f) != UART_IIR_NO_INT) - distribute_irqs(&frv_cpu_irqs, source->irqmask); -} - -struct irq_source frv_cpuuart[2] = { -#define __CPUUART(X, A) \ - [X] = { \ - .muxname = "uart", \ - .muxdata = (volatile void __iomem *)(unsigned long)A,\ - .irqmask = 1 << IRQ_CPU_UART##X, \ - .doirq = frv_cpuuart_doirq, \ - } - - __CPUUART(0, UART0_BASE), - __CPUUART(1, UART1_BASE), -}; - -/*****************************************************************************/ -/* - * CPU DMA interrupts - */ -static void frv_cpudma_doirq(struct irq_source *source) -{ - uint32_t cstr = readl(source->muxdata + DMAC_CSTRx); - if (cstr & DMAC_CSTRx_INT) - distribute_irqs(&frv_cpu_irqs, source->irqmask); -} - -struct irq_source frv_cpudma[8] = { -#define __CPUDMA(X, A) \ - [X] = { \ - .muxname = "dma", \ - .muxdata = (volatile void __iomem *)(unsigned long)A,\ - .irqmask = 1 << IRQ_CPU_DMA##X, \ - .doirq = frv_cpudma_doirq, \ - } - - __CPUDMA(0, 0xfe000900), - __CPUDMA(1, 0xfe000980), - __CPUDMA(2, 0xfe000a00), - __CPUDMA(3, 0xfe000a80), - __CPUDMA(4, 0xfe001000), - __CPUDMA(5, 0xfe001080), - __CPUDMA(6, 0xfe001100), - __CPUDMA(7, 0xfe001180), -}; - -/*****************************************************************************/ -/* - * CPU timer interrupts - can't tell whether they've generated an interrupt or not - */ -static void frv_cputimer_doirq(struct irq_source *source) -{ - distribute_irqs(&frv_cpu_irqs, source->irqmask); -} - -struct irq_source frv_cputimer[3] = { -#define __CPUTIMER(X) \ - [X] = { \ - .muxname = "timer", \ - .muxdata = NULL, \ - .irqmask = 1 << IRQ_CPU_TIMER##X, \ - .doirq = frv_cputimer_doirq, \ - } - - __CPUTIMER(0), - __CPUTIMER(1), - __CPUTIMER(2), -}; - -/*****************************************************************************/ -/* - * external CPU interrupts - can't tell directly whether they've generated an interrupt or not - */ -static void frv_cpuexternal_doirq(struct irq_source *source) -{ - distribute_irqs(&frv_cpu_irqs, source->irqmask); -} - -struct irq_source frv_cpuexternal[8] = { -#define __CPUEXTERNAL(X) \ - [X] = { \ - .muxname = "ext", \ - .muxdata = NULL, \ - .irqmask = 1 << IRQ_CPU_EXTERNAL##X, \ - .doirq = frv_cpuexternal_doirq, \ - } - - __CPUEXTERNAL(0), - __CPUEXTERNAL(1), - __CPUEXTERNAL(2), - __CPUEXTERNAL(3), - __CPUEXTERNAL(4), - __CPUEXTERNAL(5), - __CPUEXTERNAL(6), - __CPUEXTERNAL(7), -}; - -#define set_IRR(N,A,B,C,D) __set_IRR(N, (A << 28) | (B << 24) | (C << 20) | (D << 16)) - -struct irq_group frv_cpu_irqs = { - .sources = { - [IRQ_CPU_UART0] = &frv_cpuuart[0], - [IRQ_CPU_UART1] = &frv_cpuuart[1], - [IRQ_CPU_TIMER0] = &frv_cputimer[0], - [IRQ_CPU_TIMER1] = &frv_cputimer[1], - [IRQ_CPU_TIMER2] = &frv_cputimer[2], - [IRQ_CPU_DMA0] = &frv_cpudma[0], - [IRQ_CPU_DMA1] = &frv_cpudma[1], - [IRQ_CPU_DMA2] = &frv_cpudma[2], - [IRQ_CPU_DMA3] = &frv_cpudma[3], - [IRQ_CPU_DMA4] = &frv_cpudma[4], - [IRQ_CPU_DMA5] = &frv_cpudma[5], - [IRQ_CPU_DMA6] = &frv_cpudma[6], - [IRQ_CPU_DMA7] = &frv_cpudma[7], - [IRQ_CPU_EXTERNAL0] = &frv_cpuexternal[0], - [IRQ_CPU_EXTERNAL1] = &frv_cpuexternal[1], - [IRQ_CPU_EXTERNAL2] = &frv_cpuexternal[2], - [IRQ_CPU_EXTERNAL3] = &frv_cpuexternal[3], - [IRQ_CPU_EXTERNAL4] = &frv_cpuexternal[4], - [IRQ_CPU_EXTERNAL5] = &frv_cpuexternal[5], - [IRQ_CPU_EXTERNAL6] = &frv_cpuexternal[6], - [IRQ_CPU_EXTERNAL7] = &frv_cpuexternal[7], - }, -}; - -/*****************************************************************************/ -/* - * route the CPU's interrupt sources - */ -void __init route_cpu_irqs(void) -{ - frv_irq_set_group(&frv_cpu_irqs); - - __set_IITMR(0, 0x003f0000); /* DMA0-3, TIMER0-2 IRQ detect levels */ - __set_IITMR(1, 0x20000000); /* ERR0-1, UART0-1, DMA4-7 IRQ detect levels */ - - /* route UART and error interrupts */ - frv_irq_route(&frv_cpuuart[0], IRQ_UART0_LEVEL); - frv_irq_route(&frv_cpuuart[1], IRQ_UART1_LEVEL); - - set_IRR(6, IRQ_GDBSTUB_LEVEL, IRQ_GDBSTUB_LEVEL, IRQ_UART1_LEVEL, IRQ_UART0_LEVEL); - - /* route DMA channel interrupts */ - frv_irq_route(&frv_cpudma[0], IRQ_DMA0_LEVEL); - frv_irq_route(&frv_cpudma[1], IRQ_DMA1_LEVEL); - frv_irq_route(&frv_cpudma[2], IRQ_DMA2_LEVEL); - frv_irq_route(&frv_cpudma[3], IRQ_DMA3_LEVEL); - frv_irq_route(&frv_cpudma[4], IRQ_DMA4_LEVEL); - frv_irq_route(&frv_cpudma[5], IRQ_DMA5_LEVEL); - frv_irq_route(&frv_cpudma[6], IRQ_DMA6_LEVEL); - frv_irq_route(&frv_cpudma[7], IRQ_DMA7_LEVEL); - - set_IRR(4, IRQ_DMA3_LEVEL, IRQ_DMA2_LEVEL, IRQ_DMA1_LEVEL, IRQ_DMA0_LEVEL); - set_IRR(7, IRQ_DMA7_LEVEL, IRQ_DMA6_LEVEL, IRQ_DMA5_LEVEL, IRQ_DMA4_LEVEL); - - /* route timer interrupts */ - frv_irq_route(&frv_cputimer[0], IRQ_TIMER0_LEVEL); - frv_irq_route(&frv_cputimer[1], IRQ_TIMER1_LEVEL); - frv_irq_route(&frv_cputimer[2], IRQ_TIMER2_LEVEL); - - set_IRR(5, 0, IRQ_TIMER2_LEVEL, IRQ_TIMER1_LEVEL, IRQ_TIMER0_LEVEL); - - /* route external interrupts */ - frv_irq_route(&frv_cpuexternal[0], IRQ_XIRQ0_LEVEL); - frv_irq_route(&frv_cpuexternal[1], IRQ_XIRQ1_LEVEL); - frv_irq_route(&frv_cpuexternal[2], IRQ_XIRQ2_LEVEL); - frv_irq_route(&frv_cpuexternal[3], IRQ_XIRQ3_LEVEL); - frv_irq_route(&frv_cpuexternal[4], IRQ_XIRQ4_LEVEL); - frv_irq_route(&frv_cpuexternal[5], IRQ_XIRQ5_LEVEL); - frv_irq_route(&frv_cpuexternal[6], IRQ_XIRQ6_LEVEL); - frv_irq_route(&frv_cpuexternal[7], IRQ_XIRQ7_LEVEL); - - set_IRR(2, IRQ_XIRQ7_LEVEL, IRQ_XIRQ6_LEVEL, IRQ_XIRQ5_LEVEL, IRQ_XIRQ4_LEVEL); - set_IRR(3, IRQ_XIRQ3_LEVEL, IRQ_XIRQ2_LEVEL, IRQ_XIRQ1_LEVEL, IRQ_XIRQ0_LEVEL); - -#if defined(CONFIG_MB93091_VDK) - __set_TM1(0x55550000); /* XIRQ7-0 all active low */ -#elif defined(CONFIG_MB93093_PDK) - __set_TM1(0x15550000); /* XIRQ7 active high, 6-0 all active low */ -#else -#error dont know external IRQ trigger levels for this setup -#endif - -} /* end route_cpu_irqs() */ diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index 0896701..5ac041c 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c @@ -1,6 +1,6 @@ /* irq.c: FRV IRQ handling * - * Copyright (C) 2003, 2004 Red Hat, Inc. All Rights Reserved. + * Copyright (C) 2003, 2004, 2006 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or @@ -9,13 +9,6 @@ * 2 of the License, or (at your option) any later version. */ -/* - * (mostly architecture independent, will move to kernel/irq.c in 2.5.) - * - * IRQs are in fact implemented a bit like signal handlers for the kernel. - * Naturally it's not a 1:1 relation, but there are similarities. - */ - #include #include #include @@ -43,19 +36,16 @@ #include #include #include #include -#include #include -extern void __init fpga_init(void); -extern void __init route_mb93493_irqs(void); - -static void register_irq_proc (unsigned int irq); +#define set_IRR(N,A,B,C,D) __set_IRR(N, (A << 28) | (B << 24) | (C << 20) | (D << 16)) -/* - * Special irq handlers. - */ +extern void __init fpga_init(void); +#ifdef CONFIG_FUJITSU_MB93493 +extern void __init mb93493_init(void); +#endif -irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs) { return IRQ_HANDLED; } +#define __reg16(ADDR) (*(volatile unsigned short *)(ADDR)) atomic_t irq_err_count; @@ -64,215 +54,86 @@ atomic_t irq_err_count; */ int show_interrupts(struct seq_file *p, void *v) { - struct irqaction *action; - struct irq_group *group; + int i = *(loff_t *) v, cpu; + struct irqaction * action; unsigned long flags; - int level, grp, ix, i, j; - - i = *(loff_t *) v; - - switch (i) { - case 0: - seq_printf(p, " "); - for_each_online_cpu(j) - seq_printf(p, "CPU%d ",j); - - seq_putc(p, '\n'); - break; - case 1 ... NR_IRQ_GROUPS * NR_IRQ_ACTIONS_PER_GROUP: - local_irq_save(flags); - - grp = (i - 1) / NR_IRQ_ACTIONS_PER_GROUP; - group = irq_groups[grp]; - if (!group) - goto skip; - - ix = (i - 1) % NR_IRQ_ACTIONS_PER_GROUP; - action = group->actions[ix]; - if (!action) - goto skip; - - seq_printf(p, "%3d: ", i - 1); - -#ifndef CONFIG_SMP - seq_printf(p, "%10u ", kstat_irqs(i)); -#else - for_each_online_cpu(j) - seq_printf(p, "%10u ", kstat_cpu(j).irqs[i - 1]); -#endif - - level = group->sources[ix]->level - frv_irq_levels; - - seq_printf(p, " %12s@%x", group->sources[ix]->muxname, level); - seq_printf(p, " %s", action->name); - - for (action = action->next; action; action = action->next) - seq_printf(p, ", %s", action->name); + if (i == 0) { + char cpuname[12]; + seq_printf(p, " "); + for_each_present_cpu(cpu) { + sprintf(cpuname, "CPU%d", cpu); + seq_printf(p, " %10s", cpuname); + } seq_putc(p, '\n'); -skip: - local_irq_restore(flags); - break; + } - case NR_IRQ_GROUPS * NR_IRQ_ACTIONS_PER_GROUP + 1: - seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); - break; + if (i < NR_IRQS) { + spin_lock_irqsave(&irq_desc[i].lock, flags); + action = irq_desc[i].action; + if (action) { + seq_printf(p, "%3d: ", i); + for_each_present_cpu(cpu) + seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]); + seq_printf(p, " %10s", irq_desc[i].chip->name ? : "-"); + seq_printf(p, " %s", action->name); + for (action = action->next; + action; + action = action->next) + seq_printf(p, ", %s", action->name); + + seq_putc(p, '\n'); + } - default: - break; + spin_unlock_irqrestore(&irq_desc[i].lock, flags); + } else if (i == NR_IRQS) { + seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); } return 0; } - /* - * Generic enable/disable code: this just calls - * down into the PIC-specific version for the actual - * hardware disable after having gotten the irq - * controller lock. + * on-CPU PIC operations */ - -/** - * disable_irq_nosync - disable an irq without waiting - * @irq: Interrupt to disable - * - * Disable the selected interrupt line. Disables and Enables are - * nested. - * Unlike disable_irq(), this function does not ensure existing - * instances of the IRQ handler have completed before returning. - * - * This function may be called from IRQ context. - */ - -void disable_irq_nosync(unsigned int irq) +static void frv_cpupic_ack(unsigned int irqlevel) { - struct irq_source *source; - struct irq_group *group; - struct irq_level *level; - unsigned long flags; - int idx = irq & (NR_IRQ_ACTIONS_PER_GROUP - 1); - - group = irq_groups[irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP]; - if (!group) - BUG(); - - source = group->sources[idx]; - if (!source) - BUG(); - - level = source->level; - - spin_lock_irqsave(&level->lock, flags); - - if (group->control) { - if (!group->disable_cnt[idx]++) - group->control(group, idx, 0); - } else if (!level->disable_count++) { - __set_MASK(level - frv_irq_levels); - } - - spin_unlock_irqrestore(&level->lock, flags); + __clr_RC(irqlevel); + __clr_IRL(); } -EXPORT_SYMBOL(disable_irq_nosync); - -/** - * disable_irq - disable an irq and wait for completion - * @irq: Interrupt to disable - * - * Disable the selected interrupt line. Enables and Disables are - * nested. - * This function waits for any pending IRQ handlers for this interrupt - * to complete before returning. If you use this function while - * holding a resource the IRQ handler may need you will deadlock. - * - * This function may be called - with care - from IRQ context. - */ - -void disable_irq(unsigned int irq) +static void frv_cpupic_mask(unsigned int irqlevel) { - disable_irq_nosync(irq); - -#ifdef CONFIG_SMP - if (!local_irq_count(smp_processor_id())) { - do { - barrier(); - } while (irq_desc[irq].status & IRQ_INPROGRESS); - } -#endif + __set_MASK(irqlevel); } -EXPORT_SYMBOL(disable_irq); - -/** - * enable_irq - enable handling of an irq - * @irq: Interrupt to enable - * - * Undoes the effect of one call to disable_irq(). If this - * matches the last disable, processing of interrupts on this - * IRQ line is re-enabled. - * - * This function may be called from IRQ context. - */ - -void enable_irq(unsigned int irq) +static void frv_cpupic_mask_ack(unsigned int irqlevel) { - struct irq_source *source; - struct irq_group *group; - struct irq_level *level; - unsigned long flags; - int idx = irq & (NR_IRQ_ACTIONS_PER_GROUP - 1); - int count; - - group = irq_groups[irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP]; - if (!group) - BUG(); - - source = group->sources[idx]; - if (!source) - BUG(); - - level = source->level; - - spin_lock_irqsave(&level->lock, flags); - - if (group->control) - count = group->disable_cnt[idx]; - else - count = level->disable_count; - - switch (count) { - case 1: - if (group->control) { - if (group->actions[idx]) - group->control(group, idx, 1); - } else { - if (level->usage) - __clr_MASK(level - frv_irq_levels); - } - /* fall-through */ - - default: - count--; - break; - - case 0: - printk("enable_irq(%u) unbalanced from %p\n", irq, __builtin_return_address(0)); - } + __set_MASK(irqlevel); + __clr_RC(irqlevel); + __clr_IRL(); +} - if (group->control) - group->disable_cnt[idx] = count; - else - level->disable_count = count; +static void frv_cpupic_unmask(unsigned int irqlevel) +{ + __clr_MASK(irqlevel); +} - spin_unlock_irqrestore(&level->lock, flags); +static void frv_cpupic_end(unsigned int irqlevel) +{ + __clr_MASK(irqlevel); } -EXPORT_SYMBOL(enable_irq); +static struct irq_chip frv_cpu_pic = { + .name = "cpu", + .ack = frv_cpupic_ack, + .mask = frv_cpupic_mask, + .mask_ack = frv_cpupic_mask_ack, + .unmask = frv_cpupic_unmask, + .end = frv_cpupic_end, +}; -/*****************************************************************************/ /* * handles all normal device IRQ's * - registers are referred to by the __frame variable (GR28) @@ -281,463 +142,65 @@ EXPORT_SYMBOL(enable_irq); */ asmlinkage void do_IRQ(void) { - struct irq_source *source; - int level, cpu; - irq_enter(); - - level = (__frame->tbr >> 4) & 0xf; - cpu = smp_processor_id(); - - if ((unsigned long) __frame - (unsigned long) (current + 1) < 512) - BUG(); - - __set_MASK(level); - __clr_RC(level); - __clr_IRL(); - - kstat_this_cpu.irqs[level]++; - - for (source = frv_irq_levels[level].sources; source; source = source->next) - source->doirq(source); - - __clr_MASK(level); - + generic_handle_irq(__get_IRL(), __frame); irq_exit(); +} -} /* end do_IRQ() */ - -/*****************************************************************************/ /* * handles all NMIs when not co-opted by the debugger * - registers are referred to by the __frame variable (GR28) */ asmlinkage void do_NMI(void) { -} /* end do_NMI() */ - -/*****************************************************************************/ -/** - * request_irq - allocate an interrupt line - * @irq: Interrupt line to allocate - * @handler: Function to be called when the IRQ occurs - * @irqflags: Interrupt type flags - * @devname: An ascii name for the claiming device - * @dev_id: A cookie passed back to the handler function - * - * This call allocates interrupt resources and enables the - * interrupt line and IRQ handling. From the point this - * call is made your handler function may be invoked. Since - * your handler function must clear any interrupt the board - * raises, you must take care both to initialise your hardware - * and to set up the interrupt handler in the right order. - * - * Dev_id must be globally unique. Normally the address of the - * device data structure is used as the cookie. Since the handler - * receives this value it makes sense to use it. - * - * If your interrupt is shared you must pass a non NULL dev_id - * as this is required when freeing the interrupt. - * - * Flags: - * - * IRQF_SHARED Interrupt is shared - * - * IRQF_DISABLED Disable local interrupts while processing - * - * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy - * - */ - -int request_irq(unsigned int irq, - irqreturn_t (*handler)(int, void *, struct pt_regs *), - unsigned long irqflags, - const char * devname, - void *dev_id) -{ - int retval; - struct irqaction *action; - -#if 1 - /* - * Sanity-check: shared interrupts should REALLY pass in - * a real dev-ID, otherwise we'll have trouble later trying - * to figure out which interrupt is which (messes up the - * interrupt freeing logic etc). - */ - if (irqflags & IRQF_SHARED) { - if (!dev_id) - printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", - devname, (&irq)[-1]); - } -#endif - - if ((irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP) >= NR_IRQ_GROUPS) - return -EINVAL; - if (!handler) - return -EINVAL; - - action = (struct irqaction *) kmalloc(sizeof(struct irqaction), GFP_KERNEL); - if (!action) - return -ENOMEM; - - action->handler = handler; - action->flags = irqflags; - action->mask = CPU_MASK_NONE; - action->name = devname; - action->next = NULL; - action->dev_id = dev_id; - - retval = setup_irq(irq, action); - if (retval) - kfree(action); - return retval; -} - -EXPORT_SYMBOL(request_irq); - -/** - * free_irq - free an interrupt - * @irq: Interrupt line to free - * @dev_id: Device identity to free - * - * Remove an interrupt handler. The handler is removed and if the - * interrupt line is no longer in use by any driver it is disabled. - * On a shared IRQ the caller must ensure the interrupt is disabled - * on the card it drives before calling this function. The function - * does not return until any executing interrupts for this IRQ - * have completed. - * - * This function may be called from interrupt context. - * - * Bugs: Attempting to free an irq in a handler for the same irq hangs - * the machine. - */ - -void free_irq(unsigned int irq, void *dev_id) -{ - struct irq_source *source; - struct irq_group *group; - struct irq_level *level; - struct irqaction **p, **pp; - unsigned long flags; - - if ((irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP) >= NR_IRQ_GROUPS) - return; - - group = irq_groups[irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP]; - if (!group) - BUG(); - - source = group->sources[irq & (NR_IRQ_ACTIONS_PER_GROUP - 1)]; - if (!source) - BUG(); - - level = source->level; - p = &group->actions[irq & (NR_IRQ_ACTIONS_PER_GROUP - 1)]; - - spin_lock_irqsave(&level->lock, flags); - - for (pp = p; *pp; pp = &(*pp)->next) { - struct irqaction *action = *pp; - - if (action->dev_id != dev_id) - continue; - - /* found it - remove from the list of entries */ - *pp = action->next; - - level->usage--; - - if (p == pp && group->control) - group->control(group, irq & (NR_IRQ_ACTIONS_PER_GROUP - 1), 0); - - if (level->usage == 0) - __set_MASK(level - frv_irq_levels); - - spin_unlock_irqrestore(&level->lock,flags); - -#ifdef CONFIG_SMP - /* Wait to make sure it's not being used on another CPU */ - while (desc->status & IRQ_INPROGRESS) - barrier(); -#endif - kfree(action); - return; - } -} - -EXPORT_SYMBOL(free_irq); - -/* - * IRQ autodetection code.. - * - * This depends on the fact that any interrupt that comes in on to an - * unassigned IRQ will cause GxICR_DETECT to be set - */ - -static DECLARE_MUTEX(probe_sem); - -/** - * probe_irq_on - begin an interrupt autodetect - * - * Commence probing for an interrupt. The interrupts are scanned - * and a mask of potential interrupt lines is returned. - * - */ - -unsigned long probe_irq_on(void) -{ - down(&probe_sem); - return 0; } -EXPORT_SYMBOL(probe_irq_on); - /* - * Return a mask of triggered interrupts (this - * can handle only legacy ISA interrupts). - */ - -/** - * probe_irq_mask - scan a bitmap of interrupt lines - * @val: mask of interrupts to consider - * - * Scan the ISA bus interrupt lines and return a bitmap of - * active interrupts. The interrupt probe logic state is then - * returned to its previous value. - * - * Note: we need to scan all the irq's even though we will - * only return ISA irq numbers - just so that we reset them - * all to a known state. - */ -unsigned int probe_irq_mask(unsigned long xmask) -{ - up(&probe_sem); - return 0; -} - -EXPORT_SYMBOL(probe_irq_mask); - -/* - * Return the one interrupt that triggered (this can - * handle any interrupt source). - */ - -/** - * probe_irq_off - end an interrupt autodetect - * @xmask: mask of potential interrupts (unused) - * - * Scans the unused interrupt lines and returns the line which - * appears to have triggered the interrupt. If no interrupt was - * found then zero is returned. If more than one interrupt is - * found then minus the first candidate is returned to indicate - * their is doubt. - * - * The interrupt probe logic state is returned to its previous - * value. - * - * BUGS: When used in a module (which arguably shouldnt happen) - * nothing prevents two IRQ probe callers from overlapping. The - * results of this are non-optimal. + * initialise the interrupt system */ - -int probe_irq_off(unsigned long xmask) -{ - up(&probe_sem); - return -1; -} - -EXPORT_SYMBOL(probe_irq_off); - -/* this was setup_x86_irq but it seems pretty generic */ -int setup_irq(unsigned int irq, struct irqaction *new) -{ - struct irq_source *source; - struct irq_group *group; - struct irq_level *level; - struct irqaction **p, **pp; - unsigned long flags; - - group = irq_groups[irq >> NR_IRQ_LOG2_ACTIONS_PER_GROUP]; - if (!group) - BUG(); - - source = group->sources[irq & (NR_IRQ_ACTIONS_PER_GROUP - 1)]; - if (!source) - BUG(); - - level = source->level; - - p = &group->actions[irq & (NR_IRQ_ACTIONS_PER_GROUP - 1)]; - - /* - * Some drivers like serial.c use request_irq() heavily, - * so we have to be careful not to interfere with a - * running system. - */ - if (new->flags & IRQF_SAMPLE_RANDOM) { - /* - * This function might sleep, we want to call it first, - * outside of the atomic block. - * Yes, this might clear the entropy pool if the wrong - * driver is attempted to be loaded, without actually - * installing a new handler, but is this really a problem, - * only the sysadmin is able to do this. - */ - rand_initialize_irq(irq); - } - - /* must juggle the interrupt processing stuff with interrupts disabled */ - spin_lock_irqsave(&level->lock, flags); - - /* can't share interrupts unless all parties agree to */ - if (level->usage != 0 && !(level->flags & new->flags & IRQF_SHARED)) { - spin_unlock_irqrestore(&level->lock,flags); - return -EBUSY; - } - - /* add new interrupt at end of irq queue */ - pp = p; - while (*pp) - pp = &(*pp)->next; - - *pp = new; - - level->usage++; - level->flags = new->flags; - - /* turn the interrupts on */ - if (level->usage == 1) - __clr_MASK(level - frv_irq_levels); - - if (p == pp && group->control) - group->control(group, irq & (NR_IRQ_ACTIONS_PER_GROUP - 1), 1); - - spin_unlock_irqrestore(&level->lock, flags); - register_irq_proc(irq); - return 0; -} - -static struct proc_dir_entry * root_irq_dir; -static struct proc_dir_entry * irq_dir [NR_IRQS]; - -#define HEX_DIGITS 8 - -static unsigned int parse_hex_value (const char __user *buffer, - unsigned long count, unsigned long *ret) -{ - unsigned char hexnum [HEX_DIGITS]; - unsigned long value; - int i; - - if (!count) - return -EINVAL; - if (count > HEX_DIGITS) - count = HEX_DIGITS; - if (copy_from_user(hexnum, buffer, count)) - return -EFAULT; - - /* - * Parse the first 8 characters as a hex string, any non-hex char - * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same. - */ - value = 0; - - for (i = 0; i < count; i++) { - unsigned int c = hexnum[i]; - - switch (c) { - case '0' ... '9': c -= '0'; break; - case 'a' ... 'f': c -= 'a'-10; break; - case 'A' ... 'F': c -= 'A'-10; break; - default: - goto out; - } - value = (value << 4) | c; - } -out: - *ret = value; - return 0; -} - - -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - unsigned long *mask = (unsigned long *) data; - if (count < HEX_DIGITS+1) - return -EINVAL; - return sprintf (page, "%08lx\n", *mask); -} - -static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer, - unsigned long count, void *data) -{ - unsigned long *mask = (unsigned long *) data, full_count = count, err; - unsigned long new_value; - - show_state(); - err = parse_hex_value(buffer, count, &new_value); - if (err) - return err; - - *mask = new_value; - return full_count; -} - -#define MAX_NAMELEN 10 - -static void register_irq_proc (unsigned int irq) -{ - char name [MAX_NAMELEN]; - - if (!root_irq_dir || irq_dir[irq]) - return; - - memset(name, 0, MAX_NAMELEN); - sprintf(name, "%d", irq); - - /* create /proc/irq/1234 */ - irq_dir[irq] = proc_mkdir(name, root_irq_dir); -} - -unsigned long prof_cpu_mask = -1; - -void init_irq_proc (void) +void __init init_IRQ(void) { - struct proc_dir_entry *entry; - int i; + int level; - /* create /proc/irq */ - root_irq_dir = proc_mkdir("irq", NULL); + for (level = 1; level <= 14; level++) + set_irq_chip_and_handler(level, &frv_cpu_pic, + handle_level_irq); - /* create /proc/irq/prof_cpu_mask */ - entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir); - if (!entry) - return; + set_irq_handler(IRQ_CPU_TIMER0, handle_edge_irq); - entry->nlink = 1; - entry->data = (void *)&prof_cpu_mask; - entry->read_proc = prof_cpu_mask_read_proc; - entry->write_proc = prof_cpu_mask_write_proc; - - /* - * Create entries for all existing IRQs. + /* set the trigger levels for internal interrupt sources + * - timers all falling-edge + * - ERR0 is rising-edge + * - all others are high-level */ - for (i = 0; i < NR_IRQS; i++) - register_irq_proc(i); -} + __set_IITMR(0, 0x003f0000); /* DMA0-3, TIMER0-2 */ + __set_IITMR(1, 0x20000000); /* ERR0-1, UART0-1, DMA4-7 */ + + /* route internal interrupts */ + set_IRR(4, IRQ_DMA3_LEVEL, IRQ_DMA2_LEVEL, IRQ_DMA1_LEVEL, + IRQ_DMA0_LEVEL); + set_IRR(5, 0, IRQ_TIMER2_LEVEL, IRQ_TIMER1_LEVEL, IRQ_TIMER0_LEVEL); + set_IRR(6, IRQ_GDBSTUB_LEVEL, IRQ_GDBSTUB_LEVEL, + IRQ_UART1_LEVEL, IRQ_UART0_LEVEL); + set_IRR(7, IRQ_DMA7_LEVEL, IRQ_DMA6_LEVEL, IRQ_DMA5_LEVEL, + IRQ_DMA4_LEVEL); + + /* route external interrupts */ + set_IRR(2, IRQ_XIRQ7_LEVEL, IRQ_XIRQ6_LEVEL, IRQ_XIRQ5_LEVEL, + IRQ_XIRQ4_LEVEL); + set_IRR(3, IRQ_XIRQ3_LEVEL, IRQ_XIRQ2_LEVEL, IRQ_XIRQ1_LEVEL, + IRQ_XIRQ0_LEVEL); + +#if defined(CONFIG_MB93091_VDK) + __set_TM1(0x55550000); /* XIRQ7-0 all active low */ +#elif defined(CONFIG_MB93093_PDK) + __set_TM1(0x15550000); /* XIRQ7 active high, 6-0 all active low */ +#else +#error dont know external IRQ trigger levels for this setup +#endif -/*****************************************************************************/ -/* - * initialise the interrupt system - */ -void __init init_IRQ(void) -{ - route_cpu_irqs(); fpga_init(); #ifdef CONFIG_FUJITSU_MB93493 - route_mb93493_irqs(); + mb93493_init(); #endif -} /* end init_IRQ() */ +} diff --git a/arch/frv/kernel/kernel_execve.S b/arch/frv/kernel/kernel_execve.S new file mode 100644 index 0000000..9b074a1 --- /dev/null +++ b/arch/frv/kernel/kernel_execve.S @@ -0,0 +1,33 @@ +/* in-kernel program execution + * + * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include +#include + +############################################################################### +# +# Do a system call from kernel instead of calling sys_execve so we end up with +# proper pt_regs. +# +# int kernel_execve(const char *filename, char *const argv[], char *const envp[]) +# +# On entry: GR8/GR9/GR10: arguments to function +# On return: GR8: syscall return. +# +############################################################################### + .globl kernel_execve + .type kernel_execve,@function +kernel_execve: + setlos __NR_execve,gr7 + tira gr0,#0 + bralr + + .size kernel_execve,.-kernel_execve diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index af08ccd..d96a57e 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c @@ -43,7 +43,6 @@ #include #include #include #include -#include #include #ifdef CONFIG_BLK_DEV_INITRD diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c index 68a77fe..7e55884 100644 --- a/arch/frv/kernel/time.c +++ b/arch/frv/kernel/time.c @@ -26,7 +26,6 @@ #include #include #include #include -#include #include @@ -71,7 +70,7 @@ static irqreturn_t timer_interrupt(int i */ write_seqlock(&xtime_lock); - do_timer(regs); + do_timer(1); update_process_times(user_mode(regs)); profile_tick(CPU_PROFILING, regs); diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c index 2278c80..ba58752 100644 --- a/arch/frv/mb93090-mb00/pci-irq.c +++ b/arch/frv/mb93090-mb00/pci-irq.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "pci-frv.h" diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index b5b4286..3f3a0ed 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c @@ -98,7 +98,7 @@ void show_mem(void) */ void __init paging_init(void) { - unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0}; + unsigned long zones_size[MAX_NR_ZONES] = {0, }; /* allocate some pages for kernel housekeeping tasks */ empty_bad_page_table = (unsigned long) alloc_bootmem_pages(PAGE_SIZE); diff --git a/arch/h8300/kernel/sys_h8300.c b/arch/h8300/kernel/sys_h8300.c index 0f61b7a..302a2df 100644 --- a/arch/h8300/kernel/sys_h8300.c +++ b/arch/h8300/kernel/sys_h8300.c @@ -25,6 +25,7 @@ #include #include #include #include +#include /* * sys_pipe() is the normal C calling standard for creating @@ -280,3 +281,26 @@ asmlinkage void syscall_print(void *dumm ((regs->pc)&0xffffff)-2,regs->orig_er0,regs->er1,regs->er2,regs->er3,regs->er0); } #endif + +/* + * Do a system call from kernel instead of calling sys_execve so we + * end up with proper pt_regs. + */ +int kernel_execve(const char *filename, char *const argv[], char *const envp[]) +{ + register long res __asm__("er0"); + register const char * _a __asm__("er1") = filename; + register void *_b __asm__("er2") = argv; + register void *_c __asm__("er3") = envp; + __asm__ __volatile__ ("mov.l %1,er0\n\t" + "trapa #0\n\t" + : "=r" (res) + : "g" (__NR_execve), + "g" (_a), + "g" (_b), + "g" (_c) + : "cc", "memory"); + return res; +} + + diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c index 688a510..e569d17 100644 --- a/arch/h8300/kernel/time.c +++ b/arch/h8300/kernel/time.c @@ -41,7 +41,7 @@ static void timer_interrupt(int irq, voi /* may need to kick the hardware timer */ platform_timer_eoi(); - do_timer(regs); + do_timer(1); #ifndef CONFIG_SMP update_process_times(user_mode(regs)); #endif diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c index d3d40bd..e4f4199 100644 --- a/arch/h8300/mm/init.c +++ b/arch/h8300/mm/init.c @@ -138,7 +138,7 @@ #ifdef DEBUG #endif { - unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0}; + unsigned long zones_size[MAX_NR_ZONES] = {0, }; zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT; zones_size[ZONE_NORMAL] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT; diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index b2751ea..af219e5 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -166,7 +166,6 @@ config X86_VISWS config X86_GENERICARCH bool "Generic architecture (Summit, bigsmp, ES7000, default)" - depends on SMP help This option compiles in the Summit, bigsmp, ES7000, default subarchitectures. It is intended for a generic binary kernel. @@ -263,7 +262,7 @@ source "kernel/Kconfig.preempt" config X86_UP_APIC bool "Local APIC support on uniprocessors" - depends on !SMP && !(X86_VISWS || X86_VOYAGER) + depends on !SMP && !(X86_VISWS || X86_VOYAGER || X86_GENERICARCH) help A local APIC (Advanced Programmable Interrupt Controller) is an integrated interrupt controller in the CPU. If you have a single-CPU @@ -288,12 +287,12 @@ config X86_UP_IOAPIC config X86_LOCAL_APIC bool - depends on X86_UP_APIC || ((X86_VISWS || SMP) && !X86_VOYAGER) + depends on X86_UP_APIC || ((X86_VISWS || SMP) && !X86_VOYAGER) || X86_GENERICARCH default y config X86_IO_APIC bool - depends on X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER)) + depends on X86_UP_IOAPIC || (SMP && !(X86_VISWS || X86_VOYAGER)) || X86_GENERICARCH default y config X86_VISWS_APIC @@ -402,6 +401,7 @@ config X86_REBOOTFIXUPS config MICROCODE tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support" + select FW_LOADER ---help--- If you say Y here and also to "/dev file system support" in the 'File systems' section, you will be able to update the microcode on @@ -417,6 +417,11 @@ config MICROCODE To compile this driver as a module, choose M here: the module will be called microcode. +config MICROCODE_OLD_INTERFACE + bool + depends on MICROCODE + default y + config X86_MSR tristate "/dev/cpu/*/msr - Model-specific register support" help @@ -494,7 +499,7 @@ config HIGHMEM64G endchoice choice - depends on EXPERIMENTAL && !X86_PAE + depends on EXPERIMENTAL prompt "Memory split" if EMBEDDED default VMSPLIT_3G help @@ -516,6 +521,7 @@ choice config VMSPLIT_3G bool "3G/1G user/kernel split" config VMSPLIT_3G_OPT + depends on !HIGHMEM bool "3G/1G user/kernel split (for full 1G low memory)" config VMSPLIT_2G bool "2G/2G user/kernel split" @@ -598,12 +604,10 @@ config ARCH_SELECT_MEMORY_MODEL def_bool y depends on ARCH_SPARSEMEM_ENABLE -source "mm/Kconfig" +config ARCH_POPULATES_NODE_MAP + def_bool y -config HAVE_ARCH_EARLY_PFN_TO_NID - bool - default y - depends on NUMA +source "mm/Kconfig" config HIGHPTE bool "Allocate 3rd-level pagetables from highmem" @@ -740,8 +744,7 @@ config SECCOMP source kernel/Kconfig.hz config KEXEC - bool "kexec system call (EXPERIMENTAL)" - depends on EXPERIMENTAL + bool "kexec system call" help kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot @@ -762,6 +765,13 @@ config CRASH_DUMP depends on HIGHMEM help Generate crash dump after being started by kexec. + This should be normally only set in special crash dump kernels + which are loaded in the main kernel with kexec-tools into + a specially reserved region and then later executed after + a crash by kdump/kexec. The crash dump kernel must be compiled + to a memory address not used by the main kernel or BIOS using + PHYSICAL_START. + For more details see Documentation/kdump/kdump.txt config PHYSICAL_START hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) @@ -794,6 +804,7 @@ config HOTPLUG_CPU config COMPAT_VDSO bool "Compat VDSO support" default y + depends on !PARAVIRT help Map the VDSO to the predictable old-style address too. ---help--- @@ -1131,7 +1142,7 @@ source "arch/i386/oprofile/Kconfig" config KPROBES bool "Kprobes (EXPERIMENTAL)" - depends on EXPERIMENTAL && MODULES + depends on KALLSYMS && EXPERIMENTAL && MODULES help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes diff --git a/arch/i386/Makefile b/arch/i386/Makefile index 3e4adb1..7cc0b18 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile @@ -46,6 +46,14 @@ # Disable unit-at-a-time mode on pre-gcc # a lot more stack due to the lack of sharing of stacklots: CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) +# do binutils support CFI? +cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) +AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) + +# is .cfi_signal_frame supported too? +cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) +AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) + CFLAGS += $(cflags-y) # Default subarch .c files diff --git a/arch/i386/boot/edd.S b/arch/i386/boot/edd.S index 4b84ea2..3432136 100644 --- a/arch/i386/boot/edd.S +++ b/arch/i386/boot/edd.S @@ -15,42 +15,95 @@ #include #include #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) + +# It is assumed that %ds == INITSEG here + movb $0, (EDD_MBR_SIG_NR_BUF) movb $0, (EDDNR) -# Check the command line for two options: +# Check the command line for options: # edd=of disables EDD completely (edd=off) # edd=sk skips the MBR test (edd=skipmbr) +# edd=on re-enables EDD (edd=on) + pushl %esi - cmpl $0, %cs:cmd_line_ptr - jz done_cl + movw $edd_mbr_sig_start, %di # Default to edd=on + movl %cs:(cmd_line_ptr), %esi -# ds:esi has the pointer to the command line now - movl $(COMMAND_LINE_SIZE-7), %ecx -# loop through kernel command line one byte at a time -cl_loop: - cmpl $EDD_CL_EQUALS, (%si) + andl %esi, %esi + jz old_cl # Old boot protocol? + +# Convert to a real-mode pointer in fs:si + movl %esi, %eax + shrl $4, %eax + movw %ax, %fs + andw $0xf, %si + jmp have_cl_pointer + +# Old-style boot protocol? +old_cl: + push %ds # aka INITSEG + pop %fs + + cmpw $0xa33f, (0x20) + jne done_cl # No command line at all? + movw (0x22), %si # Pointer relative to INITSEG + +# fs:si has the pointer to the command line now +have_cl_pointer: + +# Loop through kernel command line one byte at a time. Just in +# case the loader is buggy and failed to null-terminate the command line +# terminate if we get close enough to the end of the segment that we +# cannot fit "edd=XX"... +cl_atspace: + cmpw $-5, %si # Watch for segment wraparound + jae done_cl + movl %fs:(%si), %eax + andb %al, %al # End of line? + jz done_cl + cmpl $EDD_CL_EQUALS, %eax jz found_edd_equals - incl %esi - loop cl_loop - jmp done_cl + cmpb $0x20, %al # <= space consider whitespace + ja cl_skipword + incw %si + jmp cl_atspace + +cl_skipword: + cmpw $-5, %si # Watch for segment wraparound + jae done_cl + movb %fs:(%si), %al # End of string? + andb %al, %al + jz done_cl + cmpb $0x20, %al + jbe cl_atspace + incw %si + jmp cl_skipword + found_edd_equals: # only looking at first two characters after equals - addl $4, %esi - cmpw $EDD_CL_OFF, (%si) # edd=of - jz do_edd_off - cmpw $EDD_CL_SKIP, (%si) # edd=sk - jz do_edd_skipmbr - jmp done_cl +# late overrides early on the command line, so keep going after finding something + movw %fs:4(%si), %ax + cmpw $EDD_CL_OFF, %ax # edd=of + je do_edd_off + cmpw $EDD_CL_SKIP, %ax # edd=sk + je do_edd_skipmbr + cmpw $EDD_CL_ON, %ax # edd=on + je do_edd_on + jmp cl_skipword do_edd_skipmbr: - popl %esi - jmp edd_start + movw $edd_start, %di + jmp cl_skipword do_edd_off: - popl %esi - jmp edd_done + movw $edd_done, %di + jmp cl_skipword +do_edd_on: + movw $edd_mbr_sig_start, %di + jmp cl_skipword + done_cl: popl %esi - + jmpw *%di # Read the first sector of each BIOS disk device and store the 4-byte signature edd_mbr_sig_start: diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S index d2b684c..3aec453 100644 --- a/arch/i386/boot/setup.S +++ b/arch/i386/boot/setup.S @@ -494,12 +494,12 @@ # Check for PS/2 pointing device movw %cs, %ax # aka SETUPSEG subw $DELTA_INITSEG, %ax # aka INITSEG movw %ax, %ds - movw $0, (0x1ff) # default is no pointing device + movb $0, (0x1ff) # default is no pointing device int $0x11 # int 0x11: equipment list testb $0x04, %al # check if mouse installed jz no_psmouse - movw $0xAA, (0x1ff) # device present + movb $0xAA, (0x1ff) # device present no_psmouse: #if defined(CONFIG_X86_SPEEDSTEP_SMI) || defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE) diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S index 8c2a6fa..2c5b5cc 100644 --- a/arch/i386/boot/video.S +++ b/arch/i386/boot/video.S @@ -11,8 +11,6 @@ * */ -#include /* for CONFIG_VIDEO_* */ - /* Enable autodetection of SVGA adapters and modes. */ #undef CONFIG_VIDEO_SVGA diff --git a/arch/i386/crypto/Makefile b/arch/i386/crypto/Makefile index 103c353..3fd19af 100644 --- a/arch/i386/crypto/Makefile +++ b/arch/i386/crypto/Makefile @@ -5,5 +5,8 @@ # Arch-specific CryptoAPI modules. # obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o +obj-$(CONFIG_CRYPTO_TWOFISH_586) += twofish-i586.o aes-i586-y := aes-i586-asm.o aes.o +twofish-i586-y := twofish-i586-asm.o twofish.o + diff --git a/arch/i386/crypto/aes.c b/arch/i386/crypto/aes.c index d3806da..49aad93 100644 --- a/arch/i386/crypto/aes.c +++ b/arch/i386/crypto/aes.c @@ -379,12 +379,13 @@ #define kdl8(k,i) \ } static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) + unsigned int key_len) { int i; u32 ss[8]; struct aes_ctx *ctx = crypto_tfm_ctx(tfm); const __le32 *key = (const __le32 *)in_key; + u32 *flags = &tfm->crt_flags; /* encryption schedule */ diff --git a/arch/i386/crypto/twofish-i586-asm.S b/arch/i386/crypto/twofish-i586-asm.S new file mode 100644 index 0000000..39b98ed --- /dev/null +++ b/arch/i386/crypto/twofish-i586-asm.S @@ -0,0 +1,335 @@ +/*************************************************************************** +* Copyright (C) 2006 by Joachim Fritschi, * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ + +.file "twofish-i586-asm.S" +.text + +#include + +/* return adress at 0 */ + +#define in_blk 12 /* input byte array address parameter*/ +#define out_blk 8 /* output byte array address parameter*/ +#define tfm 4 /* Twofish context structure */ + +#define a_offset 0 +#define b_offset 4 +#define c_offset 8 +#define d_offset 12 + +/* Structure of the crypto context struct*/ + +#define s0 0 /* S0 Array 256 Words each */ +#define s1 1024 /* S1 Array */ +#define s2 2048 /* S2 Array */ +#define s3 3072 /* S3 Array */ +#define w 4096 /* 8 whitening keys (word) */ +#define k 4128 /* key 1-32 ( word ) */ + +/* define a few register aliases to allow macro substitution */ + +#define R0D %eax +#define R0B %al +#define R0H %ah + +#define R1D %ebx +#define R1B %bl +#define R1H %bh + +#define R2D %ecx +#define R2B %cl +#define R2H %ch + +#define R3D %edx +#define R3B %dl +#define R3H %dh + + +/* performs input whitening */ +#define input_whitening(src,context,offset)\ + xor w+offset(context), src; + +/* performs input whitening */ +#define output_whitening(src,context,offset)\ + xor w+16+offset(context), src; + +/* + * a input register containing a (rotated 16) + * b input register containing b + * c input register containing c + * d input register containing d (already rol $1) + * operations on a and b are interleaved to increase performance + */ +#define encrypt_round(a,b,c,d,round)\ + push d ## D;\ + movzx b ## B, %edi;\ + mov s1(%ebp,%edi,4),d ## D;\ + movzx a ## B, %edi;\ + mov s2(%ebp,%edi,4),%esi;\ + movzx b ## H, %edi;\ + ror $16, b ## D;\ + xor s2(%ebp,%edi,4),d ## D;\ + movzx a ## H, %edi;\ + ror $16, a ## D;\ + xor s3(%ebp,%edi,4),%esi;\ + movzx b ## B, %edi;\ + xor s3(%ebp,%edi,4),d ## D;\ + movzx a ## B, %edi;\ + xor (%ebp,%edi,4), %esi;\ + movzx b ## H, %edi;\ + ror $15, b ## D;\ + xor (%ebp,%edi,4), d ## D;\ + movzx a ## H, %edi;\ + xor s1(%ebp,%edi,4),%esi;\ + pop %edi;\ + add d ## D, %esi;\ + add %esi, d ## D;\ + add k+round(%ebp), %esi;\ + xor %esi, c ## D;\ + rol $15, c ## D;\ + add k+4+round(%ebp),d ## D;\ + xor %edi, d ## D; + +/* + * a input register containing a (rotated 16) + * b input register containing b + * c input register containing c + * d input register containing d (already rol $1) + * operations on a and b are interleaved to increase performance + * last round has different rotations for the output preparation + */ +#define encrypt_last_round(a,b,c,d,round)\ + push d ## D;\ + movzx b ## B, %edi;\ + mov s1(%ebp,%edi,4),d ## D;\ + movzx a ## B, %edi;\ + mov s2(%ebp,%edi,4),%esi;\ + movzx b ## H, %edi;\ + ror $16, b ## D;\ + xor s2(%ebp,%edi,4),d ## D;\ + movzx a ## H, %edi;\ + ror $16, a ## D;\ + xor s3(%ebp,%edi,4),%esi;\ + movzx b ## B, %edi;\ + xor s3(%ebp,%edi,4),d ## D;\ + movzx a ## B, %edi;\ + xor (%ebp,%edi,4), %esi;\ + movzx b ## H, %edi;\ + ror $16, b ## D;\ + xor (%ebp,%edi,4), d ## D;\ + movzx a ## H, %edi;\ + xor s1(%ebp,%edi,4),%esi;\ + pop %edi;\ + add d ## D, %esi;\ + add %esi, d ## D;\ + add k+round(%ebp), %esi;\ + xor %esi, c ## D;\ + ror $1, c ## D;\ + add k+4+round(%ebp),d ## D;\ + xor %edi, d ## D; + +/* + * a input register containing a + * b input register containing b (rotated 16) + * c input register containing c + * d input register containing d (already rol $1) + * operations on a and b are interleaved to increase performance + */ +#define decrypt_round(a,b,c,d,round)\ + push c ## D;\ + movzx a ## B, %edi;\ + mov (%ebp,%edi,4), c ## D;\ + movzx b ## B, %edi;\ + mov s3(%ebp,%edi,4),%esi;\ + movzx a ## H, %edi;\ + ror $16, a ## D;\ + xor s1(%ebp,%edi,4),c ## D;\ + movzx b ## H, %edi;\ + ror $16, b ## D;\ + xor (%ebp,%edi,4), %esi;\ + movzx a ## B, %edi;\ + xor s2(%ebp,%edi,4),c ## D;\ + movzx b ## B, %edi;\ + xor s1(%ebp,%edi,4),%esi;\ + movzx a ## H, %edi;\ + ror $15, a ## D;\ + xor s3(%ebp,%edi,4),c ## D;\ + movzx b ## H, %edi;\ + xor s2(%ebp,%edi,4),%esi;\ + pop %edi;\ + add %esi, c ## D;\ + add c ## D, %esi;\ + add k+round(%ebp), c ## D;\ + xor %edi, c ## D;\ + add k+4+round(%ebp),%esi;\ + xor %esi, d ## D;\ + rol $15, d ## D; + +/* + * a input register containing a + * b input register containing b (rotated 16) + * c input register containing c + * d input register containing d (already rol $1) + * operations on a and b are interleaved to increase performance + * last round has different rotations for the output preparation + */ +#define decrypt_last_round(a,b,c,d,round)\ + push c ## D;\ + movzx a ## B, %edi;\ + mov (%ebp,%edi,4), c ## D;\ + movzx b ## B, %edi;\ + mov s3(%ebp,%edi,4),%esi;\ + movzx a ## H, %edi;\ + ror $16, a ## D;\ + xor s1(%ebp,%edi,4),c ## D;\ + movzx b ## H, %edi;\ + ror $16, b ## D;\ + xor (%ebp,%edi,4), %esi;\ + movzx a ## B, %edi;\ + xor s2(%ebp,%edi,4),c ## D;\ + movzx b ## B, %edi;\ + xor s1(%ebp,%edi,4),%esi;\ + movzx a ## H, %edi;\ + ror $16, a ## D;\ + xor s3(%ebp,%edi,4),c ## D;\ + movzx b ## H, %edi;\ + xor s2(%ebp,%edi,4),%esi;\ + pop %edi;\ + add %esi, c ## D;\ + add c ## D, %esi;\ + add k+round(%ebp), c ## D;\ + xor %edi, c ## D;\ + add k+4+round(%ebp),%esi;\ + xor %esi, d ## D;\ + ror $1, d ## D; + +.align 4 +.global twofish_enc_blk +.global twofish_dec_blk + +twofish_enc_blk: + push %ebp /* save registers according to calling convention*/ + push %ebx + push %esi + push %edi + + mov tfm + 16(%esp), %ebp /* abuse the base pointer: set new base bointer to the crypto tfm */ + add $crypto_tfm_ctx_offset, %ebp /* ctx adress */ + mov in_blk+16(%esp),%edi /* input adress in edi */ + + mov (%edi), %eax + mov b_offset(%edi), %ebx + mov c_offset(%edi), %ecx + mov d_offset(%edi), %edx + input_whitening(%eax,%ebp,a_offset) + ror $16, %eax + input_whitening(%ebx,%ebp,b_offset) + input_whitening(%ecx,%ebp,c_offset) + input_whitening(%edx,%ebp,d_offset) + rol $1, %edx + + encrypt_round(R0,R1,R2,R3,0); + encrypt_round(R2,R3,R0,R1,8); + encrypt_round(R0,R1,R2,R3,2*8); + encrypt_round(R2,R3,R0,R1,3*8); + encrypt_round(R0,R1,R2,R3,4*8); + encrypt_round(R2,R3,R0,R1,5*8); + encrypt_round(R0,R1,R2,R3,6*8); + encrypt_round(R2,R3,R0,R1,7*8); + encrypt_round(R0,R1,R2,R3,8*8); + encrypt_round(R2,R3,R0,R1,9*8); + encrypt_round(R0,R1,R2,R3,10*8); + encrypt_round(R2,R3,R0,R1,11*8); + encrypt_round(R0,R1,R2,R3,12*8); + encrypt_round(R2,R3,R0,R1,13*8); + encrypt_round(R0,R1,R2,R3,14*8); + encrypt_last_round(R2,R3,R0,R1,15*8); + + output_whitening(%eax,%ebp,c_offset) + output_whitening(%ebx,%ebp,d_offset) + output_whitening(%ecx,%ebp,a_offset) + output_whitening(%edx,%ebp,b_offset) + mov out_blk+16(%esp),%edi; + mov %eax, c_offset(%edi) + mov %ebx, d_offset(%edi) + mov %ecx, (%edi) + mov %edx, b_offset(%edi) + + pop %edi + pop %esi + pop %ebx + pop %ebp + mov $1, %eax + ret + +twofish_dec_blk: + push %ebp /* save registers according to calling convention*/ + push %ebx + push %esi + push %edi + + + mov tfm + 16(%esp), %ebp /* abuse the base pointer: set new base bointer to the crypto tfm */ + add $crypto_tfm_ctx_offset, %ebp /* ctx adress */ + mov in_blk+16(%esp),%edi /* input adress in edi */ + + mov (%edi), %eax + mov b_offset(%edi), %ebx + mov c_offset(%edi), %ecx + mov d_offset(%edi), %edx + output_whitening(%eax,%ebp,a_offset) + output_whitening(%ebx,%ebp,b_offset) + ror $16, %ebx + output_whitening(%ecx,%ebp,c_offset) + output_whitening(%edx,%ebp,d_offset) + rol $1, %ecx + + decrypt_round(R0,R1,R2,R3,15*8); + decrypt_round(R2,R3,R0,R1,14*8); + decrypt_round(R0,R1,R2,R3,13*8); + decrypt_round(R2,R3,R0,R1,12*8); + decrypt_round(R0,R1,R2,R3,11*8); + decrypt_round(R2,R3,R0,R1,10*8); + decrypt_round(R0,R1,R2,R3,9*8); + decrypt_round(R2,R3,R0,R1,8*8); + decrypt_round(R0,R1,R2,R3,7*8); + decrypt_round(R2,R3,R0,R1,6*8); + decrypt_round(R0,R1,R2,R3,5*8); + decrypt_round(R2,R3,R0,R1,4*8); + decrypt_round(R0,R1,R2,R3,3*8); + decrypt_round(R2,R3,R0,R1,2*8); + decrypt_round(R0,R1,R2,R3,1*8); + decrypt_last_round(R2,R3,R0,R1,0); + + input_whitening(%eax,%ebp,c_offset) + input_whitening(%ebx,%ebp,d_offset) + input_whitening(%ecx,%ebp,a_offset) + input_whitening(%edx,%ebp,b_offset) + mov out_blk+16(%esp),%edi; + mov %eax, c_offset(%edi) + mov %ebx, d_offset(%edi) + mov %ecx, (%edi) + mov %edx, b_offset(%edi) + + pop %edi + pop %esi + pop %ebx + pop %ebp + mov $1, %eax + ret diff --git a/arch/i386/crypto/twofish.c b/arch/i386/crypto/twofish.c new file mode 100644 index 0000000..e3004df --- /dev/null +++ b/arch/i386/crypto/twofish.c @@ -0,0 +1,97 @@ +/* + * Glue Code for optimized 586 assembler version of TWOFISH + * + * Originally Twofish for GPG + * By Matthew Skala , July 26, 1998 + * 256-bit key length added March 20, 1999 + * Some modifications to reduce the text size by Werner Koch, April, 1998 + * Ported to the kerneli patch by Marc Mutz + * Ported to CryptoAPI by Colin Slater + * + * The original author has disclaimed all copyright interest in this + * code and thus put it in the public domain. The subsequent authors + * have put this under the GNU General Public License. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * This code is a "clean room" implementation, written from the paper + * _Twofish: A 128-Bit Block Cipher_ by Bruce Schneier, John Kelsey, + * Doug Whiting, David Wagner, Chris Hall, and Niels Ferguson, available + * through http://www.counterpane.com/twofish.html + * + * For background information on multiplication in finite fields, used for + * the matrix operations in the key schedule, see the book _Contemporary + * Abstract Algebra_ by Joseph A. Gallian, especially chapter 22 in the + * Third Edition. + */ + +#include +#include +#include +#include +#include + + +asmlinkage void twofish_enc_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src); +asmlinkage void twofish_dec_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src); + +static void twofish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +{ + twofish_enc_blk(tfm, dst, src); +} + +static void twofish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +{ + twofish_dec_blk(tfm, dst, src); +} + +static struct crypto_alg alg = { + .cra_name = "twofish", + .cra_driver_name = "twofish-i586", + .cra_priority = 200, + .cra_flags = CRYPTO_ALG_TYPE_CIPHER, + .cra_blocksize = TF_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct twofish_ctx), + .cra_alignmask = 3, + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(alg.cra_list), + .cra_u = { + .cipher = { + .cia_min_keysize = TF_MIN_KEY_SIZE, + .cia_max_keysize = TF_MAX_KEY_SIZE, + .cia_setkey = twofish_setkey, + .cia_encrypt = twofish_encrypt, + .cia_decrypt = twofish_decrypt + } + } +}; + +static int __init init(void) +{ + return crypto_register_alg(&alg); +} + +static void __exit fini(void) +{ + crypto_unregister_alg(&alg); +} + +module_init(init); +module_exit(fini); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION ("Twofish Cipher Algorithm, i586 asm optimized"); +MODULE_ALIAS("twofish"); diff --git a/arch/i386/defconfig b/arch/i386/defconfig index 89ebb7a..ee2d79b 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig @@ -1,41 +1,51 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.18-git7 +# Wed Sep 27 21:53:10 2006 # CONFIG_X86_32=y +CONFIG_GENERIC_TIME=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options # CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 # # General setup # CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set +CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y +# CONFIG_TASKSTATS is not set # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y +# CONFIG_CPUSETS is not set +# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL=y CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_HOTPLUG=y CONFIG_PRINTK=y @@ -45,11 +55,9 @@ CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -60,41 +68,45 @@ # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set +CONFIG_STOP_MACHINE=y # # Block layer # -# CONFIG_LBD is not set +CONFIG_LBD=y +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set # # IO Schedulers # CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_DEFAULT_IOSCHED="anticipatory" # # Processor type and features # -CONFIG_X86_PC=y +CONFIG_SMP=y +# CONFIG_X86_PC is not set # CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set # CONFIG_X86_NUMAQ is not set # CONFIG_X86_SUMMIT is not set # CONFIG_X86_BIGSMP is not set # CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set +CONFIG_X86_GENERICARCH=y # CONFIG_X86_ES7000 is not set +CONFIG_X86_CYCLONE_TIMER=y # CONFIG_M386 is not set # CONFIG_M486 is not set # CONFIG_M586 is not set @@ -102,11 +114,11 @@ # CONFIG_M586TSC is not set # CONFIG_M586MMX is not set # CONFIG_M686 is not set # CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set +CONFIG_MPENTIUMIII=y # CONFIG_MPENTIUMM is not set # CONFIG_MPENTIUM4 is not set # CONFIG_MK6 is not set -CONFIG_MK7=y +# CONFIG_MK7 is not set # CONFIG_MK8 is not set # CONFIG_MCRUSOE is not set # CONFIG_MEFFICEON is not set @@ -117,10 +129,10 @@ # CONFIG_MGEODEGX1 is not set # CONFIG_MGEODE_LX is not set # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set -# CONFIG_X86_GENERIC is not set +CONFIG_X86_GENERIC=y CONFIG_X86_CMPXCHG=y CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=6 +CONFIG_X86_L1_CACHE_SHIFT=7 CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_X86_WP_WORKS_OK=y @@ -131,26 +143,28 @@ CONFIG_X86_CMPXCHG64=y CONFIG_X86_GOOD_APIC=y CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y -CONFIG_X86_USE_3DNOW=y CONFIG_X86_TSC=y -# CONFIG_HPET_TIMER is not set -# CONFIG_SMP is not set -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_HPET_TIMER=y +CONFIG_HPET_EMULATE_RTC=y +CONFIG_NR_CPUS=32 +CONFIG_SCHED_SMT=y +CONFIG_SCHED_MC=y +# CONFIG_PREEMPT_NONE is not set +CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set -CONFIG_X86_UP_APIC=y -CONFIG_X86_UP_IOAPIC=y +CONFIG_PREEMPT_BKL=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_MCE=y CONFIG_X86_MCE_NONFATAL=y -# CONFIG_X86_MCE_P4THERMAL is not set +CONFIG_X86_MCE_P4THERMAL=y +CONFIG_VM86=y # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set -# CONFIG_MICROCODE is not set -# CONFIG_X86_MSR is not set -# CONFIG_X86_CPUID is not set +CONFIG_MICROCODE=y +CONFIG_X86_MSR=y +CONFIG_X86_CPUID=y # # Firmware Drivers @@ -158,68 +172,68 @@ # # CONFIG_EDD is not set # CONFIG_DELL_RBU is not set # CONFIG_DCDBAS is not set -CONFIG_NOHIGHMEM=y -# CONFIG_HIGHMEM4G is not set +# CONFIG_NOHIGHMEM is not set +CONFIG_HIGHMEM4G=y # CONFIG_HIGHMEM64G is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_3G_OPT is not set -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_HIGHMEM=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y # CONFIG_DISCONTIGMEM_MANUAL is not set # CONFIG_SPARSEMEM_MANUAL is not set CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_SPARSEMEM_STATIC=y +# CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_RESOURCES_64BIT=y +# CONFIG_HIGHPTE is not set # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y # CONFIG_EFI is not set +# CONFIG_IRQBALANCE is not set CONFIG_REGPARM=y -# CONFIG_SECCOMP is not set -CONFIG_HZ_100=y -# CONFIG_HZ_250 is not set +CONFIG_SECCOMP=y +# CONFIG_HZ_100 is not set +CONFIG_HZ_250=y # CONFIG_HZ_1000 is not set -CONFIG_HZ=100 +CONFIG_HZ=250 # CONFIG_KEXEC is not set +# CONFIG_CRASH_DUMP is not set CONFIG_PHYSICAL_START=0x100000 -CONFIG_DOUBLEFAULT=y +# CONFIG_HOTPLUG_CPU is not set +CONFIG_COMPAT_VDSO=y +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # # Power management options (ACPI, APM) # CONFIG_PM=y -# CONFIG_PM_LEGACY is not set +CONFIG_PM_LEGACY=y # CONFIG_PM_DEBUG is not set -CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" +CONFIG_PM_SYSFS_DEPRECATED=y # # ACPI (Advanced Configuration and Power Interface) Support # CONFIG_ACPI=y -# CONFIG_ACPI_SLEEP is not set -# CONFIG_ACPI_AC is not set -# CONFIG_ACPI_BATTERY is not set -# CONFIG_ACPI_BUTTON is not set +CONFIG_ACPI_AC=y +CONFIG_ACPI_BATTERY=y +CONFIG_ACPI_BUTTON=y # CONFIG_ACPI_VIDEO is not set # CONFIG_ACPI_HOTKEY is not set -# CONFIG_ACPI_FAN is not set -# CONFIG_ACPI_PROCESSOR is not set +CONFIG_ACPI_FAN=y +# CONFIG_ACPI_DOCK is not set +CONFIG_ACPI_PROCESSOR=y +CONFIG_ACPI_THERMAL=y # CONFIG_ACPI_ASUS is not set # CONFIG_ACPI_IBM is not set # CONFIG_ACPI_TOSHIBA is not set -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_BLACKLIST_YEAR=2001 +CONFIG_ACPI_DEBUG=y CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y -# CONFIG_X86_PM_TIMER is not set +CONFIG_X86_PM_TIMER=y # CONFIG_ACPI_CONTAINER is not set # @@ -230,7 +244,41 @@ # CONFIG_APM is not set # # CPU Frequency scaling # -# CONFIG_CPU_FREQ is not set +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +CONFIG_CPU_FREQ_DEBUG=y +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# CPUFreq processor drivers +# +CONFIG_X86_ACPI_CPUFREQ=y +# CONFIG_X86_POWERNOW_K6 is not set +# CONFIG_X86_POWERNOW_K7 is not set +CONFIG_X86_POWERNOW_K8=y +CONFIG_X86_POWERNOW_K8_ACPI=y +# CONFIG_X86_GX_SUSPMOD is not set +# CONFIG_X86_SPEEDSTEP_CENTRINO is not set +# CONFIG_X86_SPEEDSTEP_ICH is not set +# CONFIG_X86_SPEEDSTEP_SMI is not set +# CONFIG_X86_P4_CLOCKMOD is not set +# CONFIG_X86_CPUFREQ_NFORCE2 is not set +# CONFIG_X86_LONGRUN is not set +# CONFIG_X86_LONGHAUL is not set + +# +# shared options +# +CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y +# CONFIG_X86_SPEEDSTEP_LIB is not set # # Bus options (PCI, PCMCIA, EISA, MCA, ISA) @@ -244,12 +292,14 @@ CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y # CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_MSI is not set -# CONFIG_PCI_LEGACY_PROC is not set +CONFIG_PCI_MSI=y +# CONFIG_PCI_MULTITHREAD_PROBE is not set +# CONFIG_PCI_DEBUG is not set CONFIG_ISA_DMA_API=y # CONFIG_ISA is not set # CONFIG_MCA is not set # CONFIG_SCx200 is not set +CONFIG_K8_NB=y # # PCCARD (PCMCIA/CardBus) support @@ -278,93 +328,54 @@ # Networking options # # CONFIG_NETDEBUG is not set CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y +# CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set # CONFIG_NET_KEY is not set CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set +CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_FIB_HASH=y -# CONFIG_IP_PNP is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -# CONFIG_INET_DIAG is not set +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -CONFIG_NETFILTER_XTABLES=y -# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set -# CONFIG_NETFILTER_XT_TARGET_MARK is not set -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set -CONFIG_NETFILTER_XT_MATCH_LIMIT=y -CONFIG_NETFILTER_XT_MATCH_MAC=y -# CONFIG_NETFILTER_XT_MATCH_MARK is not set -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_STATE=y -# CONFIG_NETFILTER_XT_MATCH_STRING is not set -# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=y -# CONFIG_IP_NF_CT_ACCT is not set -# CONFIG_IP_NF_CONNTRACK_MARK is not set -# CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=y -# CONFIG_IP_NF_IRC is not set -# CONFIG_IP_NF_NETBIOS_NS is not set -# CONFIG_IP_NF_TFTP is not set -# CONFIG_IP_NF_AMANDA is not set -# CONFIG_IP_NF_PPTP is not set -# CONFIG_IP_NF_QUEUE is not set -CONFIG_IP_NF_IPTABLES=y -# CONFIG_IP_NF_MATCH_IPRANGE is not set -# CONFIG_IP_NF_MATCH_MULTIPORT is not set -# CONFIG_IP_NF_MATCH_TOS is not set -# CONFIG_IP_NF_MATCH_RECENT is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_DSCP is not set -# CONFIG_IP_NF_MATCH_AH_ESP is not set -# CONFIG_IP_NF_MATCH_TTL is not set -# CONFIG_IP_NF_MATCH_OWNER is not set -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set -CONFIG_IP_NF_FILTER=y -# CONFIG_IP_NF_TARGET_REJECT is not set -CONFIG_IP_NF_TARGET_LOG=y -# CONFIG_IP_NF_TARGET_ULOG is not set -# CONFIG_IP_NF_TARGET_TCPMSS is not set -# CONFIG_IP_NF_NAT is not set -# CONFIG_IP_NF_MANGLE is not set -# CONFIG_IP_NF_RAW is not set -# CONFIG_IP_NF_ARPTABLES is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +CONFIG_IPV6=y +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=y +CONFIG_INET6_XFRM_MODE_TUNNEL=y +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_SUBTREES is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set # # DCCP Configuration (EXPERIMENTAL) @@ -389,7 +400,6 @@ # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set @@ -402,6 +412,7 @@ # # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set @@ -416,7 +427,9 @@ # Generic Driver Options # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set +CONFIG_FW_LOADER=y +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -431,13 +444,7 @@ # CONFIG_MTD is not set # # Parallel port support # -CONFIG_PARPORT=y -CONFIG_PARPORT_PC=y -# CONFIG_PARPORT_SERIAL is not set -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -# CONFIG_PARPORT_GSC is not set -CONFIG_PARPORT_1284=y +# CONFIG_PARPORT is not set # # Plug and Play support @@ -447,8 +454,7 @@ # CONFIG_PNP is not set # # Block devices # -# CONFIG_BLK_DEV_FD is not set -# CONFIG_PARIDE is not set +CONFIG_BLK_DEV_FD=y # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set @@ -459,8 +465,11 @@ # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -476,7 +485,7 @@ # # CONFIG_BLK_DEV_IDE_SATA is not set # CONFIG_BLK_DEV_HD_IDE is not set CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set +CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set @@ -486,10 +495,10 @@ # CONFIG_IDE_TASK_IOCTL is not set # # IDE chipset support/bugfixes # -# CONFIG_IDE_GENERIC is not set +CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_CMD640 is not set CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y +# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_GENERIC is not set # CONFIG_BLK_DEV_OPTI621 is not set @@ -500,7 +509,7 @@ CONFIG_IDEDMA_PCI_AUTO=y # CONFIG_IDEDMA_ONLYDISK is not set # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set -# CONFIG_BLK_DEV_AMD74XX is not set +CONFIG_BLK_DEV_AMD74XX=y # CONFIG_BLK_DEV_ATIIXP is not set # CONFIG_BLK_DEV_CMD64X is not set # CONFIG_BLK_DEV_TRIFLEX is not set @@ -511,7 +520,7 @@ # CONFIG_BLK_DEV_CS5535 is not set # CONFIG_BLK_DEV_HPT34X is not set # CONFIG_BLK_DEV_HPT366 is not set # CONFIG_BLK_DEV_SC1200 is not set -# CONFIG_BLK_DEV_PIIX is not set +CONFIG_BLK_DEV_PIIX=y # CONFIG_BLK_DEV_IT821X is not set # CONFIG_BLK_DEV_NS87415 is not set # CONFIG_BLK_DEV_PDC202XX_OLD is not set @@ -521,7 +530,7 @@ # CONFIG_BLK_DEV_SIIMAGE is not set # CONFIG_BLK_DEV_SIS5513 is not set # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y +# CONFIG_BLK_DEV_VIA82CXXX is not set # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set @@ -533,6 +542,7 @@ # SCSI device support # # CONFIG_RAID_ATTRS is not set CONFIG_SCSI=y +CONFIG_SCSI_NETLINK=y # CONFIG_SCSI_PROC_FS is not set # @@ -541,8 +551,9 @@ # CONFIG_BLK_DEV_SD=y # CONFIG_CHR_DEV_ST is not set # CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=y # CONFIG_CHR_DEV_SCH is not set # @@ -553,29 +564,44 @@ # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set # -# SCSI Transport Attributes +# SCSI Transports # -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set +CONFIG_SCSI_SPI_ATTRS=y +CONFIG_SCSI_FC_ATTRS=y # CONFIG_SCSI_ISCSI_ATTRS is not set # CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set # # SCSI low-level drivers # # CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +CONFIG_BLK_DEV_3W_XXXX_RAID=y # CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set +CONFIG_SCSI_AIC7XXX=y +CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 +CONFIG_AIC7XXX_RESET_DELAY_MS=5000 +CONFIG_AIC7XXX_DEBUG_ENABLE=y +CONFIG_AIC7XXX_DEBUG_MASK=0 +CONFIG_AIC7XXX_REG_PRETTY_PRINT=y # CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set +CONFIG_SCSI_AIC79XX=y +CONFIG_AIC79XX_CMDS_PER_DEVICE=32 +CONFIG_AIC79XX_RESET_DELAY_MS=4000 +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set +# CONFIG_AIC79XX_DEBUG_ENABLE is not set +CONFIG_AIC79XX_DEBUG_MASK=0 +# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set +# CONFIG_SCSI_AIC94XX is not set # CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_ARCMSR is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set @@ -584,11 +610,9 @@ # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_PPA is not set -# CONFIG_SCSI_IMM is not set +# CONFIG_SCSI_STEX is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_LPFC is not set @@ -598,22 +622,114 @@ # CONFIG_SCSI_NSP32 is not set # CONFIG_SCSI_DEBUG is not set # +# Serial ATA (prod) and Parallel ATA (experimental) drivers +# +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_SVW=y +CONFIG_ATA_PIIX=y +# CONFIG_SATA_MV is not set +CONFIG_SATA_NV=y +# CONFIG_PDC_ADMA is not set +# CONFIG_SATA_QSTOR is not set +# CONFIG_SATA_PROMISE is not set +# CONFIG_SATA_SX4 is not set +CONFIG_SATA_SIL=y +# CONFIG_SATA_SIL24 is not set +# CONFIG_SATA_SIS is not set +# CONFIG_SATA_ULI is not set +CONFIG_SATA_VIA=y +# CONFIG_SATA_VITESSE is not set +CONFIG_SATA_INTEL_COMBINED=y +# CONFIG_PATA_ALI is not set +# CONFIG_PATA_AMD is not set +# CONFIG_PATA_ARTOP is not set +# CONFIG_PATA_ATIIXP is not set +# CONFIG_PATA_CMD64X is not set +# CONFIG_PATA_CS5520 is not set +# CONFIG_PATA_CS5530 is not set +# CONFIG_PATA_CS5535 is not set +# CONFIG_PATA_CYPRESS is not set +# CONFIG_PATA_EFAR is not set +# CONFIG_ATA_GENERIC is not set +# CONFIG_PATA_HPT366 is not set +# CONFIG_PATA_HPT37X is not set +# CONFIG_PATA_HPT3X2N is not set +# CONFIG_PATA_HPT3X3 is not set +# CONFIG_PATA_IT821X is not set +# CONFIG_PATA_JMICRON is not set +# CONFIG_PATA_LEGACY is not set +# CONFIG_PATA_TRIFLEX is not set +# CONFIG_PATA_MPIIX is not set +# CONFIG_PATA_OLDPIIX is not set +# CONFIG_PATA_NETCELL is not set +# CONFIG_PATA_NS87410 is not set +# CONFIG_PATA_OPTI is not set +# CONFIG_PATA_OPTIDMA is not set +# CONFIG_PATA_PDC_OLD is not set +# CONFIG_PATA_QDI is not set +# CONFIG_PATA_RADISYS is not set +# CONFIG_PATA_RZ1000 is not set +# CONFIG_PATA_SC1200 is not set +# CONFIG_PATA_SERVERWORKS is not set +# CONFIG_PATA_PDC2027X is not set +# CONFIG_PATA_SIL680 is not set +# CONFIG_PATA_SIS is not set +# CONFIG_PATA_VIA is not set +# CONFIG_PATA_WINBOND is not set + +# # Multi-device support (RAID and LVM) # -# CONFIG_MD is not set +CONFIG_MD=y +# CONFIG_BLK_DEV_MD is not set +CONFIG_BLK_DEV_DM=y +# CONFIG_DM_CRYPT is not set +# CONFIG_DM_SNAPSHOT is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set # # Fusion MPT device support # -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set +CONFIG_FUSION=y +CONFIG_FUSION_SPI=y # CONFIG_FUSION_FC is not set # CONFIG_FUSION_SAS is not set +CONFIG_FUSION_MAX_SGE=128 +# CONFIG_FUSION_CTL is not set # # IEEE 1394 (FireWire) support # -# CONFIG_IEEE1394 is not set +CONFIG_IEEE1394=y + +# +# Subsystem Options +# +# CONFIG_IEEE1394_VERBOSEDEBUG is not set +# CONFIG_IEEE1394_OUI_DB is not set +# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set +# CONFIG_IEEE1394_EXPORT_FULL_API is not set + +# +# Device Drivers +# + +# +# Texas Instruments PCILynx requires I2C +# +CONFIG_IEEE1394_OHCI1394=y + +# +# Protocol Drivers +# +# CONFIG_IEEE1394_VIDEO1394 is not set +# CONFIG_IEEE1394_SBP2 is not set +# CONFIG_IEEE1394_ETH1394 is not set +# CONFIG_IEEE1394_DV1394 is not set +CONFIG_IEEE1394_RAWIO=y # # I2O device support @@ -652,46 +768,63 @@ # CONFIG_NET_VENDOR_3COM is not set # # Tulip family network device support # -# CONFIG_NET_TULIP is not set +CONFIG_NET_TULIP=y +# CONFIG_DE2104X is not set +CONFIG_TULIP=y +# CONFIG_TULIP_MWI is not set +# CONFIG_TULIP_MMIO is not set +# CONFIG_TULIP_NAPI is not set +# CONFIG_DE4X5 is not set +# CONFIG_WINBOND_840 is not set +# CONFIG_DM9102 is not set +# CONFIG_ULI526X is not set # CONFIG_HP100 is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set +CONFIG_B44=y +CONFIG_FORCEDETH=y +# CONFIG_FORCEDETH_NAPI is not set # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set CONFIG_E100=y # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set +CONFIG_8139CP=y +CONFIG_8139TOO=y +# CONFIG_8139TOO_PIO is not set +# CONFIG_8139TOO_TUNE_TWISTER is not set +# CONFIG_8139TOO_8129 is not set +# CONFIG_8139_OLD_RX_RESET is not set # CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set -# CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # # CONFIG_ACENIC is not set # CONFIG_DL2K is not set -# CONFIG_E1000 is not set +CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set +CONFIG_R8169=y +# CONFIG_R8169_NAPI is not set # CONFIG_SIS190 is not set # CONFIG_SKGE is not set -# CONFIG_SKY2 is not set +CONFIG_SKY2=y # CONFIG_SK98LIN is not set # CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set +CONFIG_TIGON3=y +CONFIG_BNX2=y +# CONFIG_QLA3XXX is not set # # Ethernet (10000 Mbit) @@ -699,6 +832,7 @@ # # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set +# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -716,14 +850,15 @@ # # CONFIG_WAN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set -# CONFIG_PLIP is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_NETCONSOLE=y +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y # # ISDN subsystem @@ -745,8 +880,8 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1280 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set CONFIG_INPUT_EVDEV=y @@ -776,7 +911,6 @@ CONFIG_SERIO=y CONFIG_SERIO_I8042=y # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set @@ -788,14 +922,15 @@ # CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # CONFIG_SERIAL_8250=y -# CONFIG_SERIAL_8250_CONSOLE is not set -# CONFIG_SERIAL_8250_ACPI is not set +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set @@ -804,14 +939,11 @@ # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_PRINTER=y -# CONFIG_LP_CONSOLE is not set -# CONFIG_PPDEV is not set -# CONFIG_TIPAR is not set # # IPMI @@ -822,8 +954,12 @@ # # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set -CONFIG_NVRAM=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_INTEL=y +CONFIG_HW_RANDOM_AMD=y +CONFIG_HW_RANDOM_GEODE=y +CONFIG_HW_RANDOM_VIA=y +# CONFIG_NVRAM is not set CONFIG_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -833,31 +969,28 @@ # CONFIG_SONYPI is not set # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set CONFIG_AGP=y # CONFIG_AGP_ALI is not set # CONFIG_AGP_ATI is not set # CONFIG_AGP_AMD is not set -# CONFIG_AGP_AMD64 is not set -# CONFIG_AGP_INTEL is not set +CONFIG_AGP_AMD64=y +CONFIG_AGP_INTEL=y # CONFIG_AGP_NVIDIA is not set # CONFIG_AGP_SIS is not set # CONFIG_AGP_SWORKS is not set -CONFIG_AGP_VIA=y +# CONFIG_AGP_VIA is not set # CONFIG_AGP_EFFICEON is not set -CONFIG_DRM=y -# CONFIG_DRM_TDFX is not set -# CONFIG_DRM_R128 is not set -CONFIG_DRM_RADEON=y -# CONFIG_DRM_MGA is not set -# CONFIG_DRM_SIS is not set -# CONFIG_DRM_VIA is not set -# CONFIG_DRM_SAVAGE is not set +# CONFIG_DRM is not set # CONFIG_MWAVE is not set +# CONFIG_PC8736x_GPIO is not set +# CONFIG_NSC_GPIO is not set # CONFIG_CS5535_GPIO is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -# CONFIG_HANGCHECK_TIMER is not set +CONFIG_RAW_DRIVER=y +CONFIG_MAX_RAW_DEVS=256 +CONFIG_HPET=y +# CONFIG_HPET_RTC_IRQ is not set +CONFIG_HPET_MMAP=y +CONFIG_HANGCHECK_TIMER=y # # TPM devices @@ -868,59 +1001,7 @@ # CONFIG_TELCLOCK is not set # # I2C support # -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=y -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=y -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_SCx200_ACB is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_VIA is not set -CONFIG_I2C_VIAPRO=y -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set +# CONFIG_I2C is not set # # SPI support @@ -931,51 +1012,12 @@ # CONFIG_SPI_MASTER is not set # # Dallas's 1-wire bus # -# CONFIG_W1 is not set # # Hardware Monitoring support # -CONFIG_HWMON=y -CONFIG_HWMON_VID=y -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -CONFIG_SENSORS_IT87=y -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_SENSORS_HDAPS is not set -# CONFIG_HWMON_DEBUG_CHIP is not set +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set # # Misc devices @@ -983,117 +1025,31 @@ # # CONFIG_IBM_ASM is not set # -# Multimedia Capabilities Port drivers -# - -# # Multimedia devices # -CONFIG_VIDEO_DEV=y - -# -# Video For Linux -# - -# -# Video Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_BWQCAM is not set -# CONFIG_VIDEO_CQCAM is not set -# CONFIG_VIDEO_W9966 is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_VIDEO_ZORAN is not set -CONFIG_VIDEO_SAA7134=y -# CONFIG_VIDEO_SAA7134_ALSA is not set -# CONFIG_VIDEO_MXB is not set -# CONFIG_VIDEO_DPC is not set -# CONFIG_VIDEO_HEXIUM_ORION is not set -# CONFIG_VIDEO_HEXIUM_GEMINI is not set -# CONFIG_VIDEO_CX88 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_VIDEO_AUDIO_DECODER is not set -# CONFIG_VIDEO_DECODER is not set - -# -# Radio Adapters -# -# CONFIG_RADIO_GEMTEK_PCI is not set -# CONFIG_RADIO_MAXIRADIO is not set -# CONFIG_RADIO_MAESTRO is not set +# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set -CONFIG_VIDEO_TUNER=y -CONFIG_VIDEO_BUF=y -CONFIG_VIDEO_IR=y +# CONFIG_USB_DABUSB is not set # # Graphics support # -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -CONFIG_FB_MODE_HELPERS=y -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_VGA16 is not set -# CONFIG_FB_VESA is not set -CONFIG_VIDEO_SELECT=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_I810 is not set -# CONFIG_FB_INTEL is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -CONFIG_FB_RADEON=y -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_CYBLA is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set +CONFIG_FIRMWARE_EDID=y +# CONFIG_FB is not set # # Console display driver support # CONFIG_VGA_CONSOLE=y +CONFIG_VGACON_SOFT_SCROLLBACK=y +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=128 +CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # @@ -1104,97 +1060,30 @@ CONFIG_SOUND=y # # Advanced Linux Sound Architecture # -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_RAWMIDI=y -CONFIG_SND_SEQUENCER=y -# CONFIG_SND_SEQ_DUMMY is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_SEQUENCER_OSS is not set -CONFIG_SND_RTCTIMER=y -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=y -CONFIG_SND_AC97_CODEC=y -CONFIG_SND_AC97_BUS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_VIRMIDI is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# PCI devices -# -# CONFIG_SND_AD1889 is not set -# CONFIG_SND_ALS4000 is not set -# CONFIG_SND_ALI5451 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_ATIIXP_MODEM is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AZT3328 is not set -# CONFIG_SND_BT87X is not set -# CONFIG_SND_CA0106 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_CS5535AUDIO is not set -# CONFIG_SND_EMU10K1 is not set -# CONFIG_SND_EMU10K1X is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_ES1938 is not set -# CONFIG_SND_ES1968 is not set -# CONFIG_SND_FM801 is not set -# CONFIG_SND_HDA_INTEL is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_HDSPM is not set -# CONFIG_SND_ICE1712 is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_MAESTRO3 is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_PCXHR is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_SONICVIBES is not set -# CONFIG_SND_TRIDENT is not set -CONFIG_SND_VIA82XX=y -# CONFIG_SND_VIA82XX_MODEM is not set -# CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set - -# -# USB devices -# -# CONFIG_SND_USB_AUDIO is not set -# CONFIG_SND_USB_USX2Y is not set +# CONFIG_SND is not set # # Open Sound System # -# CONFIG_SOUND_PRIME is not set +CONFIG_SOUND_PRIME=y +CONFIG_OSS_OBSOLETE_DRIVER=y +# CONFIG_SOUND_BT878 is not set +# CONFIG_SOUND_EMU10K1 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_ES1371 is not set +CONFIG_SOUND_ICH=y +# CONFIG_SOUND_TRIDENT is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +# CONFIG_SOUND_VIA82CXXX is not set +# CONFIG_SOUND_OSS is not set # # USB support # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=y # CONFIG_USB_DEBUG is not set @@ -1213,17 +1102,19 @@ # CONFIG_USB_EHCI_HCD=y # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set +# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_UHCI_HCD=y # CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers # -# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set # CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set +CONFIG_USB_PRINTER=y # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' @@ -1248,21 +1139,17 @@ # CONFIG_USB_LIBUSUAL is not set # # USB Input Devices # -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +# CONFIG_USB_HIDDEV is not set # CONFIG_USB_AIPTEK is not set # CONFIG_USB_WACOM is not set # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set +# CONFIG_USB_TOUCHSCREEN is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -1277,21 +1164,6 @@ # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set # -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set -# CONFIG_USB_VICAM is not set -# CONFIG_USB_DSBR is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_USB_IBMCAM is not set -# CONFIG_USB_KONICAWC is not set -# CONFIG_USB_OV511 is not set -# CONFIG_USB_SE401 is not set -# CONFIG_USB_SN9C102 is not set -# CONFIG_USB_STV680 is not set -# CONFIG_USB_PWC is not set - -# # USB Network Adapters # # CONFIG_USB_CATC is not set @@ -1299,12 +1171,11 @@ # CONFIG_USB_KAWETH is not set # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set -# CONFIG_USB_MON is not set +CONFIG_USB_MON=y # # USB port drivers # -# CONFIG_USB_USS720 is not set # # USB Serial Converter support @@ -1321,10 +1192,12 @@ # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -1344,56 +1217,96 @@ # # CONFIG_MMC is not set # +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# # InfiniBand support # # CONFIG_INFINIBAND is not set # -# SN Devices +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# +# CONFIG_EDAC is not set + +# +# Real Time Clock # +# CONFIG_RTC_CLASS is not set # -# EDAC - error detection and reporting (RAS) +# DMA Engine support +# +# CONFIG_DMA_ENGINE is not set + +# +# DMA Clients +# + +# +# DMA Devices # -# CONFIG_EDAC is not set # # File systems # CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +# CONFIG_EXT2_FS_SECURITY is not set # CONFIG_EXT2_FS_XIP is not set -# CONFIG_EXT3_FS is not set -# CONFIG_REISERFS_FS is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=y +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +# CONFIG_REISERFS_FS_SECURITY is not set # CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set +CONFIG_FS_POSIX_ACL=y # CONFIG_XFS_FS is not set # CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set -# CONFIG_INOTIFY is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set +CONFIG_AUTOFS4_FS=y # CONFIG_FUSE_FS is not set # # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set # CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # CONFIG_FAT_FS=y -# CONFIG_MSDOS_FS is not set +CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=850 +CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set @@ -1404,10 +1317,9 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y CONFIG_TMPFS=y -# CONFIG_HUGETLBFS is not set -# CONFIG_HUGETLB_PAGE is not set +CONFIG_HUGETLBFS=y +CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -1430,13 +1342,26 @@ # CONFIG_UFS_FS is not set # # Network File Systems # -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set -CONFIG_CIFS=y -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1445,33 +1370,18 @@ # CONFIG_9P_FS is not set # # Partition Types # -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set +# CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set # # Native Language Support # CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-15" -# CONFIG_NLS_CODEPAGE_437 is not set +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=y +# CONFIG_NLS_CODEPAGE_850 is not set # CONFIG_NLS_CODEPAGE_852 is not set # CONFIG_NLS_CODEPAGE_855 is not set # CONFIG_NLS_CODEPAGE_857 is not set @@ -1491,7 +1401,7 @@ # CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -1510,20 +1420,51 @@ CONFIG_NLS_UTF8=y # # Instrumentation Support # -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_KPROBES=y # # Kernel hacking # +CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set +# CONFIG_ENABLE_MUST_CHECK is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 +CONFIG_UNUSED_SYMBOLS=y +CONFIG_DEBUG_KERNEL=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_HIGHMEM is not set CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_FRAME_POINTER is not set +CONFIG_UNWIND_INFO=y +CONFIG_STACK_UNWIND=y +# CONFIG_FORCED_INLINING is not set +# CONFIG_RCU_TORTURE_TEST is not set CONFIG_EARLY_PRINTK=y +CONFIG_DEBUG_STACKOVERFLOW=y +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_RODATA is not set +# CONFIG_4KSTACKS is not set CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y +CONFIG_DOUBLEFAULT=y # # Security options @@ -1537,10 +1478,6 @@ # # CONFIG_CRYPTO is not set # -# Hardware crypto devices -# - -# # Library routines # # CONFIG_CRC_CCITT is not set @@ -1548,7 +1485,12 @@ # CONFIG_CRC16 is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y +CONFIG_PLIST=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_PENDING_IRQ=y +CONFIG_X86_SMP=y +CONFIG_X86_HT=y CONFIG_X86_BIOS_REBOOT=y +CONFIG_X86_TRAMPOLINE=y CONFIG_KTIME_SCALAR=y diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index 5427a84..1a884b6 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile @@ -4,7 +4,7 @@ # extra-y := head.o init_task.o vmlinux.lds -obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ +obj-y := process.o signal.o entry.o traps.o irq.o \ ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ pci-dma.o i386_ksyms.o i387.o bootflag.o \ quirks.o i8237.o topology.o alternative.o i8253.o tsc.o @@ -81,4 +81,5 @@ SYSCFLAGS_vsyscall-syms.o = -r $(call if_changed,syscall) k8-y += ../../x86_64/kernel/k8.o +stacktrace-y += ../../x86_64/kernel/stacktrace.o diff --git a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile index 7e9ac99..7f7be01 100644 --- a/arch/i386/kernel/acpi/Makefile +++ b/arch/i386/kernel/acpi/Makefile @@ -1,5 +1,7 @@ obj-$(CONFIG_ACPI) += boot.o +ifneq ($(CONFIG_PCI),) obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o +endif obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o ifneq ($(CONFIG_ACPI_PROCESSOR),) diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index ee003bc..1aaea6a 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c @@ -26,9 +26,12 @@ #include #include #include +#include #include #include #include +#include +#include #include #include @@ -36,11 +39,17 @@ #include #include #include -#ifdef CONFIG_X86_64 +static int __initdata acpi_force = 0; -extern void __init clustered_apic_check(void); +#ifdef CONFIG_ACPI +int acpi_disabled = 0; +#else +int acpi_disabled = 1; +#endif +EXPORT_SYMBOL(acpi_disabled); + +#ifdef CONFIG_X86_64 -extern int gsi_irq_sharing(int gsi); #include static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return 0; } @@ -506,16 +515,76 @@ EXPORT_SYMBOL(acpi_register_gsi); #ifdef CONFIG_ACPI_HOTPLUG_CPU int acpi_map_lsapic(acpi_handle handle, int *pcpu) { - /* TBD */ - return -EINVAL; + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; + union acpi_object *obj; + struct acpi_table_lapic *lapic; + cpumask_t tmp_map, new_map; + u8 physid; + int cpu; + + if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) + return -EINVAL; + + if (!buffer.length || !buffer.pointer) + return -EINVAL; + + obj = buffer.pointer; + if (obj->type != ACPI_TYPE_BUFFER || + obj->buffer.length < sizeof(*lapic)) { + kfree(buffer.pointer); + return -EINVAL; + } + + lapic = (struct acpi_table_lapic *)obj->buffer.pointer; + + if ((lapic->header.type != ACPI_MADT_LAPIC) || + (!lapic->flags.enabled)) { + kfree(buffer.pointer); + return -EINVAL; + } + + physid = lapic->id; + + kfree(buffer.pointer); + buffer.length = ACPI_ALLOCATE_BUFFER; + buffer.pointer = NULL; + + tmp_map = cpu_present_map; + mp_register_lapic(physid, lapic->flags.enabled); + + /* + * If mp_register_lapic successfully generates a new logical cpu + * number, then the following will get us exactly what was mapped + */ + cpus_andnot(new_map, cpu_present_map, tmp_map); + if (cpus_empty(new_map)) { + printk ("Unable to map lapic to logical cpu number\n"); + return -EINVAL; + } + + cpu = first_cpu(new_map); + + *pcpu = cpu; + return 0; } EXPORT_SYMBOL(acpi_map_lsapic); int acpi_unmap_lsapic(int cpu) { - /* TBD */ - return -EINVAL; + int i; + + for_each_possible_cpu(i) { + if (x86_acpiid_to_apicid[i] == x86_cpu_to_apicid[cpu]) { + x86_acpiid_to_apicid[i] = -1; + break; + } + } + x86_cpu_to_apicid[cpu] = -1; + cpu_clear(cpu, cpu_present_map); + num_processors--; + + return (0); } EXPORT_SYMBOL(acpi_unmap_lsapic); @@ -579,6 +648,8 @@ #ifdef CONFIG_HPET_TIMER static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) { struct acpi_table_hpet *hpet_tbl; + struct resource *hpet_res; + resource_size_t res_start; if (!phys || !size) return -EINVAL; @@ -594,12 +665,26 @@ static int __init acpi_parse_hpet(unsign "memory.\n"); return -1; } + +#define HPET_RESOURCE_NAME_SIZE 9 + hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE); + if (hpet_res) { + memset(hpet_res, 0, sizeof(*hpet_res)); + hpet_res->name = (void *)&hpet_res[1]; + hpet_res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; + snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, + "HPET %u", hpet_tbl->number); + hpet_res->end = (1 * 1024) - 1; + } + #ifdef CONFIG_X86_64 vxtime.hpet_address = hpet_tbl->addr.addrl | ((long)hpet_tbl->addr.addrh << 32); printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", hpet_tbl->id, vxtime.hpet_address); + + res_start = vxtime.hpet_address; #else /* X86 */ { extern unsigned long hpet_address; @@ -607,9 +692,17 @@ #else /* X86 */ hpet_address = hpet_tbl->addr.addrl; printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", hpet_tbl->id, hpet_address); + + res_start = hpet_address; } #endif /* X86 */ + if (hpet_res) { + hpet_res->start = res_start; + hpet_res->end += res_start; + insert_resource(&iomem_resource, hpet_res); + } + return 0; } #else @@ -860,8 +953,6 @@ #endif return; } -extern int acpi_force; - #ifdef __i386__ static int __init disable_acpi_irq(struct dmi_system_id *d) @@ -1163,3 +1254,75 @@ int __init acpi_boot_init(void) return 0; } + +static int __init parse_acpi(char *arg) +{ + if (!arg) + return -EINVAL; + + /* "acpi=off" disables both ACPI table parsing and interpreter */ + if (strcmp(arg, "off") == 0) { + disable_acpi(); + } + /* acpi=force to over-ride black-list */ + else if (strcmp(arg, "force") == 0) { + acpi_force = 1; + acpi_ht = 1; + acpi_disabled = 0; + } + /* acpi=strict disables out-of-spec workarounds */ + else if (strcmp(arg, "strict") == 0) { + acpi_strict = 1; + } + /* Limit ACPI just to boot-time to enable HT */ + else if (strcmp(arg, "ht") == 0) { + if (!acpi_force) + disable_acpi(); + acpi_ht = 1; + } + /* "acpi=noirq" disables ACPI interrupt routing */ + else if (strcmp(arg, "noirq") == 0) { + acpi_noirq_set(); + } else { + /* Core will printk when we return error. */ + return -EINVAL; + } + return 0; +} +early_param("acpi", parse_acpi); + +/* FIXME: Using pci= for an ACPI parameter is a travesty. */ +static int __init parse_pci(char *arg) +{ + if (arg && strcmp(arg, "noacpi") == 0) + acpi_disable_pci(); + return 0; +} +early_param("pci", parse_pci); + +#ifdef CONFIG_X86_IO_APIC +static int __init parse_acpi_skip_timer_override(char *arg) +{ + acpi_skip_timer_override = 1; + return 0; +} +early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override); +#endif /* CONFIG_X86_IO_APIC */ + +static int __init setup_acpi_sci(char *s) +{ + if (!s) + return -EINVAL; + if (!strcmp(s, "edge")) + acpi_sci_flags.trigger = 1; + else if (!strcmp(s, "level")) + acpi_sci_flags.trigger = 3; + else if (!strcmp(s, "high")) + acpi_sci_flags.polarity = 1; + else if (!strcmp(s, "low")) + acpi_sci_flags.polarity = 3; + else + return -EINVAL; + return 0; +} +early_param("acpi_sci", setup_acpi_sci); diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c index 1649a17..fe799b1 100644 --- a/arch/i386/kernel/acpi/earlyquirk.c +++ b/arch/i386/kernel/acpi/earlyquirk.c @@ -48,7 +48,11 @@ void __init check_acpi_pci(void) int num, slot, func; /* Assume the machine supports type 1. If not it will - always read ffffffff and should not have any side effect. */ + always read ffffffff and should not have any side effect. + Actually a few buggy systems can machine check. Allow the user + to disable it by command line option at least -AK */ + if (!early_pci_allowed()) + return; /* Poor man's PCI discovery */ for (num = 0; num < 32; num++) { diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 8c844d0..90faae5 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c @@ -52,7 +52,18 @@ static cpumask_t timer_bcast_ipi; /* * Knob to control our willingness to enable the local APIC. */ -int enable_local_apic __initdata = 0; /* -1=force-disable, +1=force-enable */ +static int enable_local_apic __initdata = 0; /* -1=force-disable, +1=force-enable */ + +static inline void lapic_disable(void) +{ + enable_local_apic = -1; + clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); +} + +static inline void lapic_enable(void) +{ + enable_local_apic = 1; +} /* * Debug level @@ -586,8 +597,7 @@ #endif printk("No ESR for 82489DX.\n"); } - if (nmi_watchdog == NMI_LOCAL_APIC) - setup_apic_nmi_watchdog(); + setup_apic_nmi_watchdog(NULL); apic_pm_activate(); } @@ -1373,3 +1383,18 @@ #endif return 0; } + +static int __init parse_lapic(char *arg) +{ + lapic_enable(); + return 0; +} +early_param("lapic", parse_lapic); + +static int __init parse_nolapic(char *arg) +{ + lapic_disable(); + return 0; +} +early_param("nolapic", parse_nolapic); + diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 8591f2f..b42f2d9 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c @@ -225,6 +225,7 @@ #include #include #include #include +#include #include #include @@ -402,8 +403,6 @@ static int realmode_power_off = 1; #else static int realmode_power_off; #endif -static int exit_kapmd __read_mostly; -static int kapmd_running __read_mostly; #ifdef CONFIG_APM_ALLOW_INTS static int allow_ints = 1; #else @@ -419,6 +418,8 @@ static const struct desc_struct bad_bios static const char driver_version[] = "1.16ac"; /* no spaces */ +static struct task_struct *kapmd_task; + /* * APM event names taken from the APM 1.2 specification. These are * the message codes that the BIOS uses to tell us about events @@ -1154,9 +1155,11 @@ out: static void set_time(void) { + struct timespec ts; if (got_clock_diff) { /* Must know time zone in order to set clock */ - xtime.tv_sec = get_cmos_time() + clock_cmos_diff; - xtime.tv_nsec = 0; + ts.tv_sec = get_cmos_time() + clock_cmos_diff; + ts.tv_nsec = 0; + do_settimeofday(&ts); } } @@ -1232,13 +1235,8 @@ static int suspend(int vetoable) restore_processor_state(); local_irq_disable(); - write_seqlock(&xtime_lock); - spin_lock(&i8253_lock); - reinit_timer(); set_time(); - - spin_unlock(&i8253_lock); - write_sequnlock(&xtime_lock); + reinit_timer(); if (err == APM_NO_ERROR) err = APM_SUCCESS; @@ -1365,9 +1363,7 @@ #endif ignore_bounce = 1; if ((event != APM_NORMAL_RESUME) || (ignore_normal_resume == 0)) { - write_seqlock_irq(&xtime_lock); set_time(); - write_sequnlock_irq(&xtime_lock); device_resume(); pm_send_all(PM_RESUME, (void *)0); queue_event(event, NULL); @@ -1383,9 +1379,7 @@ #endif break; case APM_UPDATE_TIME: - write_seqlock_irq(&xtime_lock); set_time(); - write_sequnlock_irq(&xtime_lock); break; case APM_CRITICAL_SUSPEND: @@ -1430,7 +1424,7 @@ static void apm_mainloop(void) set_current_state(TASK_INTERRUPTIBLE); for (;;) { schedule_timeout(APM_CHECK_TIMEOUT); - if (exit_kapmd) + if (kthread_should_stop()) break; /* * Ok, check all events, check for idle (and mark us sleeping @@ -1713,12 +1707,6 @@ static int apm(void *unused) char * power_stat; char * bat_stat; - kapmd_running = 1; - - daemonize("kapmd"); - - current->flags |= PF_NOFREEZE; - #ifdef CONFIG_SMP /* 2002/08/01 - WT * This is to avoid random crashes at boot time during initialization @@ -1828,7 +1816,6 @@ #if defined(CONFIG_APM_DISPLAY_BLANK) && console_blank_hook = NULL; #endif } - kapmd_running = 0; return 0; } @@ -2227,7 +2214,7 @@ static int __init apm_init(void) { struct proc_dir_entry *apm_proc; struct desc_struct *gdt; - int ret; + int err; dmi_check_system(apm_dmi_table); @@ -2336,11 +2323,17 @@ #endif if (apm_proc) apm_proc->owner = THIS_MODULE; - ret = kernel_thread(apm, NULL, CLONE_KERNEL | SIGCHLD); - if (ret < 0) { - printk(KERN_ERR "apm: disabled - Unable to start kernel thread.\n"); - return -ENOMEM; + kapmd_task = kthread_create(apm, NULL, "kapmd"); + if (IS_ERR(kapmd_task)) { + printk(KERN_ERR "apm: disabled - Unable to start kernel " + "thread.\n"); + err = PTR_ERR(kapmd_task); + kapmd_task = NULL; + remove_proc_entry("apm", NULL); + return err; } + kapmd_task->flags |= PF_NOFREEZE; + wake_up_process(kapmd_task); if (num_online_cpus() > 1 && !smp ) { printk(KERN_NOTICE @@ -2348,7 +2341,13 @@ #endif return 0; } - misc_register(&apm_device); + /* + * Note we don't actually care if the misc_device cannot be registered. + * this driver can do its job without it, even if userspace can't + * control it. just log the error + */ + if (misc_register(&apm_device)) + printk(KERN_WARNING "apm: Could not register misc device.\n"); if (HZ != 100) idle_period = (idle_period * HZ) / 100; @@ -2384,9 +2383,10 @@ static void __exit apm_exit(void) remove_proc_entry("apm", NULL); if (power_off) pm_power_off = NULL; - exit_kapmd = 1; - while (kapmd_running) - schedule(); + if (kapmd_task) { + kthread_stop(kapmd_task); + kapmd_task = NULL; + } #ifdef CONFIG_PM_LEGACY pm_active = 0; #endif diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index e6a2d6b..e475809 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c @@ -22,7 +22,7 @@ #include "cpu.h" extern void vide(void); __asm__(".align 4\nvide: ret"); -static void __init init_amd(struct cpuinfo_x86 *c) +static void __cpuinit init_amd(struct cpuinfo_x86 *c) { u32 l, h; int mbytes = num_physpages >> (20-PAGE_SHIFT); @@ -246,7 +246,7 @@ #endif num_cache_leaves = 3; } -static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size) +static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 * c, unsigned int size) { /* AMD errata T13 (order #21922) */ if ((c->x86 == 6)) { @@ -259,7 +259,7 @@ static unsigned int amd_size_cache(struc return size; } -static struct cpu_dev amd_cpu_dev __initdata = { +static struct cpu_dev amd_cpu_dev __cpuinitdata = { .c_vendor = "AMD", .c_ident = { "AuthenticAMD" }, .c_models = { @@ -275,7 +275,6 @@ static struct cpu_dev amd_cpu_dev __init }, }, .c_init = init_amd, - .c_identify = generic_identify, .c_size_cache = amd_size_cache, }; diff --git a/arch/i386/kernel/cpu/centaur.c b/arch/i386/kernel/cpu/centaur.c index bd75629..8c25047 100644 --- a/arch/i386/kernel/cpu/centaur.c +++ b/arch/i386/kernel/cpu/centaur.c @@ -9,7 +9,7 @@ #include "cpu.h" #ifdef CONFIG_X86_OOSTORE -static u32 __init power2(u32 x) +static u32 __cpuinit power2(u32 x) { u32 s=1; while(s<=x) @@ -22,7 +22,7 @@ static u32 __init power2(u32 x) * Set up an actual MCR */ -static void __init centaur_mcr_insert(int reg, u32 base, u32 size, int key) +static void __cpuinit centaur_mcr_insert(int reg, u32 base, u32 size, int key) { u32 lo, hi; @@ -40,7 +40,7 @@ static void __init centaur_mcr_insert(in * Shortcut: We know you can't put 4Gig of RAM on a winchip */ -static u32 __init ramtop(void) /* 16388 */ +static u32 __cpuinit ramtop(void) /* 16388 */ { int i; u32 top = 0; @@ -91,7 +91,7 @@ static u32 __init ramtop(void) /* 16388 * Compute a set of MCR's to give maximum coverage */ -static int __init centaur_mcr_compute(int nr, int key) +static int __cpuinit centaur_mcr_compute(int nr, int key) { u32 mem = ramtop(); u32 root = power2(mem); @@ -166,7 +166,7 @@ static int __init centaur_mcr_compute(in return ct; } -static void __init centaur_create_optimal_mcr(void) +static void __cpuinit centaur_create_optimal_mcr(void) { int i; /* @@ -189,7 +189,7 @@ static void __init centaur_create_optima wrmsr(MSR_IDT_MCR0+i, 0, 0); } -static void __init winchip2_create_optimal_mcr(void) +static void __cpuinit winchip2_create_optimal_mcr(void) { u32 lo, hi; int i; @@ -227,7 +227,7 @@ static void __init winchip2_create_optim * Handle the MCR key on the Winchip 2. */ -static void __init winchip2_unprotect_mcr(void) +static void __cpuinit winchip2_unprotect_mcr(void) { u32 lo, hi; u32 key; @@ -239,7 +239,7 @@ static void __init winchip2_unprotect_mc wrmsr(MSR_IDT_MCR_CTRL, lo, hi); } -static void __init winchip2_protect_mcr(void) +static void __cpuinit winchip2_protect_mcr(void) { u32 lo, hi; @@ -257,7 +257,7 @@ #define RNG_PRESENT (1 << 2) #define RNG_ENABLED (1 << 3) #define RNG_ENABLE (1 << 6) /* MSR_VIA_RNG */ -static void __init init_c3(struct cpuinfo_x86 *c) +static void __cpuinit init_c3(struct cpuinfo_x86 *c) { u32 lo, hi; @@ -303,7 +303,7 @@ static void __init init_c3(struct cpuinf display_cacheinfo(c); } -static void __init init_centaur(struct cpuinfo_x86 *c) +static void __cpuinit init_centaur(struct cpuinfo_x86 *c) { enum { ECX8=1<<1, @@ -442,7 +442,7 @@ #endif } } -static unsigned int centaur_size_cache(struct cpuinfo_x86 * c, unsigned int size) +static unsigned int __cpuinit centaur_size_cache(struct cpuinfo_x86 * c, unsigned int size) { /* VIA C3 CPUs (670-68F) need further shifting. */ if ((c->x86 == 6) && ((c->x86_model == 7) || (c->x86_model == 8))) @@ -457,7 +457,7 @@ static unsigned int centaur_size_cache(s return size; } -static struct cpu_dev centaur_cpu_dev __initdata = { +static struct cpu_dev centaur_cpu_dev __cpuinitdata = { .c_vendor = "Centaur", .c_ident = { "CentaurHauls" }, .c_init = init_centaur, diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 70c87de..2799baa 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c @@ -36,7 +36,7 @@ struct cpu_dev * cpu_devs[X86_VENDOR_NUM extern int disable_pse; -static void default_init(struct cpuinfo_x86 * c) +static void __cpuinit default_init(struct cpuinfo_x86 * c) { /* Not much we can do here... */ /* Check if at least it has cpuid */ @@ -49,7 +49,7 @@ static void default_init(struct cpuinfo_ } } -static struct cpu_dev default_cpu = { +static struct cpu_dev __cpuinitdata default_cpu = { .c_init = default_init, .c_vendor = "Unknown", }; @@ -265,7 +265,7 @@ static void __init early_cpu_detect(void } } -void __cpuinit generic_identify(struct cpuinfo_x86 * c) +static void __cpuinit generic_identify(struct cpuinfo_x86 * c) { u32 tfms, xlvl; int ebx; @@ -675,7 +675,7 @@ #ifdef CONFIG_DOUBLEFAULT #endif /* Clear %fs and %gs. */ - asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs"); + asm volatile ("movl %0, %%fs; movl %0, %%gs" : : "r" (0)); /* Clear all 6 debug registers: */ set_debugreg(0, 0); diff --git a/arch/i386/kernel/cpu/cpu.h b/arch/i386/kernel/cpu/cpu.h index 5a1d4f1..2f6432c 100644 --- a/arch/i386/kernel/cpu/cpu.h +++ b/arch/i386/kernel/cpu/cpu.h @@ -24,7 +24,5 @@ extern struct cpu_dev * cpu_devs [X86_VE extern int get_model_name(struct cpuinfo_x86 *c); extern void display_cacheinfo(struct cpuinfo_x86 *c); -extern void generic_identify(struct cpuinfo_x86 * c); - extern void early_intel_workaround(struct cpuinfo_x86 *c); diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index e6ea00e..57c880b 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -32,6 +32,7 @@ #include #include #include #include /* current */ +#include #include #include #include @@ -387,6 +388,33 @@ static int acpi_cpufreq_early_init_acpi( return acpi_processor_preregister_performance(acpi_perf_data); } +/* + * Some BIOSes do SW_ANY coordination internally, either set it up in hw + * or do it in BIOS firmware and won't inform about it to OS. If not + * detected, this has a side effect of making CPU run at a different speed + * than OS intended it to run at. Detect it and handle it cleanly. + */ +static int bios_with_sw_any_bug; + +static int sw_any_bug_found(struct dmi_system_id *d) +{ + bios_with_sw_any_bug = 1; + return 0; +} + +static struct dmi_system_id sw_any_bug_dmi_table[] = { + { + .callback = sw_any_bug_found, + .ident = "Supermicro Server X6DLP", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Supermicro"), + DMI_MATCH(DMI_BIOS_VERSION, "080010"), + DMI_MATCH(DMI_PRODUCT_NAME, "X6DLP"), + }, + }, + { } +}; + static int acpi_cpufreq_cpu_init ( struct cpufreq_policy *policy) @@ -422,8 +450,17 @@ acpi_cpufreq_cpu_init ( * coordination is required. */ if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL || - policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) + policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) { policy->cpus = perf->shared_cpu_map; + } + +#ifdef CONFIG_SMP + dmi_check_system(sw_any_bug_dmi_table); + if (bios_with_sw_any_bug && cpus_weight(policy->cpus) == 1) { + policy->shared_type = CPUFREQ_SHARED_TYPE_ALL; + policy->cpus = cpu_core_map[cpu]; + } +#endif if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) { acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS; @@ -560,7 +597,6 @@ static struct cpufreq_driver acpi_cpufre .name = "acpi-cpufreq", .owner = THIS_MODULE, .attr = acpi_cpufreq_attr, - .flags = CPUFREQ_STICKY, }; @@ -571,7 +607,7 @@ acpi_cpufreq_init (void) acpi_cpufreq_early_init_acpi(); - return cpufreq_register_driver(&acpi_cpufreq_driver); + return cpufreq_register_driver(&acpi_cpufreq_driver); } diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index 4f2c3ae..7233abe 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c @@ -27,6 +27,7 @@ #include #include #include #include +#include #include #include @@ -52,18 +53,26 @@ #define CPU_EZRA_T 4 #define CPU_NEHEMIAH 5 static int cpu_model; -static unsigned int numscales=16, numvscales; +static unsigned int numscales=16; static unsigned int fsb; -static int minvid, maxvid; + +static struct mV_pos *vrm_mV_table; +static unsigned char *mV_vrm_table; +struct f_msr { + unsigned char vrm; +}; +static struct f_msr f_msr_table[32]; + +static unsigned int highest_speed, lowest_speed; /* kHz */ static unsigned int minmult, maxmult; static int can_scale_voltage; -static int vrmrev; static struct acpi_processor *pr = NULL; static struct acpi_processor_cx *cx = NULL; +static int port22_en; /* Module parameters */ -static int dont_scale_voltage; - +static int scale_voltage; +static int ignore_latency; #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg) @@ -71,7 +80,6 @@ #define dprintk(msg...) cpufreq_debug_pr /* Clock ratios multiplied by 10 */ static int clock_ratio[32]; static int eblcr_table[32]; -static int voltage_table[32]; static unsigned int highest_speed, lowest_speed; /* kHz */ static int longhaul_version; static struct cpufreq_frequency_table *longhaul_table; @@ -124,10 +132,9 @@ static int longhaul_get_cpu_mult(void) /* For processor with BCR2 MSR */ -static void do_longhaul1(int cx_address, unsigned int clock_ratio_index) +static void do_longhaul1(unsigned int clock_ratio_index) { union msr_bcr2 bcr2; - u32 t; rdmsrl(MSR_VIA_BCR2, bcr2.val); /* Enable software clock multiplier */ @@ -136,13 +143,11 @@ static void do_longhaul1(int cx_address, /* Sync to timer tick */ safe_halt(); - ACPI_FLUSH_CPU_CACHE(); /* Change frequency on next halt or sleep */ wrmsrl(MSR_VIA_BCR2, bcr2.val); - /* Invoke C3 */ - inb(cx_address); - /* Dummy op - must do something useless after P_LVL3 read */ - t = inl(acpi_fadt.xpm_tmr_blk.address); + /* Invoke transition */ + ACPI_FLUSH_CPU_CACHE(); + halt(); /* Disable software clock multiplier */ local_irq_disable(); @@ -164,15 +169,26 @@ static void do_powersaver(int cx_address longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4; longhaul.bits.EnableSoftBusRatio = 1; + if (can_scale_voltage) { + longhaul.bits.SoftVID = f_msr_table[clock_ratio_index].vrm; + longhaul.bits.EnableSoftVID = 1; + } + /* Sync to timer tick */ safe_halt(); - ACPI_FLUSH_CPU_CACHE(); /* Change frequency on next halt or sleep */ wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); - /* Invoke C3 */ - inb(cx_address); - /* Dummy op - must do something useless after P_LVL3 read */ - t = inl(acpi_fadt.xpm_tmr_blk.address); + if (port22_en) { + ACPI_FLUSH_CPU_CACHE(); + /* Invoke C1 */ + halt(); + } else { + ACPI_FLUSH_CPU_CACHE(); + /* Invoke C3 */ + inb(cx_address); + /* Dummy op - must do something useless after P_LVL3 read */ + t = inl(acpi_fadt.xpm_tmr_blk.address); + } /* Disable bus ratio bit */ local_irq_disable(); @@ -227,10 +243,13 @@ static void longhaul_setstate(unsigned i outb(0xFF,0xA1); /* Overkill */ outb(0xFE,0x21); /* TMR0 only */ - /* Disable bus master arbitration */ - if (pr->flags.bm_check) { + if (pr->flags.bm_control) { + /* Disable bus master arbitration */ acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1, ACPI_MTX_DO_NOT_LOCK); + } else if (port22_en) { + /* Disable AGP and PCI arbiters */ + outb(3, 0x22); } switch (longhaul_version) { @@ -244,7 +263,7 @@ static void longhaul_setstate(unsigned i */ case TYPE_LONGHAUL_V1: case TYPE_LONGHAUL_V2: - do_longhaul1(cx->address, clock_ratio_index); + do_longhaul1(clock_ratio_index); break; /* @@ -259,14 +278,20 @@ static void longhaul_setstate(unsigned i * to work in practice. */ case TYPE_POWERSAVER: + /* Don't allow wakeup */ + acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0, + ACPI_MTX_DO_NOT_LOCK); do_powersaver(cx->address, clock_ratio_index); break; } - /* Enable bus master arbitration */ - if (pr->flags.bm_check) { + if (pr->flags.bm_control) { + /* Enable bus master arbitration */ acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_DO_NOT_LOCK); + } else if (port22_en) { + /* Enable arbiters */ + outb(0, 0x22); } outb(pic2_mask,0xA1); /* restore mask */ @@ -446,53 +471,57 @@ static int __init longhaul_get_ranges(vo static void __init longhaul_setup_voltagescaling(void) { union msr_longhaul longhaul; + struct mV_pos minvid, maxvid; + unsigned int j, speed, pos, kHz_step, numvscales; - rdmsrl (MSR_VIA_LONGHAUL, longhaul.val); - - if (!(longhaul.bits.RevisionID & 1)) + rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); + if (!(longhaul.bits.RevisionID & 1)) { + printk(KERN_INFO PFX "Voltage scaling not supported by CPU.\n"); return; + } - minvid = longhaul.bits.MinimumVID; - maxvid = longhaul.bits.MaximumVID; - vrmrev = longhaul.bits.VRMRev; + if (!longhaul.bits.VRMRev) { + printk (KERN_INFO PFX "VRM 8.5\n"); + vrm_mV_table = &vrm85_mV[0]; + mV_vrm_table = &mV_vrm85[0]; + } else { + printk (KERN_INFO PFX "Mobile VRM\n"); + vrm_mV_table = &mobilevrm_mV[0]; + mV_vrm_table = &mV_mobilevrm[0]; + } + + minvid = vrm_mV_table[longhaul.bits.MinimumVID]; + maxvid = vrm_mV_table[longhaul.bits.MaximumVID]; + numvscales = maxvid.pos - minvid.pos + 1; + kHz_step = (highest_speed - lowest_speed) / numvscales; - if (minvid == 0 || maxvid == 0) { + if (minvid.mV == 0 || maxvid.mV == 0 || minvid.mV > maxvid.mV) { printk (KERN_INFO PFX "Bogus values Min:%d.%03d Max:%d.%03d. " "Voltage scaling disabled.\n", - minvid/1000, minvid%1000, maxvid/1000, maxvid%1000); + minvid.mV/1000, minvid.mV%1000, maxvid.mV/1000, maxvid.mV%1000); return; } - if (minvid == maxvid) { + if (minvid.mV == maxvid.mV) { printk (KERN_INFO PFX "Claims to support voltage scaling but min & max are " "both %d.%03d. Voltage scaling disabled\n", - maxvid/1000, maxvid%1000); + maxvid.mV/1000, maxvid.mV%1000); return; } - if (vrmrev==0) { - dprintk ("VRM 8.5\n"); - memcpy (voltage_table, vrm85scales, sizeof(voltage_table)); - numvscales = (voltage_table[maxvid]-voltage_table[minvid])/25; - } else { - dprintk ("Mobile VRM\n"); - memcpy (voltage_table, mobilevrmscales, sizeof(voltage_table)); - numvscales = (voltage_table[maxvid]-voltage_table[minvid])/5; + printk(KERN_INFO PFX "Max VID=%d.%03d Min VID=%d.%03d, %d possible voltage scales\n", + maxvid.mV/1000, maxvid.mV%1000, + minvid.mV/1000, minvid.mV%1000, + numvscales); + + j = 0; + while (longhaul_table[j].frequency != CPUFREQ_TABLE_END) { + speed = longhaul_table[j].frequency; + pos = (speed - lowest_speed) / kHz_step + minvid.pos; + f_msr_table[longhaul_table[j].index].vrm = mV_vrm_table[pos]; + j++; } - /* Current voltage isn't readable at first, so we need to - set it to a known value. The spec says to use maxvid */ - longhaul.bits.RevisionKey = longhaul.bits.RevisionID; /* FIXME: This is bad. */ - longhaul.bits.EnableSoftVID = 1; - longhaul.bits.SoftVID = maxvid; - wrmsrl (MSR_VIA_LONGHAUL, longhaul.val); - - minvid = voltage_table[minvid]; - maxvid = voltage_table[maxvid]; - - dprintk ("Min VID=%d.%03d Max VID=%d.%03d, %d possible voltage scales\n", - maxvid/1000, maxvid%1000, minvid/1000, minvid%1000, numvscales); - can_scale_voltage = 1; } @@ -540,21 +569,40 @@ static acpi_status longhaul_walk_callbac return 1; } +/* VIA don't support PM2 reg, but have something similar */ +static int enable_arbiter_disable(void) +{ + struct pci_dev *dev; + int reg; + u8 pci_cmd; + + /* Find PLE133 host bridge */ + reg = 0x78; + dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL); + /* Find CLE266 host bridge */ + if (dev == NULL) { + reg = 0x76; + dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_862X_0, NULL); + } + if (dev != NULL) { + /* Enable access to port 0x22 */ + pci_read_config_byte(dev, reg, &pci_cmd); + if ( !(pci_cmd & 1<<7) ) { + pci_cmd |= 1<<7; + pci_write_config_byte(dev, reg, pci_cmd); + } + return 1; + } + return 0; +} + static int __init longhaul_cpu_init(struct cpufreq_policy *policy) { struct cpuinfo_x86 *c = cpu_data; char *cpuname=NULL; int ret; - /* Check ACPI support for C3 state */ - acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, - &longhaul_walk_callback, NULL, (void *)&pr); - if (pr == NULL) goto err_acpi; - - cx = &pr->power.states[ACPI_STATE_C3]; - if (cx->address == 0 || cx->latency > 1000) goto err_acpi; - - /* Now check what we have on this motherboard */ + /* Check what we have on this motherboard */ switch (c->x86_model) { case 6: cpu_model = CPU_SAMUEL; @@ -636,12 +684,41 @@ static int __init longhaul_cpu_init(stru break; }; + /* Find ACPI data for processor */ + acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, + &longhaul_walk_callback, NULL, (void *)&pr); + if (pr == NULL) + goto err_acpi; + + if (longhaul_version == TYPE_POWERSAVER) { + /* Check ACPI support for C3 state */ + cx = &pr->power.states[ACPI_STATE_C3]; + if (cx->address > 0 && + (cx->latency <= 1000 || ignore_latency != 0) ) { + goto print_support_type; + } + } + /* Check ACPI support for bus master arbiter disable */ + if (!pr->flags.bm_control) { + if (enable_arbiter_disable()) { + port22_en = 1; + } else { + goto err_acpi; + } + } +print_support_type: + if (!port22_en) { + printk (KERN_INFO PFX "Using ACPI support.\n"); + } else { + printk (KERN_INFO PFX "Using northbridge support.\n"); + } + ret = longhaul_get_ranges(); if (ret != 0) return ret; if ((longhaul_version==TYPE_LONGHAUL_V2 || longhaul_version==TYPE_POWERSAVER) && - (dont_scale_voltage==0)) + (scale_voltage != 0)) longhaul_setup_voltagescaling(); policy->governor = CPUFREQ_DEFAULT_GOVERNOR; @@ -657,7 +734,7 @@ static int __init longhaul_cpu_init(stru return 0; err_acpi: - printk(KERN_ERR PFX "No ACPI support for CPU frequency changes.\n"); + printk(KERN_ERR PFX "No ACPI support. No VT8601 or VT8623 northbridge. Aborting.\n"); return -ENODEV; } @@ -729,8 +806,10 @@ static void __exit longhaul_exit(void) kfree(longhaul_table); } -module_param (dont_scale_voltage, int, 0644); -MODULE_PARM_DESC(dont_scale_voltage, "Don't scale voltage of processor"); +module_param (scale_voltage, int, 0644); +MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor"); +module_param(ignore_latency, int, 0644); +MODULE_PARM_DESC(ignore_latency, "Skip ACPI C3 latency test"); MODULE_AUTHOR ("Dave Jones "); MODULE_DESCRIPTION ("Longhaul driver for VIA Cyrix processors."); @@ -738,4 +817,3 @@ MODULE_LICENSE ("GPL"); late_initcall(longhaul_init); module_exit(longhaul_exit); - diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.h b/arch/i386/kernel/cpu/cpufreq/longhaul.h index d3a95d7..bc4682a 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.h +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.h @@ -450,17 +450,45 @@ static int __initdata nehemiah_c_eblcr[3 * Voltage scales. Div/Mod by 1000 to get actual voltage. * Which scale to use depends on the VRM type in use. */ -static int __initdata vrm85scales[32] = { - 1250, 1200, 1150, 1100, 1050, 1800, 1750, 1700, - 1650, 1600, 1550, 1500, 1450, 1400, 1350, 1300, - 1275, 1225, 1175, 1125, 1075, 1825, 1775, 1725, - 1675, 1625, 1575, 1525, 1475, 1425, 1375, 1325, + +struct mV_pos { + unsigned short mV; + unsigned short pos; +}; + +static struct mV_pos __initdata vrm85_mV[32] = { + {1250, 8}, {1200, 6}, {1150, 4}, {1100, 2}, + {1050, 0}, {1800, 30}, {1750, 28}, {1700, 26}, + {1650, 24}, {1600, 22}, {1550, 20}, {1500, 18}, + {1450, 16}, {1400, 14}, {1350, 12}, {1300, 10}, + {1275, 9}, {1225, 7}, {1175, 5}, {1125, 3}, + {1075, 1}, {1825, 31}, {1775, 29}, {1725, 27}, + {1675, 25}, {1625, 23}, {1575, 21}, {1525, 19}, + {1475, 17}, {1425, 15}, {1375, 13}, {1325, 11} +}; + +static unsigned char __initdata mV_vrm85[32] = { + 0x04, 0x14, 0x03, 0x13, 0x02, 0x12, 0x01, 0x11, + 0x00, 0x10, 0x0f, 0x1f, 0x0e, 0x1e, 0x0d, 0x1d, + 0x0c, 0x1c, 0x0b, 0x1b, 0x0a, 0x1a, 0x09, 0x19, + 0x08, 0x18, 0x07, 0x17, 0x06, 0x16, 0x05, 0x15 +}; + +static struct mV_pos __initdata mobilevrm_mV[32] = { + {1750, 31}, {1700, 30}, {1650, 29}, {1600, 28}, + {1550, 27}, {1500, 26}, {1450, 25}, {1400, 24}, + {1350, 23}, {1300, 22}, {1250, 21}, {1200, 20}, + {1150, 19}, {1100, 18}, {1050, 17}, {1000, 16}, + {975, 15}, {950, 14}, {925, 13}, {900, 12}, + {875, 11}, {850, 10}, {825, 9}, {800, 8}, + {775, 7}, {750, 6}, {725, 5}, {700, 4}, + {675, 3}, {650, 2}, {625, 1}, {600, 0} }; -static int __initdata mobilevrmscales[32] = { - 2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650, - 1600, 1550, 1500, 1450, 1500, 1350, 1300, -1, - 1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100, - 1075, 1050, 1025, 1000, 975, 950, 925, -1, +static unsigned char __initdata mV_mobilevrm[32] = { + 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, + 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, + 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, + 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }; diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index b77f135..e8993ba 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c @@ -23,6 +23,7 @@ #include #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI #include +#include #include #endif @@ -377,6 +378,35 @@ static int centrino_cpu_early_init_acpi( return 0; } + +/* + * Some BIOSes do SW_ANY coordination internally, either set it up in hw + * or do it in BIOS firmware and won't inform about it to OS. If not + * detected, this has a side effect of making CPU run at a different speed + * than OS intended it to run at. Detect it and handle it cleanly. + */ +static int bios_with_sw_any_bug; +static int sw_any_bug_found(struct dmi_system_id *d) +{ + bios_with_sw_any_bug = 1; + return 0; +} + + +static struct dmi_system_id sw_any_bug_dmi_table[] = { + { + .callback = sw_any_bug_found, + .ident = "Supermicro Server X6DLP", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Supermicro"), + DMI_MATCH(DMI_BIOS_VERSION, "080010"), + DMI_MATCH(DMI_PRODUCT_NAME, "X6DLP"), + }, + }, + { } +}; + + /* * centrino_cpu_init_acpi - register with ACPI P-States library * @@ -398,14 +428,24 @@ static int centrino_cpu_init_acpi(struct dprintk(PFX "obtaining ACPI data failed\n"); return -EIO; } + policy->shared_type = p->shared_type; /* * Will let policy->cpus know about dependency only when software * coordination is required. */ if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL || - policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) + policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) { policy->cpus = p->shared_cpu_map; + } + +#ifdef CONFIG_SMP + dmi_check_system(sw_any_bug_dmi_table); + if (bios_with_sw_any_bug && cpus_weight(policy->cpus) == 1) { + policy->shared_type = CPUFREQ_SHARED_TYPE_ALL; + policy->cpus = cpu_core_map[cpu]; + } +#endif /* verify the acpi_data */ if (p->state_count <= 1) { diff --git a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c index f03b7f9..c0c3b59 100644 --- a/arch/i386/kernel/cpu/cyrix.c +++ b/arch/i386/kernel/cpu/cyrix.c @@ -12,7 +12,7 @@ #include "cpu.h" /* * Read NSC/Cyrix DEVID registers (DIR) to get more detailed info. about the CPU */ -static void __init do_cyrix_devid(unsigned char *dir0, unsigned char *dir1) +static void __cpuinit do_cyrix_devid(unsigned char *dir0, unsigned char *dir1) { unsigned char ccr2, ccr3; unsigned long flags; @@ -52,25 +52,25 @@ static void __init do_cyrix_devid(unsign * Actually since bugs.h doesn't even reference this perhaps someone should * fix the documentation ??? */ -static unsigned char Cx86_dir0_msb __initdata = 0; +static unsigned char Cx86_dir0_msb __cpuinitdata = 0; -static char Cx86_model[][9] __initdata = { +static char Cx86_model[][9] __cpuinitdata = { "Cx486", "Cx486", "5x86 ", "6x86", "MediaGX ", "6x86MX ", "M II ", "Unknown" }; -static char Cx486_name[][5] __initdata = { +static char Cx486_name[][5] __cpuinitdata = { "SLC", "DLC", "SLC2", "DLC2", "SRx", "DRx", "SRx2", "DRx2" }; -static char Cx486S_name[][4] __initdata = { +static char Cx486S_name[][4] __cpuinitdata = { "S", "S2", "Se", "S2e" }; -static char Cx486D_name[][4] __initdata = { +static char Cx486D_name[][4] __cpuinitdata = { "DX", "DX2", "?", "?", "?", "DX4" }; -static char Cx86_cb[] __initdata = "?.5x Core/Bus Clock"; -static char cyrix_model_mult1[] __initdata = "12??43"; -static char cyrix_model_mult2[] __initdata = "12233445"; +static char Cx86_cb[] __cpuinitdata = "?.5x Core/Bus Clock"; +static char cyrix_model_mult1[] __cpuinitdata = "12??43"; +static char cyrix_model_mult2[] __cpuinitdata = "12233445"; /* * Reset the slow-loop (SLOP) bit on the 686(L) which is set by some old @@ -82,7 +82,7 @@ static char cyrix_model_mult2[] __initda extern void calibrate_delay(void) __init; -static void __init check_cx686_slop(struct cpuinfo_x86 *c) +static void __cpuinit check_cx686_slop(struct cpuinfo_x86 *c) { unsigned long flags; @@ -107,7 +107,7 @@ static void __init check_cx686_slop(stru } -static void __init set_cx86_reorder(void) +static void __cpuinit set_cx86_reorder(void) { u8 ccr3; @@ -122,7 +122,7 @@ static void __init set_cx86_reorder(void setCx86(CX86_CCR3, ccr3); } -static void __init set_cx86_memwb(void) +static void __cpuinit set_cx86_memwb(void) { u32 cr0; @@ -137,7 +137,7 @@ static void __init set_cx86_memwb(void) setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14 ); } -static void __init set_cx86_inc(void) +static void __cpuinit set_cx86_inc(void) { unsigned char ccr3; @@ -158,7 +158,7 @@ static void __init set_cx86_inc(void) * Configure later MediaGX and/or Geode processor. */ -static void __init geode_configure(void) +static void __cpuinit geode_configure(void) { unsigned long flags; u8 ccr3, ccr4; @@ -184,14 +184,14 @@ static void __init geode_configure(void) #ifdef CONFIG_PCI -static struct pci_device_id __initdata cyrix_55x0[] = { +static struct pci_device_id __cpuinitdata cyrix_55x0[] = { { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510) }, { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520) }, { }, }; #endif -static void __init init_cyrix(struct cpuinfo_x86 *c) +static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) { unsigned char dir0, dir0_msn, dir0_lsn, dir1 = 0; char *buf = c->x86_model_id; @@ -346,7 +346,7 @@ #endif /* * Handle National Semiconductor branded processors */ -static void __init init_nsc(struct cpuinfo_x86 *c) +static void __cpuinit init_nsc(struct cpuinfo_x86 *c) { /* There may be GX1 processors in the wild that are branded * NSC and not Cyrix. @@ -394,7 +394,7 @@ static inline int test_cyrix_52div(void) return (unsigned char) (test >> 8) == 0x02; } -static void cyrix_identify(struct cpuinfo_x86 * c) +static void __cpuinit cyrix_identify(struct cpuinfo_x86 * c) { /* Detect Cyrix with disabled CPUID */ if ( c->x86 == 4 && test_cyrix_52div() ) { @@ -427,10 +427,9 @@ static void cyrix_identify(struct cpuinf local_irq_restore(flags); } } - generic_identify(c); } -static struct cpu_dev cyrix_cpu_dev __initdata = { +static struct cpu_dev cyrix_cpu_dev __cpuinitdata = { .c_vendor = "Cyrix", .c_ident = { "CyrixInstead" }, .c_init = init_cyrix, @@ -453,11 +452,10 @@ static int __init cyrix_exit_cpu(void) late_initcall(cyrix_exit_cpu); -static struct cpu_dev nsc_cpu_dev __initdata = { +static struct cpu_dev nsc_cpu_dev __cpuinitdata = { .c_vendor = "NSC", .c_ident = { "Geode by NSC" }, .c_init = init_nsc, - .c_identify = generic_identify, }; int __init nsc_init_cpu(void) diff --git a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c index 5a2e270..94a95aa 100644 --- a/arch/i386/kernel/cpu/intel.c +++ b/arch/i386/kernel/cpu/intel.c @@ -198,7 +198,7 @@ #endif } -static unsigned int intel_size_cache(struct cpuinfo_x86 * c, unsigned int size) +static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 * c, unsigned int size) { /* Intel PIII Tualatin. This comes in two flavours. * One has 256kb of cache, the other 512. We have no way @@ -263,7 +263,6 @@ static struct cpu_dev intel_cpu_dev __cp }, }, .c_init = init_intel, - .c_identify = generic_identify, .c_size_cache = intel_size_cache, }; diff --git a/arch/i386/kernel/cpu/mcheck/Makefile b/arch/i386/kernel/cpu/mcheck/Makefile index 30808f3..f1ebe1c 100644 --- a/arch/i386/kernel/cpu/mcheck/Makefile +++ b/arch/i386/kernel/cpu/mcheck/Makefile @@ -1,2 +1,2 @@ -obj-y = mce.o k7.o p4.o p5.o p6.o winchip.o +obj-y = mce.o k7.o p4.o p5.o p6.o winchip.o therm_throt.o obj-$(CONFIG_X86_MCE_NONFATAL) += non-fatal.o diff --git a/arch/i386/kernel/cpu/mcheck/p4.c b/arch/i386/kernel/cpu/mcheck/p4.c index b95f1b3..504434a 100644 --- a/arch/i386/kernel/cpu/mcheck/p4.c +++ b/arch/i386/kernel/cpu/mcheck/p4.c @@ -13,6 +13,8 @@ #include #include #include +#include + #include "mce.h" /* as supported by the P4/Xeon family */ @@ -44,25 +46,12 @@ static void unexpected_thermal_interrupt /* P4/Xeon Thermal transition interrupt handler */ static void intel_thermal_interrupt(struct pt_regs *regs) { - u32 l, h; - unsigned int cpu = smp_processor_id(); - static unsigned long next[NR_CPUS]; + __u64 msr_val; ack_APIC_irq(); - if (time_after(next[cpu], jiffies)) - return; - - next[cpu] = jiffies + HZ*5; - rdmsr(MSR_IA32_THERM_STATUS, l, h); - if (l & 0x1) { - printk(KERN_EMERG "CPU%d: Temperature above threshold\n", cpu); - printk(KERN_EMERG "CPU%d: Running in modulated clock mode\n", - cpu); - add_taint(TAINT_MACHINE_CHECK); - } else { - printk(KERN_INFO "CPU%d: Temperature/speed normal\n", cpu); - } + rdmsrl(MSR_IA32_THERM_STATUS, msr_val); + therm_throt_process(msr_val & 0x1); } /* Thermal interrupt handler for this CPU setup */ @@ -122,10 +111,13 @@ static void intel_init_thermal(struct cp rdmsr (MSR_IA32_MISC_ENABLE, l, h); wrmsr (MSR_IA32_MISC_ENABLE, l | (1<<3), h); - + l = apic_read (APIC_LVTTHMR); apic_write_around (APIC_LVTTHMR, l & ~APIC_LVT_MASKED); printk (KERN_INFO "CPU%d: Thermal monitoring enabled\n", cpu); + + /* enable thermal throttle processing */ + atomic_set(&therm_throt_en, 1); return; } #endif /* CONFIG_X86_MCE_P4THERMAL */ diff --git a/arch/i386/kernel/cpu/mcheck/therm_throt.c b/arch/i386/kernel/cpu/mcheck/therm_throt.c new file mode 100644 index 0000000..4f43047 --- /dev/null +++ b/arch/i386/kernel/cpu/mcheck/therm_throt.c @@ -0,0 +1,180 @@ +/* + * linux/arch/i386/kerne/cpu/mcheck/therm_throt.c + * + * Thermal throttle event support code (such as syslog messaging and rate + * limiting) that was factored out from x86_64 (mce_intel.c) and i386 (p4.c). + * This allows consistent reporting of CPU thermal throttle events. + * + * Maintains a counter in /sys that keeps track of the number of thermal + * events, such that the user knows how bad the thermal problem might be + * (since the logging to syslog and mcelog is rate limited). + * + * Author: Dmitriy Zavin (dmitriyz@google.com) + * + * Credits: Adapted from Zwane Mwaikambo's original code in mce_intel.c. + * Inspired by Ross Biro's and Al Borchers' counter code. + */ + +#include +#include +#include +#include +#include +#include + +/* How long to wait between reporting thermal events */ +#define CHECK_INTERVAL (300 * HZ) + +static DEFINE_PER_CPU(__u64, next_check) = INITIAL_JIFFIES; +static DEFINE_PER_CPU(unsigned long, thermal_throttle_count); +atomic_t therm_throt_en = ATOMIC_INIT(0); + +#ifdef CONFIG_SYSFS +#define define_therm_throt_sysdev_one_ro(_name) \ + static SYSDEV_ATTR(_name, 0444, therm_throt_sysdev_show_##_name, NULL) + +#define define_therm_throt_sysdev_show_func(name) \ +static ssize_t therm_throt_sysdev_show_##name(struct sys_device *dev, \ + char *buf) \ +{ \ + unsigned int cpu = dev->id; \ + ssize_t ret; \ + \ + preempt_disable(); /* CPU hotplug */ \ + if (cpu_online(cpu)) \ + ret = sprintf(buf, "%lu\n", \ + per_cpu(thermal_throttle_##name, cpu)); \ + else \ + ret = 0; \ + preempt_enable(); \ + \ + return ret; \ +} + +define_therm_throt_sysdev_show_func(count); +define_therm_throt_sysdev_one_ro(count); + +static struct attribute *thermal_throttle_attrs[] = { + &attr_count.attr, + NULL +}; + +static struct attribute_group thermal_throttle_attr_group = { + .attrs = thermal_throttle_attrs, + .name = "thermal_throttle" +}; +#endif /* CONFIG_SYSFS */ + +/*** + * therm_throt_process - Process thermal throttling event from interrupt + * @curr: Whether the condition is current or not (boolean), since the + * thermal interrupt normally gets called both when the thermal + * event begins and once the event has ended. + * + * This function is called by the thermal interrupt after the + * IRQ has been acknowledged. + * + * It will take care of rate limiting and printing messages to the syslog. + * + * Returns: 0 : Event should NOT be further logged, i.e. still in + * "timeout" from previous log message. + * 1 : Event should be logged further, and a message has been + * printed to the syslog. + */ +int therm_throt_process(int curr) +{ + unsigned int cpu = smp_processor_id(); + __u64 tmp_jiffs = get_jiffies_64(); + + if (curr) + __get_cpu_var(thermal_throttle_count)++; + + if (time_before64(tmp_jiffs, __get_cpu_var(next_check))) + return 0; + + __get_cpu_var(next_check) = tmp_jiffs + CHECK_INTERVAL; + + /* if we just entered the thermal event */ + if (curr) { + printk(KERN_CRIT "CPU%d: Temperature above threshold, " + "cpu clock throttled (total events = %lu)\n", cpu, + __get_cpu_var(thermal_throttle_count)); + + add_taint(TAINT_MACHINE_CHECK); + } else { + printk(KERN_CRIT "CPU%d: Temperature/speed normal\n", cpu); + } + + return 1; +} + +#ifdef CONFIG_SYSFS +/* Add/Remove thermal_throttle interface for CPU device */ +static __cpuinit int thermal_throttle_add_dev(struct sys_device * sys_dev) +{ + sysfs_create_group(&sys_dev->kobj, &thermal_throttle_attr_group); + return 0; +} + +#ifdef CONFIG_HOTPLUG_CPU +static __cpuinit int thermal_throttle_remove_dev(struct sys_device * sys_dev) +{ + sysfs_remove_group(&sys_dev->kobj, &thermal_throttle_attr_group); + return 0; +} + +/* Mutex protecting device creation against CPU hotplug */ +static DEFINE_MUTEX(therm_cpu_lock); + +/* Get notified when a cpu comes on/off. Be hotplug friendly. */ +static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb, + unsigned long action, + void *hcpu) +{ + unsigned int cpu = (unsigned long)hcpu; + struct sys_device *sys_dev; + + sys_dev = get_cpu_sysdev(cpu); + mutex_lock(&therm_cpu_lock); + switch (action) { + case CPU_ONLINE: + thermal_throttle_add_dev(sys_dev); + break; + case CPU_DEAD: + thermal_throttle_remove_dev(sys_dev); + break; + } + mutex_unlock(&therm_cpu_lock); + return NOTIFY_OK; +} + +static struct notifier_block thermal_throttle_cpu_notifier = +{ + .notifier_call = thermal_throttle_cpu_callback, +}; +#endif /* CONFIG_HOTPLUG_CPU */ + +static __init int thermal_throttle_init_device(void) +{ + unsigned int cpu = 0; + + if (!atomic_read(&therm_throt_en)) + return 0; + + register_hotcpu_notifier(&thermal_throttle_cpu_notifier); + +#ifdef CONFIG_HOTPLUG_CPU + mutex_lock(&therm_cpu_lock); +#endif + /* connect live CPUs to sysfs */ + for_each_online_cpu(cpu) + thermal_throttle_add_dev(get_cpu_sysdev(cpu)); +#ifdef CONFIG_HOTPLUG_CPU + mutex_unlock(&therm_cpu_lock); +#endif + + return 0; +} + +device_initcall(thermal_throttle_init_device); +#endif /* CONFIG_SYSFS */ diff --git a/arch/i386/kernel/cpu/mtrr/generic.c b/arch/i386/kernel/cpu/mtrr/generic.c index 169ac8e..0b61eed 100644 --- a/arch/i386/kernel/cpu/mtrr/generic.c +++ b/arch/i386/kernel/cpu/mtrr/generic.c @@ -243,7 +243,7 @@ static DEFINE_SPINLOCK(set_atomicity_loc * has been called. */ -static void prepare_set(void) +static void prepare_set(void) __acquires(set_atomicity_lock) { unsigned long cr0; @@ -274,7 +274,7 @@ static void prepare_set(void) mtrr_wrmsr(MTRRdefType_MSR, deftype_lo & 0xf300UL, deftype_hi); } -static void post_set(void) +static void post_set(void) __releases(set_atomicity_lock) { /* Flush TLBs (no need to flush caches - they are disabled) */ __flush_tlb(); diff --git a/arch/i386/kernel/cpu/nexgen.c b/arch/i386/kernel/cpu/nexgen.c index ad87fa5..8bf23cc 100644 --- a/arch/i386/kernel/cpu/nexgen.c +++ b/arch/i386/kernel/cpu/nexgen.c @@ -10,7 +10,7 @@ #include "cpu.h" * to have CPUID. (Thanks to Herbert Oppmann) */ -static int __init deep_magic_nexgen_probe(void) +static int __cpuinit deep_magic_nexgen_probe(void) { int ret; @@ -27,21 +27,20 @@ static int __init deep_magic_nexgen_prob return ret; } -static void __init init_nexgen(struct cpuinfo_x86 * c) +static void __cpuinit init_nexgen(struct cpuinfo_x86 * c) { c->x86_cache_size = 256; /* A few had 1 MB... */ } -static void __init nexgen_identify(struct cpuinfo_x86 * c) +static void __cpuinit nexgen_identify(struct cpuinfo_x86 * c) { /* Detect NexGen with old hypercode */ if ( deep_magic_nexgen_probe() ) { strcpy(c->x86_vendor_id, "NexGenDriven"); } - generic_identify(c); } -static struct cpu_dev nexgen_cpu_dev __initdata = { +static struct cpu_dev nexgen_cpu_dev __cpuinitdata = { .c_vendor = "Nexgen", .c_ident = { "NexGenDriven" }, .c_models = { diff --git a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c index f54a152..76aac08 100644 --- a/arch/i386/kernel/cpu/proc.c +++ b/arch/i386/kernel/cpu/proc.c @@ -46,8 +46,8 @@ static int show_cpuinfo(struct seq_file /* Intel-defined (#2) */ "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est", - "tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "tm2", "ssse3", "cid", NULL, NULL, "cx16", "xtpr", NULL, + NULL, NULL, "dca", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* VIA/Cyrix/Centaur-defined */ diff --git a/arch/i386/kernel/cpu/rise.c b/arch/i386/kernel/cpu/rise.c index d08d5a2..9317f74 100644 --- a/arch/i386/kernel/cpu/rise.c +++ b/arch/i386/kernel/cpu/rise.c @@ -5,7 +5,7 @@ #include #include "cpu.h" -static void __init init_rise(struct cpuinfo_x86 *c) +static void __cpuinit init_rise(struct cpuinfo_x86 *c) { printk("CPU: Rise iDragon"); if (c->x86_model > 2) @@ -28,7 +28,7 @@ static void __init init_rise(struct cpui set_bit(X86_FEATURE_CX8, c->x86_capability); } -static struct cpu_dev rise_cpu_dev __initdata = { +static struct cpu_dev rise_cpu_dev __cpuinitdata = { .c_vendor = "Rise", .c_ident = { "RiseRiseRise" }, .c_models = { diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c index 7214c9b..4056fb7 100644 --- a/arch/i386/kernel/cpu/transmeta.c +++ b/arch/i386/kernel/cpu/transmeta.c @@ -5,7 +5,7 @@ #include #include #include "cpu.h" -static void __init init_transmeta(struct cpuinfo_x86 *c) +static void __cpuinit init_transmeta(struct cpuinfo_x86 *c) { unsigned int cap_mask, uk, max, dummy; unsigned int cms_rev1, cms_rev2; @@ -85,10 +85,9 @@ #ifdef CONFIG_SYSCTL #endif } -static void __init transmeta_identify(struct cpuinfo_x86 * c) +static void __cpuinit transmeta_identify(struct cpuinfo_x86 * c) { u32 xlvl; - generic_identify(c); /* Transmeta-defined flags: level 0x80860001 */ xlvl = cpuid_eax(0x80860000); @@ -98,7 +97,7 @@ static void __init transmeta_identify(st } } -static struct cpu_dev transmeta_cpu_dev __initdata = { +static struct cpu_dev transmeta_cpu_dev __cpuinitdata = { .c_vendor = "Transmeta", .c_ident = { "GenuineTMx86", "TransmetaCPU" }, .c_init = init_transmeta, diff --git a/arch/i386/kernel/cpu/umc.c b/arch/i386/kernel/cpu/umc.c index 2cd988f..1bf3f87 100644 --- a/arch/i386/kernel/cpu/umc.c +++ b/arch/i386/kernel/cpu/umc.c @@ -5,12 +5,8 @@ #include "cpu.h" /* UMC chips appear to be only either 386 or 486, so no special init takes place. */ -static void __init init_umc(struct cpuinfo_x86 * c) -{ - -} -static struct cpu_dev umc_cpu_dev __initdata = { +static struct cpu_dev umc_cpu_dev __cpuinitdata = { .c_vendor = "UMC", .c_ident = { "UMC UMC UMC" }, .c_models = { @@ -21,7 +17,6 @@ static struct cpu_dev umc_cpu_dev __init } }, }, - .c_init = init_umc, }; int __init umc_init_cpu(void) diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c index 5b96f03..144b432 100644 --- a/arch/i386/kernel/crash.c +++ b/arch/i386/kernel/crash.c @@ -22,6 +22,9 @@ #include #include #include #include +#include +#include + #include @@ -86,23 +89,32 @@ static void crash_save_self(struct pt_re { int cpu; - cpu = smp_processor_id(); + cpu = safe_smp_processor_id(); crash_save_this_cpu(regs, cpu); } #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) static atomic_t waiting_for_crash_ipi; -static int crash_nmi_callback(struct pt_regs *regs, int cpu) +static int crash_nmi_callback(struct notifier_block *self, + unsigned long val, void *data) { + struct pt_regs *regs; struct pt_regs fixed_regs; + int cpu; + + if (val != DIE_NMI_IPI) + return NOTIFY_OK; + + regs = ((struct die_args *)data)->regs; + cpu = raw_smp_processor_id(); /* Don't do anything if this handler is invoked on crashing cpu. * Otherwise, system will completely hang. Crashing cpu can get * an NMI if system was initially booted with nmi_watchdog parameter. */ if (cpu == crashing_cpu) - return 1; + return NOTIFY_STOP; local_irq_disable(); if (!user_mode_vm(regs)) { @@ -122,16 +134,24 @@ static int crash_nmi_callback(struct pt_ static void smp_send_nmi_allbutself(void) { - send_IPI_allbutself(NMI_VECTOR); + cpumask_t mask = cpu_online_map; + cpu_clear(safe_smp_processor_id(), mask); + if (!cpus_empty(mask)) + send_IPI_mask(mask, NMI_VECTOR); } +static struct notifier_block crash_nmi_nb = { + .notifier_call = crash_nmi_callback, +}; + static void nmi_shootdown_cpus(void) { unsigned long msecs; atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1); /* Would it be better to replace the trap vector here? */ - set_nmi_callback(crash_nmi_callback); + if (register_die_notifier(&crash_nmi_nb)) + return; /* return what? */ /* Ensure the new callback function is set before sending * out the NMI */ @@ -169,7 +189,7 @@ void machine_crash_shutdown(struct pt_re local_irq_disable(); /* Make a note of crashing cpu. Will be used in NMI callback.*/ - crashing_cpu = smp_processor_id(); + crashing_cpu = safe_smp_processor_id(); nmi_shootdown_cpus(); lapic_shutdown(); #if defined(CONFIG_X86_IO_APIC) diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c index fe15804..f943698 100644 --- a/arch/i386/kernel/efi.c +++ b/arch/i386/kernel/efi.c @@ -65,7 +65,7 @@ static unsigned long efi_rt_eflags; static DEFINE_SPINLOCK(efi_rt_lock); static pgd_t efi_bak_pg_dir_pointer[2]; -static void efi_call_phys_prelog(void) +static void efi_call_phys_prelog(void) __acquires(efi_rt_lock) { unsigned long cr4; unsigned long temp; @@ -109,7 +109,7 @@ static void efi_call_phys_prelog(void) load_gdt(cpu_gdt_descr); } -static void efi_call_phys_epilog(void) +static void efi_call_phys_epilog(void) __releases(efi_rt_lock) { unsigned long cr4; struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0); diff --git a/arch/i386/kernel/efi_stub.S b/arch/i386/kernel/efi_stub.S index d3ee73a..ef00bb7 100644 --- a/arch/i386/kernel/efi_stub.S +++ b/arch/i386/kernel/efi_stub.S @@ -7,7 +7,6 @@ #include #include -#include /* * efi_call_phys(void *, ...) is a function with variable parameters. diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index 87f9f60..5a63d6f 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -76,8 +76,15 @@ DF_MASK = 0x00000400 NT_MASK = 0x00004000 VM_MASK = 0x00020000 +/* These are replaces for paravirtualization */ +#define DISABLE_INTERRUPTS cli +#define ENABLE_INTERRUPTS sti +#define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit +#define INTERRUPT_RETURN iret +#define GET_CR0_INTO_EAX movl %cr0, %eax + #ifdef CONFIG_PREEMPT -#define preempt_stop cli; TRACE_IRQS_OFF +#define preempt_stop DISABLE_INTERRUPTS; TRACE_IRQS_OFF #else #define preempt_stop #define resume_kernel restore_nocheck @@ -176,18 +183,21 @@ #define RESTORE_REGS \ #define RING0_INT_FRAME \ CFI_STARTPROC simple;\ + CFI_SIGNAL_FRAME;\ CFI_DEF_CFA esp, 3*4;\ /*CFI_OFFSET cs, -2*4;*/\ CFI_OFFSET eip, -3*4 #define RING0_EC_FRAME \ CFI_STARTPROC simple;\ + CFI_SIGNAL_FRAME;\ CFI_DEF_CFA esp, 4*4;\ /*CFI_OFFSET cs, -2*4;*/\ CFI_OFFSET eip, -3*4 #define RING0_PTREGS_FRAME \ CFI_STARTPROC simple;\ + CFI_SIGNAL_FRAME;\ CFI_DEF_CFA esp, OLDESP-EBX;\ /*CFI_OFFSET cs, CS-OLDESP;*/\ CFI_OFFSET eip, EIP-OLDESP;\ @@ -233,10 +243,11 @@ ret_from_intr: check_userspace: movl EFLAGS(%esp), %eax # mix EFLAGS and CS movb CS(%esp), %al - testl $(VM_MASK | 3), %eax - jz resume_kernel + andl $(VM_MASK | SEGMENT_RPL_MASK), %eax + cmpl $USER_RPL, %eax + jb resume_kernel # not returning to v8086 or userspace ENTRY(resume_userspace) - cli # make sure we don't miss an interrupt + DISABLE_INTERRUPTS # make sure we don't miss an interrupt # setting need_resched or sigpending # between sampling and the iret movl TI_flags(%ebp), %ecx @@ -247,7 +258,7 @@ ENTRY(resume_userspace) #ifdef CONFIG_PREEMPT ENTRY(resume_kernel) - cli + DISABLE_INTERRUPTS cmpl $0,TI_preempt_count(%ebp) # non-zero preempt_count ? jnz restore_nocheck need_resched: @@ -267,6 +278,7 @@ #endif # sysenter call handler stub ENTRY(sysenter_entry) CFI_STARTPROC simple + CFI_SIGNAL_FRAME CFI_DEF_CFA esp, 0 CFI_REGISTER esp, ebp movl TSS_sysenter_esp0(%esp),%esp @@ -275,7 +287,7 @@ sysenter_past_esp: * No need to follow this irqs on/off section: the syscall * disabled irqs and here we enable it straight after entry: */ - sti + ENABLE_INTERRUPTS pushl $(__USER_DS) CFI_ADJUST_CFA_OFFSET 4 /*CFI_REL_OFFSET ss, 0*/ @@ -320,7 +332,7 @@ sysenter_past_esp: jae syscall_badsys call *sys_call_table(,%eax,4) movl %eax,EAX(%esp) - cli + DISABLE_INTERRUPTS TRACE_IRQS_OFF movl TI_flags(%ebp), %ecx testw $_TIF_ALLWORK_MASK, %cx @@ -330,8 +342,7 @@ sysenter_past_esp: movl OLDESP(%esp), %ecx xorl %ebp,%ebp TRACE_IRQS_ON - sti - sysexit + ENABLE_INTERRUPTS_SYSEXIT CFI_ENDPROC @@ -356,7 +367,7 @@ syscall_call: call *sys_call_table(,%eax,4) movl %eax,EAX(%esp) # store the return value syscall_exit: - cli # make sure we don't miss an interrupt + DISABLE_INTERRUPTS # make sure we don't miss an interrupt # setting need_resched or sigpending # between sampling and the iret TRACE_IRQS_OFF @@ -371,8 +382,8 @@ restore_all: # See comments in process.c:copy_thread() for details. movb OLDSS(%esp), %ah movb CS(%esp), %al - andl $(VM_MASK | (4 << 8) | 3), %eax - cmpl $((4 << 8) | 3), %eax + andl $(VM_MASK | (SEGMENT_TI_MASK << 8) | SEGMENT_RPL_MASK), %eax + cmpl $((SEGMENT_LDT << 8) | USER_RPL), %eax CFI_REMEMBER_STATE je ldt_ss # returning to user-space with LDT SS restore_nocheck: @@ -381,11 +392,11 @@ restore_nocheck_notrace: RESTORE_REGS addl $4, %esp CFI_ADJUST_CFA_OFFSET -4 -1: iret +1: INTERRUPT_RETURN .section .fixup,"ax" iret_exc: TRACE_IRQS_ON - sti + ENABLE_INTERRUPTS pushl $0 # no error code pushl $do_iret_error jmp error_code @@ -409,7 +420,7 @@ ldt_ss: * dosemu and wine happy. */ subl $8, %esp # reserve space for switch16 pointer CFI_ADJUST_CFA_OFFSET 8 - cli + DISABLE_INTERRUPTS TRACE_IRQS_OFF movl %esp, %eax /* Set up the 16bit stack frame with switch32 pointer on top, @@ -419,7 +430,7 @@ ldt_ss: TRACE_IRQS_IRET RESTORE_REGS lss 20+4(%esp), %esp # switch to 16bit stack -1: iret +1: INTERRUPT_RETURN .section __ex_table,"a" .align 4 .long 1b,iret_exc @@ -434,7 +445,7 @@ work_pending: jz work_notifysig work_resched: call schedule - cli # make sure we don't miss an interrupt + DISABLE_INTERRUPTS # make sure we don't miss an interrupt # setting need_resched or sigpending # between sampling and the iret TRACE_IRQS_OFF @@ -490,7 +501,7 @@ syscall_exit_work: testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP), %cl jz work_pending TRACE_IRQS_ON - sti # could let do_syscall_trace() call + ENABLE_INTERRUPTS # could let do_syscall_trace() call # schedule() instead movl %esp, %eax movl $1, %edx @@ -591,11 +602,9 @@ ENTRY(name) \ /* The include is where all of the SMP etc. interrupts come from */ #include "entry_arch.h" -ENTRY(divide_error) - RING0_INT_FRAME - pushl $0 # no error code - CFI_ADJUST_CFA_OFFSET 4 - pushl $do_divide_error +KPROBE_ENTRY(page_fault) + RING0_EC_FRAME + pushl $do_page_fault CFI_ADJUST_CFA_OFFSET 4 ALIGN error_code: @@ -645,6 +654,7 @@ error_code: call *%edi jmp ret_from_exception CFI_ENDPROC +KPROBE_END(page_fault) ENTRY(coprocessor_error) RING0_INT_FRAME @@ -669,7 +679,7 @@ ENTRY(device_not_available) pushl $-1 # mark this as an int CFI_ADJUST_CFA_OFFSET 4 SAVE_ALL - movl %cr0, %eax + GET_CR0_INTO_EAX testl $0x4, %eax # EM (math emulation bit) jne device_not_available_emulate preempt_stop @@ -702,9 +712,15 @@ #define FIX_STACK(offset, ok, label) \ jne ok; \ label: \ movl TSS_sysenter_esp0+offset(%esp),%esp; \ + CFI_DEF_CFA esp, 0; \ + CFI_UNDEFINED eip; \ pushfl; \ + CFI_ADJUST_CFA_OFFSET 4; \ pushl $__KERNEL_CS; \ - pushl $sysenter_past_esp + CFI_ADJUST_CFA_OFFSET 4; \ + pushl $sysenter_past_esp; \ + CFI_ADJUST_CFA_OFFSET 4; \ + CFI_REL_OFFSET eip, 0 KPROBE_ENTRY(debug) RING0_INT_FRAME @@ -720,7 +736,8 @@ debug_stack_correct: call do_debug jmp ret_from_exception CFI_ENDPROC - .previous .text +KPROBE_END(debug) + /* * NMI is doubly nasty. It can happen _while_ we're handling * a debug fault, and the debug fault hasn't yet been able to @@ -729,7 +746,7 @@ debug_stack_correct: * check whether we got an NMI on the debug path where the debug * fault happened on the sysenter path. */ -ENTRY(nmi) +KPROBE_ENTRY(nmi) RING0_INT_FRAME pushl %eax CFI_ADJUST_CFA_OFFSET 4 @@ -754,6 +771,7 @@ ENTRY(nmi) cmpl $sysenter_entry,12(%esp) je nmi_debug_stack_check nmi_stack_correct: + /* We have a RING0_INT_FRAME here */ pushl %eax CFI_ADJUST_CFA_OFFSET 4 SAVE_ALL @@ -764,9 +782,12 @@ nmi_stack_correct: CFI_ENDPROC nmi_stack_fixup: + RING0_INT_FRAME FIX_STACK(12,nmi_stack_correct, 1) jmp nmi_stack_correct + nmi_debug_stack_check: + /* We have a RING0_INT_FRAME here */ cmpw $__KERNEL_CS,16(%esp) jne nmi_stack_correct cmpl $debug,(%esp) @@ -777,8 +798,10 @@ nmi_debug_stack_check: jmp nmi_stack_correct nmi_16bit_stack: - RING0_INT_FRAME - /* create the pointer to lss back */ + /* We have a RING0_INT_FRAME here. + * + * create the pointer to lss back + */ pushl %ss CFI_ADJUST_CFA_OFFSET 4 pushl %esp @@ -799,12 +822,13 @@ nmi_16bit_stack: call do_nmi RESTORE_REGS lss 12+4(%esp), %esp # back to 16bit stack -1: iret +1: INTERRUPT_RETURN CFI_ENDPROC .section __ex_table,"a" .align 4 .long 1b,iret_exc .previous +KPROBE_END(nmi) KPROBE_ENTRY(int3) RING0_INT_FRAME @@ -816,7 +840,7 @@ KPROBE_ENTRY(int3) call do_int3 jmp ret_from_exception CFI_ENDPROC - .previous .text +KPROBE_END(int3) ENTRY(overflow) RING0_INT_FRAME @@ -881,7 +905,7 @@ KPROBE_ENTRY(general_protection) CFI_ADJUST_CFA_OFFSET 4 jmp error_code CFI_ENDPROC - .previous .text +KPROBE_END(general_protection) ENTRY(alignment_check) RING0_EC_FRAME @@ -890,13 +914,14 @@ ENTRY(alignment_check) jmp error_code CFI_ENDPROC -KPROBE_ENTRY(page_fault) - RING0_EC_FRAME - pushl $do_page_fault +ENTRY(divide_error) + RING0_INT_FRAME + pushl $0 # no error code + CFI_ADJUST_CFA_OFFSET 4 + pushl $do_divide_error CFI_ADJUST_CFA_OFFSET 4 jmp error_code CFI_ENDPROC - .previous .text #ifdef CONFIG_X86_MCE ENTRY(machine_check) @@ -949,6 +974,19 @@ ENTRY(arch_unwind_init_running) ENDPROC(arch_unwind_init_running) #endif +ENTRY(kernel_thread_helper) + pushl $0 # fake return address for unwinder + CFI_STARTPROC + movl %edx,%eax + push %edx + CFI_ADJUST_CFA_OFFSET 4 + call *%ebx + push %eax + CFI_ADJUST_CFA_OFFSET 4 + call do_exit + CFI_ENDPROC +ENDPROC(kernel_thread_helper) + .section .rodata,"a" #include "syscall_table.S" diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index a6b8bd8..be9d883 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S @@ -371,8 +371,65 @@ rp_sidt: addl $8,%edi dec %ecx jne rp_sidt + +.macro set_early_handler handler,trapno + lea \handler,%edx + movl $(__KERNEL_CS << 16),%eax + movw %dx,%ax + movw $0x8E00,%dx /* interrupt gate - dpl=0, present */ + lea idt_table,%edi + movl %eax,8*\trapno(%edi) + movl %edx,8*\trapno+4(%edi) +.endm + + set_early_handler handler=early_divide_err,trapno=0 + set_early_handler handler=early_illegal_opcode,trapno=6 + set_early_handler handler=early_protection_fault,trapno=13 + set_early_handler handler=early_page_fault,trapno=14 + ret +early_divide_err: + xor %edx,%edx + pushl $0 /* fake errcode */ + jmp early_fault + +early_illegal_opcode: + movl $6,%edx + pushl $0 /* fake errcode */ + jmp early_fault + +early_protection_fault: + movl $13,%edx + jmp early_fault + +early_page_fault: + movl $14,%edx + jmp early_fault + +early_fault: + cld +#ifdef CONFIG_PRINTK + movl $(__KERNEL_DS),%eax + movl %eax,%ds + movl %eax,%es + cmpl $2,early_recursion_flag + je hlt_loop + incl early_recursion_flag + movl %cr2,%eax + pushl %eax + pushl %edx /* trapno */ + pushl $fault_msg +#ifdef CONFIG_EARLY_PRINTK + call early_printk +#else + call printk +#endif +#endif +hlt_loop: + hlt + jmp hlt_loop + /* This is the default interrupt "handler" :-) */ ALIGN ignore_int: @@ -386,6 +443,9 @@ #ifdef CONFIG_PRINTK movl $(__KERNEL_DS),%eax movl %eax,%ds movl %eax,%es + cmpl $2,early_recursion_flag + je hlt_loop + incl early_recursion_flag pushl 16(%esp) pushl 24(%esp) pushl 32(%esp) @@ -431,9 +491,16 @@ ENTRY(stack_start) ready: .byte 0 +early_recursion_flag: + .long 0 + int_msg: .asciz "Unknown interrupt or fault at EIP %p %p %p\n" +fault_msg: + .ascii "Int %d: CR2 %p err %p EIP %p CS %p flags %p\n" + .asciz "Stack: %p %p %p %p %p %p %p %p\n" + /* * The IDT and GDT 'descriptors' are a strange 48-bit object * only used by the lidt and lgdt instructions. They are not diff --git a/arch/i386/kernel/i8237.c b/arch/i386/kernel/i8237.c index c36d1c0..6f508e8 100644 --- a/arch/i386/kernel/i8237.c +++ b/arch/i386/kernel/i8237.c @@ -2,6 +2,11 @@ * i8237.c: 8237A DMA controller suspend functions. * * Written by Pierre Ossman, 2005. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. */ #include diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c index d4756d1..ea5f4e7 100644 --- a/arch/i386/kernel/i8259.c +++ b/arch/i386/kernel/i8259.c @@ -45,6 +45,8 @@ static void end_8259A_irq (unsigned int #define shutdown_8259A_irq disable_8259A_irq +static int i8259A_auto_eoi; + static void mask_and_ack_8259A(unsigned int); unsigned int startup_8259A_irq(unsigned int irq) @@ -253,7 +255,7 @@ static void save_ELCR(char *trigger) static int i8259A_resume(struct sys_device *dev) { - init_8259A(0); + init_8259A(i8259A_auto_eoi); restore_ELCR(irq_trigger); return 0; } @@ -301,6 +303,8 @@ void init_8259A(int auto_eoi) { unsigned long flags; + i8259A_auto_eoi = auto_eoi; + spin_lock_irqsave(&i8259A_lock, flags); outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 4fb32c5..fd0df75 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "io_ports.h" @@ -65,7 +66,7 @@ int sis_apic_bug = -1; */ int nr_ioapic_registers[MAX_IO_APICS]; -int disable_timer_pin_1 __initdata; +static int disable_timer_pin_1 __initdata; /* * Rough estimation of how many shared IRQs there are, can @@ -93,6 +94,34 @@ #else #define vector_to_irq(vector) (vector) #endif + +union entry_union { + struct { u32 w1, w2; }; + struct IO_APIC_route_entry entry; +}; + +static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin) +{ + union entry_union eu; + unsigned long flags; + spin_lock_irqsave(&ioapic_lock, flags); + eu.w1 = io_apic_read(apic, 0x10 + 2 * pin); + eu.w2 = io_apic_read(apic, 0x11 + 2 * pin); + spin_unlock_irqrestore(&ioapic_lock, flags); + return eu.entry; +} + +static void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) +{ + unsigned long flags; + union entry_union eu; + eu.entry = e; + spin_lock_irqsave(&ioapic_lock, flags); + io_apic_write(apic, 0x10 + 2*pin, eu.w1); + io_apic_write(apic, 0x11 + 2*pin, eu.w2); + spin_unlock_irqrestore(&ioapic_lock, flags); +} + /* * The common case is 1:1 IRQ<->pin mappings. Sometimes there are * shared ISA-space IRQs, so we have to support them. We are super @@ -200,13 +229,9 @@ static void unmask_IO_APIC_irq (unsigned static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin) { struct IO_APIC_route_entry entry; - unsigned long flags; /* Check delivery_mode to be sure we're not clearing an SMI pin */ - spin_lock_irqsave(&ioapic_lock, flags); - *(((int*)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin); - *(((int*)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * pin); - spin_unlock_irqrestore(&ioapic_lock, flags); + entry = ioapic_read_entry(apic, pin); if (entry.delivery_mode == dest_SMI) return; @@ -215,10 +240,7 @@ static void clear_IO_APIC_pin(unsigned i */ memset(&entry, 0, sizeof(entry)); entry.mask = 1; - spin_lock_irqsave(&ioapic_lock, flags); - io_apic_write(apic, 0x10 + 2 * pin, *(((int *)&entry) + 0)); - io_apic_write(apic, 0x11 + 2 * pin, *(((int *)&entry) + 1)); - spin_unlock_irqrestore(&ioapic_lock, flags); + ioapic_write_entry(apic, pin, entry); } static void clear_IO_APIC (void) @@ -1283,9 +1305,8 @@ static void __init setup_IO_APIC_irqs(vo if (!apic && (irq < 16)) disable_8259A_irq(irq); } + ioapic_write_entry(apic, pin, entry); spin_lock_irqsave(&ioapic_lock, flags); - io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1)); - io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0)); set_native_irq_info(irq, TARGET_CPUS); spin_unlock_irqrestore(&ioapic_lock, flags); } @@ -1301,7 +1322,6 @@ static void __init setup_IO_APIC_irqs(vo static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, int vector) { struct IO_APIC_route_entry entry; - unsigned long flags; memset(&entry,0,sizeof(entry)); @@ -1331,10 +1351,7 @@ static void __init setup_ExtINT_IRQ0_pin /* * Add it to the IO-APIC irq-routing table: */ - spin_lock_irqsave(&ioapic_lock, flags); - io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1)); - io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0)); - spin_unlock_irqrestore(&ioapic_lock, flags); + ioapic_write_entry(apic, pin, entry); enable_8259A_irq(0); } @@ -1444,10 +1461,7 @@ void __init print_IO_APIC(void) for (i = 0; i <= reg_01.bits.entries; i++) { struct IO_APIC_route_entry entry; - spin_lock_irqsave(&ioapic_lock, flags); - *(((int *)&entry)+0) = io_apic_read(apic, 0x10+i*2); - *(((int *)&entry)+1) = io_apic_read(apic, 0x11+i*2); - spin_unlock_irqrestore(&ioapic_lock, flags); + entry = ioapic_read_entry(apic, i); printk(KERN_DEBUG " %02x %03X %02X ", i, @@ -1666,10 +1680,7 @@ static void __init enable_IO_APIC(void) /* See if any of the pins is in ExtINT mode */ for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { struct IO_APIC_route_entry entry; - spin_lock_irqsave(&ioapic_lock, flags); - *(((int *)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin); - *(((int *)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * pin); - spin_unlock_irqrestore(&ioapic_lock, flags); + entry = ioapic_read_entry(apic, pin); /* If the interrupt line is enabled and in ExtInt mode @@ -1726,7 +1737,6 @@ void disable_IO_APIC(void) */ if (ioapic_i8259.pin != -1) { struct IO_APIC_route_entry entry; - unsigned long flags; memset(&entry, 0, sizeof(entry)); entry.mask = 0; /* Enabled */ @@ -1743,12 +1753,7 @@ void disable_IO_APIC(void) /* * Add it to the IO-APIC irq-routing table: */ - spin_lock_irqsave(&ioapic_lock, flags); - io_apic_write(ioapic_i8259.apic, 0x11+2*ioapic_i8259.pin, - *(((int *)&entry)+1)); - io_apic_write(ioapic_i8259.apic, 0x10+2*ioapic_i8259.pin, - *(((int *)&entry)+0)); - spin_unlock_irqrestore(&ioapic_lock, flags); + ioapic_write_entry(ioapic_i8259.apic, ioapic_i8259.pin, entry); } disconnect_bsp_APIC(ioapic_i8259.pin != -1); } @@ -2213,17 +2218,13 @@ static inline void unlock_ExtINT_logic(v int apic, pin, i; struct IO_APIC_route_entry entry0, entry1; unsigned char save_control, save_freq_select; - unsigned long flags; pin = find_isa_irq_pin(8, mp_INT); apic = find_isa_irq_apic(8, mp_INT); if (pin == -1) return; - spin_lock_irqsave(&ioapic_lock, flags); - *(((int *)&entry0) + 1) = io_apic_read(apic, 0x11 + 2 * pin); - *(((int *)&entry0) + 0) = io_apic_read(apic, 0x10 + 2 * pin); - spin_unlock_irqrestore(&ioapic_lock, flags); + entry0 = ioapic_read_entry(apic, pin); clear_IO_APIC_pin(apic, pin); memset(&entry1, 0, sizeof(entry1)); @@ -2236,10 +2237,7 @@ static inline void unlock_ExtINT_logic(v entry1.trigger = 0; entry1.vector = 0; - spin_lock_irqsave(&ioapic_lock, flags); - io_apic_write(apic, 0x11 + 2 * pin, *(((int *)&entry1) + 1)); - io_apic_write(apic, 0x10 + 2 * pin, *(((int *)&entry1) + 0)); - spin_unlock_irqrestore(&ioapic_lock, flags); + ioapic_write_entry(apic, pin, entry1); save_control = CMOS_READ(RTC_CONTROL); save_freq_select = CMOS_READ(RTC_FREQ_SELECT); @@ -2258,10 +2256,7 @@ static inline void unlock_ExtINT_logic(v CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); clear_IO_APIC_pin(apic, pin); - spin_lock_irqsave(&ioapic_lock, flags); - io_apic_write(apic, 0x11 + 2 * pin, *(((int *)&entry0) + 1)); - io_apic_write(apic, 0x10 + 2 * pin, *(((int *)&entry0) + 0)); - spin_unlock_irqrestore(&ioapic_lock, flags); + ioapic_write_entry(apic, pin, entry0); } int timer_uses_ioapic_pin_0; @@ -2461,17 +2456,12 @@ static int ioapic_suspend(struct sys_dev { struct IO_APIC_route_entry *entry; struct sysfs_ioapic_data *data; - unsigned long flags; int i; data = container_of(dev, struct sysfs_ioapic_data, dev); entry = data->entry; - spin_lock_irqsave(&ioapic_lock, flags); - for (i = 0; i < nr_ioapic_registers[dev->id]; i ++, entry ++ ) { - *(((int *)entry) + 1) = io_apic_read(dev->id, 0x11 + 2 * i); - *(((int *)entry) + 0) = io_apic_read(dev->id, 0x10 + 2 * i); - } - spin_unlock_irqrestore(&ioapic_lock, flags); + for (i = 0; i < nr_ioapic_registers[dev->id]; i ++) + entry[i] = ioapic_read_entry(dev->id, i); return 0; } @@ -2493,11 +2483,9 @@ static int ioapic_resume(struct sys_devi reg_00.bits.ID = mp_ioapics[dev->id].mpc_apicid; io_apic_write(dev->id, 0, reg_00.raw); } - for (i = 0; i < nr_ioapic_registers[dev->id]; i ++, entry ++ ) { - io_apic_write(dev->id, 0x11+2*i, *(((int *)entry)+1)); - io_apic_write(dev->id, 0x10+2*i, *(((int *)entry)+0)); - } spin_unlock_irqrestore(&ioapic_lock, flags); + for (i = 0; i < nr_ioapic_registers[dev->id]; i ++) + ioapic_write_entry(dev->id, i, entry[i]); return 0; } @@ -2694,9 +2682,8 @@ int io_apic_set_pci_routing (int ioapic, if (!ioapic && (irq < 16)) disable_8259A_irq(irq); + ioapic_write_entry(ioapic, pin, entry); spin_lock_irqsave(&ioapic_lock, flags); - io_apic_write(ioapic, 0x11+2*pin, *(((int *)&entry)+1)); - io_apic_write(ioapic, 0x10+2*pin, *(((int *)&entry)+0)); set_native_irq_info(use_pci_vector() ? entry.vector : irq, TARGET_CPUS); spin_unlock_irqrestore(&ioapic_lock, flags); @@ -2704,3 +2691,25 @@ int io_apic_set_pci_routing (int ioapic, } #endif /* CONFIG_ACPI */ + +static int __init parse_disable_timer_pin_1(char *arg) +{ + disable_timer_pin_1 = 1; + return 0; +} +early_param("disable_timer_pin_1", parse_disable_timer_pin_1); + +static int __init parse_enable_timer_pin_1(char *arg) +{ + disable_timer_pin_1 = -1; + return 0; +} +early_param("enable_timer_pin_1", parse_enable_timer_pin_1); + +static int __init parse_noapic(char *arg) +{ + /* disable IO-APIC */ + disable_ioapic_setup(); + return 0; +} +early_param("noapic", parse_noapic); diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index afe6505..d98e44b 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c @@ -230,20 +230,20 @@ void __kprobes arch_prepare_kretprobe(st struct pt_regs *regs) { unsigned long *sara = (unsigned long *)®s->esp; - struct kretprobe_instance *ri; - if ((ri = get_free_rp_inst(rp)) != NULL) { - ri->rp = rp; - ri->task = current; + struct kretprobe_instance *ri; + + if ((ri = get_free_rp_inst(rp)) != NULL) { + ri->rp = rp; + ri->task = current; ri->ret_addr = (kprobe_opcode_t *) *sara; /* Replace the return addr with trampoline addr */ *sara = (unsigned long) &kretprobe_trampoline; - - add_rp_inst(ri); - } else { - rp->nmissed++; - } + add_rp_inst(ri); + } else { + rp->nmissed++; + } } /* @@ -359,7 +359,7 @@ no_kprobe: void __kprobes kretprobe_trampoline_holder(void) { asm volatile ( ".global kretprobe_trampoline\n" - "kretprobe_trampoline: \n" + "kretprobe_trampoline: \n" " pushf\n" /* skip cs, eip, orig_eax, es, ds */ " subl $20, %esp\n" @@ -395,14 +395,15 @@ no_kprobe: */ fastcall void *__kprobes trampoline_handler(struct pt_regs *regs) { - struct kretprobe_instance *ri = NULL; - struct hlist_head *head; - struct hlist_node *node, *tmp; + struct kretprobe_instance *ri = NULL; + struct hlist_head *head, empty_rp; + struct hlist_node *node, *tmp; unsigned long flags, orig_ret_address = 0; unsigned long trampoline_address =(unsigned long)&kretprobe_trampoline; + INIT_HLIST_HEAD(&empty_rp); spin_lock_irqsave(&kretprobe_lock, flags); - head = kretprobe_inst_table_head(current); + head = kretprobe_inst_table_head(current); /* * It is possible to have multiple instances associated with a given @@ -413,14 +414,14 @@ fastcall void *__kprobes trampoline_hand * We can handle this because: * - instances are always inserted at the head of the list * - when multiple return probes are registered for the same - * function, the first instance's ret_addr will point to the + * function, the first instance's ret_addr will point to the * real return address, and all the rest will point to * kretprobe_trampoline */ hlist_for_each_entry_safe(ri, node, tmp, head, hlist) { - if (ri->task != current) + if (ri->task != current) /* another task is sharing our hash bucket */ - continue; + continue; if (ri->rp && ri->rp->handler){ __get_cpu_var(current_kprobe) = &ri->rp->kp; @@ -429,7 +430,7 @@ fastcall void *__kprobes trampoline_hand } orig_ret_address = (unsigned long)ri->ret_addr; - recycle_rp_inst(ri); + recycle_rp_inst(ri, &empty_rp); if (orig_ret_address != trampoline_address) /* @@ -444,6 +445,10 @@ fastcall void *__kprobes trampoline_hand spin_unlock_irqrestore(&kretprobe_lock, flags); + hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { + hlist_del(&ri->hlist); + kfree(ri); + } return (void*)orig_ret_address; } diff --git a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c index 6b1ae6b..91966ba 100644 --- a/arch/i386/kernel/machine_kexec.c +++ b/arch/i386/kernel/machine_kexec.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -20,70 +21,13 @@ #include #include #define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE))) - -#define L0_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY) -#define L1_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY) -#define L2_ATTR (_PAGE_PRESENT) - -#define LEVEL0_SIZE (1UL << 12UL) - -#ifndef CONFIG_X86_PAE -#define LEVEL1_SIZE (1UL << 22UL) -static u32 pgtable_level1[1024] PAGE_ALIGNED; - -static void identity_map_page(unsigned long address) -{ - unsigned long level1_index, level2_index; - u32 *pgtable_level2; - - /* Find the current page table */ - pgtable_level2 = __va(read_cr3()); - - /* Find the indexes of the physical address to identity map */ - level1_index = (address % LEVEL1_SIZE)/LEVEL0_SIZE; - level2_index = address / LEVEL1_SIZE; - - /* Identity map the page table entry */ - pgtable_level1[level1_index] = address | L0_ATTR; - pgtable_level2[level2_index] = __pa(pgtable_level1) | L1_ATTR; - - /* Flush the tlb so the new mapping takes effect. - * Global tlb entries are not flushed but that is not an issue. - */ - load_cr3(pgtable_level2); -} - -#else -#define LEVEL1_SIZE (1UL << 21UL) -#define LEVEL2_SIZE (1UL << 30UL) -static u64 pgtable_level1[512] PAGE_ALIGNED; -static u64 pgtable_level2[512] PAGE_ALIGNED; - -static void identity_map_page(unsigned long address) -{ - unsigned long level1_index, level2_index, level3_index; - u64 *pgtable_level3; - - /* Find the current page table */ - pgtable_level3 = __va(read_cr3()); - - /* Find the indexes of the physical address to identity map */ - level1_index = (address % LEVEL1_SIZE)/LEVEL0_SIZE; - level2_index = (address % LEVEL2_SIZE)/LEVEL1_SIZE; - level3_index = address / LEVEL2_SIZE; - - /* Identity map the page table entry */ - pgtable_level1[level1_index] = address | L0_ATTR; - pgtable_level2[level2_index] = __pa(pgtable_level1) | L1_ATTR; - set_64bit(&pgtable_level3[level3_index], - __pa(pgtable_level2) | L2_ATTR); - - /* Flush the tlb so the new mapping takes effect. - * Global tlb entries are not flushed but that is not an issue. - */ - load_cr3(pgtable_level3); -} +static u32 kexec_pgd[1024] PAGE_ALIGNED; +#ifdef CONFIG_X86_PAE +static u32 kexec_pmd0[1024] PAGE_ALIGNED; +static u32 kexec_pmd1[1024] PAGE_ALIGNED; #endif +static u32 kexec_pte0[1024] PAGE_ALIGNED; +static u32 kexec_pte1[1024] PAGE_ALIGNED; static void set_idt(void *newidt, __u16 limit) { @@ -127,16 +71,6 @@ #undef STR #undef __STR } -typedef asmlinkage NORET_TYPE void (*relocate_new_kernel_t)( - unsigned long indirection_page, - unsigned long reboot_code_buffer, - unsigned long start_address, - unsigned int has_pae) ATTRIB_NORET; - -extern const unsigned char relocate_new_kernel[]; -extern void relocate_new_kernel_end(void); -extern const unsigned int relocate_new_kernel_size; - /* * A architecture hook called to validate the * proposed image and prepare the control pages @@ -169,25 +103,29 @@ void machine_kexec_cleanup(struct kimage */ NORET_TYPE void machine_kexec(struct kimage *image) { - unsigned long page_list; - unsigned long reboot_code_buffer; - - relocate_new_kernel_t rnk; + unsigned long page_list[PAGES_NR]; + void *control_page; /* Interrupts aren't acceptable while we reboot */ local_irq_disable(); - /* Compute some offsets */ - reboot_code_buffer = page_to_pfn(image->control_code_page) - << PAGE_SHIFT; - page_list = image->head; - - /* Set up an identity mapping for the reboot_code_buffer */ - identity_map_page(reboot_code_buffer); - - /* copy it out */ - memcpy((void *)reboot_code_buffer, relocate_new_kernel, - relocate_new_kernel_size); + control_page = page_address(image->control_code_page); + memcpy(control_page, relocate_kernel, PAGE_SIZE); + + page_list[PA_CONTROL_PAGE] = __pa(control_page); + page_list[VA_CONTROL_PAGE] = (unsigned long)relocate_kernel; + page_list[PA_PGD] = __pa(kexec_pgd); + page_list[VA_PGD] = (unsigned long)kexec_pgd; +#ifdef CONFIG_X86_PAE + page_list[PA_PMD_0] = __pa(kexec_pmd0); + page_list[VA_PMD_0] = (unsigned long)kexec_pmd0; + page_list[PA_PMD_1] = __pa(kexec_pmd1); + page_list[VA_PMD_1] = (unsigned long)kexec_pmd1; +#endif + page_list[PA_PTE_0] = __pa(kexec_pte0); + page_list[VA_PTE_0] = (unsigned long)kexec_pte0; + page_list[PA_PTE_1] = __pa(kexec_pte1); + page_list[VA_PTE_1] = (unsigned long)kexec_pte1; /* The segment registers are funny things, they have both a * visible and an invisible part. Whenever the visible part is @@ -206,6 +144,28 @@ NORET_TYPE void machine_kexec(struct kim set_idt(phys_to_virt(0),0); /* now call it */ - rnk = (relocate_new_kernel_t) reboot_code_buffer; - (*rnk)(page_list, reboot_code_buffer, image->start, cpu_has_pae); + relocate_kernel((unsigned long)image->head, (unsigned long)page_list, + image->start, cpu_has_pae); +} + +/* crashkernel=size@addr specifies the location to reserve for + * a crash kernel. By reserving this memory we guarantee + * that linux never sets it up as a DMA target. + * Useful for holding code to do something appropriate + * after a kernel panic. + */ +static int __init parse_crashkernel(char *arg) +{ + unsigned long size, base; + size = memparse(arg, &arg); + if (*arg == '@') { + base = memparse(arg+1, &arg); + /* FIXME: Do I want a sanity check + * to validate the memory range? + */ + crashk_res.start = base; + crashk_res.end = base + size - 1; + } + return 0; } +early_param("crashkernel", parse_crashkernel); diff --git a/arch/i386/kernel/mca.c b/arch/i386/kernel/mca.c index cd5456f..eb57a85 100644 --- a/arch/i386/kernel/mca.c +++ b/arch/i386/kernel/mca.c @@ -42,6 +42,7 @@ #include #include #include #include +#include #include #include #include @@ -414,7 +415,8 @@ subsys_initcall(mca_init); /*--------------------------------------------------------------------*/ -static void mca_handle_nmi_device(struct mca_device *mca_dev, int check_flag) +static __kprobes void +mca_handle_nmi_device(struct mca_device *mca_dev, int check_flag) { int slot = mca_dev->slot; @@ -444,7 +446,7 @@ static void mca_handle_nmi_device(struct /*--------------------------------------------------------------------*/ -static int mca_handle_nmi_callback(struct device *dev, void *data) +static int __kprobes mca_handle_nmi_callback(struct device *dev, void *data) { struct mca_device *mca_dev = to_mca_device(dev); unsigned char pos5; @@ -462,7 +464,7 @@ static int mca_handle_nmi_callback(struc return 0; } -void mca_handle_nmi(void) +void __kprobes mca_handle_nmi(void) { /* First try - scan the various adapters and see if a specific * adapter was responsible for the error. diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index 40b44cc..9b94797 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c @@ -2,6 +2,7 @@ * Intel CPU Microcode Update Driver for Linux * * Copyright (C) 2000-2004 Tigran Aivazian + * 2006 Shaohua Li * * This driver allows to upgrade microcode on Intel processors * belonging to IA-32 family - PentiumPro, Pentium II, @@ -82,6 +83,9 @@ #include #include #include #include +#include +#include +#include #include #include @@ -91,9 +95,6 @@ MODULE_DESCRIPTION("Intel CPU (IA-32) Mi MODULE_AUTHOR("Tigran Aivazian "); MODULE_LICENSE("GPL"); -static int verbose; -module_param(verbose, int, 0644); - #define MICROCODE_VERSION "1.14a" #define DEFAULT_UCODE_DATASIZE (2000) /* 2000 bytes */ @@ -120,55 +121,40 @@ static DEFINE_SPINLOCK(microcode_update_ /* no concurrent ->write()s are allowed on /dev/cpu/microcode */ static DEFINE_MUTEX(microcode_mutex); -static void __user *user_buffer; /* user area microcode data buffer */ -static unsigned int user_buffer_size; /* it's size */ - -typedef enum mc_error_code { - MC_SUCCESS = 0, - MC_IGNORED = 1, - MC_NOTFOUND = 2, - MC_MARKED = 3, - MC_ALLOCATED = 4, -} mc_error_code_t; - static struct ucode_cpu_info { + int valid; unsigned int sig; - unsigned int pf, orig_pf; + unsigned int pf; unsigned int rev; - unsigned int cksum; - mc_error_code_t err; microcode_t *mc; } ucode_cpu_info[NR_CPUS]; - -static int microcode_open (struct inode *unused1, struct file *unused2) -{ - return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; -} -static void collect_cpu_info (void *unused) +static void collect_cpu_info(int cpu_num) { - int cpu_num = smp_processor_id(); struct cpuinfo_x86 *c = cpu_data + cpu_num; struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; unsigned int val[2]; - uci->sig = uci->pf = uci->rev = uci->cksum = 0; - uci->err = MC_NOTFOUND; + /* We should bind the task to the CPU */ + BUG_ON(raw_smp_processor_id() != cpu_num); + uci->pf = uci->rev = 0; uci->mc = NULL; + uci->valid = 1; if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 || cpu_has(c, X86_FEATURE_IA64)) { - printk(KERN_ERR "microcode: CPU%d not a capable Intel processor\n", cpu_num); + printk(KERN_ERR "microcode: CPU%d not a capable Intel " + "processor\n", cpu_num); + uci->valid = 0; return; - } else { - uci->sig = cpuid_eax(0x00000001); + } - if ((c->x86_model >= 5) || (c->x86 > 6)) { - /* get processor flags from MSR 0x17 */ - rdmsr(MSR_IA32_PLATFORM_ID, val[0], val[1]); - uci->pf = 1 << ((val[1] >> 18) & 7); - } - uci->orig_pf = uci->pf; + uci->sig = cpuid_eax(0x00000001); + + if ((c->x86_model >= 5) || (c->x86 > 6)) { + /* get processor flags from MSR 0x17 */ + rdmsr(MSR_IA32_PLATFORM_ID, val[0], val[1]); + uci->pf = 1 << ((val[1] >> 18) & 7); } wrmsr(MSR_IA32_UCODE_REV, 0, 0); @@ -180,218 +166,159 @@ static void collect_cpu_info (void *unus uci->sig, uci->pf, uci->rev); } -static inline void mark_microcode_update (int cpu_num, microcode_header_t *mc_header, int sig, int pf, int cksum) +static inline int microcode_update_match(int cpu_num, + microcode_header_t *mc_header, int sig, int pf) { struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; - pr_debug("Microcode Found.\n"); - pr_debug(" Header Revision 0x%x\n", mc_header->hdrver); - pr_debug(" Loader Revision 0x%x\n", mc_header->ldrver); - pr_debug(" Revision 0x%x \n", mc_header->rev); - pr_debug(" Date %x/%x/%x\n", - ((mc_header->date >> 24 ) & 0xff), - ((mc_header->date >> 16 ) & 0xff), - (mc_header->date & 0xFFFF)); - pr_debug(" Signature 0x%x\n", sig); - pr_debug(" Type 0x%x Family 0x%x Model 0x%x Stepping 0x%x\n", - ((sig >> 12) & 0x3), - ((sig >> 8) & 0xf), - ((sig >> 4) & 0xf), - ((sig & 0xf))); - pr_debug(" Processor Flags 0x%x\n", pf); - pr_debug(" Checksum 0x%x\n", cksum); - - if (mc_header->rev < uci->rev) { - if (uci->err == MC_NOTFOUND) { - uci->err = MC_IGNORED; - uci->cksum = mc_header->rev; - } else if (uci->err == MC_IGNORED && uci->cksum < mc_header->rev) - uci->cksum = mc_header->rev; - } else if (mc_header->rev == uci->rev) { - if (uci->err < MC_MARKED) { - /* notify the caller of success on this cpu */ - uci->err = MC_SUCCESS; - } - } else if (uci->err != MC_ALLOCATED || mc_header->rev > uci->mc->hdr.rev) { - pr_debug("microcode: CPU%d found a matching microcode update with " - " revision 0x%x (current=0x%x)\n", cpu_num, mc_header->rev, uci->rev); - uci->cksum = cksum; - uci->pf = pf; /* keep the original mc pf for cksum calculation */ - uci->err = MC_MARKED; /* found the match */ - for_each_online_cpu(cpu_num) { - if (ucode_cpu_info + cpu_num != uci - && ucode_cpu_info[cpu_num].mc == uci->mc) { - uci->mc = NULL; - break; - } - } - if (uci->mc != NULL) { - vfree(uci->mc); - uci->mc = NULL; - } - } - return; + if (!sigmatch(sig, uci->sig, pf, uci->pf) + || mc_header->rev <= uci->rev) + return 0; + return 1; } -static int find_matching_ucodes (void) +static int microcode_sanity_check(void *mc) { - int cursor = 0; - int error = 0; - - while (cursor + MC_HEADER_SIZE < user_buffer_size) { - microcode_header_t mc_header; - void *newmc = NULL; - int i, sum, cpu_num, allocated_flag, total_size, data_size, ext_table_size; + microcode_header_t *mc_header = mc; + struct extended_sigtable *ext_header = NULL; + struct extended_signature *ext_sig; + unsigned long total_size, data_size, ext_table_size; + int sum, orig_sum, ext_sigcount = 0, i; + + total_size = get_totalsize(mc_header); + data_size = get_datasize(mc_header); + if (data_size + MC_HEADER_SIZE > total_size) { + printk(KERN_ERR "microcode: error! " + "Bad data size in microcode data file\n"); + return -EINVAL; + } - if (copy_from_user(&mc_header, user_buffer + cursor, MC_HEADER_SIZE)) { - printk(KERN_ERR "microcode: error! Can not read user data\n"); - error = -EFAULT; - goto out; + if (mc_header->ldrver != 1 || mc_header->hdrver != 1) { + printk(KERN_ERR "microcode: error! " + "Unknown microcode update format\n"); + return -EINVAL; + } + ext_table_size = total_size - (MC_HEADER_SIZE + data_size); + if (ext_table_size) { + if ((ext_table_size < EXT_HEADER_SIZE) + || ((ext_table_size - EXT_HEADER_SIZE) % EXT_SIGNATURE_SIZE)) { + printk(KERN_ERR "microcode: error! " + "Small exttable size in microcode data file\n"); + return -EINVAL; } - - total_size = get_totalsize(&mc_header); - if ((cursor + total_size > user_buffer_size) || (total_size < DEFAULT_UCODE_TOTALSIZE)) { - printk(KERN_ERR "microcode: error! Bad data in microcode data file\n"); - error = -EINVAL; - goto out; + ext_header = mc + MC_HEADER_SIZE + data_size; + if (ext_table_size != exttable_size(ext_header)) { + printk(KERN_ERR "microcode: error! " + "Bad exttable size in microcode data file\n"); + return -EFAULT; } + ext_sigcount = ext_header->count; + } - data_size = get_datasize(&mc_header); - if ((data_size + MC_HEADER_SIZE > total_size) || (data_size < DEFAULT_UCODE_DATASIZE)) { - printk(KERN_ERR "microcode: error! Bad data in microcode data file\n"); - error = -EINVAL; - goto out; + /* check extended table checksum */ + if (ext_table_size) { + int ext_table_sum = 0; + int *ext_tablep = (int *)ext_header; + + i = ext_table_size / DWSIZE; + while (i--) + ext_table_sum += ext_tablep[i]; + if (ext_table_sum) { + printk(KERN_WARNING "microcode: aborting, " + "bad extended signature table checksum\n"); + return -EINVAL; } + } - if (mc_header.ldrver != 1 || mc_header.hdrver != 1) { - printk(KERN_ERR "microcode: error! Unknown microcode update format\n"); - error = -EINVAL; - goto out; + /* calculate the checksum */ + orig_sum = 0; + i = (MC_HEADER_SIZE + data_size) / DWSIZE; + while (i--) + orig_sum += ((int *)mc)[i]; + if (orig_sum) { + printk(KERN_ERR "microcode: aborting, bad checksum\n"); + return -EINVAL; + } + if (!ext_table_size) + return 0; + /* check extended signature checksum */ + for (i = 0; i < ext_sigcount; i++) { + ext_sig = (struct extended_signature *)((void *)ext_header + + EXT_HEADER_SIZE + EXT_SIGNATURE_SIZE * i); + sum = orig_sum + - (mc_header->sig + mc_header->pf + mc_header->cksum) + + (ext_sig->sig + ext_sig->pf + ext_sig->cksum); + if (sum) { + printk(KERN_ERR "microcode: aborting, bad checksum\n"); + return -EINVAL; } + } + return 0; +} - for_each_online_cpu(cpu_num) { - struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; - - if (sigmatch(mc_header.sig, uci->sig, mc_header.pf, uci->orig_pf)) - mark_microcode_update(cpu_num, &mc_header, mc_header.sig, mc_header.pf, mc_header.cksum); - } +/* + * return 0 - no update found + * return 1 - found update + * return < 0 - error + */ +static int get_maching_microcode(void *mc, int cpu) +{ + struct ucode_cpu_info *uci = ucode_cpu_info + cpu; + microcode_header_t *mc_header = mc; + struct extended_sigtable *ext_header; + unsigned long total_size = get_totalsize(mc_header); + int ext_sigcount, i; + struct extended_signature *ext_sig; + void *new_mc; + + if (microcode_update_match(cpu, mc_header, + mc_header->sig, mc_header->pf)) + goto find; + + if (total_size <= get_datasize(mc_header) + MC_HEADER_SIZE) + return 0; + + ext_header = (struct extended_sigtable *)(mc + + get_datasize(mc_header) + MC_HEADER_SIZE); + ext_sigcount = ext_header->count; + ext_sig = (struct extended_signature *)((void *)ext_header + + EXT_HEADER_SIZE); + for (i = 0; i < ext_sigcount; i++) { + if (microcode_update_match(cpu, mc_header, + ext_sig->sig, ext_sig->pf)) + goto find; + ext_sig++; + } + return 0; +find: + pr_debug("microcode: CPU %d found a matching microcode update with" + " version 0x%x (current=0x%x)\n", cpu, mc_header->rev,uci->rev); + new_mc = vmalloc(total_size); + if (!new_mc) { + printk(KERN_ERR "microcode: error! Can not allocate memory\n"); + return -ENOMEM; + } - ext_table_size = total_size - (MC_HEADER_SIZE + data_size); - if (ext_table_size) { - struct extended_sigtable ext_header; - struct extended_signature ext_sig; - int ext_sigcount; + /* free previous update file */ + vfree(uci->mc); - if ((ext_table_size < EXT_HEADER_SIZE) - || ((ext_table_size - EXT_HEADER_SIZE) % EXT_SIGNATURE_SIZE)) { - printk(KERN_ERR "microcode: error! Bad data in microcode data file\n"); - error = -EINVAL; - goto out; - } - if (copy_from_user(&ext_header, user_buffer + cursor - + MC_HEADER_SIZE + data_size, EXT_HEADER_SIZE)) { - printk(KERN_ERR "microcode: error! Can not read user data\n"); - error = -EFAULT; - goto out; - } - if (ext_table_size != exttable_size(&ext_header)) { - printk(KERN_ERR "microcode: error! Bad data in microcode data file\n"); - error = -EFAULT; - goto out; - } - - ext_sigcount = ext_header.count; - - for (i = 0; i < ext_sigcount; i++) { - if (copy_from_user(&ext_sig, user_buffer + cursor + MC_HEADER_SIZE + data_size + EXT_HEADER_SIZE - + EXT_SIGNATURE_SIZE * i, EXT_SIGNATURE_SIZE)) { - printk(KERN_ERR "microcode: error! Can not read user data\n"); - error = -EFAULT; - goto out; - } - for_each_online_cpu(cpu_num) { - struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; - - if (sigmatch(ext_sig.sig, uci->sig, ext_sig.pf, uci->orig_pf)) { - mark_microcode_update(cpu_num, &mc_header, ext_sig.sig, ext_sig.pf, ext_sig.cksum); - } - } - } - } - /* now check if any cpu has matched */ - allocated_flag = 0; - sum = 0; - for_each_online_cpu(cpu_num) { - if (ucode_cpu_info[cpu_num].err == MC_MARKED) { - struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; - if (!allocated_flag) { - allocated_flag = 1; - newmc = vmalloc(total_size); - if (!newmc) { - printk(KERN_ERR "microcode: error! Can not allocate memory\n"); - error = -ENOMEM; - goto out; - } - if (copy_from_user(newmc + MC_HEADER_SIZE, - user_buffer + cursor + MC_HEADER_SIZE, - total_size - MC_HEADER_SIZE)) { - printk(KERN_ERR "microcode: error! Can not read user data\n"); - vfree(newmc); - error = -EFAULT; - goto out; - } - memcpy(newmc, &mc_header, MC_HEADER_SIZE); - /* check extended table checksum */ - if (ext_table_size) { - int ext_table_sum = 0; - int * ext_tablep = (((void *) newmc) + MC_HEADER_SIZE + data_size); - i = ext_table_size / DWSIZE; - while (i--) ext_table_sum += ext_tablep[i]; - if (ext_table_sum) { - printk(KERN_WARNING "microcode: aborting, bad extended signature table checksum\n"); - vfree(newmc); - error = -EINVAL; - goto out; - } - } - - /* calculate the checksum */ - i = (MC_HEADER_SIZE + data_size) / DWSIZE; - while (i--) sum += ((int *)newmc)[i]; - sum -= (mc_header.sig + mc_header.pf + mc_header.cksum); - } - ucode_cpu_info[cpu_num].mc = newmc; - ucode_cpu_info[cpu_num].err = MC_ALLOCATED; /* mc updated */ - if (sum + uci->sig + uci->pf + uci->cksum != 0) { - printk(KERN_ERR "microcode: CPU%d aborting, bad checksum\n", cpu_num); - error = -EINVAL; - goto out; - } - } - } - cursor += total_size; /* goto the next update patch */ - } /* end of while */ -out: - return error; + memcpy(new_mc, mc, total_size); + uci->mc = new_mc; + return 1; } -static void do_update_one (void * unused) +static void apply_microcode(int cpu) { unsigned long flags; unsigned int val[2]; - int cpu_num = smp_processor_id(); + int cpu_num = raw_smp_processor_id(); struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; - if (uci->mc == NULL) { - if (verbose) { - if (uci->err == MC_SUCCESS) - printk(KERN_INFO "microcode: CPU%d already at revision 0x%x\n", - cpu_num, uci->rev); - else - printk(KERN_INFO "microcode: No new microcode data for CPU%d\n", cpu_num); - } + /* We should bind the task to the CPU */ + BUG_ON(cpu_num != cpu); + + if (uci->mc == NULL) return; - } /* serialize access to the physical write to MSR 0x79 */ spin_lock_irqsave(µcode_update_lock, flags); @@ -408,68 +335,107 @@ static void do_update_one (void * unused /* get the current revision from MSR 0x8B */ rdmsr(MSR_IA32_UCODE_REV, val[0], val[1]); - /* notify the caller of success on this cpu */ - uci->err = MC_SUCCESS; spin_unlock_irqrestore(µcode_update_lock, flags); - printk(KERN_INFO "microcode: CPU%d updated from revision " + if (val[1] != uci->mc->hdr.rev) { + printk(KERN_ERR "microcode: CPU%d updated from revision " + "0x%x to 0x%x failed\n", cpu_num, uci->rev, val[1]); + return; + } + pr_debug("microcode: CPU%d updated from revision " "0x%x to 0x%x, date = %08x \n", cpu_num, uci->rev, val[1], uci->mc->hdr.date); - return; + uci->rev = val[1]; } -static int do_microcode_update (void) -{ - int i, error; +#ifdef CONFIG_MICROCODE_OLD_INTERFACE +static void __user *user_buffer; /* user area microcode data buffer */ +static unsigned int user_buffer_size; /* it's size */ - if (on_each_cpu(collect_cpu_info, NULL, 1, 1) != 0) { - printk(KERN_ERR "microcode: Error! Could not run on all processors\n"); - error = -EIO; - goto out; +static long get_next_ucode(void **mc, long offset) +{ + microcode_header_t mc_header; + unsigned long total_size; + + /* No more data */ + if (offset >= user_buffer_size) + return 0; + if (copy_from_user(&mc_header, user_buffer + offset, MC_HEADER_SIZE)) { + printk(KERN_ERR "microcode: error! Can not read user data\n"); + return -EFAULT; } - - if ((error = find_matching_ucodes())) { - printk(KERN_ERR "microcode: Error in the microcode data\n"); - goto out_free; + total_size = get_totalsize(&mc_header); + if (offset + total_size > user_buffer_size) { + printk(KERN_ERR "microcode: error! Bad total size in microcode " + "data file\n"); + return -EINVAL; } - - if (on_each_cpu(do_update_one, NULL, 1, 1) != 0) { - printk(KERN_ERR "microcode: Error! Could not run on all processors\n"); - error = -EIO; + *mc = vmalloc(total_size); + if (!*mc) + return -ENOMEM; + if (copy_from_user(*mc, user_buffer + offset, total_size)) { + printk(KERN_ERR "microcode: error! Can not read user data\n"); + vfree(*mc); + return -EFAULT; } + return offset + total_size; +} + +static int do_microcode_update (void) +{ + long cursor = 0; + int error = 0; + void *new_mc; + int cpu; + cpumask_t old; + + old = current->cpus_allowed; -out_free: - for_each_online_cpu(i) { - if (ucode_cpu_info[i].mc) { - int j; - void *tmp = ucode_cpu_info[i].mc; - vfree(tmp); - for_each_online_cpu(j) { - if (ucode_cpu_info[j].mc == tmp) - ucode_cpu_info[j].mc = NULL; - } + while ((cursor = get_next_ucode(&new_mc, cursor)) > 0) { + error = microcode_sanity_check(new_mc); + if (error) + goto out; + /* + * It's possible the data file has multiple matching ucode, + * lets keep searching till the latest version + */ + for_each_online_cpu(cpu) { + struct ucode_cpu_info *uci = ucode_cpu_info + cpu; + + if (!uci->valid) + continue; + set_cpus_allowed(current, cpumask_of_cpu(cpu)); + error = get_maching_microcode(new_mc, cpu); + if (error < 0) + goto out; + if (error == 1) + apply_microcode(cpu); } - if (ucode_cpu_info[i].err == MC_IGNORED && verbose) - printk(KERN_WARNING "microcode: CPU%d not 'upgrading' to earlier revision" - " 0x%x (current=0x%x)\n", i, ucode_cpu_info[i].cksum, ucode_cpu_info[i].rev); + vfree(new_mc); } out: + if (cursor > 0) + vfree(new_mc); + if (cursor < 0) + error = cursor; + set_cpus_allowed(current, old); return error; } +static int microcode_open (struct inode *unused1, struct file *unused2) +{ + return capable(CAP_SYS_RAWIO) ? 0 : -EPERM; +} + static ssize_t microcode_write (struct file *file, const char __user *buf, size_t len, loff_t *ppos) { ssize_t ret; - if (len < DEFAULT_UCODE_TOTALSIZE) { - printk(KERN_ERR "microcode: not enough data\n"); - return -EINVAL; - } - if ((len >> PAGE_SHIFT) > num_physpages) { printk(KERN_ERR "microcode: too much data (max %ld pages)\n", num_physpages); return -EINVAL; } + lock_cpu_hotplug(); mutex_lock(µcode_mutex); user_buffer = (void __user *) buf; @@ -480,6 +446,7 @@ static ssize_t microcode_write (struct f ret = (ssize_t)len; mutex_unlock(µcode_mutex); + unlock_cpu_hotplug(); return ret; } @@ -496,7 +463,7 @@ static struct miscdevice microcode_dev = .fops = µcode_fops, }; -static int __init microcode_init (void) +static int __init microcode_dev_init (void) { int error; @@ -508,6 +475,280 @@ static int __init microcode_init (void) return error; } + return 0; +} + +static void __exit microcode_dev_exit (void) +{ + misc_deregister(µcode_dev); +} + +MODULE_ALIAS_MISCDEV(MICROCODE_MINOR); +#else +#define microcode_dev_init() 0 +#define microcode_dev_exit() do { } while(0) +#endif + +static long get_next_ucode_from_buffer(void **mc, void *buf, + unsigned long size, long offset) +{ + microcode_header_t *mc_header; + unsigned long total_size; + + /* No more data */ + if (offset >= size) + return 0; + mc_header = (microcode_header_t *)(buf + offset); + total_size = get_totalsize(mc_header); + + if (offset + total_size > size) { + printk(KERN_ERR "microcode: error! Bad data in microcode data file\n"); + return -EINVAL; + } + + *mc = vmalloc(total_size); + if (!*mc) { + printk(KERN_ERR "microcode: error! Can not allocate memory\n"); + return -ENOMEM; + } + memcpy(*mc, buf + offset, total_size); + return offset + total_size; +} + +/* fake device for request_firmware */ +static struct platform_device *microcode_pdev; + +static int cpu_request_microcode(int cpu) +{ + char name[30]; + struct cpuinfo_x86 *c = cpu_data + cpu; + const struct firmware *firmware; + void *buf; + unsigned long size; + long offset = 0; + int error; + void *mc; + + /* We should bind the task to the CPU */ + BUG_ON(cpu != raw_smp_processor_id()); + sprintf(name,"intel-ucode/%02x-%02x-%02x", + c->x86, c->x86_model, c->x86_mask); + error = request_firmware(&firmware, name, µcode_pdev->dev); + if (error) { + pr_debug("ucode data file %s load failed\n", name); + return error; + } + buf = (void *)firmware->data; + size = firmware->size; + while ((offset = get_next_ucode_from_buffer(&mc, buf, size, offset)) + > 0) { + error = microcode_sanity_check(mc); + if (error) + break; + error = get_maching_microcode(mc, cpu); + if (error < 0) + break; + /* + * It's possible the data file has multiple matching ucode, + * lets keep searching till the latest version + */ + if (error == 1) { + apply_microcode(cpu); + error = 0; + } + vfree(mc); + } + if (offset > 0) + vfree(mc); + if (offset < 0) + error = offset; + release_firmware(firmware); + + return error; +} + +static void microcode_init_cpu(int cpu) +{ + cpumask_t old; + struct ucode_cpu_info *uci = ucode_cpu_info + cpu; + + old = current->cpus_allowed; + + set_cpus_allowed(current, cpumask_of_cpu(cpu)); + mutex_lock(µcode_mutex); + collect_cpu_info(cpu); + if (uci->valid) + cpu_request_microcode(cpu); + mutex_unlock(µcode_mutex); + set_cpus_allowed(current, old); +} + +static void microcode_fini_cpu(int cpu) +{ + struct ucode_cpu_info *uci = ucode_cpu_info + cpu; + + mutex_lock(µcode_mutex); + uci->valid = 0; + vfree(uci->mc); + uci->mc = NULL; + mutex_unlock(µcode_mutex); +} + +static ssize_t reload_store(struct sys_device *dev, const char *buf, size_t sz) +{ + struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; + char *end; + unsigned long val = simple_strtoul(buf, &end, 0); + int err = 0; + int cpu = dev->id; + + if (end == buf) + return -EINVAL; + if (val == 1) { + cpumask_t old; + + old = current->cpus_allowed; + + lock_cpu_hotplug(); + set_cpus_allowed(current, cpumask_of_cpu(cpu)); + + mutex_lock(µcode_mutex); + if (uci->valid) + err = cpu_request_microcode(cpu); + mutex_unlock(µcode_mutex); + unlock_cpu_hotplug(); + set_cpus_allowed(current, old); + } + if (err) + return err; + return sz; +} + +static ssize_t version_show(struct sys_device *dev, char *buf) +{ + struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; + + return sprintf(buf, "0x%x\n", uci->rev); +} + +static ssize_t pf_show(struct sys_device *dev, char *buf) +{ + struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; + + return sprintf(buf, "0x%x\n", uci->pf); +} + +static SYSDEV_ATTR(reload, 0200, NULL, reload_store); +static SYSDEV_ATTR(version, 0400, version_show, NULL); +static SYSDEV_ATTR(processor_flags, 0400, pf_show, NULL); + +static struct attribute *mc_default_attrs[] = { + &attr_reload.attr, + &attr_version.attr, + &attr_processor_flags.attr, + NULL +}; + +static struct attribute_group mc_attr_group = { + .attrs = mc_default_attrs, + .name = "microcode", +}; + +static int mc_sysdev_add(struct sys_device *sys_dev) +{ + int cpu = sys_dev->id; + struct ucode_cpu_info *uci = ucode_cpu_info + cpu; + + if (!cpu_online(cpu)) + return 0; + pr_debug("Microcode:CPU %d added\n", cpu); + memset(uci, 0, sizeof(*uci)); + sysfs_create_group(&sys_dev->kobj, &mc_attr_group); + + microcode_init_cpu(cpu); + return 0; +} + +static int mc_sysdev_remove(struct sys_device *sys_dev) +{ + int cpu = sys_dev->id; + + if (!cpu_online(cpu)) + return 0; + pr_debug("Microcode:CPU %d removed\n", cpu); + microcode_fini_cpu(cpu); + sysfs_remove_group(&sys_dev->kobj, &mc_attr_group); + return 0; +} + +static int mc_sysdev_resume(struct sys_device *dev) +{ + int cpu = dev->id; + + if (!cpu_online(cpu)) + return 0; + pr_debug("Microcode:CPU %d resumed\n", cpu); + /* only CPU 0 will apply ucode here */ + apply_microcode(0); + return 0; +} + +static struct sysdev_driver mc_sysdev_driver = { + .add = mc_sysdev_add, + .remove = mc_sysdev_remove, + .resume = mc_sysdev_resume, +}; + +#ifdef CONFIG_HOTPLUG_CPU +static __cpuinit int +mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) +{ + unsigned int cpu = (unsigned long)hcpu; + struct sys_device *sys_dev; + + sys_dev = get_cpu_sysdev(cpu); + switch (action) { + case CPU_ONLINE: + case CPU_DOWN_FAILED: + mc_sysdev_add(sys_dev); + break; + case CPU_DOWN_PREPARE: + mc_sysdev_remove(sys_dev); + break; + } + return NOTIFY_OK; +} + +static struct notifier_block mc_cpu_notifier = { + .notifier_call = mc_cpu_callback, +}; +#endif + +static int __init microcode_init (void) +{ + int error; + + error = microcode_dev_init(); + if (error) + return error; + microcode_pdev = platform_device_register_simple("microcode", -1, + NULL, 0); + if (IS_ERR(microcode_pdev)) { + microcode_dev_exit(); + return PTR_ERR(microcode_pdev); + } + + lock_cpu_hotplug(); + error = sysdev_driver_register(&cpu_sysdev_class, &mc_sysdev_driver); + unlock_cpu_hotplug(); + if (error) { + microcode_dev_exit(); + platform_device_unregister(microcode_pdev); + return error; + } + + register_hotcpu_notifier(&mc_cpu_notifier); + printk(KERN_INFO "IA-32 Microcode Update Driver: v" MICROCODE_VERSION " \n"); return 0; @@ -515,9 +756,16 @@ static int __init microcode_init (void) static void __exit microcode_exit (void) { - misc_deregister(µcode_dev); + microcode_dev_exit(); + + unregister_hotcpu_notifier(&mc_cpu_notifier); + + lock_cpu_hotplug(); + sysdev_driver_unregister(&cpu_sysdev_class, &mc_sysdev_driver); + unlock_cpu_hotplug(); + + platform_device_unregister(microcode_pdev); } module_init(microcode_init) module_exit(microcode_exit) -MODULE_ALIAS_MISCDEV(MICROCODE_MINOR); diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index a70b5fa..442aaf8 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -68,7 +69,7 @@ unsigned int def_to_bigsmp = 0; /* Processor that is doing the boot up */ unsigned int boot_cpu_physical_apicid = -1U; /* Internal processor count */ -static unsigned int __devinitdata num_processors; +unsigned int __cpuinitdata num_processors; /* Bitmask of physically existing CPUs */ physid_mask_t phys_cpu_present_map; @@ -228,12 +229,14 @@ static void __init MP_bus_info (struct m mpc_oem_bus_info(m, str, translation_table[mpc_record]); +#if MAX_MP_BUSSES < 256 if (m->mpc_busid >= MAX_MP_BUSSES) { printk(KERN_WARNING "MP table busid value (%d) for bustype %s " " is too large, max. supported is %d\n", m->mpc_busid, str, MAX_MP_BUSSES - 1); return; } +#endif if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA)-1) == 0) { mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; @@ -293,19 +296,6 @@ static void __init MP_lintsrc_info (stru m->mpc_irqtype, m->mpc_irqflag & 3, (m->mpc_irqflag >> 2) &3, m->mpc_srcbusid, m->mpc_srcbusirq, m->mpc_destapic, m->mpc_destapiclint); - /* - * Well it seems all SMP boards in existence - * use ExtINT/LVT1 == LINT0 and - * NMI/LVT2 == LINT1 - the following check - * will show us if this assumptions is false. - * Until then we do not have to add baggage. - */ - if ((m->mpc_irqtype == mp_ExtINT) && - (m->mpc_destapiclint != 0)) - BUG(); - if ((m->mpc_irqtype == mp_NMI) && - (m->mpc_destapiclint != 1)) - BUG(); } #ifdef CONFIG_X86_NUMAQ @@ -822,8 +812,7 @@ int es7000_plat; #ifdef CONFIG_ACPI -void __init mp_register_lapic_address ( - u64 address) +void __init mp_register_lapic_address(u64 address) { mp_lapic_addr = (unsigned long) address; @@ -835,13 +824,10 @@ void __init mp_register_lapic_address ( Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); } - -void __devinit mp_register_lapic ( - u8 id, - u8 enabled) +void __devinit mp_register_lapic (u8 id, u8 enabled) { struct mpc_config_processor processor; - int boot_cpu = 0; + int boot_cpu = 0; if (MAX_APICS - id <= 0) { printk(KERN_WARNING "Processor #%d invalid (max %d)\n", @@ -878,11 +864,9 @@ static struct mp_ioapic_routing { u32 pin_programmed[4]; } mp_ioapic_routing[MAX_IO_APICS]; - -static int mp_find_ioapic ( - int gsi) +static int mp_find_ioapic (int gsi) { - int i = 0; + int i = 0; /* Find the IOAPIC that manages this GSI. */ for (i = 0; i < nr_ioapics; i++) { @@ -895,15 +879,11 @@ static int mp_find_ioapic ( return -1; } - -void __init mp_register_ioapic ( - u8 id, - u32 address, - u32 gsi_base) +void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base) { - int idx = 0; - int tmpid; + int idx = 0; + int tmpid; if (nr_ioapics >= MAX_IO_APICS) { printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " @@ -949,16 +929,10 @@ void __init mp_register_ioapic ( mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, mp_ioapic_routing[idx].gsi_base, mp_ioapic_routing[idx].gsi_end); - - return; } - -void __init mp_override_legacy_irq ( - u8 bus_irq, - u8 polarity, - u8 trigger, - u32 gsi) +void __init +mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) { struct mpc_config_intsrc intsrc; int ioapic = -1; @@ -996,15 +970,13 @@ void __init mp_override_legacy_irq ( mp_irqs[mp_irq_entries] = intsrc; if (++mp_irq_entries == MAX_IRQ_SOURCES) panic("Max # of irq sources exceeded!\n"); - - return; } void __init mp_config_acpi_legacy_irqs (void) { struct mpc_config_intsrc intsrc; - int i = 0; - int ioapic = -1; + int i = 0; + int ioapic = -1; /* * Fabricate the legacy ISA bus (bus #31). @@ -1073,12 +1045,12 @@ void __init mp_config_acpi_legacy_irqs ( #define MAX_GSI_NUM 4096 -int mp_register_gsi (u32 gsi, int triggering, int polarity) +int mp_register_gsi(u32 gsi, int triggering, int polarity) { - int ioapic = -1; - int ioapic_pin = 0; - int idx, bit = 0; - static int pci_irq = 16; + int ioapic = -1; + int ioapic_pin = 0; + int idx, bit = 0; + static int pci_irq = 16; /* * Mapping between Global System Interrups, which * represent all possible interrupts, and IRQs diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index acb3514..3e8e3ad 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c @@ -13,7 +13,6 @@ * Mikael Pettersson : PM converted to driver model. Disable/enable API. */ -#include #include #include #include @@ -21,83 +20,177 @@ #include #include #include #include +#include +#include #include #include +#include #include #include "mach_traps.h" -unsigned int nmi_watchdog = NMI_NONE; -extern int unknown_nmi_panic; -static unsigned int nmi_hz = HZ; -static unsigned int nmi_perfctr_msr; /* the MSR to reset in NMI handler */ -static unsigned int nmi_p4_cccr_val; -extern void show_registers(struct pt_regs *regs); +int unknown_nmi_panic; +int nmi_watchdog_enabled; -/* - * lapic_nmi_owner tracks the ownership of the lapic NMI hardware: - * - it may be reserved by some other driver, or not - * - when not reserved by some other driver, it may be used for - * the NMI watchdog, or not - * - * This is maintained separately from nmi_active because the NMI - * watchdog may also be driven from the I/O APIC timer. +/* perfctr_nmi_owner tracks the ownership of the perfctr registers: + * evtsel_nmi_owner tracks the ownership of the event selection + * - different performance counters/ event selection may be reserved for + * different subsystems this reservation system just tries to coordinate + * things a little */ -static DEFINE_SPINLOCK(lapic_nmi_owner_lock); -static unsigned int lapic_nmi_owner; -#define LAPIC_NMI_WATCHDOG (1<<0) -#define LAPIC_NMI_RESERVED (1<<1) +static DEFINE_PER_CPU(unsigned long, perfctr_nmi_owner); +static DEFINE_PER_CPU(unsigned long, evntsel_nmi_owner[3]); + +/* this number is calculated from Intel's MSR_P4_CRU_ESCR5 register and it's + * offset from MSR_P4_BSU_ESCR0. It will be the max for all platforms (for now) + */ +#define NMI_MAX_COUNTER_BITS 66 /* nmi_active: - * +1: the lapic NMI watchdog is active, but can be disabled - * 0: the lapic NMI watchdog has not been set up, and cannot + * >0: the lapic NMI watchdog is active, but can be disabled + * <0: the lapic NMI watchdog has not been set up, and cannot * be enabled - * -1: the lapic NMI watchdog is disabled, but can be enabled + * 0: the lapic NMI watchdog is disabled, but can be enabled */ -int nmi_active; +atomic_t nmi_active = ATOMIC_INIT(0); /* oprofile uses this */ -#define K7_EVNTSEL_ENABLE (1 << 22) -#define K7_EVNTSEL_INT (1 << 20) -#define K7_EVNTSEL_OS (1 << 17) -#define K7_EVNTSEL_USR (1 << 16) -#define K7_EVENT_CYCLES_PROCESSOR_IS_RUNNING 0x76 -#define K7_NMI_EVENT K7_EVENT_CYCLES_PROCESSOR_IS_RUNNING +unsigned int nmi_watchdog = NMI_DEFAULT; +static unsigned int nmi_hz = HZ; -#define P6_EVNTSEL0_ENABLE (1 << 22) -#define P6_EVNTSEL_INT (1 << 20) -#define P6_EVNTSEL_OS (1 << 17) -#define P6_EVNTSEL_USR (1 << 16) -#define P6_EVENT_CPU_CLOCKS_NOT_HALTED 0x79 -#define P6_NMI_EVENT P6_EVENT_CPU_CLOCKS_NOT_HALTED +struct nmi_watchdog_ctlblk { + int enabled; + u64 check_bit; + unsigned int cccr_msr; + unsigned int perfctr_msr; /* the MSR to reset in NMI handler */ + unsigned int evntsel_msr; /* the MSR to select the events to handle */ +}; +static DEFINE_PER_CPU(struct nmi_watchdog_ctlblk, nmi_watchdog_ctlblk); -#define MSR_P4_MISC_ENABLE 0x1A0 -#define MSR_P4_MISC_ENABLE_PERF_AVAIL (1<<7) -#define MSR_P4_MISC_ENABLE_PEBS_UNAVAIL (1<<12) -#define MSR_P4_PERFCTR0 0x300 -#define MSR_P4_CCCR0 0x360 -#define P4_ESCR_EVENT_SELECT(N) ((N)<<25) -#define P4_ESCR_OS (1<<3) -#define P4_ESCR_USR (1<<2) -#define P4_CCCR_OVF_PMI0 (1<<26) -#define P4_CCCR_OVF_PMI1 (1<<27) -#define P4_CCCR_THRESHOLD(N) ((N)<<20) -#define P4_CCCR_COMPLEMENT (1<<19) -#define P4_CCCR_COMPARE (1<<18) -#define P4_CCCR_REQUIRED (3<<16) -#define P4_CCCR_ESCR_SELECT(N) ((N)<<13) -#define P4_CCCR_ENABLE (1<<12) -/* Set up IQ_COUNTER0 to behave like a clock, by having IQ_CCCR0 filter - CRU_ESCR0 (with any non-null event selector) through a complemented - max threshold. [IA32-Vol3, Section 14.9.9] */ -#define MSR_P4_IQ_COUNTER0 0x30C -#define P4_NMI_CRU_ESCR0 (P4_ESCR_EVENT_SELECT(0x3F)|P4_ESCR_OS|P4_ESCR_USR) -#define P4_NMI_IQ_CCCR0 \ - (P4_CCCR_OVF_PMI0|P4_CCCR_THRESHOLD(15)|P4_CCCR_COMPLEMENT| \ - P4_CCCR_COMPARE|P4_CCCR_REQUIRED|P4_CCCR_ESCR_SELECT(4)|P4_CCCR_ENABLE) +/* local prototypes */ +static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu); -#define ARCH_PERFMON_NMI_EVENT_SEL ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL -#define ARCH_PERFMON_NMI_EVENT_UMASK ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK +extern void show_registers(struct pt_regs *regs); +extern int unknown_nmi_panic; + +/* converts an msr to an appropriate reservation bit */ +static inline unsigned int nmi_perfctr_msr_to_bit(unsigned int msr) +{ + /* returns the bit offset of the performance counter register */ + switch (boot_cpu_data.x86_vendor) { + case X86_VENDOR_AMD: + return (msr - MSR_K7_PERFCTR0); + case X86_VENDOR_INTEL: + if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) + return (msr - MSR_ARCH_PERFMON_PERFCTR0); + + switch (boot_cpu_data.x86) { + case 6: + return (msr - MSR_P6_PERFCTR0); + case 15: + return (msr - MSR_P4_BPU_PERFCTR0); + } + } + return 0; +} + +/* converts an msr to an appropriate reservation bit */ +static inline unsigned int nmi_evntsel_msr_to_bit(unsigned int msr) +{ + /* returns the bit offset of the event selection register */ + switch (boot_cpu_data.x86_vendor) { + case X86_VENDOR_AMD: + return (msr - MSR_K7_EVNTSEL0); + case X86_VENDOR_INTEL: + if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) + return (msr - MSR_ARCH_PERFMON_EVENTSEL0); + + switch (boot_cpu_data.x86) { + case 6: + return (msr - MSR_P6_EVNTSEL0); + case 15: + return (msr - MSR_P4_BSU_ESCR0); + } + } + return 0; +} + +/* checks for a bit availability (hack for oprofile) */ +int avail_to_resrv_perfctr_nmi_bit(unsigned int counter) +{ + BUG_ON(counter > NMI_MAX_COUNTER_BITS); + + return (!test_bit(counter, &__get_cpu_var(perfctr_nmi_owner))); +} + +/* checks the an msr for availability */ +int avail_to_resrv_perfctr_nmi(unsigned int msr) +{ + unsigned int counter; + + counter = nmi_perfctr_msr_to_bit(msr); + BUG_ON(counter > NMI_MAX_COUNTER_BITS); + + return (!test_bit(counter, &__get_cpu_var(perfctr_nmi_owner))); +} + +int reserve_perfctr_nmi(unsigned int msr) +{ + unsigned int counter; + + counter = nmi_perfctr_msr_to_bit(msr); + BUG_ON(counter > NMI_MAX_COUNTER_BITS); + + if (!test_and_set_bit(counter, &__get_cpu_var(perfctr_nmi_owner))) + return 1; + return 0; +} + +void release_perfctr_nmi(unsigned int msr) +{ + unsigned int counter; + + counter = nmi_perfctr_msr_to_bit(msr); + BUG_ON(counter > NMI_MAX_COUNTER_BITS); + + clear_bit(counter, &__get_cpu_var(perfctr_nmi_owner)); +} + +int reserve_evntsel_nmi(unsigned int msr) +{ + unsigned int counter; + + counter = nmi_evntsel_msr_to_bit(msr); + BUG_ON(counter > NMI_MAX_COUNTER_BITS); + + if (!test_and_set_bit(counter, &__get_cpu_var(evntsel_nmi_owner)[0])) + return 1; + return 0; +} + +void release_evntsel_nmi(unsigned int msr) +{ + unsigned int counter; + + counter = nmi_evntsel_msr_to_bit(msr); + BUG_ON(counter > NMI_MAX_COUNTER_BITS); + + clear_bit(counter, &__get_cpu_var(evntsel_nmi_owner)[0]); +} + +static __cpuinit inline int nmi_known_cpu(void) +{ + switch (boot_cpu_data.x86_vendor) { + case X86_VENDOR_AMD: + return ((boot_cpu_data.x86 == 15) || (boot_cpu_data.x86 == 6)); + case X86_VENDOR_INTEL: + if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) + return 1; + else + return ((boot_cpu_data.x86 == 15) || (boot_cpu_data.x86 == 6)); + } + return 0; +} #ifdef CONFIG_SMP /* The performance counters used by NMI_LOCAL_APIC don't trigger when @@ -125,7 +218,18 @@ static int __init check_nmi_watchdog(voi unsigned int *prev_nmi_count; int cpu; - if (nmi_watchdog == NMI_NONE) + /* Enable NMI watchdog for newer systems. + Actually it should be safe for most systems before 2004 too except + for some IBM systems that corrupt registers when NMI happens + during SMM. Unfortunately we don't have more exact information + on these and use this coarse check. */ + if (nmi_watchdog == NMI_DEFAULT && dmi_get_year(DMI_BIOS_DATE) >= 2004) + nmi_watchdog = NMI_LOCAL_APIC; + + if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT)) + return 0; + + if (!atomic_read(&nmi_active)) return 0; prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); @@ -149,25 +253,45 @@ #ifdef CONFIG_SMP if (!cpu_isset(cpu, cpu_callin_map)) continue; #endif + if (!per_cpu(nmi_watchdog_ctlblk, cpu).enabled) + continue; if (nmi_count(cpu) - prev_nmi_count[cpu] <= 5) { - endflag = 1; printk("CPU#%d: NMI appears to be stuck (%d->%d)!\n", cpu, prev_nmi_count[cpu], nmi_count(cpu)); - nmi_active = 0; - lapic_nmi_owner &= ~LAPIC_NMI_WATCHDOG; - kfree(prev_nmi_count); - return -1; + per_cpu(nmi_watchdog_ctlblk, cpu).enabled = 0; + atomic_dec(&nmi_active); } } + if (!atomic_read(&nmi_active)) { + kfree(prev_nmi_count); + atomic_set(&nmi_active, -1); + return -1; + } endflag = 1; printk("OK.\n"); /* now that we know it works we can reduce NMI frequency to something more reasonable; makes a difference in some configs */ - if (nmi_watchdog == NMI_LOCAL_APIC) + if (nmi_watchdog == NMI_LOCAL_APIC) { + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); + nmi_hz = 1; + /* + * On Intel CPUs with ARCH_PERFMON only 32 bits in the counter + * are writable, with higher bits sign extending from bit 31. + * So, we can only program the counter with 31 bit values and + * 32nd bit should be 1, for 33.. to be 1. + * Find the appropriate nmi_hz + */ + if (wd->perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0 && + ((u64)cpu_khz * 1000) > 0x7fffffffULL) { + u64 count = (u64)cpu_khz * 1000; + do_div(count, 0x7fffffffUL); + nmi_hz = count + 1; + } + } kfree(prev_nmi_count); return 0; @@ -181,124 +305,70 @@ static int __init setup_nmi_watchdog(cha get_option(&str, &nmi); - if (nmi >= NMI_INVALID) + if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE)) return 0; - if (nmi == NMI_NONE) - nmi_watchdog = nmi; /* * If any other x86 CPU has a local APIC, then * please test the NMI stuff there and send me the * missing bits. Right now Intel P6/P4 and AMD K7 only. */ - if ((nmi == NMI_LOCAL_APIC) && - (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && - (boot_cpu_data.x86 == 6 || boot_cpu_data.x86 == 15)) - nmi_watchdog = nmi; - if ((nmi == NMI_LOCAL_APIC) && - (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && - (boot_cpu_data.x86 == 6 || boot_cpu_data.x86 == 15)) - nmi_watchdog = nmi; - /* - * We can enable the IO-APIC watchdog - * unconditionally. - */ - if (nmi == NMI_IO_APIC) { - nmi_active = 1; - nmi_watchdog = nmi; - } + if ((nmi == NMI_LOCAL_APIC) && (nmi_known_cpu() == 0)) + return 0; /* no lapic support */ + nmi_watchdog = nmi; return 1; } __setup("nmi_watchdog=", setup_nmi_watchdog); -static void disable_intel_arch_watchdog(void); - static void disable_lapic_nmi_watchdog(void) { - if (nmi_active <= 0) + BUG_ON(nmi_watchdog != NMI_LOCAL_APIC); + + if (atomic_read(&nmi_active) <= 0) return; - switch (boot_cpu_data.x86_vendor) { - case X86_VENDOR_AMD: - wrmsr(MSR_K7_EVNTSEL0, 0, 0); - break; - case X86_VENDOR_INTEL: - if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) { - disable_intel_arch_watchdog(); - break; - } - switch (boot_cpu_data.x86) { - case 6: - if (boot_cpu_data.x86_model > 0xd) - break; - wrmsr(MSR_P6_EVNTSEL0, 0, 0); - break; - case 15: - if (boot_cpu_data.x86_model > 0x4) - break; + on_each_cpu(stop_apic_nmi_watchdog, NULL, 0, 1); - wrmsr(MSR_P4_IQ_CCCR0, 0, 0); - wrmsr(MSR_P4_CRU_ESCR0, 0, 0); - break; - } - break; - } - nmi_active = -1; - /* tell do_nmi() and others that we're not active any more */ - nmi_watchdog = 0; + BUG_ON(atomic_read(&nmi_active) != 0); } static void enable_lapic_nmi_watchdog(void) { - if (nmi_active < 0) { - nmi_watchdog = NMI_LOCAL_APIC; - setup_apic_nmi_watchdog(); - } -} + BUG_ON(nmi_watchdog != NMI_LOCAL_APIC); -int reserve_lapic_nmi(void) -{ - unsigned int old_owner; - - spin_lock(&lapic_nmi_owner_lock); - old_owner = lapic_nmi_owner; - lapic_nmi_owner |= LAPIC_NMI_RESERVED; - spin_unlock(&lapic_nmi_owner_lock); - if (old_owner & LAPIC_NMI_RESERVED) - return -EBUSY; - if (old_owner & LAPIC_NMI_WATCHDOG) - disable_lapic_nmi_watchdog(); - return 0; -} + /* are we already enabled */ + if (atomic_read(&nmi_active) != 0) + return; -void release_lapic_nmi(void) -{ - unsigned int new_owner; + /* are we lapic aware */ + if (nmi_known_cpu() <= 0) + return; - spin_lock(&lapic_nmi_owner_lock); - new_owner = lapic_nmi_owner & ~LAPIC_NMI_RESERVED; - lapic_nmi_owner = new_owner; - spin_unlock(&lapic_nmi_owner_lock); - if (new_owner & LAPIC_NMI_WATCHDOG) - enable_lapic_nmi_watchdog(); + on_each_cpu(setup_apic_nmi_watchdog, NULL, 0, 1); + touch_nmi_watchdog(); } void disable_timer_nmi_watchdog(void) { - if ((nmi_watchdog != NMI_IO_APIC) || (nmi_active <= 0)) + BUG_ON(nmi_watchdog != NMI_IO_APIC); + + if (atomic_read(&nmi_active) <= 0) return; - unset_nmi_callback(); - nmi_active = -1; - nmi_watchdog = NMI_NONE; + disable_irq(0); + on_each_cpu(stop_apic_nmi_watchdog, NULL, 0, 1); + + BUG_ON(atomic_read(&nmi_active) != 0); } void enable_timer_nmi_watchdog(void) { - if (nmi_active < 0) { - nmi_watchdog = NMI_IO_APIC; + BUG_ON(nmi_watchdog != NMI_IO_APIC); + + if (atomic_read(&nmi_active) == 0) { touch_nmi_watchdog(); - nmi_active = 1; + on_each_cpu(setup_apic_nmi_watchdog, NULL, 0, 1); + enable_irq(0); } } @@ -308,15 +378,20 @@ static int nmi_pm_active; /* nmi_active static int lapic_nmi_suspend(struct sys_device *dev, pm_message_t state) { - nmi_pm_active = nmi_active; - disable_lapic_nmi_watchdog(); + /* only CPU0 goes here, other CPUs should be offline */ + nmi_pm_active = atomic_read(&nmi_active); + stop_apic_nmi_watchdog(NULL); + BUG_ON(atomic_read(&nmi_active) != 0); return 0; } static int lapic_nmi_resume(struct sys_device *dev) { - if (nmi_pm_active > 0) - enable_lapic_nmi_watchdog(); + /* only CPU0 goes here, other CPUs should be offline */ + if (nmi_pm_active > 0) { + setup_apic_nmi_watchdog(NULL); + touch_nmi_watchdog(); + } return 0; } @@ -336,7 +411,13 @@ static int __init init_lapic_nmi_sysfs(v { int error; - if (nmi_active == 0 || nmi_watchdog != NMI_LOCAL_APIC) + /* should really be a BUG_ON but b/c this is an + * init call, it just doesn't work. -dcz + */ + if (nmi_watchdog != NMI_LOCAL_APIC) + return 0; + + if ( atomic_read(&nmi_active) < 0 ) return 0; error = sysdev_class_register(&nmi_sysclass); @@ -354,138 +435,269 @@ #endif /* CONFIG_PM */ * Original code written by Keith Owens. */ -static void clear_msr_range(unsigned int base, unsigned int n) -{ - unsigned int i; - - for(i = 0; i < n; ++i) - wrmsr(base+i, 0, 0); -} - -static void write_watchdog_counter(const char *descr) +static void write_watchdog_counter(unsigned int perfctr_msr, const char *descr) { u64 count = (u64)cpu_khz * 1000; do_div(count, nmi_hz); if(descr) Dprintk("setting %s to -0x%08Lx\n", descr, count); - wrmsrl(nmi_perfctr_msr, 0 - count); + wrmsrl(perfctr_msr, 0 - count); } -static void setup_k7_watchdog(void) +/* Note that these events don't tick when the CPU idles. This means + the frequency varies with CPU load. */ + +#define K7_EVNTSEL_ENABLE (1 << 22) +#define K7_EVNTSEL_INT (1 << 20) +#define K7_EVNTSEL_OS (1 << 17) +#define K7_EVNTSEL_USR (1 << 16) +#define K7_EVENT_CYCLES_PROCESSOR_IS_RUNNING 0x76 +#define K7_NMI_EVENT K7_EVENT_CYCLES_PROCESSOR_IS_RUNNING + +static int setup_k7_watchdog(void) { + unsigned int perfctr_msr, evntsel_msr; unsigned int evntsel; + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); + + perfctr_msr = MSR_K7_PERFCTR0; + evntsel_msr = MSR_K7_EVNTSEL0; + if (!reserve_perfctr_nmi(perfctr_msr)) + goto fail; - nmi_perfctr_msr = MSR_K7_PERFCTR0; + if (!reserve_evntsel_nmi(evntsel_msr)) + goto fail1; - clear_msr_range(MSR_K7_EVNTSEL0, 4); - clear_msr_range(MSR_K7_PERFCTR0, 4); + wrmsrl(perfctr_msr, 0UL); evntsel = K7_EVNTSEL_INT | K7_EVNTSEL_OS | K7_EVNTSEL_USR | K7_NMI_EVENT; - wrmsr(MSR_K7_EVNTSEL0, evntsel, 0); - write_watchdog_counter("K7_PERFCTR0"); + /* setup the timer */ + wrmsr(evntsel_msr, evntsel, 0); + write_watchdog_counter(perfctr_msr, "K7_PERFCTR0"); apic_write(APIC_LVTPC, APIC_DM_NMI); evntsel |= K7_EVNTSEL_ENABLE; - wrmsr(MSR_K7_EVNTSEL0, evntsel, 0); + wrmsr(evntsel_msr, evntsel, 0); + + wd->perfctr_msr = perfctr_msr; + wd->evntsel_msr = evntsel_msr; + wd->cccr_msr = 0; //unused + wd->check_bit = 1ULL<<63; + return 1; +fail1: + release_perfctr_nmi(perfctr_msr); +fail: + return 0; +} + +static void stop_k7_watchdog(void) +{ + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); + + wrmsr(wd->evntsel_msr, 0, 0); + + release_evntsel_nmi(wd->evntsel_msr); + release_perfctr_nmi(wd->perfctr_msr); } -static void setup_p6_watchdog(void) +#define P6_EVNTSEL0_ENABLE (1 << 22) +#define P6_EVNTSEL_INT (1 << 20) +#define P6_EVNTSEL_OS (1 << 17) +#define P6_EVNTSEL_USR (1 << 16) +#define P6_EVENT_CPU_CLOCKS_NOT_HALTED 0x79 +#define P6_NMI_EVENT P6_EVENT_CPU_CLOCKS_NOT_HALTED + +static int setup_p6_watchdog(void) { + unsigned int perfctr_msr, evntsel_msr; unsigned int evntsel; + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); + + perfctr_msr = MSR_P6_PERFCTR0; + evntsel_msr = MSR_P6_EVNTSEL0; + if (!reserve_perfctr_nmi(perfctr_msr)) + goto fail; - nmi_perfctr_msr = MSR_P6_PERFCTR0; + if (!reserve_evntsel_nmi(evntsel_msr)) + goto fail1; - clear_msr_range(MSR_P6_EVNTSEL0, 2); - clear_msr_range(MSR_P6_PERFCTR0, 2); + wrmsrl(perfctr_msr, 0UL); evntsel = P6_EVNTSEL_INT | P6_EVNTSEL_OS | P6_EVNTSEL_USR | P6_NMI_EVENT; - wrmsr(MSR_P6_EVNTSEL0, evntsel, 0); - write_watchdog_counter("P6_PERFCTR0"); + /* setup the timer */ + wrmsr(evntsel_msr, evntsel, 0); + write_watchdog_counter(perfctr_msr, "P6_PERFCTR0"); apic_write(APIC_LVTPC, APIC_DM_NMI); evntsel |= P6_EVNTSEL0_ENABLE; - wrmsr(MSR_P6_EVNTSEL0, evntsel, 0); + wrmsr(evntsel_msr, evntsel, 0); + + wd->perfctr_msr = perfctr_msr; + wd->evntsel_msr = evntsel_msr; + wd->cccr_msr = 0; //unused + wd->check_bit = 1ULL<<39; + return 1; +fail1: + release_perfctr_nmi(perfctr_msr); +fail: + return 0; +} + +static void stop_p6_watchdog(void) +{ + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); + + wrmsr(wd->evntsel_msr, 0, 0); + + release_evntsel_nmi(wd->evntsel_msr); + release_perfctr_nmi(wd->perfctr_msr); } +/* Note that these events don't tick when the CPU idles. This means + the frequency varies with CPU load. */ + +#define MSR_P4_MISC_ENABLE_PERF_AVAIL (1<<7) +#define P4_ESCR_EVENT_SELECT(N) ((N)<<25) +#define P4_ESCR_OS (1<<3) +#define P4_ESCR_USR (1<<2) +#define P4_CCCR_OVF_PMI0 (1<<26) +#define P4_CCCR_OVF_PMI1 (1<<27) +#define P4_CCCR_THRESHOLD(N) ((N)<<20) +#define P4_CCCR_COMPLEMENT (1<<19) +#define P4_CCCR_COMPARE (1<<18) +#define P4_CCCR_REQUIRED (3<<16) +#define P4_CCCR_ESCR_SELECT(N) ((N)<<13) +#define P4_CCCR_ENABLE (1<<12) +#define P4_CCCR_OVF (1<<31) +/* Set up IQ_COUNTER0 to behave like a clock, by having IQ_CCCR0 filter + CRU_ESCR0 (with any non-null event selector) through a complemented + max threshold. [IA32-Vol3, Section 14.9.9] */ + static int setup_p4_watchdog(void) { + unsigned int perfctr_msr, evntsel_msr, cccr_msr; + unsigned int evntsel, cccr_val; unsigned int misc_enable, dummy; + unsigned int ht_num; + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); - rdmsr(MSR_P4_MISC_ENABLE, misc_enable, dummy); + rdmsr(MSR_IA32_MISC_ENABLE, misc_enable, dummy); if (!(misc_enable & MSR_P4_MISC_ENABLE_PERF_AVAIL)) return 0; - nmi_perfctr_msr = MSR_P4_IQ_COUNTER0; - nmi_p4_cccr_val = P4_NMI_IQ_CCCR0; #ifdef CONFIG_SMP - if (smp_num_siblings == 2) - nmi_p4_cccr_val |= P4_CCCR_OVF_PMI1; + /* detect which hyperthread we are on */ + if (smp_num_siblings == 2) { + unsigned int ebx, apicid; + + ebx = cpuid_ebx(1); + apicid = (ebx >> 24) & 0xff; + ht_num = apicid & 1; + } else #endif + ht_num = 0; - if (!(misc_enable & MSR_P4_MISC_ENABLE_PEBS_UNAVAIL)) - clear_msr_range(0x3F1, 2); - /* MSR 0x3F0 seems to have a default value of 0xFC00, but current - docs doesn't fully define it, so leave it alone for now. */ - if (boot_cpu_data.x86_model >= 0x3) { - /* MSR_P4_IQ_ESCR0/1 (0x3ba/0x3bb) removed */ - clear_msr_range(0x3A0, 26); - clear_msr_range(0x3BC, 3); + /* performance counters are shared resources + * assign each hyperthread its own set + * (re-use the ESCR0 register, seems safe + * and keeps the cccr_val the same) + */ + if (!ht_num) { + /* logical cpu 0 */ + perfctr_msr = MSR_P4_IQ_PERFCTR0; + evntsel_msr = MSR_P4_CRU_ESCR0; + cccr_msr = MSR_P4_IQ_CCCR0; + cccr_val = P4_CCCR_OVF_PMI0 | P4_CCCR_ESCR_SELECT(4); } else { - clear_msr_range(0x3A0, 31); + /* logical cpu 1 */ + perfctr_msr = MSR_P4_IQ_PERFCTR1; + evntsel_msr = MSR_P4_CRU_ESCR0; + cccr_msr = MSR_P4_IQ_CCCR1; + cccr_val = P4_CCCR_OVF_PMI1 | P4_CCCR_ESCR_SELECT(4); } - clear_msr_range(0x3C0, 6); - clear_msr_range(0x3C8, 6); - clear_msr_range(0x3E0, 2); - clear_msr_range(MSR_P4_CCCR0, 18); - clear_msr_range(MSR_P4_PERFCTR0, 18); - - wrmsr(MSR_P4_CRU_ESCR0, P4_NMI_CRU_ESCR0, 0); - wrmsr(MSR_P4_IQ_CCCR0, P4_NMI_IQ_CCCR0 & ~P4_CCCR_ENABLE, 0); - write_watchdog_counter("P4_IQ_COUNTER0"); + + if (!reserve_perfctr_nmi(perfctr_msr)) + goto fail; + + if (!reserve_evntsel_nmi(evntsel_msr)) + goto fail1; + + evntsel = P4_ESCR_EVENT_SELECT(0x3F) + | P4_ESCR_OS + | P4_ESCR_USR; + + cccr_val |= P4_CCCR_THRESHOLD(15) + | P4_CCCR_COMPLEMENT + | P4_CCCR_COMPARE + | P4_CCCR_REQUIRED; + + wrmsr(evntsel_msr, evntsel, 0); + wrmsr(cccr_msr, cccr_val, 0); + write_watchdog_counter(perfctr_msr, "P4_IQ_COUNTER0"); apic_write(APIC_LVTPC, APIC_DM_NMI); - wrmsr(MSR_P4_IQ_CCCR0, nmi_p4_cccr_val, 0); + cccr_val |= P4_CCCR_ENABLE; + wrmsr(cccr_msr, cccr_val, 0); + wd->perfctr_msr = perfctr_msr; + wd->evntsel_msr = evntsel_msr; + wd->cccr_msr = cccr_msr; + wd->check_bit = 1ULL<<39; return 1; +fail1: + release_perfctr_nmi(perfctr_msr); +fail: + return 0; } -static void disable_intel_arch_watchdog(void) +static void stop_p4_watchdog(void) { - unsigned ebx; + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); - /* - * Check whether the Architectural PerfMon supports - * Unhalted Core Cycles Event or not. - * NOTE: Corresponding bit = 0 in ebp indicates event present. - */ - ebx = cpuid_ebx(10); - if (!(ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT)) - wrmsr(MSR_ARCH_PERFMON_EVENTSEL0, 0, 0); + wrmsr(wd->cccr_msr, 0, 0); + wrmsr(wd->evntsel_msr, 0, 0); + + release_evntsel_nmi(wd->evntsel_msr); + release_perfctr_nmi(wd->perfctr_msr); } +#define ARCH_PERFMON_NMI_EVENT_SEL ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL +#define ARCH_PERFMON_NMI_EVENT_UMASK ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK + static int setup_intel_arch_watchdog(void) { + unsigned int ebx; + union cpuid10_eax eax; + unsigned int unused; + unsigned int perfctr_msr, evntsel_msr; unsigned int evntsel; - unsigned ebx; + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); /* * Check whether the Architectural PerfMon supports * Unhalted Core Cycles Event or not. - * NOTE: Corresponding bit = 0 in ebp indicates event present. + * NOTE: Corresponding bit = 0 in ebx indicates event present. */ - ebx = cpuid_ebx(10); - if ((ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT)) - return 0; + cpuid(10, &(eax.full), &ebx, &unused, &unused); + if ((eax.split.mask_length < (ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX+1)) || + (ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT)) + goto fail; + + perfctr_msr = MSR_ARCH_PERFMON_PERFCTR0; + evntsel_msr = MSR_ARCH_PERFMON_EVENTSEL0; - nmi_perfctr_msr = MSR_ARCH_PERFMON_PERFCTR0; + if (!reserve_perfctr_nmi(perfctr_msr)) + goto fail; - clear_msr_range(MSR_ARCH_PERFMON_EVENTSEL0, 2); - clear_msr_range(MSR_ARCH_PERFMON_PERFCTR0, 2); + if (!reserve_evntsel_nmi(evntsel_msr)) + goto fail1; + + wrmsrl(perfctr_msr, 0UL); evntsel = ARCH_PERFMON_EVENTSEL_INT | ARCH_PERFMON_EVENTSEL_OS @@ -493,51 +705,145 @@ static int setup_intel_arch_watchdog(voi | ARCH_PERFMON_NMI_EVENT_SEL | ARCH_PERFMON_NMI_EVENT_UMASK; - wrmsr(MSR_ARCH_PERFMON_EVENTSEL0, evntsel, 0); - write_watchdog_counter("INTEL_ARCH_PERFCTR0"); + /* setup the timer */ + wrmsr(evntsel_msr, evntsel, 0); + write_watchdog_counter(perfctr_msr, "INTEL_ARCH_PERFCTR0"); apic_write(APIC_LVTPC, APIC_DM_NMI); evntsel |= ARCH_PERFMON_EVENTSEL0_ENABLE; - wrmsr(MSR_ARCH_PERFMON_EVENTSEL0, evntsel, 0); + wrmsr(evntsel_msr, evntsel, 0); + + wd->perfctr_msr = perfctr_msr; + wd->evntsel_msr = evntsel_msr; + wd->cccr_msr = 0; //unused + wd->check_bit = 1ULL << (eax.split.bit_width - 1); return 1; +fail1: + release_perfctr_nmi(perfctr_msr); +fail: + return 0; } -void setup_apic_nmi_watchdog (void) +static void stop_intel_arch_watchdog(void) { - switch (boot_cpu_data.x86_vendor) { - case X86_VENDOR_AMD: - if (boot_cpu_data.x86 != 6 && boot_cpu_data.x86 != 15) - return; - setup_k7_watchdog(); - break; - case X86_VENDOR_INTEL: - if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) { - if (!setup_intel_arch_watchdog()) + unsigned int ebx; + union cpuid10_eax eax; + unsigned int unused; + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); + + /* + * Check whether the Architectural PerfMon supports + * Unhalted Core Cycles Event or not. + * NOTE: Corresponding bit = 0 in ebx indicates event present. + */ + cpuid(10, &(eax.full), &ebx, &unused, &unused); + if ((eax.split.mask_length < (ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX+1)) || + (ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT)) + return; + + wrmsr(wd->evntsel_msr, 0, 0); + release_evntsel_nmi(wd->evntsel_msr); + release_perfctr_nmi(wd->perfctr_msr); +} + +void setup_apic_nmi_watchdog (void *unused) +{ + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); + + /* only support LOCAL and IO APICs for now */ + if ((nmi_watchdog != NMI_LOCAL_APIC) && + (nmi_watchdog != NMI_IO_APIC)) + return; + + if (wd->enabled == 1) + return; + + /* cheap hack to support suspend/resume */ + /* if cpu0 is not active neither should the other cpus */ + if ((smp_processor_id() != 0) && (atomic_read(&nmi_active) <= 0)) + return; + + if (nmi_watchdog == NMI_LOCAL_APIC) { + switch (boot_cpu_data.x86_vendor) { + case X86_VENDOR_AMD: + if (boot_cpu_data.x86 != 6 && boot_cpu_data.x86 != 15) return; - break; - } - switch (boot_cpu_data.x86) { - case 6: - if (boot_cpu_data.x86_model > 0xd) + if (!setup_k7_watchdog()) return; - - setup_p6_watchdog(); break; - case 15: - if (boot_cpu_data.x86_model > 0x4) - return; + case X86_VENDOR_INTEL: + if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) { + if (!setup_intel_arch_watchdog()) + return; + break; + } + switch (boot_cpu_data.x86) { + case 6: + if (boot_cpu_data.x86_model > 0xd) + return; + + if (!setup_p6_watchdog()) + return; + break; + case 15: + if (boot_cpu_data.x86_model > 0x4) + return; - if (!setup_p4_watchdog()) + if (!setup_p4_watchdog()) + return; + break; + default: return; + } break; default: return; } - break; - default: + } + wd->enabled = 1; + atomic_inc(&nmi_active); +} + +void stop_apic_nmi_watchdog(void *unused) +{ + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); + + /* only support LOCAL and IO APICs for now */ + if ((nmi_watchdog != NMI_LOCAL_APIC) && + (nmi_watchdog != NMI_IO_APIC)) + return; + + if (wd->enabled == 0) return; + + if (nmi_watchdog == NMI_LOCAL_APIC) { + switch (boot_cpu_data.x86_vendor) { + case X86_VENDOR_AMD: + stop_k7_watchdog(); + break; + case X86_VENDOR_INTEL: + if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) { + stop_intel_arch_watchdog(); + break; + } + switch (boot_cpu_data.x86) { + case 6: + if (boot_cpu_data.x86_model > 0xd) + break; + stop_p6_watchdog(); + break; + case 15: + if (boot_cpu_data.x86_model > 0x4) + break; + stop_p4_watchdog(); + break; + } + break; + default: + return; + } } - lapic_nmi_owner = LAPIC_NMI_WATCHDOG; - nmi_active = 1; + wd->enabled = 0; + atomic_dec(&nmi_active); } /* @@ -579,7 +885,7 @@ EXPORT_SYMBOL(touch_nmi_watchdog); extern void die_nmi(struct pt_regs *, const char *msg); -void nmi_watchdog_tick (struct pt_regs * regs) +__kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) { /* @@ -588,11 +894,23 @@ void nmi_watchdog_tick (struct pt_regs * * smp_processor_id(). */ unsigned int sum; + int touched = 0; int cpu = smp_processor_id(); + struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); + u64 dummy; + int rc=0; + + /* check for other users first */ + if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) + == NOTIFY_STOP) { + rc = 1; + touched = 1; + } sum = per_cpu(irq_stat, cpu).apic_timer_irqs; - if (last_irq_sums[cpu] == sum) { + /* if the apic timer isn't firing, this cpu isn't doing much */ + if (!touched && last_irq_sums[cpu] == sum) { /* * Ayiee, looks like this CPU is stuck ... * wait a few IRQs (5 seconds) before doing the oops ... @@ -607,27 +925,59 @@ void nmi_watchdog_tick (struct pt_regs * last_irq_sums[cpu] = sum; alert_counter[cpu] = 0; } - if (nmi_perfctr_msr) { - if (nmi_perfctr_msr == MSR_P4_IQ_COUNTER0) { - /* - * P4 quirks: - * - An overflown perfctr will assert its interrupt - * until the OVF flag in its CCCR is cleared. - * - LVTPC is masked on interrupt and must be - * unmasked by the LVTPC handler. + /* see if the nmi watchdog went off */ + if (wd->enabled) { + if (nmi_watchdog == NMI_LOCAL_APIC) { + rdmsrl(wd->perfctr_msr, dummy); + if (dummy & wd->check_bit){ + /* this wasn't a watchdog timer interrupt */ + goto done; + } + + /* only Intel P4 uses the cccr msr */ + if (wd->cccr_msr != 0) { + /* + * P4 quirks: + * - An overflown perfctr will assert its interrupt + * until the OVF flag in its CCCR is cleared. + * - LVTPC is masked on interrupt and must be + * unmasked by the LVTPC handler. + */ + rdmsrl(wd->cccr_msr, dummy); + dummy &= ~P4_CCCR_OVF; + wrmsrl(wd->cccr_msr, dummy); + apic_write(APIC_LVTPC, APIC_DM_NMI); + } + else if (wd->perfctr_msr == MSR_P6_PERFCTR0 || + wd->perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0) { + /* P6 based Pentium M need to re-unmask + * the apic vector but it doesn't hurt + * other P6 variant. + * ArchPerfom/Core Duo also needs this */ + apic_write(APIC_LVTPC, APIC_DM_NMI); + } + /* start the cycle over again */ + write_watchdog_counter(wd->perfctr_msr, NULL); + rc = 1; + } else if (nmi_watchdog == NMI_IO_APIC) { + /* don't know how to accurately check for this. + * just assume it was a watchdog timer interrupt + * This matches the old behaviour. */ - wrmsr(MSR_P4_IQ_CCCR0, nmi_p4_cccr_val, 0); - apic_write(APIC_LVTPC, APIC_DM_NMI); + rc = 1; } - else if (nmi_perfctr_msr == MSR_P6_PERFCTR0 || - nmi_perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0) { - /* Only P6 based Pentium M need to re-unmask - * the apic vector but it doesn't hurt - * other P6 variant */ - apic_write(APIC_LVTPC, APIC_DM_NMI); - } - write_watchdog_counter(NULL); } +done: + return rc; +} + +int do_nmi_callback(struct pt_regs * regs, int cpu) +{ +#ifdef CONFIG_SYSCTL + if (unknown_nmi_panic) + return unknown_nmi_panic_callback(regs, cpu); +#endif + return 0; } #ifdef CONFIG_SYSCTL @@ -637,36 +987,46 @@ static int unknown_nmi_panic_callback(st unsigned char reason = get_nmi_reason(); char buf[64]; - if (!(reason & 0xc0)) { - sprintf(buf, "NMI received for unknown reason %02x\n", reason); - die_nmi(regs, buf); - } + sprintf(buf, "NMI received for unknown reason %02x\n", reason); + die_nmi(regs, buf); return 0; } /* - * proc handler for /proc/sys/kernel/unknown_nmi_panic + * proc handler for /proc/sys/kernel/nmi */ -int proc_unknown_nmi_panic(ctl_table *table, int write, struct file *file, +int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, void __user *buffer, size_t *length, loff_t *ppos) { int old_state; - old_state = unknown_nmi_panic; + nmi_watchdog_enabled = (atomic_read(&nmi_active) > 0) ? 1 : 0; + old_state = nmi_watchdog_enabled; proc_dointvec(table, write, file, buffer, length, ppos); - if (!!old_state == !!unknown_nmi_panic) + if (!!old_state == !!nmi_watchdog_enabled) return 0; - if (unknown_nmi_panic) { - if (reserve_lapic_nmi() < 0) { - unknown_nmi_panic = 0; - return -EBUSY; - } else { - set_nmi_callback(unknown_nmi_panic_callback); - } + if (atomic_read(&nmi_active) < 0) { + printk( KERN_WARNING "NMI watchdog is permanently disabled\n"); + return -EIO; + } + + if (nmi_watchdog == NMI_DEFAULT) { + if (nmi_known_cpu() > 0) + nmi_watchdog = NMI_LOCAL_APIC; + else + nmi_watchdog = NMI_IO_APIC; + } + + if (nmi_watchdog == NMI_LOCAL_APIC) { + if (nmi_watchdog_enabled) + enable_lapic_nmi_watchdog(); + else + disable_lapic_nmi_watchdog(); } else { - release_lapic_nmi(); - unset_nmi_callback(); + printk( KERN_WARNING + "NMI watchdog doesn't know what hardware to touch\n"); + return -EIO; } return 0; } @@ -675,7 +1035,11 @@ #endif EXPORT_SYMBOL(nmi_active); EXPORT_SYMBOL(nmi_watchdog); -EXPORT_SYMBOL(reserve_lapic_nmi); -EXPORT_SYMBOL(release_lapic_nmi); +EXPORT_SYMBOL(avail_to_resrv_perfctr_nmi); +EXPORT_SYMBOL(avail_to_resrv_perfctr_nmi_bit); +EXPORT_SYMBOL(reserve_perfctr_nmi); +EXPORT_SYMBOL(release_perfctr_nmi); +EXPORT_SYMBOL(reserve_evntsel_nmi); +EXPORT_SYMBOL(release_evntsel_nmi); EXPORT_SYMBOL(disable_timer_nmi_watchdog); EXPORT_SYMBOL(enable_timer_nmi_watchdog); diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 8657c73..dad02a9 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -37,6 +37,7 @@ #include #include #include #include +#include #include #include @@ -296,9 +297,9 @@ void show_regs(struct pt_regs * regs) if (user_mode_vm(regs)) printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); printk(" EFLAGS: %08lx %s (%s %.*s)\n", - regs->eflags, print_tainted(), system_utsname.release, - (int)strcspn(system_utsname.version, " "), - system_utsname.version); + regs->eflags, print_tainted(), init_utsname()->release, + (int)strcspn(init_utsname()->version, " "), + init_utsname()->version); printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", regs->eax,regs->ebx,regs->ecx,regs->edx); printk("ESI: %08lx EDI: %08lx EBP: %08lx", @@ -320,15 +321,6 @@ void show_regs(struct pt_regs * regs) * the "args". */ extern void kernel_thread_helper(void); -__asm__(".section .text\n" - ".align 4\n" - "kernel_thread_helper:\n\t" - "movl %edx,%eax\n\t" - "pushl %edx\n\t" - "call *%ebx\n\t" - "pushl %eax\n\t" - "call do_exit\n" - ".previous"); /* * Create a kernel thread @@ -346,7 +338,7 @@ int kernel_thread(int (*fn)(void *), voi regs.xes = __USER_DS; regs.orig_eax = -1; regs.eip = (unsigned long) kernel_thread_helper; - regs.xcs = __KERNEL_CS; + regs.xcs = __KERNEL_CS | get_kernel_rpl(); regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2; /* Ok, create the new process.. */ @@ -433,13 +425,12 @@ int copy_thread(int nr, unsigned long cl tsk = current; if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) { - p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); + p->thread.io_bitmap_ptr = kmemdup(tsk->thread.io_bitmap_ptr, + IO_BITMAP_BYTES, GFP_KERNEL); if (!p->thread.io_bitmap_ptr) { p->thread.io_bitmap_max = 0; return -ENOMEM; } - memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr, - IO_BITMAP_BYTES); set_tsk_thread_flag(p, TIF_IO_BITMAP); } @@ -905,7 +896,7 @@ asmlinkage int sys_get_thread_area(struc unsigned long arch_align_stack(unsigned long sp) { - if (randomize_va_space) + if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) sp -= get_random_int() % 8192; return sp & ~0xf; } diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index d3db03f..775f50e 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c @@ -185,17 +185,17 @@ static unsigned long convert_eip_to_line return addr; } -static inline int is_at_popf(struct task_struct *child, struct pt_regs *regs) +static inline int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs) { int i, copied; - unsigned char opcode[16]; + unsigned char opcode[15]; unsigned long addr = convert_eip_to_linear(child, regs); copied = access_process_vm(child, addr, opcode, sizeof(opcode), 0); for (i = 0; i < copied; i++) { switch (opcode[i]) { - /* popf */ - case 0x9d: + /* popf and iret */ + case 0x9d: case 0xcf: return 1; /* opcode and address size prefixes */ case 0x66: case 0x67: @@ -247,7 +247,7 @@ static void set_singlestep(struct task_s * don't mark it as being "us" that set it, so that we * won't clear it by hand later. */ - if (is_at_popf(child, regs)) + if (is_setting_trap_flag(child, regs)) return; child->ptrace |= PT_DTRACE; diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c index 54cfeab..84278e0 100644 --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c @@ -145,14 +145,10 @@ real_mode_gdt_entries [3] = 0x000092000100ffffULL /* 16-bit real-mode 64k data at 0x00000100 */ }; -static struct -{ - unsigned short size __attribute__ ((packed)); - unsigned long long * base __attribute__ ((packed)); -} -real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, real_mode_gdt_entries }, -real_mode_idt = { 0x3ff, NULL }, -no_idt = { 0, NULL }; +static struct Xgt_desc_struct +real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, (long)real_mode_gdt_entries }, +real_mode_idt = { 0x3ff, 0 }, +no_idt = { 0, 0 }; /* This is 16-bit protected mode code to disable paging and the cache, diff --git a/arch/i386/kernel/relocate_kernel.S b/arch/i386/kernel/relocate_kernel.S index d312616..f151d6f 100644 --- a/arch/i386/kernel/relocate_kernel.S +++ b/arch/i386/kernel/relocate_kernel.S @@ -7,16 +7,138 @@ */ #include +#include +#include + +/* + * Must be relocatable PIC code callable as a C function + */ + +#define PTR(x) (x << 2) +#define PAGE_ALIGNED (1 << PAGE_SHIFT) +#define PAGE_ATTR 0x63 /* _PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY */ +#define PAE_PGD_ATTR 0x01 /* _PAGE_PRESENT */ + + .text + .align PAGE_ALIGNED + .globl relocate_kernel +relocate_kernel: + movl 8(%esp), %ebp /* list of pages */ + +#ifdef CONFIG_X86_PAE + /* map the control page at its virtual address */ + + movl PTR(VA_PGD)(%ebp), %edi + movl PTR(VA_CONTROL_PAGE)(%ebp), %eax + andl $0xc0000000, %eax + shrl $27, %eax + addl %edi, %eax + + movl PTR(PA_PMD_0)(%ebp), %edx + orl $PAE_PGD_ATTR, %edx + movl %edx, (%eax) + + movl PTR(VA_PMD_0)(%ebp), %edi + movl PTR(VA_CONTROL_PAGE)(%ebp), %eax + andl $0x3fe00000, %eax + shrl $18, %eax + addl %edi, %eax + + movl PTR(PA_PTE_0)(%ebp), %edx + orl $PAGE_ATTR, %edx + movl %edx, (%eax) + + movl PTR(VA_PTE_0)(%ebp), %edi + movl PTR(VA_CONTROL_PAGE)(%ebp), %eax + andl $0x001ff000, %eax + shrl $9, %eax + addl %edi, %eax + + movl PTR(PA_CONTROL_PAGE)(%ebp), %edx + orl $PAGE_ATTR, %edx + movl %edx, (%eax) + + /* identity map the control page at its physical address */ + + movl PTR(VA_PGD)(%ebp), %edi + movl PTR(PA_CONTROL_PAGE)(%ebp), %eax + andl $0xc0000000, %eax + shrl $27, %eax + addl %edi, %eax + + movl PTR(PA_PMD_1)(%ebp), %edx + orl $PAE_PGD_ATTR, %edx + movl %edx, (%eax) + + movl PTR(VA_PMD_1)(%ebp), %edi + movl PTR(PA_CONTROL_PAGE)(%ebp), %eax + andl $0x3fe00000, %eax + shrl $18, %eax + addl %edi, %eax + + movl PTR(PA_PTE_1)(%ebp), %edx + orl $PAGE_ATTR, %edx + movl %edx, (%eax) + + movl PTR(VA_PTE_1)(%ebp), %edi + movl PTR(PA_CONTROL_PAGE)(%ebp), %eax + andl $0x001ff000, %eax + shrl $9, %eax + addl %edi, %eax + + movl PTR(PA_CONTROL_PAGE)(%ebp), %edx + orl $PAGE_ATTR, %edx + movl %edx, (%eax) +#else + /* map the control page at its virtual address */ + + movl PTR(VA_PGD)(%ebp), %edi + movl PTR(VA_CONTROL_PAGE)(%ebp), %eax + andl $0xffc00000, %eax + shrl $20, %eax + addl %edi, %eax + + movl PTR(PA_PTE_0)(%ebp), %edx + orl $PAGE_ATTR, %edx + movl %edx, (%eax) + + movl PTR(VA_PTE_0)(%ebp), %edi + movl PTR(VA_CONTROL_PAGE)(%ebp), %eax + andl $0x003ff000, %eax + shrl $10, %eax + addl %edi, %eax + + movl PTR(PA_CONTROL_PAGE)(%ebp), %edx + orl $PAGE_ATTR, %edx + movl %edx, (%eax) + + /* identity map the control page at its physical address */ + + movl PTR(VA_PGD)(%ebp), %edi + movl PTR(PA_CONTROL_PAGE)(%ebp), %eax + andl $0xffc00000, %eax + shrl $20, %eax + addl %edi, %eax + + movl PTR(PA_PTE_1)(%ebp), %edx + orl $PAGE_ATTR, %edx + movl %edx, (%eax) + + movl PTR(VA_PTE_1)(%ebp), %edi + movl PTR(PA_CONTROL_PAGE)(%ebp), %eax + andl $0x003ff000, %eax + shrl $10, %eax + addl %edi, %eax + + movl PTR(PA_CONTROL_PAGE)(%ebp), %edx + orl $PAGE_ATTR, %edx + movl %edx, (%eax) +#endif - /* - * Must be relocatable PIC code callable as a C function, that once - * it starts can not use the previous processes stack. - */ - .globl relocate_new_kernel relocate_new_kernel: /* read the arguments and say goodbye to the stack */ movl 4(%esp), %ebx /* page_list */ - movl 8(%esp), %ebp /* reboot_code_buffer */ + movl 8(%esp), %ebp /* list of pages */ movl 12(%esp), %edx /* start address */ movl 16(%esp), %ecx /* cpu_has_pae */ @@ -24,11 +146,26 @@ relocate_new_kernel: pushl $0 popfl - /* set a new stack at the bottom of our page... */ - lea 4096(%ebp), %esp + /* get physical address of control page now */ + /* this is impossible after page table switch */ + movl PTR(PA_CONTROL_PAGE)(%ebp), %edi - /* store the parameters back on the stack */ - pushl %edx /* store the start address */ + /* switch to new set of page tables */ + movl PTR(PA_PGD)(%ebp), %eax + movl %eax, %cr3 + + /* setup a new stack at the end of the physical control page */ + lea 4096(%edi), %esp + + /* jump to identity mapped page */ + movl %edi, %eax + addl $(identity_mapped - relocate_kernel), %eax + pushl %eax + ret + +identity_mapped: + /* store the start address on the stack */ + pushl %edx /* Set cr0 to a known state: * 31 0 == Paging disabled @@ -113,8 +250,3 @@ relocate_new_kernel: xorl %edi, %edi xorl %ebp, %ebp ret -relocate_new_kernel_end: - - .globl relocate_new_kernel_size -relocate_new_kernel_size: - .long relocate_new_kernel_end - relocate_new_kernel diff --git a/arch/i386/kernel/semaphore.c b/arch/i386/kernel/semaphore.c deleted file mode 100644 index 98352c3..0000000 --- a/arch/i386/kernel/semaphore.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * i386 semaphore implementation. - * - * (C) Copyright 1999 Linus Torvalds - * - * Portions Copyright 1999 Red Hat, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * rw semaphores implemented November 1999 by Benjamin LaHaise - */ -#include - -/* - * The semaphore operations have a special calling sequence that - * allow us to do a simpler in-line version of them. These routines - * need to convert that sequence back into the C sequence when - * there is contention on the semaphore. - * - * %eax contains the semaphore pointer on entry. Save the C-clobbered - * registers (%eax, %edx and %ecx) except %eax whish is either a return - * value or just clobbered.. - */ -asm( -".section .sched.text\n" -".align 4\n" -".globl __down_failed\n" -"__down_failed:\n\t" -#if defined(CONFIG_FRAME_POINTER) - "pushl %ebp\n\t" - "movl %esp,%ebp\n\t" -#endif - "pushl %edx\n\t" - "pushl %ecx\n\t" - "call __down\n\t" - "popl %ecx\n\t" - "popl %edx\n\t" -#if defined(CONFIG_FRAME_POINTER) - "movl %ebp,%esp\n\t" - "popl %ebp\n\t" -#endif - "ret" -); - -asm( -".section .sched.text\n" -".align 4\n" -".globl __down_failed_interruptible\n" -"__down_failed_interruptible:\n\t" -#if defined(CONFIG_FRAME_POINTER) - "pushl %ebp\n\t" - "movl %esp,%ebp\n\t" -#endif - "pushl %edx\n\t" - "pushl %ecx\n\t" - "call __down_interruptible\n\t" - "popl %ecx\n\t" - "popl %edx\n\t" -#if defined(CONFIG_FRAME_POINTER) - "movl %ebp,%esp\n\t" - "popl %ebp\n\t" -#endif - "ret" -); - -asm( -".section .sched.text\n" -".align 4\n" -".globl __down_failed_trylock\n" -"__down_failed_trylock:\n\t" -#if defined(CONFIG_FRAME_POINTER) - "pushl %ebp\n\t" - "movl %esp,%ebp\n\t" -#endif - "pushl %edx\n\t" - "pushl %ecx\n\t" - "call __down_trylock\n\t" - "popl %ecx\n\t" - "popl %edx\n\t" -#if defined(CONFIG_FRAME_POINTER) - "movl %ebp,%esp\n\t" - "popl %ebp\n\t" -#endif - "ret" -); - -asm( -".section .sched.text\n" -".align 4\n" -".globl __up_wakeup\n" -"__up_wakeup:\n\t" - "pushl %edx\n\t" - "pushl %ecx\n\t" - "call __up\n\t" - "popl %ecx\n\t" - "popl %edx\n\t" - "ret" -); - -/* - * rw spinlock fallbacks - */ -#if defined(CONFIG_SMP) -asm( -".section .sched.text\n" -".align 4\n" -".globl __write_lock_failed\n" -"__write_lock_failed:\n\t" - LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ",(%eax)\n" -"1: rep; nop\n\t" - "cmpl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" - "jne 1b\n\t" - LOCK_PREFIX "subl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" - "jnz __write_lock_failed\n\t" - "ret" -); - -asm( -".section .sched.text\n" -".align 4\n" -".globl __read_lock_failed\n" -"__read_lock_failed:\n\t" - LOCK_PREFIX "incl (%eax)\n" -"1: rep; nop\n\t" - "cmpl $1,(%eax)\n\t" - "js 1b\n\t" - LOCK_PREFIX "decl (%eax)\n\t" - "js __read_lock_failed\n\t" - "ret" -); -#endif diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index f168220..000cf03 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -53,6 +53,7 @@ #include