aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-02-08namespaces: move the IPC namespace under IPC_NS optionPavel Emelyanov2-52/+69
Currently the IPC namespace management code is spread over the ipc/*.c files. I moved this code into ipc/namespace.c file which is compiled out when needed. The linux/ipc_namespace.h file is used to store the prototypes of the functions in namespace.c and the stubs for NAMESPACES=n case. This is done so, because the stub for copy_ipc_namespace requires the knowledge of the CLONE_NEWIPC flag, which is in sched.h. But the linux/ipc.h file itself in included into many many .c files via the sys.h->sem.h sequence so adding the sched.h into it will make all these .c depend on sched.h which is not that good. On the other hand the knowledge about the namespaces stuff is required in 4 .c files only. Besides, this patch compiles out some auxiliary functions from ipc/sem.c, msg.c and shm.c files. It turned out that moving these functions into namespaces.c is not that easy because they use many other calls and macros from the original file. Moving them would make this patch complicated. On the other hand all these functions can be consolidated, so I will send a separate patch doing this a bit later. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Kirill Korotaev <dev@sw.ru> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08namespaces: move the UTS namespace under UTS_NS optionPavel Emelyanov1-0/+21
Currently all the namespace management code is in the kernel/utsname.c file, so just compile it out and make stubs in the appropriate header. The init namespace itself is in init/version.c and is in the kernel all the time. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Kirill Korotaev <dev@sw.ru> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08hugetlb: add locking for overcommit sysctlNishanth Aravamudan1-0/+1
When I replaced hugetlb_dynamic_pool with nr_overcommit_hugepages I used proc_doulongvec_minmax() directly. However, hugetlb.c's locking rules require that all counter modifications occur under the hugetlb_lock. Add a callback into the hugetlb code similar to the one for nr_hugepages. Grab the lock around the manipulation of nr_overcommit_hugepages in proc_doulongvec_minmax(). Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Acked-by: Adam Litke <agl@us.ibm.com> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: William Lee Irwin III <wli@holomorphy.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dmLinus Torvalds2-41/+11
* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (44 commits) dm raid1: report fault status dm raid1: handle read failures dm raid1: fix EIO after log failure dm raid1: handle recovery failures dm raid1: handle write failures dm snapshot: combine consecutive exceptions in memory dm: stripe enhanced status return dm: stripe trigger event on failure dm log: auto load modules dm: move deferred bio flushing to workqueue dm crypt: use async crypto dm crypt: prepare async callback fn dm crypt: add completion for async dm crypt: add async request mempool dm crypt: extract scatterlist processing dm crypt: tidy io ref counting dm crypt: introduce crypt_write_io_loop dm crypt: abstract crypt_write_done dm crypt: store sector mapping in dm_crypt_io dm crypt: move queue functions ...
2008-02-07Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6Linus Torvalds2-36/+3
* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6: (59 commits) hwmon: (lm80) Add individual alarm files hwmon: (lm80) De-macro the sysfs callbacks hwmon: (lm80) Various cleanups hwmon: (w83627hf) Refactor beep enable handling hwmon: (w83627hf) Add individual alarm and beep files hwmon: (w83627hf) Enable VBAT monitoring hwmon: (w83627ehf) The W83627DHG has 8 VID pins hwmon: (asb100) Add individual alarm files hwmon: (asb100) De-macro the sysfs callbacks hwmon: (asb100) Various cleanups hwmon: VRM is not written to registers hwmon: (dme1737) fix Super-IO device ID override hwmon: (dme1737) fix divide-by-0 hwmon: (abituguru3) Add AUX4 fan input for Abit IP35 Pro hwmon: Add support for Texas Instruments/Burr-Brown ADS7828 hwmon: (adm9240) Add individual alarm files hwmon: (lm77) Add individual alarm files hwmon: Discard useless I2C driver IDs hwmon: (lm85) Make the pwmN_enable files writable hwmon: (lm85) Return standard values in pwmN_enable ...
2008-02-07Merge branch 'slub-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vmLinus Torvalds2-1/+27
* 'slub-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm: SLUB: fix checkpatch warnings Use non atomic unlock SLUB: Support for performance statistics SLUB: Alternate fast paths using cmpxchg_local SLUB: Use unique end pointer for each slab page. SLUB: Deal with annoying gcc warning on kfree()
2008-02-08dm: table remove unused variableVasily Averin1-9/+9
Save some bytes. Signed-off-by: Vasily Averin <vvs@sw.ru> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-02-08dm ioctl: move compat codeMilan Broz1-32/+2
Move compat_ioctl handling into dm-ioctl.c. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-02-07SLUB: Support for performance statisticsChristoph Lameter1-0/+23
The statistics provided here allow the monitoring of allocator behavior but at the cost of some (minimal) loss of performance. Counters are placed in SLUB's per cpu data structure. The per cpu structure may be extended by the statistics to grow larger than one cacheline which will increase the cache footprint of SLUB. There is a compile option to enable/disable the inclusion of the runtime statistics and its off by default. The slabinfo tool is enhanced to support these statistics via two options: -D Switches the line of information displayed for a slab from size mode to activity mode. -A Sorts the slabs displayed by activity. This allows the display of the slabs most important to the performance of a certain load. -r Report option will report detailed statistics on Example (tbench load): slabinfo -AD ->Shows the most active slabs Name Objects Alloc Free %Fast skbuff_fclone_cache 33 111953835 111953835 99 99 :0000192 2666 5283688 5281047 99 99 :0001024 849 5247230 5246389 83 83 vm_area_struct 1349 119642 118355 91 22 :0004096 15 66753 66751 98 98 :0000064 2067 25297 23383 98 78 dentry 10259 28635 18464 91 45 :0000080 11004 18950 8089 98 98 :0000096 1703 12358 10784 99 98 :0000128 762 10582 9875 94 18 :0000512 184 9807 9647 95 81 :0002048 479 9669 9195 83 65 anon_vma 777 9461 9002 99 71 kmalloc-8 6492 9981 5624 99 97 :0000768 258 7174 6931 58 15 So the skbuff_fclone_cache is of highest importance for the tbench load. Pretty high load on the 192 sized slab. Look for the aliases slabinfo -a | grep 000192 :0000192 <- xfs_btree_cur filp kmalloc-192 uid_cache tw_sock_TCP request_sock_TCPv6 tw_sock_TCPv6 skbuff_head_cache xfs_ili Likely skbuff_head_cache. Looking into the statistics of the skbuff_fclone_cache is possible through slabinfo skbuff_fclone_cache ->-r option implied if cache name is mentioned .... Usual output ... Slab Perf Counter Alloc Free %Al %Fr -------------------------------------------------- Fastpath 111953360 111946981 99 99 Slowpath 1044 7423 0 0 Page Alloc 272 264 0 0 Add partial 25 325 0 0 Remove partial 86 264 0 0 RemoteObj/SlabFrozen 350 4832 0 0 Total 111954404 111954404 Flushes 49 Refill 0 Deactivate Full=325(92%) Empty=0(0%) ToHead=24(6%) ToTail=1(0%) Looks good because the fastpath is overwhelmingly taken. skbuff_head_cache: Slab Perf Counter Alloc Free %Al %Fr -------------------------------------------------- Fastpath 5297262 5259882 99 99 Slowpath 4477 39586 0 0 Page Alloc 937 824 0 0 Add partial 0 2515 0 0 Remove partial 1691 824 0 0 RemoteObj/SlabFrozen 2621 9684 0 0 Total 5301739 5299468 Deactivate Full=2620(100%) Empty=0(0%) ToHead=0(0%) ToTail=0(0%) Descriptions of the output: Total: The total number of allocation and frees that occurred for a slab Fastpath: The number of allocations/frees that used the fastpath. Slowpath: Other allocations Page Alloc: Number of calls to the page allocator as a result of slowpath processing Add Partial: Number of slabs added to the partial list through free or alloc (occurs during cpuslab flushes) Remove Partial: Number of slabs removed from the partial list as a result of allocations retrieving a partial slab or by a free freeing the last object of a slab. RemoteObj/Froz: How many times were remotely freed object encountered when a slab was about to be deactivated. Frozen: How many times was free able to skip list processing because the slab was in use as the cpuslab of another processor. Flushes: Number of times the cpuslab was flushed on request (kmem_cache_shrink, may result from races in __slab_alloc) Refill: Number of times we were able to refill the cpuslab from remotely freed objects for the same slab. Deactivate: Statistics how slabs were deactivated. Shows how they were put onto the partial list. In general fastpath is very good. Slowpath without partial list processing is also desirable. Any touching of partial list uses node specific locks which may potentially cause list lock contention. Signed-off-by: Christoph Lameter <clameter@sgi.com>
2008-02-07SLUB: Use unique end pointer for each slab page.Christoph Lameter1-1/+4
We use a NULL pointer on freelists to signal that there are no more objects. However the NULL pointers of all slabs match in contrast to the pointers to the real objects which are in different ranges for different slab pages. Change the end pointer to be a pointer to the first object and set bit 0. Every slab will then have a different end pointer. This is necessary to ensure that end markers can be matched to the source slab during cmpxchg_local. Bring back the use of the mapping field by SLUB since we would otherwise have to call a relatively expensive function page_address() in __slab_alloc(). Use of the mapping field allows avoiding a call to page_address() in various other functions as well. There is no need to change the page_mapping() function since bit 0 is set on the mapping as also for anonymous pages. page_mapping(slab_page) will therefore still return NULL although the mapping field is overloaded. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-02-07hwmon: Discard useless I2C driver IDsJean Delvare1-33/+0
Many I2C hwmon drivers define a driver ID but no other code references these, meaning that they are useless. Discard them, along with a few IDs which are defined but never used at all. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (w83781d) Misc cleanupsJean Delvare1-1/+0
* Drop unused defines * Drop unused driver ID * Remove trailing whitespace Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl520sm) Various cleanupsJean Delvare1-1/+0
* Drop trailing spaces * Drop unused driver ID * Drop stray backslashes in macros * Rename new_client to client * Drop redundant initializations to 0 Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl518sm) Various cleanupsJean Delvare1-1/+0
* Drop history, it doesn't belong there * Drop unused struct member * Drop bogus struct member comment * Drop unused driver ID * Rename new_client to client * Drop redundant initializations to 0 * Drop useless cast * Drop trailing space * Fix comment * Drop duplicate comment Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07dmi: Let drivers walk the DMI tableJean Delvare1-0/+3
Let drivers walk the DMI table for their own needs. Some drivers need data stored in OEM-specific DMI records for proper operation. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds1-0/+129
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (48 commits) [SCSI] aacraid: do not set valid bit in sense information [SCSI] ses: add new Enclosure ULD [SCSI] enclosure: add support for enclosure services [SCSI] sr: fix test unit ready responses [SCSI] u14-34f: fix data direction bug [SCSI] aacraid: pci_set_dma_max_seg_size opened up for late model controllers [SCSI] fix BUG when sum(scatterlist) > bufflen [SCSI] arcmsr: updates (1.20.00.15) [SCSI] advansys: make 3 functions static [SCSI] Small cleanups for scsi_host.h [SCSI] dc395x: fix uninitialized var warning [SCSI] NCR53C9x: remove driver [SCSI] remove m68k NCR53C9x based drivers [SCSI] dec_esp: Remove driver [SCSI] kernel-doc: fix scsi docbook [SCSI] update my email address [SCSI] add protocol definitions [SCSI] sd: handle bad lba in sense information [SCSI] qla2xxx: Update version number to 8.02.00-k8. [SCSI] qla2xxx: Correct issue where incorrect init-fw mailbox command was used on non-NPIV capable ISPs. ...
2008-02-07[SCSI] enclosure: add support for enclosure servicesJames Bottomley1-0/+129
The enclosure misc device is really just a library providing sysfs support for physical enclosure devices and their components. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-07Fix compilation of powerpc asm-offsets.c with old gccTony Breeds2-2/+6
Commit ad7f71674ad7c3c4467e48f6ab9e85516dae2720 ("[POWERPC] Use a sensible default for clock_getres() in the VDSO") corrected the clock resolution reported by the VDSO clock_getres() but introduced another problem in that older versions of gcc (gcc-4.0 and earlier) fail to compile the new code in arch/powerpc/kernel/asm-offsets.c. This fixes it by introducing a new MONOTONIC_RES_NSEC define in the generic code which is equivalent to KTIME_MONOTONIC_RES but is just an integer constant, not a ktime union. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-4/+3
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (34 commits) Input: i8042 - non-x86 build fix Input: pxa27x_keypad - also enable on PXA3xx Input: pxa27x_keypad - add debounce_interval to the keypad platform data Input: pxa27x_keypad - use device resources for I/O memory mapping and IRQ Input: pxa27x_keypad - enable rotary encoders and direct keys Input: pxa27x_keypad - introduce pxa27x_keypad_config() Input: pxa27x_keypad - introduce driver structure and use KEY() to define matrix keys Input: pxa27x_keypad - remove pin configuration from the driver Input: pxa27x_keypad - rename the driver (was pxa27x_keyboard) Input: constify function pointer tables (seq_operations) Input: i8042 - add Fujitsu-Siemens Amilo Pro 2010 to nomux list Input: i8042 - enable DMI quirks on x86-64 Input: i8042 - add Dritek quirk for Acer Aspire 9110 Input: add input event to APM event bridge Input: mousedev - use BIT_MASK instead of BIT Input: remove duplicate includes Input: remove cdev from input_dev structure Input: remove duplicated headers in drivers/char/keyboard.c Input: i8042 - add Dritek keyboard extension quirk Input: add Tosa keyboard driver ...
2008-02-07Merge git://git.infradead.org/mtd-2.6Linus Torvalds6-18/+39
* git://git.infradead.org/mtd-2.6: (120 commits) [MTD] Fix mtdoops.c compilation [MTD] [NOR] fix startup lock when using multiple nor flash chips [MTD] [DOC200x] eccbuf is statically defined and always evaluate to true [MTD] Fix maps/physmap.c compilation with CONFIG_PM [MTD] onenand: Add panic_write function to the onenand driver [MTD] mtdoops: Use the panic_write function when present [MTD] Add mtd panic_write function pointer [MTD] [NAND] Freescale enhanced Local Bus Controller FCM NAND support. [MTD] physmap.c: Add support for multiple resources [MTD] [NAND] Fix misparenthesization introduced by commit 78b65179... [MTD] [NAND] Fix Blackfin NFC ECC calculating bug with page size 512 bytes [MTD] [NAND] Remove wrong operation in PM function of the BF54x NFC driver [MTD] [NAND] Remove unused variable in plat_nand_remove [MTD] Unlocking all Intel flash that is locked on power up. [MTD] [NAND] at91_nand: Make mtdparts option can override board info [MTD] mtdoops: Various minor cleanups [MTD] mtdoops: Ensure sequential write to the buffer [MTD] mtdoops: Perform write operations in a workqueue [MTD] mtdoops: Add further error return code checking [MTD] [NOR] Test devtype, not definition in flash_probe(), drivers/mtd/devices/lart.c ...
2008-02-07Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6Linus Torvalds7-20/+155
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (112 commits) ACPI: fix build warning Revert "cpuidle: build fix for non-x86" ACPI: update intrd DSDT override console messages ACPI: update DSDT override documentation ACPI: Add "acpi_no_initrd_override" kernel parameter ACPI: its a directory not a folder.... ACPI: misc cleanups ACPI: add missing prink prefix strings ACPI: cleanup acpi.h ACPICA: fix CONFIG_ACPI_DEBUG_FUNC_TRACE build ACPI: video: Ignore ACPI video devices that aren't present in hardware ACPI: video: reset brightness on resume ACPI: video: call ACPI notifier chain for ACPI video notifications ACPI: create notifier chain to get hotkey events to graphics driver ACPI: video: delete unused display switch on hotkey event code ACPI: video: create "brightness_switch_enabled" modparam cpuidle: Add a poll_idle method ACPI: cpuidle: Support C1 idle time accounting ACPI: enable MWAIT for C1 idle ACPI: idle: Fix acpi_safe_halt usages and interrupt enabling/disabling ...
2008-02-07Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-ledsLinus Torvalds1-0/+5
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds: leds: Add HP Jornada 6xx driver leds: Remove the now uneeded ixp4xx driver leds: Add power LED to the wrap driver leds: Fix led-gpio active_low default brightness leds: hw acceleration for Clevo mail LED driver leds: Add support for hardware accelerated LED flashing leds: Standardise LED naming scheme leds: Add clevo notebook LED driver
2008-02-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreqLinus Torvalds1-0/+4
* git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] Add missing printk levels to e_powersaver [CPUFREQ] Fix sparse warning in powernow-k8 [CPUFREQ] Support Model D parts and newer in e_powersaver [CPUFREQ] Powernow-k8: Update to support the latest Turion processors [CPUFREQ] fix configuration help message [CPUFREQ] powernow-k8 print pstate instead of fid/did for family 10h [CPUFREQ] Eliminate cpufreq_userspace scaling_setspeed deadlock [CPUFREQ] gx-suspmod.c: use boot_cpu_data instead of current_cpu_data [CPUFREQ] fix incorrect comment on show_available_freqs() in freq_table.c [CPUFREQ] drivers/cpufreq: Add missing "space" [CPUFREQ] arch/x86: Add missing "space" [CPUFREQ] Remove pointless Kconfig dependancy
2008-02-07Merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpcLinus Torvalds2-0/+2
* 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (69 commits) [POWERPC] Add SPE registers to core dumps [POWERPC] Use regset code for compat PTRACE_*REGS* calls [POWERPC] Use generic compat_sys_ptrace [POWERPC] Use generic compat_ptrace_request [POWERPC] Use generic ptrace peekdata/pokedata [POWERPC] Use regset code for PTRACE_*REGS* requests [POWERPC] Switch to generic compat_binfmt_elf code [POWERPC] Switch to using user_regset-based core dumps [POWERPC] Add user_regset compat support [POWERPC] Add user_regset_view definitions [POWERPC] Use user_regset accessors for GPRs [POWERPC] ptrace accessors for special regs MSR and TRAP [POWERPC] Use user_regset accessors for SPE regs [POWERPC] Use user_regset accessors for altivec regs [POWERPC] Use user_regset accessors for FP regs [POWERPC] mpc52xx: fix compile error introduce when rebasing patch [POWERPC] 4xx: PCIe indirect DCR spinlock fix. [POWERPC] Add missing native dcr dcr_ind_lock spinlock [POWERPC] 4xx: Fix offset value on Warp board [POWERPC] 4xx: Add 440EPx Sequoia ehci dts entry ...
2008-02-07Char: serial167, remove bottomhalfJiri Slaby1-14/+0
- Cy_EVENT_OPEN_WAKEUP is simple wake_up - Cy_EVENT_HANGUP is wake_up + tty_hangup, which schedules its own work - Cy_EVENT_WRITE_WAKEUP is tty_wakeup which may be called directly too Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Char: stallion, remove bottomhalfJiri Slaby1-1/+0
- tty_hangup schedules a bottomhalf itself, tty_wakeup doesn't need it - call the CD code (part of work handler previously) directly from the code (it wakes somebody up or calls tty_hangup at worse) Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Char: istallion, remove hangup bottomhalfJiri Slaby1-1/+0
tty_hangup schedules a work for hangup itself, no need to do it in the driver. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Char: esp, remove hangup and wakeup bottomhalvesJiri Slaby1-4/+0
There is no need to schedule a bottomhalf for either of them. One is fast and the another schedules a bottomhalf itself. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Char: char/serial, remove SERIAL_TYPE_NORMAL redefinesJiri Slaby1-2/+0
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Unexport asm/page.hKirill A. Shutemov3-1/+16
Do not export asm/page.h during make headers_install. This removes PAGE_SIZE from userspace headers. Signed-off-by: Kirill A. Shutemov <k.shutemov@gmail.com> Reviewed-by: David Woodhouse <dwmw2@infradead.org> Cc: David Howells <dhowells@redhat.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Unexport asm/elf.hKirill A. Shutemov3-1/+5
Do not export asm/elf.h during make headers_install. Signed-off-by: Kirill A. Shutemov <k.shutemov@gmail.com> Reviewed-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Unexport asm/user.h and linux/user.hKirill A. Shutemov2-1/+2
Do not export asm/user.h and linux/user.h during make headers_install. Signed-off-by: Kirill A. Shutemov <k.shutemov@gmail.com> Reviewed-by: David Woodhouse <dwmw2@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07iget: remove iget() and the read_inode() super op as being obsoleteDavid Howells1-14/+0
Remove the old iget() call and the read_inode() superblock operation it uses as these are really obsolete, and the use of read_inode() does not produce proper error handling (no distinction between ENOMEM and EIO when marking an inode bad). Furthermore, this removes the temptation to use iget() to find an inode by number in a filesystem from code outside that filesystem. iget_locked() should be used instead. A new function is added in an earlier patch (iget_failed) that is to be called to mark an inode as bad, unlock it and release it should the get routine fail. Mark iget() and read_inode() as being obsolete and remove references to them from the documentation. Typically a filesystem will be modified such that the read_inode function becomes an internal iget function, for example the following: void thingyfs_read_inode(struct inode *inode) { ... } would be changed into something like: struct inode *thingyfs_iget(struct super_block *sp, unsigned long ino) { struct inode *inode; int ret; inode = iget_locked(sb, ino); if (!inode) return ERR_PTR(-ENOMEM); if (!(inode->i_state & I_NEW)) return inode; ... unlock_new_inode(inode); return inode; error: iget_failed(inode); return ERR_PTR(ret); } and then thingyfs_iget() would be called rather than iget(), for example: ret = -EINVAL; inode = iget(sb, ino); if (!inode || is_bad_inode(inode)) goto error; becomes: inode = thingyfs_iget(sb, ino); if (IS_ERR(inode)) { ret = PTR_ERR(inode); goto error; } Note that is_bad_inode() does not need to be called. The error returned by thingyfs_iget() should render it unnecessary. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07iget: stop QNX4 from using iget() and read_inode()David Howells1-0/+1
Stop the QNX4 filesystem from using iget() and read_inode(). Replace qnx4_read_inode() with qnx4_iget(), and call that instead of iget(). qnx4_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. qnx4_fill_super() returns any error incurred when getting the root inode instead of EINVAL. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: David Howells <dhowells@redhat.com> Cc: Anders Larsen <al@alarsen.net> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07iget: stop EXT4 from using iget() and read_inode()David Howells1-1/+1
Stop the EXT4 filesystem from using iget() and read_inode(). Replace ext4_read_inode() with ext4_iget(), and call that instead of iget(). ext4_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. ext4_fill_super() returns any error incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: "Theodore Ts'o" <tytso@mit.edu> Acked-by: Jan Kara <jack@suse.cz> Cc: <linux-ext4@vger.kernel.org> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07iget: stop EXT3 from using iget() and read_inode()David Howells1-1/+1
Stop the EXT3 filesystem from using iget() and read_inode(). Replace ext3_read_inode() with ext3_iget(), and call that instead of iget(). ext3_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. ext3_fill_super() returns any error incurred when getting the root inode instead of EINVAL. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: "Theodore Ts'o" <tytso@mit.edu> Acked-by: Jan Kara <jack@suse.cz> Cc: <linux-ext4@vger.kernel.org> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07iget: stop EFS from using iget() and read_inode()David Howells1-1/+1
Stop the EFS filesystem from using iget() and read_inode(). Replace efs_read_inode() with efs_iget(), and call that instead of iget(). efs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. efs_fill_super() returns any error incurred when getting the root inode instead of EACCES. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07iget: introduce a function to register iget failureDavid Howells1-0/+1
Introduce a function to register failure in an inode construction path. This includes marking the inode under construction as bad, unlocking it and releasing it. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Add an ERR_CAST() function to complement ERR_PTR and co.David Howells1-0/+13
Add an ERR_CAST() function to complement ERR_PTR and co. for the purposes of casting an error entyped as one pointer type to an error of another pointer type whilst making it explicit as to what is going on. This provides a replacement for the ERR_PTR(PTR_ERR(p)) construct. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07vmcoreinfo: add "VMCOREINFO_" to all the call for vmcoreinfo_append_str()Ken'ichi Ohmichi1-0/+4
For readability, all the calls to vmcoreinfo_append_str() are changed to macros having a prefix "VMCOREINFO_". This discussion is the following: http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0584.html Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Acked-by: Simon Horman <horms@verge.net.au> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07vmcoreinfo: use the existing offsetof() for VMCOREINFO_OFFSET()Ken'ichi Ohmichi1-1/+1
It is better that the existing offsetof() is used for VMCOREINFO_OFFSET(). This discussion is the following: http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0584.html Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Acked-by: Simon Horman <horms@verge.net.au> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07vmcoreinfo: rename vmcoreinfo's macros returning the sizeKen'ichi Ohmichi1-3/+3
This patchset is for the vmcoreinfo data. The vmcoreinfo data has the minimum debugging information only for dump filtering. makedumpfile (dump filtering command) gets it to distinguish unnecessary pages, and makedumpfile creates a small dumpfile. This patch: VMCOREINFO_SIZE() should be renamed VMCOREINFO_STRUCT_SIZE() since it's always returning the size of the struct with a given name. This change would allow VMCOREINFO_TYPEDEF_SIZE() to simply become VMCOREINFO_SIZE() since it need not be used exclusively for typedefs. This discussion is the following: http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0582.html Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Acked-by: David Rientjes <rientjes@google.com> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Introduce flags for reserve_bootmem()Bernhard Walle1-2/+15
This patchset adds a flags variable to reserve_bootmem() and uses the BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions between crashkernel area and already used memory. This patch: Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE. If that flag is set, the function returns with -EBUSY if the memory already has been reserved in the past. This is to avoid conflicts. Because that code runs before SMP initialisation, there's no race condition inside reserve_bootmem_core(). [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: fix powerpc build] Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: <linux-arch@vger.kernel.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07ASIC3 driverSamuel Ortiz1-0/+497
This is a patch for the Compaq ASIC3 multi function chip, found in many PDAs (iPAQs, HTCs...). It is a simplified version of Paul Sokolovsky's first proposal [1]. With this code, it is basically a GPIO and IRQ expander. My plan is to add more features once this patch gets reviewed and accepted. [1] http://lkml.org/lkml/2007/5/1/46 Signed-off-by: Samuel Ortiz <sameo@openedhand.com> Cc: Paul Sokolovsky <pmiscml@gmail.com> Cc: Ben Dooks <ben@trinity.fluff.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07hotplug cpu: move tasks in empty cpusets to parentCliff Wickman1-0/+1
This patch corrects a situation that occurs when one disables all the cpus in a cpuset. Currently, the disabled (cpu-less) cpuset inherits the cpus of its parent, which is incorrect because it may then overlap its cpu-exclusive sibling. Tasks of an empty cpuset should be moved to the cpuset which is the parent of their current cpuset. Or if the parent cpuset has no cpus, to its parent, etc. And the empty cpuset should be released (if it is flagged notify_on_release). Depends on the cgroup_scan_tasks() function (proposed by David Rientjes) to iterate through all tasks in the cpu-less cpuset. We are deliberately avoiding a walk of the tasklist. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Cliff Wickman <cpw@sgi.com> Cc: Paul Menage <menage@google.com> Cc: Paul Jackson <pj@sgi.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07cgroups: mechanism to process each task in a cgroupCliff Wickman1-0/+14
Provide cgroup_scan_tasks(), which iterates through every task in a cgroup, calling a test function and a process function for each. And call the process function without holding the css_set_lock lock. The idea is David Rientjes', predicting that such a function will make it much easier in the future to extend things that require access to each task in a cgroup without holding the lock, [akpm@linux-foundation.org: cleanup] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Cliff Wickman <cpw@sgi.com> Cc: Paul Menage <menage@google.com> Cc: Paul Jackson <pj@sgi.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07Memory controller remove control_type featureBalbir Singh1-5/+1
Based on the discussion at http://lkml.org/lkml/2007/12/20/383, it was felt that control_type might not be a good thing to implement right away. We can add this flexibility at a later point when required. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07per-zone and reclaim enhancements for memory controller: calculate the number of pages to be scanned per cgroupKAMEZAWA Hiroyuki1-0/+15
Define function for calculating the number of scan target on each Zone/LRU. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Kirill Korotaev <dev@sw.ru> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Paul Menage <menage@google.com> Cc: Pavel Emelianov <xemul@openvz.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07per-zone and reclaim enhancements for memory controller: remember reclaim priority in memory cgroupKAMEZAWA Hiroyuki1-0/+20
Functions to remember reclaim priority per cgroup (as zone->prev_priority) [akpm@linux-foundation.org: build fixes] [akpm@linux-foundation.org: more build fixes] Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Kirill Korotaev <dev@sw.ru> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Paul Menage <menage@google.com> Cc: Pavel Emelianov <xemul@openvz.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07per-zone and reclaim enhancements for memory controller: calculate active/inactive imbalance per cgroupKAMEZAWA Hiroyuki1-0/+8
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Kirill Korotaev <dev@sw.ru> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Paul Menage <menage@google.com> Cc: Pavel Emelianov <xemul@openvz.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>